@credenza3/passport-evm 0.3.9 → 0.3.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/README.md +26 -0
- package/dist/{App-4bAcJfV3.js → App-SMvL8SHG.js} +18 -18
- package/dist/{App-4bAcJfV3.js.map → App-SMvL8SHG.js.map} +1 -1
- package/dist/{Button-Cj-HeNKm.js → Button-Cs2Lx_La.js} +4 -4
- package/dist/{Button-Cj-HeNKm.js.map → Button-Cs2Lx_La.js.map} +1 -1
- package/dist/{ButtonBack-DfbRWUpL.js → ButtonBack-lP4SI-6U.js} +4 -4
- package/dist/{ButtonBack-DfbRWUpL.js.map → ButtonBack-lP4SI-6U.js.map} +1 -1
- package/dist/{ButtonLink-Gu7LYNS3.js → ButtonLink-DtUsGiis.js} +3 -3
- package/dist/{ButtonLink-Gu7LYNS3.js.map → ButtonLink-DtUsGiis.js.map} +1 -1
- package/dist/{ConfirmAccount-Cp6gVY2h.js → ConfirmAccount-BNHb06gD.js} +9 -9
- package/dist/{ConfirmAccount-Cp6gVY2h.js.map → ConfirmAccount-BNHb06gD.js.map} +1 -1
- package/dist/{ContentHeader-DRdS8evw.js → ContentHeader-BtrqAVdn.js} +3 -3
- package/dist/{ContentHeader-DRdS8evw.js.map → ContentHeader-BtrqAVdn.js.map} +1 -1
- package/dist/{Error-BPBVPWFz.js → Error-xDXjWq61.js} +5 -5
- package/dist/{Error-BPBVPWFz.js.map → Error-xDXjWq61.js.map} +1 -1
- package/dist/{Input-J1sXsn_p.js → Input-BYyaf68g.js} +4 -4
- package/dist/{Input-J1sXsn_p.js.map → Input-BYyaf68g.js.map} +1 -1
- package/dist/{Label-D7bCaP-v.js → Label-Cmti5Cbv.js} +3 -3
- package/dist/{Label-D7bCaP-v.js.map → Label-Cmti5Cbv.js.map} +1 -1
- package/dist/{Loader-C63DmXSz.js → Loader-7pGodfm_.js} +3 -3
- package/dist/{Loader-C63DmXSz.js.map → Loader-7pGodfm_.js.map} +1 -1
- package/dist/{Login-Bt5mybMx.js → Login-8sB_EdyC.js} +9 -9
- package/dist/{Login-Bt5mybMx.js.map → Login-8sB_EdyC.js.map} +1 -1
- package/dist/{Logout-Cr32X4yk.js → Logout-fIvg92Cd.js} +6 -6
- package/dist/{Logout-Cr32X4yk.js.map → Logout-fIvg92Cd.js.map} +1 -1
- package/dist/{Nav-BwVSkjcc.js → Nav-OSFqaRA_.js} +5 -5
- package/dist/{Nav-BwVSkjcc.js.map → Nav-OSFqaRA_.js.map} +1 -1
- package/dist/{PassportId-skkrCQ6X.js → PassportId-BiqFpElN.js} +6 -6
- package/dist/{PassportId-skkrCQ6X.js.map → PassportId-BiqFpElN.js.map} +1 -1
- package/dist/{Payment-CZimj0RB.js → Payment-CRBMyumu.js} +114 -114
- package/dist/{Payment-CZimj0RB.js.map → Payment-CRBMyumu.js.map} +1 -1
- package/dist/{PaymentResult-C5CbuSeh.js → PaymentResult-C0tercYs.js} +4 -4
- package/dist/{PaymentResult-C5CbuSeh.js.map → PaymentResult-C0tercYs.js.map} +1 -1
- package/dist/{Profile-BEANZCD6.js → Profile-BDwV3Ncz.js} +7 -7
- package/dist/{Profile-BEANZCD6.js.map → Profile-BDwV3Ncz.js.map} +1 -1
- package/dist/{ProgressVideo-C0vPVWHe.js → ProgressVideo-BceAqolf.js} +5 -5
- package/dist/{ProgressVideo-C0vPVWHe.js.map → ProgressVideo-BceAqolf.js.map} +1 -1
- package/dist/{RichAlert-DaS8Za5x.js → RichAlert-Dfa-PN7k.js} +5 -5
- package/dist/{RichAlert-DaS8Za5x.js.map → RichAlert-Dfa-PN7k.js.map} +1 -1
- package/dist/{Scanner-ByBj24Rt.js → Scanner-vVzrRFe0.js} +6 -6
- package/dist/{Scanner-ByBj24Rt.js.map → Scanner-vVzrRFe0.js.map} +1 -1
- package/dist/{SendTokens-R_T587d7.js → SendTokens-fPAraviQ.js} +7 -7
- package/dist/{SendTokens-R_T587d7.js.map → SendTokens-fPAraviQ.js.map} +1 -1
- package/dist/{Sign-CRRt8nDl.js → Sign-CVGTsGlf.js} +6 -6
- package/dist/{Sign-CRRt8nDl.js.map → Sign-CVGTsGlf.js.map} +1 -1
- package/dist/{Stripe.service-BqI5OCCc.js → Stripe.service-ByDQB0PM.js} +3 -3
- package/dist/{Stripe.service-BqI5OCCc.js.map → Stripe.service-ByDQB0PM.js.map} +1 -1
- package/dist/{UpdateProfile-BkHZxzvV.js → UpdateProfile-BCtN5a9E.js} +10 -10
- package/dist/{UpdateProfile-BkHZxzvV.js.map → UpdateProfile-BCtN5a9E.js.map} +1 -1
- package/dist/{UserInfo-Dy8mLKJq.js → UserInfo-CIp-6Rlv.js} +4 -4
- package/dist/{UserInfo-Dy8mLKJq.js.map → UserInfo-CIp-6Rlv.js.map} +1 -1
- package/dist/{Wallet-RGeRExWc.js → Wallet-C9NDnmyD.js} +7 -7
- package/dist/{Wallet-RGeRExWc.js.map → Wallet-C9NDnmyD.js.map} +1 -1
- package/dist/{each-CNHa-o5n.js → each-Uu4HiSSB.js} +2 -2
- package/dist/{each-CNHa-o5n.js.map → each-Uu4HiSSB.js.map} +1 -1
- package/dist/{html-cCcjXlvj.js → html-Bhlo4lQ4.js} +3 -3
- package/dist/{html-cCcjXlvj.js.map → html-Bhlo4lQ4.js.map} +1 -1
- package/dist/{index-Bm4yd5br.js → index-D4uvwDRg.js} +5 -5
- package/dist/{index-Bm4yd5br.js.map → index-D4uvwDRg.js.map} +1 -1
- package/dist/{index-client-B1eA2Pl1.js → index-client-2qGIo9Qc.js} +2 -2
- package/dist/{index-client-B1eA2Pl1.js.map → index-client-2qGIo9Qc.js.map} +1 -1
- package/dist/{input-BzAlVz06.js → input-9S31i-DN.js} +2 -2
- package/dist/{input-BzAlVz06.js.map → input-9S31i-DN.js.map} +1 -1
- package/dist/{legacy-C-U_gDbv.js → legacy-DN1UEacY.js} +2 -2
- package/dist/{legacy-C-U_gDbv.js.map → legacy-DN1UEacY.js.map} +1 -1
- package/dist/passport.es.js +1 -1
- package/dist/passport.umd.js +3 -3
- package/dist/passport.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/passport.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(`@import"https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap";.crdz-ui *,.crdz-ui :before,.crdz-ui :after{font-family:Poppins,serif;box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}.crdz-ui :before,.crdz-ui :after{--tw-content: ""}.crdz-ui hr{height:0;color:inherit;border-top-width:1px}.crdz-ui abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.crdz-ui h1,.crdz-ui h2,.crdz-ui h3,.crdz-ui h4,.crdz-ui h5,.crdz-ui h6{font-size:inherit;font-weight:inherit}.crdz-ui a{color:inherit;text-decoration:inherit}.crdz-ui b,.crdz-ui strong{font-weight:bolder}.crdz-ui code,.crdz-ui kbd,.crdz-ui samp,.crdz-ui pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}.crdz-ui small{font-size:80%}.crdz-ui sub,.crdz-ui sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.crdz-ui sub{bottom:-.25em}.crdz-ui sup{top:-.5em}.crdz-ui table{text-indent:0;border-color:inherit;border-collapse:collapse}.crdz-ui button,.crdz-ui select{text-transform:none}.crdz-ui button,.crdz-ui [type=button],.crdz-ui [type=reset],.crdz-ui [type=submit]{font-size:100%;-webkit-appearance:button;background-image:none}.crdz-ui :-moz-focusring{outline:auto}.crdz-ui :-moz-ui-invalid{box-shadow:none}.crdz-ui progress{vertical-align:baseline}.crdz-ui ::-webkit-inner-spin-button,.crdz-ui ::-webkit-outer-spin-button{height:auto}.crdz-ui [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.crdz-ui ::-webkit-search-decoration{-webkit-appearance:none}.crdz-ui ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.crdz-ui summary{display:list-item}.crdz-ui blockquote,.crdz-ui dl,.crdz-ui dd,.crdz-ui h1,.crdz-ui h2,.crdz-ui h3,.crdz-ui h4,.crdz-ui h5,.crdz-ui h6,.crdz-ui hr,.crdz-ui figure,.crdz-ui p,.crdz-ui span,.crdz-ui label,.crdz-ui pre{margin:0;letter-spacing:normal!important}.crdz-ui label{text-transform:initial!important}.crdz-ui fieldset{margin:0;padding:0}.crdz-ui legend{padding:0}.crdz-ui ol,.crdz-ui ul,.crdz-ui menu{list-style:none;margin:0;padding:0}.crdz-ui dialog{padding:0}.crdz-ui textarea{resize:vertical}.crdz-ui input::-moz-placeholder,.crdz-ui textarea::-moz-placeholder{opacity:1;color:#9ca3af}.crdz-ui input::placeholder,.crdz-ui textarea::placeholder{opacity:1;color:#9ca3af}.crdz-ui button,.crdz-ui [role=button]{cursor:pointer}.crdz-ui :disabled{cursor:default}.crdz-ui img,.crdz-ui svg,.crdz-ui video,.crdz-ui canvas,.crdz-ui audio,.crdz-ui iframe,.crdz-ui embed,.crdz-ui object{display:block;vertical-align:middle;opacity:1}.crdz-ui [hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.crtw-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border-width:0!important}.crtw-pointer-events-none{pointer-events:none!important}.crtw-invisible{visibility:hidden!important}.crtw-fixed{position:fixed!important}.crtw-absolute{position:absolute!important}.crtw-relative{position:relative!important}.crtw-bottom-0{bottom:0!important}.crtw-left-0{left:0!important}.crtw-right-0{right:0!important}.crtw-top-0{top:0!important}.crtw-top-\\[8px\\]{top:8px!important}.crtw-z-10{z-index:10!important}.crtw-z-50{z-index:50!important}.crtw-z-\\[-1\\]{z-index:-1!important}.crtw-z-\\[1050\\]{z-index:1050!important}.crtw-float-right{float:right!important}.crtw-m-2{margin:.5rem!important}.crtw-m-3\\.5{margin:.875rem!important}.crtw-m-5{margin:1.25rem!important}.crtw-mx-1\\.5{margin-left:.375rem!important;margin-right:.375rem!important}.crtw-mx-\\[50px\\]{margin-left:50px!important;margin-right:50px!important}.crtw-mx-auto{margin-left:auto!important;margin-right:auto!important}.crtw-my-0{margin-top:0!important;margin-bottom:0!important}.crtw-my-0\\.5{margin-top:.125rem!important;margin-bottom:.125rem!important}.crtw-my-4{margin-top:1rem!important;margin-bottom:1rem!important}.crtw-my-5{margin-top:1.25rem!important;margin-bottom:1.25rem!important}.crtw-mb-1{margin-bottom:.25rem!important}.crtw-mb-1\\.5{margin-bottom:.375rem!important}.crtw-mb-2{margin-bottom:.5rem!important}.crtw-mb-2\\.5{margin-bottom:.625rem!important}.crtw-mb-3{margin-bottom:.75rem!important}.crtw-mb-3\\.5{margin-bottom:.875rem!important}.crtw-mb-4{margin-bottom:1rem!important}.crtw-mb-5{margin-bottom:1.25rem!important}.crtw-mb-6{margin-bottom:1.5rem!important}.crtw-mb-9{margin-bottom:2.25rem!important}.crtw-mb-\\[100px\\]{margin-bottom:100px!important}.crtw-mb-\\[30px\\]{margin-bottom:30px!important}.crtw-ml-1{margin-left:.25rem!important}.crtw-ml-1\\.5{margin-left:.375rem!important}.crtw-ml-2\\.5{margin-left:.625rem!important}.crtw-mr-0\\.5{margin-right:.125rem!important}.crtw-mr-1\\.5{margin-right:.375rem!important}.crtw-mr-14{margin-right:3.5rem!important}.crtw-mr-2{margin-right:.5rem!important}.crtw-mt-0\\.5{margin-top:.125rem!important}.crtw-mt-1{margin-top:.25rem!important}.crtw-mt-1\\.5{margin-top:.375rem!important}.crtw-mt-2\\.5{margin-top:.625rem!important}.crtw-mt-3\\.5{margin-top:.875rem!important}.crtw-mt-4{margin-top:1rem!important}.crtw-mt-6{margin-top:1.5rem!important}.crtw-mt-9{margin-top:2.25rem!important}.crtw-mt-\\[-10px\\]{margin-top:-10px!important}.crtw-mt-\\[30px\\]{margin-top:30px!important}.crtw-mt-\\[36px\\]{margin-top:36px!important}.crtw-mt-\\[5px\\]{margin-top:5px!important}.crtw-box-border{box-sizing:border-box!important}.crtw-block{display:block!important}.crtw-flex{display:flex!important}.crtw-inline-flex{display:inline-flex!important}.crtw-hidden{display:none!important}.crtw-h-1\\.5{height:.375rem!important}.crtw-h-11{height:2.75rem!important}.crtw-h-3{height:.75rem!important}.crtw-h-4{height:1rem!important}.crtw-h-64{height:16rem!important}.crtw-h-7{height:1.75rem!important}.crtw-h-8{height:2rem!important}.crtw-h-9{height:2.25rem!important}.crtw-h-\\[30px\\]{height:30px!important}.crtw-h-\\[50px\\]{height:50px!important}.crtw-h-\\[53px\\]{height:53px!important}.crtw-h-full{height:100%!important}.crtw-max-h-full{max-height:100%!important}.crtw-min-h-\\[155px\\]{min-height:155px!important}.crtw-min-h-screen{min-height:100vh!important}.crtw-w-1\\.5{width:.375rem!important}.crtw-w-1\\/2{width:50%!important}.crtw-w-11{width:2.75rem!important}.crtw-w-16{width:4rem!important}.crtw-w-4{width:1rem!important}.crtw-w-40{width:10rem!important}.crtw-w-56{width:14rem!important}.crtw-w-64{width:16rem!important}.crtw-w-8{width:2rem!important}.crtw-w-\\[110px\\]{width:110px!important}.crtw-w-\\[200px\\]{width:200px!important}.crtw-w-\\[70px\\]{width:70px!important}.crtw-w-\\[90px\\]{width:90px!important}.crtw-w-full{width:100%!important}.crtw-min-w-16{min-width:4rem!important}.crtw-max-w-\\[30px\\]{max-width:30px!important}.crtw-max-w-\\[380px\\]{max-width:380px!important}.crtw-max-w-xs{max-width:20rem!important}.crtw-flex-1{flex:1 1 0%!important}@keyframes crtw-spin{to{transform:rotate(360deg)}}.crtw-animate-spin{animation:crtw-spin 1s linear infinite!important}.crtw-cursor-pointer{cursor:pointer!important}.crtw-appearance-none{-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important}.crtw-flex-row{flex-direction:row!important}.crtw-flex-col{flex-direction:column!important}.crtw-items-start{align-items:flex-start!important}.crtw-items-center{align-items:center!important}.crtw-justify-start{justify-content:flex-start!important}.crtw-justify-center{justify-content:center!important}.crtw-justify-between{justify-content:space-between!important}.crtw-justify-items-center{justify-items:center!important}.crtw-gap-10{gap:2.5rem!important}.crtw-gap-14{gap:3.5rem!important}.crtw-gap-2\\.5{gap:.625rem!important}.crtw-gap-3{gap:.75rem!important}.crtw-gap-4{gap:1rem!important}.crtw-gap-6{gap:1.5rem!important}.crtw-gap-9{gap:2.25rem!important}.crtw-gap-\\[22px\\]{gap:22px!important}.crtw-gap-\\[6px\\]{gap:6px!important}.crtw-overflow-hidden{overflow:hidden!important}.crtw-overflow-y-scroll{overflow-y:scroll!important}.crtw-whitespace-normal{white-space:normal!important}.crtw-break-words{overflow-wrap:break-word!important}.crtw-break-all{word-break:break-all!important}.crtw-rounded{border-radius:.25rem!important}.crtw-rounded-\\[10px\\]{border-radius:10px!important}.crtw-rounded-\\[3px\\]{border-radius:3px!important}.crtw-rounded-full{border-radius:9999px!important}.crtw-rounded-lg{border-radius:.5rem!important}.crtw-rounded-md{border-radius:.375rem!important}.crtw-rounded-sm{border-radius:.125rem!important}.crtw-rounded-xl{border-radius:.75rem!important}.crtw-border{border-width:1px!important}.crtw-border-0{border-width:0px!important}.crtw-border-2{border-width:2px!important}.crtw-border-t-2{border-top-width:2px!important}.crtw-border-\\[\\#990008\\]{--tw-border-opacity: 1 !important;border-color:rgb(153 0 8 / var(--tw-border-opacity, 1))!important}.crtw-border-\\[\\#d9d9d9\\]{--tw-border-opacity: 1 !important;border-color:rgb(217 217 217 / var(--tw-border-opacity, 1))!important}.crtw-border-black{--tw-border-opacity: 1 !important;border-color:rgb(0 0 0 / var(--tw-border-opacity, 1))!important}.crtw-border-blue-800{--tw-border-opacity: 1 !important;border-color:rgb(30 64 175 / var(--tw-border-opacity, 1))!important}.crtw-border-gray-200{--tw-border-opacity: 1 !important;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))!important}.crtw-border-gray-300{--tw-border-opacity: 1 !important;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))!important}.crtw-border-gray-700{--tw-border-opacity: 1 !important;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))!important}.crtw-bg-black{--tw-bg-opacity: 1 !important;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))!important}.crtw-bg-black\\/70{background-color:#000000b3!important}.crtw-bg-gray-200{--tw-bg-opacity: 1 !important;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))!important}.crtw-bg-gray-300{--tw-bg-opacity: 1 !important;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))!important}.crtw-bg-green-500{--tw-bg-opacity: 1 !important;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))!important}.crtw-bg-red-500{--tw-bg-opacity: 1 !important;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))!important}.crtw-bg-white{--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))!important}.crtw-fill-black{fill:#000!important}.crtw-fill-red-500{fill:#ef4444!important}.crtw-p-0{padding:0!important}.crtw-p-2\\.5{padding:.625rem!important}.crtw-p-px{padding:1px!important}.crtw-px-0{padding-left:0!important;padding-right:0!important}.crtw-px-0\\.5{padding-left:.125rem!important;padding-right:.125rem!important}.crtw-px-2{padding-left:.5rem!important;padding-right:.5rem!important}.crtw-px-2\\.5{padding-left:.625rem!important;padding-right:.625rem!important}.crtw-px-4{padding-left:1rem!important;padding-right:1rem!important}.crtw-px-5{padding-left:1.25rem!important;padding-right:1.25rem!important}.crtw-px-\\[22px\\]{padding-left:22px!important;padding-right:22px!important}.crtw-px-\\[36px\\]{padding-left:36px!important;padding-right:36px!important}.crtw-py-0{padding-top:0!important;padding-bottom:0!important}.crtw-py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.crtw-py-2\\.5{padding-top:.625rem!important;padding-bottom:.625rem!important}.crtw-py-4{padding-top:1rem!important;padding-bottom:1rem!important}.crtw-pb-2{padding-bottom:.5rem!important}.crtw-pb-9{padding-bottom:2.25rem!important}.crtw-pl-5{padding-left:1.25rem!important}.crtw-pr-1\\.5{padding-right:.375rem!important}.crtw-pr-5{padding-right:1.25rem!important}.crtw-pt-11{padding-top:2.75rem!important}.crtw-pt-4{padding-top:1rem!important}.crtw-pt-5{padding-top:1.25rem!important}.crtw-pt-\\[3px\\]{padding-top:3px!important}.crtw-text-left{text-align:left!important}.crtw-text-center{text-align:center!important}.crtw-text-right{text-align:right!important}.crtw-text-justify{text-align:justify!important}.crtw-font-\\[\\'Poppins\\'\\]{font-family:Poppins!important}.crtw-font-\\[\\'poppins\\'\\],.crtw-font-\\[poppins\\]{font-family:poppins!important}.crtw-text-2xl{font-size:1.5rem!important;line-height:2rem!important}.crtw-text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.crtw-text-\\[10px\\]{font-size:10px!important}.crtw-text-\\[13px\\]{font-size:13px!important}.crtw-text-\\[21px\\]{font-size:21px!important}.crtw-text-\\[24px\\]{font-size:24px!important}.crtw-text-\\[9px\\]{font-size:9px!important}.crtw-text-base{font-size:1rem!important;line-height:1.5rem!important}.crtw-text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.crtw-text-sm{font-size:.875rem!important;line-height:1.25rem!important}.crtw-text-xl{font-size:1.25rem!important;line-height:1.75rem!important}.crtw-text-xs{font-size:.75rem!important;line-height:1rem!important}.crtw-font-bold{font-weight:700!important}.crtw-font-medium{font-weight:500!important}.crtw-font-semibold{font-weight:600!important}.crtw-uppercase{text-transform:uppercase!important}.crtw-text-\\[\\#121e2b\\]{--tw-text-opacity: 1 !important;color:rgb(18 30 43 / var(--tw-text-opacity, 1))!important}.crtw-text-\\[\\#313a2c\\]{--tw-text-opacity: 1 !important;color:rgb(49 58 44 / var(--tw-text-opacity, 1))!important}.crtw-text-\\[\\#747474\\]{--tw-text-opacity: 1 !important;color:rgb(116 116 116 / var(--tw-text-opacity, 1))!important}.crtw-text-\\[\\#990008\\]{--tw-text-opacity: 1 !important;color:rgb(153 0 8 / var(--tw-text-opacity, 1))!important}.crtw-text-black{--tw-text-opacity: 1 !important;color:rgb(0 0 0 / var(--tw-text-opacity, 1))!important}.crtw-text-blue-600{--tw-text-opacity: 1 !important;color:rgb(37 99 235 / var(--tw-text-opacity, 1))!important}.crtw-text-gray-400{--tw-text-opacity: 1 !important;color:rgb(156 163 175 / var(--tw-text-opacity, 1))!important}.crtw-text-gray-500{--tw-text-opacity: 1 !important;color:rgb(107 114 128 / var(--tw-text-opacity, 1))!important}.crtw-text-gray-600{--tw-text-opacity: 1 !important;color:rgb(75 85 99 / var(--tw-text-opacity, 1))!important}.crtw-text-gray-700{--tw-text-opacity: 1 !important;color:rgb(55 65 81 / var(--tw-text-opacity, 1))!important}.crtw-text-gray-800{--tw-text-opacity: 1 !important;color:rgb(31 41 55 / var(--tw-text-opacity, 1))!important}.crtw-text-hightlightColor{--tw-text-opacity: 1 !important;color:rgb(11 114 224 / var(--tw-text-opacity, 1))!important}.crtw-text-red-500{--tw-text-opacity: 1 !important;color:rgb(239 68 68 / var(--tw-text-opacity, 1))!important}.crtw-text-red-600{--tw-text-opacity: 1 !important;color:rgb(220 38 38 / var(--tw-text-opacity, 1))!important}.crtw-text-textMain{--tw-text-opacity: 1 !important;color:rgb(31 31 31 / var(--tw-text-opacity, 1))!important}.crtw-text-warningTextColor{--tw-text-opacity: 1 !important;color:rgb(153 0 8 / var(--tw-text-opacity, 1))!important}.crtw-text-white{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity, 1))!important}.crtw-underline{text-decoration-line:underline!important}.crtw-no-underline{text-decoration-line:none!important}.crtw-placeholder-\\[\\#d9d9d9\\]::-moz-placeholder{--tw-placeholder-opacity: 1 !important;color:rgb(217 217 217 / var(--tw-placeholder-opacity, 1))!important}.crtw-placeholder-\\[\\#d9d9d9\\]::placeholder{--tw-placeholder-opacity: 1 !important;color:rgb(217 217 217 / var(--tw-placeholder-opacity, 1))!important}.crtw-shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.crtw-outline-none{outline:2px solid transparent!important;outline-offset:2px!important}.crtw-backdrop-blur-lg{--tw-backdrop-blur: blur(16px) !important;-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)!important;backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)!important}.crtw-backdrop-blur-md{--tw-backdrop-blur: blur(12px) !important;-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)!important;backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)!important}.first\\:crtw-rounded-l:first-child{border-top-left-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.last\\:crtw-rounded-r:last-child{border-top-right-radius:.25rem!important;border-bottom-right-radius:.25rem!important}.hover\\:crtw-bg-gray-100:hover{--tw-bg-opacity: 1 !important;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))!important}.hover\\:crtw-bg-gray-800:hover{--tw-bg-opacity: 1 !important;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))!important}.hover\\:crtw-text-blue-800:hover{--tw-text-opacity: 1 !important;color:rgb(30 64 175 / var(--tw-text-opacity, 1))!important}.focus\\:crtw-border-\\[\\#121e2b\\]:focus{--tw-border-opacity: 1 !important;border-color:rgb(18 30 43 / var(--tw-border-opacity, 1))!important}.focus\\:crtw-border-\\[\\#990008\\]:focus{--tw-border-opacity: 1 !important;border-color:rgb(153 0 8 / var(--tw-border-opacity, 1))!important}.focus\\:crtw-border-blue-800:focus{--tw-border-opacity: 1 !important;border-color:rgb(30 64 175 / var(--tw-border-opacity, 1))!important}.focus\\:crtw-border-blue-900:focus{--tw-border-opacity: 1 !important;border-color:rgb(30 58 138 / var(--tw-border-opacity, 1))!important}.focus\\:crtw-text-blue-900:focus{--tw-text-opacity: 1 !important;color:rgb(30 58 138 / var(--tw-text-opacity, 1))!important}.focus\\:crtw-outline-none:focus{outline:2px solid transparent!important;outline-offset:2px!important}.focus\\:crtw-outline-0:focus{outline-width:0px!important}.disabled\\:crtw-bg-\\[\\#d9d9d9\\]:disabled{--tw-bg-opacity: 1 !important;background-color:rgb(217 217 217 / var(--tw-bg-opacity, 1))!important}.crtw-group:hover .group-hover\\:crtw-visible{visibility:visible!important}@media (min-width: 640px){.sm\\:crtw-m-4{margin:1rem!important}.sm\\:crtw-mb-px{margin-bottom:1px!important}.sm\\:crtw-max-w-\\[360px\\]{max-width:360px!important}.sm\\:crtw-max-w-md{max-width:28rem!important}.sm\\:crtw-px-1\\.5{padding-left:.375rem!important;padding-right:.375rem!important}.sm\\:crtw-pt-2{padding-top:.5rem!important}.sm\\:crtw-pt-\\[50px\\]{padding-top:50px!important}.sm\\:crtw-text-2xl{font-size:1.5rem!important;line-height:2rem!important}.sm\\:crtw-text-\\[11px\\]{font-size:11px!important}.sm\\:crtw-text-base{font-size:1rem!important;line-height:1.5rem!important}.sm\\:crtw-text-sm{font-size:.875rem!important;line-height:1.25rem!important}}@media (min-width: 768px){.md\\:crtw-text-2xl{font-size:1.5rem!important;line-height:2rem!important}}@media (min-height: 650px){.sm-tall\\:crtw-max-h-\\[650px\\]{max-height:650px!important}}`)),document.head.appendChild(t)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
2
|
-
(function(Ph,F1){typeof exports=="object"&&typeof module<"u"?F1(exports):typeof define=="function"&&define.amd?define(["exports"],F1):(Ph=typeof globalThis<"u"?globalThis:Ph||self,F1(Ph.CredenzaPassport={}))})(this,function(Ph){"use strict";const nD={version:"0.3.9"},$A=!1;var V1=Array.isArray,sD=Array.prototype.indexOf,Jw=Array.from,Tp=Object.defineProperty,Nh=Object.getOwnPropertyDescriptor,HA=Object.getOwnPropertyDescriptors,iD=Object.prototype,oD=Array.prototype,Qw=Object.getPrototypeOf,ZA=Object.isExtensible;const lc=()=>{};function JA(t){return typeof t?.then=="function"}function aD(t){return t()}function Cp(t){for(var e=0;e<t.length;e++)t[e]()}function cD(){var t,e,r=new Promise((n,s)=>{t=n,e=s});return{promise:r,resolve:t,reject:e}}const ws=2,Yw=4,D1=8,xh=16,ea=32,Il=64,QA=128,Ds=256,W1=512,bn=1024,Ws=2048,ta=4096,wi=8192,Ol=16384,Kw=32768,j1=65536,YA=1<<17,lD=1<<18,Sp=1<<19,KA=1<<20,qw=1<<21,Xw=1<<22,Bl=1<<23,uc=Symbol("$state"),qA=Symbol("legacy props"),uD=Symbol(""),e3=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},t3=3,Ih=8;function XA(t){return t===this.v}function e9(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function t9(t){return!e9(t,this.v)}function hD(){throw new Error("https://svelte.dev/e/await_outside_boundary")}function r9(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function dD(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function fD(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function pD(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function gD(t){throw new Error("https://svelte.dev/e/effect_orphan")}function mD(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function yD(){throw new Error("https://svelte.dev/e/hydration_failed")}function vD(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function bD(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function wD(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function kD(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let Oh=!1,ED=!1;function AD(){Oh=!0}const G1=1,z1=2,n9=4,_D=8,TD=16,CD=1,SD=2,s9=4,RD=8,PD=16,ND=1,xD=2,i9="[",$1="[!",r3="]",Ml={},Kr=Symbol(),ID="http://www.w3.org/1999/xhtml",OD="@attach";let Pr=null;function Bh(t){Pr=t}function ot(t,e=!1,r){Pr={p:Pr,c:null,e:null,s:t,x:null,l:Oh&&!e?{s:null,u:null,$:[]}:null}}function at(t){var e=Pr,r=e.e;if(r!==null){e.e=null;for(var n of r)L9(n)}return t!==void 0&&(e.x=t),Pr=e.p,t??{}}function Ul(){return!Oh||Pr!==null&&Pr.l===null}function Rp(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function BD(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}let St=!1;function ks(t){St=t}let tr;function us(t){if(t===null)throw Rp(),Ml;return tr=t}function ra(){return us(co(tr))}function xe(t){if(St){if(co(tr)!==null)throw Rp(),Ml;tr=t}}function Jn(t=1){if(St){for(var e=t,r=tr;e--;)r=co(r);tr=r}}function H1(){for(var t=0,e=tr;;){if(e.nodeType===Ih){var r=e.data;if(r===r3){if(t===0)return e;t-=1}else(r===i9||r===$1)&&(t+=1)}var n=co(e);e.remove(),e=n}}function o9(t){if(!t||t.nodeType!==Ih)throw Rp(),Ml;return t.data}function Mh(t){if(typeof t!="object"||t===null||uc in t)return t;const e=Qw(t);if(e!==iD&&e!==oD)return t;var r=new Map,n=V1(t),s=fc(0),i=Dl,o=a=>{if(Dl===i)return a();var c=Xt,l=Dl;js(null),x9(i);var u=a();return js(c),x9(l),u};return n&&r.set("length",fc(t.length)),new Proxy(t,{defineProperty(a,c,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&bD();var u=r.get(c);return u===void 0?u=o(()=>{var d=fc(l.value);return r.set(c,d),d}):Re(u,l.value,!0),!0},deleteProperty(a,c){var l=r.get(c);if(l===void 0){if(c in a){const u=o(()=>fc(Kr));r.set(c,u),c3(s)}}else Re(l,Kr),c3(s);return!0},get(a,c,l){if(c===uc)return t;var u=r.get(c),d=c in a;if(u===void 0&&(!d||Nh(a,c)?.writable)&&(u=o(()=>{var p=Mh(d?a[c]:Kr),g=fc(p);return g}),r.set(c,u)),u!==void 0){var h=$(u);return h===Kr?void 0:h}return Reflect.get(a,c,l)},getOwnPropertyDescriptor(a,c){var l=Reflect.getOwnPropertyDescriptor(a,c);if(l&&"value"in l){var u=r.get(c);u&&(l.value=$(u))}else if(l===void 0){var d=r.get(c),h=d?.v;if(d!==void 0&&h!==Kr)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return l},has(a,c){if(c===uc)return!0;var l=r.get(c),u=l!==void 0&&l.v!==Kr||Reflect.has(a,c);if(l!==void 0||xt!==null&&(!u||Nh(a,c)?.writable)){l===void 0&&(l=o(()=>{var h=u?Mh(a[c]):Kr,p=fc(h);return p}),r.set(c,l));var d=$(l);if(d===Kr)return!1}return u},set(a,c,l,u){var d=r.get(c),h=c in a;if(n&&c==="length")for(var p=l;p<d.v;p+=1){var g=r.get(p+"");g!==void 0?Re(g,Kr):p in a&&(g=o(()=>fc(Kr)),r.set(p+"",g))}if(d===void 0)(!h||Nh(a,c)?.writable)&&(d=o(()=>fc(void 0)),Re(d,Mh(l)),r.set(c,d));else{h=d.v!==Kr;var m=o(()=>Mh(l));Re(d,m)}var y=Reflect.getOwnPropertyDescriptor(a,c);if(y?.set&&y.set.call(u,l),!h){if(n&&typeof c=="string"){var v=r.get("length"),A=Number(c);Number.isInteger(A)&&A>=v.v&&Re(v,A+1)}c3(s)}return!0},ownKeys(a){$(s);var c=Reflect.ownKeys(a).filter(d=>{var h=r.get(d);return h===void 0||h.v!==Kr});for(var[l,u]of r)u.v!==Kr&&!(l in a)&&c.push(l);return c},setPrototypeOf(){wD()}})}function a9(t){try{if(t!==null&&typeof t=="object"&&uc in t)return t[uc]}catch{}return t}function MD(t,e){return Object.is(a9(t),a9(e))}var c9,l9,u9,h9;function n3(){if(c9===void 0){c9=window,l9=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;u9=Nh(e,"firstChild").get,h9=Nh(e,"nextSibling").get,ZA(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),ZA(r)&&(r.__t=void 0)}}function ki(t=""){return document.createTextNode(t)}function Ei(t){return u9.call(t)}function co(t){return h9.call(t)}function Ie(t,e){if(!St)return Ei(t);var r=Ei(tr);if(r===null)r=tr.appendChild(ki());else if(e&&r.nodeType!==t3){var n=ki();return r?.before(n),us(n),n}return us(r),r}function He(t,e){if(!St){var r=Ei(t);return r instanceof Comment&&r.data===""?co(r):r}return tr}function Me(t,e=1,r=!1){let n=St?tr:t;for(var s;e--;)s=n,n=co(n);if(!St)return n;if(r&&n?.nodeType!==t3){var i=ki();return n===null?s?.after(i):n.before(i),us(i),i}return us(n),n}function d9(t){t.textContent=""}function s3(){return!1}const UD=new WeakMap;function LD(t){var e=xt;if(e===null)return Xt.f|=Bl,t;if((e.f&Kw)===0){if((e.f&QA)===0)throw!e.parent&&t instanceof Error&&f9(t),t;e.b.error(t)}else i3(t,e)}function i3(t,e){for(;e!==null;){if((e.f&QA)!==0)try{e.b.error(t);return}catch(r){t=r}e=e.parent}throw t instanceof Error&&f9(t),t}function f9(t){const e=UD.get(t);e&&(Tp(t,"message",{value:e.message}),Tp(t,"stack",{value:e.stack}))}const FD=typeof requestIdleCallback>"u"?t=>setTimeout(t,1):requestIdleCallback;let Pp=[],Np=[];function p9(){var t=Pp;Pp=[],Cp(t)}function g9(){var t=Np;Np=[],Cp(t)}function Z1(t){Pp.length===0&&queueMicrotask(p9),Pp.push(t)}function VD(t){Np.length===0&&FD(g9),Np.push(t)}function DD(){Pp.length>0&&p9(),Np.length>0&&g9()}function WD(){for(var t=xt.b;t!==null&&!t.has_pending_snippet();)t=t.parent;return t===null&&hD(),t}function J1(t){var e=ws|Ws,r=Xt!==null&&(Xt.f&ws)!==0?Xt:null;return xt===null||r!==null&&(r.f&Ds)!==0?e|=Ds:xt.f|=Sp,{ctx:Pr,deps:null,effects:null,equals:XA,f:e,fn:t,reactions:null,rv:0,v:Kr,wv:0,parent:r??xt,ac:null}}function jD(t,e){let r=xt;r===null&&dD();var n=r.b,s=void 0,i=dc(Kr),o=null,a=!Xt;return rW(()=>{try{var c=t()}catch(p){c=Promise.reject(p)}var l=()=>c;s=o?.then(l,l)??Promise.resolve(c),o=s;var u=wr,d=n.pending;a&&(n.update_pending_count(1),d||u.increment());const h=(p,g=void 0)=>{o=null,d||u.activate(),g?g!==e3&&(i.f|=Bl,pc(i,g)):((i.f&Bl)!==0&&(i.f^=Bl),pc(i,p)),a&&(n.update_pending_count(-1),d||u.decrement()),b9()};if(s.then(h,p=>h(null,p||"unknown")),u)return()=>{queueMicrotask(()=>u.neuter())}}),new Promise(c=>{function l(u){function d(){u===s?c(i):l(s)}u.then(d,d)}l(s)})}function bt(t){const e=J1(t);return e.equals=t9,e}function m9(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)$s(e[r])}}function GD(t){for(var e=t.parent;e!==null;){if((e.f&ws)===0)return e;e=e.parent}return null}function o3(t){var e,r=xt;Gs(GD(t));try{m9(t),e=B9(t)}finally{Gs(r)}return e}function y9(t){var e=o3(t);if(t.equals(e)||(t.v=e,t.wv=I9()),!Vl)if(Uh!==null)Uh.set(t,t.v);else{var r=(gc||(t.f&Ds)!==0)&&t.deps!==null?ta:bn;Yn(t,r)}}function v9(t,e,r){const n=Ul()?J1:bt;if(e.length===0){r(t.map(n));return}var s=wr,i=xt,o=zD(),a=WD();Promise.all(e.map(c=>jD(c))).then(c=>{s?.activate(),o();try{r([...t.map(n),...c])}catch(l){(i.f&Ol)===0&&i3(l,i)}s?.deactivate(),b9()}).catch(c=>{a.error(c)})}function zD(){var t=xt,e=Xt,r=Pr;return function(){Gs(t),js(e),Bh(r)}}function b9(){Gs(null),js(null),Bh(null)}const xp=new Set;let wr=null,Q1=null,Uh=null,w9=new Set,Y1=[];function k9(){const t=Y1.shift();Y1.length>0&&queueMicrotask(k9),t()}let Ll=[],K1=null,a3=!1,q1=!1;class Lh{current=new Map;#t=new Map;#e=new Set;#r=0;#l=null;#u=!1;#s=[];#o=[];#i=[];#n=[];#a=[];#h=[];#d=[];skipped_effects=new Set;process(e){Ll=[],Q1=null;var r=null;if(xp.size>1){r=new Map,Uh=new Map;for(const[i,o]of this.current)r.set(i,{v:i.v,wv:i.wv}),i.v=o;for(const i of xp)if(i!==this)for(const[o,a]of i.#t)r.has(o)||(r.set(o,{v:o.v,wv:o.wv}),o.v=a)}for(const i of e)this.#p(i);if(this.#s.length===0&&this.#r===0){this.#f();var n=this.#i,s=this.#n;this.#i=[],this.#n=[],this.#a=[],Q1=wr,wr=null,A9(n),A9(s),wr===null?wr=this:xp.delete(this),this.#l?.resolve()}else this.#c(this.#i),this.#c(this.#n),this.#c(this.#a);if(r){for(const[i,{v:o,wv:a}]of r)i.wv<=a&&(i.v=o);Uh=null}for(const i of this.#s)Wl(i);for(const i of this.#o)Wl(i);this.#s=[],this.#o=[]}#p(e){e.f^=bn;for(var r=e.first;r!==null;){var n=r.f,s=(n&(ea|Il))!==0,i=s&&(n&bn)!==0,o=i||(n&wi)!==0||this.skipped_effects.has(r);if(!o&&r.fn!==null){if(s)r.f^=bn;else if((n&Yw)!==0)this.#n.push(r);else if((n&bn)===0)if((n&Xw)!==0){var a=r.b?.pending?this.#o:this.#s;a.push(r)}else Op(r)&&((r.f&xh)!==0&&this.#a.push(r),Wl(r));var c=r.first;if(c!==null){r=c;continue}}var l=r.parent;for(r=r.next;r===null&&l!==null;)r=l.next,l=l.parent}}#c(e){for(const r of e)((r.f&Ws)!==0?this.#h:this.#d).push(r),Yn(r,bn);e.length=0}capture(e,r){this.#t.has(e)||this.#t.set(e,r),this.current.set(e,e.v)}activate(){wr=this}deactivate(){wr=null,Q1=null;for(const e of w9)if(w9.delete(e),e(),wr!==null)break}neuter(){this.#u=!0}flush(){Ll.length>0?E9():this.#f(),wr===this&&(this.#r===0&&xp.delete(this),this.deactivate())}#f(){if(!this.#u)for(const e of this.#e)e();this.#e.clear()}increment(){this.#r+=1}decrement(){if(this.#r-=1,this.#r===0){for(const e of this.#h)Yn(e,Ws),Fh(e);for(const e of this.#d)Yn(e,ta),Fh(e);this.#i=[],this.#n=[],this.flush()}else this.deactivate()}add_callback(e){this.#e.add(e)}settled(){return(this.#l??=cD()).promise}static ensure(){if(wr===null){const e=wr=new Lh;xp.add(wr),q1||Lh.enqueue(()=>{wr===e&&e.flush()})}return wr}static enqueue(e){Y1.length===0&&queueMicrotask(k9),Y1.unshift(e)}}function je(t){var e=q1;q1=!0;try{for(var r;;){if(DD(),Ll.length===0&&(wr?.flush(),Ll.length===0))return K1=null,r;E9()}}finally{q1=e}}function E9(){var t=Vh;a3=!0;try{var e=0;for(R9(!0);Ll.length>0;){var r=Lh.ensure();if(e++>1e3){var n,s;$D()}r.process(Ll),hc.clear()}}finally{a3=!1,R9(t),K1=null}}function $D(){try{mD()}catch(t){i3(t,K1)}}let Fl=null;function A9(t){var e=t.length;if(e!==0){for(var r=0;r<e;){var n=t[r++];if((n.f&(Ol|wi))===0&&Op(n)&&(Fl=[],Wl(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null&&n.ac===null?W9(n):n.fn=null),Fl.length>0)){hc.clear();for(const s of Fl)Wl(s);Fl=[]}}Fl=null}}function Fh(t){for(var e=K1=t;e.parent!==null;){e=e.parent;var r=e.f;if(a3&&e===xt&&(r&xh)!==0)return;if((r&(Il|ea))!==0){if((r&bn)===0)return;e.f^=bn}}Ll.push(e)}const hc=new Map;function dc(t,e){var r={f:0,v:t,reactions:null,equals:XA,rv:0,wv:0};return r}function fc(t,e){const r=dc(t);return QD(r),r}function De(t,e=!1,r=!0){const n=dc(t);return e||(n.equals=t9),Oh&&r&&Pr!==null&&Pr.l!==null&&(Pr.l.s??=[]).push(n),n}function HD(t,e){return Re(t,Le(()=>$(t))),e}function Re(t,e,r=!1){Xt!==null&&(!lo||(Xt.f&YA)!==0)&&Ul()&&(Xt.f&(ws|xh|Xw|YA))!==0&&!na?.includes(t)&&kD();let n=r?Mh(e):e;return pc(t,n)}function pc(t,e){if(!t.equals(e)){var r=t.v;Vl?hc.set(t,e):hc.set(t,r),t.v=e;var n=Lh.ensure();n.capture(t,r),(t.f&ws)!==0&&((t.f&Ws)!==0&&o3(t),Yn(t,(t.f&Ds)===0?bn:ta)),t.wv=I9(),T9(t,Ws),Ul()&&xt!==null&&(xt.f&bn)!==0&&(xt.f&(ea|Il))===0&&(zs===null?YD([t]):zs.push(t))}return e}function _9(t,e=1){var r=$(t),n=e===1?r++:r--;return Re(t,r),n}function c3(t){Re(t,t.v+1)}function T9(t,e){var r=t.reactions;if(r!==null)for(var n=Ul(),s=r.length,i=0;i<s;i++){var o=r[i],a=o.f;if(!(!n&&o===xt)){var c=(a&Ws)===0;c&&Yn(o,e),(a&ws)!==0?T9(o,ta):c&&((a&xh)!==0&&Fl!==null&&Fl.push(o),Fh(o))}}}function ZD(t,e){if(e){const r=document.body;t.autofocus=!0,Z1(()=>{document.activeElement===r&&t.focus()})}}let C9=!1;function S9(){C9||(C9=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e.__on_r?.()})},{capture:!0}))}function X1(t){var e=Xt,r=xt;js(null),Gs(null);try{return t()}finally{js(e),Gs(r)}}function JD(t,e,r,n=r){t.addEventListener(e,()=>X1(r));const s=t.__on_r;s?t.__on_r=()=>{s(),n(!0)}:t.__on_r=()=>n(!0),S9()}let Vh=!1;function R9(t){Vh=t}let Vl=!1;function P9(t){Vl=t}let Xt=null,lo=!1;function js(t){Xt=t}let xt=null;function Gs(t){xt=t}let na=null;function QD(t){Xt!==null&&(na===null?na=[t]:na.push(t))}let Qn=null,Es=0,zs=null;function YD(t){zs=t}let N9=1,Ip=0,Dl=Ip;function x9(t){Dl=t}let gc=!1;function I9(){return++N9}function Op(t){var e=t.f;if((e&Ws)!==0)return!0;if((e&ta)!==0){var r=t.deps,n=(e&Ds)!==0;if(r!==null){var s,i,o=(e&W1)!==0,a=n&&xt!==null&&!gc,c=r.length;if((o||a)&&(xt===null||(xt.f&Ol)===0)){var l=t,u=l.parent;for(s=0;s<c;s++)i=r[s],(o||!i?.reactions?.includes(l))&&(i.reactions??=[]).push(l);o&&(l.f^=W1),a&&u!==null&&(u.f&Ds)===0&&(l.f^=Ds)}for(s=0;s<c;s++)if(i=r[s],Op(i)&&y9(i),i.wv>t.wv)return!0}(!n||xt!==null&&!gc)&&Yn(t,bn)}return!1}function O9(t,e,r=!0){var n=t.reactions;if(n!==null&&!na?.includes(t))for(var s=0;s<n.length;s++){var i=n[s];(i.f&ws)!==0?O9(i,e,!1):e===i&&(r?Yn(i,Ws):(i.f&bn)!==0&&Yn(i,ta),Fh(i))}}function B9(t){var e=Qn,r=Es,n=zs,s=Xt,i=gc,o=na,a=Pr,c=lo,l=Dl,u=t.f;Qn=null,Es=0,zs=null,gc=(u&Ds)!==0&&(lo||!Vh||Xt===null),Xt=(u&(ea|Il))===0?t:null,na=null,Bh(t.ctx),lo=!1,Dl=++Ip,t.ac!==null&&(X1(()=>{t.ac.abort(e3)}),t.ac=null);try{t.f|=qw;var d=t.fn,h=d(),p=t.deps;if(Qn!==null){var g;if(e2(t,Es),p!==null&&Es>0)for(p.length=Es+Qn.length,g=0;g<Qn.length;g++)p[Es+g]=Qn[g];else t.deps=p=Qn;if(!gc||(u&ws)!==0&&t.reactions!==null)for(g=Es;g<p.length;g++)(p[g].reactions??=[]).push(t)}else p!==null&&Es<p.length&&(e2(t,Es),p.length=Es);if(Ul()&&zs!==null&&!lo&&p!==null&&(t.f&(ws|ta|Ws))===0)for(g=0;g<zs.length;g++)O9(zs[g],t);return s!==null&&s!==t&&(Ip++,zs!==null&&(n===null?n=zs:n.push(...zs))),(t.f&Bl)!==0&&(t.f^=Bl),h}catch(m){return LD(m)}finally{t.f^=qw,Qn=e,Es=r,zs=n,Xt=s,gc=i,na=o,Bh(a),lo=c,Dl=l}}function KD(t,e){let r=e.reactions;if(r!==null){var n=sD.call(r,t);if(n!==-1){var s=r.length-1;s===0?r=e.reactions=null:(r[n]=r[s],r.pop())}}r===null&&(e.f&ws)!==0&&(Qn===null||!Qn.includes(e))&&(Yn(e,ta),(e.f&(Ds|W1))===0&&(e.f^=W1),m9(e),e2(e,0))}function e2(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)KD(t,r[n])}function Wl(t){var e=t.f;if((e&Ol)===0){Yn(t,bn);var r=xt,n=Vh;xt=t,Vh=!0;try{(e&xh)!==0?nW(t):V9(t),F9(t);var s=B9(t);t.teardown=typeof s=="function"?s:null,t.wv=N9;var i;$A&&ED&&(t.f&Ws)!==0&&t.deps}finally{Vh=n,xt=r}}}function $(t){var e=t.f,r=(e&ws)!==0;if(Xt!==null&&!lo){var n=xt!==null&&(xt.f&Ol)!==0;if(!n&&!na?.includes(t)){var s=Xt.deps;if((Xt.f&qw)!==0)t.rv<Ip&&(t.rv=Ip,Qn===null&&s!==null&&s[Es]===t?Es++:Qn===null?Qn=[t]:(!gc||!Qn.includes(t))&&Qn.push(t));else{(Xt.deps??=[]).push(t);var i=t.reactions;i===null?t.reactions=[Xt]:i.includes(Xt)||i.push(Xt)}}}else if(r&&t.deps===null&&t.effects===null){var o=t,a=o.parent;a!==null&&(a.f&Ds)===0&&(o.f^=Ds)}if(Vl){if(hc.has(t))return hc.get(t);if(r){o=t;var c=o.v;return((o.f&bn)===0&&o.reactions!==null||M9(o))&&(c=o3(o)),hc.set(o,c),c}}else if(r){if(o=t,Uh?.has(o))return Uh.get(o);Op(o)&&y9(o)}if((t.f&Bl)!==0)throw t.v;return t.v}function M9(t){if(t.v===Kr)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(hc.has(e)||(e.f&ws)!==0&&M9(e))return!0;return!1}function l3(t){return t&&$(t)}function Le(t){var e=lo;try{return lo=!0,t()}finally{lo=e}}const qD=-7169;function Yn(t,e){t.f=t.f&qD|e}function $e(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(uc in t)u3(t);else if(!Array.isArray(t))for(let e in t){const r=t[e];typeof r=="object"&&r&&uc in r&&u3(r)}}}function u3(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let n in t)try{u3(t[n],e)}catch{}const r=Qw(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=HA(r);for(let s in n){const i=n[s].get;if(i)try{i.call(t)}catch{}}}}}function U9(t){xt===null&&Xt===null&&gD(),Xt!==null&&(Xt.f&Ds)!==0&&xt===null&&pD(),Vl&&fD()}function XD(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function uo(t,e,r,n=!0){var s=xt;s!==null&&(s.f&wi)!==0&&(t|=wi);var i={ctx:Pr,deps:null,nodes_start:null,nodes_end:null,f:t|Ws,first:null,fn:e,last:null,next:null,parent:s,b:s&&s.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(r)try{Wl(i),i.f|=Kw}catch(c){throw $s(i),c}else e!==null&&Fh(i);if(n){var o=i;if(r&&o.deps===null&&o.teardown===null&&o.nodes_start===null&&o.first===o.last&&(o.f&Sp)===0&&(o=o.first),o!==null&&(o.parent=s,s!==null&&XD(o,s),Xt!==null&&(Xt.f&ws)!==0&&(t&Il)===0)){var a=Xt;(a.effects??=[]).push(o)}}return i}function h3(t){const e=uo(D1,null,!1);return Yn(e,bn),e.teardown=t,e}function d3(t){U9();var e=xt.f,r=!Xt&&(e&ea)!==0&&(e&Kw)===0;if(r){var n=Pr;(n.e??=[]).push(t)}else return L9(t)}function L9(t){return uo(Yw|KA,t,!1)}function eW(t){return U9(),uo(D1|KA,t,!0)}function tW(t){Lh.ensure();const e=uo(Il|Sp,t,!0);return(r={})=>new Promise(n=>{r.outro?jl(e,()=>{$s(e),n(void 0)}):($s(e),n(void 0))})}function f3(t){return uo(Yw,t,!1)}function gt(t,e){var r=Pr,n={effect:null,ran:!1,deps:t};r.l.$.push(n),n.effect=p3(()=>{t(),!n.ran&&(n.ran=!0,Le(e))})}function mr(){var t=Pr;p3(()=>{for(var e of t.l.$){e.deps();var r=e.effect;(r.f&bn)!==0&&Yn(r,ta),Op(r)&&Wl(r),e.ran=!1}})}function rW(t){return uo(Xw|Sp,t,!0)}function p3(t,e=0){return uo(D1|e,t,!0)}function Ye(t,e=[],r=[]){v9(e,r,n=>{uo(D1,()=>t(...n.map($)),!0)})}function Dh(t,e=0){var r=uo(xh|e,t,!0);return r}function ho(t,e=!0){return uo(ea|Sp,t,!0,e)}function F9(t){var e=t.teardown;if(e!==null){const r=Vl,n=Xt;P9(!0),js(null);try{e.call(null)}finally{P9(r),js(n)}}}function V9(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){const s=r.ac;s!==null&&X1(()=>{s.abort(e3)});var n=r.next;(r.f&Il)!==0?r.parent=null:$s(r,e),r=n}}function nW(t){for(var e=t.first;e!==null;){var r=e.next;(e.f&ea)===0&&$s(e),e=r}}function $s(t,e=!0){var r=!1;(e||(t.f&lD)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(D9(t.nodes_start,t.nodes_end),r=!0),V9(t,e&&!r),e2(t,0),Yn(t,Ol);var n=t.transitions;if(n!==null)for(const i of n)i.stop();F9(t);var s=t.parent;s!==null&&s.first!==null&&W9(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function D9(t,e){for(;t!==null;){var r=t===e?null:co(t);t.remove(),t=r}}function W9(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function jl(t,e){var r=[];g3(t,r,!0),j9(r,()=>{$s(t),e&&e()})}function j9(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var s of t)s.out(n)}else e()}function g3(t,e,r){if((t.f&wi)===0){if(t.f^=wi,t.transitions!==null)for(const o of t.transitions)(o.is_global||r)&&e.push(o);for(var n=t.first;n!==null;){var s=n.next,i=(n.f&j1)!==0||(n.f&ea)!==0;g3(n,e,i?r:!1),n=s}}}function t2(t){G9(t,!0)}function G9(t,e){if((t.f&wi)!==0){t.f^=wi,(t.f&bn)===0&&(Yn(t,Ws),Fh(t));for(var r=t.first;r!==null;){var n=r.next,s=(r.f&j1)!==0||(r.f&ea)!==0;G9(r,s?e:!1),r=n}if(t.transitions!==null)for(const i of t.transitions)(i.is_global||e)&&i.in()}}function sW(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const iW=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function oW(t){return iW.includes(t)}const aW={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function cW(t){return t=t.toLowerCase(),aW[t]??t}const lW=["touchstart","touchmove"];function uW(t){return lW.includes(t)}const z9=new Set,m3=new Set;function $9(t,e,r,n={}){function s(i){if(n.capture||Bp.call(e,i),!i.cancelBubble)return X1(()=>r?.call(this,i))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Z1(()=>{e.addEventListener(t,s,n)}):e.addEventListener(t,s,n),s}function un(t,e,r,n,s){var i={capture:n,passive:s},o=$9(t,e,r,i);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&h3(()=>{e.removeEventListener(t,o,i)})}function hW(t){for(var e=0;e<t.length;e++)z9.add(t[e]);for(var r of m3)r(t)}let H9=null;function Bp(t){var e=this,r=e.ownerDocument,n=t.type,s=t.composedPath?.()||[],i=s[0]||t.target;H9=t;var o=0,a=H9===t&&t.__root;if(a){var c=s.indexOf(a);if(c!==-1&&(e===document||e===window)){t.__root=e;return}var l=s.indexOf(e);if(l===-1)return;c<=l&&(o=c)}if(i=s[o]||t.target,i!==e){Tp(t,"currentTarget",{configurable:!0,get(){return i||r}});var u=Xt,d=xt;js(null),Gs(null);try{for(var h,p=[];i!==null;){var g=i.assignedSlot||i.parentNode||i.host||null;try{var m=i["__"+n];if(m!=null&&(!i.disabled||t.target===i))if(V1(m)){var[y,...v]=m;y.apply(i,[t,...v])}else m.call(i,t)}catch(A){h?p.push(A):h=A}if(t.cancelBubble||g===e||g===null)break;i=g}if(h){for(let A of p)queueMicrotask(()=>{throw A});throw h}}finally{t.__root=e,delete t.currentTarget,js(u),Gs(d)}}}function Z9(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function fo(t,e){var r=xt;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function Fe(t,e){var r=(e&ND)!==0,n=(e&xD)!==0,s,i=!t.startsWith("<!>");return()=>{if(St)return fo(tr,null),tr;s===void 0&&(s=Z9(i?t:"<!>"+t),r||(s=Ei(s)));var o=n||l9?document.importNode(s,!0):s.cloneNode(!0);if(r){var a=Ei(o),c=o.lastChild;fo(a,c)}else fo(o,o);return o}}function Mr(t=""){if(!St){var e=ki(t+"");return fo(e,e),e}var r=tr;return r.nodeType!==t3&&(r.before(r=ki()),us(r)),fo(r,r),r}function nt(){if(St)return fo(tr,null),tr;var t=document.createDocumentFragment(),e=document.createComment(""),r=ki();return t.append(e,r),fo(e,r),t}function Ee(t,e){if(St){xt.nodes_end=tr,ra();return}t!==null&&t.before(e)}function pt(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??=t.nodeValue)&&(t.__t=r,t.nodeValue=r+"")}function J9(t,e){return Q9(t,e)}function dW(t,e){n3(),e.intro=e.intro??!1;const r=e.target,n=St,s=tr;try{for(var i=Ei(r);i&&(i.nodeType!==Ih||i.data!==i9);)i=co(i);if(!i)throw Ml;ks(!0),us(i),ra();const o=Q9(t,{...e,anchor:i});if(tr===null||tr.nodeType!==Ih||tr.data!==r3)throw Rp(),Ml;return ks(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
|
|
2
|
+
(function(Ph,F1){typeof exports=="object"&&typeof module<"u"?F1(exports):typeof define=="function"&&define.amd?define(["exports"],F1):(Ph=typeof globalThis<"u"?globalThis:Ph||self,F1(Ph.CredenzaPassport={}))})(this,function(Ph){"use strict";const nD={version:"0.3.10"},$A=!1;var V1=Array.isArray,sD=Array.prototype.indexOf,Jw=Array.from,Tp=Object.defineProperty,Nh=Object.getOwnPropertyDescriptor,HA=Object.getOwnPropertyDescriptors,iD=Object.prototype,oD=Array.prototype,Qw=Object.getPrototypeOf,ZA=Object.isExtensible;const lc=()=>{};function JA(t){return typeof t?.then=="function"}function aD(t){return t()}function Cp(t){for(var e=0;e<t.length;e++)t[e]()}function cD(){var t,e,r=new Promise((n,s)=>{t=n,e=s});return{promise:r,resolve:t,reject:e}}const ws=2,Yw=4,D1=8,xh=16,ea=32,Il=64,QA=128,Ds=256,W1=512,bn=1024,Ws=2048,ta=4096,wi=8192,Ol=16384,Kw=32768,j1=65536,YA=1<<17,lD=1<<18,Sp=1<<19,KA=1<<20,qw=1<<21,Xw=1<<22,Bl=1<<23,uc=Symbol("$state"),qA=Symbol("legacy props"),uD=Symbol(""),e3=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},t3=3,Ih=8;function XA(t){return t===this.v}function e9(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function t9(t){return!e9(t,this.v)}function hD(){throw new Error("https://svelte.dev/e/await_outside_boundary")}function r9(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function dD(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function fD(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function pD(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function gD(t){throw new Error("https://svelte.dev/e/effect_orphan")}function mD(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function yD(){throw new Error("https://svelte.dev/e/hydration_failed")}function vD(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function bD(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function wD(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function kD(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let Oh=!1,ED=!1;function AD(){Oh=!0}const G1=1,z1=2,n9=4,_D=8,TD=16,CD=1,SD=2,s9=4,RD=8,PD=16,ND=1,xD=2,i9="[",$1="[!",r3="]",Ml={},Kr=Symbol(),ID="http://www.w3.org/1999/xhtml",OD="@attach";let Pr=null;function Bh(t){Pr=t}function ot(t,e=!1,r){Pr={p:Pr,c:null,e:null,s:t,x:null,l:Oh&&!e?{s:null,u:null,$:[]}:null}}function at(t){var e=Pr,r=e.e;if(r!==null){e.e=null;for(var n of r)L9(n)}return t!==void 0&&(e.x=t),Pr=e.p,t??{}}function Ul(){return!Oh||Pr!==null&&Pr.l===null}function Rp(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function BD(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}let St=!1;function ks(t){St=t}let tr;function us(t){if(t===null)throw Rp(),Ml;return tr=t}function ra(){return us(co(tr))}function xe(t){if(St){if(co(tr)!==null)throw Rp(),Ml;tr=t}}function Jn(t=1){if(St){for(var e=t,r=tr;e--;)r=co(r);tr=r}}function H1(){for(var t=0,e=tr;;){if(e.nodeType===Ih){var r=e.data;if(r===r3){if(t===0)return e;t-=1}else(r===i9||r===$1)&&(t+=1)}var n=co(e);e.remove(),e=n}}function o9(t){if(!t||t.nodeType!==Ih)throw Rp(),Ml;return t.data}function Mh(t){if(typeof t!="object"||t===null||uc in t)return t;const e=Qw(t);if(e!==iD&&e!==oD)return t;var r=new Map,n=V1(t),s=fc(0),i=Dl,o=a=>{if(Dl===i)return a();var c=Xt,l=Dl;js(null),x9(i);var u=a();return js(c),x9(l),u};return n&&r.set("length",fc(t.length)),new Proxy(t,{defineProperty(a,c,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&bD();var u=r.get(c);return u===void 0?u=o(()=>{var d=fc(l.value);return r.set(c,d),d}):Re(u,l.value,!0),!0},deleteProperty(a,c){var l=r.get(c);if(l===void 0){if(c in a){const u=o(()=>fc(Kr));r.set(c,u),c3(s)}}else Re(l,Kr),c3(s);return!0},get(a,c,l){if(c===uc)return t;var u=r.get(c),d=c in a;if(u===void 0&&(!d||Nh(a,c)?.writable)&&(u=o(()=>{var p=Mh(d?a[c]:Kr),g=fc(p);return g}),r.set(c,u)),u!==void 0){var h=$(u);return h===Kr?void 0:h}return Reflect.get(a,c,l)},getOwnPropertyDescriptor(a,c){var l=Reflect.getOwnPropertyDescriptor(a,c);if(l&&"value"in l){var u=r.get(c);u&&(l.value=$(u))}else if(l===void 0){var d=r.get(c),h=d?.v;if(d!==void 0&&h!==Kr)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return l},has(a,c){if(c===uc)return!0;var l=r.get(c),u=l!==void 0&&l.v!==Kr||Reflect.has(a,c);if(l!==void 0||xt!==null&&(!u||Nh(a,c)?.writable)){l===void 0&&(l=o(()=>{var h=u?Mh(a[c]):Kr,p=fc(h);return p}),r.set(c,l));var d=$(l);if(d===Kr)return!1}return u},set(a,c,l,u){var d=r.get(c),h=c in a;if(n&&c==="length")for(var p=l;p<d.v;p+=1){var g=r.get(p+"");g!==void 0?Re(g,Kr):p in a&&(g=o(()=>fc(Kr)),r.set(p+"",g))}if(d===void 0)(!h||Nh(a,c)?.writable)&&(d=o(()=>fc(void 0)),Re(d,Mh(l)),r.set(c,d));else{h=d.v!==Kr;var m=o(()=>Mh(l));Re(d,m)}var y=Reflect.getOwnPropertyDescriptor(a,c);if(y?.set&&y.set.call(u,l),!h){if(n&&typeof c=="string"){var v=r.get("length"),A=Number(c);Number.isInteger(A)&&A>=v.v&&Re(v,A+1)}c3(s)}return!0},ownKeys(a){$(s);var c=Reflect.ownKeys(a).filter(d=>{var h=r.get(d);return h===void 0||h.v!==Kr});for(var[l,u]of r)u.v!==Kr&&!(l in a)&&c.push(l);return c},setPrototypeOf(){wD()}})}function a9(t){try{if(t!==null&&typeof t=="object"&&uc in t)return t[uc]}catch{}return t}function MD(t,e){return Object.is(a9(t),a9(e))}var c9,l9,u9,h9;function n3(){if(c9===void 0){c9=window,l9=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;u9=Nh(e,"firstChild").get,h9=Nh(e,"nextSibling").get,ZA(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),ZA(r)&&(r.__t=void 0)}}function ki(t=""){return document.createTextNode(t)}function Ei(t){return u9.call(t)}function co(t){return h9.call(t)}function Ie(t,e){if(!St)return Ei(t);var r=Ei(tr);if(r===null)r=tr.appendChild(ki());else if(e&&r.nodeType!==t3){var n=ki();return r?.before(n),us(n),n}return us(r),r}function He(t,e){if(!St){var r=Ei(t);return r instanceof Comment&&r.data===""?co(r):r}return tr}function Me(t,e=1,r=!1){let n=St?tr:t;for(var s;e--;)s=n,n=co(n);if(!St)return n;if(r&&n?.nodeType!==t3){var i=ki();return n===null?s?.after(i):n.before(i),us(i),i}return us(n),n}function d9(t){t.textContent=""}function s3(){return!1}const UD=new WeakMap;function LD(t){var e=xt;if(e===null)return Xt.f|=Bl,t;if((e.f&Kw)===0){if((e.f&QA)===0)throw!e.parent&&t instanceof Error&&f9(t),t;e.b.error(t)}else i3(t,e)}function i3(t,e){for(;e!==null;){if((e.f&QA)!==0)try{e.b.error(t);return}catch(r){t=r}e=e.parent}throw t instanceof Error&&f9(t),t}function f9(t){const e=UD.get(t);e&&(Tp(t,"message",{value:e.message}),Tp(t,"stack",{value:e.stack}))}const FD=typeof requestIdleCallback>"u"?t=>setTimeout(t,1):requestIdleCallback;let Pp=[],Np=[];function p9(){var t=Pp;Pp=[],Cp(t)}function g9(){var t=Np;Np=[],Cp(t)}function Z1(t){Pp.length===0&&queueMicrotask(p9),Pp.push(t)}function VD(t){Np.length===0&&FD(g9),Np.push(t)}function DD(){Pp.length>0&&p9(),Np.length>0&&g9()}function WD(){for(var t=xt.b;t!==null&&!t.has_pending_snippet();)t=t.parent;return t===null&&hD(),t}function J1(t){var e=ws|Ws,r=Xt!==null&&(Xt.f&ws)!==0?Xt:null;return xt===null||r!==null&&(r.f&Ds)!==0?e|=Ds:xt.f|=Sp,{ctx:Pr,deps:null,effects:null,equals:XA,f:e,fn:t,reactions:null,rv:0,v:Kr,wv:0,parent:r??xt,ac:null}}function jD(t,e){let r=xt;r===null&&dD();var n=r.b,s=void 0,i=dc(Kr),o=null,a=!Xt;return rW(()=>{try{var c=t()}catch(p){c=Promise.reject(p)}var l=()=>c;s=o?.then(l,l)??Promise.resolve(c),o=s;var u=wr,d=n.pending;a&&(n.update_pending_count(1),d||u.increment());const h=(p,g=void 0)=>{o=null,d||u.activate(),g?g!==e3&&(i.f|=Bl,pc(i,g)):((i.f&Bl)!==0&&(i.f^=Bl),pc(i,p)),a&&(n.update_pending_count(-1),d||u.decrement()),b9()};if(s.then(h,p=>h(null,p||"unknown")),u)return()=>{queueMicrotask(()=>u.neuter())}}),new Promise(c=>{function l(u){function d(){u===s?c(i):l(s)}u.then(d,d)}l(s)})}function bt(t){const e=J1(t);return e.equals=t9,e}function m9(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)$s(e[r])}}function GD(t){for(var e=t.parent;e!==null;){if((e.f&ws)===0)return e;e=e.parent}return null}function o3(t){var e,r=xt;Gs(GD(t));try{m9(t),e=B9(t)}finally{Gs(r)}return e}function y9(t){var e=o3(t);if(t.equals(e)||(t.v=e,t.wv=I9()),!Vl)if(Uh!==null)Uh.set(t,t.v);else{var r=(gc||(t.f&Ds)!==0)&&t.deps!==null?ta:bn;Yn(t,r)}}function v9(t,e,r){const n=Ul()?J1:bt;if(e.length===0){r(t.map(n));return}var s=wr,i=xt,o=zD(),a=WD();Promise.all(e.map(c=>jD(c))).then(c=>{s?.activate(),o();try{r([...t.map(n),...c])}catch(l){(i.f&Ol)===0&&i3(l,i)}s?.deactivate(),b9()}).catch(c=>{a.error(c)})}function zD(){var t=xt,e=Xt,r=Pr;return function(){Gs(t),js(e),Bh(r)}}function b9(){Gs(null),js(null),Bh(null)}const xp=new Set;let wr=null,Q1=null,Uh=null,w9=new Set,Y1=[];function k9(){const t=Y1.shift();Y1.length>0&&queueMicrotask(k9),t()}let Ll=[],K1=null,a3=!1,q1=!1;class Lh{current=new Map;#t=new Map;#e=new Set;#r=0;#l=null;#u=!1;#s=[];#o=[];#i=[];#n=[];#a=[];#h=[];#d=[];skipped_effects=new Set;process(e){Ll=[],Q1=null;var r=null;if(xp.size>1){r=new Map,Uh=new Map;for(const[i,o]of this.current)r.set(i,{v:i.v,wv:i.wv}),i.v=o;for(const i of xp)if(i!==this)for(const[o,a]of i.#t)r.has(o)||(r.set(o,{v:o.v,wv:o.wv}),o.v=a)}for(const i of e)this.#p(i);if(this.#s.length===0&&this.#r===0){this.#f();var n=this.#i,s=this.#n;this.#i=[],this.#n=[],this.#a=[],Q1=wr,wr=null,A9(n),A9(s),wr===null?wr=this:xp.delete(this),this.#l?.resolve()}else this.#c(this.#i),this.#c(this.#n),this.#c(this.#a);if(r){for(const[i,{v:o,wv:a}]of r)i.wv<=a&&(i.v=o);Uh=null}for(const i of this.#s)Wl(i);for(const i of this.#o)Wl(i);this.#s=[],this.#o=[]}#p(e){e.f^=bn;for(var r=e.first;r!==null;){var n=r.f,s=(n&(ea|Il))!==0,i=s&&(n&bn)!==0,o=i||(n&wi)!==0||this.skipped_effects.has(r);if(!o&&r.fn!==null){if(s)r.f^=bn;else if((n&Yw)!==0)this.#n.push(r);else if((n&bn)===0)if((n&Xw)!==0){var a=r.b?.pending?this.#o:this.#s;a.push(r)}else Op(r)&&((r.f&xh)!==0&&this.#a.push(r),Wl(r));var c=r.first;if(c!==null){r=c;continue}}var l=r.parent;for(r=r.next;r===null&&l!==null;)r=l.next,l=l.parent}}#c(e){for(const r of e)((r.f&Ws)!==0?this.#h:this.#d).push(r),Yn(r,bn);e.length=0}capture(e,r){this.#t.has(e)||this.#t.set(e,r),this.current.set(e,e.v)}activate(){wr=this}deactivate(){wr=null,Q1=null;for(const e of w9)if(w9.delete(e),e(),wr!==null)break}neuter(){this.#u=!0}flush(){Ll.length>0?E9():this.#f(),wr===this&&(this.#r===0&&xp.delete(this),this.deactivate())}#f(){if(!this.#u)for(const e of this.#e)e();this.#e.clear()}increment(){this.#r+=1}decrement(){if(this.#r-=1,this.#r===0){for(const e of this.#h)Yn(e,Ws),Fh(e);for(const e of this.#d)Yn(e,ta),Fh(e);this.#i=[],this.#n=[],this.flush()}else this.deactivate()}add_callback(e){this.#e.add(e)}settled(){return(this.#l??=cD()).promise}static ensure(){if(wr===null){const e=wr=new Lh;xp.add(wr),q1||Lh.enqueue(()=>{wr===e&&e.flush()})}return wr}static enqueue(e){Y1.length===0&&queueMicrotask(k9),Y1.unshift(e)}}function je(t){var e=q1;q1=!0;try{for(var r;;){if(DD(),Ll.length===0&&(wr?.flush(),Ll.length===0))return K1=null,r;E9()}}finally{q1=e}}function E9(){var t=Vh;a3=!0;try{var e=0;for(R9(!0);Ll.length>0;){var r=Lh.ensure();if(e++>1e3){var n,s;$D()}r.process(Ll),hc.clear()}}finally{a3=!1,R9(t),K1=null}}function $D(){try{mD()}catch(t){i3(t,K1)}}let Fl=null;function A9(t){var e=t.length;if(e!==0){for(var r=0;r<e;){var n=t[r++];if((n.f&(Ol|wi))===0&&Op(n)&&(Fl=[],Wl(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null&&n.ac===null?W9(n):n.fn=null),Fl.length>0)){hc.clear();for(const s of Fl)Wl(s);Fl=[]}}Fl=null}}function Fh(t){for(var e=K1=t;e.parent!==null;){e=e.parent;var r=e.f;if(a3&&e===xt&&(r&xh)!==0)return;if((r&(Il|ea))!==0){if((r&bn)===0)return;e.f^=bn}}Ll.push(e)}const hc=new Map;function dc(t,e){var r={f:0,v:t,reactions:null,equals:XA,rv:0,wv:0};return r}function fc(t,e){const r=dc(t);return QD(r),r}function De(t,e=!1,r=!0){const n=dc(t);return e||(n.equals=t9),Oh&&r&&Pr!==null&&Pr.l!==null&&(Pr.l.s??=[]).push(n),n}function HD(t,e){return Re(t,Le(()=>$(t))),e}function Re(t,e,r=!1){Xt!==null&&(!lo||(Xt.f&YA)!==0)&&Ul()&&(Xt.f&(ws|xh|Xw|YA))!==0&&!na?.includes(t)&&kD();let n=r?Mh(e):e;return pc(t,n)}function pc(t,e){if(!t.equals(e)){var r=t.v;Vl?hc.set(t,e):hc.set(t,r),t.v=e;var n=Lh.ensure();n.capture(t,r),(t.f&ws)!==0&&((t.f&Ws)!==0&&o3(t),Yn(t,(t.f&Ds)===0?bn:ta)),t.wv=I9(),T9(t,Ws),Ul()&&xt!==null&&(xt.f&bn)!==0&&(xt.f&(ea|Il))===0&&(zs===null?YD([t]):zs.push(t))}return e}function _9(t,e=1){var r=$(t),n=e===1?r++:r--;return Re(t,r),n}function c3(t){Re(t,t.v+1)}function T9(t,e){var r=t.reactions;if(r!==null)for(var n=Ul(),s=r.length,i=0;i<s;i++){var o=r[i],a=o.f;if(!(!n&&o===xt)){var c=(a&Ws)===0;c&&Yn(o,e),(a&ws)!==0?T9(o,ta):c&&((a&xh)!==0&&Fl!==null&&Fl.push(o),Fh(o))}}}function ZD(t,e){if(e){const r=document.body;t.autofocus=!0,Z1(()=>{document.activeElement===r&&t.focus()})}}let C9=!1;function S9(){C9||(C9=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e.__on_r?.()})},{capture:!0}))}function X1(t){var e=Xt,r=xt;js(null),Gs(null);try{return t()}finally{js(e),Gs(r)}}function JD(t,e,r,n=r){t.addEventListener(e,()=>X1(r));const s=t.__on_r;s?t.__on_r=()=>{s(),n(!0)}:t.__on_r=()=>n(!0),S9()}let Vh=!1;function R9(t){Vh=t}let Vl=!1;function P9(t){Vl=t}let Xt=null,lo=!1;function js(t){Xt=t}let xt=null;function Gs(t){xt=t}let na=null;function QD(t){Xt!==null&&(na===null?na=[t]:na.push(t))}let Qn=null,Es=0,zs=null;function YD(t){zs=t}let N9=1,Ip=0,Dl=Ip;function x9(t){Dl=t}let gc=!1;function I9(){return++N9}function Op(t){var e=t.f;if((e&Ws)!==0)return!0;if((e&ta)!==0){var r=t.deps,n=(e&Ds)!==0;if(r!==null){var s,i,o=(e&W1)!==0,a=n&&xt!==null&&!gc,c=r.length;if((o||a)&&(xt===null||(xt.f&Ol)===0)){var l=t,u=l.parent;for(s=0;s<c;s++)i=r[s],(o||!i?.reactions?.includes(l))&&(i.reactions??=[]).push(l);o&&(l.f^=W1),a&&u!==null&&(u.f&Ds)===0&&(l.f^=Ds)}for(s=0;s<c;s++)if(i=r[s],Op(i)&&y9(i),i.wv>t.wv)return!0}(!n||xt!==null&&!gc)&&Yn(t,bn)}return!1}function O9(t,e,r=!0){var n=t.reactions;if(n!==null&&!na?.includes(t))for(var s=0;s<n.length;s++){var i=n[s];(i.f&ws)!==0?O9(i,e,!1):e===i&&(r?Yn(i,Ws):(i.f&bn)!==0&&Yn(i,ta),Fh(i))}}function B9(t){var e=Qn,r=Es,n=zs,s=Xt,i=gc,o=na,a=Pr,c=lo,l=Dl,u=t.f;Qn=null,Es=0,zs=null,gc=(u&Ds)!==0&&(lo||!Vh||Xt===null),Xt=(u&(ea|Il))===0?t:null,na=null,Bh(t.ctx),lo=!1,Dl=++Ip,t.ac!==null&&(X1(()=>{t.ac.abort(e3)}),t.ac=null);try{t.f|=qw;var d=t.fn,h=d(),p=t.deps;if(Qn!==null){var g;if(e2(t,Es),p!==null&&Es>0)for(p.length=Es+Qn.length,g=0;g<Qn.length;g++)p[Es+g]=Qn[g];else t.deps=p=Qn;if(!gc||(u&ws)!==0&&t.reactions!==null)for(g=Es;g<p.length;g++)(p[g].reactions??=[]).push(t)}else p!==null&&Es<p.length&&(e2(t,Es),p.length=Es);if(Ul()&&zs!==null&&!lo&&p!==null&&(t.f&(ws|ta|Ws))===0)for(g=0;g<zs.length;g++)O9(zs[g],t);return s!==null&&s!==t&&(Ip++,zs!==null&&(n===null?n=zs:n.push(...zs))),(t.f&Bl)!==0&&(t.f^=Bl),h}catch(m){return LD(m)}finally{t.f^=qw,Qn=e,Es=r,zs=n,Xt=s,gc=i,na=o,Bh(a),lo=c,Dl=l}}function KD(t,e){let r=e.reactions;if(r!==null){var n=sD.call(r,t);if(n!==-1){var s=r.length-1;s===0?r=e.reactions=null:(r[n]=r[s],r.pop())}}r===null&&(e.f&ws)!==0&&(Qn===null||!Qn.includes(e))&&(Yn(e,ta),(e.f&(Ds|W1))===0&&(e.f^=W1),m9(e),e2(e,0))}function e2(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)KD(t,r[n])}function Wl(t){var e=t.f;if((e&Ol)===0){Yn(t,bn);var r=xt,n=Vh;xt=t,Vh=!0;try{(e&xh)!==0?nW(t):V9(t),F9(t);var s=B9(t);t.teardown=typeof s=="function"?s:null,t.wv=N9;var i;$A&&ED&&(t.f&Ws)!==0&&t.deps}finally{Vh=n,xt=r}}}function $(t){var e=t.f,r=(e&ws)!==0;if(Xt!==null&&!lo){var n=xt!==null&&(xt.f&Ol)!==0;if(!n&&!na?.includes(t)){var s=Xt.deps;if((Xt.f&qw)!==0)t.rv<Ip&&(t.rv=Ip,Qn===null&&s!==null&&s[Es]===t?Es++:Qn===null?Qn=[t]:(!gc||!Qn.includes(t))&&Qn.push(t));else{(Xt.deps??=[]).push(t);var i=t.reactions;i===null?t.reactions=[Xt]:i.includes(Xt)||i.push(Xt)}}}else if(r&&t.deps===null&&t.effects===null){var o=t,a=o.parent;a!==null&&(a.f&Ds)===0&&(o.f^=Ds)}if(Vl){if(hc.has(t))return hc.get(t);if(r){o=t;var c=o.v;return((o.f&bn)===0&&o.reactions!==null||M9(o))&&(c=o3(o)),hc.set(o,c),c}}else if(r){if(o=t,Uh?.has(o))return Uh.get(o);Op(o)&&y9(o)}if((t.f&Bl)!==0)throw t.v;return t.v}function M9(t){if(t.v===Kr)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(hc.has(e)||(e.f&ws)!==0&&M9(e))return!0;return!1}function l3(t){return t&&$(t)}function Le(t){var e=lo;try{return lo=!0,t()}finally{lo=e}}const qD=-7169;function Yn(t,e){t.f=t.f&qD|e}function $e(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(uc in t)u3(t);else if(!Array.isArray(t))for(let e in t){const r=t[e];typeof r=="object"&&r&&uc in r&&u3(r)}}}function u3(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let n in t)try{u3(t[n],e)}catch{}const r=Qw(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const n=HA(r);for(let s in n){const i=n[s].get;if(i)try{i.call(t)}catch{}}}}}function U9(t){xt===null&&Xt===null&&gD(),Xt!==null&&(Xt.f&Ds)!==0&&xt===null&&pD(),Vl&&fD()}function XD(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function uo(t,e,r,n=!0){var s=xt;s!==null&&(s.f&wi)!==0&&(t|=wi);var i={ctx:Pr,deps:null,nodes_start:null,nodes_end:null,f:t|Ws,first:null,fn:e,last:null,next:null,parent:s,b:s&&s.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(r)try{Wl(i),i.f|=Kw}catch(c){throw $s(i),c}else e!==null&&Fh(i);if(n){var o=i;if(r&&o.deps===null&&o.teardown===null&&o.nodes_start===null&&o.first===o.last&&(o.f&Sp)===0&&(o=o.first),o!==null&&(o.parent=s,s!==null&&XD(o,s),Xt!==null&&(Xt.f&ws)!==0&&(t&Il)===0)){var a=Xt;(a.effects??=[]).push(o)}}return i}function h3(t){const e=uo(D1,null,!1);return Yn(e,bn),e.teardown=t,e}function d3(t){U9();var e=xt.f,r=!Xt&&(e&ea)!==0&&(e&Kw)===0;if(r){var n=Pr;(n.e??=[]).push(t)}else return L9(t)}function L9(t){return uo(Yw|KA,t,!1)}function eW(t){return U9(),uo(D1|KA,t,!0)}function tW(t){Lh.ensure();const e=uo(Il|Sp,t,!0);return(r={})=>new Promise(n=>{r.outro?jl(e,()=>{$s(e),n(void 0)}):($s(e),n(void 0))})}function f3(t){return uo(Yw,t,!1)}function gt(t,e){var r=Pr,n={effect:null,ran:!1,deps:t};r.l.$.push(n),n.effect=p3(()=>{t(),!n.ran&&(n.ran=!0,Le(e))})}function mr(){var t=Pr;p3(()=>{for(var e of t.l.$){e.deps();var r=e.effect;(r.f&bn)!==0&&Yn(r,ta),Op(r)&&Wl(r),e.ran=!1}})}function rW(t){return uo(Xw|Sp,t,!0)}function p3(t,e=0){return uo(D1|e,t,!0)}function Ye(t,e=[],r=[]){v9(e,r,n=>{uo(D1,()=>t(...n.map($)),!0)})}function Dh(t,e=0){var r=uo(xh|e,t,!0);return r}function ho(t,e=!0){return uo(ea|Sp,t,!0,e)}function F9(t){var e=t.teardown;if(e!==null){const r=Vl,n=Xt;P9(!0),js(null);try{e.call(null)}finally{P9(r),js(n)}}}function V9(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){const s=r.ac;s!==null&&X1(()=>{s.abort(e3)});var n=r.next;(r.f&Il)!==0?r.parent=null:$s(r,e),r=n}}function nW(t){for(var e=t.first;e!==null;){var r=e.next;(e.f&ea)===0&&$s(e),e=r}}function $s(t,e=!0){var r=!1;(e||(t.f&lD)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(D9(t.nodes_start,t.nodes_end),r=!0),V9(t,e&&!r),e2(t,0),Yn(t,Ol);var n=t.transitions;if(n!==null)for(const i of n)i.stop();F9(t);var s=t.parent;s!==null&&s.first!==null&&W9(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function D9(t,e){for(;t!==null;){var r=t===e?null:co(t);t.remove(),t=r}}function W9(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function jl(t,e){var r=[];g3(t,r,!0),j9(r,()=>{$s(t),e&&e()})}function j9(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var s of t)s.out(n)}else e()}function g3(t,e,r){if((t.f&wi)===0){if(t.f^=wi,t.transitions!==null)for(const o of t.transitions)(o.is_global||r)&&e.push(o);for(var n=t.first;n!==null;){var s=n.next,i=(n.f&j1)!==0||(n.f&ea)!==0;g3(n,e,i?r:!1),n=s}}}function t2(t){G9(t,!0)}function G9(t,e){if((t.f&wi)!==0){t.f^=wi,(t.f&bn)===0&&(Yn(t,Ws),Fh(t));for(var r=t.first;r!==null;){var n=r.next,s=(r.f&j1)!==0||(r.f&ea)!==0;G9(r,s?e:!1),r=n}if(t.transitions!==null)for(const i of t.transitions)(i.is_global||e)&&i.in()}}function sW(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const iW=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function oW(t){return iW.includes(t)}const aW={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function cW(t){return t=t.toLowerCase(),aW[t]??t}const lW=["touchstart","touchmove"];function uW(t){return lW.includes(t)}const z9=new Set,m3=new Set;function $9(t,e,r,n={}){function s(i){if(n.capture||Bp.call(e,i),!i.cancelBubble)return X1(()=>r?.call(this,i))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Z1(()=>{e.addEventListener(t,s,n)}):e.addEventListener(t,s,n),s}function un(t,e,r,n,s){var i={capture:n,passive:s},o=$9(t,e,r,i);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&h3(()=>{e.removeEventListener(t,o,i)})}function hW(t){for(var e=0;e<t.length;e++)z9.add(t[e]);for(var r of m3)r(t)}let H9=null;function Bp(t){var e=this,r=e.ownerDocument,n=t.type,s=t.composedPath?.()||[],i=s[0]||t.target;H9=t;var o=0,a=H9===t&&t.__root;if(a){var c=s.indexOf(a);if(c!==-1&&(e===document||e===window)){t.__root=e;return}var l=s.indexOf(e);if(l===-1)return;c<=l&&(o=c)}if(i=s[o]||t.target,i!==e){Tp(t,"currentTarget",{configurable:!0,get(){return i||r}});var u=Xt,d=xt;js(null),Gs(null);try{for(var h,p=[];i!==null;){var g=i.assignedSlot||i.parentNode||i.host||null;try{var m=i["__"+n];if(m!=null&&(!i.disabled||t.target===i))if(V1(m)){var[y,...v]=m;y.apply(i,[t,...v])}else m.call(i,t)}catch(A){h?p.push(A):h=A}if(t.cancelBubble||g===e||g===null)break;i=g}if(h){for(let A of p)queueMicrotask(()=>{throw A});throw h}}finally{t.__root=e,delete t.currentTarget,js(u),Gs(d)}}}function Z9(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function fo(t,e){var r=xt;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function Fe(t,e){var r=(e&ND)!==0,n=(e&xD)!==0,s,i=!t.startsWith("<!>");return()=>{if(St)return fo(tr,null),tr;s===void 0&&(s=Z9(i?t:"<!>"+t),r||(s=Ei(s)));var o=n||l9?document.importNode(s,!0):s.cloneNode(!0);if(r){var a=Ei(o),c=o.lastChild;fo(a,c)}else fo(o,o);return o}}function Mr(t=""){if(!St){var e=ki(t+"");return fo(e,e),e}var r=tr;return r.nodeType!==t3&&(r.before(r=ki()),us(r)),fo(r,r),r}function nt(){if(St)return fo(tr,null),tr;var t=document.createDocumentFragment(),e=document.createComment(""),r=ki();return t.append(e,r),fo(e,r),t}function Ee(t,e){if(St){xt.nodes_end=tr,ra();return}t!==null&&t.before(e)}function pt(t,e){var r=e==null?"":typeof e=="object"?e+"":e;r!==(t.__t??=t.nodeValue)&&(t.__t=r,t.nodeValue=r+"")}function J9(t,e){return Q9(t,e)}function dW(t,e){n3(),e.intro=e.intro??!1;const r=e.target,n=St,s=tr;try{for(var i=Ei(r);i&&(i.nodeType!==Ih||i.data!==i9);)i=co(i);if(!i)throw Ml;ks(!0),us(i),ra();const o=Q9(t,{...e,anchor:i});if(tr===null||tr.nodeType!==Ih||tr.data!==r3)throw Rp(),Ml;return ks(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
|
|
3
3
|
`).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==Ml&&console.warn("Failed to hydrate: ",o),e.recover===!1&&yD(),n3(),d9(r),ks(!1),J9(t,e)}finally{ks(n),us(s)}}const Wh=new Map;function Q9(t,{target:e,anchor:r,props:n={},events:s,context:i,intro:o=!0}){n3();var a=new Set,c=d=>{for(var h=0;h<d.length;h++){var p=d[h];if(!a.has(p)){a.add(p);var g=uW(p);e.addEventListener(p,Bp,{passive:g});var m=Wh.get(p);m===void 0?(document.addEventListener(p,Bp,{passive:g}),Wh.set(p,1)):Wh.set(p,m+1)}}};c(Jw(z9)),m3.add(c);var l=void 0,u=tW(()=>{var d=r??e.appendChild(ki());return ho(()=>{if(i){ot({});var h=Pr;h.c=i}s&&(n.$$events=s),St&&fo(d,null),l=t(d,n)||{},St&&(xt.nodes_end=tr),i&&at()}),()=>{for(var h of a){e.removeEventListener(h,Bp);var p=Wh.get(h);--p===0?(document.removeEventListener(h,Bp),Wh.delete(h)):Wh.set(h,p)}m3.delete(c),d!==r&&d.parentNode?.removeChild(d)}});return y3.set(l,u),l}let y3=new WeakMap;function fW(t,e){const r=y3.get(t);return r?(y3.delete(t),r(e)):Promise.resolve()}const v3=0,r2=1,b3=2;function wn(t,e,r,n,s){St&&ra();var i=t,o=Ul(),a=Pr,c=Kr,l,u,d,h=o?dc(void 0):De(void 0,!1,!1),p=o?dc(void 0):De(void 0,!1,!1),g=!1;function m(v,A){g=!0,A&&(Gs(y),js(y),Bh(a));try{v===r2&&n&&(u?t2(u):u=ho(()=>n(i,h))),v!==v3&&l&&jl(l,()=>l=null),v!==r2&&u&&jl(u,()=>u=null),v!==b3&&d&&jl(d,()=>d=null)}finally{A&&(Bh(null),js(null),Gs(null),je())}}var y=Dh(()=>{if(c===(c=e()))return;let v=St&&JA(c)===(i.data===$1);if(v&&(i=H1(),us(i),ks(!1),v=!0),JA(c)){var A=c;g=!1,A.then(E=>{A===c&&(pc(h,E),m(r2,!0))},E=>{if(A===c)throw pc(p,E),m(b3,!0),p.v}),St||Z1(()=>{g||m(v3,!0)})}else pc(h,c),m(r2,!1);return v&&ks(!0),()=>c=Kr});St&&(i=tr)}function Je(t,e,r=!1){St&&ra();var n=t,s=null,i=null,o=Kr,a=r?j1:0,c=!1;const l=(p,g=!0)=>{c=!0,h(g,p)};var u=null;function d(){u!==null&&(u.lastChild.remove(),n.before(u),u=null);var p=o?s:i,g=o?i:s;p&&t2(p),g&&jl(g,()=>{o?i=null:s=null})}const h=(p,g)=>{if(o===(o=p))return;let m=!1;if(St){const C=o9(n)===$1;!!o===C&&(n=H1(),us(n),ks(!1),m=!0)}var y=s3(),v=n;if(y&&(u=document.createDocumentFragment(),u.append(v=ki())),o?s??=g&&ho(()=>g(v)):i??=g&&ho(()=>g(v)),y){var A=wr,E=o?s:i,w=o?i:s;E&&A.skipped_effects.delete(E),w&&A.skipped_effects.add(w),A.add_callback(d)}else d();m&&ks(!0)};Dh(()=>{c=!1,e(l),c||h(null,null)},a),St&&(n=tr)}function Mp(t,e){return e}function pW(t,e,r){for(var n=t.items,s=[],i=e.length,o=0;o<i;o++)g3(e[o].e,s,!0);var a=i>0&&s.length===0&&r!==null;if(a){var c=r.parentNode;d9(c),c.append(r),n.clear(),po(t,e[0].prev,e[i-1].next)}j9(s,()=>{for(var l=0;l<i;l++){var u=e[l];a||(n.delete(u.k),po(t,u.prev,u.next)),$s(u.e,!a)}})}function Up(t,e,r,n,s,i=null){var o=t,a={flags:e,items:new Map,first:null},c=(e&n9)!==0;if(c){var l=t;o=St?us(Ei(l)):l.appendChild(ki())}St&&ra();var u=null,d=!1,h=new Map,p=bt(()=>{var v=r();return V1(v)?v:v==null?[]:Jw(v)}),g,m;function y(){gW(m,g,a,h,o,s,e,n,r),i!==null&&(g.length===0?u?t2(u):u=ho(()=>i(o)):u!==null&&jl(u,()=>{u=null}))}Dh(()=>{m??=xt,g=$(p);var v=g.length;if(d&&v===0)return;d=v===0;let A=!1;if(St){var E=o9(o)===$1;E!==(v===0)&&(o=H1(),us(o),ks(!1),A=!0)}if(St){for(var w=null,C,B=0;B<v;B++){if(tr.nodeType===Ih&&tr.data===r3){o=tr,A=!0,ks(!1);break}var L=g[B],I=n(L,B);C=w3(tr,a,w,null,L,I,B,s,e,r),a.items.set(I,C),w=C}v>0&&us(H1())}if(St)v===0&&i&&(u=ho(()=>i(o)));else if(s3()){var M=new Set,W=wr;for(B=0;B<v;B+=1){L=g[B],I=n(L,B);var U=a.items.get(I)??h.get(I);U?(e&(G1|z1))!==0&&Y9(U,L,B,e):(C=w3(null,a,null,null,L,I,B,s,e,r,!0),h.set(I,C)),M.add(I)}for(const[x,P]of a.items)M.has(x)||W.skipped_effects.add(P.e);W.add_callback(y)}else y();A&&ks(!0),$(p)}),St&&(o=tr)}function gW(t,e,r,n,s,i,o,a,c){var l=(o&_D)!==0,u=(o&(G1|z1))!==0,d=e.length,h=r.items,p=r.first,g=p,m,y=null,v,A=[],E=[],w,C,B,L;if(l)for(L=0;L<d;L+=1)w=e[L],C=a(w,L),B=h.get(C),B!==void 0&&(B.a?.measure(),(v??=new Set).add(B));for(L=0;L<d;L+=1){if(w=e[L],C=a(w,L),B=h.get(C),B===void 0){var I=n.get(C);if(I!==void 0){n.delete(C),h.set(C,I);var M=y?y.next:g;po(r,y,I),po(r,I,M),k3(I,M,s),y=I}else{var W=g?g.e.nodes_start:s;y=w3(W,r,y,y===null?r.first:y.next,w,C,L,i,o,c)}h.set(C,y),A=[],E=[],g=y.next;continue}if(u&&Y9(B,w,L,o),(B.e.f&wi)!==0&&(t2(B.e),l&&(B.a?.unfix(),(v??=new Set).delete(B))),B!==g){if(m!==void 0&&m.has(B)){if(A.length<E.length){var U=E[0],x;y=U.prev;var P=A[0],F=A[A.length-1];for(x=0;x<A.length;x+=1)k3(A[x],U,s);for(x=0;x<E.length;x+=1)m.delete(E[x]);po(r,P.prev,F.next),po(r,y,P),po(r,F,U),g=U,y=F,L-=1,A=[],E=[]}else m.delete(B),k3(B,g,s),po(r,B.prev,B.next),po(r,B,y===null?r.first:y.next),po(r,y,B),y=B;continue}for(A=[],E=[];g!==null&&g.k!==C;)(g.e.f&wi)===0&&(m??=new Set).add(g),E.push(g),g=g.next;if(g===null)continue;B=g}A.push(B),y=B,g=B.next}if(g!==null||m!==void 0){for(var O=m===void 0?[]:Jw(m);g!==null;)(g.e.f&wi)===0&&O.push(g),g=g.next;var j=O.length;if(j>0){var G=(o&n9)!==0&&d===0?s:null;if(l){for(L=0;L<j;L+=1)O[L].a?.measure();for(L=0;L<j;L+=1)O[L].a?.fix()}pW(r,O,G)}}l&&Z1(()=>{if(v!==void 0)for(B of v)B.a?.apply()}),t.first=r.first&&r.first.e,t.last=y&&y.e;for(var q of n.values())$s(q.e);n.clear()}function Y9(t,e,r,n){(n&G1)!==0&&pc(t.v,e),(n&z1)!==0?pc(t.i,r):t.i=r}function w3(t,e,r,n,s,i,o,a,c,l,u){var d=(c&G1)!==0,h=(c&TD)===0,p=d?h?De(s,!1,!1):dc(s):s,g=(c&z1)===0?o:dc(o),m={i:g,v:p,k:i,a:null,e:null,prev:r,next:n};try{if(t===null){var y=document.createDocumentFragment();y.append(t=ki())}return m.e=ho(()=>a(t,p,g,l),St),m.e.prev=r&&r.e,m.e.next=n&&n.e,r===null?u||(e.first=m):(r.next=m,r.e.next=m.e),n!==null&&(n.prev=m,n.e.prev=m.e),m}finally{}}function k3(t,e,r){for(var n=t.next?t.next.e.nodes_start:r,s=e?e.e.nodes_start:r,i=t.e.nodes_start;i!==null&&i!==n;){var o=co(i);s.before(i),i=o}}function po(t,e,r){e===null?t.first=r:(e.next=r,e.e.next=r&&r.e),r!==null&&(r.prev=e,r.e.prev=e&&e.e)}function E3(t,e,r=!1,n=!1,s=!1){var i=t,o="";Ye(()=>{var a=xt;if(o===(o=e()??"")){St&&ra();return}if(a.nodes_start!==null&&(D9(a.nodes_start,a.nodes_end),a.nodes_start=a.nodes_end=null),o!==""){if(St){tr.data;for(var c=ra(),l=c;c!==null&&(c.nodeType!==Ih||c.data!=="");)l=c,c=co(c);if(c===null)throw Rp(),Ml;fo(tr,l),i=us(c);return}var u=o+"";r?u=`<svg>${u}</svg>`:n&&(u=`<math>${u}</math>`);var d=Z9(u);if((r||n)&&(d=Ei(d)),fo(Ei(d),d.lastChild),r||n)for(;Ei(d);)i.before(Ei(d));else i.before(d)}})}function Ai(t,e,r,n,s){St&&ra();var i=e.$$slots?.[r],o=!1;i===!0&&(i=e[r==="default"?"children":r],o=!0),i===void 0||i(t,o?()=>n:n)}function hn(t,e,r){St&&ra();var n=t,s,i,o=null,a=null;function c(){i&&(jl(i),i=null),o&&(o.lastChild.remove(),n.before(o),o=null),i=a,a=null}Dh(()=>{if(s!==(s=e())){var l=s3();if(s){var u=n;l&&(o=document.createDocumentFragment(),o.append(u=ki()),i&&wr.skipped_effects.add(i)),a=ho(()=>r(u,s))}l?wr.add_callback(c):c()}},j1),St&&(n=tr)}function mc(t,e){f3(()=>{var r=t.getRootNode(),n=r.host?r:r.head??r.ownerDocument.head;if(!n.querySelector("#"+e.hash)){const s=document.createElement("style");s.id=e.hash,s.textContent=e.code,n.appendChild(s)}})}function mW(t,e){var r=void 0,n;Dh(()=>{r!==(r=e())&&(n&&($s(n),n=null),r&&(n=ho(()=>{f3(()=>r(t))})))})}function K9(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(r=K9(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function yW(){for(var t,e,r=0,n="",s=arguments.length;r<s;r++)(t=arguments[r])&&(e=K9(t))&&(n&&(n+=" "),n+=e);return n}function A3(t){return typeof t=="object"?yW(t):t??""}const q9=[...`
|
|
4
4
|
\r\f \v\uFEFF`];function vW(t,e,r){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),r){for(var s in r)if(r[s])n=n?n+" "+s:s;else if(n.length)for(var i=s.length,o=0;(o=n.indexOf(s,o))>=0;){var a=o+i;(o===0||q9.includes(n[o-1]))&&(a===n.length||q9.includes(n[a]))?n=(o===0?"":n.substring(0,o))+n.substring(a+1):o=a}}return n===""?null:n}function X9(t,e=!1){var r=e?" !important;":";",n="";for(var s in t){var i=t[s];i!=null&&i!==""&&(n+=" "+s+": "+i+r)}return n}function _3(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function bW(t,e){if(e){var r="",n,s;if(Array.isArray(e)?(n=e[0],s=e[1]):n=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,o=0,a=!1,c=[];n&&c.push(...Object.keys(n).map(_3)),s&&c.push(...Object.keys(s).map(_3));var l=0,u=-1;const m=t.length;for(var d=0;d<m;d++){var h=t[d];if(a?h==="/"&&t[d-1]==="*"&&(a=!1):i?i===h&&(i=!1):h==="/"&&t[d+1]==="*"?a=!0:h==='"'||h==="'"?i=h:h==="("?o++:h===")"&&o--,!a&&i===!1&&o===0){if(h===":"&&u===-1)u=d;else if(h===";"||d===m-1){if(u!==-1){var p=_3(t.substring(l,u).trim());if(!c.includes(p)){h!==";"&&d++;var g=t.substring(l,d).trim();r+=" "+g+";"}}l=d+1,u=-1}}}}return n&&(r+=X9(n)),s&&(r+=X9(s,!0)),r=r.trim(),r===""?null:r}return t==null?null:String(t)}function Fr(t,e,r,n,s,i){var o=t.__className;if(St||o!==r||o===void 0){var a=vW(r,n,i);(!St||a!==t.getAttribute("class"))&&(a==null?t.removeAttribute("class"):e?t.className=a:t.setAttribute("class",a)),t.__className=r}else if(i&&s!==i)for(var c in i){var l=!!i[c];(s==null||l!==!!s[c])&&t.classList.toggle(c,l)}return i}function T3(t,e={},r,n){for(var s in r){var i=r[s];e[s]!==i&&(r[s]==null?t.style.removeProperty(s):t.style.setProperty(s,i,n))}}function _i(t,e,r,n){var s=t.__style;if(St||s!==e){var i=bW(e,n);(!St||i!==t.getAttribute("style"))&&(i==null?t.removeAttribute("style"):t.style.cssText=i),t.__style=e}else n&&(Array.isArray(n)?(T3(t,r?.[0],n[0]),T3(t,r?.[1],n[1],"important")):T3(t,r,n));return n}function C3(t,e,r=!1){if(t.multiple){if(e==null)return;if(!V1(e))return BD();for(var n of t.options)n.selected=e.includes(e_(n));return}for(n of t.options){var s=e_(n);if(MD(s,e)){n.selected=!0;return}}(!r||e!==void 0)&&(t.selectedIndex=-1)}function wW(t){var e=new MutationObserver(()=>{C3(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),h3(()=>{e.disconnect()})}function e_(t){return"__value"in t?t.__value:t.value}const jh=Symbol("class"),Lp=Symbol("style"),t_=Symbol("is custom element"),r_=Symbol("is html");function S3(t){if(St){var e=!1,r=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var n=t.value;kt(t,"value",null),t.value=n}if(t.hasAttribute("checked")){var s=t.checked;kt(t,"checked",null),t.checked=s}}};t.__on_r=r,VD(r),S9()}}function R3(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function kt(t,e,r,n){var s=s_(t);St&&(s[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||s[e]!==(s[e]=r)&&(e==="loading"&&(t[uD]=r),r==null?t.removeAttribute(e):typeof r!="string"&&o_(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function kW(t,e,r,n,s=!1){var i=s_(t),o=i[t_],a=!i[r_];let c=St&&o;c&&ks(!1);var l=e||{},u=t.tagName==="OPTION";for(var d in e)d in r||(r[d]=null);r.class?r.class=A3(r.class):(n||r[jh])&&(r.class=null),r[Lp]&&(r.style??=null);var h=o_(t);for(const E in r){let w=r[E];if(u&&E==="value"&&w==null){t.value=t.__value="",l[E]=w;continue}if(E==="class"){var p=t.namespaceURI==="http://www.w3.org/1999/xhtml";Fr(t,p,w,n,e?.[jh],r[jh]),l[E]=w,l[jh]=r[jh];continue}if(E==="style"){_i(t,w,e?.[Lp],r[Lp]),l[E]=w,l[Lp]=r[Lp];continue}var g=l[E];if(!(w===g&&!(w===void 0&&t.hasAttribute(E)))){l[E]=w;var m=E[0]+E[1];if(m!=="$$")if(m==="on"){const C={},B="$$"+E;let L=E.slice(2);var y=oW(L);if(sW(L)&&(L=L.slice(0,-7),C.capture=!0),!y&&g){if(w!=null)continue;t.removeEventListener(L,l[B],C),l[B]=null}if(w!=null)if(y)t[`__${L}`]=w,hW([L]);else{let I=function(M){l[E].call(this,M)};l[B]=$9(L,t,I,C)}else y&&(t[`__${L}`]=void 0)}else if(E==="style")kt(t,E,w);else if(E==="autofocus")ZD(t,!!w);else if(!o&&(E==="__value"||E==="value"&&w!=null))t.value=t.__value=w;else if(E==="selected"&&u)R3(t,w);else{var v=E;a||(v=cW(v));var A=v==="defaultValue"||v==="defaultChecked";if(w==null&&!o&&!A)if(i[E]=null,v==="value"||v==="checked"){let C=t;const B=e===void 0;if(v==="value"){let L=C.defaultValue;C.removeAttribute(v),C.defaultValue=L,C.value=C.__value=B?L:null}else{let L=C.defaultChecked;C.removeAttribute(v),C.defaultChecked=L,C.checked=B?L:!1}}else t.removeAttribute(E);else A||h.includes(v)&&(o||typeof w!="string")?(t[v]=w,v in i&&(i[v]=Kr)):typeof w!="function"&&kt(t,v,w)}}}return c&&ks(!0),l}function n_(t,e,r=[],n=[],s,i=!1){v9(r,n,o=>{var a=void 0,c={},l=t.nodeName==="SELECT",u=!1;if(Dh(()=>{var h=e(...o.map($)),p=kW(t,a,h,s,i);u&&l&&"value"in h&&C3(t,h.value);for(let m of Object.getOwnPropertySymbols(c))h[m]||$s(c[m]);for(let m of Object.getOwnPropertySymbols(h)){var g=h[m];m.description===OD&&(!a||g!==a[m])&&(c[m]&&$s(c[m]),c[m]=ho(()=>mW(t,()=>g))),p[m]=g}a=p}),l){var d=t;f3(()=>{C3(d,a.value,!0),wW(d)})}u=!0})}function s_(t){return t.__attributes??={[t_]:t.nodeName.includes("-"),[r_]:t.namespaceURI===ID}}var i_=new Map;function o_(t){var e=i_.get(t.nodeName);if(e)return e;i_.set(t.nodeName,e=[]);for(var r,n=t,s=Element.prototype;s!==n;){r=HA(n);for(var i in r)r[i].set&&e.push(i);n=Qw(n)}return e}function P3(t,e,r=e){var n=Ul(),s=new WeakSet;JD(t,"input",i=>{var o=i?t.defaultValue:t.value;if(o=N3(t)?x3(o):o,r(o),wr!==null&&s.add(wr),n&&o!==(o=e())){var a=t.selectionStart,c=t.selectionEnd;t.value=o??"",c!==null&&(t.selectionStart=a,t.selectionEnd=Math.min(c,t.value.length))}}),(St&&t.defaultValue!==t.value||Le(e)==null&&t.value)&&(r(N3(t)?x3(t.value):t.value),wr!==null&&s.add(wr)),p3(()=>{var i=e();if(t===document.activeElement){var o=Q1??wr;if(s.has(o))return}N3(t)&&i===x3(t.value)||t.type==="date"&&!i&&!t.value||i!==t.value&&(t.value=i??"")})}function N3(t){var e=t.type;return e==="number"||e==="range"}function x3(t){return t===""?null:+t}function I3(t){return function(...e){var r=e[0];return r.preventDefault(),t?.apply(this,e)}}function Et(t=!1){const e=Pr,r=e.l.u;if(!r)return;let n=()=>$e(e.s);if(t){let s=0,i={};const o=J1(()=>{let a=!1;const c=e.s;for(const l in c)c[l]!==i[l]&&(i[l]=c[l],a=!0);return a&&s++,s});n=()=>$(o)}r.b.length&&eW(()=>{a_(e,n),Cp(r.b)}),d3(()=>{const s=Le(()=>r.m.map(aD));return()=>{for(const i of s)typeof i=="function"&&i()}}),r.a.length&&d3(()=>{a_(e,n),Cp(r.a)})}function a_(t,e){if(t.l.s)for(const r of t.l.s)$(r);e()}function lt(t,e,r){t.$$events||={},t.$$events[e]||=[],t.$$events[e].push(r)}function ut(t){for(var e in t)e in this&&(this[e]=t[e])}let n2=!1,O3=Symbol();function It(t,e,r){const n=r[e]??={store:null,source:De(void 0),unsubscribe:lc};if(n.store!==t&&!(O3 in r))if(n.unsubscribe(),n.store=t??null,t==null)n.source.v=void 0,n.unsubscribe=lc;else{var s=!0;n.unsubscribe=B3(t,i=>{s?n.source.v=i:Re(n.source,i)}),s=!1}return t&&O3 in r?We(t):$(n.source)}function kn(){const t={};function e(){h3(()=>{for(var r in t)t[r].unsubscribe();Tp(t,O3,{enumerable:!1,value:!0})})}return[t,e]}function EW(t,e,r){return t.set(r),e}function AW(t){var e=n2;try{return n2=!1,[t(),n2]}finally{n2=e}}const _W={get(t,e){if(!t.exclude.includes(e))return $(t.version),e in t.special?t.special[e]():t.props[e]},set(t,e,r){if(!(e in t.special)){var n=xt;try{Gs(t.parent_effect),t.special[e]=Ge({get[e](){return t.props[e]}},e,s9)}finally{Gs(n)}}return t.special[e](r),_9(t.version),!0},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},deleteProperty(t,e){return t.exclude.includes(e)||(t.exclude.push(e),_9(t.version)),!0},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function Fp(t,e){return new Proxy({props:t,exclude:e,special:{},version:dc(0),parent_effect:xt},_W)}function Ge(t,e,r,n){var s=!Oh||(r&SD)!==0,i=(r&RD)!==0,o=(r&PD)!==0,a=n,c=!0,l=()=>(c&&(c=!1,a=o?Le(n):n),a),u;if(i){var d=uc in t||qA in t;u=Nh(t,e)?.set??(d&&e in t?E=>t[e]=E:void 0)}var h,p=!1;i?[h,p]=AW(()=>t[e]):h=t[e],h===void 0&&n!==void 0&&(h=l(),u&&(s&&vD(),u(h)));var g;if(s?g=()=>{var E=t[e];return E===void 0?l():(c=!0,E)}:g=()=>{var E=t[e];return E!==void 0&&(a=void 0),E===void 0?a:E},s&&(r&s9)===0)return g;if(u){var m=t.$$legacy;return function(E,w){return arguments.length>0?((!s||!w||m||p)&&u(w?g():E),E):g()}}var y=!1,v=((r&CD)!==0?J1:bt)(()=>(y=!1,g()));i&&$(v);var A=xt;return function(E,w){if(arguments.length>0){const C=w?$(v):s&&i?Mh(E):E;return Re(v,C),y=!0,a!==void 0&&(a=C),E}return Vl&&y||(A.f&Ol)!==0?v.v:$(v)}}function ht(t){return new TW(t)}class TW{#t;#e;constructor(e){var r=new Map,n=(i,o)=>{var a=De(o,!1,!1);return r.set(i,a),a};const s=new Proxy({...e.props||{},$$events:{}},{get(i,o){return $(r.get(o)??n(o,Reflect.get(i,o)))},has(i,o){return o===qA?!0:($(r.get(o)??n(o,Reflect.get(i,o))),Reflect.has(i,o))},set(i,o,a){return Re(r.get(o)??n(o,a),a),Reflect.set(i,o,a)}});this.#e=(e.hydrate?dW:J9)(e.component,{target:e.target,anchor:e.anchor,props:s,context:e.context,intro:e.intro??!1,recover:e.recover}),(!e?.props?.$$host||e.sync===!1)&&je(),this.#t=s.$$events;for(const i of Object.keys(this.#e))i==="$set"||i==="$destroy"||i==="$on"||Tp(this,i,{get(){return this.#e[i]},set(o){this.#e[i]=o},enumerable:!0});this.#e.$set=i=>{Object.assign(s,i)},this.#e.$destroy=()=>{fW(this.#e)}}$set(e){this.#e.$set(e)}$on(e,r){this.#t[e]=this.#t[e]||[];const n=(...s)=>r.call(this,...s);return this.#t[e].push(n),()=>{this.#t[e]=this.#t[e].filter(s=>s!==n)}}$destroy(){this.#e.$destroy()}}function Gh(t){Pr===null&&r9(),Oh&&Pr.l!==null?CW(Pr).m.push(t):d3(()=>{const e=Le(t);if(typeof e=="function")return e})}function zh(t){Pr===null&&r9(),Gh(()=>()=>Le(t))}function CW(t){var e=t.l;return e.u??={a:[],b:[],m:[]}}function B3(t,e,r){if(t==null)return e(void 0),r&&r(void 0),lc;const n=Le(()=>t.subscribe(e,r));return n.unsubscribe?()=>n.unsubscribe():n}const $h=[];function SW(t,e){return{subscribe:Mn(t,e).subscribe}}function Mn(t,e=lc){let r=null;const n=new Set;function s(a){if(e9(t,a)&&(t=a,r)){const c=!$h.length;for(const l of n)l[1](),$h.push(l,t);if(c){for(let l=0;l<$h.length;l+=2)$h[l][0]($h[l+1]);$h.length=0}}}function i(a){s(a(t))}function o(a,c=lc){const l=[a,c];return n.add(l),n.size===1&&(r=e(s,i)||lc),a(t),()=>{n.delete(l),n.size===0&&r&&(r(),r=null)}}return{set:s,update:i,subscribe:o}}function M3(t,e,r){const n=!Array.isArray(t),s=n?[t]:t;if(!s.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const i=e.length<2;return SW(r,(o,a)=>{let c=!1;const l=[];let u=0,d=lc;const h=()=>{if(u)return;d();const g=e(n?l[0]:l,o,a);i?o(g):d=typeof g=="function"?g:lc},p=s.map((g,m)=>B3(g,y=>{l[m]=y,u&=~(1<<m),c&&h()},()=>{u|=1<<m}));return c=!0,h(),function(){Cp(p),d(),c=!1}})}function We(t){let e;return B3(t,r=>e=r)(),e}function RW(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var c_={exports:{}},jr=c_.exports={},go,mo;function U3(){throw new Error("setTimeout has not been defined")}function L3(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?go=setTimeout:go=U3}catch{go=U3}try{typeof clearTimeout=="function"?mo=clearTimeout:mo=L3}catch{mo=L3}})();function l_(t){if(go===setTimeout)return setTimeout(t,0);if((go===U3||!go)&&setTimeout)return go=setTimeout,setTimeout(t,0);try{return go(t,0)}catch{try{return go.call(null,t,0)}catch{return go.call(this,t,0)}}}function PW(t){if(mo===clearTimeout)return clearTimeout(t);if((mo===L3||!mo)&&clearTimeout)return mo=clearTimeout,clearTimeout(t);try{return mo(t)}catch{try{return mo.call(null,t)}catch{return mo.call(this,t)}}}var sa=[],Hh=!1,Gl,s2=-1;function NW(){!Hh||!Gl||(Hh=!1,Gl.length?sa=Gl.concat(sa):s2=-1,sa.length&&u_())}function u_(){if(!Hh){var t=l_(NW);Hh=!0;for(var e=sa.length;e;){for(Gl=sa,sa=[];++s2<e;)Gl&&Gl[s2].run();s2=-1,e=sa.length}Gl=null,Hh=!1,PW(t)}}jr.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];sa.push(new h_(t,e)),sa.length===1&&!Hh&&l_(u_)};function h_(t,e){this.fun=t,this.array=e}h_.prototype.run=function(){this.fun.apply(null,this.array)},jr.title="browser",jr.browser=!0,jr.env={},jr.argv=[],jr.version="",jr.versions={};function ia(){}jr.on=ia,jr.addListener=ia,jr.once=ia,jr.off=ia,jr.removeListener=ia,jr.removeAllListeners=ia,jr.emit=ia,jr.prependListener=ia,jr.prependOnceListener=ia,jr.listeners=function(t){return[]},jr.binding=function(t){throw new Error("process.binding is not supported")},jr.cwd=function(){return"/"},jr.chdir=function(t){throw new Error("process.chdir is not supported")},jr.umask=function(){return 0};var xW=c_.exports;const F3=RW(xW);var IW=Object.defineProperty,d_=t=>{throw TypeError(t)},OW=(t,e,r)=>e in t?IW(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,X=(t,e,r)=>OW(t,typeof e!="symbol"?e+"":e,r),V3=(t,e,r)=>e.has(t)||d_("Cannot "+r),T=(t,e,r)=>(V3(t,e,"read from private field"),r?r.call(t):e.get(t)),ne=(t,e,r)=>e.has(t)?d_("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),V=(t,e,r,n)=>(V3(t,e,"write to private field"),e.set(t,r),r),ve=(t,e,r)=>(V3(t,e,"access private method"),r),yo=(t,e,r,n)=>({set _(s){V(t,e,s)},get _(){return T(t,e,n)}});const i2="6.13.4";function BW(t,e,r){const n=e.split("|").map(i=>i.trim());for(let i=0;i<n.length;i++)switch(e){case"any":return;case"bigint":case"boolean":case"number":case"string":if(typeof t===e)return}const s=new Error(`invalid value for type ${e}`);throw s.code="INVALID_ARGUMENT",s.argument=`value.${r}`,s.value=t,s}async function nn(t){const e=Object.keys(t);return(await Promise.all(e.map(r=>Promise.resolve(t[r])))).reduce((r,n,s)=>(r[e[s]]=n,r),{})}function rt(t,e,r){for(let n in e){let s=e[n];const i=r?r[n]:null;i&&BW(s,i,n),Object.defineProperty(t,n,{enumerable:!0,value:s,writable:!1})}}function Zh(t){if(t==null)return"null";if(Array.isArray(t))return"[ "+t.map(Zh).join(", ")+" ]";if(t instanceof Uint8Array){const e="0123456789abcdef";let r="0x";for(let n=0;n<t.length;n++)r+=e[t[n]>>4],r+=e[t[n]&15];return r}if(typeof t=="object"&&typeof t.toJSON=="function")return Zh(t.toJSON());switch(typeof t){case"boolean":case"symbol":return t.toString();case"bigint":return BigInt(t).toString();case"number":return t.toString();case"string":return JSON.stringify(t);case"object":{const e=Object.keys(t);return e.sort(),"{ "+e.map(r=>`${Zh(r)}: ${Zh(t[r])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function Gr(t,e){return t&&t.code===e}function Vp(t){return Gr(t,"CALL_EXCEPTION")}function yr(t,e,r){let n=t;{const i=[];if(r){if("message"in r||"code"in r||"name"in r)throw new Error(`value will overwrite populated values: ${Zh(r)}`);for(const o in r){if(o==="shortMessage")continue;const a=r[o];i.push(o+"="+Zh(a))}}i.push(`code=${e}`),i.push(`version=${i2}`),i.length&&(t+=" ("+i.join(", ")+")")}let s;switch(e){case"INVALID_ARGUMENT":s=new TypeError(t);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":s=new RangeError(t);break;default:s=new Error(t)}return rt(s,{code:e}),r&&Object.assign(s,r),s.shortMessage==null&&rt(s,{shortMessage:n}),s}function Be(t,e,r,n){if(!t)throw yr(e,r,n)}function pe(t,e,r,n){Be(t,e,"INVALID_ARGUMENT",{argument:r,value:n})}function o2(t,e,r){r==null&&(r=""),r&&(r=": "+r),Be(t>=e,"missing arguemnt"+r,"MISSING_ARGUMENT",{count:t,expectedCount:e}),Be(t<=e,"too many arguments"+r,"UNEXPECTED_ARGUMENT",{count:t,expectedCount:e})}const MW=["NFD","NFC","NFKD","NFKC"].reduce((t,e)=>{try{if("test".normalize(e)!=="test")throw new Error("bad");if(e==="NFD"&&"é".normalize("NFD")!=="é")throw new Error("broken");t.push(e)}catch{}return t},[]);function a2(t){Be(MW.indexOf(t)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:t}})}function vo(t,e,r){if(r==null&&(r=""),t!==e){let n=r,s="new";r&&(n+=".",s+=" "+r),Be(!1,`private constructor; use ${n}from* methods`,"UNSUPPORTED_OPERATION",{operation:s})}}function f_(t,e,r){if(t instanceof Uint8Array)return r?new Uint8Array(t):t;if(typeof t=="string"&&t.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const n=new Uint8Array((t.length-2)/2);let s=2;for(let i=0;i<n.length;i++)n[i]=parseInt(t.substring(s,s+2),16),s+=2;return n}pe(!1,"invalid BytesLike value",e||"value",t)}function qe(t,e){return f_(t,e,!1)}function sn(t,e){return f_(t,e,!0)}function lr(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||typeof e=="number"&&t.length!==2+2*e||e===!0&&t.length%2!==0)}function Jh(t){return lr(t,!0)||t instanceof Uint8Array}const p_="0123456789abcdef";function Ze(t){const e=qe(t);let r="0x";for(let n=0;n<e.length;n++){const s=e[n];r+=p_[(s&240)>>4]+p_[s&15]}return r}function $t(t){return"0x"+t.map(e=>Ze(e).substring(2)).join("")}function oa(t){return lr(t,!0)?(t.length-2)/2:qe(t).length}function ur(t,e,r){const n=qe(t);return r!=null&&r>n.length&&Be(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:r}),Ze(n.slice(e??0,r??n.length))}function g_(t){let e=Ze(t).substring(2);for(;e.startsWith("00");)e=e.substring(2);return"0x"+e}function m_(t,e,r){const n=qe(t);Be(e>=n.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(n),length:e,offset:e+1});const s=new Uint8Array(e);return s.fill(0),r?s.set(n,e-n.length):s.set(n,0),Ze(s)}function Hs(t,e){return m_(t,e,!0)}function Dp(t,e){return m_(t,e,!1)}const c2=BigInt(0),Ti=BigInt(1),Qh=9007199254740991;function Yh(t,e){const r=Kh(t,"value"),n=BigInt(mt(e,"width"));if(Be(r>>n===c2,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:t}),r>>n-Ti){const s=(Ti<<n)-Ti;return-((~r&s)+Ti)}return r}function Wp(t,e){let r=ct(t,"value");const n=BigInt(mt(e,"width")),s=Ti<<n-Ti;if(r<c2){r=-r,Be(r<=s,"too low","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:t});const i=(Ti<<n)-Ti;return(~r&i)+Ti}else Be(r<s,"too high","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:t});return r}function aa(t,e){const r=Kh(t,"value"),n=BigInt(mt(e,"bits"));return r&(Ti<<n)-Ti}function ct(t,e){switch(typeof t){case"bigint":return t;case"number":return pe(Number.isInteger(t),"underflow",e||"value",t),pe(t>=-Qh&&t<=Qh,"overflow",e||"value",t),BigInt(t);case"string":try{if(t==="")throw new Error("empty string");return t[0]==="-"&&t[1]!=="-"?-BigInt(t.substring(1)):BigInt(t)}catch(r){pe(!1,`invalid BigNumberish string: ${r.message}`,e||"value",t)}}pe(!1,"invalid BigNumberish value",e||"value",t)}function Kh(t,e){const r=ct(t,e);return Be(r>=c2,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:t}),r}const y_="0123456789abcdef";function zl(t){if(t instanceof Uint8Array){let e="0x0";for(const r of t)e+=y_[r>>4],e+=y_[r&15];return BigInt(e)}return ct(t)}function mt(t,e){switch(typeof t){case"bigint":return pe(t>=-Qh&&t<=Qh,"overflow",e||"value",t),Number(t);case"number":return pe(Number.isInteger(t),"underflow",e||"value",t),pe(t>=-Qh&&t<=Qh,"overflow",e||"value",t),t;case"string":try{if(t==="")throw new Error("empty string");return mt(BigInt(t),e)}catch(r){pe(!1,`invalid numeric string: ${r.message}`,e||"value",t)}}pe(!1,"invalid numeric value",e||"value",t)}function jp(t){return mt(zl(t))}function Zs(t,e){let r=Kh(t,"value").toString(16);if(e==null)r.length%2&&(r="0"+r);else{const n=mt(e,"width");for(Be(n*2>=r.length,`value exceeds width (${n} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:t});r.length<n*2;)r="0"+r}return"0x"+r}function on(t){const e=Kh(t,"value");if(e===c2)return new Uint8Array([]);let r=e.toString(16);r.length%2&&(r="0"+r);const n=new Uint8Array(r.length/2);for(let s=0;s<n.length;s++){const i=s*2;n[s]=parseInt(r.substring(i,i+2),16)}return n}function ca(t){let e=Ze(Jh(t)?t:on(t)).substring(2);for(;e.startsWith("0");)e=e.substring(1);return e===""&&(e="0"),"0x"+e}const l2="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";let u2=null;function UW(t){if(u2==null){u2={};for(let r=0;r<l2.length;r++)u2[l2[r]]=BigInt(r)}const e=u2[t];return pe(e!=null,"invalid base58 value","letter",t),e}const LW=BigInt(0),D3=BigInt(58);function h2(t){const e=qe(t);let r=zl(e),n="";for(;r;)n=l2[Number(r%D3)]+n,r/=D3;for(let s=0;s<e.length&&!e[s];s++)n=l2[0]+n;return n}function W3(t){let e=LW;for(let r=0;r<t.length;r++)e*=D3,e+=UW(t[r]);return e}function j3(t){t=atob(t);const e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return qe(e)}function G3(t){const e=qe(t);let r="";for(let n=0;n<e.length;n++)r+=String.fromCharCode(e[n]);return btoa(r)}var Gp;class d2{constructor(e,r,n){X(this,"filter"),X(this,"emitter"),ne(this,Gp),V(this,Gp,r),rt(this,{emitter:e,filter:n})}async removeListener(){T(this,Gp)!=null&&await this.emitter.off(this.filter,T(this,Gp))}}Gp=new WeakMap;function FW(t,e,r,n,s){pe(!1,`invalid codepoint at offset ${e}; ${t}`,"bytes",r)}function v_(t,e,r,n,s){if(t==="BAD_PREFIX"||t==="UNEXPECTED_CONTINUE"){let i=0;for(let o=e+1;o<r.length&&r[o]>>6===2;o++)i++;return i}return t==="OVERRUN"?r.length-e-1:0}function VW(t,e,r,n,s){return t==="OVERLONG"?(pe(typeof s=="number","invalid bad code point for replacement","badCodepoint",s),n.push(s),0):(n.push(65533),v_(t,e,r))}const z3=Object.freeze({error:FW,ignore:v_,replace:VW});function b_(t,e){e==null&&(e=z3.error);const r=qe(t,"bytes"),n=[];let s=0;for(;s<r.length;){const i=r[s++];if(!(i>>7)){n.push(i);continue}let o=null,a=null;if((i&224)===192)o=1,a=127;else if((i&240)===224)o=2,a=2047;else if((i&248)===240)o=3,a=65535;else{(i&192)===128?s+=e("UNEXPECTED_CONTINUE",s-1,r,n):s+=e("BAD_PREFIX",s-1,r,n);continue}if(s-1+o>=r.length){s+=e("OVERRUN",s-1,r,n);continue}let c=i&(1<<8-o-1)-1;for(let l=0;l<o;l++){let u=r[s];if((u&192)!=128){s+=e("MISSING_CONTINUE",s,r,n),c=null;break}c=c<<6|u&63,s++}if(c!==null){if(c>1114111){s+=e("OUT_OF_RANGE",s-1-o,r,n,c);continue}if(c>=55296&&c<=57343){s+=e("UTF16_SURROGATE",s-1-o,r,n,c);continue}if(c<=a){s+=e("OVERLONG",s-1-o,r,n,c);continue}n.push(c)}}return n}function qr(t,e){pe(typeof t=="string","invalid string value","str",t),e!=null&&(a2(e),t=t.normalize(e));let r=[];for(let n=0;n<t.length;n++){const s=t.charCodeAt(n);if(s<128)r.push(s);else if(s<2048)r.push(s>>6|192),r.push(s&63|128);else if((s&64512)==55296){n++;const i=t.charCodeAt(n);pe(n<t.length&&(i&64512)===56320,"invalid surrogate pair","str",t);const o=65536+((s&1023)<<10)+(i&1023);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(o&63|128)}else r.push(s>>12|224),r.push(s>>6&63|128),r.push(s&63|128)}return new Uint8Array(r)}function DW(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function la(t,e){return DW(b_(t,e))}function w_(t,e){return b_(qr(t,e))}function k_(t){async function e(r,n){Be(n==null||!n.cancelled,"request cancelled before sending","CANCELLED");const s=r.url.split(":")[0].toLowerCase();Be(s==="http"||s==="https",`unsupported protocol ${s}`,"UNSUPPORTED_OPERATION",{info:{protocol:s},operation:"request"}),Be(s==="https"||!r.credentials||r.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let i=null;const o=new AbortController,a=setTimeout(()=>{i=yr("request timeout","TIMEOUT"),o.abort()},r.timeout);n&&n.addListener(()=>{i=yr("request cancelled","CANCELLED"),o.abort()});const c={method:r.method,headers:new Headers(Array.from(r)),body:r.body||void 0,signal:o.signal};let l;try{l=await fetch(r.url,c)}catch(p){throw clearTimeout(a),i||p}clearTimeout(a);const u={};l.headers.forEach((p,g)=>{u[g.toLowerCase()]=p});const d=await l.arrayBuffer(),h=d==null?null:new Uint8Array(d);return{statusCode:l.status,statusMessage:l.statusText,headers:u,body:h}}return e}const WW=12,jW=250;let E_=k_();const GW=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),zW=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let $3=!1;async function A_(t,e){try{const r=t.match(GW);if(!r)throw new Error("invalid data");return new bc(200,"OK",{"content-type":r[1]||"text/plain"},r[2]?j3(r[3]):ZW(r[3]))}catch{return new bc(599,"BAD REQUEST (invalid data: URI)",{},null,new Un(t))}}function __(t){async function e(r,n){try{const s=r.match(zW);if(!s)throw new Error("invalid link");return new Un(`${t}${s[2]}`)}catch{return new bc(599,"BAD REQUEST (invalid IPFS URI)",{},null,new Un(r))}}return e}const f2={data:A_,ipfs:__("https://gateway.ipfs.io/ipfs/")},T_=new WeakMap;var qh,$l;class H3{constructor(e){ne(this,qh),ne(this,$l),V(this,qh,[]),V(this,$l,!1),T_.set(e,()=>{if(!T(this,$l)){V(this,$l,!0);for(const r of T(this,qh))setTimeout(()=>{r()},0);V(this,qh,[])}})}addListener(e){Be(!T(this,$l),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),T(this,qh).push(e)}get cancelled(){return T(this,$l)}checkSignal(){Be(!this.cancelled,"cancelled","CANCELLED",{})}}qh=new WeakMap,$l=new WeakMap;function p2(t){if(t==null)throw new Error("missing signal; should not happen");return t.checkSignal(),t}var zp,$p,bo,yc,Hp,Zp,En,Js,vc,Xh,ed,td,ua,wo,Hl,rd,Jp;const $W=class VA{constructor(e){ne(this,rd),ne(this,zp),ne(this,$p),ne(this,bo),ne(this,yc),ne(this,Hp),ne(this,Zp),ne(this,En),ne(this,Js),ne(this,vc),ne(this,Xh),ne(this,ed),ne(this,td),ne(this,ua),ne(this,wo),ne(this,Hl),V(this,Zp,String(e)),V(this,zp,!1),V(this,$p,!0),V(this,bo,{}),V(this,yc,""),V(this,Hp,3e5),V(this,wo,{slotInterval:jW,maxAttempts:WW}),V(this,Hl,null)}get url(){return T(this,Zp)}set url(e){V(this,Zp,String(e))}get body(){return T(this,En)==null?null:new Uint8Array(T(this,En))}set body(e){if(e==null)V(this,En,void 0),V(this,Js,void 0);else if(typeof e=="string")V(this,En,qr(e)),V(this,Js,"text/plain");else if(e instanceof Uint8Array)V(this,En,e),V(this,Js,"application/octet-stream");else if(typeof e=="object")V(this,En,qr(JSON.stringify(e))),V(this,Js,"application/json");else throw new Error("invalid body")}hasBody(){return T(this,En)!=null}get method(){return T(this,yc)?T(this,yc):this.hasBody()?"POST":"GET"}set method(e){e==null&&(e=""),V(this,yc,String(e).toUpperCase())}get headers(){const e=Object.assign({},T(this,bo));return T(this,vc)&&(e.authorization=`Basic ${G3(qr(T(this,vc)))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),e["content-type"]==null&&T(this,Js)&&(e["content-type"]=T(this,Js)),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,r){T(this,bo)[String(e).toLowerCase()]=String(r)}clearHeaders(){V(this,bo,{})}[Symbol.iterator](){const e=this.headers,r=Object.keys(e);let n=0;return{next:()=>{if(n<r.length){const s=r[n++];return{value:[s,e[s]],done:!1}}return{value:void 0,done:!0}}}}get credentials(){return T(this,vc)||null}setCredentials(e,r){pe(!e.match(/:/),"invalid basic authentication username","username","[REDACTED]"),V(this,vc,`${e}:${r}`)}get allowGzip(){return T(this,$p)}set allowGzip(e){V(this,$p,!!e)}get allowInsecureAuthentication(){return!!T(this,zp)}set allowInsecureAuthentication(e){V(this,zp,!!e)}get timeout(){return T(this,Hp)}set timeout(e){pe(e>=0,"timeout must be non-zero","timeout",e),V(this,Hp,e)}get preflightFunc(){return T(this,Xh)||null}set preflightFunc(e){V(this,Xh,e)}get processFunc(){return T(this,ed)||null}set processFunc(e){V(this,ed,e)}get retryFunc(){return T(this,td)||null}set retryFunc(e){V(this,td,e)}get getUrlFunc(){return T(this,Hl)||E_}set getUrlFunc(e){V(this,Hl,e)}toString(){return`<FetchRequest method=${JSON.stringify(this.method)} url=${JSON.stringify(this.url)} headers=${JSON.stringify(this.headers)} body=${T(this,En)?Ze(T(this,En)):"null"}>`}setThrottleParams(e){e.slotInterval!=null&&(T(this,wo).slotInterval=e.slotInterval),e.maxAttempts!=null&&(T(this,wo).maxAttempts=e.maxAttempts)}send(){return Be(T(this,ua)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),V(this,ua,new H3(this)),ve(this,rd,Jp).call(this,0,C_()+this.timeout,0,this,new bc(0,"",{},null,this))}cancel(){Be(T(this,ua)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=T_.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const r=this.url.split(":")[0].toLowerCase(),n=e.split(":")[0].toLowerCase();Be(this.method==="GET"&&(r!=="https"||n!=="http")&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const s=new VA(e);return s.method="GET",s.allowGzip=this.allowGzip,s.timeout=this.timeout,V(s,bo,Object.assign({},T(this,bo))),T(this,En)&&V(s,En,new Uint8Array(T(this,En))),V(s,Js,T(this,Js)),s}clone(){const e=new VA(this.url);return V(e,yc,T(this,yc)),T(this,En)&&V(e,En,T(this,En)),V(e,Js,T(this,Js)),V(e,bo,Object.assign({},T(this,bo))),V(e,vc,T(this,vc)),this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),V(e,Xh,T(this,Xh)),V(e,ed,T(this,ed)),V(e,td,T(this,td)),V(e,wo,Object.assign({},T(this,wo))),V(e,Hl,T(this,Hl)),e}static lockConfig(){$3=!0}static getGateway(e){return f2[e.toLowerCase()]||null}static registerGateway(e,r){if(e=e.toLowerCase(),e==="http"||e==="https")throw new Error(`cannot intercept ${e}; use registerGetUrl`);if($3)throw new Error("gateways locked");f2[e]=r}static registerGetUrl(e){if($3)throw new Error("gateways locked");E_=e}static createGetUrlFunc(e){return k_()}static createDataGateway(){return A_}static createIpfsGatewayFunc(e){return __(e)}};zp=new WeakMap,$p=new WeakMap,bo=new WeakMap,yc=new WeakMap,Hp=new WeakMap,Zp=new WeakMap,En=new WeakMap,Js=new WeakMap,vc=new WeakMap,Xh=new WeakMap,ed=new WeakMap,td=new WeakMap,ua=new WeakMap,wo=new WeakMap,Hl=new WeakMap,rd=new WeakSet,Jp=async function(t,e,r,n,s){var i,o,a;if(t>=T(this,wo).maxAttempts)return s.makeServerError("exceeded maximum retry limit");Be(C_()<=e,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:n}),r>0&&await JW(r);let c=this.clone();const l=(c.url.split(":")[0]||"").toLowerCase();if(l in f2){const h=await f2[l](c.url,p2(T(n,ua)));if(h instanceof bc){let p=h;if(this.processFunc){p2(T(n,ua));try{p=await this.processFunc(c,p)}catch(g){(g.throttle==null||typeof g.stall!="number")&&p.makeServerError("error in post-processing function",g).assertOk()}}return p}c=h}this.preflightFunc&&(c=await this.preflightFunc(c));const u=await this.getUrlFunc(c,p2(T(n,ua)));let d=new bc(u.statusCode,u.statusMessage,u.headers,u.body,n);if(d.statusCode===301||d.statusCode===302){try{const h=d.headers.location||"";return ve(i=c.redirect(h),rd,Jp).call(i,t+1,e,0,n,d)}catch{}return d}else if(d.statusCode===429&&(this.retryFunc==null||await this.retryFunc(c,d,t))){const h=d.headers["retry-after"];let p=T(this,wo).slotInterval*Math.trunc(Math.random()*Math.pow(2,t));return typeof h=="string"&&h.match(/^[1-9][0-9]*$/)&&(p=parseInt(h)),ve(o=c.clone(),rd,Jp).call(o,t+1,e,p,n,d)}if(this.processFunc){p2(T(n,ua));try{d=await this.processFunc(c,d)}catch(h){(h.throttle==null||typeof h.stall!="number")&&d.makeServerError("error in post-processing function",h).assertOk();let p=T(this,wo).slotInterval*Math.trunc(Math.random()*Math.pow(2,t));return h.stall>=0&&(p=h.stall),ve(a=c.clone(),rd,Jp).call(a,t+1,e,p,n,d)}}return d};let Un=$W;var g2,m2,y2,Qs,Qp,nd;const HW=class DV{constructor(e,r,n,s,i){ne(this,g2),ne(this,m2),ne(this,y2),ne(this,Qs),ne(this,Qp),ne(this,nd),V(this,g2,e),V(this,m2,r),V(this,y2,Object.keys(n).reduce((o,a)=>(o[a.toLowerCase()]=String(n[a]),o),{})),V(this,Qs,s==null?null:new Uint8Array(s)),V(this,Qp,i||null),V(this,nd,{message:""})}toString(){return`<FetchResponse status=${this.statusCode} body=${T(this,Qs)?Ze(T(this,Qs)):"null"}>`}get statusCode(){return T(this,g2)}get statusMessage(){return T(this,m2)}get headers(){return Object.assign({},T(this,y2))}get body(){return T(this,Qs)==null?null:new Uint8Array(T(this,Qs))}get bodyText(){try{return T(this,Qs)==null?"":la(T(this,Qs))}catch{Be(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{Be(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,r=Object.keys(e);let n=0;return{next:()=>{if(n<r.length){const s=r[n++];return{value:[s,e[s]],done:!1}}return{value:void 0,done:!0}}}}makeServerError(e,r){let n;e?n=`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${e})`:(e=`${this.statusCode} ${this.statusMessage}`,n=`CLIENT ESCALATED SERVER ERROR (${e})`);const s=new DV(599,n,this.headers,this.body,T(this,Qp)||void 0);return V(s,nd,{message:e,error:r}),s}throwThrottleError(e,r){r==null?r=-1:pe(Number.isInteger(r)&&r>=0,"invalid stall timeout","stall",r);const n=new Error(e||"throttling requests");throw rt(n,{stall:r,throttle:!0}),n}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return T(this,Qs)!=null}get request(){return T(this,Qp)}ok(){return T(this,nd).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:r}=T(this,nd);e===""&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let n=null;this.request&&(n=this.request.url);let s=null;try{T(this,Qs)&&(s=la(T(this,Qs)))}catch{}Be(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:r,info:{requestUrl:n,responseBody:s,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}};g2=new WeakMap,m2=new WeakMap,y2=new WeakMap,Qs=new WeakMap,Qp=new WeakMap,nd=new WeakMap;let bc=HW;function C_(){return new Date().getTime()}function ZW(t){return qr(t.replace(/%([0-9a-f][0-9a-f])/gi,(e,r)=>String.fromCharCode(parseInt(r,16))))}function JW(t){return new Promise(e=>setTimeout(e,t))}const QW=BigInt(-1),Ci=BigInt(0),sd=BigInt(1),YW=BigInt(5),id={};let od="0000";for(;od.length<80;)od+=od;function Zl(t){let e=od;for(;e.length<t;)e+=e;return BigInt("1"+e.substring(0,t))}function Yp(t,e,r){const n=BigInt(e.width);if(e.signed){const s=sd<<n-sd;Be(r==null||t>=-s&&t<s,"overflow","NUMERIC_FAULT",{operation:r,fault:"overflow",value:t}),t>Ci?t=Yh(aa(t,n),n):t=-Yh(aa(-t,n),n)}else{const s=sd<<n;Be(r==null||t>=0&&t<s,"overflow","NUMERIC_FAULT",{operation:r,fault:"overflow",value:t}),t=(t%s+s)%s&s-sd}return t}function Z3(t){typeof t=="number"&&(t=`fixed128x${t}`);let e=!0,r=128,n=18;if(typeof t=="string"){if(t!=="fixed")if(t==="ufixed")e=!1;else{const i=t.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);pe(i,"invalid fixed format","format",t),e=i[1]!=="u",r=parseInt(i[2]),n=parseInt(i[3])}}else if(t){const i=t,o=(a,c,l)=>i[a]==null?l:(pe(typeof i[a]===c,"invalid fixed format ("+a+" not "+c+")","format."+a,i[a]),i[a]);e=o("signed","boolean",e),r=o("width","number",r),n=o("decimals","number",n)}pe(r%8===0,"invalid FixedNumber width (not byte aligned)","format.width",r),pe(n<=80,"invalid FixedNumber decimals (too large)","format.decimals",n);const s=(e?"":"u")+"fixed"+String(r)+"x"+String(n);return{signed:e,width:r,decimals:n,name:s}}function KW(t,e){let r="";t<Ci&&(r="-",t*=QW);let n=t.toString();if(e===0)return r+n;for(;n.length<=e;)n=od+n;const s=n.length-e;for(n=n.substring(0,s)+"."+n.substring(s);n[0]==="0"&&n[1]!==".";)n=n.substring(1);for(;n[n.length-1]==="0"&&n[n.length-2]!==".";)n=n.substring(0,n.length-1);return r+n}var ko,fr,hs,Nr,Jl,ha,J3,Q3,Y3,K3;const S_=class bp{constructor(e,r,n){ne(this,Nr),X(this,"format"),ne(this,ko),ne(this,fr),ne(this,hs),X(this,"_value"),vo(e,id,"FixedNumber"),V(this,fr,r),V(this,ko,n);const s=KW(r,n.decimals);rt(this,{format:n.name,_value:s}),V(this,hs,Zl(n.decimals))}get signed(){return T(this,ko).signed}get width(){return T(this,ko).width}get decimals(){return T(this,ko).decimals}get value(){return T(this,fr)}addUnsafe(e){return ve(this,Nr,J3).call(this,e)}add(e){return ve(this,Nr,J3).call(this,e,"add")}subUnsafe(e){return ve(this,Nr,Q3).call(this,e)}sub(e){return ve(this,Nr,Q3).call(this,e,"sub")}mulUnsafe(e){return ve(this,Nr,Y3).call(this,e)}mul(e){return ve(this,Nr,Y3).call(this,e,"mul")}mulSignal(e){ve(this,Nr,Jl).call(this,e);const r=T(this,fr)*T(e,fr);return Be(r%T(this,hs)===Ci,"precision lost during signalling mul","NUMERIC_FAULT",{operation:"mulSignal",fault:"underflow",value:this}),ve(this,Nr,ha).call(this,r/T(this,hs),"mulSignal")}divUnsafe(e){return ve(this,Nr,K3).call(this,e)}div(e){return ve(this,Nr,K3).call(this,e,"div")}divSignal(e){Be(T(e,fr)!==Ci,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),ve(this,Nr,Jl).call(this,e);const r=T(this,fr)*T(this,hs);return Be(r%T(e,fr)===Ci,"precision lost during signalling div","NUMERIC_FAULT",{operation:"divSignal",fault:"underflow",value:this}),ve(this,Nr,ha).call(this,r/T(e,fr),"divSignal")}cmp(e){let r=this.value,n=e.value;const s=this.decimals-e.decimals;return s>0?n*=Zl(s):s<0&&(r*=Zl(-s)),r<n?-1:r>n?1:0}eq(e){return this.cmp(e)===0}lt(e){return this.cmp(e)<0}lte(e){return this.cmp(e)<=0}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=T(this,fr);return T(this,fr)<Ci&&(e-=T(this,hs)-sd),e=T(this,fr)/T(this,hs)*T(this,hs),ve(this,Nr,ha).call(this,e,"floor")}ceiling(){let e=T(this,fr);return T(this,fr)>Ci&&(e+=T(this,hs)-sd),e=T(this,fr)/T(this,hs)*T(this,hs),ve(this,Nr,ha).call(this,e,"ceiling")}round(e){if(e==null&&(e=0),e>=this.decimals)return this;const r=this.decimals-e,n=YW*Zl(r-1);let s=this.value+n;const i=Zl(r);return s=s/i*i,Yp(s,T(this,ko),"round"),new bp(id,s,T(this,ko))}isZero(){return T(this,fr)===Ci}isNegative(){return T(this,fr)<Ci}toString(){return this._value}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return bp.fromString(this.toString(),e)}static fromValue(e,r,n){const s=r==null?0:mt(r),i=Z3(n);let o=ct(e,"value");const a=s-i.decimals;if(a>0){const c=Zl(a);Be(o%c===Ci,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),o/=c}else a<0&&(o*=Zl(-a));return Yp(o,i,"fromValue"),new bp(id,o,i)}static fromString(e,r){const n=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);pe(n&&n[2].length+n[3].length>0,"invalid FixedNumber string value","value",e);const s=Z3(r);let i=n[2]||"0",o=n[3]||"";for(;o.length<s.decimals;)o+=od;Be(o.substring(s.decimals).match(/^0*$/),"too many decimals for format","NUMERIC_FAULT",{operation:"fromString",fault:"underflow",value:e}),o=o.substring(0,s.decimals);const a=BigInt(n[1]+i+o);return Yp(a,s,"fromString"),new bp(id,a,s)}static fromBytes(e,r){let n=zl(qe(e,"value"));const s=Z3(r);return s.signed&&(n=Yh(n,s.width)),Yp(n,s,"fromBytes"),new bp(id,n,s)}};ko=new WeakMap,fr=new WeakMap,hs=new WeakMap,Nr=new WeakSet,Jl=function(t){pe(this.format===t.format,"incompatible format; use fixedNumber.toFormat","other",t)},ha=function(t,e){return t=Yp(t,T(this,ko),e),new S_(id,t,T(this,ko))},J3=function(t,e){return ve(this,Nr,Jl).call(this,t),ve(this,Nr,ha).call(this,T(this,fr)+T(t,fr),e)},Q3=function(t,e){return ve(this,Nr,Jl).call(this,t),ve(this,Nr,ha).call(this,T(this,fr)-T(t,fr),e)},Y3=function(t,e){return ve(this,Nr,Jl).call(this,t),ve(this,Nr,ha).call(this,T(this,fr)*T(t,fr)/T(this,hs),e)},K3=function(t,e){return Be(T(t,fr)!==Ci,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),ve(this,Nr,Jl).call(this,t),ve(this,Nr,ha).call(this,T(this,fr)*T(this,hs)/T(t,fr),e)};let v2=S_;function qW(t){let e=t.toString(16);for(;e.length<2;)e="0"+e;return"0x"+e}function R_(t,e,r){let n=0;for(let s=0;s<r;s++)n=n*256+t[e+s];return n}function P_(t,e,r,n){const s=[];for(;r<e+1+n;){const i=N_(t,r);s.push(i.result),r+=i.consumed,Be(r<=e+1+n,"child data too short","BUFFER_OVERRUN",{buffer:t,length:n,offset:e})}return{consumed:1+n,result:s}}function N_(t,e){Be(t.length!==0,"data too short","BUFFER_OVERRUN",{buffer:t,length:0,offset:1});const r=n=>{Be(n<=t.length,"data short segment too short","BUFFER_OVERRUN",{buffer:t,length:t.length,offset:n})};if(t[e]>=248){const n=t[e]-247;r(e+1+n);const s=R_(t,e+1,n);return r(e+1+n+s),P_(t,e,e+1+n,n+s)}else if(t[e]>=192){const n=t[e]-192;return r(e+1+n),P_(t,e,e+1,n)}else if(t[e]>=184){const n=t[e]-183;r(e+1+n);const s=R_(t,e+1,n);r(e+1+n+s);const i=Ze(t.slice(e+1+n,e+1+n+s));return{consumed:1+n+s,result:i}}else if(t[e]>=128){const n=t[e]-128;r(e+1+n);const s=Ze(t.slice(e+1,e+1+n));return{consumed:1+n,result:s}}return{consumed:1,result:qW(t[e])}}function ad(t){const e=qe(t,"data"),r=N_(e,0);return pe(r.consumed===e.length,"unexpected junk after rlp payload","data",t),r.result}function x_(t){const e=[];for(;t;)e.unshift(t&255),t>>=8;return e}function I_(t){if(Array.isArray(t)){let n=[];if(t.forEach(function(i){n=n.concat(I_(i))}),n.length<=55)return n.unshift(192+n.length),n;const s=x_(n.length);return s.unshift(247+s.length),s.concat(n)}const e=Array.prototype.slice.call(qe(t,"object"));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const r=x_(e.length);return r.unshift(183+r.length),r.concat(e)}const O_="0123456789abcdef";function da(t){let e="0x";for(const r of I_(t))e+=O_[r>>4],e+=O_[r&15];return e}const B_=["wei","kwei","mwei","gwei","szabo","finney","ether"];function q3(t,e){let r=18;if(typeof e=="string"){const n=B_.indexOf(e);pe(n>=0,"invalid unit","unit",e),r=3*n}else e!=null&&(r=mt(e,"unit"));return v2.fromValue(t,r,{decimals:r,width:512}).toString()}function X3(t,e){pe(typeof t=="string","value must be a string","value",t);let r=18;if(typeof e=="string"){const n=B_.indexOf(e);pe(n>=0,"invalid unit","unit",e),r=3*n}else e!=null&&(r=mt(e,"unit"));return v2.fromString(t,{decimals:r,width:512}).value}function M_(t){return q3(t,18)}function U_(t){return X3(t,18)}function e4(t){const e=qe(t,"randomBytes");e[6]=e[6]&15|64,e[8]=e[8]&63|128;const r=Ze(e);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}const Kn=32,t4=new Uint8Array(Kn),XW=["then"],b2={},L_=new WeakMap;function Ql(t){return L_.get(t)}function F_(t,e){L_.set(t,e)}function Kp(t,e){const r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);throw r.error=e,r}function r4(t,e,r){return t.indexOf(null)>=0?e.map((n,s)=>n instanceof cd?r4(Ql(n),n,r):n):t.reduce((n,s,i)=>{let o=e.getValue(s);return s in n||(r&&o instanceof cd&&(o=r4(Ql(o),o,r)),n[s]=o),n},{})}var qp;const ej=class O1 extends Array{constructor(...e){const r=e[0];let n=e[1],s=(e[2]||[]).slice(),i=!0;r!==b2&&(n=e,s=[],i=!1),super(n.length),ne(this,qp),n.forEach((c,l)=>{this[l]=c});const o=s.reduce((c,l)=>(typeof l=="string"&&c.set(l,(c.get(l)||0)+1),c),new Map);if(F_(this,Object.freeze(n.map((c,l)=>{const u=s[l];return u!=null&&o.get(u)===1?u:null}))),V(this,qp,[]),T(this,qp)==null&&T(this,qp),!i)return;Object.freeze(this);const a=new Proxy(this,{get:(c,l,u)=>{if(typeof l=="string"){if(l.match(/^[0-9]+$/)){const h=mt(l,"%index");if(h<0||h>=this.length)throw new RangeError("out of result range");const p=c[h];return p instanceof Error&&Kp(`index ${h}`,p),p}if(XW.indexOf(l)>=0)return Reflect.get(c,l,u);const d=c[l];if(d instanceof Function)return function(...h){return d.apply(this===u?c:this,h)};if(!(l in c))return c.getValue.apply(this===u?c:this,[l])}return Reflect.get(c,l,u)}});return F_(a,Ql(this)),a}toArray(e){const r=[];return this.forEach((n,s)=>{n instanceof Error&&Kp(`index ${s}`,n),e&&n instanceof O1&&(n=n.toArray(e)),r.push(n)}),r}toObject(e){const r=Ql(this);return r.reduce((n,s,i)=>(Be(s!=null,`value at index ${i} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),r4(r,this,e)),{})}slice(e,r){e==null&&(e=0),e<0&&(e+=this.length,e<0&&(e=0)),r==null&&(r=this.length),r<0&&(r+=this.length,r<0&&(r=0)),r>this.length&&(r=this.length);const n=Ql(this),s=[],i=[];for(let o=e;o<r;o++)s.push(this[o]),i.push(n[o]);return new O1(b2,s,i)}filter(e,r){const n=Ql(this),s=[],i=[];for(let o=0;o<this.length;o++){const a=this[o];a instanceof Error&&Kp(`index ${o}`,a),e.call(r,a,o,this)&&(s.push(a),i.push(n[o]))}return new O1(b2,s,i)}map(e,r){const n=[];for(let s=0;s<this.length;s++){const i=this[s];i instanceof Error&&Kp(`index ${s}`,i),n.push(e.call(r,i,s,this))}return n}getValue(e){const r=Ql(this).indexOf(e);if(r===-1)return;const n=this[r];return n instanceof Error&&Kp(`property ${JSON.stringify(e)}`,n.error),n}static fromItems(e,r){return new O1(b2,e,r)}};qp=new WeakMap;let cd=ej;function V_(t){const e=[],r=function(n,s){if(Array.isArray(s))for(let i in s){const o=n.slice();o.push(i);try{r(o,s[i])}catch(a){e.push({path:o,error:a})}}};return r([],t),e}function D_(t){let e=on(t);return Be(e.length<=Kn,"value out-of-bounds","BUFFER_OVERRUN",{buffer:e,length:Kn,offset:e.length}),e.length!==Kn&&(e=sn($t([t4.slice(e.length%Kn),e]))),e}class fa{constructor(e,r,n,s){X(this,"name"),X(this,"type"),X(this,"localName"),X(this,"dynamic"),rt(this,{name:e,type:r,localName:n,dynamic:s},{name:"string",type:"string",localName:"string",dynamic:"boolean"})}_throwError(e,r){pe(!1,e,this.localName,r)}}var wc,kc,Xp,w2;class n4{constructor(){ne(this,Xp),ne(this,wc),ne(this,kc),V(this,wc,[]),V(this,kc,0)}get data(){return $t(T(this,wc))}get length(){return T(this,kc)}appendWriter(e){return ve(this,Xp,w2).call(this,sn(e.data))}writeBytes(e){let r=sn(e);const n=r.length%Kn;return n&&(r=sn($t([r,t4.slice(n)]))),ve(this,Xp,w2).call(this,r)}writeValue(e){return ve(this,Xp,w2).call(this,D_(e))}writeUpdatableValue(){const e=T(this,wc).length;return T(this,wc).push(t4),V(this,kc,T(this,kc)+Kn),r=>{T(this,wc)[e]=D_(r)}}}wc=new WeakMap,kc=new WeakMap,Xp=new WeakSet,w2=function(t){return T(this,wc).push(t),V(this,kc,T(this,kc)+t.length),t.length};var As,_s,Yl,ld,Kl,e0,s4,W_;const tj=class WV{constructor(e,r,n){ne(this,e0),X(this,"allowLoose"),ne(this,As),ne(this,_s),ne(this,Yl),ne(this,ld),ne(this,Kl),rt(this,{allowLoose:!!r}),V(this,As,sn(e)),V(this,Yl,0),V(this,ld,null),V(this,Kl,n??1024),V(this,_s,0)}get data(){return Ze(T(this,As))}get dataLength(){return T(this,As).length}get consumed(){return T(this,_s)}get bytes(){return new Uint8Array(T(this,As))}subReader(e){const r=new WV(T(this,As).slice(T(this,_s)+e),this.allowLoose,T(this,Kl));return V(r,ld,this),r}readBytes(e,r){let n=ve(this,e0,W_).call(this,0,e,!!r);return ve(this,e0,s4).call(this,e),V(this,_s,T(this,_s)+n.length),n.slice(0,e)}readValue(){return zl(this.readBytes(Kn))}readIndex(){return jp(this.readBytes(Kn))}};As=new WeakMap,_s=new WeakMap,Yl=new WeakMap,ld=new WeakMap,Kl=new WeakMap,e0=new WeakSet,s4=function(t){var e;if(T(this,ld))return ve(e=T(this,ld),e0,s4).call(e,t);V(this,Yl,T(this,Yl)+t),Be(T(this,Kl)<1||T(this,Yl)<=T(this,Kl)*this.dataLength,`compressed ABI data exceeds inflation ratio of ${T(this,Kl)} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:sn(T(this,As)),offset:T(this,_s),length:t,info:{bytesRead:T(this,Yl),dataLength:this.dataLength}})},W_=function(t,e,r){let n=Math.ceil(e/Kn)*Kn;return T(this,_s)+n>T(this,As).length&&(this.allowLoose&&r&&T(this,_s)+e<=T(this,As).length?n=e:Be(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:sn(T(this,As)),length:T(this,As).length,offset:T(this,_s)+n})),T(this,As).slice(T(this,_s),T(this,_s)+n)};let rj=tj;function Ts(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`Wrong positive integer: ${t}`)}function i4(t,...e){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function j_(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Ts(t.outputLen),Ts(t.blockLen)}function ud(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function G_(t,e){i4(t);const r=e.outputLen;if(t.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}const o4=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const z_=t=>t instanceof Uint8Array,k2=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),t0=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),Eo=(t,e)=>t<<32-e|t>>>e;if(!(new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68))throw new Error("Non little-endian hardware is not supported");const nj=async()=>{};async function a4(t,e,r){let n=Date.now();for(let s=0;s<t;s++){r(s);const i=Date.now()-n;i>=0&&i<e||(await nj(),n+=i)}}function sj(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function ql(t){if(typeof t=="string"&&(t=sj(t)),!z_(t))throw new Error(`expected Uint8Array, got ${typeof t}`);return t}function ij(...t){const e=new Uint8Array(t.reduce((n,s)=>n+s.length,0));let r=0;return t.forEach(n=>{if(!z_(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}class c4{clone(){return this._cloneInto()}}const oj={}.toString;function $_(t,e){if(e!==void 0&&oj.call(e)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(t,e)}function Ec(t){const e=n=>t().update(ql(n)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}function aj(t){const e=(n,s)=>t(s).update(ql(n)).digest(),r=t({});return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=n=>t(n),e}function H_(t=32){if(o4&&typeof o4.getRandomValues=="function")return o4.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}class l4 extends c4{constructor(e,r){super(),this.finished=!1,this.destroyed=!1,j_(e);const n=ql(r);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,i=new Uint8Array(s);i.set(n.length>s?e.create().update(n).digest():n);for(let o=0;o<i.length;o++)i[o]^=54;this.iHash.update(i),this.oHash=e.create();for(let o=0;o<i.length;o++)i[o]^=106;this.oHash.update(i),i.fill(0)}update(e){return ud(this),this.iHash.update(e),this}digestInto(e){ud(this),i4(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:r,iHash:n,finished:s,destroyed:i,blockLen:o,outputLen:a}=this;return e=e,e.finished=s,e.destroyed=i,e.blockLen=o,e.outputLen=a,e.oHash=r._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const r0=(t,e,r)=>new l4(t,e).update(r).digest();r0.create=(t,e)=>new l4(t,e);const cj=Object.freeze(Object.defineProperty({__proto__:null,HMAC:l4,hmac:r0},Symbol.toStringTag,{value:"Module"}));function Z_(t,e,r,n){j_(t);const s=$_({dkLen:32,asyncTick:10},n),{c:i,dkLen:o,asyncTick:a}=s;if(Ts(i),Ts(o),Ts(a),i<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const c=ql(e),l=ql(r),u=new Uint8Array(o),d=r0.create(t,c),h=d._cloneInto().update(l);return{c:i,dkLen:o,asyncTick:a,DK:u,PRF:d,PRFSalt:h}}function J_(t,e,r,n,s){return t.destroy(),e.destroy(),n&&n.destroy(),s.fill(0),r}function E2(t,e,r,n){const{c:s,dkLen:i,DK:o,PRF:a,PRFSalt:c}=Z_(t,e,r,n);let l;const u=new Uint8Array(4),d=t0(u),h=new Uint8Array(a.outputLen);for(let p=1,g=0;g<i;p++,g+=a.outputLen){const m=o.subarray(g,g+a.outputLen);d.setInt32(0,p,!1),(l=c._cloneInto(l)).update(u).digestInto(h),m.set(h.subarray(0,m.length));for(let y=1;y<s;y++){a._cloneInto(l).update(h).digestInto(h);for(let v=0;v<m.length;v++)m[v]^=h[v]}}return J_(a,c,o,l,h)}async function lj(t,e,r,n){const{c:s,dkLen:i,asyncTick:o,DK:a,PRF:c,PRFSalt:l}=Z_(t,e,r,n);let u;const d=new Uint8Array(4),h=t0(d),p=new Uint8Array(c.outputLen);for(let g=1,m=0;m<i;g++,m+=c.outputLen){const y=a.subarray(m,m+c.outputLen);h.setInt32(0,g,!1),(u=l._cloneInto(u)).update(d).digestInto(p),y.set(p.subarray(0,y.length)),await a4(s-1,o,()=>{c._cloneInto(u).update(p).digestInto(p);for(let v=0;v<y.length;v++)y[v]^=p[v]})}return J_(c,l,a,u,p)}const uj=Object.freeze(Object.defineProperty({__proto__:null,pbkdf2:E2,pbkdf2Async:lj},Symbol.toStringTag,{value:"Module"}));function hj(t,e,r,n){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,r,n);const s=BigInt(32),i=BigInt(4294967295),o=Number(r>>s&i),a=Number(r&i),c=n?4:0,l=n?0:4;t.setUint32(e+c,o,n),t.setUint32(e+l,a,n)}class u4 extends c4{constructor(e,r,n,s){super(),this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=t0(this.buffer)}update(e){ud(this);const{view:r,buffer:n,blockLen:s}=this;e=ql(e);const i=e.length;for(let o=0;o<i;){const a=Math.min(s-this.pos,i-o);if(a===s){const c=t0(e);for(;s<=i-o;o+=s)this.process(c,o);continue}n.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===s&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){ud(this),G_(e,this),this.finished=!0;const{buffer:r,view:n,blockLen:s,isLE:i}=this;let{pos:o}=this;r[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>s-o&&(this.process(n,0),o=0);for(let d=o;d<s;d++)r[d]=0;hj(n,s-8,BigInt(this.length*8),i),this.process(n,0);const a=t0(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,u=this.get();if(l>u.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<l;d++)a.setUint32(4*d,u[d],i)}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:r,buffer:n,length:s,finished:i,destroyed:o,pos:a}=this;return e.length=s,e.pos=a,e.finished=i,e.destroyed=o,s%r&&e.buffer.set(n),e}}const dj=(t,e,r)=>t&e^~t&r,fj=(t,e,r)=>t&e^t&r^e&r,pj=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ac=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),_c=new Uint32Array(64);class Q_ extends u4{constructor(){super(64,32,8,!1),this.A=Ac[0]|0,this.B=Ac[1]|0,this.C=Ac[2]|0,this.D=Ac[3]|0,this.E=Ac[4]|0,this.F=Ac[5]|0,this.G=Ac[6]|0,this.H=Ac[7]|0}get(){const{A:e,B:r,C:n,D:s,E:i,F:o,G:a,H:c}=this;return[e,r,n,s,i,o,a,c]}set(e,r,n,s,i,o,a,c){this.A=e|0,this.B=r|0,this.C=n|0,this.D=s|0,this.E=i|0,this.F=o|0,this.G=a|0,this.H=c|0}process(e,r){for(let d=0;d<16;d++,r+=4)_c[d]=e.getUint32(r,!1);for(let d=16;d<64;d++){const h=_c[d-15],p=_c[d-2],g=Eo(h,7)^Eo(h,18)^h>>>3,m=Eo(p,17)^Eo(p,19)^p>>>10;_c[d]=m+_c[d-7]+g+_c[d-16]|0}let{A:n,B:s,C:i,D:o,E:a,F:c,G:l,H:u}=this;for(let d=0;d<64;d++){const h=Eo(a,6)^Eo(a,11)^Eo(a,25),p=u+h+dj(a,c,l)+pj[d]+_c[d]|0,g=(Eo(n,2)^Eo(n,13)^Eo(n,22))+fj(n,s,i)|0;u=l,l=c,c=a,a=o+p|0,o=i,i=s,s=n,n=p+g|0}n=n+this.A|0,s=s+this.B|0,i=i+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(n,s,i,o,a,c,l,u)}roundClean(){_c.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class gj extends Q_{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}const Ao=Ec(()=>new Q_),mj=Ec(()=>new gj),yj=Object.freeze(Object.defineProperty({__proto__:null,sha224:mj,sha256:Ao},Symbol.toStringTag,{value:"Module"})),A2=BigInt(2**32-1),h4=BigInt(32);function Y_(t,e=!1){return e?{h:Number(t&A2),l:Number(t>>h4&A2)}:{h:Number(t>>h4&A2)|0,l:Number(t&A2)|0}}function K_(t,e=!1){let r=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let s=0;s<t.length;s++){const{h:i,l:o}=Y_(t[s],e);[r[s],n[s]]=[i,o]}return[r,n]}const vj=(t,e)=>BigInt(t>>>0)<<h4|BigInt(e>>>0),bj=(t,e,r)=>t>>>r,wj=(t,e,r)=>t<<32-r|e>>>r,kj=(t,e,r)=>t>>>r|e<<32-r,Ej=(t,e,r)=>t<<32-r|e>>>r,Aj=(t,e,r)=>t<<64-r|e>>>r-32,_j=(t,e,r)=>t>>>r-32|e<<64-r,Tj=(t,e)=>e,Cj=(t,e)=>t,q_=(t,e,r)=>t<<r|e>>>32-r,X_=(t,e,r)=>e<<r|t>>>32-r,e7=(t,e,r)=>e<<r-32|t>>>64-r,t7=(t,e,r)=>t<<r-32|e>>>64-r;function Sj(t,e,r,n){const s=(e>>>0)+(n>>>0);return{h:t+r+(s/2**32|0)|0,l:s|0}}const Rj=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),Pj=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,Nj=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),xj=(t,e,r,n,s)=>e+r+n+s+(t/2**32|0)|0,Ij=(t,e,r,n,s)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(s>>>0),Oj=(t,e,r,n,s,i)=>e+r+n+s+i+(t/2**32|0)|0,Nt={fromBig:Y_,split:K_,toBig:vj,shrSH:bj,shrSL:wj,rotrSH:kj,rotrSL:Ej,rotrBH:Aj,rotrBL:_j,rotr32H:Tj,rotr32L:Cj,rotlSH:q_,rotlSL:X_,rotlBH:e7,rotlBL:t7,add:Sj,add3L:Rj,add3H:Pj,add4L:Nj,add4H:xj,add5H:Oj,add5L:Ij},[Bj,Mj]=Nt.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),Tc=new Uint32Array(80),Cc=new Uint32Array(80);class n0 extends u4{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:r,Bh:n,Bl:s,Ch:i,Cl:o,Dh:a,Dl:c,Eh:l,El:u,Fh:d,Fl:h,Gh:p,Gl:g,Hh:m,Hl:y}=this;return[e,r,n,s,i,o,a,c,l,u,d,h,p,g,m,y]}set(e,r,n,s,i,o,a,c,l,u,d,h,p,g,m,y){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=s|0,this.Ch=i|0,this.Cl=o|0,this.Dh=a|0,this.Dl=c|0,this.Eh=l|0,this.El=u|0,this.Fh=d|0,this.Fl=h|0,this.Gh=p|0,this.Gl=g|0,this.Hh=m|0,this.Hl=y|0}process(e,r){for(let E=0;E<16;E++,r+=4)Tc[E]=e.getUint32(r),Cc[E]=e.getUint32(r+=4);for(let E=16;E<80;E++){const w=Tc[E-15]|0,C=Cc[E-15]|0,B=Nt.rotrSH(w,C,1)^Nt.rotrSH(w,C,8)^Nt.shrSH(w,C,7),L=Nt.rotrSL(w,C,1)^Nt.rotrSL(w,C,8)^Nt.shrSL(w,C,7),I=Tc[E-2]|0,M=Cc[E-2]|0,W=Nt.rotrSH(I,M,19)^Nt.rotrBH(I,M,61)^Nt.shrSH(I,M,6),U=Nt.rotrSL(I,M,19)^Nt.rotrBL(I,M,61)^Nt.shrSL(I,M,6),x=Nt.add4L(L,U,Cc[E-7],Cc[E-16]),P=Nt.add4H(x,B,W,Tc[E-7],Tc[E-16]);Tc[E]=P|0,Cc[E]=x|0}let{Ah:n,Al:s,Bh:i,Bl:o,Ch:a,Cl:c,Dh:l,Dl:u,Eh:d,El:h,Fh:p,Fl:g,Gh:m,Gl:y,Hh:v,Hl:A}=this;for(let E=0;E<80;E++){const w=Nt.rotrSH(d,h,14)^Nt.rotrSH(d,h,18)^Nt.rotrBH(d,h,41),C=Nt.rotrSL(d,h,14)^Nt.rotrSL(d,h,18)^Nt.rotrBL(d,h,41),B=d&p^~d&m,L=h&g^~h&y,I=Nt.add5L(A,C,L,Mj[E],Cc[E]),M=Nt.add5H(I,v,w,B,Bj[E],Tc[E]),W=I|0,U=Nt.rotrSH(n,s,28)^Nt.rotrBH(n,s,34)^Nt.rotrBH(n,s,39),x=Nt.rotrSL(n,s,28)^Nt.rotrBL(n,s,34)^Nt.rotrBL(n,s,39),P=n&i^n&a^i&a,F=s&o^s&c^o&c;v=m|0,A=y|0,m=p|0,y=g|0,p=d|0,g=h|0,{h:d,l:h}=Nt.add(l|0,u|0,M|0,W|0),l=a|0,u=c|0,a=i|0,c=o|0,i=n|0,o=s|0;const O=Nt.add3L(W,x,F);n=Nt.add3H(O,M,U,P),s=O|0}({h:n,l:s}=Nt.add(this.Ah|0,this.Al|0,n|0,s|0)),{h:i,l:o}=Nt.add(this.Bh|0,this.Bl|0,i|0,o|0),{h:a,l:c}=Nt.add(this.Ch|0,this.Cl|0,a|0,c|0),{h:l,l:u}=Nt.add(this.Dh|0,this.Dl|0,l|0,u|0),{h:d,l:h}=Nt.add(this.Eh|0,this.El|0,d|0,h|0),{h:p,l:g}=Nt.add(this.Fh|0,this.Fl|0,p|0,g|0),{h:m,l:y}=Nt.add(this.Gh|0,this.Gl|0,m|0,y|0),{h:v,l:A}=Nt.add(this.Hh|0,this.Hl|0,v|0,A|0),this.set(n,s,i,o,a,c,l,u,d,h,p,g,m,y,v,A)}roundClean(){Tc.fill(0),Cc.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class Uj extends n0{constructor(){super(),this.Ah=-1942145080,this.Al=424955298,this.Bh=1944164710,this.Bl=-1982016298,this.Ch=502970286,this.Cl=855612546,this.Dh=1738396948,this.Dl=1479516111,this.Eh=258812777,this.El=2077511080,this.Fh=2011393907,this.Fl=79989058,this.Gh=1067287976,this.Gl=1780299464,this.Hh=286451373,this.Hl=-1848208735,this.outputLen=28}}class Lj extends n0{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}class Fj extends n0{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}const _2=Ec(()=>new n0),Vj=Ec(()=>new Uj),Dj=Ec(()=>new Lj),Wj=Ec(()=>new Fj),jj=Object.freeze(Object.defineProperty({__proto__:null,SHA512:n0,sha384:Wj,sha512:_2,sha512_224:Vj,sha512_256:Dj},Symbol.toStringTag,{value:"Module"}));function Gj(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof globalThis<"u")return globalThis;throw new Error("unable to locate global object")}const r7=Gj(),n7=r7.crypto||r7.msCrypto;function s7(t){switch(t){case"sha256":return Ao.create();case"sha512":return _2.create()}pe(!1,"invalid hashing algorithm name","algorithm",t)}function zj(t,e){const r={sha256:Ao,sha512:_2}[t];return pe(r!=null,"invalid hmac algorithm","algorithm",t),r0.create(r,e)}function $j(t,e,r,n,s){const i={sha256:Ao,sha512:_2}[s];return pe(i!=null,"invalid pbkdf2 algorithm","algorithm",s),E2(i,t,e,{c:r,dkLen:n})}function Hj(t){Be(n7!=null,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),pe(Number.isInteger(t)&&t>0&&t<=1024,"invalid length","length",t);const e=new Uint8Array(t);return n7.getRandomValues(e),e}let i7=!1;const o7=function(t,e,r){return zj(t,e).update(r).digest()};let a7=o7;function pa(t,e,r){const n=qe(e,"key"),s=qe(r,"data");return Ze(a7(t,n,s))}pa._=o7,pa.lock=function(){i7=!0},pa.register=function(t){if(i7)throw new Error("computeHmac is locked");a7=t},Object.freeze(pa);const[c7,l7,u7]=[[],[],[]],Zj=BigInt(0),s0=BigInt(1),Jj=BigInt(2),Qj=BigInt(7),Yj=BigInt(256),Kj=BigInt(113);for(let t=0,e=s0,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],c7.push(2*(5*n+r)),l7.push((t+1)*(t+2)/2%64);let s=Zj;for(let i=0;i<7;i++)e=(e<<s0^(e>>Qj)*Kj)%Yj,e&Jj&&(s^=s0<<(s0<<BigInt(i))-s0);u7.push(s)}const[qj,Xj]=K_(u7,!0),h7=(t,e,r)=>r>32?e7(t,e,r):q_(t,e,r),d7=(t,e,r)=>r>32?t7(t,e,r):X_(t,e,r);function f7(t,e=24){const r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)r[o]=t[o]^t[o+10]^t[o+20]^t[o+30]^t[o+40];for(let o=0;o<10;o+=2){const a=(o+8)%10,c=(o+2)%10,l=r[c],u=r[c+1],d=h7(l,u,1)^r[a],h=d7(l,u,1)^r[a+1];for(let p=0;p<50;p+=10)t[o+p]^=d,t[o+p+1]^=h}let s=t[2],i=t[3];for(let o=0;o<24;o++){const a=l7[o],c=h7(s,i,a),l=d7(s,i,a),u=c7[o];s=t[u],i=t[u+1],t[u]=c,t[u+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)r[a]=t[o+a];for(let a=0;a<10;a++)t[o+a]^=~r[(a+2)%10]&r[(a+4)%10]}t[0]^=qj[n],t[1]^=Xj[n]}r.fill(0)}let d4=class jV extends c4{constructor(e,r,n,s=!1,i=24){if(super(),this.blockLen=e,this.suffix=r,this.outputLen=n,this.enableXOF=s,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Ts(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=k2(this.state)}keccak(){f7(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){ud(this);const{blockLen:r,state:n}=this;e=ql(e);const s=e.length;for(let i=0;i<s;){const o=Math.min(r-this.pos,s-i);for(let a=0;a<o;a++)n[this.pos++]^=e[i++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:r,pos:n,blockLen:s}=this;e[n]^=r,r&128&&n===s-1&&this.keccak(),e[s-1]^=128,this.keccak()}writeInto(e){ud(this,!1),i4(e),this.finish();const r=this.state,{blockLen:n}=this;for(let s=0,i=e.length;s<i;){this.posOut>=n&&this.keccak();const o=Math.min(n-this.posOut,i-s);e.set(r.subarray(this.posOut,this.posOut+o),s),this.posOut+=o,s+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Ts(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(G_(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:r,suffix:n,outputLen:s,rounds:i,enableXOF:o}=this;return e||(e=new jV(r,n,s,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=s,e.enableXOF=o,e.destroyed=this.destroyed,e}};const Sc=(t,e,r)=>Ec(()=>new d4(e,t,r)),eG=Sc(6,144,224/8),tG=Sc(6,136,256/8),rG=Sc(6,104,384/8),nG=Sc(6,72,512/8),sG=Sc(1,144,224/8),p7=Sc(1,136,256/8),iG=Sc(1,104,384/8),oG=Sc(1,72,512/8),g7=(t,e,r)=>aj((n={})=>new d4(e,t,n.dkLen===void 0?r:n.dkLen,!0)),aG=g7(31,168,128/8),cG=g7(31,136,256/8),lG=Object.freeze(Object.defineProperty({__proto__:null,Keccak:d4,keccakP:f7,keccak_224:sG,keccak_256:p7,keccak_384:iG,keccak_512:oG,sha3_224:eG,sha3_256:tG,sha3_384:rG,sha3_512:nG,shake128:aG,shake256:cG},Symbol.toStringTag,{value:"Module"}));let m7=!1;const y7=function(t){return p7(t)};let v7=y7;function hr(t){const e=qe(t,"data");return Ze(v7(e))}hr._=y7,hr.lock=function(){m7=!0},hr.register=function(t){if(m7)throw new TypeError("keccak256 is locked");v7=t},Object.freeze(hr);const uG=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),b7=Uint8Array.from({length:16},(t,e)=>e),hG=b7.map(t=>(9*t+5)%16);let f4=[b7],p4=[hG];for(let t=0;t<4;t++)for(let e of[f4,p4])e.push(e[t].map(r=>uG[r]));const w7=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(t=>new Uint8Array(t)),dG=f4.map((t,e)=>t.map(r=>w7[e][r])),fG=p4.map((t,e)=>t.map(r=>w7[e][r])),pG=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),gG=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),T2=(t,e)=>t<<e|t>>>32-e;function k7(t,e,r,n){return t===0?e^r^n:t===1?e&r|~e&n:t===2?(e|~r)^n:t===3?e&n|r&~n:e^(r|~n)}const C2=new Uint32Array(16);class E7 extends u4{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:r,h2:n,h3:s,h4:i}=this;return[e,r,n,s,i]}set(e,r,n,s,i){this.h0=e|0,this.h1=r|0,this.h2=n|0,this.h3=s|0,this.h4=i|0}process(e,r){for(let p=0;p<16;p++,r+=4)C2[p]=e.getUint32(r,!0);let n=this.h0|0,s=n,i=this.h1|0,o=i,a=this.h2|0,c=a,l=this.h3|0,u=l,d=this.h4|0,h=d;for(let p=0;p<5;p++){const g=4-p,m=pG[p],y=gG[p],v=f4[p],A=p4[p],E=dG[p],w=fG[p];for(let C=0;C<16;C++){const B=T2(n+k7(p,i,a,l)+C2[v[C]]+m,E[C])+d|0;n=d,d=l,l=T2(a,10)|0,a=i,i=B}for(let C=0;C<16;C++){const B=T2(s+k7(g,o,c,u)+C2[A[C]]+y,w[C])+h|0;s=h,h=u,u=T2(c,10)|0,c=o,o=B}}this.set(this.h1+a+u|0,this.h2+l+h|0,this.h3+d+s|0,this.h4+n+o|0,this.h0+i+c|0)}roundClean(){C2.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}const A7=Ec(()=>new E7),mG=Object.freeze(Object.defineProperty({__proto__:null,RIPEMD160:E7,ripemd160:A7},Symbol.toStringTag,{value:"Module"}));let _7=!1;const T7=function(t){return A7(t)};let C7=T7;function ga(t){const e=qe(t,"data");return Ze(C7(e))}ga._=T7,ga.lock=function(){_7=!0},ga.register=function(t){if(_7)throw new TypeError("ripemd160 is locked");C7=t},Object.freeze(ga);let S7=!1;const R7=function(t,e,r,n,s){return $j(t,e,r,n,s)};let P7=R7;function Si(t,e,r,n,s){const i=qe(t,"password"),o=qe(e,"salt");return Ze(P7(i,o,r,n,s))}Si._=R7,Si.lock=function(){S7=!0},Si.register=function(t){if(S7)throw new Error("pbkdf2 is locked");P7=t},Object.freeze(Si);let N7=!1;const x7=function(t){return new Uint8Array(Hj(t))};let I7=x7;function Cs(t){return I7(t)}Cs._=x7,Cs.lock=function(){N7=!0},Cs.register=function(t){if(N7)throw new Error("randomBytes is locked");I7=t},Object.freeze(Cs);const rr=(t,e)=>t<<e|t>>>32-e;function O7(t,e,r,n,s,i){let o=t[e++]^r[n++],a=t[e++]^r[n++],c=t[e++]^r[n++],l=t[e++]^r[n++],u=t[e++]^r[n++],d=t[e++]^r[n++],h=t[e++]^r[n++],p=t[e++]^r[n++],g=t[e++]^r[n++],m=t[e++]^r[n++],y=t[e++]^r[n++],v=t[e++]^r[n++],A=t[e++]^r[n++],E=t[e++]^r[n++],w=t[e++]^r[n++],C=t[e++]^r[n++],B=o,L=a,I=c,M=l,W=u,U=d,x=h,P=p,F=g,O=m,j=y,G=v,q=A,H=E,Y=w,K=C;for(let te=0;te<8;te+=2)W^=rr(B+q|0,7),F^=rr(W+B|0,9),q^=rr(F+W|0,13),B^=rr(q+F|0,18),O^=rr(U+L|0,7),H^=rr(O+U|0,9),L^=rr(H+O|0,13),U^=rr(L+H|0,18),Y^=rr(j+x|0,7),I^=rr(Y+j|0,9),x^=rr(I+Y|0,13),j^=rr(x+I|0,18),M^=rr(K+G|0,7),P^=rr(M+K|0,9),G^=rr(P+M|0,13),K^=rr(G+P|0,18),L^=rr(B+M|0,7),I^=rr(L+B|0,9),M^=rr(I+L|0,13),B^=rr(M+I|0,18),x^=rr(U+W|0,7),P^=rr(x+U|0,9),W^=rr(P+x|0,13),U^=rr(W+P|0,18),G^=rr(j+O|0,7),F^=rr(G+j|0,9),O^=rr(F+G|0,13),j^=rr(O+F|0,18),q^=rr(K+Y|0,7),H^=rr(q+K|0,9),Y^=rr(H+q|0,13),K^=rr(Y+H|0,18);s[i++]=o+B|0,s[i++]=a+L|0,s[i++]=c+I|0,s[i++]=l+M|0,s[i++]=u+W|0,s[i++]=d+U|0,s[i++]=h+x|0,s[i++]=p+P|0,s[i++]=g+F|0,s[i++]=m+O|0,s[i++]=y+j|0,s[i++]=v+G|0,s[i++]=A+q|0,s[i++]=E+H|0,s[i++]=w+Y|0,s[i++]=C+K|0}function hd(t,e,r,n,s){let i=n+0,o=n+16*s;for(let a=0;a<16;a++)r[o+a]=t[e+(2*s-1)*16+a];for(let a=0;a<s;a++,i+=16,e+=16)O7(r,o,t,e,r,i),a>0&&(o+=16),O7(r,i,t,e+=16,r,o)}function B7(t,e,r){const n=$_({dkLen:32,asyncTick:10,maxmem:1073742848},r),{N:s,r:i,p:o,dkLen:a,asyncTick:c,maxmem:l,onProgress:u}=n;if(Ts(s),Ts(i),Ts(o),Ts(a),Ts(c),Ts(l),u!==void 0&&typeof u!="function")throw new Error("progressCb should be function");const d=128*i,h=d/4;if(s<=1||s&s-1||s>=2**(d/8)||s>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(o<0||o>(2**32-1)*32/d)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(a<0||a>(2**32-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const p=d*(s+o);if(p>l)throw new Error(`Scrypt: parameters too large, ${p} (128 * r * (N + p)) > ${l} (maxmem)`);const g=E2(Ao,t,e,{c:1,dkLen:d*o}),m=k2(g),y=k2(new Uint8Array(d*s)),v=k2(new Uint8Array(d));let A=()=>{};if(u){const E=2*s*o,w=Math.max(Math.floor(E/1e4),1);let C=0;A=()=>{C++,u&&(!(C%w)||C===E)&&u(C/E)}}return{N:s,r:i,p:o,dkLen:a,blockSize32:h,V:y,B32:m,B:g,tmp:v,blockMixCb:A,asyncTick:c}}function M7(t,e,r,n,s){const i=E2(Ao,t,r,{c:1,dkLen:e});return r.fill(0),n.fill(0),s.fill(0),i}function U7(t,e,r){const{N:n,r:s,p:i,dkLen:o,blockSize32:a,V:c,B32:l,B:u,tmp:d,blockMixCb:h}=B7(t,e,r);for(let p=0;p<i;p++){const g=a*p;for(let m=0;m<a;m++)c[m]=l[g+m];for(let m=0,y=0;m<n-1;m++)hd(c,y,c,y+=a,s),h();hd(c,(n-1)*a,l,g,s),h();for(let m=0;m<n;m++){const y=l[g+a-16]%n;for(let v=0;v<a;v++)d[v]=l[g+v]^c[y*a+v];hd(d,0,l,g,s),h()}}return M7(t,o,u,c,d)}async function L7(t,e,r){const{N:n,r:s,p:i,dkLen:o,blockSize32:a,V:c,B32:l,B:u,tmp:d,blockMixCb:h,asyncTick:p}=B7(t,e,r);for(let g=0;g<i;g++){const m=a*g;for(let v=0;v<a;v++)c[v]=l[m+v];let y=0;await a4(n-1,p,()=>{hd(c,y,c,y+=a,s),h()}),hd(c,(n-1)*a,l,m,s),h(),await a4(n,p,()=>{const v=l[m+a-16]%n;for(let A=0;A<a;A++)d[A]=l[m+A]^c[v*a+A];hd(d,0,l,m,s),h()})}return M7(t,o,u,c,d)}const yG=Object.freeze(Object.defineProperty({__proto__:null,scrypt:U7,scryptAsync:L7},Symbol.toStringTag,{value:"Module"}));let F7=!1,V7=!1;const D7=async function(t,e,r,n,s,i,o){return await L7(t,e,{N:r,r:n,p:s,dkLen:i,onProgress:o})},W7=function(t,e,r,n,s,i){return U7(t,e,{N:r,r:n,p:s,dkLen:i})};let j7=D7,G7=W7;async function ma(t,e,r,n,s,i,o){const a=qe(t,"passwd"),c=qe(e,"salt");return Ze(await j7(a,c,r,n,s,i,o))}ma._=D7,ma.lock=function(){V7=!0},ma.register=function(t){if(V7)throw new Error("scrypt is locked");j7=t},Object.freeze(ma);function ya(t,e,r,n,s,i){const o=qe(t,"passwd"),a=qe(e,"salt");return Ze(G7(o,a,r,n,s,i))}ya._=W7,ya.lock=function(){F7=!0},ya.register=function(t){if(F7)throw new Error("scryptSync is locked");G7=t},Object.freeze(ya);const z7=function(t){return s7("sha256").update(t).digest()},$7=function(t){return s7("sha512").update(t).digest()};let H7=z7,Z7=$7,J7=!1,Q7=!1;function Ln(t){const e=qe(t,"data");return Ze(H7(e))}Ln._=z7,Ln.lock=function(){J7=!0},Ln.register=function(t){if(J7)throw new Error("sha256 is locked");H7=t},Object.freeze(Ln);function dd(t){const e=qe(t,"data");return Ze(Z7(e))}dd._=$7,dd.lock=function(){Q7=!0},dd.register=function(t){if(Q7)throw new Error("sha512 is locked");Z7=t},Object.freeze(Ln);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Y7=BigInt(0),S2=BigInt(1),vG=BigInt(2),R2=t=>t instanceof Uint8Array,bG=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function fd(t){if(!R2(t))throw new Error("Uint8Array expected");let e="";for(let r=0;r<t.length;r++)e+=bG[t[r]];return e}function K7(t){const e=t.toString(16);return e.length&1?`0${e}`:e}function g4(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return BigInt(t===""?"0":`0x${t}`)}function pd(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);const e=t.length;if(e%2)throw new Error("padded hex string expected, got unpadded hex of length "+e);const r=new Uint8Array(e/2);for(let n=0;n<r.length;n++){const s=n*2,i=t.slice(s,s+2),o=Number.parseInt(i,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");r[n]=o}return r}function qn(t){return g4(fd(t))}function m4(t){if(!R2(t))throw new Error("Uint8Array expected");return g4(fd(Uint8Array.from(t).reverse()))}function Rc(t,e){return pd(t.toString(16).padStart(e*2,"0"))}function y4(t,e){return Rc(t,e).reverse()}function wG(t){return pd(K7(t))}function Fn(t,e,r){let n;if(typeof e=="string")try{n=pd(e)}catch(i){throw new Error(`${t} must be valid hex string, got "${e}". Cause: ${i}`)}else if(R2(e))n=Uint8Array.from(e);else throw new Error(`${t} must be hex string or Uint8Array`);const s=n.length;if(typeof r=="number"&&s!==r)throw new Error(`${t} expected ${r} bytes, got ${s}`);return n}function Ss(...t){const e=new Uint8Array(t.reduce((n,s)=>n+s.length,0));let r=0;return t.forEach(n=>{if(!R2(n))throw new Error("Uint8Array expected");e.set(n,r),r+=n.length}),e}function kG(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}function P2(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function EG(t){let e;for(e=0;t>Y7;t>>=S2,e+=1);return e}function AG(t,e){return t>>BigInt(e)&S2}const _G=(t,e,r)=>t|(r?S2:Y7)<<BigInt(e),v4=t=>(vG<<BigInt(t-1))-S2,b4=t=>new Uint8Array(t),q7=t=>Uint8Array.from(t);function X7(t,e,r){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=b4(t),s=b4(t),i=0;const o=()=>{n.fill(1),s.fill(0),i=0},a=(...u)=>r(s,n,...u),c=(u=b4())=>{s=a(q7([0]),u),n=a(),u.length!==0&&(s=a(q7([1]),u),n=a())},l=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let u=0;const d=[];for(;u<e;){n=a();const h=n.slice();d.push(h),u+=n.length}return Ss(...d)};return(u,d)=>{o(),c(u);let h;for(;!(h=d(l()));)c();return o(),h}}const TG={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||t instanceof Uint8Array,isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function gd(t,e,r={}){const n=(s,i,o)=>{const a=TG[i];if(typeof a!="function")throw new Error(`Invalid validator "${i}", expected function`);const c=t[s];if(!(o&&c===void 0)&&!a(c,t))throw new Error(`Invalid param ${String(s)}=${c} (${typeof c}), expected ${i}`)};for(const[s,i]of Object.entries(e))n(s,i,!1);for(const[s,i]of Object.entries(r))n(s,i,!0);return t}const CG=Object.freeze(Object.defineProperty({__proto__:null,bitGet:AG,bitLen:EG,bitMask:v4,bitSet:_G,bytesToHex:fd,bytesToNumberBE:qn,bytesToNumberLE:m4,concatBytes:Ss,createHmacDrbg:X7,ensureBytes:Fn,equalBytes:kG,hexToBytes:pd,hexToNumber:g4,numberToBytesBE:Rc,numberToBytesLE:y4,numberToHexUnpadded:K7,numberToVarBytesBE:wG,utf8ToBytes:P2,validateObject:gd},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const dn=BigInt(0),zr=BigInt(1),Xl=BigInt(2),SG=BigInt(3),w4=BigInt(4),eT=BigInt(5),tT=BigInt(8);BigInt(9),BigInt(16);function fn(t,e){const r=t%e;return r>=dn?r:e+r}function RG(t,e,r){if(r<=dn||e<dn)throw new Error("Expected power/modulo > 0");if(r===zr)return dn;let n=zr;for(;e>dn;)e&zr&&(n=n*t%r),t=t*t%r,e>>=zr;return n}function Ys(t,e,r){let n=t;for(;e-- >dn;)n*=n,n%=r;return n}function k4(t,e){if(t===dn||e<=dn)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=fn(t,e),n=e,s=dn,i=zr;for(;r!==dn;){const o=n/r,a=n%r,c=s-i*o;n=r,r=a,s=i,i=c}if(n!==zr)throw new Error("invert: does not exist");return fn(s,e)}function PG(t){const e=(t-zr)/Xl;let r,n,s;for(r=t-zr,n=0;r%Xl===dn;r/=Xl,n++);for(s=Xl;s<t&&RG(s,e,t)!==t-zr;s++);if(n===1){const o=(t+zr)/w4;return function(a,c){const l=a.pow(c,o);if(!a.eql(a.sqr(l),c))throw new Error("Cannot find square root");return l}}const i=(r+zr)/Xl;return function(o,a){if(o.pow(a,e)===o.neg(o.ONE))throw new Error("Cannot find square root");let c=n,l=o.pow(o.mul(o.ONE,s),r),u=o.pow(a,i),d=o.pow(a,r);for(;!o.eql(d,o.ONE);){if(o.eql(d,o.ZERO))return o.ZERO;let h=1;for(let g=o.sqr(d);h<c&&!o.eql(g,o.ONE);h++)g=o.sqr(g);const p=o.pow(l,zr<<BigInt(c-h-1));l=o.sqr(p),u=o.mul(u,p),d=o.mul(d,l),c=h}return u}}function NG(t){if(t%w4===SG){const e=(t+zr)/w4;return function(r,n){const s=r.pow(n,e);if(!r.eql(r.sqr(s),n))throw new Error("Cannot find square root");return s}}if(t%tT===eT){const e=(t-eT)/tT;return function(r,n){const s=r.mul(n,Xl),i=r.pow(s,e),o=r.mul(n,i),a=r.mul(r.mul(o,Xl),i),c=r.mul(o,r.sub(a,r.ONE));if(!r.eql(r.sqr(c),n))throw new Error("Cannot find square root");return c}}return PG(t)}const xG=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function rT(t){const e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=xG.reduce((n,s)=>(n[s]="function",n),e);return gd(t,r)}function IG(t,e,r){if(r<dn)throw new Error("Expected power > 0");if(r===dn)return t.ONE;if(r===zr)return e;let n=t.ONE,s=e;for(;r>dn;)r&zr&&(n=t.mul(n,s)),s=t.sqr(s),r>>=zr;return n}function OG(t,e){const r=new Array(e.length),n=e.reduce((i,o,a)=>t.is0(o)?i:(r[a]=i,t.mul(i,o)),t.ONE),s=t.inv(n);return e.reduceRight((i,o,a)=>t.is0(o)?i:(r[a]=t.mul(i,r[a]),t.mul(i,o)),s),r}function nT(t,e){const r=e!==void 0?e:t.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function BG(t,e,r=!1,n={}){if(t<=dn)throw new Error(`Expected Field ORDER > 0, got ${t}`);const{nBitLength:s,nByteLength:i}=nT(t,e);if(i>2048)throw new Error("Field lengths over 2048 bytes are not supported");const o=NG(t),a=Object.freeze({ORDER:t,BITS:s,BYTES:i,MASK:v4(s),ZERO:dn,ONE:zr,create:c=>fn(c,t),isValid:c=>{if(typeof c!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof c}`);return dn<=c&&c<t},is0:c=>c===dn,isOdd:c=>(c&zr)===zr,neg:c=>fn(-c,t),eql:(c,l)=>c===l,sqr:c=>fn(c*c,t),add:(c,l)=>fn(c+l,t),sub:(c,l)=>fn(c-l,t),mul:(c,l)=>fn(c*l,t),pow:(c,l)=>IG(a,c,l),div:(c,l)=>fn(c*k4(l,t),t),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>k4(c,t),sqrt:n.sqrt||(c=>o(a,c)),invertBatch:c=>OG(a,c),cmov:(c,l,u)=>u?l:c,toBytes:c=>r?y4(c,i):Rc(c,i),fromBytes:c=>{if(c.length!==i)throw new Error(`Fp.fromBytes: expected ${i}, got ${c.length}`);return r?m4(c):qn(c)}});return Object.freeze(a)}function sT(t){if(typeof t!="bigint")throw new Error("field order must be bigint");const e=t.toString(2).length;return Math.ceil(e/8)}function iT(t){const e=sT(t);return e+Math.ceil(e/2)}function MG(t,e,r=!1){const n=t.length,s=sT(e),i=iT(e);if(n<16||n<i||n>1024)throw new Error(`expected ${i}-1024 bytes of input, got ${n}`);const o=r?qn(t):m4(t),a=fn(o,e-zr)+zr;return r?y4(a,s):Rc(a,s)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const UG=BigInt(0),E4=BigInt(1);function LG(t,e){const r=(s,i)=>{const o=i.negate();return s?o:i},n=s=>{const i=Math.ceil(e/s)+1,o=2**(s-1);return{windows:i,windowSize:o}};return{constTimeNegate:r,unsafeLadder(s,i){let o=t.ZERO,a=s;for(;i>UG;)i&E4&&(o=o.add(a)),a=a.double(),i>>=E4;return o},precomputeWindow(s,i){const{windows:o,windowSize:a}=n(i),c=[];let l=s,u=l;for(let d=0;d<o;d++){u=l,c.push(u);for(let h=1;h<a;h++)u=u.add(l),c.push(u);l=u.double()}return c},wNAF(s,i,o){const{windows:a,windowSize:c}=n(s);let l=t.ZERO,u=t.BASE;const d=BigInt(2**s-1),h=2**s,p=BigInt(s);for(let g=0;g<a;g++){const m=g*c;let y=Number(o&d);o>>=p,y>c&&(y-=h,o+=E4);const v=m,A=m+Math.abs(y)-1,E=g%2!==0,w=y<0;y===0?u=u.add(r(E,i[v])):l=l.add(r(w,i[A]))}return{p:l,f:u}},wNAFCached(s,i,o,a){const c=s._WINDOW_SIZE||1;let l=i.get(s);return l||(l=this.precomputeWindow(s,c),c!==1&&i.set(s,a(l))),this.wNAF(c,l,o)}}}function oT(t){return rT(t.Fp),gd(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...nT(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function FG(t){const e=oT(t);gd(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:s}=e;if(r){if(!n.eql(s,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}const{bytesToNumberBE:VG,hexToBytes:DG}=CG,eu={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(t){const{Err:e}=eu;if(t.length<2||t[0]!==2)throw new e("Invalid signature integer tag");const r=t[1],n=t.subarray(2,r+2);if(!r||n.length!==r)throw new e("Invalid signature integer: wrong length");if(n[0]&128)throw new e("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:VG(n),l:t.subarray(r+2)}},toSig(t){const{Err:e}=eu,r=typeof t=="string"?DG(t):t;if(!(r instanceof Uint8Array))throw new Error("ui8a expected");let n=r.length;if(n<2||r[0]!=48)throw new e("Invalid signature tag");if(r[1]!==n-2)throw new e("Invalid signature: incorrect length");const{d:s,l:i}=eu._parseInt(r.subarray(2)),{d:o,l:a}=eu._parseInt(i);if(a.length)throw new e("Invalid signature: left bytes after parsing");return{r:s,s:o}},hexFromSig(t){const e=l=>Number.parseInt(l[0],16)&8?"00"+l:l,r=l=>{const u=l.toString(16);return u.length&1?`0${u}`:u},n=e(r(t.s)),s=e(r(t.r)),i=n.length/2,o=s.length/2,a=r(i),c=r(o);return`30${r(o+i+4)}02${c}${s}02${a}${n}`}},Ri=BigInt(0),Vr=BigInt(1),Pc=BigInt(2),N2=BigInt(3),aT=BigInt(4);function WG(t){const e=FG(t),{Fp:r}=e,n=e.toBytes||((g,m,y)=>{const v=m.toAffine();return Ss(Uint8Array.from([4]),r.toBytes(v.x),r.toBytes(v.y))}),s=e.fromBytes||(g=>{const m=g.subarray(1),y=r.fromBytes(m.subarray(0,r.BYTES)),v=r.fromBytes(m.subarray(r.BYTES,2*r.BYTES));return{x:y,y:v}});function i(g){const{a:m,b:y}=e,v=r.sqr(g),A=r.mul(v,g);return r.add(r.add(A,r.mul(g,m)),y)}if(!r.eql(r.sqr(e.Gy),i(e.Gx)))throw new Error("bad generator point: equation left != right");function o(g){return typeof g=="bigint"&&Ri<g&&g<e.n}function a(g){if(!o(g))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function c(g){const{allowedPrivateKeyLengths:m,nByteLength:y,wrapPrivateKey:v,n:A}=e;if(m&&typeof g!="bigint"){if(g instanceof Uint8Array&&(g=fd(g)),typeof g!="string"||!m.includes(g.length))throw new Error("Invalid key");g=g.padStart(y*2,"0")}let E;try{E=typeof g=="bigint"?g:qn(Fn("private key",g,y))}catch{throw new Error(`private key must be ${y} bytes, hex or bigint, not ${typeof g}`)}return v&&(E=fn(E,A)),a(E),E}const l=new Map;function u(g){if(!(g instanceof d))throw new Error("ProjectivePoint expected")}class d{constructor(m,y,v){if(this.px=m,this.py=y,this.pz=v,m==null||!r.isValid(m))throw new Error("x required");if(y==null||!r.isValid(y))throw new Error("y required");if(v==null||!r.isValid(v))throw new Error("z required")}static fromAffine(m){const{x:y,y:v}=m||{};if(!m||!r.isValid(y)||!r.isValid(v))throw new Error("invalid affine point");if(m instanceof d)throw new Error("projective point not allowed");const A=E=>r.eql(E,r.ZERO);return A(y)&&A(v)?d.ZERO:new d(y,v,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(m){const y=r.invertBatch(m.map(v=>v.pz));return m.map((v,A)=>v.toAffine(y[A])).map(d.fromAffine)}static fromHex(m){const y=d.fromAffine(s(Fn("pointHex",m)));return y.assertValidity(),y}static fromPrivateKey(m){return d.BASE.multiply(c(m))}_setWindowSize(m){this._WINDOW_SIZE=m,l.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:m,y}=this.toAffine();if(!r.isValid(m)||!r.isValid(y))throw new Error("bad point: x or y not FE");const v=r.sqr(y),A=i(m);if(!r.eql(v,A))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:m}=this.toAffine();if(r.isOdd)return!r.isOdd(m);throw new Error("Field doesn't support isOdd")}equals(m){u(m);const{px:y,py:v,pz:A}=this,{px:E,py:w,pz:C}=m,B=r.eql(r.mul(y,C),r.mul(E,A)),L=r.eql(r.mul(v,C),r.mul(w,A));return B&&L}negate(){return new d(this.px,r.neg(this.py),this.pz)}double(){const{a:m,b:y}=e,v=r.mul(y,N2),{px:A,py:E,pz:w}=this;let C=r.ZERO,B=r.ZERO,L=r.ZERO,I=r.mul(A,A),M=r.mul(E,E),W=r.mul(w,w),U=r.mul(A,E);return U=r.add(U,U),L=r.mul(A,w),L=r.add(L,L),C=r.mul(m,L),B=r.mul(v,W),B=r.add(C,B),C=r.sub(M,B),B=r.add(M,B),B=r.mul(C,B),C=r.mul(U,C),L=r.mul(v,L),W=r.mul(m,W),U=r.sub(I,W),U=r.mul(m,U),U=r.add(U,L),L=r.add(I,I),I=r.add(L,I),I=r.add(I,W),I=r.mul(I,U),B=r.add(B,I),W=r.mul(E,w),W=r.add(W,W),I=r.mul(W,U),C=r.sub(C,I),L=r.mul(W,M),L=r.add(L,L),L=r.add(L,L),new d(C,B,L)}add(m){u(m);const{px:y,py:v,pz:A}=this,{px:E,py:w,pz:C}=m;let B=r.ZERO,L=r.ZERO,I=r.ZERO;const M=e.a,W=r.mul(e.b,N2);let U=r.mul(y,E),x=r.mul(v,w),P=r.mul(A,C),F=r.add(y,v),O=r.add(E,w);F=r.mul(F,O),O=r.add(U,x),F=r.sub(F,O),O=r.add(y,A);let j=r.add(E,C);return O=r.mul(O,j),j=r.add(U,P),O=r.sub(O,j),j=r.add(v,A),B=r.add(w,C),j=r.mul(j,B),B=r.add(x,P),j=r.sub(j,B),I=r.mul(M,O),B=r.mul(W,P),I=r.add(B,I),B=r.sub(x,I),I=r.add(x,I),L=r.mul(B,I),x=r.add(U,U),x=r.add(x,U),P=r.mul(M,P),O=r.mul(W,O),x=r.add(x,P),P=r.sub(U,P),P=r.mul(M,P),O=r.add(O,P),U=r.mul(x,O),L=r.add(L,U),U=r.mul(j,O),B=r.mul(F,B),B=r.sub(B,U),U=r.mul(F,x),I=r.mul(j,I),I=r.add(I,U),new d(B,L,I)}subtract(m){return this.add(m.negate())}is0(){return this.equals(d.ZERO)}wNAF(m){return p.wNAFCached(this,l,m,y=>{const v=r.invertBatch(y.map(A=>A.pz));return y.map((A,E)=>A.toAffine(v[E])).map(d.fromAffine)})}multiplyUnsafe(m){const y=d.ZERO;if(m===Ri)return y;if(a(m),m===Vr)return this;const{endo:v}=e;if(!v)return p.unsafeLadder(this,m);let{k1neg:A,k1:E,k2neg:w,k2:C}=v.splitScalar(m),B=y,L=y,I=this;for(;E>Ri||C>Ri;)E&Vr&&(B=B.add(I)),C&Vr&&(L=L.add(I)),I=I.double(),E>>=Vr,C>>=Vr;return A&&(B=B.negate()),w&&(L=L.negate()),L=new d(r.mul(L.px,v.beta),L.py,L.pz),B.add(L)}multiply(m){a(m);let y=m,v,A;const{endo:E}=e;if(E){const{k1neg:w,k1:C,k2neg:B,k2:L}=E.splitScalar(y);let{p:I,f:M}=this.wNAF(C),{p:W,f:U}=this.wNAF(L);I=p.constTimeNegate(w,I),W=p.constTimeNegate(B,W),W=new d(r.mul(W.px,E.beta),W.py,W.pz),v=I.add(W),A=M.add(U)}else{const{p:w,f:C}=this.wNAF(y);v=w,A=C}return d.normalizeZ([v,A])[0]}multiplyAndAddUnsafe(m,y,v){const A=d.BASE,E=(C,B)=>B===Ri||B===Vr||!C.equals(A)?C.multiplyUnsafe(B):C.multiply(B),w=E(this,y).add(E(m,v));return w.is0()?void 0:w}toAffine(m){const{px:y,py:v,pz:A}=this,E=this.is0();m==null&&(m=E?r.ONE:r.inv(A));const w=r.mul(y,m),C=r.mul(v,m),B=r.mul(A,m);if(E)return{x:r.ZERO,y:r.ZERO};if(!r.eql(B,r.ONE))throw new Error("invZ was invalid");return{x:w,y:C}}isTorsionFree(){const{h:m,isTorsionFree:y}=e;if(m===Vr)return!0;if(y)return y(d,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:m,clearCofactor:y}=e;return m===Vr?this:y?y(d,this):this.multiplyUnsafe(e.h)}toRawBytes(m=!0){return this.assertValidity(),n(d,this,m)}toHex(m=!0){return fd(this.toRawBytes(m))}}d.BASE=new d(e.Gx,e.Gy,r.ONE),d.ZERO=new d(r.ZERO,r.ONE,r.ZERO);const h=e.nBitLength,p=LG(d,e.endo?Math.ceil(h/2):h);return{CURVE:e,ProjectivePoint:d,normPrivateKeyToScalar:c,weierstrassEquation:i,isWithinCurveOrder:o}}function jG(t){const e=oT(t);return gd(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function GG(t){const e=jG(t),{Fp:r,n}=e,s=r.BYTES+1,i=2*r.BYTES+1;function o(O){return Ri<O&&O<r.ORDER}function a(O){return fn(O,n)}function c(O){return k4(O,n)}const{ProjectivePoint:l,normPrivateKeyToScalar:u,weierstrassEquation:d,isWithinCurveOrder:h}=WG({...e,toBytes(O,j,G){const q=j.toAffine(),H=r.toBytes(q.x),Y=Ss;return G?Y(Uint8Array.from([j.hasEvenY()?2:3]),H):Y(Uint8Array.from([4]),H,r.toBytes(q.y))},fromBytes(O){const j=O.length,G=O[0],q=O.subarray(1);if(j===s&&(G===2||G===3)){const H=qn(q);if(!o(H))throw new Error("Point is not on curve");const Y=d(H);let K=r.sqrt(Y);const te=(K&Vr)===Vr;return(G&1)===1!==te&&(K=r.neg(K)),{x:H,y:K}}else if(j===i&&G===4){const H=r.fromBytes(q.subarray(0,r.BYTES)),Y=r.fromBytes(q.subarray(r.BYTES,2*r.BYTES));return{x:H,y:Y}}else throw new Error(`Point of length ${j} was invalid. Expected ${s} compressed bytes or ${i} uncompressed bytes`)}}),p=O=>fd(Rc(O,e.nByteLength));function g(O){const j=n>>Vr;return O>j}function m(O){return g(O)?a(-O):O}const y=(O,j,G)=>qn(O.slice(j,G));class v{constructor(j,G,q){this.r=j,this.s=G,this.recovery=q,this.assertValidity()}static fromCompact(j){const G=e.nByteLength;return j=Fn("compactSignature",j,G*2),new v(y(j,0,G),y(j,G,2*G))}static fromDER(j){const{r:G,s:q}=eu.toSig(Fn("DER",j));return new v(G,q)}assertValidity(){if(!h(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!h(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(j){return new v(this.r,this.s,j)}recoverPublicKey(j){const{r:G,s:q,recovery:H}=this,Y=L(Fn("msgHash",j));if(H==null||![0,1,2,3].includes(H))throw new Error("recovery id invalid");const K=H===2||H===3?G+e.n:G;if(K>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const te=H&1?"03":"02",oe=l.fromHex(te+p(K)),ye=c(K),_e=a(-Y*ye),Ce=a(q*ye),ie=l.BASE.multiplyAndAddUnsafe(oe,_e,Ce);if(!ie)throw new Error("point at infinify");return ie.assertValidity(),ie}hasHighS(){return g(this.s)}normalizeS(){return this.hasHighS()?new v(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return pd(this.toDERHex())}toDERHex(){return eu.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return pd(this.toCompactHex())}toCompactHex(){return p(this.r)+p(this.s)}}const A={isValidPrivateKey(O){try{return u(O),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{const O=iT(e.n);return MG(e.randomBytes(O),e.n)},precompute(O=8,j=l.BASE){return j._setWindowSize(O),j.multiply(BigInt(3)),j}};function E(O,j=!0){return l.fromPrivateKey(O).toRawBytes(j)}function w(O){const j=O instanceof Uint8Array,G=typeof O=="string",q=(j||G)&&O.length;return j?q===s||q===i:G?q===2*s||q===2*i:O instanceof l}function C(O,j,G=!0){if(w(O))throw new Error("first arg must be private key");if(!w(j))throw new Error("second arg must be public key");return l.fromHex(j).multiply(u(O)).toRawBytes(G)}const B=e.bits2int||function(O){const j=qn(O),G=O.length*8-e.nBitLength;return G>0?j>>BigInt(G):j},L=e.bits2int_modN||function(O){return a(B(O))},I=v4(e.nBitLength);function M(O){if(typeof O!="bigint")throw new Error("bigint expected");if(!(Ri<=O&&O<I))throw new Error(`bigint expected < 2^${e.nBitLength}`);return Rc(O,e.nByteLength)}function W(O,j,G=U){if(["recovered","canonical"].some(we=>we in G))throw new Error("sign() legacy options not supported");const{hash:q,randomBytes:H}=e;let{lowS:Y,prehash:K,extraEntropy:te}=G;Y==null&&(Y=!0),O=Fn("msgHash",O),K&&(O=Fn("prehashed msgHash",q(O)));const oe=L(O),ye=u(j),_e=[M(ye),M(oe)];if(te!=null){const we=te===!0?H(r.BYTES):te;_e.push(Fn("extraEntropy",we))}const Ce=Ss(..._e),ie=oe;function le(we){const D=B(we);if(!h(D))return;const ue=c(D),me=l.BASE.multiply(D).toAffine(),be=a(me.x);if(be===Ri)return;const re=a(ue*a(ie+be*ye));if(re===Ri)return;let N=(me.x===be?0:2)|Number(me.y&Vr),z=re;return Y&&g(re)&&(z=m(re),N^=1),new v(be,z,N)}return{seed:Ce,k2sig:le}}const U={lowS:e.lowS,prehash:!1},x={lowS:e.lowS,prehash:!1};function P(O,j,G=U){const{seed:q,k2sig:H}=W(O,j,G),Y=e;return X7(Y.hash.outputLen,Y.nByteLength,Y.hmac)(q,H)}l.BASE._setWindowSize(8);function F(O,j,G,q=x){var H;const Y=O;if(j=Fn("msgHash",j),G=Fn("publicKey",G),"strict"in q)throw new Error("options.strict was renamed to lowS");const{lowS:K,prehash:te}=q;let oe,ye;try{if(typeof Y=="string"||Y instanceof Uint8Array)try{oe=v.fromDER(Y)}catch(me){if(!(me instanceof eu.Err))throw me;oe=v.fromCompact(Y)}else if(typeof Y=="object"&&typeof Y.r=="bigint"&&typeof Y.s=="bigint"){const{r:me,s:be}=Y;oe=new v(me,be)}else throw new Error("PARSE");ye=l.fromHex(G)}catch(me){if(me.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(K&&oe.hasHighS())return!1;te&&(j=e.hash(j));const{r:_e,s:Ce}=oe,ie=L(j),le=c(Ce),we=a(ie*le),D=a(_e*le),ue=(H=l.BASE.multiplyAndAddUnsafe(ye,we,D))==null?void 0:H.toAffine();return ue?a(ue.x)===_e:!1}return{CURVE:e,getPublicKey:E,getSharedSecret:C,sign:P,verify:F,ProjectivePoint:l,Signature:v,utils:A}}function zG(t,e){const r=t.ORDER;let n=Ri;for(let g=r-Vr;g%Pc===Ri;g/=Pc)n+=Vr;const s=n,i=Pc<<s-Vr-Vr,o=i*Pc,a=(r-Vr)/o,c=(a-Vr)/Pc,l=o-Vr,u=i,d=t.pow(e,a),h=t.pow(e,(a+Vr)/Pc);let p=(g,m)=>{let y=d,v=t.pow(m,l),A=t.sqr(v);A=t.mul(A,m);let E=t.mul(g,A);E=t.pow(E,c),E=t.mul(E,v),v=t.mul(E,m),A=t.mul(E,g);let w=t.mul(A,v);E=t.pow(w,u);let C=t.eql(E,t.ONE);v=t.mul(A,h),E=t.mul(w,y),A=t.cmov(v,A,C),w=t.cmov(E,w,C);for(let B=s;B>Vr;B--){let L=B-Pc;L=Pc<<L-Vr;let I=t.pow(w,L);const M=t.eql(I,t.ONE);v=t.mul(A,y),y=t.mul(y,y),I=t.mul(w,y),A=t.cmov(v,A,M),w=t.cmov(I,w,M)}return{isValid:C,value:A}};if(t.ORDER%aT===N2){const g=(t.ORDER-N2)/aT,m=t.sqrt(t.neg(e));p=(y,v)=>{let A=t.sqr(v);const E=t.mul(y,v);A=t.mul(A,E);let w=t.pow(A,g);w=t.mul(w,E);const C=t.mul(w,m),B=t.mul(t.sqr(w),v),L=t.eql(B,y);let I=t.cmov(C,w,L);return{isValid:L,value:I}}}return p}function $G(t,e){if(rT(t),!t.isValid(e.A)||!t.isValid(e.B)||!t.isValid(e.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const r=zG(t,e.Z);if(!t.isOdd)throw new Error("Fp.isOdd is not implemented!");return n=>{let s,i,o,a,c,l,u,d;s=t.sqr(n),s=t.mul(s,e.Z),i=t.sqr(s),i=t.add(i,s),o=t.add(i,t.ONE),o=t.mul(o,e.B),a=t.cmov(e.Z,t.neg(i),!t.eql(i,t.ZERO)),a=t.mul(a,e.A),i=t.sqr(o),l=t.sqr(a),c=t.mul(l,e.A),i=t.add(i,c),i=t.mul(i,o),l=t.mul(l,a),c=t.mul(l,e.B),i=t.add(i,c),u=t.mul(s,o);const{isValid:h,value:p}=r(i,l);d=t.mul(s,n),d=t.mul(d,p),u=t.cmov(u,o,h),d=t.cmov(d,p,h);const g=t.isOdd(n)===t.isOdd(d);return d=t.cmov(t.neg(d),d,g),u=t.div(u,a),{x:u,y:d}}}function HG(t){if(t instanceof Uint8Array)return t;if(typeof t=="string")return P2(t);throw new Error("DST must be Uint8Array or string")}const ZG=qn;function Nc(t,e){if(t<0||t>=1<<8*e)throw new Error(`bad I2OSP call: value=${t} length=${e}`);const r=Array.from({length:e}).fill(0);for(let n=e-1;n>=0;n--)r[n]=t&255,t>>>=8;return new Uint8Array(r)}function JG(t,e){const r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t[n]^e[n];return r}function i0(t){if(!(t instanceof Uint8Array))throw new Error("Uint8Array expected")}function A4(t){if(!Number.isSafeInteger(t))throw new Error("number expected")}function QG(t,e,r,n){i0(t),i0(e),A4(r),e.length>255&&(e=n(Ss(P2("H2C-OVERSIZE-DST-"),e)));const{outputLen:s,blockLen:i}=n,o=Math.ceil(r/s);if(o>255)throw new Error("Invalid xmd length");const a=Ss(e,Nc(e.length,1)),c=Nc(0,i),l=Nc(r,2),u=new Array(o),d=n(Ss(c,t,l,Nc(0,1),a));u[0]=n(Ss(d,Nc(1,1),a));for(let h=1;h<=o;h++){const p=[JG(d,u[h-1]),Nc(h+1,1),a];u[h]=n(Ss(...p))}return Ss(...u).slice(0,r)}function YG(t,e,r,n,s){if(i0(t),i0(e),A4(r),e.length>255){const i=Math.ceil(2*n/8);e=s.create({dkLen:i}).update(P2("H2C-OVERSIZE-DST-")).update(e).digest()}if(r>65535||e.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return s.create({dkLen:r}).update(t).update(Nc(r,2)).update(e).update(Nc(e.length,1)).digest()}function cT(t,e,r){gd(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:n,k:s,m:i,hash:o,expand:a,DST:c}=r;i0(t),A4(e);const l=HG(c),u=n.toString(2).length,d=Math.ceil((u+s)/8),h=e*i*d;let p;if(a==="xmd")p=QG(t,l,h,o);else if(a==="xof")p=YG(t,l,h,s,o);else if(a==="_internal_pass")p=t;else throw new Error('expand must be "xmd" or "xof"');const g=new Array(e);for(let m=0;m<e;m++){const y=new Array(i);for(let v=0;v<i;v++){const A=d*(v+m*i),E=p.subarray(A,A+d);y[v]=fn(ZG(E),n)}g[m]=y}return g}function KG(t,e){const r=e.map(n=>Array.from(n).reverse());return(n,s)=>{const[i,o,a,c]=r.map(l=>l.reduce((u,d)=>t.add(t.mul(u,n),d)));return n=t.div(i,o),s=t.mul(s,t.div(a,c)),{x:n,y:s}}}function qG(t,e,r){if(typeof e!="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(n,s){const i=cT(n,2,{...r,DST:r.DST,...s}),o=t.fromAffine(e(i[0])),a=t.fromAffine(e(i[1])),c=o.add(a).clearCofactor();return c.assertValidity(),c},encodeToCurve(n,s){const i=cT(n,1,{...r,DST:r.encodeDST,...s}),o=t.fromAffine(e(i[0])).clearCofactor();return o.assertValidity(),o}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function XG(t){return{hash:t,hmac:(e,...r)=>r0(t,e,ij(...r)),randomBytes:H_}}function ez(t,e){const r=n=>GG({...t,...XG(n)});return Object.freeze({...r(e),create:r})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const x2=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),I2=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),lT=BigInt(1),O2=BigInt(2),uT=(t,e)=>(t+e/O2)/e;function hT(t){const e=x2,r=BigInt(3),n=BigInt(6),s=BigInt(11),i=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),l=t*t*t%e,u=l*l*t%e,d=Ys(u,r,e)*u%e,h=Ys(d,r,e)*u%e,p=Ys(h,O2,e)*l%e,g=Ys(p,s,e)*p%e,m=Ys(g,i,e)*g%e,y=Ys(m,a,e)*m%e,v=Ys(y,c,e)*y%e,A=Ys(v,a,e)*m%e,E=Ys(A,r,e)*u%e,w=Ys(E,o,e)*g%e,C=Ys(w,n,e)*l%e,B=Ys(C,O2,e);if(!xc.eql(xc.sqr(B),t))throw new Error("Cannot find square root");return B}const xc=BG(x2,void 0,void 0,{sqrt:hT}),Ks=ez({a:BigInt(0),b:BigInt(7),Fp:xc,n:I2,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{const e=I2,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-lT*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=r,o=BigInt("0x100000000000000000000000000000000"),a=uT(i*t,e),c=uT(-n*t,e);let l=fn(t-a*r-c*s,e),u=fn(-a*n-c*i,e);const d=l>o,h=u>o;if(d&&(l=e-l),h&&(u=e-u),l>o||u>o)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:d,k1:l,k2neg:h,k2:u}}}},Ao),B2=BigInt(0),dT=t=>typeof t=="bigint"&&B2<t&&t<x2,tz=t=>typeof t=="bigint"&&B2<t&&t<I2,fT={};function M2(t,...e){let r=fT[t];if(r===void 0){const n=Ao(Uint8Array.from(t,s=>s.charCodeAt(0)));r=Ss(n,n),fT[t]=r}return Ao(Ss(r,...e))}const _4=t=>t.toRawBytes(!0).slice(1),T4=t=>Rc(t,32),C4=t=>fn(t,x2),o0=t=>fn(t,I2),S4=Ks.ProjectivePoint,rz=(t,e,r)=>S4.BASE.multiplyAndAddUnsafe(t,e,r);function R4(t){let e=Ks.utils.normPrivateKeyToScalar(t),r=S4.fromPrivateKey(e);return{scalar:r.hasEvenY()?e:o0(-e),bytes:_4(r)}}function pT(t){if(!dT(t))throw new Error("bad x: need 0 < x < p");const e=C4(t*t),r=C4(e*t+BigInt(7));let n=hT(r);n%O2!==B2&&(n=C4(-n));const s=new S4(t,n,lT);return s.assertValidity(),s}function gT(...t){return o0(qn(M2("BIP0340/challenge",...t)))}function nz(t){return R4(t).bytes}function sz(t,e,r=H_(32)){const n=Fn("message",t),{bytes:s,scalar:i}=R4(e),o=Fn("auxRand",r,32),a=T4(i^qn(M2("BIP0340/aux",o))),c=M2("BIP0340/nonce",a,s,n),l=o0(qn(c));if(l===B2)throw new Error("sign failed: k is zero");const{bytes:u,scalar:d}=R4(l),h=gT(u,s,n),p=new Uint8Array(64);if(p.set(u,0),p.set(T4(o0(d+h*i)),32),!mT(p,n,s))throw new Error("sign: Invalid signature produced");return p}function mT(t,e,r){const n=Fn("signature",t,64),s=Fn("message",e),i=Fn("publicKey",r,32);try{const o=pT(qn(i)),a=qn(n.subarray(0,32));if(!dT(a))return!1;const c=qn(n.subarray(32,64));if(!tz(c))return!1;const l=gT(T4(a),_4(o),s),u=rz(o,c,o0(-l));return!(!u||!u.hasEvenY()||u.toAffine().x!==a)}catch{return!1}}const iz={getPublicKey:nz,sign:sz,verify:mT,utils:{randomPrivateKey:Ks.utils.randomPrivateKey,lift_x:pT,pointToBytes:_4,numberToBytesBE:Rc,bytesToNumberBE:qn,taggedHash:M2,mod:fn}},oz=KG(xc,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(t=>t.map(e=>BigInt(e)))),az=$G(xc,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:xc.create(BigInt("-11"))}),yT=qG(Ks.ProjectivePoint,t=>{const{x:e,y:r}=az(xc.create(t[0]));return oz(e,r)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:xc.ORDER,m:1,k:128,expand:"xmd",hash:Ao}),cz=yT.hashToCurve,lz=yT.encodeToCurve,uz=Object.freeze(Object.defineProperty({__proto__:null,encodeToCurve:lz,hashToCurve:cz,schnorr:iz,secp256k1:Ks},Symbol.toStringTag,{value:"Module"})),tu="0x0000000000000000000000000000000000000000",U2="0x0000000000000000000000000000000000000000000000000000000000000000",vT=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),bT=BigInt("1000000000000000000"),wT=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),kT=BigInt("0x8000000000000000000000000000000000000000000000000000000000000000")*BigInt(-1),ET=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),AT="Ξ",P4=`Ethereum Signed Message:
|
|
5
5
|
`,_T=BigInt(0),TT=BigInt(1),CT=BigInt(2),ST=BigInt(27),RT=BigInt(28),L2=BigInt(35),md={};function PT(t){return Hs(on(t),32)}var a0,c0,l0,yd;const hz=class qo{constructor(e,r,n,s){ne(this,a0),ne(this,c0),ne(this,l0),ne(this,yd),vo(e,md,"Signature"),V(this,a0,r),V(this,c0,n),V(this,l0,s),V(this,yd,null)}get r(){return T(this,a0)}set r(e){pe(oa(e)===32,"invalid r","value",e),V(this,a0,Ze(e))}get s(){return T(this,c0)}set s(e){pe(oa(e)===32,"invalid s","value",e);const r=Ze(e);pe(parseInt(r.substring(0,3))<8,"non-canonical s","value",r),V(this,c0,r)}get v(){return T(this,l0)}set v(e){const r=mt(e,"value");pe(r===27||r===28,"invalid v","v",e),V(this,l0,r)}get networkV(){return T(this,yd)}get legacyChainId(){const e=this.networkV;return e==null?null:qo.getChainId(e)}get yParity(){return this.v===27?0:1}get yParityAndS(){const e=qe(this.s);return this.yParity&&(e[0]|=128),Ze(e)}get compactSerialized(){return $t([this.r,this.yParityAndS])}get serialized(){return $t([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new qo(md,this.r,this.s,this.v);return this.networkV&&V(e,yd,this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:e!=null?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const r=ct(e,"v");return r==ST||r==RT?_T:(pe(r>=L2,"invalid EIP-155 v","v",e),(r-L2)/CT)}static getChainIdV(e,r){return ct(e)*CT+BigInt(35+r-27)}static getNormalizedV(e){const r=ct(e);return r===_T||r===ST?27:r===TT||r===RT?28:(pe(r>=L2,"invalid v","v",e),r&TT?27:28)}static from(e){function r(l,u){pe(l,u,"signature",e)}if(e==null)return new qo(md,U2,U2,27);if(typeof e=="string"){const l=qe(e,"signature");if(l.length===64){const u=Ze(l.slice(0,32)),d=l.slice(32,64),h=d[0]&128?28:27;return d[0]&=127,new qo(md,u,Ze(d),h)}if(l.length===65){const u=Ze(l.slice(0,32)),d=l.slice(32,64);r((d[0]&128)===0,"non-canonical s");const h=qo.getNormalizedV(l[64]);return new qo(md,u,Ze(d),h)}r(!1,"invalid raw signature length")}if(e instanceof qo)return e.clone();const n=e.r;r(n!=null,"missing r");const s=PT(n),i=function(l,u){if(l!=null)return PT(l);if(u!=null){r(lr(u,32),"invalid yParityAndS");const d=qe(u);return d[0]&=127,Ze(d)}r(!1,"missing s")}(e.s,e.yParityAndS);r((qe(i)[0]&128)==0,"non-canonical s");const{networkV:o,v:a}=function(l,u,d){if(l!=null){const h=ct(l);return{networkV:h>=L2?h:void 0,v:qo.getNormalizedV(h)}}if(u!=null)return r(lr(u,32),"invalid yParityAndS"),{v:qe(u)[0]&128?28:27};if(d!=null){switch(mt(d,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}r(!1,"invalid yParity")}r(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),c=new qo(md,s,i,a);return o&&V(c,yd,o),r(e.yParity==null||mt(e.yParity,"sig.yParity")===c.yParity,"yParity mismatch"),r(e.yParityAndS==null||e.yParityAndS===c.yParityAndS,"yParityAndS mismatch"),c}};a0=new WeakMap,c0=new WeakMap,l0=new WeakMap,yd=new WeakMap;let Pi=hz;var Ic;const dz=class wp{constructor(e){ne(this,Ic),pe(oa(e)===32,"invalid private key","privateKey","[REDACTED]"),V(this,Ic,Ze(e))}get privateKey(){return T(this,Ic)}get publicKey(){return wp.computePublicKey(T(this,Ic))}get compressedPublicKey(){return wp.computePublicKey(T(this,Ic),!0)}sign(e){pe(oa(e)===32,"invalid digest length","digest",e);const r=Ks.sign(sn(e),sn(T(this,Ic)),{lowS:!0});return Pi.from({r:Zs(r.r,32),s:Zs(r.s,32),v:r.recovery?28:27})}computeSharedSecret(e){const r=wp.computePublicKey(e);return Ze(Ks.getSharedSecret(sn(T(this,Ic)),qe(r),!1))}static computePublicKey(e,r){let n=qe(e,"key");if(n.length===32){const i=Ks.getPublicKey(n,!!r);return Ze(i)}if(n.length===64){const i=new Uint8Array(65);i[0]=4,i.set(n,1),n=i}const s=Ks.ProjectivePoint.fromHex(n);return Ze(s.toRawBytes(r))}static recoverPublicKey(e,r){pe(oa(e)===32,"invalid digest length","digest",e);const n=Pi.from(r);let s=Ks.Signature.fromCompact(sn($t([n.r,n.s])));s=s.addRecoveryBit(n.yParity);const i=s.recoverPublicKey(sn(e));return pe(i!=null,"invalid signautre for digest","signature",r),"0x"+i.toHex(!1)}static addPoints(e,r,n){const s=Ks.ProjectivePoint.fromHex(wp.computePublicKey(e).substring(2)),i=Ks.ProjectivePoint.fromHex(wp.computePublicKey(r).substring(2));return"0x"+s.add(i).toHex(!!n)}};Ic=new WeakMap;let _o=dz;function NT(){pa.lock(),hr.lock(),Si.lock(),Cs.lock(),ga.lock(),ma.lock(),ya.lock(),Ln.lock(),dd.lock(),Cs.lock()}const fz=BigInt(0),pz=BigInt(36);function xT(t){t=t.toLowerCase();const e=t.substring(2).split(""),r=new Uint8Array(40);for(let s=0;s<40;s++)r[s]=e[s].charCodeAt(0);const n=qe(hr(r));for(let s=0;s<40;s+=2)n[s>>1]>>4>=8&&(e[s]=e[s].toUpperCase()),(n[s>>1]&15)>=8&&(e[s+1]=e[s+1].toUpperCase());return"0x"+e.join("")}const N4={};for(let t=0;t<10;t++)N4[String(t)]=String(t);for(let t=0;t<26;t++)N4[String.fromCharCode(65+t)]=String(10+t);const IT=15;function OT(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(n=>N4[n]).join("");for(;e.length>=IT;){let n=e.substring(0,IT);e=parseInt(n,10)%97+e.substring(n.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}const gz=function(){const t={};for(let e=0;e<36;e++){const r="0123456789abcdefghijklmnopqrstuvwxyz"[e];t[r]=BigInt(e)}return t}();function mz(t){t=t.toLowerCase();let e=fz;for(let r=0;r<t.length;r++)e=e*pz+gz[t[r]];return e}function Bt(t){if(pe(typeof t=="string","invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/)){t.startsWith("0x")||(t="0x"+t);const e=xT(t);return pe(!t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||e===t,"bad address checksum","address",t),e}if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){pe(t.substring(2,4)===OT(t),"bad icap checksum","address",t);let e=mz(t.substring(4)).toString(16);for(;e.length<40;)e="0"+e;return xT("0x"+e)}pe(!1,"invalid address","address",t)}function BT(t){let e=BigInt(Bt(t)).toString(36).toUpperCase();for(;e.length<30;)e="0"+e;return"XE"+OT("XE00"+e)+e}function F2(t){const e=Bt(t.from);let r=ct(t.nonce,"tx.nonce").toString(16);return r==="0"?r="0x":r.length%2?r="0x0"+r:r="0x"+r,Bt(ur(hr(da([e,r])),12))}function MT(t,e,r){const n=Bt(t),s=qe(e,"salt"),i=qe(r,"initCodeHash");return pe(s.length===32,"salt must be 32 bytes","salt",e),pe(i.length===32,"initCodeHash must be 32 bytes","initCodeHash",r),Bt(ur(hr($t(["0xff",n,s,i])),12))}function V2(t){return t&&typeof t.getAddress=="function"}function UT(t){try{return Bt(t),!0}catch{}return!1}async function x4(t,e){const r=await e;return(r==null||r==="0x0000000000000000000000000000000000000000")&&(Be(typeof t!="string","unconfigured name","UNCONFIGURED_NAME",{value:t}),pe(!1,"invalid AddressLike value; did not resolve to a value address","target",t)),Bt(r)}function an(t,e){if(typeof t=="string")return t.match(/^0x[0-9a-f]{40}$/i)?Bt(t):(Be(e!=null,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),x4(t,e.resolveName(t)));if(V2(t))return x4(t,t.getAddress());if(t&&typeof t.then=="function")return x4(t,t);pe(!1,"unsupported addressable value","target",t)}const va={};function it(t,e){let r=!1;return e<0&&(r=!0,e*=-1),new Vn(va,`${r?"":"u"}int${e}`,t,{signed:r,width:e})}function nr(t,e){return new Vn(va,`bytes${e||""}`,t,{size:e})}const LT=Symbol.for("_ethers_typed");var vd;const yz=class Cl{constructor(e,r,n,s){X(this,"type"),X(this,"value"),ne(this,vd),X(this,"_typedSymbol"),s==null&&(s=null),vo(va,e,"Typed"),rt(this,{_typedSymbol:LT,type:r,value:n}),V(this,vd,s),this.format()}format(){if(this.type==="array")throw new Error("");if(this.type==="dynamicArray")throw new Error("");return this.type==="tuple"?`tuple(${this.value.map(e=>e.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return T(this,vd)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return T(this,vd)===!0?-1:T(this,vd)===!1?this.value.length:null}static from(e,r){return new Cl(va,e,r)}static uint8(e){return it(e,8)}static uint16(e){return it(e,16)}static uint24(e){return it(e,24)}static uint32(e){return it(e,32)}static uint40(e){return it(e,40)}static uint48(e){return it(e,48)}static uint56(e){return it(e,56)}static uint64(e){return it(e,64)}static uint72(e){return it(e,72)}static uint80(e){return it(e,80)}static uint88(e){return it(e,88)}static uint96(e){return it(e,96)}static uint104(e){return it(e,104)}static uint112(e){return it(e,112)}static uint120(e){return it(e,120)}static uint128(e){return it(e,128)}static uint136(e){return it(e,136)}static uint144(e){return it(e,144)}static uint152(e){return it(e,152)}static uint160(e){return it(e,160)}static uint168(e){return it(e,168)}static uint176(e){return it(e,176)}static uint184(e){return it(e,184)}static uint192(e){return it(e,192)}static uint200(e){return it(e,200)}static uint208(e){return it(e,208)}static uint216(e){return it(e,216)}static uint224(e){return it(e,224)}static uint232(e){return it(e,232)}static uint240(e){return it(e,240)}static uint248(e){return it(e,248)}static uint256(e){return it(e,256)}static uint(e){return it(e,256)}static int8(e){return it(e,-8)}static int16(e){return it(e,-16)}static int24(e){return it(e,-24)}static int32(e){return it(e,-32)}static int40(e){return it(e,-40)}static int48(e){return it(e,-48)}static int56(e){return it(e,-56)}static int64(e){return it(e,-64)}static int72(e){return it(e,-72)}static int80(e){return it(e,-80)}static int88(e){return it(e,-88)}static int96(e){return it(e,-96)}static int104(e){return it(e,-104)}static int112(e){return it(e,-112)}static int120(e){return it(e,-120)}static int128(e){return it(e,-128)}static int136(e){return it(e,-136)}static int144(e){return it(e,-144)}static int152(e){return it(e,-152)}static int160(e){return it(e,-160)}static int168(e){return it(e,-168)}static int176(e){return it(e,-176)}static int184(e){return it(e,-184)}static int192(e){return it(e,-192)}static int200(e){return it(e,-200)}static int208(e){return it(e,-208)}static int216(e){return it(e,-216)}static int224(e){return it(e,-224)}static int232(e){return it(e,-232)}static int240(e){return it(e,-240)}static int248(e){return it(e,-248)}static int256(e){return it(e,-256)}static int(e){return it(e,-256)}static bytes1(e){return nr(e,1)}static bytes2(e){return nr(e,2)}static bytes3(e){return nr(e,3)}static bytes4(e){return nr(e,4)}static bytes5(e){return nr(e,5)}static bytes6(e){return nr(e,6)}static bytes7(e){return nr(e,7)}static bytes8(e){return nr(e,8)}static bytes9(e){return nr(e,9)}static bytes10(e){return nr(e,10)}static bytes11(e){return nr(e,11)}static bytes12(e){return nr(e,12)}static bytes13(e){return nr(e,13)}static bytes14(e){return nr(e,14)}static bytes15(e){return nr(e,15)}static bytes16(e){return nr(e,16)}static bytes17(e){return nr(e,17)}static bytes18(e){return nr(e,18)}static bytes19(e){return nr(e,19)}static bytes20(e){return nr(e,20)}static bytes21(e){return nr(e,21)}static bytes22(e){return nr(e,22)}static bytes23(e){return nr(e,23)}static bytes24(e){return nr(e,24)}static bytes25(e){return nr(e,25)}static bytes26(e){return nr(e,26)}static bytes27(e){return nr(e,27)}static bytes28(e){return nr(e,28)}static bytes29(e){return nr(e,29)}static bytes30(e){return nr(e,30)}static bytes31(e){return nr(e,31)}static bytes32(e){return nr(e,32)}static address(e){return new Cl(va,"address",e)}static bool(e){return new Cl(va,"bool",!!e)}static bytes(e){return new Cl(va,"bytes",e)}static string(e){return new Cl(va,"string",e)}static array(e,r){throw new Error("not implemented yet")}static tuple(e,r){throw new Error("not implemented yet")}static overrides(e){return new Cl(va,"overrides",Object.assign({},e))}static isTyped(e){return e&&typeof e=="object"&&"_typedSymbol"in e&&e._typedSymbol===LT}static dereference(e,r){if(Cl.isTyped(e)){if(e.type!==r)throw new Error(`invalid type: expecetd ${r}, got ${e.type}`);return e.value}return e}};vd=new WeakMap;let Vn=yz;class vz extends fa{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,r){let n=Vn.dereference(r,"string");try{n=Bt(n)}catch(s){return this._throwError(s.message,r)}return e.writeValue(n)}decode(e){return Bt(Zs(e.readValue(),20))}}class bz extends fa{constructor(e){super(e.name,e.type,"_",e.dynamic),X(this,"coder"),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,r){return this.coder.encode(e,r)}decode(e){return this.coder.decode(e)}}function FT(t,e,r){let n=[];if(Array.isArray(r))n=r;else if(r&&typeof r=="object"){let c={};n=e.map(l=>{const u=l.localName;return Be(u,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:r}),Be(!c[u],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:r}),c[u]=!0,r[u]})}else pe(!1,"invalid tuple value","tuple",r);pe(e.length===n.length,"types/value length mismatch","tuple",r);let s=new n4,i=new n4,o=[];e.forEach((c,l)=>{let u=n[l];if(c.dynamic){let d=i.length;c.encode(i,u);let h=s.writeUpdatableValue();o.push(p=>{h(p+d)})}else c.encode(s,u)}),o.forEach(c=>{c(s.length)});let a=t.appendWriter(s);return a+=t.appendWriter(i),a}function VT(t,e){let r=[],n=[],s=t.subReader(0);return e.forEach(i=>{let o=null;if(i.dynamic){let a=t.readIndex(),c=s.subReader(a);try{o=i.decode(c)}catch(l){if(Gr(l,"BUFFER_OVERRUN"))throw l;o=l,o.baseType=i.name,o.name=i.localName,o.type=i.type}}else try{o=i.decode(t)}catch(a){if(Gr(a,"BUFFER_OVERRUN"))throw a;o=a,o.baseType=i.name,o.name=i.localName,o.type=i.type}if(o==null)throw new Error("investigate");r.push(o),n.push(i.localName||null)}),cd.fromItems(r,n)}class wz extends fa{constructor(e,r,n){const s=e.type+"["+(r>=0?r:"")+"]",i=r===-1||e.dynamic;super("array",s,n,i),X(this,"coder"),X(this,"length"),rt(this,{coder:e,length:r})}defaultValue(){const e=this.coder.defaultValue(),r=[];for(let n=0;n<this.length;n++)r.push(e);return r}encode(e,r){const n=Vn.dereference(r,"array");Array.isArray(n)||this._throwError("expected array value",n);let s=this.length;s===-1&&(s=n.length,e.writeValue(n.length)),o2(n.length,s,"coder array"+(this.localName?" "+this.localName:""));let i=[];for(let o=0;o<n.length;o++)i.push(this.coder);return FT(e,i,n)}decode(e){let r=this.length;r===-1&&(r=e.readIndex(),Be(r*Kn<=e.dataLength,"insufficient data length","BUFFER_OVERRUN",{buffer:e.bytes,offset:r*Kn,length:e.dataLength}));let n=[];for(let s=0;s<r;s++)n.push(new bz(this.coder));return VT(e,n)}}class kz extends fa{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,r){const n=Vn.dereference(r,"bool");return e.writeValue(n?1:0)}decode(e){return!!e.readValue()}}class DT extends fa{constructor(e,r){super(e,e,r,!0)}defaultValue(){return"0x"}encode(e,r){r=sn(r);let n=e.writeValue(r.length);return n+=e.writeBytes(r),n}decode(e){return e.readBytes(e.readIndex(),!0)}}class Ez extends DT{constructor(e){super("bytes",e)}decode(e){return Ze(super.decode(e))}}class Az extends fa{constructor(e,r){let n="bytes"+String(e);super(n,n,r,!1),X(this,"size"),rt(this,{size:e},{size:"number"})}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+this.size*2)}encode(e,r){let n=sn(Vn.dereference(r,this.type));return n.length!==this.size&&this._throwError("incorrect data length",r),e.writeBytes(n)}decode(e){return Ze(e.readBytes(this.size))}}const _z=new Uint8Array([]);class Tz extends fa{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,r){return r!=null&&this._throwError("not null",r),e.writeBytes(_z)}decode(e){return e.readBytes(0),null}}const Cz=BigInt(0),Sz=BigInt(1),Rz=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class Pz extends fa{constructor(e,r,n){const s=(r?"int":"uint")+e*8;super(s,s,n,!1),X(this,"size"),X(this,"signed"),rt(this,{size:e,signed:r},{size:"number",signed:"boolean"})}defaultValue(){return 0}encode(e,r){let n=ct(Vn.dereference(r,this.type)),s=aa(Rz,Kn*8);if(this.signed){let i=aa(s,this.size*8-1);(n>i||n<-(i+Sz))&&this._throwError("value out-of-bounds",r),n=Wp(n,8*Kn)}else(n<Cz||n>aa(s,this.size*8))&&this._throwError("value out-of-bounds",r);return e.writeValue(n)}decode(e){let r=aa(e.readValue(),this.size*8);return this.signed&&(r=Yh(r,this.size*8)),r}}class Nz extends DT{constructor(e){super("string",e)}defaultValue(){return""}encode(e,r){return super.encode(e,qr(Vn.dereference(r,"string")))}decode(e){return la(super.decode(e))}}class D2 extends fa{constructor(e,r){let n=!1;const s=[];e.forEach(o=>{o.dynamic&&(n=!0),s.push(o.type)});const i="tuple("+s.join(",")+")";super("tuple",i,r,n),X(this,"coders"),rt(this,{coders:Object.freeze(e.slice())})}defaultValue(){const e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});const r=this.coders.reduce((n,s)=>{const i=s.localName;return i&&(n[i]||(n[i]=0),n[i]++),n},{});return this.coders.forEach((n,s)=>{let i=n.localName;!i||r[i]!==1||(i==="length"&&(i="_length"),e[i]==null&&(e[i]=e[s]))}),Object.freeze(e)}encode(e,r){const n=Vn.dereference(r,"tuple");return FT(e,this.coders,n)}decode(e){return VT(e,this.coders)}}function Ni(t){return hr(qr(t))}var xz="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI";const WT=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),jT=4;function Iz(t){let e=0;function r(){return t[e++]<<8|t[e++]}let n=r(),s=1,i=[0,1];for(let C=1;C<n;C++)i.push(s+=r());let o=r(),a=e;e+=o;let c=0,l=0;function u(){return c==0&&(l=l<<8|t[e++],c=8),l>>--c&1}const d=31,h=2**d,p=h>>>1,g=p>>1,m=h-1;let y=0;for(let C=0;C<d;C++)y=y<<1|u();let v=[],A=0,E=h;for(;;){let C=Math.floor(((y-A+1)*s-1)/E),B=0,L=n;for(;L-B>1;){let W=B+L>>>1;C<i[W]?L=W:B=W}if(B==0)break;v.push(B);let I=A+Math.floor(E*i[B]/s),M=A+Math.floor(E*i[B+1]/s)-1;for(;!((I^M)&p);)y=y<<1&m|u(),I=I<<1&m,M=M<<1&m|1;for(;I&~M&g;)y=y&p|y<<1&m>>>1|u(),I=I<<1^p,M=(M^p)<<1|p|1;A=I,E=1+M-I}let w=n-4;return v.map(C=>{switch(C-w){case 3:return w+65792+(t[a++]<<16|t[a++]<<8|t[a++]);case 2:return w+256+(t[a++]<<8|t[a++]);case 1:return w+t[a++];default:return C-1}})}function Oz(t){let e=0;return()=>t[e++]}function GT(t){return Oz(Iz(Bz(t)))}function Bz(t){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((s,i)=>e[s.charCodeAt(0)]=i);let r=t.length,n=new Uint8Array(6*r>>3);for(let s=0,i=0,o=0,a=0;s<r;s++)a=a<<6|e[t.charCodeAt(s)],o+=6,o>=8&&(n[i++]=a>>(o-=8));return n}function Mz(t){return t&1?~t>>1:t>>1}function Uz(t,e){let r=Array(t);for(let n=0,s=0;n<t;n++)r[n]=s+=Mz(e());return r}function u0(t,e=0){let r=[];for(;;){let n=t(),s=t();if(!s)break;e+=n;for(let i=0;i<s;i++)r.push(e+i);e+=s+1}return r}function zT(t){return h0(()=>{let e=u0(t);if(e.length)return e})}function $T(t){let e=[];for(;;){let r=t();if(r==0)break;e.push(Lz(r,t))}for(;;){let r=t()-1;if(r<0)break;e.push(Fz(r,t))}return e.flat()}function h0(t){let e=[];for(;;){let r=t(e.length);if(!r)break;e.push(r)}return e}function HT(t,e,r){let n=Array(t).fill().map(()=>[]);for(let s=0;s<e;s++)Uz(t,r).forEach((i,o)=>n[o].push(i));return n}function Lz(t,e){let r=1+e(),n=e(),s=h0(e);return HT(s.length,1+t,e).flatMap((i,o)=>{let[a,...c]=i;return Array(s[o]).fill().map((l,u)=>{let d=u*n;return[a+u*r,c.map(h=>h+d)]})})}function Fz(t,e){let r=1+e();return HT(r,1+t,e).map(n=>[n[0],n.slice(1)])}function Vz(t){let e=[],r=u0(t);return s(n([]),[]),e;function n(i){let o=t(),a=h0(()=>{let c=u0(t).map(l=>r[l]);if(c.length)return n(c)});return{S:o,B:a,Q:i}}function s({S:i,B:o},a,c){if(!(i&4&&c===a[a.length-1])){i&2&&(c=a[a.length-1]),i&1&&e.push(a);for(let l of o)for(let u of l.Q)s(l,[...a,u],c)}}}function Dz(t){return t.toString(16).toUpperCase().padStart(2,"0")}function ZT(t){return`{${Dz(t)}}`}function I4(t){let e=[];for(let r=0,n=t.length;r<n;){let s=t.codePointAt(r);r+=s<65536?1:2,e.push(s)}return e}function Oc(t){let e=t.length;if(e<4096)return String.fromCodePoint(...t);let r=[];for(let n=0;n<e;)r.push(String.fromCodePoint(...t.slice(n,n+=4096)));return r.join("")}function JT(t,e){let r=t.length,n=r-e.length;for(let s=0;n==0&&s<r;s++)n=t[s]-e[s];return n}var Wz="AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCOqw//AolCZdvv3dSBkEQGyelEPcMMwG1ATsN7UvYBPEGOwTJH30ZGQ/NlZwIpS3dDO0m4y6hgFoj9SqDBe1L9DzdC01RaA9ZC2UJ4zpjgU4DIQENIosK3Q05CG0Q8wrJaw3lEUUHOQPVSZoApQcBCxEdNRW1JhBirAsJOXcG+xr2C48mrxMpevwF0xohBk0BKRr/AM8u54WwWjFcHE9fBgMLJSPHFKhQIA0lQLd4SBobBxUlqQKRQ3BKh1E2HpMh9jw9DWYuE1F8B/U8BRlPC4E8nkarRQ4R0j6NPUgiSUwsBDV/LC8niwnPD4UMuXxyAVkJIQmxDHETMREXN8UIOQcZLZckJxUIIUaVYJoE958D8xPRAwsFPwlBBxMDtRwtEy4VKQUNgSTXAvM21S6zAo9WgAEXBcsPJR/fEFBH4A7pCJsCZQODJesALRUhABcimwhDYwBfj9hTBS7LCMdqbCN0A2cU52ERcweRDlcHpxwzFb8c4XDIXguGCCijrwlbAXUJmQFfBOMICTVbjKAgQWdTi1gYmyBhQT9d/AIxDGUVn0S9h3gCiw9rEhsBNQFzBzkNAQJ3Ee0RaxCVCOuGBDW1M/g6JQRPIYMgEQonA09szgsnJvkM+GkBoxJiAww0PXfuZ6tgtiQX/QcZMsVBYCHxC5JPzQycGsEYQlQuGeQHvwPzGvMn6kFXBf8DowMTOk0z7gS9C2kIiwk/AEkOoxcH1xhqCnGM0AExiwG3mQNXkYMCb48GNwcLAGcLhwV55QAdAqcIowAFAM8DVwA5Aq0HnQAZAIVBAT0DJy8BIeUCjwOTCDHLAZUvAfMpBBvDDBUA9zduSgLDsQKAamaiBd1YAo4CSTUBTSUEBU5HUQOvceEA2wBLBhPfRwEVq0rLGuNDAd9vKwDHAPsABTUHBUEBzQHzbQC3AV8LMQmis7UBTekpAIMAFWsB1wKJAN0ANQB/8QFTAE0FWfkF0wJPSQERMRgrV2EBuwMfATMBDQB5BsuNpckHHwRtB9MCEBsV4QLvLge1AQMi3xPNQsUCvd5VoWACZIECYkJbTa9bNyACofcCaJgCZgkCn4Q4GwsCZjsCZiYEbgR/A38TA36SOQY5dxc5gjojIwJsHQIyNjgKAm3HAm2u74ozZ0UrAWcA3gDhAEoFB5gMjQD+C8IADbUCdy8CdqI/AnlLQwJ4uh1c20WuRtcCfD8CesgCfQkCfPAFWQUgSABIfWMkAoFtAoAAAoAFAn+uSVhKWxUXSswC0QEC0MxLJwOITwOH5kTFkTIC8qFdAwMDrkvOTC0lA89NTE2vAos/AorYwRsHHUNnBbcCjjcCjlxAl4ECjtkCjlx4UbRTNQpS1FSFApP7ApMMAOkAHFUeVa9V0AYsGymVhjLheGZFOzkCl58C77JYIagAWSUClo8ClnycAKlZrFoJgU0AOwKWtQKWTlxEXNECmcsCmWRcyl0HGQKcmznCOp0CnBYCn5sCnriKAB0PMSoPAp3xAp6SALU9YTRh7wKe0wKgbgGpAp6fHwKeTqVjyGQnJSsCJ68CJn4CoPsCoEwCot0CocQCpi8Cpc4Cp/8AfQKn8mh8aLEAA0lqHGrRAqzjAqyuAq1nAq0CAlcdAlXcArHh1wMfTmyXArK9DQKy6Bds4G1jbUhfAyXNArZcOz9ukAMpRQK4XgK5RxUCuSp3cDZw4QK9GQK72nCWAzIRAr6IcgIDM3ECvhpzInNPAsPLAsMEc4J0SzVFdOADPKcDPJoDPb8CxXwCxkcCxhCJAshpUQLIRALJTwLJLgJknQLd0nh5YXiueSVL0AMYo2cCAmH0GfOVJHsLXpJeuxECz2sCz2wvS1PS8xOfAMatAs9zASnqA04SfksFAtwnAtuKAtJPA1JcA1NfAQEDVYyAiT8AyxbtYEWCHILTgs6DjQLaxwLZ3oQQhEmnPAOGpQAvA2QOhnFZ+QBVAt9lAt64c3cC4i/tFAHzMCcB9JsB8tKHAuvzAulweQLq+QLq5AD5RwG5Au6JAuuclqqXAwLuPwOF4Jh5cOBxoQLzAwBpA44WmZMC9xMDkW4DkocC95gC+dkC+GaaHJqruzebHgOdgwL++gEbADmfHJ+zAwWNA6ZqA6bZANHFAwZqoYiiBQkDDEkCwAA/AwDhQRdTARHzA2sHl2cFAJMtK7evvdsBiZkUfxEEOQH7KQUhDp0JnwCS/SlXxQL3AZ0AtwW5AG8LbUEuFCaNLgFDAYD8AbUmAHUDDgRtACwCFgyhAAAKAj0CagPdA34EkQEgRQUhfAoABQBEABMANhICdwEABdUDa+8KxQIA9wqfJ7+xt+UBkSFBQgHpFH8RNMCJAAQAGwBaAkUChIsABjpTOpSNbQC4Oo860ACNOME63AClAOgAywE6gTo7Ofw5+Tt2iTpbO56JOm85GAFWATMBbAUvNV01njWtNWY1dTW2NcU1gjWRNdI14TWeNa017jX9NbI1wTYCNhE1xjXVNhY2JzXeNe02LjY9Ni41LSE2OjY9Njw2yTcIBJA8VzY4Nt03IDcPNsogN4k3MAoEsDxnNiQ3GTdsOo03IULUQwdC4EMLHA8PCZsobShRVQYA6X8A6bABFCnXAukBowC9BbcAbwNzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgBFLWZAu0BhQCjBcEAbykBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUABavAj626xQAJP0A3etzuf4NNRA7efy2Z9NQrCnC0OSyANz5BBIbJ5IFDR6miIavYS6tprjjmuKebxm5C74Q225X1pkaYYPb6f1DK4k3xMEBb9S2WMjEibTNWhsRJIA+vwNVEiXTE5iXs/wezV66oFLfp9NZGYW+Gk19J2+bCT6Ye2w6LDYdgzKMUabk595eLBCXANz9HUpWbATq9vqXVx9XDg+Pc9Xp4+bsS005SVM/BJBM4687WUuf+Uj9dEi8aDNaPxtpbDxcG1THTImUMZq4UCaaNYpsVqraNyKLJXDYsFZ/5jl7bLRtO88t7P3xZaAxhb5OdPMXqsSkp1WCieG8jXm1U99+blvLlXzPCS+M93VnJCiK+09LfaSaBAVBomyDgJua8dfUzR7ga34IvR2Nvj+A9heJ6lsl1KG4NkI1032Cnff1m1wof2B9oHJK4bi6JkEdSqeNeiuo6QoZZincoc73/TH9SXF8sCE7XyuYyW8WSgbGFCjPV0ihLKhdPs08Tx82fYAkLLc4I2wdl4apY7GU5lHRFzRWJep7Ww3wbeA3qmd59/86P4xuNaqDpygXt6M85glSBHOCGgJDnt+pN9bK7HApMguX6+06RZNjzVmcZJ+wcUrJ9//bpRNxNuKpNl9uFds+S9tdx7LaM5ZkIrPj6nIU9mnbFtVbs9s/uLgl8MVczAwet+iOEzzBlYW7RCMgE6gyNLeq6+1tIx4dpgZnd0DksJS5f+JNDpwwcPNXaaVspq1fbQajOrJgK0ofKtJ1Ne90L6VO4MOl5S886p7u6xo7OLjG8TGL+HU1JXGJgppg4nNbNJ5nlzSpuPYy21JUEcUA94PoFiZfjZue+QnyQ80ekOuZVkxx4g+cvhJfHgNl4hy1/a6+RKcKlar/J29y//EztlbVPHVUeQ1zX86eQVAjR/M3dA9w4W8LfaXp4EgM85wOWasli837PzVMOnsLzR+k3o75/lRPAJSE1xAKQzEi5v10ke+VBvRt1cwQRMd+U5mLCTGVd6XiZtgBG5cDi0w22GKcVNvHiu5LQbZEDVtz0onn7k5+heuKXVsZtSzilkLRAUmjMXEMB3J9YC50XBxPiz53SC+EhnPl9WsKCv92SM/OFFIMJZYfl0WW8tIO3UxYcwdMAj7FSmgrsZ2aAZO03BOhP1bNNZItyXYQFTpC3SG1VuPDqH9GkiCDmE+JwxyIVSO5siDErAOpEXFgjy6PQtOVDj+s6e1r8heWVvmZnTciuf4EiNZzCAd7SOMhXERIOlsHIMG399i9aLTy3m2hRLZjJVDNLS53iGIK11dPqQt0zBDyg6qc7YqkDm2M5Ve6dCWCaCbTXX2rToaIgz6+zh4lYUi/+6nqcFMAkQJKHYLK0wYk5N9szV6xihDbDDFr45lN1K4aCXBq/FitPSud9gLt5ZVn+ZqGX7cwm2z5EGMgfFpIFyhGGuDPmso6TItTMwny+7uPnLCf4W6goFQFV0oQSsc9VfMmVLcLr6ZetDZbaSFTLqnSO/bIPjA3/zAUoqgGFAEQS4IhuMzEp2I3jJzbzkk/IEmyax+rhZTwd6f+CGtwPixu8IvzACquPWPREu9ZvGkUzpRwvRRuaNN6cr0W1wWits9ICdYJ7ltbgMiSL3sTPeufgNcVqMVWFkCPDH4jG2jA0XcVgQj62Cb29v9f/z/+2KbYvIv/zzjpQAPkliaVDzNrW57TZ/ZOyZD0nlfMmAIBIAGAI0D3k/mdN4xr9v85ZbZbbqfH2jGd5hUqNZWwl5SPfoGmfElmazUIeNL1j/mkF7VNAzTq4jNt8JoQ11NQOcmhprXoxSxfRGJ9LDEOAQ+dmxAQH90iti9e2u/MoeuaGcDTHoC+xsmEeWmxEKefQuIzHbpw5Tc5cEocboAD09oipWQhtTO1wivf/O+DRe2rpl/E9wlrzBorjJsOeG1B/XPW4EaJEFdNlECEZga5ZoGRHXgYouGRuVkm8tDESiEyFNo+3s5M5puSdTyUL2llnINVHEt91XUNW4ewdMgJ4boJfEyt/iY5WXqbA+A2Fkt5Z0lutiWhe9nZIyIUjyXDC3UsaG1t+eNx6z4W/OYoTB7A6x+dNSTOi9AInctbESqm5gvOLww7OWXPrmHwVZasrl4eD113pm+JtT7JVOvnCXqdzzdTRHgJ0PiGTFYW5Gvt9R9LD6Lzfs0v/TZZHSmyVNq7viIHE6DBK7Qp07Iz55EM8SYtQvZf/obBniTWi5C2/ovHfw4VndkE5XYdjOhCMRjDeOEfXeN/CwfGduiUIfsoFeUxXeQXba7c7972XNv8w+dTjjUM0QeNAReW+J014dKAD/McQYXT7c0GQPIkn3Ll6R7gGjuiQoZD0TEeEqQpKoZ15g/0OPQI17QiSv9AUROa/V/TQN3dvLArec3RrsYlvBm1b8LWzltdugsC50lNKYLEp2a+ZZYqPejULRlOJh5zj/LVMyTDvwKhMxxwuDkxJ1QpoNI0OTWLom4Z71SNzI9TV1iXJrIu9Wcnd+MCaAw8o1jSXd94YU/1gnkrC9BUEOtQvEIQ7g0i6h+KL2JKk8Ydl7HruvgWMSAmNe+LshGhV4qnWHhO9/RIPQzY1tHRj2VqOyNsDpK0cww+56AdDC4gsWwY0XxoucIWIqs/GcwnWqlaT0KPr8mbK5U94/301i1WLt4YINTVvCFBrFZbIbY8eycOdeJ2teD5IfPLCRg7jjcFTwlMFNl9zdh/o3E/hHPwj7BWg0MU09pPrBLbrCgm54A6H+I6v27+jL5gkjWg/iYdks9jbfVP5y/n0dlgWEMlKasl7JvFZd56LfybW1eeaVO0gxTfXZwD8G4SI116yx7UKVRgui6Ya1YpixqXeNLc8IxtAwCU5IhwQgn+NqHnRaDv61CxKhOq4pOX7M6pkA+Pmpd4j1vn6ACUALoLLc4vpXci8VidLxzm7qFBe7s+quuJs6ETYmnpgS3LwSZxPIltgBDXz8M1k/W2ySNv2f9/NPhxLGK2D21dkHeSGmenRT3Yqcdl0m/h3OYr8V+lXNYGf8aCCpd4bWjE4QIPj7vUKN4Nrfs7ML6Y2OyS830JCnofg/k7lpFpt4SqZc5HGg1HCOrHvOdC8bP6FGDbE/VV0mX4IakzbdS/op+Kt3G24/8QbBV7y86sGSQ/vZzU8FXs7u6jIvwchsEP2BpIhW3G8uWNwa3HmjfH/ZjhhCWvluAcF+nMf14ClKg5hGgtPLJ98ueNAkc5Hs2WZlk2QHvfreCK1CCGO6nMZVSb99VM/ajr8WHTte9JSmkXq/i/U943HEbdzW6Re/S88dKgg8pGOLlAeNiqrcLkUR3/aClFpMXcOUP3rmETcWSfMXZE3TUOi8i+fqRnTYLflVx/Vb/6GJ7eIRZUA6k3RYR3iFSK9c4iDdNwJuZL2FKz/IK5VimcNWEqdXjSoxSgmF0UPlDoUlNrPcM7ftmA8Y9gKiqKEHuWN+AZRIwtVSxye2Kf8rM3lhJ5XcBXU9n4v0Oy1RU2M+4qM8AQPVwse8ErNSob5oFPWxuqZnVzo1qB/IBxkM3EVUKFUUlO3e51259GgNcJbCmlvrdjtoTW7rChm1wyCKzpCTwozUUEOIcWLneRLgMXh+SjGSFkAllzbGS5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g";const d0=44032,W2=4352,j2=4449,G2=4519,QT=19,YT=21,bd=28,z2=YT*bd,jz=QT*z2,Gz=d0+jz,zz=W2+QT,$z=j2+YT,Hz=G2+bd;function f0(t){return t>>24&255}function KT(t){return t&16777215}let O4,qT,B4,$2;function Zz(){let t=GT(Wz);O4=new Map(zT(t).flatMap((e,r)=>e.map(n=>[n,r+1<<24]))),qT=new Set(u0(t)),B4=new Map,$2=new Map;for(let[e,r]of $T(t)){if(!qT.has(e)&&r.length==2){let[n,s]=r,i=$2.get(n);i||(i=new Map,$2.set(n,i)),i.set(s,e)}B4.set(e,r.reverse())}}function XT(t){return t>=d0&&t<Gz}function Jz(t,e){if(t>=W2&&t<zz&&e>=j2&&e<$z)return d0+(t-W2)*z2+(e-j2)*bd;if(XT(t)&&e>G2&&e<Hz&&(t-d0)%bd==0)return t+(e-G2);{let r=$2.get(t);return r&&(r=r.get(e),r)?r:-1}}function eC(t){O4||Zz();let e=[],r=[],n=!1;function s(i){let o=O4.get(i);o&&(n=!0,i|=o),e.push(i)}for(let i of t)for(;;){if(i<128)e.push(i);else if(XT(i)){let o=i-d0,a=o/z2|0,c=o%z2/bd|0,l=o%bd;s(W2+a),s(j2+c),l>0&&s(G2+l)}else{let o=B4.get(i);o?r.push(...o):s(i)}if(!r.length)break;i=r.pop()}if(n&&e.length>1){let i=f0(e[0]);for(let o=1;o<e.length;o++){let a=f0(e[o]);if(a==0||i<=a){i=a;continue}let c=o-1;for(;;){let l=e[c+1];if(e[c+1]=e[c],e[c]=l,!c||(i=f0(e[--c]),i<=a))break}i=f0(e[o])}}return e}function Qz(t){let e=[],r=[],n=-1,s=0;for(let i of t){let o=f0(i),a=KT(i);if(n==-1)o==0?n=a:e.push(a);else if(s>0&&s>=o)o==0?(e.push(n,...r),r.length=0,n=a):r.push(a),s=o;else{let c=Jz(n,a);c>=0?n=c:s==0&&o==0?(e.push(n),n=a):(r.push(a),s=o)}}return n>=0&&e.push(n,...r),e}function H2(t){return eC(t).map(KT)}function wd(t){return Qz(eC(t))}const tC=45,Yz=46,Z2=".",rC=65039,nC=1,J2=t=>Array.from(t);function p0(t,e){return t.P.has(e)||t.Q.has(e)}class Kz extends Array{get is_emoji(){return!0}}let Q2,M4,ru,U4,sC,iC,kd,L4,Ed,Bc,F4,V4;function Ad(){if(Q2)return;let t=GT(xz);const e=()=>u0(t),r=()=>new Set(e()),n=(u,d)=>d.forEach(h=>u.add(h));Q2=new Map($T(t)),M4=r(),ru=e(),U4=new Set(e().map(u=>ru[u])),ru=new Set(ru),sC=r(),iC=r();let s=zT(t),i=t();const o=()=>{let u=new Set;return e().forEach(d=>n(u,s[d])),n(u,e()),u};kd=h0(u=>{let d=h0(t).map(h=>h+96);if(d.length){let h=u>=i;d[0]-=32,d=Oc(d),h&&(d=`Restricted[${d}]`);let p=o(),g=o(),m=!t();return{N:d,P:p,Q:g,M:m,R:h}}}),L4=r(),Ed=new Map;let a=e().concat(J2(L4)).sort((u,d)=>u-d);a.forEach((u,d)=>{let h=t(),p=a[d]=h?a[d-h]:{V:[],M:new Map};p.V.push(u),L4.has(u)||Ed.set(u,p)});for(let{V:u,M:d}of new Set(Ed.values())){let h=[];for(let g of u){let m=kd.filter(v=>p0(v,g)),y=h.find(({G:v})=>m.some(A=>v.has(A)));y||(y={G:new Set,V:[]},h.push(y)),y.V.push(g),n(y.G,m)}let p=h.flatMap(g=>J2(g.G));for(let{G:g,V:m}of h){let y=new Set(p.filter(v=>!g.has(v)));for(let v of m)d.set(v,y)}}Bc=new Set;let c=new Set;const l=u=>Bc.has(u)?c.add(u):Bc.add(u);for(let u of kd){for(let d of u.P)l(d);for(let d of u.Q)l(d)}for(let u of Bc)!Ed.has(u)&&!c.has(u)&&Ed.set(u,nC);n(Bc,H2(Bc)),F4=Vz(t).map(u=>Kz.from(u)).sort(JT),V4=new Map;for(let u of F4){let d=[V4];for(let h of u){let p=d.map(g=>{let m=g.get(h);return m||(m=new Map,g.set(h,m)),m});h===rC?d.push(...p):d=p}for(let h of d)h.V=u}}function D4(t){return(j4(t)?"":`${W4(g0([t]))} `)+ZT(t)}function W4(t){return`"${t}"`}function qz(t){if(t.length>=4&&t[2]==tC&&t[3]==tC)throw new Error(`invalid label extension: "${Oc(t.slice(0,4))}"`)}function Xz(t){for(let e=t.lastIndexOf(95);e>0;)if(t[--e]!==95)throw new Error("underscore allowed only at start")}function e$(t){let e=t[0],r=WT.get(e);if(r)throw m0(`leading ${r}`);let n=t.length,s=-1;for(let i=1;i<n;i++){e=t[i];let o=WT.get(e);if(o){if(s==i)throw m0(`${r} + ${o}`);s=i+1,r=o}}if(s==n)throw m0(`trailing ${r}`)}function g0(t,e=1/0,r=ZT){let n=[];oC(t[0])&&n.push("◌"),t.length>e&&(e>>=1,t=[...t.slice(0,e),8230,...t.slice(-e)]);let s=0,i=t.length;for(let o=0;o<i;o++){let a=t[o];j4(a)&&(n.push(Oc(t.slice(s,o))),n.push(r(a)),s=o+1)}return n.push(Oc(t.slice(s,i))),n.join("")}function oC(t){return Ad(),ru.has(t)}function j4(t){return Ad(),sC.has(t)}function t$(){return Ad(),F4.map(t=>t.slice())}function r$(t,e){Ad();let r=e?H2:wd;return t.split(Z2).map(n=>Oc(hC(I4(n),r,Y2).flat())).join(Z2)}function aC(t){return cC(G4(t,wd,Y2))}function n$(t){let e=G4(t,wd,r=>r);for(let{type:r,output:n,error:s}of e){if(s)break;r!=="Greek"&&s$(n,958,926)}return cC(e)}function s$(t,e,r){let n=0;for(;;){let s=t.indexOf(e,n);if(s<0)break;t[s]=r,n=s+1}}function i$(t,e){return G4(t,wd,e?r=>r.slice():Y2)}function G4(t,e,r){if(!t)return[];Ad();let n=0;return t.split(Z2).map(s=>{let i=I4(s),o={input:i,offset:n};n+=i.length+1;try{let a=o.tokens=hC(i,e,r),c=a.length,l;if(!c)throw new Error("empty label");let u=o.output=a.flat();if(Xz(u),!(o.emoji=c>1||a[0].is_emoji)&&u.every(d=>d<128))qz(u),l="ASCII";else{let d=a.flatMap(h=>h.is_emoji?[]:h);if(!d.length)l="Emoji";else{if(ru.has(u[0]))throw m0("leading combining mark");for(let g=1;g<c;g++){let m=a[g];if(!m.is_emoji&&ru.has(m[0]))throw m0(`emoji + combining mark: "${Oc(a[g-1])} + ${g0([m[0]])}"`)}e$(u);let h=J2(new Set(d)),[p]=a$(h);c$(p,d),o$(p,h),l=p.N}}o.type=l}catch(a){o.error=a}return o})}function o$(t,e){let r,n=[];for(let s of e){let i=Ed.get(s);if(i===nC)return;if(i){let o=i.M.get(s);if(r=r?r.filter(a=>o.has(a)):J2(o),!r.length)return}else n.push(s)}if(r){for(let s of r)if(n.every(i=>p0(s,i)))throw new Error(`whole-script confusable: ${t.N}/${s.N}`)}}function a$(t){let e=kd;for(let r of t){let n=e.filter(s=>p0(s,r));if(!n.length)throw kd.some(s=>p0(s,r))?uC(e[0],r):lC(r);if(e=n,n.length==1)break}return e}function cC(t){return t.map(({input:e,error:r,output:n})=>{if(r){let s=r.message;throw new Error(t.length==1?s:`Invalid label ${W4(g0(e,63))}: ${s}`)}return Oc(n)}).join(Z2)}function lC(t){return new Error(`disallowed character: ${D4(t)}`)}function uC(t,e){let r=D4(e),n=kd.find(s=>s.P.has(e));return n&&(r=`${n.N} ${r}`),new Error(`illegal mixture: ${t.N} + ${r}`)}function m0(t){return new Error(`illegal placement: ${t}`)}function c$(t,e){for(let r of e)if(!p0(t,r))throw uC(t,r);if(t.M){let r=H2(e);for(let n=1,s=r.length;n<s;n++)if(U4.has(r[n])){let i=n+1;for(let o;i<s&&U4.has(o=r[i]);i++)for(let a=n;a<i;a++)if(r[a]==o)throw new Error(`duplicate non-spacing marks: ${D4(o)}`);if(i-n>jT)throw new Error(`excessive non-spacing marks: ${W4(g0(r.slice(n-1,i)))} (${i-n}/${jT})`);n=i}}}function hC(t,e,r){let n=[],s=[];for(t=t.slice().reverse();t.length;){let i=dC(t);if(i)s.length&&(n.push(e(s)),s=[]),n.push(r(i));else{let o=t.pop();if(Bc.has(o))s.push(o);else{let a=Q2.get(o);if(a)s.push(...a);else if(!M4.has(o))throw lC(o)}}}return s.length&&n.push(e(s)),n}function Y2(t){return t.filter(e=>e!=rC)}function dC(t,e){let r=V4,n,s=t.length;for(;s&&(r=r.get(t[--s]),!!r);){let{V:i}=r;i&&(n=i,e&&e.push(...t.slice(s).reverse()),t.length=s)}return n}const y0="valid",fC="mapped",z4="ignored",l$="disallowed",u$="emoji",h$="nfc",d$="stop";function pC(t,{nf:e=!0}={}){Ad();let r=I4(t).reverse(),n=[],s=[];for(;r.length;){let i=dC(r,n);if(i)s.push({type:u$,emoji:i.slice(),input:n,cps:Y2(i)}),n=[];else{let o=r.pop();if(o==Yz)s.push({type:d$,cp:o});else if(Bc.has(o))s.push({type:y0,cps:[o]});else if(M4.has(o))s.push({type:z4,cp:o});else{let a=Q2.get(o);a?s.push({type:fC,cp:o,cps:a.slice()}):s.push({type:l$,cp:o})}}}if(e)for(let i=0,o=-1;i<s.length;i++){let a=s[i];if($4(a.type))if(gC(a.cps)){let c=i+1;for(let h=c;h<s.length;h++){let{type:p,cps:g}=s[h];if($4(p)){if(!gC(g))break;c=h+1}else if(p!==z4)break}o<0&&(o=i);let l=s.slice(o,c),u=l.flatMap(h=>$4(h.type)?h.cps:[]),d=wd(u);JT(d,u)?(s.splice(o,c-o,{type:h$,input:u,cps:d,tokens0:mC(l),tokens:pC(Oc(d),{nf:!1})}),i=o):i=c-1,o=-1}else o=i;else a.type!==z4&&(o=-1)}return mC(s)}function $4(t){return t==y0||t==fC}function gC(t){return t.some(e=>iC.has(e))}function mC(t){for(let e=0;e<t.length;e++)if(t[e].type==y0){let r=e+1;for(;r<t.length&&t[r].type==y0;)r++;t.splice(e,r-e,{type:y0,cps:t.slice(e,r).flatMap(n=>n.cps)})}return t}const f$=Object.freeze(Object.defineProperty({__proto__:null,ens_beautify:n$,ens_emoji:t$,ens_normalize:aC,ens_normalize_fragment:r$,ens_split:i$,ens_tokenize:pC,is_combining_mark:oC,nfc:wd,nfd:H2,safe_str_from_cps:g0,should_escape:j4},Symbol.toStringTag,{value:"Module"})),yC=new Uint8Array(32);yC.fill(0);function vC(t){return pe(t.length!==0,"invalid ENS name; empty component","comp",t),t}function H4(t){const e=qr(Z4(t)),r=[];if(t.length===0)return r;let n=0;for(let s=0;s<e.length;s++)e[s]===46&&(r.push(vC(e.slice(n,s))),n=s+1);return pe(n<e.length,"invalid ENS name; empty component","name",t),r.push(vC(e.slice(n))),r}function Z4(t){try{if(t.length===0)throw new Error("empty label");return aC(t)}catch(e){pe(!1,`invalid ENS name (${e.message})`,"name",t)}}function bC(t){try{return H4(t).length!==0}catch{}return!1}function v0(t){pe(typeof t=="string","invalid ENS name; not a string","name",t),pe(t.length,"invalid ENS name (empty label)","name",t);let e=yC;const r=H4(t);for(;r.length;)e=hr($t([e,hr(r.pop())]));return Ze(e)}function J4(t,e){const r=e??63;return pe(r<=255,"DNS encoded label cannot exceed 255","length",r),Ze($t(H4(t).map(n=>{pe(n.length<=r,`label ${JSON.stringify(t)} exceeds ${r} bytes`,"name",t);const s=new Uint8Array(n.length+1);return s.set(n,1),s[0]=s.length-1,s})))+"00"}function Q4(t,e){return{address:Bt(t),storageKeys:e.map((r,n)=>(pe(lr(r,32),"invalid slot",`storageKeys[${n}]`,r),r.toLowerCase()))}}function To(t){if(Array.isArray(t))return t.map((r,n)=>Array.isArray(r)?(pe(r.length===2,"invalid slot set",`value[${n}]`,r),Q4(r[0],r[1])):(pe(r!=null&&typeof r=="object","invalid address-slot set","value",t),Q4(r.address,r.storageKeys)));pe(t!=null&&typeof t=="object","invalid access list","value",t);const e=Object.keys(t).map(r=>{const n=t[r].reduce((s,i)=>(s[i]=!0,s),{});return Q4(r,Object.keys(n).sort())});return e.sort((r,n)=>r.address.localeCompare(n.address)),e}function nu(t){let e;return typeof t=="string"?e=_o.computePublicKey(t,!1):e=t.publicKey,Bt(hr("0x"+e.substring(4)).substring(26))}function b0(t,e){return nu(_o.recoverPublicKey(t,e))}const pn=BigInt(0),p$=BigInt(2),g$=BigInt(27),m$=BigInt(28),y$=BigInt(35),v$=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Y4=4096*32;function wC(t,e){let r=t.toString(16);for(;r.length<2;)r="0"+r;return r+=Ln(e).substring(4),"0x"+r}function K2(t){return t==="0x"?null:Bt(t)}function K4(t,e){try{return To(t)}catch(r){pe(!1,r.message,e,t)}}function w0(t,e){return t==="0x"?0:mt(t,e)}function $r(t,e){if(t==="0x")return pn;const r=ct(t,e);return pe(r<=v$,"value exceeds uint size",e,r),r}function kr(t,e){const r=ct(t,"value"),n=on(r);return pe(n.length<=32,"value too large",`tx.${e}`,r),n}function q4(t){return To(t).map(e=>[e.address,e.storageKeys])}function b$(t,e){pe(Array.isArray(t),`invalid ${e}`,"value",t);for(let r=0;r<t.length;r++)pe(lr(t[r],32),"invalid ${ param } hash",`value[${r}]`,t[r]);return t}function w$(t){const e=ad(t);pe(Array.isArray(e)&&(e.length===9||e.length===6),"invalid field count for legacy transaction","data",t);const r={type:0,nonce:w0(e[0],"nonce"),gasPrice:$r(e[1],"gasPrice"),gasLimit:$r(e[2],"gasLimit"),to:K2(e[3]),value:$r(e[4],"value"),data:Ze(e[5]),chainId:pn};if(e.length===6)return r;const n=$r(e[6],"v"),s=$r(e[7],"r"),i=$r(e[8],"s");if(s===pn&&i===pn)r.chainId=n;else{let o=(n-y$)/p$;o<pn&&(o=pn),r.chainId=o,pe(o!==pn||n===g$||n===m$,"non-canonical legacy v","v",e[6]),r.signature=Pi.from({r:Hs(e[7],32),s:Hs(e[8],32),v:n})}return r}function k$(t,e){const r=[kr(t.nonce,"nonce"),kr(t.gasPrice||0,"gasPrice"),kr(t.gasLimit,"gasLimit"),t.to||"0x",kr(t.value,"value"),t.data];let n=pn;if(t.chainId!=pn)n=ct(t.chainId,"tx.chainId"),pe(!e||e.networkV==null||e.legacyChainId===n,"tx.chainId/sig.v mismatch","sig",e);else if(t.signature){const i=t.signature.legacyChainId;i!=null&&(n=i)}if(!e)return n!==pn&&(r.push(on(n)),r.push("0x"),r.push("0x")),da(r);let s=BigInt(27+e.yParity);return n!==pn?s=Pi.getChainIdV(n,e.v):BigInt(e.v)!==s&&pe(!1,"tx.chainId/sig.v mismatch","sig",e),r.push(on(s)),r.push(on(e.r)),r.push(on(e.s)),da(r)}function X4(t,e){let r;try{if(r=w0(e[0],"yParity"),r!==0&&r!==1)throw new Error("bad yParity")}catch{pe(!1,"invalid yParity","yParity",e[0])}const n=Hs(e[1],32),s=Hs(e[2],32),i=Pi.from({r:n,s,yParity:r});t.signature=i}function E$(t){const e=ad(qe(t).slice(1));pe(Array.isArray(e)&&(e.length===9||e.length===12),"invalid field count for transaction type: 2","data",Ze(t));const r={type:2,chainId:$r(e[0],"chainId"),nonce:w0(e[1],"nonce"),maxPriorityFeePerGas:$r(e[2],"maxPriorityFeePerGas"),maxFeePerGas:$r(e[3],"maxFeePerGas"),gasPrice:null,gasLimit:$r(e[4],"gasLimit"),to:K2(e[5]),value:$r(e[6],"value"),data:Ze(e[7]),accessList:K4(e[8],"accessList")};return e.length===9||X4(r,e.slice(9)),r}function A$(t,e){const r=[kr(t.chainId,"chainId"),kr(t.nonce,"nonce"),kr(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),kr(t.maxFeePerGas||0,"maxFeePerGas"),kr(t.gasLimit,"gasLimit"),t.to||"0x",kr(t.value,"value"),t.data,q4(t.accessList||[])];return e&&(r.push(kr(e.yParity,"yParity")),r.push(on(e.r)),r.push(on(e.s))),$t(["0x02",da(r)])}function _$(t){const e=ad(qe(t).slice(1));pe(Array.isArray(e)&&(e.length===8||e.length===11),"invalid field count for transaction type: 1","data",Ze(t));const r={type:1,chainId:$r(e[0],"chainId"),nonce:w0(e[1],"nonce"),gasPrice:$r(e[2],"gasPrice"),gasLimit:$r(e[3],"gasLimit"),to:K2(e[4]),value:$r(e[5],"value"),data:Ze(e[6]),accessList:K4(e[7],"accessList")};return e.length===8||X4(r,e.slice(8)),r}function T$(t,e){const r=[kr(t.chainId,"chainId"),kr(t.nonce,"nonce"),kr(t.gasPrice||0,"gasPrice"),kr(t.gasLimit,"gasLimit"),t.to||"0x",kr(t.value,"value"),t.data,q4(t.accessList||[])];return e&&(r.push(kr(e.yParity,"recoveryParam")),r.push(on(e.r)),r.push(on(e.s))),$t(["0x01",da(r)])}function C$(t){let e=ad(qe(t).slice(1)),r="3",n=null;if(e.length===4&&Array.isArray(e[0])){r="3 (network format)";const i=e[1],o=e[2],a=e[3];pe(Array.isArray(i),"invalid network format: blobs not an array","fields[1]",i),pe(Array.isArray(o),"invalid network format: commitments not an array","fields[2]",o),pe(Array.isArray(a),"invalid network format: proofs not an array","fields[3]",a),pe(i.length===o.length,"invalid network format: blobs/commitments length mismatch","fields",e),pe(i.length===a.length,"invalid network format: blobs/proofs length mismatch","fields",e),n=[];for(let c=0;c<e[1].length;c++)n.push({data:i[c],commitment:o[c],proof:a[c]});e=e[0]}pe(Array.isArray(e)&&(e.length===11||e.length===14),`invalid field count for transaction type: ${r}`,"data",Ze(t));const s={type:3,chainId:$r(e[0],"chainId"),nonce:w0(e[1],"nonce"),maxPriorityFeePerGas:$r(e[2],"maxPriorityFeePerGas"),maxFeePerGas:$r(e[3],"maxFeePerGas"),gasPrice:null,gasLimit:$r(e[4],"gasLimit"),to:K2(e[5]),value:$r(e[6],"value"),data:Ze(e[7]),accessList:K4(e[8],"accessList"),maxFeePerBlobGas:$r(e[9],"maxFeePerBlobGas"),blobVersionedHashes:e[10]};n&&(s.blobs=n),pe(s.to!=null,`invalid address for transaction type: ${r}`,"data",t),pe(Array.isArray(s.blobVersionedHashes),"invalid blobVersionedHashes: must be an array","data",t);for(let i=0;i<s.blobVersionedHashes.length;i++)pe(lr(s.blobVersionedHashes[i],32),`invalid blobVersionedHash at index ${i}: must be length 32`,"data",t);return e.length===11||X4(s,e.slice(11)),s}function S$(t,e,r){const n=[kr(t.chainId,"chainId"),kr(t.nonce,"nonce"),kr(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),kr(t.maxFeePerGas||0,"maxFeePerGas"),kr(t.gasLimit,"gasLimit"),t.to||tu,kr(t.value,"value"),t.data,q4(t.accessList||[]),kr(t.maxFeePerBlobGas||0,"maxFeePerBlobGas"),b$(t.blobVersionedHashes||[],"blobVersionedHashes")];return e&&(n.push(kr(e.yParity,"yParity")),n.push(on(e.r)),n.push(on(e.s)),r)?$t(["0x03",da([n,r.map(s=>s.data),r.map(s=>s.commitment),r.map(s=>s.proof)])]):$t(["0x03",da(n)])}var ba,k0,E0,A0,_0,T0,C0,S0,R0,P0,N0,x0,_d,su,Mc,iu,I0,q2;const R$=class Sl{constructor(){ne(this,I0),ne(this,ba),ne(this,k0),ne(this,E0),ne(this,A0),ne(this,_0),ne(this,T0),ne(this,C0),ne(this,S0),ne(this,R0),ne(this,P0),ne(this,N0),ne(this,x0),ne(this,_d),ne(this,su),ne(this,Mc),ne(this,iu),V(this,ba,null),V(this,k0,null),V(this,A0,0),V(this,_0,pn),V(this,T0,null),V(this,C0,null),V(this,S0,null),V(this,E0,"0x"),V(this,R0,pn),V(this,P0,pn),V(this,N0,null),V(this,x0,null),V(this,_d,null),V(this,su,null),V(this,iu,null),V(this,Mc,null)}get type(){return T(this,ba)}set type(e){switch(e){case null:V(this,ba,null);break;case 0:case"legacy":V(this,ba,0);break;case 1:case"berlin":case"eip-2930":V(this,ba,1);break;case 2:case"london":case"eip-1559":V(this,ba,2);break;case 3:case"cancun":case"eip-4844":V(this,ba,3);break;default:pe(!1,"unsupported transaction type","type",e)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844"}return null}get to(){const e=T(this,k0);return e==null&&this.type===3?tu:e}set to(e){V(this,k0,e==null?null:Bt(e))}get nonce(){return T(this,A0)}set nonce(e){V(this,A0,mt(e,"value"))}get gasLimit(){return T(this,_0)}set gasLimit(e){V(this,_0,ct(e))}get gasPrice(){const e=T(this,T0);return e==null&&(this.type===0||this.type===1)?pn:e}set gasPrice(e){V(this,T0,e==null?null:ct(e,"gasPrice"))}get maxPriorityFeePerGas(){return T(this,C0)??(this.type===2||this.type===3?pn:null)}set maxPriorityFeePerGas(e){V(this,C0,e==null?null:ct(e,"maxPriorityFeePerGas"))}get maxFeePerGas(){return T(this,S0)??(this.type===2||this.type===3?pn:null)}set maxFeePerGas(e){V(this,S0,e==null?null:ct(e,"maxFeePerGas"))}get data(){return T(this,E0)}set data(e){V(this,E0,Ze(e))}get value(){return T(this,R0)}set value(e){V(this,R0,ct(e,"value"))}get chainId(){return T(this,P0)}set chainId(e){V(this,P0,ct(e))}get signature(){return T(this,N0)||null}set signature(e){V(this,N0,e==null?null:Pi.from(e))}get accessList(){return(T(this,x0)||null)??(this.type===1||this.type===2||this.type===3?[]:null)}set accessList(e){V(this,x0,e==null?null:To(e))}get maxFeePerBlobGas(){const e=T(this,_d);return e==null&&this.type===3?pn:e}set maxFeePerBlobGas(e){V(this,_d,e==null?null:ct(e,"maxFeePerBlobGas"))}get blobVersionedHashes(){let e=T(this,su);return e==null&&this.type===3?[]:e}set blobVersionedHashes(e){if(e!=null){pe(Array.isArray(e),"blobVersionedHashes must be an Array","value",e),e=e.slice();for(let r=0;r<e.length;r++)pe(lr(e[r],32),"invalid blobVersionedHash",`value[${r}]`,e[r])}V(this,su,e)}get blobs(){return T(this,iu)==null?null:T(this,iu).map(e=>Object.assign({},e))}set blobs(e){if(e==null){V(this,iu,null);return}const r=[],n=[];for(let s=0;s<e.length;s++){const i=e[s];if(Jh(i)){Be(T(this,Mc),"adding a raw blob requires a KZG library","UNSUPPORTED_OPERATION",{operation:"set blobs()"});let o=qe(i);if(pe(o.length<=Y4,"blob is too large",`blobs[${s}]`,i),o.length!==Y4){const l=new Uint8Array(Y4);l.set(o),o=l}const a=T(this,Mc).blobToKzgCommitment(o),c=Ze(T(this,Mc).computeBlobKzgProof(o,a));r.push({data:Ze(o),commitment:Ze(a),proof:c}),n.push(wC(1,a))}else{const o=Ze(i.commitment);r.push({data:Ze(i.data),commitment:o,proof:Ze(i.proof)}),n.push(wC(1,o))}}V(this,iu,r),V(this,su,n)}get kzg(){return T(this,Mc)}set kzg(e){V(this,Mc,e)}get hash(){return this.signature==null?null:hr(ve(this,I0,q2).call(this,!0,!1))}get unsignedHash(){return hr(this.unsignedSerialized)}get from(){return this.signature==null?null:b0(this.unsignedHash,this.signature)}get fromPublicKey(){return this.signature==null?null:_o.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return this.signature!=null}get serialized(){return ve(this,I0,q2).call(this,!0,!0)}get unsignedSerialized(){return ve(this,I0,q2).call(this,!1,!1)}inferType(){const e=this.inferTypes();return e.indexOf(2)>=0?2:e.pop()}inferTypes(){const e=this.gasPrice!=null,r=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,n=this.accessList!=null,s=T(this,_d)!=null||T(this,su);this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&Be(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),Be(!r||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),Be(this.type!==0||!n,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const i=[];return this.type!=null?i.push(this.type):r?i.push(2):e?(i.push(1),n||i.push(0)):n?(i.push(1),i.push(2)):(s&&this.to||(i.push(0),i.push(1),i.push(2)),i.push(3)),i.sort(),i}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}clone(){return Sl.from(this)}toJSON(){const e=r=>r==null?null:r.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(e==null)return new Sl;if(typeof e=="string"){const n=qe(e);if(n[0]>=127)return Sl.from(w$(n));switch(n[0]){case 1:return Sl.from(_$(n));case 2:return Sl.from(E$(n));case 3:return Sl.from(C$(n))}Be(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const r=new Sl;return e.type!=null&&(r.type=e.type),e.to!=null&&(r.to=e.to),e.nonce!=null&&(r.nonce=e.nonce),e.gasLimit!=null&&(r.gasLimit=e.gasLimit),e.gasPrice!=null&&(r.gasPrice=e.gasPrice),e.maxPriorityFeePerGas!=null&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas),e.maxFeePerGas!=null&&(r.maxFeePerGas=e.maxFeePerGas),e.maxFeePerBlobGas!=null&&(r.maxFeePerBlobGas=e.maxFeePerBlobGas),e.data!=null&&(r.data=e.data),e.value!=null&&(r.value=e.value),e.chainId!=null&&(r.chainId=e.chainId),e.signature!=null&&(r.signature=Pi.from(e.signature)),e.accessList!=null&&(r.accessList=e.accessList),e.blobVersionedHashes!=null&&(r.blobVersionedHashes=e.blobVersionedHashes),e.kzg!=null&&(r.kzg=e.kzg),e.blobs!=null&&(r.blobs=e.blobs),e.hash!=null&&(pe(r.isSigned(),"unsigned transaction cannot define '.hash'","tx",e),pe(r.hash===e.hash,"hash mismatch","tx",e)),e.from!=null&&(pe(r.isSigned(),"unsigned transaction cannot define '.from'","tx",e),pe(r.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),r}};ba=new WeakMap,k0=new WeakMap,E0=new WeakMap,A0=new WeakMap,_0=new WeakMap,T0=new WeakMap,C0=new WeakMap,S0=new WeakMap,R0=new WeakMap,P0=new WeakMap,N0=new WeakMap,x0=new WeakMap,_d=new WeakMap,su=new WeakMap,Mc=new WeakMap,iu=new WeakMap,I0=new WeakSet,q2=function(t,e){Be(!t||this.signature!=null,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"});const r=t?this.signature:null;switch(this.inferType()){case 0:return k$(this,r);case 1:return T$(this,r);case 2:return A$(this,r);case 3:return S$(this,r,e?this.blobs:null)}Be(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})};let Td=R$;function X2(t){return typeof t=="string"&&(t=qr(t)),hr($t([qr(P4),qr(String(t.length)),t]))}function kC(t,e){const r=X2(t);return b0(r,e)}const P$=new RegExp("^bytes([0-9]+)$"),N$=new RegExp("^(u?int)([0-9]*)$"),x$=new RegExp("^(.*)\\[([0-9]*)\\]$");function EC(t,e,r){switch(t){case"address":return qe(r?Hs(e,32):Bt(e));case"string":return qr(e);case"bytes":return qe(e);case"bool":return e=e?"0x01":"0x00",qe(r?Hs(e,32):e)}let n=t.match(N$);if(n){let s=n[1]==="int",i=parseInt(n[2]||"256");return pe((!n[2]||n[2]===String(i))&&i%8===0&&i!==0&&i<=256,"invalid number type","type",t),r&&(i=256),s&&(e=Wp(e,i)),qe(Hs(on(e),i/8))}if(n=t.match(P$),n){const s=parseInt(n[1]);return pe(String(s)===n[1]&&s!==0&&s<=32,"invalid bytes type","type",t),pe(oa(e)===s,`invalid value for ${t}`,"value",e),r?qe(Dp(e,32)):e}if(n=t.match(x$),n&&Array.isArray(e)){const s=n[1],i=parseInt(n[2]||String(e.length));pe(i===e.length,`invalid array length for ${t}`,"value",e);const o=[];return e.forEach(function(a){o.push(EC(s,a,!0))}),qe($t(o))}pe(!1,"invalid type","type",t)}function ey(t,e){pe(t.length===e.length,"wrong number of values; expected ${ types.length }","values",e);const r=[];return t.forEach(function(n,s){r.push(EC(n,e[s]))}),Ze($t(r))}function AC(t,e){return hr(ey(t,e))}function _C(t,e){return Ln(ey(t,e))}const TC=new Uint8Array(32);TC.fill(0);const I$=BigInt(-1),CC=BigInt(0),SC=BigInt(1),O$=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function B$(t){const e=qe(t),r=e.length%32;return r?$t([e,TC.slice(r)]):Ze(e)}const M$=Zs(SC,32),U$=Zs(CC,32),RC={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},e5=["name","version","chainId","verifyingContract","salt"];function PC(t){return function(e){return pe(typeof e=="string",`invalid domain value for ${JSON.stringify(t)}`,`domain.${t}`,e),e}}const L$={name:PC("name"),version:PC("version"),chainId:function(t){const e=ct(t,"domain.chainId");return pe(e>=0,"invalid chain ID","domain.chainId",t),Number.isSafeInteger(e)?Number(e):ca(e)},verifyingContract:function(t){try{return Bt(t).toLowerCase()}catch{}pe(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){const e=qe(t,"domain.salt");return pe(e.length===32,'invalid domain value "salt"',"domain.salt",t),Ze(e)}};function t5(t){{const e=t.match(/^(u?)int(\d+)$/);if(e){const r=e[1]==="",n=parseInt(e[2]);pe(n%8===0&&n!==0&&n<=256&&e[2]===String(n),"invalid numeric width","type",t);const s=aa(O$,r?n-1:n),i=r?(s+SC)*I$:CC;return function(o){const a=ct(o,"value");return pe(a>=i&&a<=s,`value out-of-bounds for ${t}`,"value",a),Zs(r?Wp(a,256):a,32)}}}{const e=t.match(/^bytes(\d+)$/);if(e){const r=parseInt(e[1]);return pe(r!==0&&r<=32&&e[1]===String(r),"invalid bytes width","type",t),function(n){const s=qe(n);return pe(s.length===r,`invalid length for ${t}`,"value",n),B$(n)}}}switch(t){case"address":return function(e){return Hs(Bt(e),32)};case"bool":return function(e){return e?M$:U$};case"bytes":return function(e){return hr(e)};case"string":return function(e){return Ni(e)}}return null}function NC(t,e){return`${t}(${e.map(({name:r,type:n})=>n+" "+r).join(",")})`}function ty(t){const e=t.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return e?{base:e[1],index:e[2]+e[4],array:{base:e[1],prefix:e[1]+e[2],count:e[5]?parseInt(e[5]):-1}}:{base:t}}var ry,Uc,O0,r5,xC;const F$=class so{constructor(e){ne(this,r5),X(this,"primaryType"),ne(this,ry),ne(this,Uc),ne(this,O0),V(this,Uc,new Map),V(this,O0,new Map);const r=new Map,n=new Map,s=new Map,i={};Object.keys(e).forEach(c=>{i[c]=e[c].map(({name:l,type:u})=>{let{base:d,index:h}=ty(u);return d==="int"&&!e.int&&(d="int256"),d==="uint"&&!e.uint&&(d="uint256"),{name:l,type:d+(h||"")}}),r.set(c,new Set),n.set(c,[]),s.set(c,new Set)}),V(this,ry,JSON.stringify(i));for(const c in i){const l=new Set;for(const u of i[c]){pe(!l.has(u.name),`duplicate variable name ${JSON.stringify(u.name)} in ${JSON.stringify(c)}`,"types",e),l.add(u.name);const d=ty(u.type).base;pe(d!==c,`circular type reference to ${JSON.stringify(d)}`,"types",e),!t5(d)&&(pe(n.has(d),`unknown type ${JSON.stringify(d)}`,"types",e),n.get(d).push(c),r.get(c).add(d))}}const o=Array.from(n.keys()).filter(c=>n.get(c).length===0);pe(o.length!==0,"missing primary type","types",e),pe(o.length===1,`ambiguous primary types or unused types: ${o.map(c=>JSON.stringify(c)).join(", ")}`,"types",e),rt(this,{primaryType:o[0]});function a(c,l){pe(!l.has(c),`circular type reference to ${JSON.stringify(c)}`,"types",e),l.add(c);for(const u of r.get(c))if(n.has(u)){a(u,l);for(const d of l)s.get(d).add(u)}l.delete(c)}a(this.primaryType,new Set);for(const[c,l]of s){const u=Array.from(l);u.sort(),T(this,Uc).set(c,NC(c,i[c])+u.map(d=>NC(d,i[d])).join(""))}}get types(){return JSON.parse(T(this,ry))}getEncoder(e){let r=T(this,O0).get(e);return r||(r=ve(this,r5,xC).call(this,e),T(this,O0).set(e,r)),r}encodeType(e){const r=T(this,Uc).get(e);return pe(r,`unknown type: ${JSON.stringify(e)}`,"name",e),r}encodeData(e,r){return this.getEncoder(e)(r)}hashStruct(e,r){return hr(this.encodeData(e,r))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,r,n){if(t5(e))return n(e,r);const s=ty(e).array;if(s)return pe(s.count===-1||s.count===r.length,`array length mismatch; expected length ${s.count}`,"value",r),r.map(o=>this._visit(s.prefix,o,n));const i=this.types[e];if(i)return i.reduce((o,{name:a,type:c})=>(o[a]=this._visit(c,r[a],n),o),{});pe(!1,`unknown type: ${e}`,"type",e)}visit(e,r){return this._visit(this.primaryType,e,r)}static from(e){return new so(e)}static getPrimaryType(e){return so.from(e).primaryType}static hashStruct(e,r,n){return so.from(r).hashStruct(e,n)}static hashDomain(e){const r=[];for(const n in e){if(e[n]==null)continue;const s=RC[n];pe(s,`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),r.push({name:n,type:s})}return r.sort((n,s)=>e5.indexOf(n.name)-e5.indexOf(s.name)),so.hashStruct("EIP712Domain",{EIP712Domain:r},e)}static encode(e,r,n){return $t(["0x1901",so.hashDomain(e),so.from(r).hash(n)])}static hash(e,r,n){return hr(so.encode(e,r,n))}static async resolveNames(e,r,n,s){e=Object.assign({},e);for(const a in e)e[a]==null&&delete e[a];const i={};e.verifyingContract&&!lr(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const o=so.from(r);o.visit(n,(a,c)=>(a==="address"&&!lr(c,20)&&(i[c]="0x"),c));for(const a in i)i[a]=await s(a);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),n=o.visit(n,(a,c)=>a==="address"&&i[c]?i[c]:c),{domain:e,value:n}}static getPayload(e,r,n){so.hashDomain(e);const s={},i=[];e5.forEach(c=>{const l=e[c];l!=null&&(s[c]=L$[c](l),i.push({name:c,type:RC[c]}))});const o=so.from(r);r=o.types;const a=Object.assign({},r);return pe(a.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",r),a.EIP712Domain=i,o.encode(n),{types:a,domain:s,primaryType:o.primaryType,message:o.visit(n,(c,l)=>{if(c.match(/^bytes(\d*)/))return Ze(qe(l));if(c.match(/^u?int/))return ct(l).toString();switch(c){case"address":return l.toLowerCase();case"bool":return!!l;case"string":return pe(typeof l=="string","invalid string","value",l),l}pe(!1,"unsupported type","type",c)})}}};ry=new WeakMap,Uc=new WeakMap,O0=new WeakMap,r5=new WeakSet,xC=function(t){{const n=t5(t);if(n)return n}const e=ty(t).array;if(e){const n=e.prefix,s=this.getEncoder(n);return i=>{pe(e.count===-1||e.count===i.length,`array length mismatch; expected length ${e.count}`,"value",i);let o=i.map(s);return T(this,Uc).has(n)&&(o=o.map(hr)),hr($t(o))}}const r=this.types[t];if(r){const n=Ni(T(this,Uc).get(t));return s=>{const i=r.map(({name:o,type:a})=>{const c=this.getEncoder(a)(s[o]);return T(this,Uc).has(a)?hr(c):c});return i.unshift(n),$t(i)}}pe(!1,`unknown type: ${t}`,"type",t)};let ou=F$;function IC(t,e,r,n){return b0(ou.hash(t,e,r),n)}function Xn(t){const e=new Set;return t.forEach(r=>e.add(r)),Object.freeze(e)}const V$="external public payable override",D$=Xn(V$.split(" ")),OC="constant external internal payable private public pure view override",W$=Xn(OC.split(" ")),BC="constructor error event fallback function receive struct",MC=Xn(BC.split(" ")),UC="calldata memory storage payable indexed",j$=Xn(UC.split(" ")),G$="tuple returns",z$=[BC,UC,G$,OC].join(" "),$$=Xn(z$.split(" ")),H$={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},Z$=new RegExp("^(\\s*)"),J$=new RegExp("^([0-9]+)"),Q$=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),LC=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),FC=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");var Dn,Co,ny,n5;const VC=class GV{constructor(e){ne(this,ny),ne(this,Dn),ne(this,Co),V(this,Dn,0),V(this,Co,e.slice())}get offset(){return T(this,Dn)}get length(){return T(this,Co).length-T(this,Dn)}clone(){return new GV(T(this,Co))}reset(){V(this,Dn,0)}popKeyword(e){const r=this.peek();if(r.type!=="KEYWORD"||!e.has(r.text))throw new Error(`expected keyword ${r.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const r=this.peek();throw new Error(`expected ${e}; got ${r.type} ${JSON.stringify(r.text)}`)}return this.pop().text}popParen(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const r=ve(this,ny,n5).call(this,T(this,Dn)+1,e.match+1);return V(this,Dn,e.match+1),r}popParams(){const e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");const r=[];for(;T(this,Dn)<e.match-1;){const n=this.peek().linkNext;r.push(ve(this,ny,n5).call(this,T(this,Dn)+1,n)),V(this,Dn,n)}return V(this,Dn,e.match+1),r}peek(){if(T(this,Dn)>=T(this,Co).length)throw new Error("out-of-bounds");return T(this,Co)[T(this,Dn)]}peekKeyword(e){const r=this.peekType("KEYWORD");return r!=null&&e.has(r)?r:null}peekType(e){if(this.length===0)return null;const r=this.peek();return r.type===e?r.text:null}pop(){const e=this.peek();return yo(this,Dn)._++,e}toString(){const e=[];for(let r=T(this,Dn);r<T(this,Co).length;r++){const n=T(this,Co)[r];e.push(`${n.type}:${n.text}`)}return`<TokenString ${e.join(" ")}>`}};Dn=new WeakMap,Co=new WeakMap,ny=new WeakSet,n5=function(t=0,e=0){return new VC(T(this,Co).slice(t,e).map(r=>Object.freeze(Object.assign({},r,{match:r.match-t,linkBack:r.linkBack-t,linkNext:r.linkNext-t}))))};let wa=VC;function Lc(t){const e=[],r=o=>{const a=i<t.length?JSON.stringify(t[i]):"$EOI";throw new Error(`invalid token ${a} at ${i}: ${o}`)};let n=[],s=[],i=0;for(;i<t.length;){let o=t.substring(i),a=o.match(Z$);a&&(i+=a[1].length,o=t.substring(i));const c={depth:n.length,linkBack:-1,linkNext:-1,match:-1,type:"",text:"",offset:i,value:-1};e.push(c);let l=H$[o[0]]||"";if(l){if(c.type=l,c.text=o[0],i++,l==="OPEN_PAREN")n.push(e.length-1),s.push(e.length-1);else if(l=="CLOSE_PAREN")n.length===0&&r("no matching open bracket"),c.match=n.pop(),e[c.match].match=e.length-1,c.depth--,c.linkBack=s.pop(),e[c.linkBack].linkNext=e.length-1;else if(l==="COMMA")c.linkBack=s.pop(),e[c.linkBack].linkNext=e.length-1,s.push(e.length-1);else if(l==="OPEN_BRACKET")c.type="BRACKET";else if(l==="CLOSE_BRACKET"){let u=e.pop().text;if(e.length>0&&e[e.length-1].type==="NUMBER"){const d=e.pop().text;u=d+u,e[e.length-1].value=mt(d)}if(e.length===0||e[e.length-1].type!=="BRACKET")throw new Error("missing opening bracket");e[e.length-1].text+=u}continue}if(a=o.match(Q$),a){if(c.text=a[1],i+=c.text.length,$$.has(c.text)){c.type="KEYWORD";continue}if(c.text.match(FC)){c.type="TYPE";continue}c.type="ID";continue}if(a=o.match(J$),a){c.text=a[1],c.type="NUMBER",i+=c.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(o[0])} at position ${i}`)}return new wa(e.map(o=>Object.freeze(o)))}function DC(t,e){let r=[];for(const n in e.keys())t.has(n)&&r.push(n);if(r.length>1)throw new Error(`conflicting types: ${r.join(", ")}`)}function sy(t,e){if(e.peekKeyword(MC)){const r=e.pop().text;if(r!==t)throw new Error(`expected ${t}, got ${r}`)}return e.popType("ID")}function ka(t,e){const r=new Set;for(;;){const n=t.peekType("KEYWORD");if(n==null||e&&!e.has(n))break;if(t.pop(),r.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}function WC(t){let e=ka(t,W$);return DC(e,Xn("constant payable nonpayable".split(" "))),DC(e,Xn("pure view payable nonpayable".split(" "))),e.has("view")?"view":e.has("pure")?"pure":e.has("payable")?"payable":e.has("nonpayable")?"nonpayable":e.has("constant")?"view":"nonpayable"}function Ea(t,e){return t.popParams().map(r=>An.from(r,e))}function jC(t){if(t.peekType("AT")){if(t.pop(),t.peekType("NUMBER"))return ct(t.pop().text);throw new Error("invalid gas")}return null}function au(t){if(t.length)throw new Error(`unexpected tokens at offset ${t.offset}: ${t.toString()}`)}const Y$=new RegExp(/^(.*)\[([0-9]*)\]$/);function GC(t){const e=t.match(FC);if(pe(e,"invalid type","type",t),t==="uint")return"uint256";if(t==="int")return"int256";if(e[2]){const r=parseInt(e[2]);pe(r!==0&&r<=32,"invalid bytes length","type",t)}else if(e[3]){const r=parseInt(e[3]);pe(r!==0&&r<=256&&r%8===0,"invalid numeric width","type",t)}return t}const Ur={},ds=Symbol.for("_ethers_internal"),zC="_ParamTypeInternal",$C="_ErrorInternal",HC="_EventInternal",ZC="_ConstructorInternal",JC="_FallbackInternal",QC="_FunctionInternal",YC="_StructInternal";var B0,iy;const K$=class io{constructor(e,r,n,s,i,o,a,c){if(ne(this,B0),X(this,"name"),X(this,"type"),X(this,"baseType"),X(this,"indexed"),X(this,"components"),X(this,"arrayLength"),X(this,"arrayChildren"),vo(e,Ur,"ParamType"),Object.defineProperty(this,ds,{value:zC}),o&&(o=Object.freeze(o.slice())),s==="array"){if(a==null||c==null)throw new Error("")}else if(a!=null||c!=null)throw new Error("");if(s==="tuple"){if(o==null)throw new Error("")}else if(o!=null)throw new Error("");rt(this,{name:r,type:n,baseType:s,indexed:i,components:o,arrayLength:a,arrayChildren:c})}format(e){if(e==null&&(e="sighash"),e==="json"){const n=this.name||"";if(this.isArray()){const i=JSON.parse(this.arrayChildren.format("json"));return i.name=n,i.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(i)}const s={type:this.baseType==="tuple"?"tuple":this.type,name:n};return typeof this.indexed=="boolean"&&(s.indexed=this.indexed),this.isTuple()&&(s.components=this.components.map(i=>JSON.parse(i.format(e)))),JSON.stringify(s)}let r="";return this.isArray()?(r+=this.arrayChildren.format(e),r+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?r+="("+this.components.map(n=>n.format(e)).join(e==="full"?", ":",")+")":r+=this.type,e!=="sighash"&&(this.indexed===!0&&(r+=" indexed"),e==="full"&&this.name&&(r+=" "+this.name)),r}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(e,r){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const n=this;return e.map(s=>n.arrayChildren.walk(s,r))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const n=this;return e.map((s,i)=>n.components[i].walk(s,r))}return r(this.type,e)}async walkAsync(e,r){const n=[],s=[e];return ve(this,B0,iy).call(this,n,e,r,i=>{s[0]=i}),n.length&&await Promise.all(n),s[0]}static from(e,r){if(io.isParamType(e))return e;if(typeof e=="string")try{return io.from(Lc(e),r)}catch{pe(!1,"invalid param type","obj",e)}else if(e instanceof wa){let a="",c="",l=null;ka(e,Xn(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(c="tuple",l=e.popParams().map(g=>io.from(g)),a=`tuple(${l.map(g=>g.format()).join(",")})`):(a=GC(e.popType("TYPE")),c=a);let u=null,d=null;for(;e.length&&e.peekType("BRACKET");){const g=e.pop();u=new io(Ur,"",a,c,null,l,d,u),d=g.value,a+=g.text,c="array",l=null}let h=null;if(ka(e,j$).has("indexed")){if(!r)throw new Error("");h=!0}const p=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new io(Ur,p,a,c,h,l,d,u)}const n=e.name;pe(!n||typeof n=="string"&&n.match(LC),"invalid name","obj.name",n);let s=e.indexed;s!=null&&(pe(r,"parameter cannot be indexed","obj.indexed",e.indexed),s=!!s);let i=e.type,o=i.match(Y$);if(o){const a=parseInt(o[2]||"-1"),c=io.from({type:o[1],components:e.components});return new io(Ur,n||"",i,"array",s,null,a,c)}if(i==="tuple"||i.startsWith("tuple(")||i.startsWith("(")){const a=e.components!=null?e.components.map(c=>io.from(c)):null;return new io(Ur,n||"",i,"tuple",s,a,null,null)}return i=GC(e.type),new io(Ur,n||"",i,i,s,null,null,null)}static isParamType(e){return e&&e[ds]===zC}};B0=new WeakSet,iy=function(t,e,r,n){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const i=this.arrayChildren,o=e.slice();o.forEach((a,c)=>{var l;ve(l=i,B0,iy).call(l,t,a,r,u=>{o[c]=u})}),n(o);return}if(this.isTuple()){const i=this.components;let o;if(Array.isArray(e))o=e.slice();else{if(e==null||typeof e!="object")throw new Error("invalid tuple value");o=i.map(a=>{if(!a.name)throw new Error("cannot use object value with unnamed components");if(!(a.name in e))throw new Error(`missing value for component ${a.name}`);return e[a.name]})}if(o.length!==this.components.length)throw new Error("array is wrong length");o.forEach((a,c)=>{var l;ve(l=i[c],B0,iy).call(l,t,a,r,u=>{o[c]=u})}),n(o);return}const s=r(this.type,e);s.then?t.push(async function(){n(await s)}()):n(s)};let An=K$;class Aa{constructor(e,r,n){X(this,"type"),X(this,"inputs"),vo(e,Ur,"Fragment"),n=Object.freeze(n.slice()),rt(this,{type:r,inputs:n})}static from(e){if(typeof e=="string"){try{Aa.from(JSON.parse(e))}catch{}return Aa.from(Lc(e))}if(e instanceof wa)switch(e.peekKeyword(MC)){case"constructor":return Ii.from(e);case"error":return xi.from(e);case"event":return qs.from(e);case"fallback":case"receive":return Oi.from(e);case"function":return Xs.from(e);case"struct":return _a.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return Ii.from(e);case"error":return xi.from(e);case"event":return qs.from(e);case"fallback":case"receive":return Oi.from(e);case"function":return Xs.from(e);case"struct":return _a.from(e)}Be(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}pe(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return Ii.isFragment(e)}static isError(e){return xi.isFragment(e)}static isEvent(e){return qs.isFragment(e)}static isFunction(e){return Xs.isFragment(e)}static isStruct(e){return _a.isFragment(e)}}class Cd extends Aa{constructor(e,r,n,s){super(e,r,s),X(this,"name"),pe(typeof n=="string"&&n.match(LC),"invalid identifier","name",n),s=Object.freeze(s.slice()),rt(this,{name:n})}}function M0(t,e){return"("+e.map(r=>r.format(t)).join(t==="full"?", ":",")+")"}let xi=class B1 extends Cd{constructor(e,r,n){super(e,"error",r,n),Object.defineProperty(this,ds,{value:$C})}get selector(){return Ni(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});const r=[];return e!=="sighash"&&r.push("error"),r.push(this.name+M0(e,this.inputs)),r.join(" ")}static from(e){if(B1.isFragment(e))return e;if(typeof e=="string")return B1.from(Lc(e));if(e instanceof wa){const r=sy("error",e),n=Ea(e);return au(e),new B1(Ur,r,n)}return new B1(Ur,e.name,e.inputs?e.inputs.map(An.from):[])}static isFragment(e){return e&&e[ds]===$C}};class qs extends Cd{constructor(e,r,n,s){super(e,"event",r,n),X(this,"anonymous"),Object.defineProperty(this,ds,{value:HC}),rt(this,{anonymous:s})}get topicHash(){return Ni(this.format("sighash"))}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});const r=[];return e!=="sighash"&&r.push("event"),r.push(this.name+M0(e,this.inputs)),e!=="sighash"&&this.anonymous&&r.push("anonymous"),r.join(" ")}static getTopicHash(e,r){return r=(r||[]).map(n=>An.from(n)),new qs(Ur,e,r,!1).topicHash}static from(e){if(qs.isFragment(e))return e;if(typeof e=="string")try{return qs.from(Lc(e))}catch{pe(!1,"invalid event fragment","obj",e)}else if(e instanceof wa){const r=sy("event",e),n=Ea(e,!0),s=!!ka(e,Xn(["anonymous"])).has("anonymous");return au(e),new qs(Ur,r,n,s)}return new qs(Ur,e.name,e.inputs?e.inputs.map(r=>An.from(r,!0)):[],!!e.anonymous)}static isFragment(e){return e&&e[ds]===HC}}class Ii extends Aa{constructor(e,r,n,s,i){super(e,r,n),X(this,"payable"),X(this,"gas"),Object.defineProperty(this,ds,{value:ZC}),rt(this,{payable:s,gas:i})}format(e){if(Be(e!=null&&e!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),e==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});const r=[`constructor${M0(e,this.inputs)}`];return this.payable&&r.push("payable"),this.gas!=null&&r.push(`@${this.gas.toString()}`),r.join(" ")}static from(e){if(Ii.isFragment(e))return e;if(typeof e=="string")try{return Ii.from(Lc(e))}catch{pe(!1,"invalid constuctor fragment","obj",e)}else if(e instanceof wa){ka(e,Xn(["constructor"]));const r=Ea(e),n=!!ka(e,D$).has("payable"),s=jC(e);return au(e),new Ii(Ur,"constructor",r,n,s)}return new Ii(Ur,"constructor",e.inputs?e.inputs.map(An.from):[],!!e.payable,e.gas!=null?e.gas:null)}static isFragment(e){return e&&e[ds]===ZC}}class Oi extends Aa{constructor(e,r,n){super(e,"fallback",r),X(this,"payable"),Object.defineProperty(this,ds,{value:JC}),rt(this,{payable:n})}format(e){const r=this.inputs.length===0?"receive":"fallback";if(e==="json"){const n=this.payable?"payable":"nonpayable";return JSON.stringify({type:r,stateMutability:n})}return`${r}()${this.payable?" payable":""}`}static from(e){if(Oi.isFragment(e))return e;if(typeof e=="string")try{return Oi.from(Lc(e))}catch{pe(!1,"invalid fallback fragment","obj",e)}else if(e instanceof wa){const r=e.toString(),n=e.peekKeyword(Xn(["fallback","receive"]));if(pe(n,"type must be fallback or receive","obj",r),e.popKeyword(Xn(["fallback","receive"]))==="receive"){const o=Ea(e);return pe(o.length===0,"receive cannot have arguments","obj.inputs",o),ka(e,Xn(["payable"])),au(e),new Oi(Ur,[],!0)}let s=Ea(e);s.length?pe(s.length===1&&s[0].type==="bytes","invalid fallback inputs","obj.inputs",s.map(o=>o.format("minimal")).join(", ")):s=[An.from("bytes")];const i=WC(e);if(pe(i==="nonpayable"||i==="payable","fallback cannot be constants","obj.stateMutability",i),ka(e,Xn(["returns"])).has("returns")){const o=Ea(e);pe(o.length===1&&o[0].type==="bytes","invalid fallback outputs","obj.outputs",o.map(a=>a.format("minimal")).join(", "))}return au(e),new Oi(Ur,s,i==="payable")}if(e.type==="receive")return new Oi(Ur,[],!0);if(e.type==="fallback"){const r=[An.from("bytes")],n=e.stateMutability==="payable";return new Oi(Ur,r,n)}pe(!1,"invalid fallback description","obj",e)}static isFragment(e){return e&&e[ds]===JC}}class Xs extends Cd{constructor(e,r,n,s,i,o){super(e,"function",r,s),X(this,"constant"),X(this,"outputs"),X(this,"stateMutability"),X(this,"payable"),X(this,"gas"),Object.defineProperty(this,ds,{value:QC}),i=Object.freeze(i.slice()),rt(this,{constant:n==="view"||n==="pure",gas:o,outputs:i,payable:n==="payable",stateMutability:n})}get selector(){return Ni(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});const r=[];return e!=="sighash"&&r.push("function"),r.push(this.name+M0(e,this.inputs)),e!=="sighash"&&(this.stateMutability!=="nonpayable"&&r.push(this.stateMutability),this.outputs&&this.outputs.length&&(r.push("returns"),r.push(M0(e,this.outputs))),this.gas!=null&&r.push(`@${this.gas.toString()}`)),r.join(" ")}static getSelector(e,r){return r=(r||[]).map(n=>An.from(n)),new Xs(Ur,e,"view",r,[],null).selector}static from(e){if(Xs.isFragment(e))return e;if(typeof e=="string")try{return Xs.from(Lc(e))}catch{pe(!1,"invalid function fragment","obj",e)}else if(e instanceof wa){const n=sy("function",e),s=Ea(e),i=WC(e);let o=[];ka(e,Xn(["returns"])).has("returns")&&(o=Ea(e));const a=jC(e);return au(e),new Xs(Ur,n,i,s,o,a)}let r=e.stateMutability;return r==null&&(r="payable",typeof e.constant=="boolean"?(r="view",e.constant||(r="payable",typeof e.payable=="boolean"&&!e.payable&&(r="nonpayable"))):typeof e.payable=="boolean"&&!e.payable&&(r="nonpayable")),new Xs(Ur,e.name,r,e.inputs?e.inputs.map(An.from):[],e.outputs?e.outputs.map(An.from):[],e.gas!=null?e.gas:null)}static isFragment(e){return e&&e[ds]===QC}}class _a extends Cd{constructor(e,r,n){super(e,"struct",r,n),Object.defineProperty(this,ds,{value:YC})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return _a.from(Lc(e))}catch{pe(!1,"invalid struct fragment","obj",e)}else if(e instanceof wa){const r=sy("struct",e),n=Ea(e);return au(e),new _a(Ur,r,n)}return new _a(Ur,e.name,e.inputs?e.inputs.map(An.from):[])}static isFragment(e){return e&&e[ds]===YC}}const Bi=new Map;Bi.set(0,"GENERIC_PANIC"),Bi.set(1,"ASSERT_FALSE"),Bi.set(17,"OVERFLOW"),Bi.set(18,"DIVIDE_BY_ZERO"),Bi.set(33,"ENUM_RANGE_ERROR"),Bi.set(34,"BAD_STORAGE_DATA"),Bi.set(49,"STACK_UNDERFLOW"),Bi.set(50,"ARRAY_RANGE_ERROR"),Bi.set(65,"OUT_OF_MEMORY"),Bi.set(81,"UNINITIALIZED_FUNCTION_CALL");const q$=new RegExp(/^bytes([0-9]*)$/),X$=new RegExp(/^(u?int)([0-9]*)$/);let s5=null,KC=1024;function eH(t,e,r,n){let s="missing revert data",i=null;const o=null;let a=null;if(r){s="execution reverted";const l=qe(r);if(r=Ze(r),l.length===0)s+=" (no data present; likely require(false) occurred",i="require(false)";else if(l.length%32!==4)s+=" (could not decode reason; invalid data length)";else if(Ze(l.slice(0,4))==="0x08c379a0")try{i=n.decode(["string"],l.slice(4))[0],a={signature:"Error(string)",name:"Error",args:[i]},s+=`: ${JSON.stringify(i)}`}catch{s+=" (could not decode reason; invalid string data)"}else if(Ze(l.slice(0,4))==="0x4e487b71")try{const u=Number(n.decode(["uint256"],l.slice(4))[0]);a={signature:"Panic(uint256)",name:"Panic",args:[u]},i=`Panic due to ${Bi.get(u)||"UNKNOWN"}(${u})`,s+=`: ${i}`}catch{s+=" (could not decode panic code)"}else s+=" (unknown custom error)"}const c={to:e.to?Bt(e.to):null,data:e.data||"0x"};return e.from&&(c.from=Bt(e.from)),yr(s,"CALL_EXCEPTION",{action:t,data:r,reason:i,transaction:c,invocation:o,revert:a})}var cu,Sd;const tH=class DA{constructor(){ne(this,cu)}getDefaultValue(e){const r=e.map(n=>ve(this,cu,Sd).call(this,An.from(n)));return new D2(r,"_").defaultValue()}encode(e,r){o2(r.length,e.length,"types/values length mismatch");const n=e.map(o=>ve(this,cu,Sd).call(this,An.from(o))),s=new D2(n,"_"),i=new n4;return s.encode(i,r),i.data}decode(e,r,n){const s=e.map(i=>ve(this,cu,Sd).call(this,An.from(i)));return new D2(s,"_").decode(new rj(r,n,KC))}static _setDefaultMaxInflation(e){pe(typeof e=="number"&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),KC=e}static defaultAbiCoder(){return s5==null&&(s5=new DA),s5}static getBuiltinCallException(e,r,n){return eH(e,r,n,DA.defaultAbiCoder())}};cu=new WeakSet,Sd=function(t){if(t.isArray())return new wz(ve(this,cu,Sd).call(this,t.arrayChildren),t.arrayLength,t.name);if(t.isTuple())return new D2(t.components.map(r=>ve(this,cu,Sd).call(this,r)),t.name);switch(t.baseType){case"address":return new vz(t.name);case"bool":return new kz(t.name);case"string":return new Nz(t.name);case"bytes":return new Ez(t.name);case"":return new Tz(t.name)}let e=t.type.match(X$);if(e){let r=parseInt(e[2]||"256");return pe(r!==0&&r<=256&&r%8===0,"invalid "+e[1]+" bit length","param",t),new Pz(r/8,e[1]==="int",t.name)}if(e=t.type.match(q$),e){let r=parseInt(e[1]);return pe(r!==0&&r<=32,"invalid bytes length","param",t),new Az(r,t.name)}pe(!1,"invalid type","type",t.type)};let Rd=tH;function qC(t){const e=qr(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return Dp(e,32)}function XC(t){const e=qe(t,"bytes");if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;e[r-1]===0;)r--;return la(e.slice(0,r))}class i5{constructor(e,r,n){X(this,"fragment"),X(this,"name"),X(this,"signature"),X(this,"topic"),X(this,"args");const s=e.name,i=e.format();rt(this,{fragment:e,name:s,signature:i,topic:r,args:n})}}class o5{constructor(e,r,n,s){X(this,"fragment"),X(this,"name"),X(this,"args"),X(this,"signature"),X(this,"selector"),X(this,"value");const i=e.name,o=e.format();rt(this,{fragment:e,name:i,args:n,signature:o,selector:r,value:s})}}class a5{constructor(e,r,n){X(this,"fragment"),X(this,"name"),X(this,"args"),X(this,"signature"),X(this,"selector");const s=e.name,i=e.format();rt(this,{fragment:e,name:s,args:n,signature:i,selector:r})}}class oy{constructor(e){X(this,"hash"),X(this,"_isIndexed"),rt(this,{hash:e,_isIndexed:!0})}static isIndexed(e){return!!(e&&e._isIndexed)}}const eS={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},tS={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:t=>`reverted with reason string ${JSON.stringify(t)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:t=>{let e="unknown panic code";return t>=0&&t<=255&&eS[t.toString()]&&(e=eS[t.toString()]),`reverted with panic code 0x${t.toString(16)} (${e})`}}};var Ta,Ca,Sa,es,Fc,ay,cy;const rH=class kp{constructor(e){ne(this,Fc),X(this,"fragments"),X(this,"deploy"),X(this,"fallback"),X(this,"receive"),ne(this,Ta),ne(this,Ca),ne(this,Sa),ne(this,es);let r=[];typeof e=="string"?r=JSON.parse(e):r=e,V(this,Sa,new Map),V(this,Ta,new Map),V(this,Ca,new Map);const n=[];for(const o of r)try{n.push(Aa.from(o))}catch(a){console.log(`[Warning] Invalid Fragment ${JSON.stringify(o)}:`,a.message)}rt(this,{fragments:Object.freeze(n)});let s=null,i=!1;V(this,es,this.getAbiCoder()),this.fragments.forEach((o,a)=>{let c;switch(o.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}rt(this,{deploy:o});return;case"fallback":o.inputs.length===0?i=!0:(pe(!s||o.payable!==s.payable,"conflicting fallback fragments",`fragments[${a}]`,o),s=o,i=s.payable);return;case"function":c=T(this,Sa);break;case"event":c=T(this,Ca);break;case"error":c=T(this,Ta);break;default:return}const l=o.format();c.has(l)||c.set(l,o)}),this.deploy||rt(this,{deploy:Ii.from("constructor()")}),rt(this,{fallback:s,receive:i})}format(e){const r=e?"minimal":"full";return this.fragments.map(n=>n.format(r))}formatJson(){const e=this.fragments.map(r=>r.format("json"));return JSON.stringify(e.map(r=>JSON.parse(r)))}getAbiCoder(){return Rd.defaultAbiCoder()}getFunctionName(e){const r=ve(this,Fc,ay).call(this,e,null,!1);return pe(r,"no matching function","key",e),r.name}hasFunction(e){return!!ve(this,Fc,ay).call(this,e,null,!1)}getFunction(e,r){return ve(this,Fc,ay).call(this,e,r||null,!0)}forEachFunction(e){const r=Array.from(T(this,Sa).keys());r.sort((n,s)=>n.localeCompare(s));for(let n=0;n<r.length;n++){const s=r[n];e(T(this,Sa).get(s),n)}}getEventName(e){const r=ve(this,Fc,cy).call(this,e,null,!1);return pe(r,"no matching event","key",e),r.name}hasEvent(e){return!!ve(this,Fc,cy).call(this,e,null,!1)}getEvent(e,r){return ve(this,Fc,cy).call(this,e,r||null,!0)}forEachEvent(e){const r=Array.from(T(this,Ca).keys());r.sort((n,s)=>n.localeCompare(s));for(let n=0;n<r.length;n++){const s=r[n];e(T(this,Ca).get(s),n)}}getError(e,r){if(lr(e)){const s=e.toLowerCase();if(tS[s])return xi.from(tS[s].signature);for(const i of T(this,Ta).values())if(s===i.selector)return i;return null}if(e.indexOf("(")===-1){const s=[];for(const[i,o]of T(this,Ta))i.split("(")[0]===e&&s.push(o);if(s.length===0)return e==="Error"?xi.from("error Error(string)"):e==="Panic"?xi.from("error Panic(uint256)"):null;if(s.length>1){const i=s.map(o=>JSON.stringify(o.format())).join(", ");pe(!1,`ambiguous error description (i.e. ${i})`,"name",e)}return s[0]}return e=xi.from(e).format(),e==="Error(string)"?xi.from("error Error(string)"):e==="Panic(uint256)"?xi.from("error Panic(uint256)"):T(this,Ta).get(e)||null}forEachError(e){const r=Array.from(T(this,Ta).keys());r.sort((n,s)=>n.localeCompare(s));for(let n=0;n<r.length;n++){const s=r[n];e(T(this,Ta).get(s),n)}}_decodeParams(e,r){return T(this,es).decode(e,r)}_encodeParams(e,r){return T(this,es).encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){if(typeof e=="string"){const n=this.getError(e);pe(n,"unknown error","fragment",e),e=n}return pe(ur(r,0,4)===e.selector,`data signature does not match error ${e.name}.`,"data",r),this._decodeParams(e.inputs,ur(r,4))}encodeErrorResult(e,r){if(typeof e=="string"){const n=this.getError(e);pe(n,"unknown error","fragment",e),e=n}return $t([e.selector,this._encodeParams(e.inputs,r||[])])}decodeFunctionData(e,r){if(typeof e=="string"){const n=this.getFunction(e);pe(n,"unknown function","fragment",e),e=n}return pe(ur(r,0,4)===e.selector,`data signature does not match function ${e.name}.`,"data",r),this._decodeParams(e.inputs,ur(r,4))}encodeFunctionData(e,r){if(typeof e=="string"){const n=this.getFunction(e);pe(n,"unknown function","fragment",e),e=n}return $t([e.selector,this._encodeParams(e.inputs,r||[])])}decodeFunctionResult(e,r){if(typeof e=="string"){const i=this.getFunction(e);pe(i,"unknown function","fragment",e),e=i}let n="invalid length for result data";const s=sn(r);if(s.length%32===0)try{return T(this,es).decode(e.outputs,s)}catch{n="could not decode result data"}Be(!1,n,"BAD_DATA",{value:Ze(s),info:{method:e.name,signature:e.format()}})}makeError(e,r){const n=qe(e,"data"),s=Rd.getBuiltinCallException("call",r,n);if(s.message.startsWith("execution reverted (unknown custom error)")){const o=Ze(n.slice(0,4)),a=this.getError(o);if(a)try{const c=T(this,es).decode(a.inputs,n.slice(4));s.revert={name:a.name,signature:a.format(),args:c},s.reason=s.revert.signature,s.message=`execution reverted: ${s.reason}`}catch{s.message="execution reverted (coult not decode custom error)"}}const i=this.parseTransaction(r);return i&&(s.invocation={method:i.name,signature:i.signature,args:i.args}),s}encodeFunctionResult(e,r){if(typeof e=="string"){const n=this.getFunction(e);pe(n,"unknown function","fragment",e),e=n}return Ze(T(this,es).encode(e.outputs,r||[]))}encodeFilterTopics(e,r){if(typeof e=="string"){const i=this.getEvent(e);pe(i,"unknown event","eventFragment",e),e=i}Be(r.length<=e.inputs.length,`too many arguments for ${e.format()}`,"UNEXPECTED_ARGUMENT",{count:r.length,expectedCount:e.inputs.length});const n=[];e.anonymous||n.push(e.topicHash);const s=(i,o)=>i.type==="string"?Ni(o):i.type==="bytes"?hr(Ze(o)):(i.type==="bool"&&typeof o=="boolean"?o=o?"0x01":"0x00":i.type.match(/^u?int/)?o=Zs(o):i.type.match(/^bytes/)?o=Dp(o,32):i.type==="address"&&T(this,es).encode(["address"],[o]),Hs(Ze(o),32));for(r.forEach((i,o)=>{const a=e.inputs[o];if(!a.indexed){pe(i==null,"cannot filter non-indexed parameters; must be null","contract."+a.name,i);return}i==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?pe(!1,"filtering with tuples or arrays not supported","contract."+a.name,i):Array.isArray(i)?n.push(i.map(c=>s(a,c))):n.push(s(a,i))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,r){if(typeof e=="string"){const o=this.getEvent(e);pe(o,"unknown event","eventFragment",e),e=o}const n=[],s=[],i=[];return e.anonymous||n.push(e.topicHash),pe(r.length===e.inputs.length,"event arguments/values mismatch","values",r),e.inputs.forEach((o,a)=>{const c=r[a];if(o.indexed)if(o.type==="string")n.push(Ni(c));else if(o.type==="bytes")n.push(hr(c));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(T(this,es).encode([o.type],[c]))}else s.push(o),i.push(c)}),{data:T(this,es).encode(s,i),topics:n}}decodeEventLog(e,r,n){if(typeof e=="string"){const p=this.getEvent(e);pe(p,"unknown event","eventFragment",e),e=p}if(n!=null&&!e.anonymous){const p=e.topicHash;pe(lr(n[0],32)&&n[0].toLowerCase()===p,"fragment/topic mismatch","topics[0]",n[0]),n=n.slice(1)}const s=[],i=[],o=[];e.inputs.forEach((p,g)=>{p.indexed?p.type==="string"||p.type==="bytes"||p.baseType==="tuple"||p.baseType==="array"?(s.push(An.from({type:"bytes32",name:p.name})),o.push(!0)):(s.push(p),o.push(!1)):(i.push(p),o.push(!1))});const a=n!=null?T(this,es).decode(s,$t(n)):null,c=T(this,es).decode(i,r,!0),l=[],u=[];let d=0,h=0;return e.inputs.forEach((p,g)=>{let m=null;if(p.indexed)if(a==null)m=new oy(null);else if(o[g])m=new oy(a[h++]);else try{m=a[h++]}catch(y){m=y}else try{m=c[d++]}catch(y){m=y}l.push(m),u.push(p.name||null)}),cd.fromItems(l,u)}parseTransaction(e){const r=qe(e.data,"tx.data"),n=ct(e.value!=null?e.value:0,"tx.value"),s=this.getFunction(Ze(r.slice(0,4)));if(!s)return null;const i=T(this,es).decode(s.inputs,r.slice(4));return new o5(s,s.selector,i,n)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const r=this.getEvent(e.topics[0]);return!r||r.anonymous?null:new i5(r,r.topicHash,this.decodeEventLog(r,e.data,e.topics))}parseError(e){const r=Ze(e),n=this.getError(ur(r,0,4));if(!n)return null;const s=T(this,es).decode(n.inputs,ur(r,4));return new a5(n,n.selector,s)}static from(e){return e instanceof kp?e:typeof e=="string"?new kp(JSON.parse(e)):typeof e.formatJson=="function"?new kp(e.formatJson()):typeof e.format=="function"?new kp(e.format("json")):new kp(e)}};Ta=new WeakMap,Ca=new WeakMap,Sa=new WeakMap,es=new WeakMap,Fc=new WeakSet,ay=function(t,e,r){if(lr(t)){const s=t.toLowerCase();for(const i of T(this,Sa).values())if(s===i.selector)return i;return null}if(t.indexOf("(")===-1){const s=[];for(const[i,o]of T(this,Sa))i.split("(")[0]===t&&s.push(o);if(e){const i=e.length>0?e[e.length-1]:null;let o=e.length,a=!0;Vn.isTyped(i)&&i.type==="overrides"&&(a=!1,o--);for(let c=s.length-1;c>=0;c--){const l=s[c].inputs.length;l!==o&&(!a||l!==o-1)&&s.splice(c,1)}for(let c=s.length-1;c>=0;c--){const l=s[c].inputs;for(let u=0;u<e.length;u++)if(Vn.isTyped(e[u])){if(u>=l.length){if(e[u].type==="overrides")continue;s.splice(c,1);break}if(e[u].type!==l[u].baseType){s.splice(c,1);break}}}}if(s.length===1&&e&&e.length!==s[0].inputs.length){const i=e[e.length-1];(i==null||Array.isArray(i)||typeof i!="object")&&s.splice(0,1)}if(s.length===0)return null;if(s.length>1&&r){const i=s.map(o=>JSON.stringify(o.format())).join(", ");pe(!1,`ambiguous function description (i.e. matches ${i})`,"key",t)}return s[0]}return T(this,Sa).get(Xs.from(t).format())||null},cy=function(t,e,r){if(lr(t)){const s=t.toLowerCase();for(const i of T(this,Ca).values())if(s===i.topicHash)return i;return null}if(t.indexOf("(")===-1){const s=[];for(const[i,o]of T(this,Ca))i.split("(")[0]===t&&s.push(o);if(e){for(let i=s.length-1;i>=0;i--)s[i].inputs.length<e.length&&s.splice(i,1);for(let i=s.length-1;i>=0;i--){const o=s[i].inputs;for(let a=0;a<e.length;a++)if(Vn.isTyped(e[a])&&e[a].type!==o[a].baseType){s.splice(i,1);break}}}if(s.length===0)return null;if(s.length>1&&r){const i=s.map(o=>JSON.stringify(o.format())).join(", ");pe(!1,`ambiguous event description (i.e. matches ${i})`,"key",t)}return s[0]}return T(this,Ca).get(qs.from(t).format())||null};let ly=rH;const rS=BigInt(0);function Pd(t){return t??null}function Hr(t){return t==null?null:t.toString()}class uy{constructor(e,r,n){X(this,"gasPrice"),X(this,"maxFeePerGas"),X(this,"maxPriorityFeePerGas"),rt(this,{gasPrice:Pd(e),maxFeePerGas:Pd(r),maxPriorityFeePerGas:Pd(n)})}toJSON(){const{gasPrice:e,maxFeePerGas:r,maxPriorityFeePerGas:n}=this;return{_type:"FeeData",gasPrice:Hr(e),maxFeePerGas:Hr(r),maxPriorityFeePerGas:Hr(n)}}}function lu(t){const e={};t.to&&(e.to=t.to),t.from&&(e.from=t.from),t.data&&(e.data=Ze(t.data));const r="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const s of r)!(s in t)||t[s]==null||(e[s]=ct(t[s],`request.${s}`));const n="type,nonce".split(/,/);for(const s of n)!(s in t)||t[s]==null||(e[s]=mt(t[s],`request.${s}`));return t.accessList&&(e.accessList=To(t.accessList)),"blockTag"in t&&(e.blockTag=t.blockTag),"enableCcipRead"in t&&(e.enableCcipRead=!!t.enableCcipRead),"customData"in t&&(e.customData=t.customData),"blobVersionedHashes"in t&&t.blobVersionedHashes&&(e.blobVersionedHashes=t.blobVersionedHashes.slice()),"kzg"in t&&(e.kzg=t.kzg),"blobs"in t&&t.blobs&&(e.blobs=t.blobs.map(s=>Jh(s)?Ze(s):Object.assign({},s))),e}var Vc;class c5{constructor(e,r){X(this,"provider"),X(this,"number"),X(this,"hash"),X(this,"timestamp"),X(this,"parentHash"),X(this,"parentBeaconBlockRoot"),X(this,"nonce"),X(this,"difficulty"),X(this,"gasLimit"),X(this,"gasUsed"),X(this,"stateRoot"),X(this,"receiptsRoot"),X(this,"blobGasUsed"),X(this,"excessBlobGas"),X(this,"miner"),X(this,"prevRandao"),X(this,"extraData"),X(this,"baseFeePerGas"),ne(this,Vc),V(this,Vc,e.transactions.map(n=>typeof n!="string"?new U0(n,r):n)),rt(this,{provider:r,hash:Pd(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,prevRandao:Pd(e.prevRandao),extraData:e.extraData,baseFeePerGas:Pd(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return T(this,Vc).map(e=>typeof e=="string"?e:e.hash)}get prefetchedTransactions(){const e=T(this,Vc).slice();return e.length===0?[]:(Be(typeof e[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:r,extraData:n,gasLimit:s,gasUsed:i,hash:o,miner:a,prevRandao:c,nonce:l,number:u,parentHash:d,parentBeaconBlockRoot:h,stateRoot:p,receiptsRoot:g,timestamp:m,transactions:y}=this;return{_type:"Block",baseFeePerGas:Hr(e),difficulty:Hr(r),extraData:n,gasLimit:Hr(s),gasUsed:Hr(i),blobGasUsed:Hr(this.blobGasUsed),excessBlobGas:Hr(this.excessBlobGas),hash:o,miner:a,prevRandao:c,nonce:l,number:u,parentHash:d,timestamp:m,parentBeaconBlockRoot:h,stateRoot:p,receiptsRoot:g,transactions:y}}[Symbol.iterator](){let e=0;const r=this.transactions;return{next:()=>e<this.length?{value:r[e++],done:!1}:{value:void 0,done:!0}}}get length(){return T(this,Vc).length}get date(){return this.timestamp==null?null:new Date(this.timestamp*1e3)}async getTransaction(e){let r;if(typeof e=="number")r=T(this,Vc)[e];else{const n=e.toLowerCase();for(const s of T(this,Vc))if(typeof s=="string"){if(s!==n)continue;r=s;break}else{if(s.hash===n)continue;r=s;break}}if(r==null)throw new Error("no such tx");return typeof r=="string"?await this.provider.getTransaction(r):r}getPrefetchedTransaction(e){const r=this.prefetchedTransactions;if(typeof e=="number")return r[e];e=e.toLowerCase();for(const n of r)if(n.hash===e)return n;pe(!1,"no matching transaction","indexOrHash",e)}isMined(){return!!this.hash}isLondon(){return!!this.baseFeePerGas}orphanedEvent(){if(!this.isMined())throw new Error("");return sH(this)}}Vc=new WeakMap;class uu{constructor(e,r){X(this,"provider"),X(this,"transactionHash"),X(this,"blockHash"),X(this,"blockNumber"),X(this,"removed"),X(this,"address"),X(this,"data"),X(this,"topics"),X(this,"index"),X(this,"transactionIndex"),this.provider=r;const n=Object.freeze(e.topics.slice());rt(this,{transactionHash:e.transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,removed:e.removed,address:e.address,data:e.data,topics:n,index:e.index,transactionIndex:e.transactionIndex})}toJSON(){const{address:e,blockHash:r,blockNumber:n,data:s,index:i,removed:o,topics:a,transactionHash:c,transactionIndex:l}=this;return{_type:"log",address:e,blockHash:r,blockNumber:n,data:s,index:i,removed:o,topics:a,transactionHash:c,transactionIndex:l}}async getBlock(){const e=await this.provider.getBlock(this.blockHash);return Be(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransaction(){const e=await this.provider.getTransaction(this.transactionHash);return Be(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransactionReceipt(){const e=await this.provider.getTransactionReceipt(this.transactionHash);return Be(!!e,"failed to find transaction receipt","UNKNOWN_ERROR",{}),e}removedEvent(){return iH(this)}}var hy;class dy{constructor(e,r){X(this,"provider"),X(this,"to"),X(this,"from"),X(this,"contractAddress"),X(this,"hash"),X(this,"index"),X(this,"blockHash"),X(this,"blockNumber"),X(this,"logsBloom"),X(this,"gasUsed"),X(this,"blobGasUsed"),X(this,"cumulativeGasUsed"),X(this,"gasPrice"),X(this,"blobGasPrice"),X(this,"type"),X(this,"status"),X(this,"root"),ne(this,hy),V(this,hy,Object.freeze(e.logs.map(s=>new uu(s,r))));let n=rS;e.effectiveGasPrice!=null?n=e.effectiveGasPrice:e.gasPrice!=null&&(n=e.gasPrice),rt(this,{provider:r,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:n,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return T(this,hy)}toJSON(){const{to:e,from:r,contractAddress:n,hash:s,index:i,blockHash:o,blockNumber:a,logsBloom:c,logs:l,status:u,root:d}=this;return{_type:"TransactionReceipt",blockHash:o,blockNumber:a,contractAddress:n,cumulativeGasUsed:Hr(this.cumulativeGasUsed),from:r,gasPrice:Hr(this.gasPrice),blobGasUsed:Hr(this.blobGasUsed),blobGasPrice:Hr(this.blobGasPrice),gasUsed:Hr(this.gasUsed),hash:s,index:i,logs:l,logsBloom:c,root:d,status:u,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e<this.length?{value:this.logs[e++],done:!1}:{value:void 0,done:!0}}}get fee(){return this.gasUsed*this.gasPrice}async getBlock(){const e=await this.provider.getBlock(this.blockHash);if(e==null)throw new Error("TODO");return e}async getTransaction(){const e=await this.provider.getTransaction(this.hash);if(e==null)throw new Error("TODO");return e}async getResult(){return await this.provider.getTransactionResult(this.hash)}async confirmations(){return await this.provider.getBlockNumber()-this.blockNumber+1}removedEvent(){return sS(this)}reorderedEvent(e){return Be(!e||e.isMined(),"unmined 'other' transction cannot be orphaned","UNSUPPORTED_OPERATION",{operation:"reorderedEvent(other)"}),nS(this,e)}}hy=new WeakMap;var hu;const nH=class zV{constructor(e,r){X(this,"provider"),X(this,"blockNumber"),X(this,"blockHash"),X(this,"index"),X(this,"hash"),X(this,"type"),X(this,"to"),X(this,"from"),X(this,"nonce"),X(this,"gasLimit"),X(this,"gasPrice"),X(this,"maxPriorityFeePerGas"),X(this,"maxFeePerGas"),X(this,"maxFeePerBlobGas"),X(this,"data"),X(this,"value"),X(this,"chainId"),X(this,"signature"),X(this,"accessList"),X(this,"blobVersionedHashes"),ne(this,hu),this.provider=r,this.blockNumber=e.blockNumber!=null?e.blockNumber:null,this.blockHash=e.blockHash!=null?e.blockHash:null,this.hash=e.hash,this.index=e.index,this.type=e.type,this.from=e.from,this.to=e.to||null,this.gasLimit=e.gasLimit,this.nonce=e.nonce,this.data=e.data,this.value=e.value,this.gasPrice=e.gasPrice,this.maxPriorityFeePerGas=e.maxPriorityFeePerGas!=null?e.maxPriorityFeePerGas:null,this.maxFeePerGas=e.maxFeePerGas!=null?e.maxFeePerGas:null,this.maxFeePerBlobGas=e.maxFeePerBlobGas!=null?e.maxFeePerBlobGas:null,this.chainId=e.chainId,this.signature=e.signature,this.accessList=e.accessList!=null?e.accessList:null,this.blobVersionedHashes=e.blobVersionedHashes!=null?e.blobVersionedHashes:null,V(this,hu,-1)}toJSON(){const{blockNumber:e,blockHash:r,index:n,hash:s,type:i,to:o,from:a,nonce:c,data:l,signature:u,accessList:d,blobVersionedHashes:h}=this;return{_type:"TransactionResponse",accessList:d,blockNumber:e,blockHash:r,blobVersionedHashes:h,chainId:Hr(this.chainId),data:l,from:a,gasLimit:Hr(this.gasLimit),gasPrice:Hr(this.gasPrice),hash:s,maxFeePerGas:Hr(this.maxFeePerGas),maxPriorityFeePerGas:Hr(this.maxPriorityFeePerGas),maxFeePerBlobGas:Hr(this.maxFeePerBlobGas),nonce:c,signature:u,to:o,index:n,type:i,value:Hr(this.value)}}async getBlock(){let e=this.blockNumber;if(e==null){const n=await this.getTransaction();n&&(e=n.blockNumber)}if(e==null)return null;const r=this.provider.getBlock(e);if(r==null)throw new Error("TODO");return r}async getTransaction(){return this.provider.getTransaction(this.hash)}async confirmations(){if(this.blockNumber==null){const{tx:e,blockNumber:r}=await nn({tx:this.getTransaction(),blockNumber:this.provider.getBlockNumber()});return e==null||e.blockNumber==null?0:r-e.blockNumber+1}return await this.provider.getBlockNumber()-this.blockNumber+1}async wait(e,r){const n=e??1,s=r??0;let i=T(this,hu),o=-1,a=i===-1;const c=async()=>{if(a)return null;const{blockNumber:d,nonce:h}=await nn({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(h<this.nonce){i=d;return}if(a)return null;const p=await this.getTransaction();if(!(p&&p.blockNumber!=null))for(o===-1&&(o=i-3,o<T(this,hu)&&(o=T(this,hu)));o<=d;){if(a)return null;const g=await this.provider.getBlock(o,!0);if(g==null)return;for(const m of g)if(m===this.hash)return;for(let m=0;m<g.length;m++){const y=await g.getTransaction(m);if(y.from===this.from&&y.nonce===this.nonce){if(a)return null;const v=await this.provider.getTransactionReceipt(y.hash);if(v==null||d-v.blockNumber+1<n)return;let A="replaced";y.data===this.data&&y.to===this.to&&y.value===this.value?A="repriced":y.data==="0x"&&y.from===y.to&&y.value===rS&&(A="cancelled"),Be(!1,"transaction was replaced","TRANSACTION_REPLACED",{cancelled:A==="replaced"||A==="cancelled",reason:A,replacement:y.replaceableTransaction(i),hash:y.hash,receipt:v})}}o++}},l=d=>{if(d==null||d.status!==0)return d;Be(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:d.to,from:d.from,data:""},receipt:d})},u=await this.provider.getTransactionReceipt(this.hash);if(n===0)return l(u);if(u){if(await u.confirmations()>=n)return l(u)}else if(await c(),n===0)return null;return await new Promise((d,h)=>{const p=[],g=()=>{p.forEach(y=>y())};if(p.push(()=>{a=!0}),s>0){const y=setTimeout(()=>{g(),h(yr("wait for transaction timeout","TIMEOUT"))},s);p.push(()=>{clearTimeout(y)})}const m=async y=>{if(await y.confirmations()>=n){g();try{d(l(y))}catch(v){h(v)}}};if(p.push(()=>{this.provider.off(this.hash,m)}),this.provider.on(this.hash,m),i>=0){const y=async()=>{try{await c()}catch(v){if(Gr(v,"TRANSACTION_REPLACED")){g(),h(v);return}}a||this.provider.once("block",y)};p.push(()=>{this.provider.off("block",y)}),this.provider.once("block",y)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}removedEvent(){return Be(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),sS(this)}reorderedEvent(e){return Be(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),Be(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),nS(this,e)}replaceableTransaction(e){pe(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const r=new zV(this,this.provider);return V(r,hu,e),r}};hu=new WeakMap;let U0=nH;function sH(t){return{orphan:"drop-block",hash:t.hash,number:t.number}}function nS(t,e){return{orphan:"reorder-transaction",tx:t,other:e}}function sS(t){return{orphan:"drop-transaction",tx:t}}function iH(t){return{orphan:"drop-log",log:{transactionHash:t.transactionHash,blockHash:t.blockHash,blockNumber:t.blockNumber,address:t.address,data:t.data,topics:Object.freeze(t.topics.slice()),index:t.index}}}class L0 extends uu{constructor(e,r,n){super(e,e.provider),X(this,"interface"),X(this,"fragment"),X(this,"args");const s=r.decodeEventLog(n,e.data,e.topics);rt(this,{args:s,fragment:n,interface:r})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class fy extends uu{constructor(e,r){super(e,e.provider),X(this,"error"),rt(this,{error:r})}}var F0;class l5 extends dy{constructor(e,r,n){super(n,r),ne(this,F0),V(this,F0,e)}get logs(){return super.logs.map(e=>{const r=e.topics.length?T(this,F0).getEvent(e.topics[0]):null;if(r)try{return new L0(e,T(this,F0),r)}catch(n){return new fy(e,n)}return e})}}F0=new WeakMap;var py;class V0 extends U0{constructor(e,r,n){super(n,r),ne(this,py),V(this,py,e)}async wait(e,r){const n=await super.wait(e,r);return n==null?null:new l5(T(this,py),this.provider,n)}}py=new WeakMap;class gy extends d2{constructor(e,r,n,s){super(e,r,n),X(this,"log"),rt(this,{log:s})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class u5 extends gy{constructor(e,r,n,s,i){super(e,r,n,new L0(i,e.interface,s));const o=e.interface.decodeEventLog(s,this.log.data,this.log.topics);rt(this,{args:o,fragment:s})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const iS=BigInt(0);function oS(t){return t&&typeof t.call=="function"}function aS(t){return t&&typeof t.estimateGas=="function"}function my(t){return t&&typeof t.resolveName=="function"}function cS(t){return t&&typeof t.sendTransaction=="function"}function lS(t){if(t!=null){if(my(t))return t;if(t.provider)return t.provider}}var yy;class oH{constructor(e,r,n){if(ne(this,yy),X(this,"fragment"),rt(this,{fragment:r}),r.inputs.length<n.length)throw new Error("too many arguments");const s=du(e.runner,"resolveName"),i=my(s)?s:null;V(this,yy,async function(){const o=await Promise.all(r.inputs.map((a,c)=>n[c]==null?null:a.walkAsync(n[c],(l,u)=>l==="address"?Array.isArray(u)?Promise.all(u.map(d=>an(d,i))):an(u,i):u)));return e.interface.encodeFilterTopics(r,o)}())}getTopicFilter(){return T(this,yy)}}yy=new WeakMap;function du(t,e){return t==null?null:typeof t[e]=="function"?t:t.provider&&typeof t.provider[e]=="function"?t.provider:null}function fu(t){return t==null?null:t.provider||null}async function h5(t,e){const r=Vn.dereference(t,"overrides");pe(typeof r=="object","invalid overrides parameter","overrides",t);const n=lu(r);return pe(n.to==null||(e||[]).indexOf("to")>=0,"cannot override to","overrides.to",n.to),pe(n.data==null||(e||[]).indexOf("data")>=0,"cannot override data","overrides.data",n.data),n.from&&(n.from=n.from),n}async function uS(t,e,r){const n=du(t,"resolveName"),s=my(n)?n:null;return await Promise.all(e.map((i,o)=>i.walkAsync(r[o],(a,c)=>(c=Vn.dereference(c,a),a==="address"?an(c,s):c))))}function aH(t){const e=async function(o){const a=await h5(o,["data"]);a.to=await t.getAddress(),a.from&&(a.from=await an(a.from,lS(t.runner)));const c=t.interface,l=ct(a.value||iS,"overrides.value")===iS,u=(a.data||"0x")==="0x";c.fallback&&!c.fallback.payable&&c.receive&&!u&&!l&&pe(!1,"cannot send data to receive or send value to non-payable fallback","overrides",o),pe(c.fallback||u,"cannot send data to receive-only contract","overrides.data",a.data);const d=c.receive||c.fallback&&c.fallback.payable;return pe(d||l,"cannot send value to non-payable fallback","overrides.value",a.value),pe(c.fallback||u,"cannot send data to receive-only contract","overrides.data",a.data),a},r=async function(o){const a=du(t.runner,"call");Be(oS(a),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const c=await e(o);try{return await a.call(c)}catch(l){throw Vp(l)&&l.data?t.interface.makeError(l.data,c):l}},n=async function(o){const a=t.runner;Be(cS(a),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const c=await a.sendTransaction(await e(o)),l=fu(t.runner);return new V0(t.interface,l,c)},s=async function(o){const a=du(t.runner,"estimateGas");return Be(aS(a),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await a.estimateGas(await e(o))},i=async o=>await n(o);return rt(i,{_contract:t,estimateGas:s,populateTransaction:e,send:n,staticCall:r}),i}function cH(t,e){const r=function(...l){const u=t.interface.getFunction(e,l);return Be(u,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:l}}),u},n=async function(...l){const u=r(...l);let d={};if(u.inputs.length+1===l.length&&(d=await h5(l.pop()),d.from&&(d.from=await an(d.from,lS(t.runner)))),u.inputs.length!==l.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const h=await uS(t.runner,u.inputs,l);return Object.assign({},d,await nn({to:t.getAddress(),data:t.interface.encodeFunctionData(u,h)}))},s=async function(...l){const u=await a(...l);return u.length===1?u[0]:u},i=async function(...l){const u=t.runner;Be(cS(u),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const d=await u.sendTransaction(await n(...l)),h=fu(t.runner);return new V0(t.interface,h,d)},o=async function(...l){const u=du(t.runner,"estimateGas");return Be(aS(u),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await u.estimateGas(await n(...l))},a=async function(...l){const u=du(t.runner,"call");Be(oS(u),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const d=await n(...l);let h="0x";try{h=await u.call(d)}catch(g){throw Vp(g)&&g.data?t.interface.makeError(g.data,d):g}const p=r(...l);return t.interface.decodeFunctionResult(p,h)},c=async(...l)=>r(...l).constant?await s(...l):await i(...l);return rt(c,{name:t.interface.getFunctionName(e),_contract:t,_key:e,getFragment:r,estimateGas:o,populateTransaction:n,send:i,staticCall:s,staticCallResult:a}),Object.defineProperty(c,"fragment",{configurable:!1,enumerable:!0,get:()=>{const l=t.interface.getFunction(e);return Be(l,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),l}}),c}function lH(t,e){const r=function(...s){const i=t.interface.getEvent(e,s);return Be(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:s}}),i},n=function(...s){return new oH(t,r(...s),s)};return rt(n,{name:t.interface.getEventName(e),_contract:t,_key:e,getFragment:r}),Object.defineProperty(n,"fragment",{configurable:!1,enumerable:!0,get:()=>{const s=t.interface.getEvent(e);return Be(s,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),s}}),n}const vy=Symbol.for("_ethersInternal_contract"),hS=new WeakMap;function uH(t,e){hS.set(t[vy],e)}function Rs(t){return hS.get(t[vy])}function hH(t){return t&&typeof t=="object"&&"getTopicFilter"in t&&typeof t.getTopicFilter=="function"&&t.fragment}async function d5(t,e){let r,n=null;if(Array.isArray(e)){const i=function(o){if(lr(o,32))return o;const a=t.interface.getEvent(o);return pe(a,"unknown fragment","name",o),a.topicHash};r=e.map(o=>o==null?null:Array.isArray(o)?o.map(i):i(o))}else e==="*"?r=[null]:typeof e=="string"?lr(e,32)?r=[e]:(n=t.interface.getEvent(e),pe(n,"unknown fragment","event",e),r=[n.topicHash]):hH(e)?r=await e.getTopicFilter():"fragment"in e?(n=e.fragment,r=[n.topicHash]):pe(!1,"unknown event name","event",e);r=r.map(i=>{if(i==null)return null;if(Array.isArray(i)){const o=Array.from(new Set(i.map(a=>a.toLowerCase())).values());return o.length===1?o[0]:(o.sort(),o)}return i.toLowerCase()});const s=r.map(i=>i==null?"null":Array.isArray(i)?i.join("|"):i).join("&");return{fragment:n,tag:s,topics:r}}async function D0(t,e){const{subs:r}=Rs(t);return r.get((await d5(t,e)).tag)||null}async function dS(t,e,r){const n=fu(t.runner);Be(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});const{fragment:s,tag:i,topics:o}=await d5(t,r),{addr:a,subs:c}=Rs(t);let l=c.get(i);if(!l){const u={address:a||t,topics:o},d=p=>{let g=s;if(g==null)try{g=t.interface.getEvent(p.topics[0])}catch{}if(g){const m=g,y=s?t.interface.decodeEventLog(s,p.data,p.topics):[];p5(t,r,y,v=>new u5(t,v,r,m,p))}else p5(t,r,[],m=>new gy(t,m,r,p))};let h=[];l={tag:i,listeners:[],start:()=>{h.length||h.push(n.on(u,d))},stop:async()=>{if(h.length==0)return;let p=h;h=[],await Promise.all(p),n.off(u,d)}},c.set(i,l)}return l}let f5=Promise.resolve();async function dH(t,e,r,n){await f5;const s=await D0(t,e);if(!s)return!1;const i=s.listeners.length;return s.listeners=s.listeners.filter(({listener:o,once:a})=>{const c=Array.from(r);n&&c.push(n(a?null:o));try{o.call(t,...c)}catch{}return!a}),s.listeners.length===0&&(s.stop(),Rs(t).subs.delete(s.tag)),i>0}async function p5(t,e,r,n){try{await f5}catch{}const s=dH(t,e,r,n);return f5=s,await s}const by=["then"];var fS;fS=vy;let W0=class zw{constructor(e,r,n,s){X(this,"target"),X(this,"interface"),X(this,"runner"),X(this,"filters"),X(this,fS),X(this,"fallback"),pe(typeof e=="string"||V2(e),"invalid value for Contract target","target",e),n==null&&(n=null);const i=ly.from(r);rt(this,{target:e,runner:n,interface:i}),Object.defineProperty(this,vy,{value:{}});let o,a=null,c=null;if(s){const d=fu(n);c=new V0(this.interface,d,s)}let l=new Map;if(typeof e=="string")if(lr(e))a=e,o=Promise.resolve(e);else{const d=du(n,"resolveName");if(!my(d))throw yr("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});o=d.resolveName(e).then(h=>{if(h==null)throw yr("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return Rs(this).addr=h,h})}else o=e.getAddress().then(d=>{if(d==null)throw new Error("TODO");return Rs(this).addr=d,d});uH(this,{addrPromise:o,addr:a,deployTx:c,subs:l});const u=new Proxy({},{get:(d,h,p)=>{if(typeof h=="symbol"||by.indexOf(h)>=0)return Reflect.get(d,h,p);try{return this.getEvent(h)}catch(g){if(!Gr(g,"INVALID_ARGUMENT")||g.argument!=="key")throw g}},has:(d,h)=>by.indexOf(h)>=0?Reflect.has(d,h):Reflect.has(d,h)||this.interface.hasEvent(String(h))});return rt(this,{filters:u}),rt(this,{fallback:i.receive||i.fallback?aH(this):null}),new Proxy(this,{get:(d,h,p)=>{if(typeof h=="symbol"||h in d||by.indexOf(h)>=0)return Reflect.get(d,h,p);try{return d.getFunction(h)}catch(g){if(!Gr(g,"INVALID_ARGUMENT")||g.argument!=="key")throw g}},has:(d,h)=>typeof h=="symbol"||h in d||by.indexOf(h)>=0?Reflect.has(d,h):d.interface.hasFunction(h)})}connect(e){return new zw(this.target,this.interface,e)}attach(e){return new zw(e,this.interface,this.runner)}async getAddress(){return await Rs(this).addrPromise}async getDeployedCode(){const e=fu(this.runner);Be(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const r=await e.getCode(await this.getAddress());return r==="0x"?null:r}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(await this.getDeployedCode()!=null)return this;const r=fu(this.runner);return Be(r!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((n,s)=>{const i=async()=>{try{if(await this.getDeployedCode()!=null)return n(this);r.once("block",i)}catch(o){s(o)}};i()})}deploymentTransaction(){return Rs(this).deployTx}getFunction(e){return typeof e!="string"&&(e=e.format()),cH(this,e)}getEvent(e){return typeof e!="string"&&(e=e.format()),lH(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,r,n){r==null&&(r=0),n==null&&(n="latest");const{addr:s,addrPromise:i}=Rs(this),o=s||await i,{fragment:a,topics:c}=await d5(this,e),l={address:o,topics:c,fromBlock:r,toBlock:n},u=fu(this.runner);return Be(u,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await u.getLogs(l)).map(d=>{let h=a;if(h==null)try{h=this.interface.getEvent(d.topics[0])}catch{}if(h)try{return new L0(d,this.interface,h)}catch(p){return new fy(d,p)}return new uu(d,u)})}async on(e,r){const n=await dS(this,"on",e);return n.listeners.push({listener:r,once:!1}),n.start(),this}async once(e,r){const n=await dS(this,"once",e);return n.listeners.push({listener:r,once:!0}),n.start(),this}async emit(e,...r){return await p5(this,e,r,null)}async listenerCount(e){if(e){const s=await D0(this,e);return s?s.listeners.length:0}const{subs:r}=Rs(this);let n=0;for(const{listeners:s}of r.values())n+=s.length;return n}async listeners(e){if(e){const s=await D0(this,e);return s?s.listeners.map(({listener:i})=>i):[]}const{subs:r}=Rs(this);let n=[];for(const{listeners:s}of r.values())n=n.concat(s.map(({listener:i})=>i));return n}async off(e,r){const n=await D0(this,e);if(!n)return this;if(r){const s=n.listeners.map(({listener:i})=>i).indexOf(r);s>=0&&n.listeners.splice(s,1)}return(r==null||n.listeners.length===0)&&(n.stop(),Rs(this).subs.delete(n.tag)),this}async removeAllListeners(e){if(e){const r=await D0(this,e);if(!r)return this;r.stop(),Rs(this).subs.delete(r.tag)}else{const{subs:r}=Rs(this);for(const{tag:n,stop:s}of r.values())s(),r.delete(n)}return this}async addListener(e,r){return await this.on(e,r)}async removeListener(e,r){return await this.off(e,r)}static buildClass(e){class r extends zw{constructor(s,i=null){super(s,e,i)}}return r}static from(e,r,n){return n==null&&(n=null),new this(e,r,n)}};function fH(){return W0}class Dc extends fH(){}class wy{constructor(e,r,n){X(this,"interface"),X(this,"bytecode"),X(this,"runner");const s=ly.from(e);r instanceof Uint8Array||(typeof r=="object"&&(r=r.object),r.startsWith("0x")||(r="0x"+r)),r=Ze(qe(r)),rt(this,{bytecode:r,interface:s,runner:n||null})}attach(e){return new W0(e,this.interface,this.runner)}async getDeployTransaction(...e){let r={};const n=this.interface.deploy;if(n.inputs.length+1===e.length&&(r=await h5(e.pop())),n.inputs.length!==e.length)throw new Error("incorrect number of arguments to constructor");const s=await uS(this.runner,n.inputs,e),i=$t([this.bytecode,this.interface.encodeDeploy(s)]);return Object.assign({},r,{data:i})}async deploy(...e){const r=await this.getDeployTransaction(...e);Be(this.runner&&typeof this.runner.sendTransaction=="function","factory runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const n=await this.runner.sendTransaction(r),s=F2(n);return new W0(s,this.interface,this.runner,n)}connect(e){return new wy(this.interface,this.bytecode,e)}static fromSolidity(e,r){pe(e!=null,"bad compiler output","output",e),typeof e=="string"&&(e=JSON.parse(e));const n=e.abi;let s="";return e.bytecode?s=e.bytecode:e.evm&&e.evm.bytecode&&(s=e.evm.bytecode),new this(n,s,r)}}function g5(t){return t.match(/^ipfs:\/\/ipfs\//i)?t=t.substring(12):t.match(/^ipfs:\/\//i)?t=t.substring(7):pe(!1,"unsupported IPFS format","link",t),`https://gateway.ipfs.io/ipfs/${t}`}class m5{constructor(e){X(this,"name"),rt(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,r){throw new Error("unsupported coin")}async decodeAddress(e,r){throw new Error("unsupported coin")}}const pS=new RegExp("^(ipfs)://(.*)$","i"),gS=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),pS,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];var pu,Nd,gu,xd,y5,mS;const v5=class WA{constructor(e,r,n){ne(this,gu),X(this,"provider"),X(this,"address"),X(this,"name"),ne(this,pu),ne(this,Nd),rt(this,{provider:e,address:r,name:n}),V(this,pu,null),V(this,Nd,new Dc(r,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e))}async supportsWildcard(){return T(this,pu)==null&&V(this,pu,(async()=>{try{return await T(this,Nd).supportsInterface("0x9061b923")}catch(e){if(Gr(e,"CALL_EXCEPTION"))return!1;throw V(this,pu,null),e}})()),await T(this,pu)}async getAddress(e){if(e==null&&(e=60),e===60)try{const i=await ve(this,gu,xd).call(this,"addr(bytes32)");return i==null||i===tu?null:i}catch(i){if(Gr(i,"CALL_EXCEPTION"))return null;throw i}if(e>=0&&e<2147483648){let i=e+2147483648;const o=await ve(this,gu,xd).call(this,"addr(bytes32,uint)",[i]);if(lr(o,20))return Bt(o)}let r=null;for(const i of this.provider.plugins)if(i instanceof m5&&i.supportsCoinType(e)){r=i;break}if(r==null)return null;const n=await ve(this,gu,xd).call(this,"addr(bytes32,uint)",[e]);if(n==null||n==="0x")return null;const s=await r.decodeAddress(e,n);if(s!=null)return s;Be(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:n}})}async getText(e){const r=await ve(this,gu,xd).call(this,"text(bytes32,string)",[e]);return r==null||r==="0x"?null:r}async getContentHash(){const e=await ve(this,gu,xd).call(this,"contenthash(bytes32)");if(e==null||e==="0x")return null;const r=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(r){const s=r[1]==="e3010170"?"ipfs":"ipns",i=parseInt(r[4],16);if(r[5].length===i*2)return`${s}://${h2("0x"+r[2])}`}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&n[1].length===64)return`bzz://${n[1]}`;Be(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const r=await this.getText("avatar");if(r==null)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:r});for(let n=0;n<gS.length;n++){const s=r.match(gS[n]);if(s==null)continue;const i=s[1].toLowerCase();switch(i){case"https":case"data":return e.push({type:"url",value:r}),{linkage:e,url:r};case"ipfs":{const o=g5(r);return e.push({type:"ipfs",value:r}),e.push({type:"url",value:o}),{linkage:e,url:o}}case"erc721":case"erc1155":{const o=i==="erc721"?"tokenURI(uint256)":"uri(uint256)";e.push({type:i,value:r});const a=await this.getAddress();if(a==null)return e.push({type:"!owner",value:""}),{url:null,linkage:e};const c=(s[2]||"").split("/");if(c.length!==2)return e.push({type:`!${i}caip`,value:s[2]||""}),{url:null,linkage:e};const l=c[1],u=new Dc(c[0],["function tokenURI(uint) view returns (string)","function ownerOf(uint) view returns (address)","function uri(uint) view returns (string)","function balanceOf(address, uint256) view returns (uint)"],this.provider);if(i==="erc721"){const m=await u.ownerOf(l);if(a!==m)return e.push({type:"!owner",value:m}),{url:null,linkage:e};e.push({type:"owner",value:m})}else if(i==="erc1155"){const m=await u.balanceOf(a,l);if(!m)return e.push({type:"!balance",value:"0"}),{url:null,linkage:e};e.push({type:"balance",value:m.toString()})}let d=await u[o](l);if(d==null||d==="0x")return e.push({type:"!metadata-url",value:""}),{url:null,linkage:e};e.push({type:"metadata-url-base",value:d}),i==="erc1155"&&(d=d.replace("{id}",Zs(l,32).substring(2)),e.push({type:"metadata-url-expanded",value:d})),d.match(/^ipfs:/i)&&(d=g5(d)),e.push({type:"metadata-url",value:d});let h={};const p=await new Un(d).send();p.assertOk();try{h=p.bodyJson}catch{try{e.push({type:"!metadata",value:p.bodyText})}catch{const m=p.body;return m&&e.push({type:"!metadata",value:Ze(m)}),{url:null,linkage:e}}return{url:null,linkage:e}}if(!h)return e.push({type:"!metadata",value:""}),{url:null,linkage:e};e.push({type:"metadata",value:JSON.stringify(h)});let g=h.image;if(typeof g!="string")return e.push({type:"!imageUrl",value:""}),{url:null,linkage:e};if(!g.match(/^(https:\/\/|data:)/i)){if(g.match(pS)==null)return e.push({type:"!imageUrl-ipfs",value:g}),{url:null,linkage:e};e.push({type:"imageUrl-ipfs",value:g}),g=g5(g)}return e.push({type:"url",value:g}),{linkage:e,url:g}}}}}catch{}return{linkage:e,url:null}}static async getEnsAddress(e){const r=await e.getNetwork(),n=r.getPlugin("org.ethers.plugins.network.Ens");return Be(n,"network does not support ENS","UNSUPPORTED_OPERATION",{operation:"getEnsAddress",info:{network:r}}),n.address}static async fromName(e,r){var n;let s=r;for(;;){if(s===""||s==="."||r!=="eth"&&s==="eth")return null;const i=await ve(n=WA,y5,mS).call(n,e,s);if(i!=null){const o=new WA(e,i,r);return s!==r&&!await o.supportsWildcard()?null:o}s=s.split(".").slice(1).join(".")}}};pu=new WeakMap,Nd=new WeakMap,gu=new WeakSet,xd=async function(t,e){e=(e||[]).slice();const r=T(this,Nd).interface;e.unshift(v0(this.name));let n=null;await this.supportsWildcard()&&(n=r.getFunction(t),Be(n,"missing fragment","UNKNOWN_ERROR",{info:{funcName:t}}),e=[J4(this.name,255),r.encodeFunctionData(n,e)],t="resolve(bytes,bytes)"),e.push({enableCcipRead:!0});try{const s=await T(this,Nd)[t](...e);return n?r.decodeFunctionResult(n,s)[0]:s}catch(s){if(!Gr(s,"CALL_EXCEPTION"))throw s}return null},y5=new WeakSet,mS=async function(t,e){const r=await v5.getEnsAddress(t);try{const n=await new Dc(r,["function resolver(bytes32) view returns (address)"],t).resolver(v0(e),{enableCcipRead:!0});return n===tu?null:n}catch(n){throw n}return null},ne(v5,y5);let ky=v5;const yS=BigInt(0);function Ht(t,e){return function(r){return r==null?e:t(r)}}function Ey(t,e){return r=>{if(e&&r==null)return null;if(!Array.isArray(r))throw new Error("not an array");return r.map(n=>t(n))}}function j0(t,e){return r=>{const n={};for(const s in t){let i=s;if(e&&s in e&&!(i in r)){for(const o of e[s])if(o in r){i=o;break}}try{const o=t[s](r[i]);o!==void 0&&(n[s]=o)}catch(o){const a=o instanceof Error?o.message:"not-an-error";Be(!1,`invalid value for value.${s} (${a})`,"BAD_DATA",{value:r})}}return n}}function pH(t){switch(t){case!0:case"true":return!0;case!1:case"false":return!1}pe(!1,`invalid boolean; ${JSON.stringify(t)}`,"value",t)}function Id(t){return pe(lr(t,!0),"invalid data","value",t),t}function _n(t){return pe(lr(t,32),"invalid hash","value",t),t}const gH=j0({address:Bt,blockHash:_n,blockNumber:mt,data:Id,index:mt,removed:Ht(pH,!1),topics:Ey(_n),transactionHash:_n,transactionIndex:mt},{index:["logIndex"]});function mH(t){return gH(t)}const yH=j0({hash:Ht(_n),parentHash:_n,parentBeaconBlockRoot:Ht(_n,null),number:mt,timestamp:mt,nonce:Ht(Id),difficulty:ct,gasLimit:ct,gasUsed:ct,stateRoot:Ht(_n,null),receiptsRoot:Ht(_n,null),blobGasUsed:Ht(ct,null),excessBlobGas:Ht(ct,null),miner:Ht(Bt),prevRandao:Ht(_n,null),extraData:Id,baseFeePerGas:Ht(ct)},{prevRandao:["mixHash"]});function vH(t){const e=yH(t);return e.transactions=t.transactions.map(r=>typeof r=="string"?r:vS(r)),e}const bH=j0({transactionIndex:mt,blockNumber:mt,transactionHash:_n,address:Bt,topics:Ey(_n),data:Id,index:mt,blockHash:_n},{index:["logIndex"]});function wH(t){return bH(t)}const kH=j0({to:Ht(Bt,null),from:Ht(Bt,null),contractAddress:Ht(Bt,null),index:mt,root:Ht(Ze),gasUsed:ct,blobGasUsed:Ht(ct,null),logsBloom:Ht(Id),blockHash:_n,hash:_n,logs:Ey(wH),blockNumber:mt,cumulativeGasUsed:ct,effectiveGasPrice:Ht(ct),blobGasPrice:Ht(ct,null),status:Ht(mt),type:Ht(mt,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function EH(t){return kH(t)}function vS(t){t.to&&ct(t.to)===yS&&(t.to="0x0000000000000000000000000000000000000000");const e=j0({hash:_n,index:Ht(mt,void 0),type:r=>r==="0x"||r==null?0:mt(r),accessList:Ht(To,null),blobVersionedHashes:Ht(Ey(_n,!0),null),blockHash:Ht(_n,null),blockNumber:Ht(mt,null),transactionIndex:Ht(mt,null),from:Bt,gasPrice:Ht(ct),maxPriorityFeePerGas:Ht(ct),maxFeePerGas:Ht(ct),maxFeePerBlobGas:Ht(ct,null),gasLimit:ct,to:Ht(Bt,null),value:ct,nonce:mt,data:Id,creates:Ht(Bt,null),chainId:Ht(ct,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(t);if(e.to==null&&e.creates==null&&(e.creates=F2(e)),(t.type===1||t.type===2)&&t.accessList==null&&(e.accessList=[]),t.signature?e.signature=Pi.from(t.signature):e.signature=Pi.from(t),e.chainId==null){const r=e.signature.legacyChainId;r!=null&&(e.chainId=r)}return e.blockHash&&ct(e.blockHash)===yS&&(e.blockHash=null),e}const AH="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class Ra{constructor(e){X(this,"name"),rt(this,{name:e})}clone(){return new Ra(this.name)}}class Od extends Ra{constructor(e,r){e==null&&(e=0),super(`org.ethers.network.plugins.GasCost#${e||0}`),X(this,"effectiveBlock"),X(this,"txBase"),X(this,"txCreate"),X(this,"txDataZero"),X(this,"txDataNonzero"),X(this,"txAccessListStorageKey"),X(this,"txAccessListAddress");const n={effectiveBlock:e};function s(i,o){let a=(r||{})[i];a==null&&(a=o),pe(typeof a=="number",`invalud value for ${i}`,"costs",r),n[i]=a}s("txBase",21e3),s("txCreate",32e3),s("txDataZero",4),s("txDataNonzero",16),s("txAccessListStorageKey",1900),s("txAccessListAddress",2400),rt(this,n)}clone(){return new Od(this.effectiveBlock,this)}}class Bd extends Ra{constructor(e,r){super("org.ethers.plugins.network.Ens"),X(this,"address"),X(this,"targetNetwork"),rt(this,{address:e||AH,targetNetwork:r??1})}clone(){return new Bd(this.address,this.targetNetwork)}}var Md;const _H=class $V extends Ra{constructor(e){super("org.ethers.plugins.network.FeeData"),ne(this,Md),V(this,Md,e)}get feeDataFunc(){return T(this,Md)}async getFeeData(e){return await T(this,Md).call(this,e)}clone(){return new $V(T(this,Md))}};Md=new WeakMap;let bS=_H;var Ay,_y;class b5 extends Ra{constructor(e,r){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin"),ne(this,Ay),ne(this,_y),V(this,Ay,e),V(this,_y,r)}get url(){return T(this,Ay)}get processFunc(){return T(this,_y)}clone(){return this}}Ay=new WeakMap,_y=new WeakMap;const w5=new Map;var G0,z0,mu;const TH=class M1{constructor(e,r){ne(this,G0),ne(this,z0),ne(this,mu),V(this,G0,e),V(this,z0,ct(r)),V(this,mu,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return T(this,G0)}set name(e){V(this,G0,e)}get chainId(){return T(this,z0)}set chainId(e){V(this,z0,ct(e,"chainId"))}matches(e){if(e==null)return!1;if(typeof e=="string"){try{return this.chainId===ct(e)}catch{}return this.name===e}if(typeof e=="number"||typeof e=="bigint"){try{return this.chainId===ct(e)}catch{}return!1}if(typeof e=="object"){if(e.chainId!=null){try{return this.chainId===ct(e.chainId)}catch{}return!1}return e.name!=null?this.name===e.name:!1}return!1}get plugins(){return Array.from(T(this,mu).values())}attachPlugin(e){if(T(this,mu).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return T(this,mu).set(e.name,e.clone()),this}getPlugin(e){return T(this,mu).get(e)||null}getPlugins(e){return this.plugins.filter(r=>r.name.split("#")[0]===e)}clone(){const e=new M1(this.name,this.chainId);return this.plugins.forEach(r=>{e.attachPlugin(r.clone())}),e}computeIntrinsicGas(e){const r=this.getPlugin("org.ethers.plugins.network.GasCost")||new Od;let n=r.txBase;if(e.to==null&&(n+=r.txCreate),e.data)for(let s=2;s<e.data.length;s+=2)e.data.substring(s,s+2)==="00"?n+=r.txDataZero:n+=r.txDataNonzero;if(e.accessList){const s=To(e.accessList);for(const i in s)n+=r.txAccessListAddress+r.txAccessListStorageKey*s[i].storageKeys.length}return n}static from(e){if(CH(),e==null)return M1.from("mainnet");if(typeof e=="number"&&(e=BigInt(e)),typeof e=="string"||typeof e=="bigint"){const r=w5.get(e);if(r)return r();if(typeof e=="bigint")return new M1("unknown",e);pe(!1,"unknown network","network",e)}if(typeof e.clone=="function")return e.clone();if(typeof e=="object"){pe(typeof e.name=="string"&&typeof e.chainId=="number","invalid network object name or chainId","network",e);const r=new M1(e.name,e.chainId);return(e.ensAddress||e.ensNetwork!=null)&&r.attachPlugin(new Bd(e.ensAddress,e.ensNetwork)),r}pe(!1,"invalid network","network",e)}static register(e,r){typeof e=="number"&&(e=BigInt(e));const n=w5.get(e);n&&pe(!1,`conflicting network for ${JSON.stringify(n.name)}`,"nameOrChainId",e),w5.set(e,r)}};G0=new WeakMap,z0=new WeakMap,mu=new WeakMap;let Xr=TH;function wS(t,e){const r=String(t);if(!r.match(/^[0-9.]+$/))throw new Error(`invalid gwei value: ${t}`);const n=r.split(".");if(n.length===1&&n.push(""),n.length!==2)throw new Error(`invalid gwei value: ${t}`);for(;n[1].length<e;)n[1]+="0";if(n[1].length>9){let s=BigInt(n[1].substring(0,9));n[1].substring(9).match(/^0+$/)||s++,n[1]=s.toString()}return BigInt(n[0]+n[1])}function kS(t){return new b5(t,async(e,r,n)=>{n.setHeader("User-Agent","ethers");let s;try{const[i,o]=await Promise.all([n.send(),e()]);s=i;const a=s.bodyJson.standard;return{gasPrice:o.gasPrice,maxFeePerGas:wS(a.maxFee,9),maxPriorityFeePerGas:wS(a.maxPriorityFee,9)}}catch(i){Be(!1,`error encountered with polygon gas station (${JSON.stringify(n.url)})`,"SERVER_ERROR",{request:n,response:s,error:i})}})}let ES=!1;function CH(){if(ES)return;ES=!0;function t(e,r,n){const s=function(){const i=new Xr(e,r);return n.ensNetwork!=null&&i.attachPlugin(new Bd(null,n.ensNetwork)),i.attachPlugin(new Od),(n.plugins||[]).forEach(o=>{i.attachPlugin(o)}),i};Xr.register(e,s),Xr.register(r,s),n.altNames&&n.altNames.forEach(i=>{Xr.register(i,s)})}t("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),t("ropsten",3,{ensNetwork:3}),t("rinkeby",4,{ensNetwork:4}),t("goerli",5,{ensNetwork:5}),t("kovan",42,{ensNetwork:42}),t("sepolia",11155111,{ensNetwork:11155111}),t("holesky",17e3,{ensNetwork:17e3}),t("classic",61,{}),t("classicKotti",6,{}),t("arbitrum",42161,{ensNetwork:1}),t("arbitrum-goerli",421613,{}),t("arbitrum-sepolia",421614,{}),t("base",8453,{ensNetwork:1}),t("base-goerli",84531,{}),t("base-sepolia",84532,{}),t("bnb",56,{ensNetwork:1}),t("bnbt",97,{}),t("linea",59144,{ensNetwork:1}),t("linea-goerli",59140,{}),t("linea-sepolia",59141,{}),t("matic",137,{ensNetwork:1,plugins:[kS("https://gasstation.polygon.technology/v2")]}),t("matic-amoy",80002,{}),t("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[kS("https://gasstation-testnet.polygon.technology/v2")]}),t("optimism",10,{ensNetwork:1,plugins:[]}),t("optimism-goerli",420,{}),t("optimism-sepolia",11155420,{}),t("xdai",100,{ensNetwork:1})}function k5(t){return JSON.parse(JSON.stringify(t))}var Wc,Mi,yu,Pa,$0,Ty;class SH{constructor(e){ne(this,$0),ne(this,Wc),ne(this,Mi),ne(this,yu),ne(this,Pa),V(this,Wc,e),V(this,Mi,null),V(this,yu,4e3),V(this,Pa,-2)}get pollingInterval(){return T(this,yu)}set pollingInterval(e){V(this,yu,e)}start(){T(this,Mi)||(V(this,Mi,T(this,Wc)._setTimeout(ve(this,$0,Ty).bind(this),T(this,yu))),ve(this,$0,Ty).call(this))}stop(){T(this,Mi)&&(T(this,Wc)._clearTimeout(T(this,Mi)),V(this,Mi,null))}pause(e){this.stop(),e&&V(this,Pa,-2)}resume(){this.start()}}Wc=new WeakMap,Mi=new WeakMap,yu=new WeakMap,Pa=new WeakMap,$0=new WeakSet,Ty=async function(){try{const t=await T(this,Wc).getBlockNumber();if(T(this,Pa)===-2){V(this,Pa,t);return}if(t!==T(this,Pa)){for(let e=T(this,Pa)+1;e<=t;e++){if(T(this,Mi)==null)return;await T(this,Wc).emit("block",e)}V(this,Pa,t)}}catch{}T(this,Mi)!=null&&V(this,Mi,T(this,Wc)._setTimeout(ve(this,$0,Ty).bind(this),T(this,yu)))};var Ud,Ld,vu;class E5{constructor(e){ne(this,Ud),ne(this,Ld),ne(this,vu),V(this,Ud,e),V(this,vu,!1),V(this,Ld,r=>{this._poll(r,T(this,Ud))})}async _poll(e,r){throw new Error("sub-classes must override this")}start(){T(this,vu)||(V(this,vu,!0),T(this,Ld).call(this,-2),T(this,Ud).on("block",T(this,Ld)))}stop(){T(this,vu)&&(V(this,vu,!1),T(this,Ud).off("block",T(this,Ld)))}pause(e){this.stop()}resume(){this.start()}}Ud=new WeakMap,Ld=new WeakMap,vu=new WeakMap;var H0,jc;class RH extends E5{constructor(e,r){super(e),ne(this,H0),ne(this,jc),V(this,H0,r),V(this,jc,-2)}pause(e){e&&V(this,jc,-2),super.pause(e)}async _poll(e,r){const n=await r.getBlock(T(this,H0));n!=null&&(T(this,jc)===-2?V(this,jc,n.number):n.number>T(this,jc)&&(r.emit(T(this,H0),n.number),V(this,jc,n.number)))}}H0=new WeakMap,jc=new WeakMap;var A5;class PH extends E5{constructor(e,r){super(e),ne(this,A5),V(this,A5,k5(r))}async _poll(e,r){throw new Error("@TODO")}}A5=new WeakMap;var Z0;class NH extends E5{constructor(e,r){super(e),ne(this,Z0),V(this,Z0,r)}async _poll(e,r){const n=await r.getTransactionReceipt(T(this,Z0));n&&r.emit(T(this,Z0),n)}}Z0=new WeakMap;var Gc,J0,Q0,bu,Ui,_5,AS;class T5{constructor(e,r){ne(this,_5),ne(this,Gc),ne(this,J0),ne(this,Q0),ne(this,bu),ne(this,Ui),V(this,Gc,e),V(this,J0,k5(r)),V(this,Q0,ve(this,_5,AS).bind(this)),V(this,bu,!1),V(this,Ui,-2)}start(){T(this,bu)||(V(this,bu,!0),T(this,Ui)===-2&&T(this,Gc).getBlockNumber().then(e=>{V(this,Ui,e)}),T(this,Gc).on("block",T(this,Q0)))}stop(){T(this,bu)&&(V(this,bu,!1),T(this,Gc).off("block",T(this,Q0)))}pause(e){this.stop(),e&&V(this,Ui,-2)}resume(){this.start()}}Gc=new WeakMap,J0=new WeakMap,Q0=new WeakMap,bu=new WeakMap,Ui=new WeakMap,_5=new WeakSet,AS=async function(t){if(T(this,Ui)===-2)return;const e=k5(T(this,J0));e.fromBlock=T(this,Ui)+1,e.toBlock=t;const r=await T(this,Gc).getLogs(e);if(r.length===0){T(this,Ui)<t-60&&V(this,Ui,t-60);return}for(const n of r)T(this,Gc).emit(T(this,J0),n),V(this,Ui,n.blockNumber)};const xH=BigInt(2),IH=10;function Cy(t){return t&&typeof t.then=="function"}function Sy(t,e){return t+":"+JSON.stringify(e,(r,n)=>{if(n==null)return"null";if(typeof n=="bigint")return`bigint:${n.toString()}`;if(typeof n=="string")return n.toLowerCase();if(typeof n=="object"&&!Array.isArray(n)){const s=Object.keys(n);return s.sort(),s.reduce((i,o)=>(i[o]=n[o],i),{})}return n})}class Fd{constructor(e){X(this,"name"),rt(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function OH(t){return JSON.parse(JSON.stringify(t))}function C5(t){return t=Array.from(new Set(t).values()),t.sort(),t}async function S5(t,e){if(t==null)throw new Error("invalid event");if(Array.isArray(t)&&(t={topics:t}),typeof t=="string")switch(t){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:t,tag:t}}if(lr(t,32)){const r=t.toLowerCase();return{type:"transaction",tag:Sy("tx",{hash:r}),hash:r}}if(t.orphan){const r=t;return{type:"orphan",tag:Sy("orphan",r),filter:OH(r)}}if(t.address||t.topics){const r=t,n={topics:(r.topics||[]).map(s=>s==null?null:Array.isArray(s)?C5(s.map(i=>i.toLowerCase())):s.toLowerCase())};if(r.address){const s=[],i=[],o=a=>{lr(a)?s.push(a):i.push((async()=>{s.push(await an(a,e))})())};Array.isArray(r.address)?r.address.forEach(o):o(r.address),i.length&&await Promise.all(i),n.address=C5(s.map(a=>a.toLowerCase()))}return{filter:n,tag:Sy("event",n),type:"event"}}pe(!1,"unknown ProviderEvent","event",t)}function R5(){return new Date().getTime()}const BH={cacheTimeout:250,pollingInterval:4e3};var ts,wu,rs,Y0,ei,Vd,ku,zc,Ry,Li,K0,q0,ir,Ps,P5,N5,X0,x5,eg,Py;class Dd{constructor(e,r){if(ne(this,ir),ne(this,ts),ne(this,wu),ne(this,rs),ne(this,Y0),ne(this,ei),ne(this,Vd),ne(this,ku),ne(this,zc),ne(this,Ry),ne(this,Li),ne(this,K0),ne(this,q0),V(this,q0,Object.assign({},BH,r||{})),e==="any")V(this,Vd,!0),V(this,ei,null);else if(e){const n=Xr.from(e);V(this,Vd,!1),V(this,ei,Promise.resolve(n)),setTimeout(()=>{this.emit("network",n,null)},0)}else V(this,Vd,!1),V(this,ei,null);V(this,zc,-1),V(this,ku,new Map),V(this,ts,new Map),V(this,wu,new Map),V(this,rs,null),V(this,Y0,!1),V(this,Ry,1),V(this,Li,new Map),V(this,K0,!1)}get pollingInterval(){return T(this,q0).pollingInterval}get provider(){return this}get plugins(){return Array.from(T(this,wu).values())}attachPlugin(e){if(T(this,wu).get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return T(this,wu).set(e.name,e.connect(this)),this}getPlugin(e){return T(this,wu).get(e)||null}get disableCcipRead(){return T(this,K0)}set disableCcipRead(e){V(this,K0,!!e)}async ccipReadFetch(e,r,n){if(this.disableCcipRead||n.length===0||e.to==null)return null;const s=e.to.toLowerCase(),i=r.toLowerCase(),o=[];for(let a=0;a<n.length;a++){const c=n[a],l=c.replace("{sender}",s).replace("{data}",i),u=new Un(l);c.indexOf("{data}")===-1&&(u.body={data:i,sender:s}),this.emit("debug",{action:"sendCcipReadFetchRequest",request:u,index:a,urls:n});let d="unknown error",h;try{h=await u.send()}catch(p){o.push(p.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:u,result:{error:p}});continue}try{const p=h.bodyJson;if(p.data)return this.emit("debug",{action:"receiveCcipReadFetchResult",request:u,result:p}),p.data;p.message&&(d=p.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:u,result:p})}catch{}Be(h.statusCode<400||h.statusCode>=500,`response not found during CCIP fetch: ${d}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:c,errorMessage:d}}),o.push(d)}Be(!1,`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:n,errorMessages:o}})}_wrapBlock(e,r){return new c5(vH(e),this)}_wrapLog(e,r){return new uu(mH(e),this)}_wrapTransactionReceipt(e,r){return new dy(EH(e),this)}_wrapTransactionResponse(e,r){return new U0(vS(e),this)}_detectNetwork(){Be(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){Be(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=mt(await ve(this,ir,Ps).call(this,{method:"getBlockNumber"}),"%response");return T(this,zc)>=0&&V(this,zc,e),e}_getAddress(e){return an(e,this)}_getBlockTag(e){if(e==null)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}if(lr(e))return lr(e,32)?e:ca(e);if(typeof e=="bigint"&&(e=mt(e,"blockTag")),typeof e=="number")return e>=0?ca(e):T(this,zc)>=0?ca(T(this,zc)+e):this.getBlockNumber().then(r=>ca(r+e));pe(!1,"invalid blockTag","blockTag",e)}_getFilter(e){const r=(e.topics||[]).map(c=>c==null?null:Array.isArray(c)?C5(c.map(l=>l.toLowerCase())):c.toLowerCase()),n="blockHash"in e?e.blockHash:void 0,s=(c,l,u)=>{let d;switch(c.length){case 0:break;case 1:d=c[0];break;default:c.sort(),d=c}if(n&&(l!=null||u!=null))throw new Error("invalid filter");const h={};return d&&(h.address=d),r.length&&(h.topics=r),l&&(h.fromBlock=l),u&&(h.toBlock=u),n&&(h.blockHash=n),h};let i=[];if(e.address)if(Array.isArray(e.address))for(const c of e.address)i.push(this._getAddress(c));else i.push(this._getAddress(e.address));let o;"fromBlock"in e&&(o=this._getBlockTag(e.fromBlock));let a;return"toBlock"in e&&(a=this._getBlockTag(e.toBlock)),i.filter(c=>typeof c!="string").length||o!=null&&typeof o!="string"||a!=null&&typeof a!="string"?Promise.all([Promise.all(i),o,a]).then(c=>s(c[0],c[1],c[2])):s(i,o,a)}_getTransactionRequest(e){const r=lu(e),n=[];if(["to","from"].forEach(s=>{if(r[s]==null)return;const i=an(r[s],this);Cy(i)?n.push(async function(){r[s]=await i}()):r[s]=i}),r.blockTag!=null){const s=this._getBlockTag(r.blockTag);Cy(s)?n.push(async function(){r.blockTag=await s}()):r.blockTag=s}return n.length?async function(){return await Promise.all(n),r}():r}async getNetwork(){if(T(this,ei)==null){const s=(async()=>{try{const i=await this._detectNetwork();return this.emit("network",i,null),i}catch(i){throw T(this,ei)===s&&V(this,ei,null),i}})();return V(this,ei,s),(await s).clone()}const e=T(this,ei),[r,n]=await Promise.all([e,this._detectNetwork()]);return r.chainId!==n.chainId&&(T(this,Vd)?(this.emit("network",n,r),T(this,ei)===e&&V(this,ei,Promise.resolve(n))):Be(!1,`network changed: ${r.chainId} => ${n.chainId} `,"NETWORK_ERROR",{event:"changed"})),r.clone()}async getFeeData(){const e=await this.getNetwork(),r=async()=>{const{_block:s,gasPrice:i,priorityFee:o}=await nn({_block:ve(this,ir,x5).call(this,"latest",!1),gasPrice:(async()=>{try{const u=await ve(this,ir,Ps).call(this,{method:"getGasPrice"});return ct(u,"%response")}catch{}return null})(),priorityFee:(async()=>{try{const u=await ve(this,ir,Ps).call(this,{method:"getPriorityFee"});return ct(u,"%response")}catch{}return null})()});let a=null,c=null;const l=this._wrapBlock(s,e);return l&&l.baseFeePerGas&&(c=o??BigInt("1000000000"),a=l.baseFeePerGas*xH+c),new uy(i,a,c)},n=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(n){const s=new Un(n.url),i=await n.processFunc(r,this,s);return new uy(i.gasPrice,i.maxFeePerGas,i.maxPriorityFeePerGas)}return await r()}async estimateGas(e){let r=this._getTransactionRequest(e);return Cy(r)&&(r=await r),ct(await ve(this,ir,Ps).call(this,{method:"estimateGas",transaction:r}),"%response")}async call(e){const{tx:r,blockTag:n}=await nn({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await ve(this,ir,N5).call(this,ve(this,ir,P5).call(this,r,n,e.enableCcipRead?0:-1))}async getBalance(e,r){return ct(await ve(this,ir,X0).call(this,{method:"getBalance"},e,r),"%response")}async getTransactionCount(e,r){return mt(await ve(this,ir,X0).call(this,{method:"getTransactionCount"},e,r),"%response")}async getCode(e,r){return Ze(await ve(this,ir,X0).call(this,{method:"getCode"},e,r))}async getStorage(e,r,n){const s=ct(r,"position");return Ze(await ve(this,ir,X0).call(this,{method:"getStorage",position:s},e,n))}async broadcastTransaction(e){const{blockNumber:r,hash:n,network:s}=await nn({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),i=Td.from(e);if(i.hash!==n)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(i,s).replaceableTransaction(r)}async getBlock(e,r){const{network:n,params:s}=await nn({network:this.getNetwork(),params:ve(this,ir,x5).call(this,e,!!r)});return s==null?null:this._wrapBlock(s,n)}async getTransaction(e){const{network:r,params:n}=await nn({network:this.getNetwork(),params:ve(this,ir,Ps).call(this,{method:"getTransaction",hash:e})});return n==null?null:this._wrapTransactionResponse(n,r)}async getTransactionReceipt(e){const{network:r,params:n}=await nn({network:this.getNetwork(),params:ve(this,ir,Ps).call(this,{method:"getTransactionReceipt",hash:e})});if(n==null)return null;if(n.gasPrice==null&&n.effectiveGasPrice==null){const s=await ve(this,ir,Ps).call(this,{method:"getTransaction",hash:e});if(s==null)throw new Error("report this; could not find tx or effectiveGasPrice");n.effectiveGasPrice=s.gasPrice}return this._wrapTransactionReceipt(n,r)}async getTransactionResult(e){const{result:r}=await nn({network:this.getNetwork(),result:ve(this,ir,Ps).call(this,{method:"getTransactionResult",hash:e})});return r==null?null:Ze(r)}async getLogs(e){let r=this._getFilter(e);Cy(r)&&(r=await r);const{network:n,params:s}=await nn({network:this.getNetwork(),params:ve(this,ir,Ps).call(this,{method:"getLogs",filter:r})});return s.map(i=>this._wrapLog(i,n))}_getProvider(e){Be(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await ky.fromName(this,e)}async getAvatar(e){const r=await this.getResolver(e);return r?await r.getAvatar():null}async resolveName(e){const r=await this.getResolver(e);return r?await r.getAddress():null}async lookupAddress(e){e=Bt(e);const r=v0(e.substring(2).toLowerCase()+".addr.reverse");try{const n=await ky.getEnsAddress(this),s=await new Dc(n,["function resolver(bytes32) view returns (address)"],this).resolver(r);if(s==null||s===tu)return null;const i=await new Dc(s,["function name(bytes32) view returns (string)"],this).name(r);return await this.resolveName(i)!==e?null:i}catch(n){if(Gr(n,"BAD_DATA")&&n.value==="0x"||Gr(n,"CALL_EXCEPTION"))return null;throw n}return null}async waitForTransaction(e,r,n){const s=r??1;return s===0?this.getTransactionReceipt(e):new Promise(async(i,o)=>{let a=null;const c=async l=>{try{const u=await this.getTransactionReceipt(e);if(u!=null&&l-u.blockNumber+1>=s){i(u),a&&(clearTimeout(a),a=null);return}}catch(u){console.log("EEE",u)}this.once("block",c)};n!=null&&(a=setTimeout(()=>{a!=null&&(a=null,this.off("block",c),o(yr("timeout","TIMEOUT",{reason:"timeout"})))},n)),c(await this.getBlockNumber())})}async waitForBlock(e){Be(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const r=T(this,Li).get(e);r&&(r.timer&&clearTimeout(r.timer),T(this,Li).delete(e))}_setTimeout(e,r){r==null&&(r=0);const n=yo(this,Ry)._++,s=()=>{T(this,Li).delete(n),e()};if(this.paused)T(this,Li).set(n,{timer:null,func:s,time:r});else{const i=setTimeout(s,r);T(this,Li).set(n,{timer:i,func:s,time:R5()})}return n}_forEachSubscriber(e){for(const r of T(this,ts).values())e(r.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new Fd(e.type);case"block":{const r=new SH(this);return r.pollingInterval=this.pollingInterval,r}case"safe":case"finalized":return new RH(this,e.type);case"event":return new T5(this,e.filter);case"transaction":return new NH(this,e.hash);case"orphan":return new PH(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,r){for(const n of T(this,ts).values())if(n.subscriber===e){n.started&&n.subscriber.stop(),n.subscriber=r,n.started&&r.start(),T(this,rs)!=null&&r.pause(T(this,rs));break}}async on(e,r){const n=await ve(this,ir,Py).call(this,e);return n.listeners.push({listener:r,once:!1}),n.started||(n.subscriber.start(),n.started=!0,T(this,rs)!=null&&n.subscriber.pause(T(this,rs))),this}async once(e,r){const n=await ve(this,ir,Py).call(this,e);return n.listeners.push({listener:r,once:!0}),n.started||(n.subscriber.start(),n.started=!0,T(this,rs)!=null&&n.subscriber.pause(T(this,rs))),this}async emit(e,...r){const n=await ve(this,ir,eg).call(this,e,r);if(!n||n.listeners.length===0)return!1;const s=n.listeners.length;return n.listeners=n.listeners.filter(({listener:i,once:o})=>{const a=new d2(this,o?null:i,e);try{i.call(this,...r,a)}catch{}return!o}),n.listeners.length===0&&(n.started&&n.subscriber.stop(),T(this,ts).delete(n.tag)),s>0}async listenerCount(e){if(e){const n=await ve(this,ir,eg).call(this,e);return n?n.listeners.length:0}let r=0;for(const{listeners:n}of T(this,ts).values())r+=n.length;return r}async listeners(e){if(e){const n=await ve(this,ir,eg).call(this,e);return n?n.listeners.map(({listener:s})=>s):[]}let r=[];for(const{listeners:n}of T(this,ts).values())r=r.concat(n.map(({listener:s})=>s));return r}async off(e,r){const n=await ve(this,ir,eg).call(this,e);if(!n)return this;if(r){const s=n.listeners.map(({listener:i})=>i).indexOf(r);s>=0&&n.listeners.splice(s,1)}return(!r||n.listeners.length===0)&&(n.started&&n.subscriber.stop(),T(this,ts).delete(n.tag)),this}async removeAllListeners(e){if(e){const{tag:r,started:n,subscriber:s}=await ve(this,ir,Py).call(this,e);n&&s.stop(),T(this,ts).delete(r)}else for(const[r,{started:n,subscriber:s}]of T(this,ts))n&&s.stop(),T(this,ts).delete(r);return this}async addListener(e,r){return await this.on(e,r)}async removeListener(e,r){return this.off(e,r)}get destroyed(){return T(this,Y0)}destroy(){this.removeAllListeners();for(const e of T(this,Li).keys())this._clearTimeout(e);V(this,Y0,!0)}get paused(){return T(this,rs)!=null}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(V(this,zc,-1),T(this,rs)!=null){if(T(this,rs)==!!e)return;Be(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(r=>r.pause(e)),V(this,rs,!!e);for(const r of T(this,Li).values())r.timer&&clearTimeout(r.timer),r.time=R5()-r.time}resume(){if(T(this,rs)!=null){this._forEachSubscriber(e=>e.resume()),V(this,rs,null);for(const e of T(this,Li).values()){let r=e.time;r<0&&(r=0),e.time=R5(),setTimeout(e.func,r)}}}}ts=new WeakMap,wu=new WeakMap,rs=new WeakMap,Y0=new WeakMap,ei=new WeakMap,Vd=new WeakMap,ku=new WeakMap,zc=new WeakMap,Ry=new WeakMap,Li=new WeakMap,K0=new WeakMap,q0=new WeakMap,ir=new WeakSet,Ps=async function(t){const e=T(this,q0).cacheTimeout;if(e<0)return await this._perform(t);const r=Sy(t.method,t);let n=T(this,ku).get(r);return n||(n=this._perform(t),T(this,ku).set(r,n),setTimeout(()=>{T(this,ku).get(r)===n&&T(this,ku).delete(r)},e)),await n},P5=async function(t,e,r){Be(r<IH,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},t,{blockTag:e,enableCcipRead:!0})});const n=lu(t);try{return Ze(await this._perform({method:"call",transaction:n,blockTag:e}))}catch(s){if(!this.disableCcipRead&&Vp(s)&&s.data&&r>=0&&e==="latest"&&n.to!=null&&ur(s.data,0,4)==="0x556f1830"){const i=s.data,o=await an(n.to,this);let a;try{a=VH(ur(s.data,4))}catch(u){Be(!1,u.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:n,info:{data:i}})}Be(a.sender.toLowerCase()===o.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:i,reason:"OffchainLookup",transaction:n,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:a.errorArgs}});const c=await this.ccipReadFetch(n,a.calldata,a.urls);Be(c!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:n,info:{data:s.data,errorArgs:a.errorArgs}});const l={to:o,data:$t([a.selector,FH([c,a.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:l});try{const u=await ve(this,ir,P5).call(this,l,e,r+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},l),result:u}),u}catch(u){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},l),error:u}),u}}throw s}},N5=async function(t){const{value:e}=await nn({network:this.getNetwork(),value:t});return e},X0=async function(t,e,r){let n=this._getAddress(e),s=this._getBlockTag(r);return(typeof n!="string"||typeof s!="string")&&([n,s]=await Promise.all([n,s])),await ve(this,ir,N5).call(this,ve(this,ir,Ps).call(this,Object.assign(t,{address:n,blockTag:s})))},x5=async function(t,e){if(lr(t,32))return await ve(this,ir,Ps).call(this,{method:"getBlock",blockHash:t,includeTransactions:e});let r=this._getBlockTag(t);return typeof r!="string"&&(r=await r),await ve(this,ir,Ps).call(this,{method:"getBlock",blockTag:r,includeTransactions:e})},eg=async function(t,e){let r=await S5(t,this);return r.type==="event"&&e&&e.length>0&&e[0].removed===!0&&(r=await S5({orphan:"drop-log",log:e[0]},this)),T(this,ts).get(r.tag)||null},Py=async function(t){const e=await S5(t,this),r=e.tag;let n=T(this,ts).get(r);return n||(n={subscriber:this._getSubscriber(e),tag:r,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},T(this,ts).set(r,n)),n};function MH(t,e){try{const r=I5(t,e);if(r)return la(r)}catch{}return null}function I5(t,e){if(t==="0x")return null;try{const r=mt(ur(t,e,e+32)),n=mt(ur(t,r,r+32));return ur(t,r+32,r+32+n)}catch{}return null}function _S(t){const e=on(t);if(e.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(e,32-e.length),r}function UH(t){if(t.length%32===0)return t;const e=new Uint8Array(Math.ceil(t.length/32)*32);return e.set(t),e}const LH=new Uint8Array([]);function FH(t){const e=[];let r=0;for(let n=0;n<t.length;n++)e.push(LH),r+=32;for(let n=0;n<t.length;n++){const s=qe(t[n]);e[n]=_S(r),e.push(_S(s.length)),e.push(UH(s)),r+=32+Math.ceil(s.length/32)*32}return $t(e)}const TS="0x0000000000000000000000000000000000000000000000000000000000000000";function VH(t){const e={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};Be(oa(t)>=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const r=ur(t,0,32);Be(ur(r,0,12)===ur(TS,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),e.sender=ur(r,12);try{const n=[],s=mt(ur(t,32,64)),i=mt(ur(t,s,s+32)),o=ur(t,s+32);for(let a=0;a<i;a++){const c=MH(o,a*32);if(c==null)throw new Error("abort");n.push(c)}e.urls=n}catch{Be(!1,"corrupt OffchainLookup urls","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup urls"})}try{const n=I5(t,64);if(n==null)throw new Error("abort");e.calldata=n}catch{Be(!1,"corrupt OffchainLookup calldata","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup calldata"})}Be(ur(t,100,128)===ur(TS,0,28),"corrupt OffchainLookup callbaackSelector","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup callbaackSelector"}),e.selector=ur(t,96,100);try{const n=I5(t,128);if(n==null)throw new Error("abort");e.extraData=n}catch{Be(!1,"corrupt OffchainLookup extraData","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup extraData"})}return e.errorArgs="sender,urls,calldata,selector,extraData".split(/,/).map(n=>e[n]),e}function Wd(t,e){if(t.provider)return t.provider;Be(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:e})}async function CS(t,e){let r=lu(e);if(r.to!=null&&(r.to=an(r.to,t)),r.from!=null){const n=r.from;r.from=Promise.all([t.getAddress(),an(n,t)]).then(([s,i])=>(pe(s.toLowerCase()===i.toLowerCase(),"transaction from mismatch","tx.from",i),s))}else r.from=t.getAddress();return await nn(r)}class jd{constructor(e){X(this,"provider"),rt(this,{provider:e||null})}async getNonce(e){return Wd(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await CS(this,e)}async populateTransaction(e){const r=Wd(this,"populateTransaction"),n=await CS(this,e);n.nonce==null&&(n.nonce=await this.getNonce("pending")),n.gasLimit==null&&(n.gasLimit=await this.estimateGas(n));const s=await this.provider.getNetwork();if(n.chainId!=null){const o=ct(n.chainId);pe(o===s.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else n.chainId=s.chainId;const i=n.maxFeePerGas!=null||n.maxPriorityFeePerGas!=null;if(n.gasPrice!=null&&(n.type===2||i)?pe(!1,"eip-1559 transaction do not support gasPrice","tx",e):(n.type===0||n.type===1)&&i&&pe(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e),(n.type===2||n.type==null)&&n.maxFeePerGas!=null&&n.maxPriorityFeePerGas!=null)n.type=2;else if(n.type===0||n.type===1){const o=await r.getFeeData();Be(o.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice)}else{const o=await r.getFeeData();if(n.type==null)if(o.maxFeePerGas!=null&&o.maxPriorityFeePerGas!=null)if(n.type=2,n.gasPrice!=null){const a=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=a,n.maxPriorityFeePerGas=a}else n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas);else o.gasPrice!=null?(Be(!i,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice),n.type=0):Be(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else(n.type===2||n.type===3)&&(n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas))}return await nn(n)}async estimateGas(e){return Wd(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return Wd(this,"call").call(await this.populateCall(e))}async resolveName(e){return await Wd(this,"resolveName").resolveName(e)}async sendTransaction(e){const r=Wd(this,"sendTransaction"),n=await this.populateTransaction(e);delete n.from;const s=Td.from(n);return await r.broadcastTransaction(await this.signTransaction(s))}}var tg,Ny;const DH=class HV extends jd{constructor(e,r){super(r),ne(this,tg),X(this,"address"),rt(this,{address:e})}async getAddress(){return this.address}connect(e){return new HV(this.address,e)}async signTransaction(e){ve(this,tg,Ny).call(this,"transactions","signTransaction")}async signMessage(e){ve(this,tg,Ny).call(this,"messages","signMessage")}async signTypedData(e,r,n){ve(this,tg,Ny).call(this,"typed-data","signTypedData")}};tg=new WeakSet,Ny=function(t,e){Be(!1,`VoidSigner cannot sign ${t}`,"UNSUPPORTED_OPERATION",{operation:e})};let xy=DH;const SS=new Set;function Na(t){SS.has(t)||(SS.add(t),console.log("========= NOTICE ========="),console.log(`Request-Rate Exceeded for ${t} (this message will not be repeated)`),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.org/api-keys/"),console.log("=========================="))}function WH(t){return JSON.parse(JSON.stringify(t))}var fs,xa,Gd,Eu,zd,rg,$d,O5,B5;class RS{constructor(e){ne(this,$d),ne(this,fs),ne(this,xa),ne(this,Gd),ne(this,Eu),ne(this,zd),ne(this,rg),V(this,fs,e),V(this,xa,null),V(this,Gd,ve(this,$d,O5).bind(this)),V(this,Eu,!1),V(this,zd,null),V(this,rg,!1)}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,r){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}start(){T(this,Eu)||(V(this,Eu,!0),ve(this,$d,O5).call(this,-2))}stop(){T(this,Eu)&&(V(this,Eu,!1),V(this,rg,!0),ve(this,$d,B5).call(this),T(this,fs).off("block",T(this,Gd)))}pause(e){e&&ve(this,$d,B5).call(this),T(this,fs).off("block",T(this,Gd))}resume(){this.start()}}fs=new WeakMap,xa=new WeakMap,Gd=new WeakMap,Eu=new WeakMap,zd=new WeakMap,rg=new WeakMap,$d=new WeakSet,O5=async function(t){try{T(this,xa)==null&&V(this,xa,this._subscribe(T(this,fs)));let e=null;try{e=await T(this,xa)}catch(s){if(!Gr(s,"UNSUPPORTED_OPERATION")||s.operation!=="eth_newFilter")throw s}if(e==null){V(this,xa,null),T(this,fs)._recoverSubscriber(this,this._recover(T(this,fs)));return}const r=await T(this,fs).getNetwork();if(T(this,zd)||V(this,zd,r),T(this,zd).chainId!==r.chainId)throw new Error("chaid changed");if(T(this,rg))return;const n=await T(this,fs).send("eth_getFilterChanges",[e]);await this._emitResults(T(this,fs),n)}catch(e){console.log("@TODO",e)}T(this,fs).once("block",T(this,Gd))},B5=function(){const t=T(this,xa);t&&(V(this,xa,null),t.then(e=>{T(this,fs).destroyed||T(this,fs).send("eth_uninstallFilter",[e])}))};var Hd;class jH extends RS{constructor(e,r){super(e),ne(this,Hd),V(this,Hd,WH(r))}_recover(e){return new T5(e,T(this,Hd))}async _subscribe(e){return await e.send("eth_newFilter",[T(this,Hd)])}async _emitResults(e,r){for(const n of r)e.emit(T(this,Hd),e._wrapLog(n,e._network))}}Hd=new WeakMap;class GH extends RS{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,r){for(const n of r)e.emit("pending",n)}}const zH="bigint,boolean,function,number,string,symbol".split(/,/g);function Iy(t){if(t==null||zH.indexOf(typeof t)>=0||typeof t.getAddress=="function")return t;if(Array.isArray(t))return t.map(Iy);if(typeof t=="object")return Object.keys(t).reduce((e,r)=>(e[r]=t[r],e),{});throw new Error(`should not happen: ${t} (${typeof t})`)}function $H(t){return new Promise(e=>{setTimeout(e,t)})}function Zd(t){return t&&t.toLowerCase()}function PS(t){return t&&typeof t.pollingInterval=="number"}const NS={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class ng extends jd{constructor(e,r){super(e),X(this,"address"),r=Bt(r),rt(this,{address:r})}connect(e){Be(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(e){return await this.populateCall(e)}async sendUncheckedTransaction(e){const r=Iy(e),n=[];if(r.from){const i=r.from;n.push((async()=>{const o=await an(i,this.provider);pe(o!=null&&o.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),r.from=o})())}else r.from=this.address;if(r.gasLimit==null&&n.push((async()=>{r.gasLimit=await this.provider.estimateGas({...r,from:this.address})})()),r.to!=null){const i=r.to;n.push((async()=>{r.to=await an(i,this.provider)})())}n.length&&await Promise.all(n);const s=this.provider.getRpcTransaction(r);return this.provider.send("eth_sendTransaction",[s])}async sendTransaction(e){const r=await this.provider.getBlockNumber(),n=await this.sendUncheckedTransaction(e);return await new Promise((s,i)=>{const o=[1e3,100];let a=0;const c=async()=>{try{const l=await this.provider.getTransaction(n);if(l!=null){s(l.replaceableTransaction(r));return}}catch(l){if(Gr(l,"CANCELLED")||Gr(l,"BAD_DATA")||Gr(l,"NETWORK_ERROR")||Gr(l,"UNSUPPORTED_OPERATION")){l.info==null&&(l.info={}),l.info.sendTransactionHash=n,i(l);return}if(Gr(l,"INVALID_ARGUMENT")&&(a++,l.info==null&&(l.info={}),l.info.sendTransactionHash=n,a>10)){i(l);return}this.provider.emit("error",yr("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:l}))}this.provider._setTimeout(()=>{c()},o.pop()||4e3)};c()})}async signTransaction(e){const r=Iy(e);if(r.from){const s=await an(r.from,this.provider);pe(s!=null&&s.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),r.from=s}else r.from=this.address;const n=this.provider.getRpcTransaction(r);return await this.provider.send("eth_signTransaction",[n])}async signMessage(e){const r=typeof e=="string"?qr(e):e;return await this.provider.send("personal_sign",[Ze(r),this.address.toLowerCase()])}async signTypedData(e,r,n){const s=Iy(n),i=await ou.resolveNames(e,r,s,async o=>{const a=await an(o);return pe(a!=null,"TypedData does not support null address","value",o),a});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(ou.getPayload(i.domain,r,i.value))])}async unlock(e){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),e,null])}async _legacySignMessage(e){const r=typeof e=="string"?qr(e):e;return await this.provider.send("eth_sign",[this.address.toLowerCase(),Ze(r)])}}var Jd,sg,$c,Ia,So,Fi,Ns,Oy,M5;class By extends Dd{constructor(e,r){super(e,r),ne(this,Oy),ne(this,Jd),ne(this,sg),ne(this,$c),ne(this,Ia),ne(this,So),ne(this,Fi),ne(this,Ns),V(this,sg,1),V(this,Jd,Object.assign({},NS,r||{})),V(this,$c,[]),V(this,Ia,null),V(this,Fi,null),V(this,Ns,null);{let s=null;const i=new Promise(o=>{s=o});V(this,So,{promise:i,resolve:s})}const n=this._getOption("staticNetwork");typeof n=="boolean"?(pe(!n||e!=="any","staticNetwork cannot be used on special network 'any'","options",r),n&&e!=null&&V(this,Fi,Xr.from(e))):n&&(pe(e==null||n.matches(e),"staticNetwork MUST match network object","options",r),V(this,Fi,n))}_getOption(e){return T(this,Jd)[e]}get _network(){return Be(T(this,Fi),"network is not available yet","NETWORK_ERROR"),T(this,Fi)}async _perform(e){if(e.method==="call"||e.method==="estimateGas"){let n=e.transaction;if(n&&n.type!=null&&ct(n.type)&&n.maxFeePerGas==null&&n.maxPriorityFeePerGas==null){const s=await this.getFeeData();s.maxFeePerGas==null&&s.maxPriorityFeePerGas==null&&(e=Object.assign({},e,{transaction:Object.assign({},n,{type:void 0})}))}}const r=this.getRpcRequest(e);return r!=null?await this.send(r.method,r.args):super._perform(e)}async _detectNetwork(){const e=this._getOption("staticNetwork");if(e)if(e===!0){if(T(this,Fi))return T(this,Fi)}else return e;return T(this,Ns)?await T(this,Ns):this.ready?(V(this,Ns,(async()=>{try{const r=Xr.from(ct(await this.send("eth_chainId",[])));return V(this,Ns,null),r}catch(r){throw V(this,Ns,null),r}})()),await T(this,Ns)):(V(this,Ns,(async()=>{const r={id:yo(this,sg)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:r});let n;try{n=(await this._send(r))[0],V(this,Ns,null)}catch(s){throw V(this,Ns,null),this.emit("debug",{action:"receiveRpcError",error:s}),s}if(this.emit("debug",{action:"receiveRpcResult",result:n}),"result"in n)return Xr.from(ct(n.result));throw this.getRpcError(r,n)})()),await T(this,Ns))}_start(){T(this,So)==null||T(this,So).resolve==null||(T(this,So).resolve(),V(this,So,null),(async()=>{for(;T(this,Fi)==null&&!this.destroyed;)try{V(this,Fi,await this._detectNetwork())}catch(e){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",yr("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:e}})),await $H(1e3)}ve(this,Oy,M5).call(this)})())}async _waitUntilReady(){if(T(this,So)!=null)return await T(this,So).promise}_getSubscriber(e){return e.type==="pending"?new GH(this):e.type==="event"?this._getOption("polling")?new T5(this,e.filter):new jH(this,e.filter):e.type==="orphan"&&e.filter.orphan==="drop-log"?new Fd("orphan"):super._getSubscriber(e)}get ready(){return T(this,So)==null}getRpcTransaction(e){const r={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(n=>{if(e[n]==null)return;let s=n;n==="gasLimit"&&(s="gas"),r[s]=ca(ct(e[n],`tx.${n}`))}),["from","to","data"].forEach(n=>{e[n]!=null&&(r[n]=Ze(e[n]))}),e.accessList&&(r.accessList=To(e.accessList)),e.blobVersionedHashes&&(r.blobVersionedHashes=e.blobVersionedHashes.map(n=>n.toLowerCase())),r}getRpcRequest(e){switch(e.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[Zd(e.address),e.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[Zd(e.address),e.blockTag]};case"getCode":return{method:"eth_getCode",args:[Zd(e.address),e.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[Zd(e.address),"0x"+e.position.toString(16),e.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[e.signedTransaction]};case"getBlock":if("blockTag"in e)return{method:"eth_getBlockByNumber",args:[e.blockTag,!!e.includeTransactions]};if("blockHash"in e)return{method:"eth_getBlockByHash",args:[e.blockHash,!!e.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[e.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[e.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(e.transaction),e.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(e.transaction)]};case"getLogs":return e.filter&&e.filter.address!=null&&(Array.isArray(e.filter.address)?e.filter.address=e.filter.address.map(Zd):e.filter.address=Zd(e.filter.address)),{method:"eth_getLogs",args:[e.filter]}}return null}getRpcError(e,r){const{method:n}=e,{error:s}=r;if(n==="eth_estimateGas"&&s.message){const a=s.message;if(!a.match(/revert/i)&&a.match(/insufficient funds/i))return yr("insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.params[0],info:{payload:e,error:s}})}if(n==="eth_call"||n==="eth_estimateGas"){const a=U5(s),c=Rd.getBuiltinCallException(n==="eth_call"?"call":"estimateGas",e.params[0],a?a.data:null);return c.info={error:s,payload:e},c}const i=JSON.stringify(HH(s));if(typeof s.message=="string"&&s.message.match(/user denied|ethers-user-denied/i))return yr("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[n]||"unknown",reason:"rejected",info:{payload:e,error:s}});if(n==="eth_sendRawTransaction"||n==="eth_sendTransaction"){const a=e.params[0];if(i.match(/insufficient funds|base fee exceeds gas limit/i))return yr("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:a,info:{error:s}});if(i.match(/nonce/i)&&i.match(/too low/i))return yr("nonce has already been used","NONCE_EXPIRED",{transaction:a,info:{error:s}});if(i.match(/replacement transaction/i)&&i.match(/underpriced/i))return yr("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:a,info:{error:s}});if(i.match(/only replay-protected/i))return yr("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:n,info:{transaction:a,info:{error:s}}})}let o=!!i.match(/the method .* does not exist/i);return o||s&&s.details&&s.details.startsWith("Unauthorized method:")&&(o=!0),o?yr("unsupported operation","UNSUPPORTED_OPERATION",{operation:e.method,info:{error:s,payload:e}}):yr("could not coalesce error","UNKNOWN_ERROR",{error:s,payload:e})}send(e,r){if(this.destroyed)return Promise.reject(yr("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e}));const n=yo(this,sg)._++,s=new Promise((i,o)=>{T(this,$c).push({resolve:i,reject:o,payload:{method:e,params:r,id:n,jsonrpc:"2.0"}})});return ve(this,Oy,M5).call(this),s}async getSigner(e){e==null&&(e=0);const r=this.send("eth_accounts",[]);if(typeof e=="number"){const s=await r;if(e>=s.length)throw new Error("no such account");return new ng(this,s[e])}const{accounts:n}=await nn({network:this.getNetwork(),accounts:r});e=Bt(e);for(const s of n)if(Bt(s)===e)return new ng(this,e);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(e=>new ng(this,e))}destroy(){T(this,Ia)&&(clearTimeout(T(this,Ia)),V(this,Ia,null));for(const{payload:e,reject:r}of T(this,$c))r(yr("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e.method}));V(this,$c,[]),super.destroy()}}Jd=new WeakMap,sg=new WeakMap,$c=new WeakMap,Ia=new WeakMap,So=new WeakMap,Fi=new WeakMap,Ns=new WeakMap,Oy=new WeakSet,M5=function(){if(T(this,Ia))return;const t=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");V(this,Ia,setTimeout(()=>{V(this,Ia,null);const e=T(this,$c);for(V(this,$c,[]);e.length;){const r=[e.shift()];for(;e.length&&r.length!==T(this,Jd).batchMaxCount;)if(r.push(e.shift()),JSON.stringify(r.map(n=>n.payload)).length>T(this,Jd).batchMaxSize){e.unshift(r.pop());break}(async()=>{const n=r.length===1?r[0].payload:r.map(s=>s.payload);this.emit("debug",{action:"sendRpcPayload",payload:n});try{const s=await this._send(n);this.emit("debug",{action:"receiveRpcResult",result:s});for(const{resolve:i,reject:o,payload:a}of r){if(this.destroyed){o(yr("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:a.method}));continue}const c=s.filter(l=>l.id===a.id)[0];if(c==null){const l=yr("missing response for request","BAD_DATA",{value:s,info:{payload:a}});this.emit("error",l),o(l);continue}if("error"in c){o(this.getRpcError(a,c));continue}i(c.result)}}catch(s){this.emit("debug",{action:"receiveRpcError",error:s});for(const{reject:i}of r)i(s)}})()}},t))};var Au;class xS extends By{constructor(e,r){super(e,r),ne(this,Au);let n=this._getOption("pollingInterval");n==null&&(n=NS.pollingInterval),V(this,Au,n)}_getSubscriber(e){const r=super._getSubscriber(e);return PS(r)&&(r.pollingInterval=T(this,Au)),r}get pollingInterval(){return T(this,Au)}set pollingInterval(e){if(!Number.isInteger(e)||e<0)throw new Error("invalid interval");V(this,Au,e),this._forEachSubscriber(r=>{PS(r)&&(r.pollingInterval=T(this,Au))})}}Au=new WeakMap;var ig;class xs extends xS{constructor(e,r,n){e==null&&(e="http://localhost:8545"),super(r,n),ne(this,ig),typeof e=="string"?V(this,ig,new Un(e)):V(this,ig,e.clone())}_getConnection(){return T(this,ig).clone()}async send(e,r){return await this._start(),await super.send(e,r)}async _send(e){const r=this._getConnection();r.body=JSON.stringify(e),r.setHeader("content-type","application/json");const n=await r.send();n.assertOk();let s=n.bodyJson;return Array.isArray(s)||(s=[s]),s}}ig=new WeakMap;function U5(t){if(t==null)return null;if(typeof t.message=="string"&&t.message.match(/revert/i)&&lr(t.data))return{message:t.message,data:t.data};if(typeof t=="object"){for(const e in t){const r=U5(t[e]);if(r)return r}return null}if(typeof t=="string")try{return U5(JSON.parse(t))}catch{}return null}function L5(t,e){if(t!=null){if(typeof t.message=="string"&&e.push(t.message),typeof t=="object")for(const r in t)L5(t[r],e);if(typeof t=="string")try{return L5(JSON.parse(t),e)}catch{}}}function HH(t){const e=[];return L5(t,e),e}const My="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function ZH(t){switch(t){case"mainnet":return"rpc.ankr.com/eth";case"goerli":return"rpc.ankr.com/eth_goerli";case"sepolia":return"rpc.ankr.com/eth_sepolia";case"arbitrum":return"rpc.ankr.com/arbitrum";case"base":return"rpc.ankr.com/base";case"base-goerli":return"rpc.ankr.com/base_goerli";case"base-sepolia":return"rpc.ankr.com/base_sepolia";case"bnb":return"rpc.ankr.com/bsc";case"bnbt":return"rpc.ankr.com/bsc_testnet_chapel";case"matic":return"rpc.ankr.com/polygon";case"matic-mumbai":return"rpc.ankr.com/polygon_mumbai";case"optimism":return"rpc.ankr.com/optimism";case"optimism-goerli":return"rpc.ankr.com/optimism_testnet";case"optimism-sepolia":return"rpc.ankr.com/optimism_sepolia"}pe(!1,"unsupported network","network",t)}class Qd extends xs{constructor(e,r){e==null&&(e="mainnet");const n=Xr.from(e);r==null&&(r=My);const s={polling:!0,staticNetwork:n},i=Qd.getRequest(n,r);super(i,n,s),X(this,"apiKey"),rt(this,{apiKey:r})}_getProvider(e){try{return new Qd(e,this.apiKey)}catch{}return super._getProvider(e)}static getRequest(e,r){r==null&&(r=My);const n=new Un(`https://${ZH(e.name)}/${r}`);return n.allowGzip=!0,r===My&&(n.retryFunc=async(s,i,o)=>(Na("AnkrProvider"),!0)),n}getRpcError(e,r){return e.method==="eth_sendRawTransaction"&&r&&r.error&&r.error.message==="INTERNAL_ERROR: could not replace existing tx"&&(r.error.message="replacement transaction underpriced"),super.getRpcError(e,r)}isCommunityResource(){return this.apiKey===My}}const Uy="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";function JH(t){switch(t){case"mainnet":return"eth-mainnet.alchemyapi.io";case"goerli":return"eth-goerli.g.alchemy.com";case"sepolia":return"eth-sepolia.g.alchemy.com";case"arbitrum":return"arb-mainnet.g.alchemy.com";case"arbitrum-goerli":return"arb-goerli.g.alchemy.com";case"arbitrum-sepolia":return"arb-sepolia.g.alchemy.com";case"base":return"base-mainnet.g.alchemy.com";case"base-goerli":return"base-goerli.g.alchemy.com";case"base-sepolia":return"base-sepolia.g.alchemy.com";case"matic":return"polygon-mainnet.g.alchemy.com";case"matic-amoy":return"polygon-amoy.g.alchemy.com";case"matic-mumbai":return"polygon-mumbai.g.alchemy.com";case"optimism":return"opt-mainnet.g.alchemy.com";case"optimism-goerli":return"opt-goerli.g.alchemy.com";case"optimism-sepolia":return"opt-sepolia.g.alchemy.com"}pe(!1,"unsupported network","network",t)}class Yd extends xs{constructor(e,r){e==null&&(e="mainnet");const n=Xr.from(e);r==null&&(r=Uy);const s=Yd.getRequest(n,r);super(s,n,{staticNetwork:n}),X(this,"apiKey"),rt(this,{apiKey:r})}_getProvider(e){try{return new Yd(e,this.apiKey)}catch{}return super._getProvider(e)}async _perform(e){if(e.method==="getTransactionResult"){const{trace:r,tx:n}=await nn({trace:this.send("trace_transaction",[e.hash]),tx:this.getTransaction(e.hash)});if(r==null||n==null)return null;let s,i=!1;try{s=r[0].result.output,i=r[0].error==="Reverted"}catch{}if(s)return Be(!i,"an error occurred during transaction executions","CALL_EXCEPTION",{action:"getTransactionResult",data:s,reason:null,transaction:n,invocation:null,revert:null}),s;Be(!1,"could not parse trace result","BAD_DATA",{value:r})}return await super._perform(e)}isCommunityResource(){return this.apiKey===Uy}static getRequest(e,r){r==null&&(r=Uy);const n=new Un(`https://${JH(e.name)}/v2/${r}`);return n.allowGzip=!0,r===Uy&&(n.retryFunc=async(s,i,o)=>(Na("alchemy"),!0)),n}}function Ly(t){switch(t){case"mainnet":return"39f1d67cedf8b7831010a665328c9197";case"arbitrum":return"0550c209db33c3abf4cc927e1e18cea1";case"bnb":return"98b5a77e531614387366f6fc5da097f8";case"matic":return"cd9d4d70377471aa7c142ec4a4205249"}pe(!1,"unsupported network","network",t)}function QH(t){switch(t){case"mainnet":return"ethereum-mainnet.core.chainstack.com";case"arbitrum":return"arbitrum-mainnet.core.chainstack.com";case"bnb":return"bsc-mainnet.core.chainstack.com";case"matic":return"polygon-mainnet.core.chainstack.com"}pe(!1,"unsupported network","network",t)}class Kd extends xs{constructor(e,r){e==null&&(e="mainnet");const n=Xr.from(e);r==null&&(r=Ly(n.name));const s=Kd.getRequest(n,r);super(s,n,{staticNetwork:n}),X(this,"apiKey"),rt(this,{apiKey:r})}_getProvider(e){try{return new Kd(e,this.apiKey)}catch{}return super._getProvider(e)}isCommunityResource(){return this.apiKey===Ly(this._network.name)}static getRequest(e,r){r==null&&(r=Ly(e.name));const n=new Un(`https://${QH(e.name)}/${r}`);return n.allowGzip=!0,r===Ly(e.name)&&(n.retryFunc=async(s,i,o)=>(Na("ChainstackProvider"),!0)),n}}class F5 extends xs{constructor(e){e==null&&(e="mainnet");const r=Xr.from(e);pe(r.name==="mainnet","unsupported network","network",e),super("https://cloudflare-eth.com/",r,{staticNetwork:r})}}const IS=2e3;function YH(t){return t&&typeof t.then=="function"}const OS="org.ethers.plugins.provider.Etherscan";class Fy extends Ra{constructor(e){super(OS),X(this,"baseUrl"),rt(this,{baseUrl:e})}clone(){return new Fy(this.baseUrl)}}const KH=["enableCcipRead"];let qH=1;var og;class V5 extends Dd{constructor(e,r){const n=r??null;super(),X(this,"network"),X(this,"apiKey"),ne(this,og);const s=Xr.from(e);V(this,og,s.getPlugin(OS)),rt(this,{apiKey:n,network:s}),this.getBaseUrl()}getBaseUrl(){if(T(this,og))return T(this,og).baseUrl;switch(this.network.name){case"mainnet":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"holesky":return"https://api-holesky.etherscan.io";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"base":return"https://api.basescan.org";case"base-sepolia":return"https://api-sepolia.basescan.org";case"bnb":return"https://api.bscscan.com";case"bnbt":return"https://api-testnet.bscscan.com";case"matic":return"https://api.polygonscan.com";case"matic-amoy":return"https://api-amoy.polygonscan.com";case"matic-mumbai":return"https://api-testnet.polygonscan.com";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}pe(!1,"unsupported network","network",this.network)}getUrl(e,r){const n=Object.keys(r).reduce((i,o)=>{const a=r[o];return a!=null&&(i+=`&${o}=${a}`),i},""),s=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.getBaseUrl()}/api?module=${e}${n}${s}`}getPostUrl(){return`${this.getBaseUrl()}/api`}getPostData(e,r){return r.module=e,r.apikey=this.apiKey,r}async detectNetwork(){return this.network}async fetch(e,r,n){const s=qH++,i=n?this.getPostUrl():this.getUrl(e,r),o=n?this.getPostData(e,r):null;this.emit("debug",{action:"sendRequest",id:s,url:i,payload:o});const a=new Un(i);a.setThrottleParams({slotInterval:1e3}),a.retryFunc=(u,d,h)=>(this.isCommunityResource()&&Na("Etherscan"),Promise.resolve(!0)),a.processFunc=async(u,d)=>{const h=d.hasBody()?JSON.parse(la(d.body)):{},p=(typeof h.result=="string"?h.result:"").toLowerCase().indexOf("rate limit")>=0;return e==="proxy"?h&&h.status==0&&h.message=="NOTOK"&&p&&(this.emit("debug",{action:"receiveError",id:s,reason:"proxy-NOTOK",error:h}),d.throwThrottleError(h.result,IS)):p&&(this.emit("debug",{action:"receiveError",id:s,reason:"null result",error:h.result}),d.throwThrottleError(h.result,IS)),d},o&&(a.setHeader("content-type","application/x-www-form-urlencoded; charset=UTF-8"),a.body=Object.keys(o).map(u=>`${u}=${o[u]}`).join("&"));const c=await a.send();try{c.assertOk()}catch(u){this.emit("debug",{action:"receiveError",id:s,error:u,reason:"assertOk"}),Be(!1,"response error","SERVER_ERROR",{request:a,response:c})}c.hasBody()||(this.emit("debug",{action:"receiveError",id:s,error:"missing body",reason:"null body"}),Be(!1,"missing response","SERVER_ERROR",{request:a,response:c}));const l=JSON.parse(la(c.body));return e==="proxy"?(l.jsonrpc!="2.0"&&(this.emit("debug",{action:"receiveError",id:s,result:l,reason:"invalid JSON-RPC"}),Be(!1,"invalid JSON-RPC response (missing jsonrpc='2.0')","SERVER_ERROR",{request:a,response:c,info:{result:l}})),l.error&&(this.emit("debug",{action:"receiveError",id:s,result:l,reason:"JSON-RPC error"}),Be(!1,"error response","SERVER_ERROR",{request:a,response:c,info:{result:l}})),this.emit("debug",{action:"receiveRequest",id:s,result:l}),l.result):l.status==0&&(l.message==="No records found"||l.message==="No transactions found")?(this.emit("debug",{action:"receiveRequest",id:s,result:l}),l.result):((l.status!=1||typeof l.message=="string"&&!l.message.match(/^OK/))&&(this.emit("debug",{action:"receiveError",id:s,result:l}),Be(!1,"error response","SERVER_ERROR",{request:a,response:c,info:{result:l}})),this.emit("debug",{action:"receiveRequest",id:s,result:l}),l.result)}_getTransactionPostData(e){const r={};for(let n in e){if(KH.indexOf(n)>=0||e[n]==null)continue;let s=e[n];if(!(n==="type"&&s===0)&&!(n==="blockTag"&&s==="latest")){if({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[n])s=ca(s);else if(n==="accessList")s="["+To(s).map(i=>`{address:"${i.address}",storageKeys:["${i.storageKeys.join('","')}"]}`).join(",")+"]";else if(n==="blobVersionedHashes"){if(s.length===0)continue;Be(!1,"Etherscan API does not support blobVersionedHashes","UNSUPPORTED_OPERATION",{operation:"_getTransactionPostData",info:{transaction:e}})}else s=Ze(s);r[n]=s}}return r}_checkError(e,r,n){let s="";if(Gr(r,"SERVER_ERROR")){try{s=r.info.result.error.message}catch{}if(!s)try{s=r.info.message}catch{}}if(e.method==="estimateGas"&&!s.match(/revert/i)&&s.match(/insufficient funds/i)&&Be(!1,"insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.transaction}),(e.method==="call"||e.method==="estimateGas")&&s.match(/execution reverted/i)){let i="";try{i=r.info.result.error.data}catch{}const o=Rd.getBuiltinCallException(e.method,e.transaction,i);throw o.info={request:e,error:r},o}if(s&&e.method==="broadcastTransaction"){const i=Td.from(e.signedTransaction);s.match(/replacement/i)&&s.match(/underpriced/i)&&Be(!1,"replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:i}),s.match(/insufficient funds/)&&Be(!1,"insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:i}),s.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&Be(!1,"nonce has already been used","NONCE_EXPIRED",{transaction:i})}throw r}async _detectNetwork(){return this.network}async _perform(e){switch(e.method){case"chainId":return this.network.chainId;case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getPriorityFee":if(this.network.name==="mainnet")return"1000000000";if(this.network.name==="optimism")return"1000000";throw new Error("fallback onto the AbstractProvider default");case"getBalance":return this.fetch("account",{action:"balance",address:e.address,tag:e.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:e.address,tag:e.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:e.address,tag:e.blockTag});case"getStorage":return this.fetch("proxy",{action:"eth_getStorageAt",address:e.address,position:e.position,tag:e.blockTag});case"broadcastTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:e.signedTransaction},!0).catch(r=>this._checkError(e,r,e.signedTransaction));case"getBlock":if("blockTag"in e)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:e.blockTag,boolean:e.includeTransactions?"true":"false"});Be(!1,"getBlock by blockHash not supported by Etherscan","UNSUPPORTED_OPERATION",{operation:"getBlock(blockHash)"});case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:e.hash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:e.hash});case"call":{if(e.blockTag!=="latest")throw new Error("EtherscanProvider does not support blockTag for call");const r=this._getTransactionPostData(e.transaction);r.module="proxy",r.action="eth_call";try{return await this.fetch("proxy",r,!0)}catch(n){return this._checkError(e,n,e.transaction)}}case"estimateGas":{const r=this._getTransactionPostData(e.transaction);r.module="proxy",r.action="eth_estimateGas";try{return await this.fetch("proxy",r,!0)}catch(n){return this._checkError(e,n,e.transaction)}}}return super._perform(e)}async getNetwork(){return this.network}async getEtherPrice(){return this.network.name!=="mainnet"?0:parseFloat((await this.fetch("stats",{action:"ethprice"})).ethusd)}async getContract(e){let r=this._getAddress(e);YH(r)&&(r=await r);try{const n=await this.fetch("contract",{action:"getabi",address:r}),s=JSON.parse(n);return new Dc(r,s,this)}catch{return null}}isCommunityResource(){return this.apiKey==null}}og=new WeakMap;function XH(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof globalThis<"u")return globalThis;throw new Error("unable to locate global object")}const eZ=XH().WebSocket;var Oa,Vy,_u,qd,Tu;class ag{constructor(e,r){ne(this,Oa),ne(this,Vy),ne(this,_u),ne(this,qd),ne(this,Tu),V(this,Oa,e),V(this,Vy,JSON.stringify(r)),V(this,_u,null),V(this,qd,null),V(this,Tu,null)}get filter(){return JSON.parse(T(this,Vy))}start(){V(this,_u,T(this,Oa).send("eth_subscribe",this.filter).then(e=>(T(this,Oa)._register(e,this),e)))}stop(){T(this,_u).then(e=>{T(this,Oa).destroyed||T(this,Oa).send("eth_unsubscribe",[e])}),V(this,_u,null)}pause(e){Be(e,"preserve logs while paused not supported by SocketSubscriber yet","UNSUPPORTED_OPERATION",{operation:"pause(false)"}),V(this,qd,!!e)}resume(){V(this,qd,null)}_handleMessage(e){if(T(this,_u)!=null&&T(this,qd)===null){let r=T(this,Tu);r==null?r=this._emit(T(this,Oa),e):r=r.then(async()=>{await this._emit(T(this,Oa),e)}),V(this,Tu,r.then(()=>{T(this,Tu)===r&&V(this,Tu,null)}))}}async _emit(e,r){throw new Error("sub-classes must implemente this; _emit")}}Oa=new WeakMap,Vy=new WeakMap,_u=new WeakMap,qd=new WeakMap,Tu=new WeakMap;class D5 extends ag{constructor(e){super(e,["newHeads"])}async _emit(e,r){e.emit("block",parseInt(r.number))}}class W5 extends ag{constructor(e){super(e,["newPendingTransactions"])}async _emit(e,r){e.emit("pending",r)}}var Dy;class j5 extends ag{constructor(e,r){super(e,["logs",r]),ne(this,Dy),V(this,Dy,JSON.stringify(r))}get logFilter(){return JSON.parse(T(this,Dy))}async _emit(e,r){e.emit(this.logFilter,e._wrapLog(r,e._network))}}Dy=new WeakMap;var Xd,cg,Cu;class G5 extends By{constructor(e,r){const n=Object.assign({},r??{});pe(n.batchMaxCount==null||n.batchMaxCount===1,"sockets-based providers do not support batches","options.batchMaxCount",r),n.batchMaxCount=1,n.staticNetwork==null&&(n.staticNetwork=!0),super(e,n),ne(this,Xd),ne(this,cg),ne(this,Cu),V(this,Xd,new Map),V(this,cg,new Map),V(this,Cu,new Map)}_getSubscriber(e){switch(e.type){case"close":return new Fd("close");case"block":return new D5(this);case"pending":return new W5(this);case"event":return new j5(this,e.filter);case"orphan":if(e.filter.orphan==="drop-log")return new Fd("drop-log")}return super._getSubscriber(e)}_register(e,r){T(this,cg).set(e,r);const n=T(this,Cu).get(e);if(n){for(const s of n)r._handleMessage(s);T(this,Cu).delete(e)}}async _send(e){pe(!Array.isArray(e),"WebSocket does not support batch send","payload",e);const r=new Promise((n,s)=>{T(this,Xd).set(e.id,{payload:e,resolve:n,reject:s})});return await this._waitUntilReady(),await this._write(JSON.stringify(e)),[await r]}async _processMessage(e){const r=JSON.parse(e);if(r&&typeof r=="object"&&"id"in r){const n=T(this,Xd).get(r.id);if(n==null){this.emit("error",yr("received result for unknown id","UNKNOWN_ERROR",{reasonCode:"UNKNOWN_ID",result:r}));return}T(this,Xd).delete(r.id),n.resolve(r)}else if(r&&r.method==="eth_subscription"){const n=r.params.subscription,s=T(this,cg).get(n);if(s)s._handleMessage(r.params.result);else{let i=T(this,Cu).get(n);i==null&&(i=[],T(this,Cu).set(n,i)),i.push(r.params.result)}}else{this.emit("error",yr("received unexpected message","UNKNOWN_ERROR",{reasonCode:"UNEXPECTED_MESSAGE",result:r}));return}}async _write(e){throw new Error("sub-classes must override this")}}Xd=new WeakMap,cg=new WeakMap,Cu=new WeakMap;var ef,Ro;class Wy extends G5{constructor(e,r,n){super(r,n),ne(this,ef),ne(this,Ro),typeof e=="string"?(V(this,ef,()=>new eZ(e)),V(this,Ro,T(this,ef).call(this))):typeof e=="function"?(V(this,ef,e),V(this,Ro,e())):(V(this,ef,null),V(this,Ro,e)),this.websocket.onopen=async()=>{try{await this._start(),this.resume()}catch(s){console.log("failed to start WebsocketProvider",s)}},this.websocket.onmessage=s=>{this._processMessage(s.data)}}get websocket(){if(T(this,Ro)==null)throw new Error("websocket closed");return T(this,Ro)}async _write(e){this.websocket.send(e)}async destroy(){T(this,Ro)!=null&&(T(this,Ro).close(),V(this,Ro,null)),super.destroy()}}ef=new WeakMap,Ro=new WeakMap;const lg="84842078b09946638c03157f83405213";function tZ(t){switch(t){case"mainnet":return"mainnet.infura.io";case"goerli":return"goerli.infura.io";case"sepolia":return"sepolia.infura.io";case"arbitrum":return"arbitrum-mainnet.infura.io";case"arbitrum-goerli":return"arbitrum-goerli.infura.io";case"arbitrum-sepolia":return"arbitrum-sepolia.infura.io";case"base":return"base-mainnet.infura.io";case"base-goerlia":return"base-goerli.infura.io";case"base-sepolia":return"base-sepolia.infura.io";case"bnb":return"bnbsmartchain-mainnet.infura.io";case"bnbt":return"bnbsmartchain-testnet.infura.io";case"linea":return"linea-mainnet.infura.io";case"linea-goerli":return"linea-goerli.infura.io";case"linea-sepolia":return"linea-sepolia.infura.io";case"matic":return"polygon-mainnet.infura.io";case"matic-amoy":return"polygon-amoy.infura.io";case"matic-mumbai":return"polygon-mumbai.infura.io";case"optimism":return"optimism-mainnet.infura.io";case"optimism-goerli":return"optimism-goerli.infura.io";case"optimism-sepolia":return"optimism-sepolia.infura.io"}pe(!1,"unsupported network","network",t)}class z5 extends Wy{constructor(e,r){const n=new Su(e,r),s=n._getConnection();Be(!s.credentials,"INFURA WebSocket project secrets unsupported","UNSUPPORTED_OPERATION",{operation:"InfuraProvider.getWebSocketProvider()"});const i=s.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(i,n._network),X(this,"projectId"),X(this,"projectSecret"),rt(this,{projectId:n.projectId,projectSecret:n.projectSecret})}isCommunityResource(){return this.projectId===lg}}class Su extends xs{constructor(e,r,n){e==null&&(e="mainnet");const s=Xr.from(e);r==null&&(r=lg),n==null&&(n=null);const i=Su.getRequest(s,r,n);super(i,s,{staticNetwork:s}),X(this,"projectId"),X(this,"projectSecret"),rt(this,{projectId:r,projectSecret:n})}_getProvider(e){try{return new Su(e,this.projectId,this.projectSecret)}catch{}return super._getProvider(e)}isCommunityResource(){return this.projectId===lg}static getWebSocketProvider(e,r){return new z5(e,r)}static getRequest(e,r,n){r==null&&(r=lg),n==null&&(n=null);const s=new Un(`https://${tZ(e.name)}/v3/${r}`);return s.allowGzip=!0,n&&s.setCredentials("",n),r===lg&&(s.retryFunc=async(i,o,a)=>(Na("InfuraProvider"),!0)),s}}const jy="919b412a057b5e9c9b6dce193c5a60242d6efadb";function rZ(t){switch(t){case"mainnet":return"ethers.quiknode.pro";case"goerli":return"ethers.ethereum-goerli.quiknode.pro";case"sepolia":return"ethers.ethereum-sepolia.quiknode.pro";case"holesky":return"ethers.ethereum-holesky.quiknode.pro";case"arbitrum":return"ethers.arbitrum-mainnet.quiknode.pro";case"arbitrum-goerli":return"ethers.arbitrum-goerli.quiknode.pro";case"arbitrum-sepolia":return"ethers.arbitrum-sepolia.quiknode.pro";case"base":return"ethers.base-mainnet.quiknode.pro";case"base-goerli":return"ethers.base-goerli.quiknode.pro";case"base-spolia":return"ethers.base-sepolia.quiknode.pro";case"bnb":return"ethers.bsc.quiknode.pro";case"bnbt":return"ethers.bsc-testnet.quiknode.pro";case"matic":return"ethers.matic.quiknode.pro";case"matic-mumbai":return"ethers.matic-testnet.quiknode.pro";case"optimism":return"ethers.optimism.quiknode.pro";case"optimism-goerli":return"ethers.optimism-goerli.quiknode.pro";case"optimism-sepolia":return"ethers.optimism-sepolia.quiknode.pro";case"xdai":return"ethers.xdai.quiknode.pro"}pe(!1,"unsupported network","network",t)}class tf extends xs{constructor(e,r){e==null&&(e="mainnet");const n=Xr.from(e);r==null&&(r=jy);const s=tf.getRequest(n,r);super(s,n,{staticNetwork:n}),X(this,"token"),rt(this,{token:r})}_getProvider(e){try{return new tf(e,this.token)}catch{}return super._getProvider(e)}isCommunityResource(){return this.token===jy}static getRequest(e,r){r==null&&(r=jy);const n=new Un(`https://${rZ(e.name)}/${r}`);return n.allowGzip=!0,r===jy&&(n.retryFunc=async(s,i,o)=>(Na("QuickNodeProvider"),!0)),n}}const nZ=BigInt("1"),sZ=BigInt("2");function iZ(t){for(let e=t.length-1;e>0;e--){const r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}}function oZ(t){return new Promise(e=>{setTimeout(e,t)})}function $5(){return new Date().getTime()}function H5(t){return JSON.stringify(t,(e,r)=>typeof r=="bigint"?{type:"bigint",value:r.toString()}:r)}const BS={stallTimeout:400,priority:1,weight:1},MS={blockNumber:-2,requests:0,lateResponses:0,errorResponses:0,outOfSync:-1,unsupportedEvents:0,rollingDuration:0,score:0,_network:null,_updateNumber:null,_totalTime:0,_lastFatalError:null,_lastFatalErrorTimestamp:0};async function aZ(t,e){for(;(t.blockNumber<0||t.blockNumber<e)&&(t._updateNumber||(t._updateNumber=(async()=>{try{const r=await t.provider.getBlockNumber();r>t.blockNumber&&(t.blockNumber=r)}catch(r){t.blockNumber=-2,t._lastFatalError=r,t._lastFatalErrorTimestamp=$5()}t._updateNumber=null})()),await t._updateNumber,t.outOfSync++,!t._lastFatalError););}function ug(t){if(t==null)return"null";if(Array.isArray(t))return"["+t.map(ug).join(",")+"]";if(typeof t=="object"&&typeof t.toJSON=="function")return ug(t.toJSON());switch(typeof t){case"boolean":case"symbol":return t.toString();case"bigint":case"number":return BigInt(t).toString();case"string":return JSON.stringify(t);case"object":{const e=Object.keys(t);return e.sort(),"{"+e.map(r=>`${JSON.stringify(r)}:${ug(t[r])}`).join(",")+"}"}}throw console.log("Could not serialize",t),new Error("Hmm...")}function Z5(t){if("error"in t){const r=t.error;return{tag:ug(r),value:r}}const e=t.result;return{tag:ug(e),value:e}}function Gy(t,e){const r=new Map;for(const{value:s,tag:i,weight:o}of e){const a=r.get(i)||{value:s,weight:0};a.weight+=o,r.set(i,a)}let n=null;for(const s of r.values())s.weight>=t&&(!n||s.weight>n.weight)&&(n=s);if(n)return n.value}function J5(t,e){let r=0;const n=new Map;let s=null;const i=[];for(const{value:a,tag:c,weight:l}of e)if(a instanceof Error){const u=n.get(c)||{value:a,weight:0};u.weight+=l,n.set(c,u),(s==null||u.weight>s.weight)&&(s=u)}else i.push(BigInt(a)),r+=l;if(r<t)return s&&s.weight>=t?s.value:void 0;i.sort((a,c)=>a<c?-1:c>a?1:0);const o=Math.floor(i.length/2);return i.length%2?i[o]:(i[o-1]+i[o]+nZ)/sZ}function Q5(t,e){const r=Gy(t,e);if(r!==void 0)return r;for(const n of e)if(n.value)return n.value}function cZ(t,e){if(t===1)return mt(J5(t,e),"%internal");const r=new Map,n=(o,a)=>{const c=r.get(o)||{result:o,weight:0};c.weight+=a,r.set(o,c)};for(const{weight:o,value:a}of e){const c=mt(a);n(c-1,o),n(c,o),n(c+1,o)}let s=0,i;for(const{weight:o,result:a}of r.values())o>=t&&(o>s||i!=null&&o===s&&a>i)&&(s=o,i=a);return i}var Is,Hc,hg,Ba,US,Y5,LS,FS,K5;class q5 extends Dd{constructor(e,r,n){super(r,n),ne(this,Ba),X(this,"quorum"),X(this,"eventQuorum"),X(this,"eventWorkers"),ne(this,Is),ne(this,Hc),ne(this,hg),V(this,Is,e.map(s=>s instanceof Dd?Object.assign({provider:s},BS,MS):Object.assign({},BS,s,MS))),V(this,Hc,-2),V(this,hg,null),n&&n.quorum!=null?this.quorum=n.quorum:this.quorum=Math.ceil(T(this,Is).reduce((s,i)=>(s+=i.weight,s),0)/2),this.eventQuorum=1,this.eventWorkers=1,pe(this.quorum<=T(this,Is).reduce((s,i)=>s+i.weight,0),"quorum exceed provider weight","quorum",this.quorum)}get providerConfigs(){return T(this,Is).map(e=>{const r=Object.assign({},e);for(const n in r)n[0]==="_"&&delete r[n];return r})}async _detectNetwork(){return Xr.from(ct(await this._perform({method:"chainId"})))}async _translatePerform(e,r){switch(r.method){case"broadcastTransaction":return await e.broadcastTransaction(r.signedTransaction);case"call":return await e.call(Object.assign({},r.transaction,{blockTag:r.blockTag}));case"chainId":return(await e.getNetwork()).chainId;case"estimateGas":return await e.estimateGas(r.transaction);case"getBalance":return await e.getBalance(r.address,r.blockTag);case"getBlock":{const n="blockHash"in r?r.blockHash:r.blockTag;return await e.getBlock(n,r.includeTransactions)}case"getBlockNumber":return await e.getBlockNumber();case"getCode":return await e.getCode(r.address,r.blockTag);case"getGasPrice":return(await e.getFeeData()).gasPrice;case"getPriorityFee":return(await e.getFeeData()).maxPriorityFeePerGas;case"getLogs":return await e.getLogs(r.filter);case"getStorage":return await e.getStorage(r.address,r.position,r.blockTag);case"getTransaction":return await e.getTransaction(r.hash);case"getTransactionCount":return await e.getTransactionCount(r.address,r.blockTag);case"getTransactionReceipt":return await e.getTransactionReceipt(r.hash);case"getTransactionResult":return await e.getTransactionResult(r.hash)}}async _perform(e){if(e.method==="broadcastTransaction"){const i=T(this,Is).map(c=>null),o=T(this,Is).map(async({provider:c,weight:l},u)=>{try{const d=await c._perform(e);i[u]=Object.assign(Z5({result:d}),{weight:l})}catch(d){i[u]=Object.assign(Z5({error:d}),{weight:l})}});for(;;){const c=i.filter(d=>d!=null);for(const{value:d}of c)if(!(d instanceof Error))return d;const l=Gy(this.quorum,i.filter(d=>d!=null));if(Gr(l,"INSUFFICIENT_FUNDS"))throw l;const u=o.filter((d,h)=>i[h]==null);if(u.length===0)break;await Promise.race(u)}const a=Q5(this.quorum,i);if(Be(a!==void 0,"problem multi-broadcasting","SERVER_ERROR",{request:"%sub-requests",info:{request:e,results:i.map(H5)}}),a instanceof Error)throw a;return a}await ve(this,Ba,LS).call(this);const r=new Set;let n=0;for(;;){const i=ve(this,Ba,Y5).call(this,r,e);if(i==null||(n+=i.config.weight,n>=this.quorum))break}const s=await ve(this,Ba,K5).call(this,r,e);for(const i of r)i.perform&&i.result==null&&i.config.lateResponses++;return s}async destroy(){for(const{provider:e}of T(this,Is))e.destroy();super.destroy()}}Is=new WeakMap,Hc=new WeakMap,hg=new WeakMap,Ba=new WeakSet,US=function(t){const e=Array.from(t).map(n=>n.config),r=T(this,Is).slice();iZ(r),r.sort((n,s)=>n.priority-s.priority);for(const n of r)if(!n._lastFatalError&&e.indexOf(n)===-1)return n;return null},Y5=function(t,e){const r=ve(this,Ba,US).call(this,t);if(r==null)return null;const n={config:r,result:null,didBump:!1,perform:null,staller:null},s=$5();return n.perform=(async()=>{try{r.requests++;const o=await this._translatePerform(r.provider,e);n.result={result:o}}catch(o){r.errorResponses++,n.result={error:o}}const i=$5()-s;r._totalTime+=i,r.rollingDuration=.95*r.rollingDuration+.05*i,n.perform=null})(),n.staller=(async()=>{await oZ(r.stallTimeout),n.staller=null})(),t.add(n),n},LS=async function(){let t=T(this,hg);if(!t){const e=[];T(this,Is).forEach(r=>{e.push((async()=>{await aZ(r,0),r._lastFatalError||(r._network=await r.provider.getNetwork())})())}),V(this,hg,t=(async()=>{await Promise.all(e);let r=null;for(const n of T(this,Is)){if(n._lastFatalError)continue;const s=n._network;r==null?r=s.chainId:s.chainId!==r&&Be(!1,"cannot mix providers on different networks","UNSUPPORTED_OPERATION",{operation:"new FallbackProvider"})}})())}await t},FS=async function(t,e){const r=[];for(const n of t)if(n.result!=null){const{tag:s,value:i}=Z5(n.result);r.push({tag:s,value:i,weight:n.config.weight})}if(!(r.reduce((n,s)=>n+s.weight,0)<this.quorum)){switch(e.method){case"getBlockNumber":{T(this,Hc)===-2&&V(this,Hc,Math.ceil(mt(J5(this.quorum,T(this,Is).filter(s=>!s._lastFatalError).map(s=>({value:s.blockNumber,tag:mt(s.blockNumber).toString(),weight:s.weight}))))));const n=cZ(this.quorum,r);return n===void 0?void 0:(n>T(this,Hc)&&V(this,Hc,n),T(this,Hc))}case"getGasPrice":case"getPriorityFee":case"estimateGas":return J5(this.quorum,r);case"getBlock":return"blockTag"in e&&e.blockTag==="pending"?Q5(this.quorum,r):Gy(this.quorum,r);case"call":case"chainId":case"getBalance":case"getTransactionCount":case"getCode":case"getStorage":case"getTransaction":case"getTransactionReceipt":case"getLogs":return Gy(this.quorum,r);case"broadcastTransaction":return Q5(this.quorum,r)}Be(!1,"unsupported method","UNSUPPORTED_OPERATION",{operation:`_perform(${H5(e.method)})`})}},K5=async function(t,e){if(t.size===0)throw new Error("no runners?!");const r=[];let n=0;for(const i of t){if(i.perform&&r.push(i.perform),i.staller){r.push(i.staller);continue}i.didBump||(i.didBump=!0,n++)}const s=await ve(this,Ba,FS).call(this,t,e);if(s!==void 0){if(s instanceof Error)throw s;return s}for(let i=0;i<n;i++)ve(this,Ba,Y5).call(this,t,e);return Be(r.length>0,"quorum not met","SERVER_ERROR",{request:"%sub-requests",info:{request:e,results:Array.from(t).map(i=>H5(i.result))}}),await Promise.race(r),await ve(this,Ba,K5).call(this,t,e)};function lZ(t){return t&&typeof t.send=="function"&&typeof t.close=="function"}const uZ="goerli kovan sepolia classicKotti optimism-goerli arbitrum-goerli matic-mumbai bnbt".split(" ");function VS(t,e){e==null&&(e={});const r=o=>e[o]==="-"?!1:typeof e.exclusive=="string"?o===e.exclusive:Array.isArray(e.exclusive)?e.exclusive.indexOf(o)!==-1:!0;if(typeof t=="string"&&t.match(/^https?:/))return new xs(t);if(typeof t=="string"&&t.match(/^wss?:/)||lZ(t))return new Wy(t);let n=null;try{n=Xr.from(t)}catch{}const s=[];if(r("publicPolygon")&&n&&(n.name==="matic"?s.push(new xs("https://polygon-rpc.com/",n,{staticNetwork:n})):n.name==="matic-amoy"&&s.push(new xs("https://rpc-amoy.polygon.technology/",n,{staticNetwork:n}))),r("alchemy"))try{s.push(new Yd(t,e.alchemy))}catch{}if(r("ankr")&&e.ankr!=null)try{s.push(new Qd(t,e.ankr))}catch{}if(r("chainstack"))try{s.push(new Kd(t,e.chainstack))}catch{}if(r("cloudflare"))try{s.push(new F5(t))}catch{}if(r("etherscan"))try{s.push(new V5(t,e.etherscan))}catch{}if(r("infura"))try{let o=e.infura,a;typeof o=="object"&&(a=o.projectSecret,o=o.projectId),s.push(new Su(t,o,a))}catch{}if(r("quicknode"))try{let o=e.quicknode;s.push(new tf(t,o))}catch{}if(Be(s.length,"unsupported default network","UNSUPPORTED_OPERATION",{operation:"getDefaultProvider"}),s.length===1)return s[0];let i=Math.floor(s.length/2);return i>2&&(i=2),n&&uZ.indexOf(n.name)!==-1&&(i=1),e&&e.quorum&&(i=e.quorum),new q5(s,void 0,{quorum:i})}var Ru,rf;const hZ=class ZV extends jd{constructor(e){super(e.provider),X(this,"signer"),ne(this,Ru),ne(this,rf),rt(this,{signer:e}),V(this,Ru,null),V(this,rf,0)}async getAddress(){return this.signer.getAddress()}connect(e){return new ZV(this.signer.connect(e))}async getNonce(e){if(e==="pending"){T(this,Ru)==null&&V(this,Ru,super.getNonce("pending"));const r=T(this,rf);return await T(this,Ru)+r}return super.getNonce(e)}increment(){yo(this,rf)._++}reset(){V(this,rf,0),V(this,Ru,null)}async sendTransaction(e){const r=this.getNonce("pending");return this.increment(),e=await this.signer.populateTransaction(e),e.nonce=await r,await this.signer.sendTransaction(e)}signTransaction(e){return this.signer.signTransaction(e)}signMessage(e){return this.signer.signMessage(e)}signTypedData(e,r,n){return this.signer.signTypedData(e,r,n)}};Ru=new WeakMap,rf=new WeakMap;let DS=hZ;var dg;class X5 extends xS{constructor(e,r,n){const s=Object.assign({},n??{},{batchMaxCount:1});pe(e&&e.request,"invalid EIP-1193 provider","ethereum",e),super(r,s),ne(this,dg),V(this,dg,async(i,o)=>{const a={method:i,params:o};this.emit("debug",{action:"sendEip1193Request",payload:a});try{const c=await e.request(a);return this.emit("debug",{action:"receiveEip1193Result",result:c}),c}catch(c){const l=new Error(c.message);throw l.code=c.code,l.data=c.data,l.payload=a,this.emit("debug",{action:"receiveEip1193Error",error:l}),l}})}async send(e,r){return await this._start(),await super.send(e,r)}async _send(e){pe(!Array.isArray(e),"EIP-1193 does not support batch request","payload",e);try{const r=await T(this,dg).call(this,e.method,e.params||[]);return[{id:e.id,result:r}]}catch(r){return[{id:e.id,error:{code:r.code,data:r.data,message:r.message}}]}}getRpcError(e,r){switch(r=JSON.parse(JSON.stringify(r)),r.error.code||-1){case 4001:r.error.message=`ethers-user-denied: ${r.error.message}`;break;case 4200:r.error.message=`ethers-unsupported: ${r.error.message}`;break}return super.getRpcError(e,r)}async hasSigner(e){e==null&&(e=0);const r=await this.send("eth_accounts",[]);return typeof e=="number"?r.length>e:(e=e.toLowerCase(),r.filter(n=>n.toLowerCase()===e).length!==0)}async getSigner(e){if(e==null&&(e=0),!await this.hasSigner(e))try{await T(this,dg).call(this,"eth_requestAccounts",[])}catch(r){const n=r.payload;throw this.getRpcError(n,{id:n.id,error:r})}return await super.getSigner(e)}}dg=new WeakMap;const zy="62e1ad51b37b8e00394bda3b";function dZ(t){switch(t){case"mainnet":return"eth-mainnet.gateway.pokt.network";case"goerli":return"eth-goerli.gateway.pokt.network";case"matic":return"poly-mainnet.gateway.pokt.network";case"matic-mumbai":return"polygon-mumbai-rpc.gateway.pokt.network"}pe(!1,"unsupported network","network",t)}class fg extends xs{constructor(e,r,n){e==null&&(e="mainnet");const s=Xr.from(e);r==null&&(r=zy),n==null&&(n=null);const i={staticNetwork:s},o=fg.getRequest(s,r,n);super(o,s,i),X(this,"applicationId"),X(this,"applicationSecret"),rt(this,{applicationId:r,applicationSecret:n})}_getProvider(e){try{return new fg(e,this.applicationId,this.applicationSecret)}catch{}return super._getProvider(e)}static getRequest(e,r,n){r==null&&(r=zy);const s=new Un(`https://${dZ(e.name)}/v1/lb/${r}`);return s.allowGzip=!0,n&&s.setCredentials("",n),r===zy&&(s.retryFunc=async(i,o,a)=>(Na("PocketProvider"),!0)),s}isCommunityResource(){return this.applicationId===zy}}const WS=void 0;var pg;const fZ=class JV extends jd{constructor(e,r){super(r),X(this,"address"),ne(this,pg),pe(e&&typeof e.sign=="function","invalid private key","privateKey","[ REDACTED ]"),V(this,pg,e);const n=nu(this.signingKey.publicKey);rt(this,{address:n})}get signingKey(){return T(this,pg)}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(e){return new JV(T(this,pg),e)}async signTransaction(e){e=lu(e);const{to:r,from:n}=await nn({to:e.to?an(e.to,this.provider):void 0,from:e.from?an(e.from,this.provider):void 0});r!=null&&(e.to=r),n!=null&&(e.from=n),e.from!=null&&(pe(Bt(e.from)===this.address,"transaction from address mismatch","tx.from",e.from),delete e.from);const s=Td.from(e);return s.signature=this.signingKey.sign(s.unsignedHash),s.serialized}async signMessage(e){return this.signMessageSync(e)}signMessageSync(e){return this.signingKey.sign(X2(e)).serialized}async signTypedData(e,r,n){const s=await ou.resolveNames(e,r,n,async i=>{Be(this.provider!=null,"cannot resolve ENS names without a provider","UNSUPPORTED_OPERATION",{operation:"resolveName",info:{name:i}});const o=await this.provider.resolveName(i);return Be(o!=null,"unconfigured ENS name","UNCONFIGURED_NAME",{value:i}),o});return this.signingKey.sign(ou.hash(s.domain,r,s.value)).serialized}};pg=new WeakMap;let $y=fZ;const Hy=" !#$%&'()*+,-./<=>?@[]^_`{|}~",pZ=/^[a-z]*$/i;function jS(t,e){let r=97;return t.reduce((n,s)=>(s===e?r++:s.match(pZ)?n.push(String.fromCharCode(r)+s):(r=97,n.push(s)),n),[])}function gZ(t,e){for(let s=Hy.length-1;s>=0;s--)t=t.split(Hy[s]).join(e.substring(2*s,2*s+2));const r=[],n=t.replace(/(:|([0-9])|([A-Z][a-z]*))/g,(s,i,o,a)=>{if(o)for(let c=parseInt(o);c>=0;c--)r.push(";");else r.push(i.toLowerCase());return""});if(n)throw new Error(`leftovers: ${JSON.stringify(n)}`);return jS(jS(r,";"),":")}function GS(t){return pe(t[0]==="0","unsupported auwl data","data",t),gZ(t.substring(1+2*Hy.length),t.substring(1,1+2*Hy.length))}class e6{constructor(e){X(this,"locale"),rt(this,{locale:e})}split(e){return e.toLowerCase().split(/\s+/g)}join(e){return e.join(" ")}}var gg,Zy,nf,Jy,t6;class Qy extends e6{constructor(e,r,n){super(e),ne(this,Jy),ne(this,gg),ne(this,Zy),ne(this,nf),V(this,gg,r),V(this,Zy,n),V(this,nf,null)}get _data(){return T(this,gg)}_decodeWords(){return GS(T(this,gg))}getWord(e){const r=ve(this,Jy,t6).call(this);return pe(e>=0&&e<r.length,`invalid word index: ${e}`,"index",e),r[e]}getWordIndex(e){return ve(this,Jy,t6).call(this).indexOf(e)}}gg=new WeakMap,Zy=new WeakMap,nf=new WeakMap,Jy=new WeakSet,t6=function(){if(T(this,nf)==null){const t=this._decodeWords();if(Ni(t.join(`
|
|
@@ -565,7 +565,7 @@ table.apg-attrs a:hover {
|
|
|
565
565
|
*
|
|
566
566
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
567
567
|
* @license MIT
|
|
568
|
-
*/(function(t){const e=Fv,r=lk,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=C,t.INSPECT_MAX_BYTES=50;const s=2147483647;t.kMaxLength=s;const{Uint8Array:i,ArrayBuffer:o,SharedArrayBuffer:a}=globalThis;u.TYPED_ARRAY_SUPPORT=c(),!u.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{const S=new i(1),k={foo:function(){return 42}};return Object.setPrototypeOf(k,i.prototype),Object.setPrototypeOf(S,k),S.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function l(S){if(S>s)throw new RangeError('The value "'+S+'" is invalid for option "size"');const k=new i(S);return Object.setPrototypeOf(k,u.prototype),k}function u(S,k,R){if(typeof S=="number"){if(typeof k=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g(S)}return d(S,k,R)}u.poolSize=8192;function d(S,k,R){if(typeof S=="string")return m(S,k);if(o.isView(S))return v(S);if(S==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S);if(se(S,o)||S&&se(S.buffer,o)||typeof a<"u"&&(se(S,a)||S&&se(S.buffer,a)))return A(S,k,R);if(typeof S=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Z=S.valueOf&&S.valueOf();if(Z!=null&&Z!==S)return u.from(Z,k,R);const ce=E(S);if(ce)return ce;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof S[Symbol.toPrimitive]=="function")return u.from(S[Symbol.toPrimitive]("string"),k,R);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S)}u.from=function(S,k,R){return d(S,k,R)},Object.setPrototypeOf(u.prototype,i.prototype),Object.setPrototypeOf(u,i);function h(S){if(typeof S!="number")throw new TypeError('"size" argument must be of type number');if(S<0)throw new RangeError('The value "'+S+'" is invalid for option "size"')}function p(S,k,R){return h(S),S<=0?l(S):k!==void 0?typeof R=="string"?l(S).fill(k,R):l(S).fill(k):l(S)}u.alloc=function(S,k,R){return p(S,k,R)};function g(S){return h(S),l(S<0?0:w(S)|0)}u.allocUnsafe=function(S){return g(S)},u.allocUnsafeSlow=function(S){return g(S)};function m(S,k){if((typeof k!="string"||k==="")&&(k="utf8"),!u.isEncoding(k))throw new TypeError("Unknown encoding: "+k);const R=B(S,k)|0;let Z=l(R);const ce=Z.write(S,k);return ce!==R&&(Z=Z.slice(0,ce)),Z}function y(S){const k=S.length<0?0:w(S.length)|0,R=l(k);for(let Z=0;Z<k;Z+=1)R[Z]=S[Z]&255;return R}function v(S){if(se(S,i)){const k=new i(S);return A(k.buffer,k.byteOffset,k.byteLength)}return y(S)}function A(S,k,R){if(k<0||S.byteLength<k)throw new RangeError('"offset" is outside of buffer bounds');if(S.byteLength<k+(R||0))throw new RangeError('"length" is outside of buffer bounds');let Z;return k===void 0&&R===void 0?Z=new i(S):R===void 0?Z=new i(S,k):Z=new i(S,k,R),Object.setPrototypeOf(Z,u.prototype),Z}function E(S){if(u.isBuffer(S)){const k=w(S.length)|0,R=l(k);return R.length===0||S.copy(R,0,0,k),R}if(S.length!==void 0)return typeof S.length!="number"||ae(S.length)?l(0):y(S);if(S.type==="Buffer"&&Array.isArray(S.data))return y(S.data)}function w(S){if(S>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return S|0}function C(S){return+S!=S&&(S=0),u.alloc(+S)}u.isBuffer=function(k){return k!=null&&k._isBuffer===!0&&k!==u.prototype},u.compare=function(k,R){if(se(k,i)&&(k=u.from(k,k.offset,k.byteLength)),se(R,i)&&(R=u.from(R,R.offset,R.byteLength)),!u.isBuffer(k)||!u.isBuffer(R))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(k===R)return 0;let Z=k.length,ce=R.length;for(let he=0,ke=Math.min(Z,ce);he<ke;++he)if(k[he]!==R[he]){Z=k[he],ce=R[he];break}return Z<ce?-1:ce<Z?1:0},u.isEncoding=function(k){switch(String(k).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(k,R){if(!Array.isArray(k))throw new TypeError('"list" argument must be an Array of Buffers');if(k.length===0)return u.alloc(0);let Z;if(R===void 0)for(R=0,Z=0;Z<k.length;++Z)R+=k[Z].length;const ce=u.allocUnsafe(R);let he=0;for(Z=0;Z<k.length;++Z){let ke=k[Z];if(se(ke,i))he+ke.length>ce.length?(u.isBuffer(ke)||(ke=u.from(ke)),ke.copy(ce,he)):i.prototype.set.call(ce,ke,he);else if(u.isBuffer(ke))ke.copy(ce,he);else throw new TypeError('"list" argument must be an Array of Buffers');he+=ke.length}return ce};function B(S,k){if(u.isBuffer(S))return S.length;if(o.isView(S)||se(S,o))return S.byteLength;if(typeof S!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof S);const R=S.length,Z=arguments.length>2&&arguments[2]===!0;if(!Z&&R===0)return 0;let ce=!1;for(;;)switch(k){case"ascii":case"latin1":case"binary":return R;case"utf8":case"utf-8":return Se(S).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R*2;case"hex":return R>>>1;case"base64":return Pe(S).length;default:if(ce)return Z?-1:Se(S).length;k=(""+k).toLowerCase(),ce=!0}}u.byteLength=B;function L(S,k,R){let Z=!1;if((k===void 0||k<0)&&(k=0),k>this.length||((R===void 0||R>this.length)&&(R=this.length),R<=0)||(R>>>=0,k>>>=0,R<=k))return"";for(S||(S="utf8");;)switch(S){case"hex":return te(this,k,R);case"utf8":case"utf-8":return G(this,k,R);case"ascii":return Y(this,k,R);case"latin1":case"binary":return K(this,k,R);case"base64":return j(this,k,R);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oe(this,k,R);default:if(Z)throw new TypeError("Unknown encoding: "+S);S=(S+"").toLowerCase(),Z=!0}}u.prototype._isBuffer=!0;function I(S,k,R){const Z=S[k];S[k]=S[R],S[R]=Z}u.prototype.swap16=function(){const k=this.length;if(k%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let R=0;R<k;R+=2)I(this,R,R+1);return this},u.prototype.swap32=function(){const k=this.length;if(k%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let R=0;R<k;R+=4)I(this,R,R+3),I(this,R+1,R+2);return this},u.prototype.swap64=function(){const k=this.length;if(k%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let R=0;R<k;R+=8)I(this,R,R+7),I(this,R+1,R+6),I(this,R+2,R+5),I(this,R+3,R+4);return this},u.prototype.toString=function(){const k=this.length;return k===0?"":arguments.length===0?G(this,0,k):L.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(k){if(!u.isBuffer(k))throw new TypeError("Argument must be a Buffer");return this===k?!0:u.compare(this,k)===0},u.prototype.inspect=function(){let k="";const R=t.INSPECT_MAX_BYTES;return k=this.toString("hex",0,R).replace(/(.{2})/g,"$1 ").trim(),this.length>R&&(k+=" ... "),"<Buffer "+k+">"},n&&(u.prototype[n]=u.prototype.inspect),u.prototype.compare=function(k,R,Z,ce,he){if(se(k,i)&&(k=u.from(k,k.offset,k.byteLength)),!u.isBuffer(k))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof k);if(R===void 0&&(R=0),Z===void 0&&(Z=k?k.length:0),ce===void 0&&(ce=0),he===void 0&&(he=this.length),R<0||Z>k.length||ce<0||he>this.length)throw new RangeError("out of range index");if(ce>=he&&R>=Z)return 0;if(ce>=he)return-1;if(R>=Z)return 1;if(R>>>=0,Z>>>=0,ce>>>=0,he>>>=0,this===k)return 0;let ke=he-ce,Ne=Z-R;const ze=Math.min(ke,Ne),Ft=this.slice(ce,he),Ct=k.slice(R,Z);for(let vt=0;vt<ze;++vt)if(Ft[vt]!==Ct[vt]){ke=Ft[vt],Ne=Ct[vt];break}return ke<Ne?-1:Ne<ke?1:0};function M(S,k,R,Z,ce){if(S.length===0)return-1;if(typeof R=="string"?(Z=R,R=0):R>2147483647?R=2147483647:R<-2147483648&&(R=-2147483648),R=+R,ae(R)&&(R=ce?0:S.length-1),R<0&&(R=S.length+R),R>=S.length){if(ce)return-1;R=S.length-1}else if(R<0)if(ce)R=0;else return-1;if(typeof k=="string"&&(k=u.from(k,Z)),u.isBuffer(k))return k.length===0?-1:W(S,k,R,Z,ce);if(typeof k=="number")return k=k&255,typeof i.prototype.indexOf=="function"?ce?i.prototype.indexOf.call(S,k,R):i.prototype.lastIndexOf.call(S,k,R):W(S,[k],R,Z,ce);throw new TypeError("val must be string, number or Buffer")}function W(S,k,R,Z,ce){let he=1,ke=S.length,Ne=k.length;if(Z!==void 0&&(Z=String(Z).toLowerCase(),Z==="ucs2"||Z==="ucs-2"||Z==="utf16le"||Z==="utf-16le")){if(S.length<2||k.length<2)return-1;he=2,ke/=2,Ne/=2,R/=2}function ze(Ct,vt){return he===1?Ct[vt]:Ct.readUInt16BE(vt*he)}let Ft;if(ce){let Ct=-1;for(Ft=R;Ft<ke;Ft++)if(ze(S,Ft)===ze(k,Ct===-1?0:Ft-Ct)){if(Ct===-1&&(Ct=Ft),Ft-Ct+1===Ne)return Ct*he}else Ct!==-1&&(Ft-=Ft-Ct),Ct=-1}else for(R+Ne>ke&&(R=ke-Ne),Ft=R;Ft>=0;Ft--){let Ct=!0;for(let vt=0;vt<Ne;vt++)if(ze(S,Ft+vt)!==ze(k,vt)){Ct=!1;break}if(Ct)return Ft}return-1}u.prototype.includes=function(k,R,Z){return this.indexOf(k,R,Z)!==-1},u.prototype.indexOf=function(k,R,Z){return M(this,k,R,Z,!0)},u.prototype.lastIndexOf=function(k,R,Z){return M(this,k,R,Z,!1)};function U(S,k,R,Z){R=Number(R)||0;const ce=S.length-R;Z?(Z=Number(Z),Z>ce&&(Z=ce)):Z=ce;const he=k.length;Z>he/2&&(Z=he/2);let ke;for(ke=0;ke<Z;++ke){const Ne=parseInt(k.substr(ke*2,2),16);if(ae(Ne))return ke;S[R+ke]=Ne}return ke}function x(S,k,R,Z){return Ve(Se(k,S.length-R),S,R,Z)}function P(S,k,R,Z){return Ve(J(k),S,R,Z)}function F(S,k,R,Z){return Ve(Pe(k),S,R,Z)}function O(S,k,R,Z){return Ve(ge(k,S.length-R),S,R,Z)}u.prototype.write=function(k,R,Z,ce){if(R===void 0)ce="utf8",Z=this.length,R=0;else if(Z===void 0&&typeof R=="string")ce=R,Z=this.length,R=0;else if(isFinite(R))R=R>>>0,isFinite(Z)?(Z=Z>>>0,ce===void 0&&(ce="utf8")):(ce=Z,Z=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const he=this.length-R;if((Z===void 0||Z>he)&&(Z=he),k.length>0&&(Z<0||R<0)||R>this.length)throw new RangeError("Attempt to write outside buffer bounds");ce||(ce="utf8");let ke=!1;for(;;)switch(ce){case"hex":return U(this,k,R,Z);case"utf8":case"utf-8":return x(this,k,R,Z);case"ascii":case"latin1":case"binary":return P(this,k,R,Z);case"base64":return F(this,k,R,Z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,k,R,Z);default:if(ke)throw new TypeError("Unknown encoding: "+ce);ce=(""+ce).toLowerCase(),ke=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function j(S,k,R){return k===0&&R===S.length?e.fromByteArray(S):e.fromByteArray(S.slice(k,R))}function G(S,k,R){R=Math.min(S.length,R);const Z=[];let ce=k;for(;ce<R;){const he=S[ce];let ke=null,Ne=he>239?4:he>223?3:he>191?2:1;if(ce+Ne<=R){let ze,Ft,Ct,vt;switch(Ne){case 1:he<128&&(ke=he);break;case 2:ze=S[ce+1],(ze&192)===128&&(vt=(he&31)<<6|ze&63,vt>127&&(ke=vt));break;case 3:ze=S[ce+1],Ft=S[ce+2],(ze&192)===128&&(Ft&192)===128&&(vt=(he&15)<<12|(ze&63)<<6|Ft&63,vt>2047&&(vt<55296||vt>57343)&&(ke=vt));break;case 4:ze=S[ce+1],Ft=S[ce+2],Ct=S[ce+3],(ze&192)===128&&(Ft&192)===128&&(Ct&192)===128&&(vt=(he&15)<<18|(ze&63)<<12|(Ft&63)<<6|Ct&63,vt>65535&&vt<1114112&&(ke=vt))}}ke===null?(ke=65533,Ne=1):ke>65535&&(ke-=65536,Z.push(ke>>>10&1023|55296),ke=56320|ke&1023),Z.push(ke),ce+=Ne}return H(Z)}const q=4096;function H(S){const k=S.length;if(k<=q)return String.fromCharCode.apply(String,S);let R="",Z=0;for(;Z<k;)R+=String.fromCharCode.apply(String,S.slice(Z,Z+=q));return R}function Y(S,k,R){let Z="";R=Math.min(S.length,R);for(let ce=k;ce<R;++ce)Z+=String.fromCharCode(S[ce]&127);return Z}function K(S,k,R){let Z="";R=Math.min(S.length,R);for(let ce=k;ce<R;++ce)Z+=String.fromCharCode(S[ce]);return Z}function te(S,k,R){const Z=S.length;(!k||k<0)&&(k=0),(!R||R<0||R>Z)&&(R=Z);let ce="";for(let he=k;he<R;++he)ce+=f[S[he]];return ce}function oe(S,k,R){const Z=S.slice(k,R);let ce="";for(let he=0;he<Z.length-1;he+=2)ce+=String.fromCharCode(Z[he]+Z[he+1]*256);return ce}u.prototype.slice=function(k,R){const Z=this.length;k=~~k,R=R===void 0?Z:~~R,k<0?(k+=Z,k<0&&(k=0)):k>Z&&(k=Z),R<0?(R+=Z,R<0&&(R=0)):R>Z&&(R=Z),R<k&&(R=k);const ce=this.subarray(k,R);return Object.setPrototypeOf(ce,u.prototype),ce};function ye(S,k,R){if(S%1!==0||S<0)throw new RangeError("offset is not uint");if(S+k>R)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(k,R,Z){k=k>>>0,R=R>>>0,Z||ye(k,R,this.length);let ce=this[k],he=1,ke=0;for(;++ke<R&&(he*=256);)ce+=this[k+ke]*he;return ce},u.prototype.readUintBE=u.prototype.readUIntBE=function(k,R,Z){k=k>>>0,R=R>>>0,Z||ye(k,R,this.length);let ce=this[k+--R],he=1;for(;R>0&&(he*=256);)ce+=this[k+--R]*he;return ce},u.prototype.readUint8=u.prototype.readUInt8=function(k,R){return k=k>>>0,R||ye(k,1,this.length),this[k]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(k,R){return k=k>>>0,R||ye(k,2,this.length),this[k]|this[k+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(k,R){return k=k>>>0,R||ye(k,2,this.length),this[k]<<8|this[k+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(k,R){return k=k>>>0,R||ye(k,4,this.length),(this[k]|this[k+1]<<8|this[k+2]<<16)+this[k+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(k,R){return k=k>>>0,R||ye(k,4,this.length),this[k]*16777216+(this[k+1]<<16|this[k+2]<<8|this[k+3])},u.prototype.readBigUInt64LE=b(function(k){k=k>>>0,z(k,"offset");const R=this[k],Z=this[k+7];(R===void 0||Z===void 0)&&ee(k,this.length-8);const ce=R+this[++k]*2**8+this[++k]*2**16+this[++k]*2**24,he=this[++k]+this[++k]*2**8+this[++k]*2**16+Z*2**24;return BigInt(ce)+(BigInt(he)<<BigInt(32))}),u.prototype.readBigUInt64BE=b(function(k){k=k>>>0,z(k,"offset");const R=this[k],Z=this[k+7];(R===void 0||Z===void 0)&&ee(k,this.length-8);const ce=R*2**24+this[++k]*2**16+this[++k]*2**8+this[++k],he=this[++k]*2**24+this[++k]*2**16+this[++k]*2**8+Z;return(BigInt(ce)<<BigInt(32))+BigInt(he)}),u.prototype.readIntLE=function(k,R,Z){k=k>>>0,R=R>>>0,Z||ye(k,R,this.length);let ce=this[k],he=1,ke=0;for(;++ke<R&&(he*=256);)ce+=this[k+ke]*he;return he*=128,ce>=he&&(ce-=Math.pow(2,8*R)),ce},u.prototype.readIntBE=function(k,R,Z){k=k>>>0,R=R>>>0,Z||ye(k,R,this.length);let ce=R,he=1,ke=this[k+--ce];for(;ce>0&&(he*=256);)ke+=this[k+--ce]*he;return he*=128,ke>=he&&(ke-=Math.pow(2,8*R)),ke},u.prototype.readInt8=function(k,R){return k=k>>>0,R||ye(k,1,this.length),this[k]&128?(255-this[k]+1)*-1:this[k]},u.prototype.readInt16LE=function(k,R){k=k>>>0,R||ye(k,2,this.length);const Z=this[k]|this[k+1]<<8;return Z&32768?Z|4294901760:Z},u.prototype.readInt16BE=function(k,R){k=k>>>0,R||ye(k,2,this.length);const Z=this[k+1]|this[k]<<8;return Z&32768?Z|4294901760:Z},u.prototype.readInt32LE=function(k,R){return k=k>>>0,R||ye(k,4,this.length),this[k]|this[k+1]<<8|this[k+2]<<16|this[k+3]<<24},u.prototype.readInt32BE=function(k,R){return k=k>>>0,R||ye(k,4,this.length),this[k]<<24|this[k+1]<<16|this[k+2]<<8|this[k+3]},u.prototype.readBigInt64LE=b(function(k){k=k>>>0,z(k,"offset");const R=this[k],Z=this[k+7];(R===void 0||Z===void 0)&&ee(k,this.length-8);const ce=this[k+4]+this[k+5]*2**8+this[k+6]*2**16+(Z<<24);return(BigInt(ce)<<BigInt(32))+BigInt(R+this[++k]*2**8+this[++k]*2**16+this[++k]*2**24)}),u.prototype.readBigInt64BE=b(function(k){k=k>>>0,z(k,"offset");const R=this[k],Z=this[k+7];(R===void 0||Z===void 0)&&ee(k,this.length-8);const ce=(R<<24)+this[++k]*2**16+this[++k]*2**8+this[++k];return(BigInt(ce)<<BigInt(32))+BigInt(this[++k]*2**24+this[++k]*2**16+this[++k]*2**8+Z)}),u.prototype.readFloatLE=function(k,R){return k=k>>>0,R||ye(k,4,this.length),r.read(this,k,!0,23,4)},u.prototype.readFloatBE=function(k,R){return k=k>>>0,R||ye(k,4,this.length),r.read(this,k,!1,23,4)},u.prototype.readDoubleLE=function(k,R){return k=k>>>0,R||ye(k,8,this.length),r.read(this,k,!0,52,8)},u.prototype.readDoubleBE=function(k,R){return k=k>>>0,R||ye(k,8,this.length),r.read(this,k,!1,52,8)};function _e(S,k,R,Z,ce,he){if(!u.isBuffer(S))throw new TypeError('"buffer" argument must be a Buffer instance');if(k>ce||k<he)throw new RangeError('"value" argument is out of bounds');if(R+Z>S.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(k,R,Z,ce){if(k=+k,R=R>>>0,Z=Z>>>0,!ce){const Ne=Math.pow(2,8*Z)-1;_e(this,k,R,Z,Ne,0)}let he=1,ke=0;for(this[R]=k&255;++ke<Z&&(he*=256);)this[R+ke]=k/he&255;return R+Z},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(k,R,Z,ce){if(k=+k,R=R>>>0,Z=Z>>>0,!ce){const Ne=Math.pow(2,8*Z)-1;_e(this,k,R,Z,Ne,0)}let he=Z-1,ke=1;for(this[R+he]=k&255;--he>=0&&(ke*=256);)this[R+he]=k/ke&255;return R+Z},u.prototype.writeUint8=u.prototype.writeUInt8=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,1,255,0),this[R]=k&255,R+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,2,65535,0),this[R]=k&255,this[R+1]=k>>>8,R+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,2,65535,0),this[R]=k>>>8,this[R+1]=k&255,R+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,4,4294967295,0),this[R+3]=k>>>24,this[R+2]=k>>>16,this[R+1]=k>>>8,this[R]=k&255,R+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,4,4294967295,0),this[R]=k>>>24,this[R+1]=k>>>16,this[R+2]=k>>>8,this[R+3]=k&255,R+4};function Ce(S,k,R,Z,ce){N(k,Z,ce,S,R,7);let he=Number(k&BigInt(4294967295));S[R++]=he,he=he>>8,S[R++]=he,he=he>>8,S[R++]=he,he=he>>8,S[R++]=he;let ke=Number(k>>BigInt(32)&BigInt(4294967295));return S[R++]=ke,ke=ke>>8,S[R++]=ke,ke=ke>>8,S[R++]=ke,ke=ke>>8,S[R++]=ke,R}function ie(S,k,R,Z,ce){N(k,Z,ce,S,R,7);let he=Number(k&BigInt(4294967295));S[R+7]=he,he=he>>8,S[R+6]=he,he=he>>8,S[R+5]=he,he=he>>8,S[R+4]=he;let ke=Number(k>>BigInt(32)&BigInt(4294967295));return S[R+3]=ke,ke=ke>>8,S[R+2]=ke,ke=ke>>8,S[R+1]=ke,ke=ke>>8,S[R]=ke,R+8}u.prototype.writeBigUInt64LE=b(function(k,R=0){return Ce(this,k,R,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=b(function(k,R=0){return ie(this,k,R,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(k,R,Z,ce){if(k=+k,R=R>>>0,!ce){const ze=Math.pow(2,8*Z-1);_e(this,k,R,Z,ze-1,-ze)}let he=0,ke=1,Ne=0;for(this[R]=k&255;++he<Z&&(ke*=256);)k<0&&Ne===0&&this[R+he-1]!==0&&(Ne=1),this[R+he]=(k/ke>>0)-Ne&255;return R+Z},u.prototype.writeIntBE=function(k,R,Z,ce){if(k=+k,R=R>>>0,!ce){const ze=Math.pow(2,8*Z-1);_e(this,k,R,Z,ze-1,-ze)}let he=Z-1,ke=1,Ne=0;for(this[R+he]=k&255;--he>=0&&(ke*=256);)k<0&&Ne===0&&this[R+he+1]!==0&&(Ne=1),this[R+he]=(k/ke>>0)-Ne&255;return R+Z},u.prototype.writeInt8=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,1,127,-128),k<0&&(k=255+k+1),this[R]=k&255,R+1},u.prototype.writeInt16LE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,2,32767,-32768),this[R]=k&255,this[R+1]=k>>>8,R+2},u.prototype.writeInt16BE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,2,32767,-32768),this[R]=k>>>8,this[R+1]=k&255,R+2},u.prototype.writeInt32LE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,4,2147483647,-2147483648),this[R]=k&255,this[R+1]=k>>>8,this[R+2]=k>>>16,this[R+3]=k>>>24,R+4},u.prototype.writeInt32BE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,4,2147483647,-2147483648),k<0&&(k=4294967295+k+1),this[R]=k>>>24,this[R+1]=k>>>16,this[R+2]=k>>>8,this[R+3]=k&255,R+4},u.prototype.writeBigInt64LE=b(function(k,R=0){return Ce(this,k,R,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=b(function(k,R=0){return ie(this,k,R,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function le(S,k,R,Z,ce,he){if(R+Z>S.length)throw new RangeError("Index out of range");if(R<0)throw new RangeError("Index out of range")}function we(S,k,R,Z,ce){return k=+k,R=R>>>0,ce||le(S,k,R,4),r.write(S,k,R,Z,23,4),R+4}u.prototype.writeFloatLE=function(k,R,Z){return we(this,k,R,!0,Z)},u.prototype.writeFloatBE=function(k,R,Z){return we(this,k,R,!1,Z)};function D(S,k,R,Z,ce){return k=+k,R=R>>>0,ce||le(S,k,R,8),r.write(S,k,R,Z,52,8),R+8}u.prototype.writeDoubleLE=function(k,R,Z){return D(this,k,R,!0,Z)},u.prototype.writeDoubleBE=function(k,R,Z){return D(this,k,R,!1,Z)},u.prototype.copy=function(k,R,Z,ce){if(!u.isBuffer(k))throw new TypeError("argument should be a Buffer");if(Z||(Z=0),!ce&&ce!==0&&(ce=this.length),R>=k.length&&(R=k.length),R||(R=0),ce>0&&ce<Z&&(ce=Z),ce===Z||k.length===0||this.length===0)return 0;if(R<0)throw new RangeError("targetStart out of bounds");if(Z<0||Z>=this.length)throw new RangeError("Index out of range");if(ce<0)throw new RangeError("sourceEnd out of bounds");ce>this.length&&(ce=this.length),k.length-R<ce-Z&&(ce=k.length-R+Z);const he=ce-Z;return this===k&&typeof i.prototype.copyWithin=="function"?this.copyWithin(R,Z,ce):i.prototype.set.call(k,this.subarray(Z,ce),R),he},u.prototype.fill=function(k,R,Z,ce){if(typeof k=="string"){if(typeof R=="string"?(ce=R,R=0,Z=this.length):typeof Z=="string"&&(ce=Z,Z=this.length),ce!==void 0&&typeof ce!="string")throw new TypeError("encoding must be a string");if(typeof ce=="string"&&!u.isEncoding(ce))throw new TypeError("Unknown encoding: "+ce);if(k.length===1){const ke=k.charCodeAt(0);(ce==="utf8"&&ke<128||ce==="latin1")&&(k=ke)}}else typeof k=="number"?k=k&255:typeof k=="boolean"&&(k=Number(k));if(R<0||this.length<R||this.length<Z)throw new RangeError("Out of range index");if(Z<=R)return this;R=R>>>0,Z=Z===void 0?this.length:Z>>>0,k||(k=0);let he;if(typeof k=="number")for(he=R;he<Z;++he)this[he]=k;else{const ke=u.isBuffer(k)?k:u.from(k,ce),Ne=ke.length;if(Ne===0)throw new TypeError('The value "'+k+'" is invalid for argument "value"');for(he=0;he<Z-R;++he)this[he+R]=ke[he%Ne]}return this};const ue={};function me(S,k,R){ue[S]=class extends R{constructor(){super(),Object.defineProperty(this,"message",{value:k.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${S}]`,this.stack,delete this.name}get code(){return S}set code(ce){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:ce,writable:!0})}toString(){return`${this.name} [${S}]: ${this.message}`}}}me("ERR_BUFFER_OUT_OF_BOUNDS",function(S){return S?`${S} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),me("ERR_INVALID_ARG_TYPE",function(S,k){return`The "${S}" argument must be of type number. Received type ${typeof k}`},TypeError),me("ERR_OUT_OF_RANGE",function(S,k,R){let Z=`The value of "${S}" is out of range.`,ce=R;return Number.isInteger(R)&&Math.abs(R)>2**32?ce=be(String(R)):typeof R=="bigint"&&(ce=String(R),(R>BigInt(2)**BigInt(32)||R<-(BigInt(2)**BigInt(32)))&&(ce=be(ce)),ce+="n"),Z+=` It must be ${k}. Received ${ce}`,Z},RangeError);function be(S){let k="",R=S.length;const Z=S[0]==="-"?1:0;for(;R>=Z+4;R-=3)k=`_${S.slice(R-3,R)}${k}`;return`${S.slice(0,R)}${k}`}function re(S,k,R){z(k,"offset"),(S[k]===void 0||S[k+R]===void 0)&&ee(k,S.length-(R+1))}function N(S,k,R,Z,ce,he){if(S>R||S<k){const ke=typeof k=="bigint"?"n":"";let Ne;throw k===0||k===BigInt(0)?Ne=`>= 0${ke} and < 2${ke} ** ${(he+1)*8}${ke}`:Ne=`>= -(2${ke} ** ${(he+1)*8-1}${ke}) and < 2 ** ${(he+1)*8-1}${ke}`,new ue.ERR_OUT_OF_RANGE("value",Ne,S)}re(Z,ce,he)}function z(S,k){if(typeof S!="number")throw new ue.ERR_INVALID_ARG_TYPE(k,"number",S)}function ee(S,k,R){throw Math.floor(S)!==S?(z(S,R),new ue.ERR_OUT_OF_RANGE("offset","an integer",S)):k<0?new ue.ERR_BUFFER_OUT_OF_BOUNDS:new ue.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${k}`,S)}const fe=/[^+/0-9A-Za-z-_]/g;function Ae(S){if(S=S.split("=")[0],S=S.trim().replace(fe,""),S.length<2)return"";for(;S.length%4!==0;)S=S+"=";return S}function Se(S,k){k=k||1/0;let R;const Z=S.length;let ce=null;const he=[];for(let ke=0;ke<Z;++ke){if(R=S.charCodeAt(ke),R>55295&&R<57344){if(!ce){if(R>56319){(k-=3)>-1&&he.push(239,191,189);continue}else if(ke+1===Z){(k-=3)>-1&&he.push(239,191,189);continue}ce=R;continue}if(R<56320){(k-=3)>-1&&he.push(239,191,189),ce=R;continue}R=(ce-55296<<10|R-56320)+65536}else ce&&(k-=3)>-1&&he.push(239,191,189);if(ce=null,R<128){if((k-=1)<0)break;he.push(R)}else if(R<2048){if((k-=2)<0)break;he.push(R>>6|192,R&63|128)}else if(R<65536){if((k-=3)<0)break;he.push(R>>12|224,R>>6&63|128,R&63|128)}else if(R<1114112){if((k-=4)<0)break;he.push(R>>18|240,R>>12&63|128,R>>6&63|128,R&63|128)}else throw new Error("Invalid code point")}return he}function J(S){const k=[];for(let R=0;R<S.length;++R)k.push(S.charCodeAt(R)&255);return k}function ge(S,k){let R,Z,ce;const he=[];for(let ke=0;ke<S.length&&!((k-=2)<0);++ke)R=S.charCodeAt(ke),Z=R>>8,ce=R%256,he.push(ce),he.push(Z);return he}function Pe(S){return e.toByteArray(Ae(S))}function Ve(S,k,R,Z){let ce;for(ce=0;ce<Z&&!(ce+R>=k.length||ce>=S.length);++ce)k[ce+R]=S[ce];return ce}function se(S,k){return S instanceof k||S!=null&&S.constructor!=null&&S.constructor.name!=null&&S.constructor.name===k.name}function ae(S){return S!==S}const f=function(){const S="0123456789abcdef",k=new Array(256);for(let R=0;R<16;++R){const Z=R*16;for(let ce=0;ce<16;++ce)k[Z+ce]=S[R]+S[ce]}return k}();function b(S){return typeof BigInt>"u"?_:S}function _(){throw new Error("BigInt not supported")}})(RI);const el=RI.Buffer;var Vv={GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_cce2442b-6b4a-47b4-b3ed-75c7ef73e46c",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"pnpm/10.24.0 npm/? node/v24.11.1 linux x64",CI:"true",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_cce2442b-6b4a-47b4-b3ed-75c7ef73e46c",PIPX_HOME:"/opt/pipx",RUNNER_ENVIRONMENT:"github-hosted",npm_node_execpath:"/opt/hostedtoolcache/node/24.11.1/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",NODE_AUTH_TOKEN:"XXXXX-XXXXX-XXXXX-XXXXX",SHLVL:"1",HOME:"/home/runner",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",RUNNER_TEMP:"/home/runner/work/_temp",npm_package_json:"/home/runner/work/passport/passport/packages/passport-evm/package.json",GITHUB_REPOSITORY_OWNER:"credenza-web3",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",npm_package_engines_node:">=20.10.0",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/29.0.14206865",GITHUB_RETENTION_DAYS:"90",GRADLE_HOME:"/usr/share/gradle-9.2.1",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",GITHUB_REPOSITORY_OWNER_ID:"93208388",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",npm_config__credenza3_registry:"https://registry.npmjs.org/",npm_config_userconfig:"/home/runner/work/_temp/.npmrc",SYSTEMD_EXEC_PID:"1769",npm_config_engine_strict:"true",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",JAVA_HOME_25_X64:"/usr/lib/jvm/temurin-25-jdk-amd64",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",ImageVersion:"20251126.144.1",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",LOGNAME:"runner",RUNNER_OS:"Linux",SWIFT_PATH:"/usr/share/swift/usr/bin",pnpm_config_verify_deps_before_run:"false",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GITHUB_WORKFLOW:"Publish @credenza3/passport-evm",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.12/x64",JOURNAL_STREAM:"9:13006",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",GOROOT_1_24_X64:"/opt/hostedtoolcache/go/1.24.10/x64",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/hosted-compute-agent.service/memory.pressure",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GITHUB_RUN_ID:"19964184307",GOROOT_1_25_X64:"/opt/hostedtoolcache/go/1.25.4/x64",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_BASE_REF:"",GITHUB_REF_TYPE:"branch",GITHUB_WORKFLOW_SHA:"53c13c9c31a900e5ab484a2e37b5a3566ac6982d",ImageOS:"ubuntu24",ACTIONS_ID_TOKEN_REQUEST_TOKEN:"eyJhbGciOiJSUzI1NiIsImtpZCI6IjM4ODI2YjE3LTZhMzAtNWY5Yi1iMTY5LThiZWI4MjAyZjcyMyIsInR5cCI6IkpXVCIsIng1dCI6InlrTmFZNHFNX3RhNGsyVGdaT0NFWUxrY1lsQSJ9.eyJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJhYyI6Ilt7XCJTY29wZVwiOlwicmVmcy9oZWFkcy9tYWluXCIsXCJQZXJtaXNzaW9uXCI6M31dIiwiYWNzbCI6IjEwIiwiYXVkIjoidnNvOmQ5NmZlZWUwLTg5OTYtNDI2Yy1hYzBmLWY0YTQ0NzFkNWNjMyIsImJpbGxpbmdfb3duZXJfaWQiOiJPX2tnRE9CWTRfUkEiLCJleHAiOjE3NjQ5NjI5MDQsImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vd3MvMjAwOC8wNi9pZGVudGl0eS9jbGFpbXMvcHJpbWFyeXNpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL3NpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsImlhdCI6MTc2NDk0MDcwNCwiaXNzIjoiaHR0cHM6Ly90b2tlbi5hY3Rpb25zLmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImpvYl9pZCI6IjQ0MzQ3MzI0LTQ2NzQtNWY5ZC04NDFmLTEwY2Y0MjQ4NTJhZCIsIm5hbWVpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsIm5iZiI6MTc2NDk0MDQwNCwib2lkY19leHRyYSI6IntcImFjdG9yXCI6XCJtaWtlYXZ2YWRcIixcImFjdG9yX2lkXCI6XCI4NzI5OTMxNVwiLFwiYmFzZV9yZWZcIjpcIlwiLFwiY2hlY2tfcnVuX2lkXCI6XCI1NzI1MTYyMjI3N1wiLFwiZXZlbnRfbmFtZVwiOlwicHVzaFwiLFwiaGVhZF9yZWZcIjpcIlwiLFwiam9iX3dvcmtmbG93X3JlZlwiOlwiY3JlZGVuemEtd2ViMy9wYXNzcG9ydC8uZ2l0aHViL3dvcmtmbG93cy9wdWJsaXNoX2V2bS55bWxAcmVmcy9oZWFkcy9tYWluXCIsXCJqb2Jfd29ya2Zsb3dfc2hhXCI6XCI1M2MxM2M5YzMxYTkwMGU1YWI0ODRhMmUzN2I1YTM1NjZhYzY5ODJkXCIsXCJyZWZcIjpcInJlZnMvaGVhZHMvbWFpblwiLFwicmVmX3Byb3RlY3RlZFwiOlwiZmFsc2VcIixcInJlZl90eXBlXCI6XCJicmFuY2hcIixcInJlcG9zaXRvcnlcIjpcImNyZWRlbnphLXdlYjMvcGFzc3BvcnRcIixcInJlcG9zaXRvcnlfaWRcIjpcIjQ5MzE1NTgxNFwiLFwicmVwb3NpdG9yeV9vd25lclwiOlwiY3JlZGVuemEtd2ViM1wiLFwicmVwb3NpdG9yeV9vd25lcl9pZFwiOlwiOTMyMDgzODhcIixcInJlcG9zaXRvcnlfdmlzaWJpbGl0eVwiOlwicHJpdmF0ZVwiLFwicnVuX2F0dGVtcHRcIjpcIjFcIixcInJ1bl9pZFwiOlwiMTk5NjQxODQzMDdcIixcInJ1bl9udW1iZXJcIjpcIjhcIixcInJ1bm5lcl9lbnZpcm9ubWVudFwiOlwiZ2l0aHViLWhvc3RlZFwiLFwic2hhXCI6XCI1M2MxM2M5YzMxYTkwMGU1YWI0ODRhMmUzN2I1YTM1NjZhYzY5ODJkXCIsXCJ3b3JrZmxvd1wiOlwiUHVibGlzaCBAY3JlZGVuemEzL3Bhc3Nwb3J0LWV2bVwiLFwid29ya2Zsb3dfcmVmXCI6XCJjcmVkZW56YS13ZWIzL3Bhc3Nwb3J0Ly5naXRodWIvd29ya2Zsb3dzL3B1Ymxpc2hfZXZtLnltbEByZWZzL2hlYWRzL21haW5cIixcIndvcmtmbG93X3NoYVwiOlwiNTNjMTNjOWMzMWE5MDBlNWFiNDg0YTJlMzdiNWEzNTY2YWM2OTgyZFwifSIsIm9pZGNfc3ViIjoicmVwbzpjcmVkZW56YS13ZWIzL3Bhc3Nwb3J0OnJlZjpyZWZzL2hlYWRzL21haW4iLCJvcmNoX2lkIjoiYjU1NDhiMTQtMWVjZS00MWZkLTk0ZjYtYjgxMTI1MzY4Y2VlLnB1Ymxpc2gtZ3ByLl8yNCIsIm93bmVyX2lkIjoiT19rZ0RPQlk0X1JBIiwicGxhbl9pZCI6ImI1NTQ4YjE0LTFlY2UtNDFmZC05NGY2LWI4MTEyNTM2OGNlZSIsInJlcG9zaXRvcnlfaWQiOiI0OTMxNTU4MTQiLCJydW5faWQiOiIxOTk2NDE4NDMwNyIsInJ1bl9udW1iZXIiOiI4IiwicnVuX3R5cGUiOiJmdWxsIiwicnVubmVyX2lkIjoiMTAwMDAwMDgxMCIsInJ1bm5lcl90eXBlIjoiaG9zdGVkIiwic2NwIjoiQWN0aW9ucy5SZXN1bHRzOmI1NTQ4YjE0LTFlY2UtNDFmZC05NGY2LWI4MTEyNTM2OGNlZTo0NDM0NzMyNC00Njc0LTVmOWQtODQxZi0xMGNmNDI0ODUyYWQgQWN0aW9ucy5SdW5uZXI6YjU1NDhiMTQtMWVjZS00MWZkLTk0ZjYtYjgxMTI1MzY4Y2VlOjQ0MzQ3MzI0LTQ2NzQtNWY5ZC04NDFmLTEwY2Y0MjQ4NTJhZCBBY3Rpb25zLlVwbG9hZEFydGlmYWN0czpiNTU0OGIxNC0xZWNlLTQxZmQtOTRmNi1iODExMjUzNjhjZWU6NDQzNDczMjQtNDY3NC01ZjlkLTg0MWYtMTBjZjQyNDg1MmFkIGdlbmVyYXRlX2lkX3Rva2VuOmI1NTQ4YjE0LTFlY2UtNDFmZC05NGY2LWI4MTEyNTM2OGNlZTo0NDM0NzMyNC00Njc0LTVmOWQtODQxZi0xMGNmNDI0ODUyYWQgQWN0aW9ucy5HZW5lcmljUmVhZDowMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJzaGEiOiI1M2MxM2M5YzMxYTkwMGU1YWI0ODRhMmUzN2I1YTM1NjZhYzY5ODJkIiwidHJ1c3RfdGllciI6IjIifQ.oXKUHGEzemv6xAY7YmTPxZHOjyk7k4qE9_RqP4b0g8Yr8lJvKuCPmO9nMwc7h_Yxn9zu2coOTn-AUeKnFw3WNX_rZ4_H3OCTwtxWLCZKYtP33nWcn8kv5cSoPH7WQoWC2Yk_QnVsFHqW6q8_xJ1CfnZXUiJ8CV7kTecSSjJdh-P07tFKNCOs29_Ow9pFWaeKTxNalwJXComEOaQnr_UhkO9mV8eBIq3HHcsqo5KhUBYI72gCdLUa-aZBU2e3KNe8-OdGewPW47DLWszE_cEuBhHQ7V8RBuOqkOSApF24T8WN0vGrSRDEzwD_PhUgsvc8FKbZ0Tgbfe5XLOyF--Pq2g",ENABLE_RUNNER_TRACING:"true",GITHUB_ACTION_REPOSITORY:"",GITHUB_WORKFLOW_REF:"credenza-web3/passport/.github/workflows/publish_evm.yml@refs/heads/main",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/passport/passport/packages/passport-evm/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/passport/passport/node_modules/.bin:/home/runner/work/passport/passport/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/passport/passport/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/24.11.1/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",INVOCATION_ID:"01132c24fd914539ace701a56d661aff",NODE:"/opt/hostedtoolcache/node/24.11.1/x64/bin/node",NPM_CONFIG_USERCONFIG:"/home/runner/work/_temp/.npmrc",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",RUNNER_TRACKING_ID:"github_18516c8a-0cfc-4fe3-938e-202245f61630",TURBO_HASH:"0080d10564a031f5",npm_package_name:"@credenza3/passport-evm",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",GITHUB_ACTION:"__run_2",GITHUB_RUN_NUMBER:"8",GITHUB_TRIGGERING_ACTOR:"mikeavvad",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",npm_config_frozen_lockfile:"",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"credenza-web3/passport",RUNNER_NAME:"GitHub Actions 1000000810",XDG_CONFIG_HOME:"/home/runner/.config",npm_lifecycle_script:"vite build",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.3.13750724",DEBIAN_FRONTEND:"noninteractive",GITHUB_ACTION_REF:"",GITHUB_ACTIONS:"true",GITHUB_REPOSITORY_ID:"493155814",NODE_PATH:"/home/runner/work/passport/passport/node_modules/.pnpm/vite@7.1.3_@types+node@24.3.0_jiti@2.4.2_lightningcss@1.29.1_sass@1.91.0_yaml@2.8.1/node_modules/vite/bin/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/vite@7.1.3_@types+node@24.3.0_jiti@2.4.2_lightningcss@1.29.1_sass@1.91.0_yaml@2.8.1/node_modules/vite/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/vite@7.1.3_@types+node@24.3.0_jiti@2.4.2_lightningcss@1.29.1_sass@1.91.0_yaml@2.8.1/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/turbo@1.13.3/node_modules/turbo/bin/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/turbo@1.13.3/node_modules/turbo/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/turbo@1.13.3/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules",SHELL:"/bin/bash",npm_package_version:"0.3.9",npm_config_verify_deps_before_run:"false",npm_lifecycle_event:"build",GITHUB_REF_PROTECTED:"false",ACCEPT_EULA:"Y",GITHUB_JOB:"publish-gpr",GITHUB_WORKSPACE:"/home/runner/work/passport/passport",TURBO_INVOCATION_DIR:"/home/runner/work/passport/passport",npm_package_engines_pnpm:">=9",npm_config_npm_globalconfig:"/opt/hostedtoolcache/node/24.11.1/x64/etc/npmrc",GITHUB_RUN_ATTEMPT:"1",GITHUB_SHA:"53c13c9c31a900e5ab484a2e37b5a3566ac6982d",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",GITHUB_ACTOR:"mikeavvad",GITHUB_REF:"refs/heads/main",npm_config_globalconfig:"/home/runner/.config/pnpm/rc",GITHUB_ACTOR_ID:"87299315",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_cce2442b-6b4a-47b4-b3ed-75c7ef73e46c",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/passport/passport/packages/passport-evm",RUNNER_WORKSPACE:"/home/runner/work/passport",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules/pnpm/bin/pnpm.cjs",ACTIONS_ID_TOKEN_REQUEST_URL:"https://run-actions-3-azure-eastus.actions.githubusercontent.com/147//idtoken/b5548b14-1ece-41fd-94f6-b81125368cee/44347324-4674-5f9d-841f-10cf424852ad?api-version=2.0",ANDROID_HOME:"/usr/local/lib/android/sdk",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_EVENT_NAME:"push",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_cce2442b-6b4a-47b4-b3ed-75c7ef73e46c",GITHUB_SERVER_URL:"https://github.com",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",HOMEBREW_NO_AUTO_UPDATE:"1",EDGEWEBDRIVER:"/usr/local/share/edge_driver",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/passport/passport/packages/passport-evm",npm_config__jsr_registry:"https://npm.jsr.io/",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.3.13750724",CHROME_BIN:"/usr/bin/google-chrome",SGX_AESM_ADDR:"1",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.3.13750724",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_cce2442b-6b4a-47b4-b3ed-75c7ef73e46c",INIT_CWD:"/home/runner/work/passport/passport/packages/passport-evm",NODE_ENV:"production"},tt;if(typeof window>"u"){var NI={hostname:""};tt={crypto:{randomUUID:function(){throw Error("unsupported")}},navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:NI,referrer:""},screen:{width:0,height:0},location:NI,addEventListener:function(){},removeEventListener:function(){}}}else tt=window;function xI(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function II(t,e,r,n,s,i,o){try{var a=t[i](o),c=a.value}catch(l){r(l);return}a.done?e(c):Promise.resolve(c).then(n,s)}function uk(t){return function(){var e=this,r=arguments;return new Promise(function(n,s){var i=t.apply(e,r);function o(c){II(i,n,s,o,a,"next",c)}function a(c){II(i,n,s,o,a,"throw",c)}o(void 0)})}}function Dv(t,e,r){return OI()?Dv=Reflect.construct:Dv=function(s,i,o){var a=[null];a.push.apply(a,i);var c=Function.bind.apply(s,a),l=new c;return o&&Mm(l,o.prototype),l},Dv.apply(null,arguments)}function qY(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Pn(t,e,r){return e&&qY(t.prototype,e),t}function er(){return er=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},er.apply(this,arguments)}function hk(t){return hk=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},hk(t)}function jn(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Mm(t,e)}function Rt(t,e){return e!=null&&typeof Symbol<"u"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function XY(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Bm(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,i;for(i=0;i<n.length;i++)s=n[i],!(e.indexOf(s)>=0)&&(r[s]=t[s]);return r}function Mm(t,e){return Mm=Object.setPrototypeOf||function(n,s){return n.__proto__=s,n},Mm(t,e)}function Vt(t){"@swc/helpers - typeof";return t&&typeof Symbol<"u"&&t.constructor===Symbol?"symbol":typeof t}function eK(t,e){if(t){if(typeof t=="string")return xI(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xI(t,e)}}function Wv(t){var e=typeof Map=="function"?new Map:void 0;return Wv=function(n){if(n===null||!XY(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(n))return e.get(n);e.set(n,s)}function s(){return Dv(n,arguments,hk(this).constructor)}return s.prototype=Object.create(n.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),Mm(s,n)},Wv(t)}function OI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(OI=function(){return!!t})()}function dt(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=eK(t))||e){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Um(t,e){var r,n,s,i,o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(s=l[0]&2?n.return:l[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,l[1])).done)return s;switch(n=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,n=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(s=o.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){o=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){o.label=l[1];break}if(l[0]===6&&o.label<s[1]){o.label=s[1],s=l;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(l);break}s[2]&&o.ops.pop(),o.trys.pop();continue}l=e.call(t,o)}catch(u){l=[6,u],n=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function BI(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}var tK=Object.defineProperty,rK=function(t,e,r){return e in t?tK(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},et=function(t,e,r){return rK(t,(typeof e>"u"?"undefined":Vt(e))!=="symbol"?e+"":e,r)},MI,nK=Object.defineProperty,sK=function(t,e,r){return e in t?nK(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},UI=function(t,e,r){return sK(t,(typeof e>"u"?"undefined":Vt(e))!=="symbol"?e+"":e,r)},ln=function(t){return t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t}(ln||{}),LI={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},FI={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},jv={},iK=function(){return!!globalThis.Zone};function dk(t){if(jv[t])return jv[t];var e=globalThis[t],r=e.prototype,n=t in LI?LI[t]:void 0,s=!!(n&&n.every(function(u){var d,h;return!!((h=(d=Object.getOwnPropertyDescriptor(r,u))==null?void 0:d.get)!=null&&h.toString().includes("[native code]"))})),i=t in FI?FI[t]:void 0,o=!!(i&&i.every(function(u){var d;return typeof r[u]=="function"&&((d=r[u])==null?void 0:d.toString().includes("[native code]"))}));if(s&&o&&!iK())return jv[t]=e.prototype,e.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var c=a.contentWindow;if(!c)return e.prototype;var l=c[t].prototype;return document.body.removeChild(a),l?jv[t]=l:r}catch{return r}}var fk={};function tl(t,e,r){var n,s=t+"."+String(r);if(fk[s])return fk[s].call(e);var i=dk(t),o=(n=Object.getOwnPropertyDescriptor(i,r))==null?void 0:n.get;return o?(fk[s]=o,o.call(e)):e[r]}var pk={};function VI(t,e,r){var n=t+"."+String(r);if(pk[n])return pk[n].bind(e);var s=dk(t),i=s[r];return typeof i!="function"?e[r]:(pk[n]=i,i.bind(e))}function oK(t){return tl("Node",t,"childNodes")}function aK(t){return tl("Node",t,"parentNode")}function cK(t){return tl("Node",t,"parentElement")}function lK(t){return tl("Node",t,"textContent")}function uK(t,e){return VI("Node",t,"contains")(e)}function hK(t){return VI("Node",t,"getRootNode")()}function dK(t){return!t||!("host"in t)?null:tl("ShadowRoot",t,"host")}function fK(t){return t.styleSheets}function pK(t){return!t||!("shadowRoot"in t)?null:tl("Element",t,"shadowRoot")}function gK(t,e){return tl("Element",t,"querySelector")(e)}function mK(t,e){return tl("Element",t,"querySelectorAll")(e)}function yK(){return dk("MutationObserver").constructor}function vK(t,e,r){try{if(!(e in t))return function(){};var n=t[e],s=r(n);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:n}})),t[e]=s,function(){t[e]=n}}catch{return function(){}}}var Gn={childNodes:oK,parentNode:aK,parentElement:cK,textContent:lK,contains:uK,getRootNode:hK,host:dK,styleSheets:fK,shadowRoot:pK,querySelector:gK,querySelectorAll:mK,mutationObserver:yK,patch:vK};function DI(t){return t.nodeType===t.ELEMENT_NODE}function Lm(t){var e=t&&"host"in t&&"mode"in t&&Gn.host(t)||null;return!!(e&&"shadowRoot"in e&&Gn.shadowRoot(e)===t)}function Fm(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function bK(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function wK(t){var e=t.cssText;if(e.split('"').length<3)return e;var r=["@import","url("+JSON.stringify(t.href)+")"];return t.layerName===""?r.push("layer"):t.layerName&&r.push("layer("+t.layerName+")"),t.supportsText&&r.push("supports("+t.supportsText+")"),t.media.length&&r.push(t.media.mediaText),r.join(" ")+";"}function gk(t){try{var e=t.rules||t.cssRules;if(!e)return null;var r=t.href;!r&&t.ownerNode&&t.ownerNode.ownerDocument&&(r=t.ownerNode.ownerDocument.location.href);var n=Array.from(e,function(s){return WI(s,r)}).join("");return bK(n)}catch{return null}}function WI(t,e){if(EK(t)){var r;try{r=gk(t.styleSheet)||wK(t)}catch{r=t.cssText}return t.styleSheet.href?$v(r,t.styleSheet.href):r}else{var n=t.cssText;return AK(t)&&t.selectorText.includes(":")&&(n=kK(n)),e?$v(n,e):n}}function kK(t){var e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function EK(t){return"styleSheet"in t}function AK(t){return"selectorText"in t}var jI=function(){function t(){UI(this,"idNodeMap",new Map),UI(this,"nodeMetaMap",new WeakMap)}var e=t.prototype;return e.getId=function(n){var s;if(!n)return-1;var i=(s=this.getMeta(n))==null?void 0:s.id;return i??-1},e.getNode=function(n){return this.idNodeMap.get(n)||null},e.getIds=function(){return Array.from(this.idNodeMap.keys())},e.getMeta=function(n){return this.nodeMetaMap.get(n)||null},e.removeNodeFromMap=function(n){var s=this,i=this.getId(n);this.idNodeMap.delete(i),n.childNodes&&n.childNodes.forEach(function(o){return s.removeNodeFromMap(o)})},e.has=function(n){return this.idNodeMap.has(n)},e.hasNode=function(n){return this.nodeMetaMap.has(n)},e.add=function(n,s){var i=s.id;this.idNodeMap.set(i,n),this.nodeMetaMap.set(n,s)},e.replace=function(n,s){var i=this.getNode(n);if(i){var o=this.nodeMetaMap.get(i);o&&this.nodeMetaMap.set(s,o)}this.idNodeMap.set(n,s)},e.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},t}();function _K(){return new jI}function Gv(t){var e=t.element,r=t.maskInputOptions,n=t.tagName,s=t.type,i=t.value,o=t.maskInputFn,a=i||"",c=s&&oh(s);return(r[n.toLowerCase()]||c&&r[c])&&(o?a=o(a,e):a="*".repeat(a.length)),a}function oh(t){return t.toLowerCase()}var GI="__rrweb_original__";function TK(t){var e=t.getContext("2d");if(!e)return!0;for(var r=50,n=0;n<t.width;n+=r)for(var s=0;s<t.height;s+=r){var i=e.getImageData,o=GI in i?i[GI]:i,a=new Uint32Array(o.call(e,n,s,Math.min(r,t.width-n),Math.min(r,t.height-s)).data.buffer);if(a.some(function(c){return c!==0}))return!1}return!0}function zv(t){var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?oh(e):null}function zI(t,e){var r;try{r=new URL(t,e??window.location.href)}catch{return null}var n=/\.([0-9a-z]+)(?:$)/i,s=r.pathname.match(n),i;return(i=s?.[1])!=null?i:null}function CK(t){var e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}var SK=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,RK=/^(?:[a-z+]+:)?\/\//i,PK=/^www\..*/i,NK=/^(data:)([^,]*),(.*)/i;function $v(t,e){return(t||"").replace(SK,function(r,n,s,i,o,a){var c=s||o||a,l=n||i||"";if(!c)return r;if(RK.test(c)||PK.test(c)||NK.test(c))return"url("+l+c+l+")";if(c[0]==="/")return"url("+l+(CK(e)+c)+l+")";var u=e.split("/"),d=c.split("/");u.pop();for(var h=dt(d),p;!(p=h()).done;){var g=p.value;g!=="."&&(g===".."?u.pop():u.push(g))}return"url("+l+u.join("/")+l+")"})}function Hv(t,e){return e===void 0&&(e=!1),e?t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function xK(t,e,r){r===void 0&&(r=!1);var n=Array.from(e.childNodes),s=[],i=0;if(n.length>1&&t&&typeof t=="string"){for(var o=Hv(t,r),a=o.length/t.length,c=1;c<n.length;c++)if(n[c].textContent&&typeof n[c].textContent=="string"){for(var l=Hv(n[c].textContent,r),u=100,d=3;d<l.length&&(l[d].match(/[a-zA-Z0-9]/)||l.indexOf(l.substring(0,d),1)!==-1);d++);for(;d<l.length;d++){var h=l.substring(0,d),p=o.split(h),g=-1;if(p.length===2)g=p[0].length;else if(p.length>2&&p[0]===""&&n[c-1].textContent!=="")g=o.indexOf(h,1);else if(p.length===1){if(h=h.substring(0,h.length-1),p=o.split(h),p.length<=1)return s.push(t),s;d=u+1}else d===l.length-1&&(g=o.indexOf(h));if(p.length>=2&&d>u){var m=n[c-1].textContent;if(m&&typeof m=="string"){var y=Hv(m).length;g=o.indexOf(h,y)}g===-1&&(g=p[0].length)}if(g!==-1){for(var v=Math.floor(g/a);v>0&&v<t.length;){if(i+=1,i>50*n.length)return s.push(t),s;var A=Hv(t.substring(0,v),r);if(A.length===g){s.push(t.substring(0,v)),t=t.substring(v),o=o.substring(g);break}else A.length<g?v+=Math.max(1,Math.floor((g-A.length)/a)):v-=Math.max(1,Math.floor((A.length-g)*a))}break}}}}return s.push(t),s}function IK(t,e){return xK(t,e).join("/* rr_split */")}var OK=1,BK=new RegExp("[^a-z0-9-_:]"),Vm=-2;function $I(){return OK++}function MK(t){if(Rt(t,HTMLFormElement))return"form";var e=oh(t.tagName);return BK.test(e)?"div":e}var wf,HI,UK=/^[^ \t\n\r\u000c]+/,LK=/^[, \t\n\r\u000c]+/;function FK(t,e){if(e.trim()==="")return e;var r=0;function n(l){var u,d=l.exec(e.substring(r));return d?(u=d[0],r+=u.length,u):""}for(var s=[];n(LK),!(r>=e.length);){var i=n(UK);if(i.slice(-1)===",")i=kf(t,i.substring(0,i.length-1)),s.push(i);else{var o="";i=kf(t,i);for(var a=!1;;){var c=e.charAt(r);if(c===""){s.push((i+o).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){r+=1,s.push((i+o).trim());break}else c==="("&&(a=!0);o+=c,r+=1}}}return s.join(", ")}var ZI=new WeakMap;function kf(t,e){return!e||e.trim()===""?e:mk(t,e)}function VK(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function mk(t,e){var r=ZI.get(t);if(r||(r=t.createElement("a"),ZI.set(t,r)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return r.setAttribute("href",e),r.href}function JI(t,e,r,n){return n&&(r==="src"||r==="href"&&!(e==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&(e==="table"||e==="td"||e==="th")?kf(t,n):r==="srcset"?FK(t,n):r==="style"?$v(n,mk(t)):e==="object"&&r==="data"?kf(t,n):n)}function QI(t,e,r){return(t==="video"||t==="audio")&&e==="autoplay"}function DK(t,e,r){try{if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(var n=t.classList.length;n--;){var s=t.classList[n];if(e.test(s))return!0}if(r)return t.matches(r)}catch{}return!1}function Zv(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return r?Zv(Gn.parentNode(t),e,r):!1;for(var n=t.classList.length;n--;){var s=t.classList[n];if(e.test(s))return!0}return r?Zv(Gn.parentNode(t),e,r):!1}function YI(t,e,r,n){var s;if(DI(t)){if(s=t,!Gn.childNodes(s).length)return!1}else{if(Gn.parentElement(t)===null)return!1;s=Gn.parentElement(t)}try{if(typeof e=="string"){if(n){if(s.closest("."+e))return!0}else if(s.classList.contains(e))return!0}else if(Zv(s,e,n))return!0;if(r){if(n){if(s.closest(r))return!0}else if(s.matches(r))return!0}}catch{}return!1}function WK(t,e,r){var n=t.contentWindow;if(n){var s=!1,i;try{i=n.document.readyState}catch{return}if(i!=="complete"){var o=setTimeout(function(){s||(e(),s=!0)},r);t.addEventListener("load",function(){clearTimeout(o),s=!0,e()});return}var a="about:blank";if(n.location.href!==a||t.src===a||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}}function jK(t,e,r){var n=!1,s;try{s=t.sheet}catch{return}if(!s){var i=setTimeout(function(){n||(e(),n=!0)},r);t.addEventListener("load",function(){clearTimeout(i),n=!0,e()})}}function GK(t,e){var r=e.doc,n=e.mirror,s=e.blockClass,i=e.blockSelector,o=e.needsMask,a=e.inlineStylesheet,c=e.maskInputOptions,l=c===void 0?{}:c,u=e.maskTextFn,d=e.maskInputFn,h=e.dataURLOptions,p=h===void 0?{}:h,g=e.inlineImages,m=e.recordCanvas,y=e.keepIframeSrcFn,v=e.newlyAddedElement,A=v===void 0?!1:v,E=e.cssCaptured,w=E===void 0?!1:E,C=zK(r,n);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:ln.Document,childNodes:[],compatMode:t.compatMode}:{type:ln.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:ln.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:C};case t.ELEMENT_NODE:return HK(t,{doc:r,blockClass:s,blockSelector:i,inlineStylesheet:a,maskInputOptions:l,maskInputFn:d,dataURLOptions:p,inlineImages:g,recordCanvas:m,keepIframeSrcFn:y,newlyAddedElement:A,rootId:C});case t.TEXT_NODE:return $K(t,{doc:r,needsMask:o,maskTextFn:u,rootId:C,cssCaptured:w});case t.CDATA_SECTION_NODE:return{type:ln.CDATA,textContent:"",rootId:C};case t.COMMENT_NODE:return{type:ln.Comment,textContent:Gn.textContent(t)||"",rootId:C};default:return!1}}function zK(t,e){if(e.hasNode(t)){var r=e.getId(t);return r===1?void 0:r}}function $K(t,e){var r=e.needsMask,n=e.maskTextFn,s=e.rootId,i=e.cssCaptured,o=Gn.parentNode(t),a=o&&o.tagName,c="",l=a==="STYLE"?!0:void 0,u=a==="SCRIPT"?!0:void 0;return u?c="SCRIPT_PLACEHOLDER":i||(c=Gn.textContent(t),l&&c&&(c=$v(c,mk(e.doc)))),!l&&!u&&c&&r&&(c=n?n(c,Gn.parentElement(t)):c.replace(/[\S]/g,"*")),{type:ln.Text,textContent:c||"",rootId:s}}function HK(t,e){for(var r=e.doc,n=e.blockClass,s=e.blockSelector,i=e.inlineStylesheet,o=e.maskInputOptions,a=o===void 0?{}:o,c=e.maskInputFn,l=e.dataURLOptions,u=l===void 0?{}:l,d=e.inlineImages,h=e.recordCanvas,p=e.keepIframeSrcFn,g=e.newlyAddedElement,m=g===void 0?!1:g,y=e.rootId,v=DK(t,n,s),A=MK(t),E={},w=t.attributes.length,C=0;C<w;C++){var B=t.attributes[C];QI(A,B.name,B.value)||(E[B.name]=JI(r,A,oh(B.name),B.value))}if(A==="link"&&i){var L=Array.from(r.styleSheets).find(function(ye){return ye.href===t.href}),I=null;L&&(I=gk(L)),I&&(delete E.rel,delete E.href,E._cssText=I)}if(A==="style"&&t.sheet){var M=gk(t.sheet);M&&(t.childNodes.length>1&&(M=IK(M,t)),E._cssText=M)}if(A==="input"||A==="textarea"||A==="select"){var W=t.value,U=t.checked;E.type!=="radio"&&E.type!=="checkbox"&&E.type!=="submit"&&E.type!=="button"&&W?E.value=Gv({element:t,type:zv(t),tagName:A,value:W,maskInputOptions:a,maskInputFn:c}):U&&(E.checked=U)}if(A==="option"&&(t.selected&&!a.select?E.selected=!0:delete E.selected),A==="dialog"&&t.open&&(E.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"),A==="canvas"&&h){if(t.__context==="2d")TK(t)||(E.rr_dataURL=t.toDataURL(u.type,u.quality));else if(!("__context"in t)){var x=t.toDataURL(u.type,u.quality),P=r.createElement("canvas");P.width=t.width,P.height=t.height;var F=P.toDataURL(u.type,u.quality);x!==F&&(E.rr_dataURL=x)}}if(A==="img"&&d){wf||(wf=r.createElement("canvas"),HI=wf.getContext("2d"));var O=t,j=O.currentSrc||O.getAttribute("src")||"<unknown-src>",G=O.crossOrigin,q=function(){O.removeEventListener("load",q);try{wf.width=O.naturalWidth,wf.height=O.naturalHeight,HI.drawImage(O,0,0),E.rr_dataURL=wf.toDataURL(u.type,u.quality)}catch(ye){if(O.crossOrigin!=="anonymous"){O.crossOrigin="anonymous",O.complete&&O.naturalWidth!==0?q():O.addEventListener("load",q);return}else console.warn("Cannot inline img src="+j+"! Error: "+ye)}O.crossOrigin==="anonymous"&&(G?E.crossOrigin=G:O.removeAttribute("crossorigin"))};O.complete&&O.naturalWidth!==0?q():O.addEventListener("load",q)}if(A==="audio"||A==="video"){var H=E;H.rr_mediaState=t.paused?"paused":"played",H.rr_mediaCurrentTime=t.currentTime,H.rr_mediaPlaybackRate=t.playbackRate,H.rr_mediaMuted=t.muted,H.rr_mediaLoop=t.loop,H.rr_mediaVolume=t.volume}if(m||(t.scrollLeft&&(E.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(E.rr_scrollTop=t.scrollTop)),v){var Y=t.getBoundingClientRect(),K=Y.width,te=Y.height;E={class:E.class,rr_width:""+K+"px",rr_height:""+te+"px"}}A==="iframe"&&!p(E.src)&&(t.contentDocument||(E.rr_src=E.src),delete E.src);var oe;try{customElements.get(A)&&(oe=!0)}catch{}return{type:ln.Element,tagName:A,attributes:E,childNodes:[],isSVG:VK(t)||void 0,needBlock:v,rootId:y,isCustom:oe}}function vr(t){return t==null?"":t.toLowerCase()}function ZK(t,e){if(e.comment&&t.type===ln.Comment)return!0;if(t.type===ln.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"&&t.attributes.as==="script"||t.attributes.rel==="modulepreload")||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&zI(t.attributes.href)==="js"))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(vr(t.attributes.name).match(/^msapplication-tile(image|color)$/)||vr(t.attributes.name)==="application-name"||vr(t.attributes.rel)==="icon"||vr(t.attributes.rel)==="apple-touch-icon"||vr(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&vr(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(vr(t.attributes.property).match(/^(og|twitter|fb):/)||vr(t.attributes.name).match(/^(og|twitter):/)||vr(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(vr(t.attributes.name)==="robots"||vr(t.attributes.name)==="googlebot"||vr(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(vr(t.attributes.name)==="author"||vr(t.attributes.name)==="generator"||vr(t.attributes.name)==="framework"||vr(t.attributes.name)==="publisher"||vr(t.attributes.name)==="progid"||vr(t.attributes.property).match(/^article:/)||vr(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(vr(t.attributes.name)==="google-site-verification"||vr(t.attributes.name)==="yandex-verification"||vr(t.attributes.name)==="csrf-token"||vr(t.attributes.name)==="p:domain_verify"||vr(t.attributes.name)==="verify-v1"||vr(t.attributes.name)==="verification"||vr(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ef(t,e){var r=e.doc,n=e.mirror,s=e.blockClass,i=e.blockSelector,o=e.maskTextClass,a=e.maskTextSelector,c=e.skipChild,l=c===void 0?!1:c,u=e.inlineStylesheet,d=u===void 0?!0:u,h=e.maskInputOptions,p=h===void 0?{}:h,g=e.maskTextFn,m=e.maskInputFn,y=e.slimDOMOptions,v=e.dataURLOptions,A=v===void 0?{}:v,E=e.inlineImages,w=E===void 0?!1:E,C=e.recordCanvas,B=C===void 0?!1:C,L=e.onSerialize,I=e.onIframeLoad,M=e.iframeLoadTimeout,W=M===void 0?5e3:M,U=e.onStylesheetLoad,x=e.stylesheetLoadTimeout,P=x===void 0?5e3:x,F=e.keepIframeSrcFn,O=F===void 0?function(){return!1}:F,j=e.newlyAddedElement,G=j===void 0?!1:j,q=e.cssCaptured,H=q===void 0?!1:q,Y=e.needsMask,K=e.preserveWhiteSpace,te=K===void 0?!0:K;if(!Y){var oe=Y===void 0;Y=YI(t,o,a,oe)}var ye=GK(t,{doc:r,mirror:n,blockClass:s,blockSelector:i,needsMask:Y,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:m,dataURLOptions:A,inlineImages:w,recordCanvas:B,keepIframeSrcFn:O,newlyAddedElement:G,cssCaptured:H});if(!ye)return console.warn(t,"not serialized"),null;var _e;n.hasNode(t)?_e=n.getId(t):ZK(ye,y)||!te&&ye.type===ln.Text&&!ye.textContent.replace(/^\s+|\s+$/gm,"").length?_e=Vm:_e=$I();var Ce=Object.assign(ye,{id:_e});if(n.add(t,Ce),_e===Vm)return null;L&&L(t);var ie=!l;if(Ce.type===ln.Element){ie=ie&&!Ce.needBlock,delete Ce.needBlock;var le=Gn.shadowRoot(t);le&&Fm(le)&&(Ce.isShadowHost=!0)}if((Ce.type===ln.Document||Ce.type===ln.Element)&&ie){y.headWhitespace&&Ce.type===ln.Element&&Ce.tagName==="head"&&(te=!1);var we={doc:r,mirror:n,blockClass:s,blockSelector:i,needsMask:Y,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:A,inlineImages:w,recordCanvas:B,preserveWhiteSpace:te,onSerialize:L,onIframeLoad:I,iframeLoadTimeout:W,onStylesheetLoad:U,stylesheetLoadTimeout:P,keepIframeSrcFn:O,cssCaptured:!1};if(!(Ce.type===ln.Element&&Ce.tagName==="textarea"&&Ce.attributes.value!==void 0)){Ce.type===ln.Element&&Ce.attributes._cssText!==void 0&&typeof Ce.attributes._cssText=="string"&&(we.cssCaptured=!0);for(var D=dt(Array.from(Gn.childNodes(t))),ue;!(ue=D()).done;){var me=ue.value,be=Ef(me,we);be&&Ce.childNodes.push(be)}}var re=null;if(DI(t)&&(re=Gn.shadowRoot(t)))for(var N=dt(Array.from(Gn.childNodes(re))),z;!(z=N()).done;){var ee=z.value,fe=Ef(ee,we);fe&&(Fm(re)&&(fe.isShadow=!0),Ce.childNodes.push(fe))}}var Ae=Gn.parentNode(t);return Ae&&Lm(Ae)&&Fm(Ae)&&(Ce.isShadow=!0),Ce.type===ln.Element&&Ce.tagName==="iframe"&&WK(t,function(){var Se=t.contentDocument;if(Se&&I){var J=Ef(Se,{doc:Se,mirror:n,blockClass:s,blockSelector:i,needsMask:Y,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:A,inlineImages:w,recordCanvas:B,preserveWhiteSpace:te,onSerialize:L,onIframeLoad:I,iframeLoadTimeout:W,onStylesheetLoad:U,stylesheetLoadTimeout:P,keepIframeSrcFn:O});J&&I(t,J)}},W),Ce.type===ln.Element&&Ce.tagName==="link"&&typeof Ce.attributes.rel=="string"&&(Ce.attributes.rel==="stylesheet"||Ce.attributes.rel==="preload"&&typeof Ce.attributes.href=="string"&&zI(Ce.attributes.href)==="css")&&jK(t,function(){if(U){var Se=Ef(t,{doc:r,mirror:n,blockClass:s,blockSelector:i,needsMask:Y,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:A,inlineImages:w,recordCanvas:B,preserveWhiteSpace:te,onSerialize:L,onIframeLoad:I,iframeLoadTimeout:W,onStylesheetLoad:U,stylesheetLoadTimeout:P,keepIframeSrcFn:O});Se&&U(t,Se)}},P),Ce}function JK(t,e){var r=e||{},n=r.mirror,s=n===void 0?new jI:n,i=r.blockClass,o=i===void 0?"rr-block":i,a=r.blockSelector,c=a===void 0?null:a,l=r.maskTextClass,u=l===void 0?"rr-mask":l,d=r.maskTextSelector,h=d===void 0?null:d,p=r.inlineStylesheet,g=p===void 0?!0:p,m=r.inlineImages,y=m===void 0?!1:m,v=r.recordCanvas,A=v===void 0?!1:v,E=r.maskAllInputs,w=E===void 0?!1:E,C=r.maskTextFn,B=r.maskInputFn,L=r.slimDOM,I=L===void 0?!1:L,M=r.dataURLOptions,W=r.preserveWhiteSpace,U=r.onSerialize,x=r.onIframeLoad,P=r.iframeLoadTimeout,F=r.onStylesheetLoad,O=r.stylesheetLoadTimeout,j=r.keepIframeSrcFn,G=j===void 0?function(){return!1}:j,q=w===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:w===!1?{password:!0}:w,H=I===!0||I==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:I==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:I===!1?{}:I;return Ef(t,{doc:t,mirror:s,blockClass:o,blockSelector:c,maskTextClass:u,maskTextSelector:h,skipChild:!1,inlineStylesheet:g,maskInputOptions:q,maskTextFn:C,maskInputFn:B,slimDOMOptions:H,dataURLOptions:M,inlineImages:y,recordCanvas:A,preserveWhiteSpace:W,onSerialize:U,onIframeLoad:x,iframeLoadTimeout:P,onStylesheetLoad:F,stylesheetLoadTimeout:O,keepIframeSrcFn:G,newlyAddedElement:!1})}function QK(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function YK(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return Rt(this,n)?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}),r}var yk={exports:{}},Cr=String,KI=function(){return{isColorSupported:!1,reset:Cr,bold:Cr,dim:Cr,italic:Cr,underline:Cr,inverse:Cr,hidden:Cr,strikethrough:Cr,black:Cr,red:Cr,green:Cr,yellow:Cr,blue:Cr,magenta:Cr,cyan:Cr,white:Cr,gray:Cr,bgBlack:Cr,bgRed:Cr,bgGreen:Cr,bgYellow:Cr,bgBlue:Cr,bgMagenta:Cr,bgCyan:Cr,bgWhite:Cr}};yk.exports=KI(),yk.exports.createColors=KI;var KK=yk.exports,qK={},XK=Object.freeze(Object.defineProperty({__proto__:null,default:qK},Symbol.toStringTag,{value:"Module"})),Qr=YK(XK),qI=KK,XI=Qr,vk=function(t){jn(e,t);function e(n,s,i,o,a,c){var l;return l=t.call(this,n)||this,l.name="CssSyntaxError",l.reason=n,a&&(l.file=a),o&&(l.source=o),c&&(l.plugin=c),typeof s<"u"&&typeof i<"u"&&(typeof s=="number"?(l.line=s,l.column=i):(l.line=s.line,l.column=s.column,l.endLine=i.line,l.endColumn=i.column)),l.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(l,e),l}var r=e.prototype;return r.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},r.showSourceCode=function(s){var i=this;if(!this.source)return"";var o=this.source;s==null&&(s=qI.isColorSupported),XI&&s&&(o=XI(o));var a=o.split(/\r?\n/),c=Math.max(this.line-3,0),l=Math.min(this.line+2,a.length),u=String(l).length,d,h;if(s){var p=qI.createColors(!0),g=p.bold,m=p.gray,y=p.red;d=function(v){return g(y(v))},h=function(v){return m(v)}}else d=h=function(v){return v};return a.slice(c,l).map(function(v,A){var E=c+1+A,w=" "+(" "+E).slice(-u)+" | ";if(E===i.line){var C=h(w.replace(/\d/g," "))+v.slice(0,i.column-1).replace(/[^\t]/g," ");return d(">")+h(w)+v+`
|
|
568
|
+
*/(function(t){const e=Fv,r=lk,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=C,t.INSPECT_MAX_BYTES=50;const s=2147483647;t.kMaxLength=s;const{Uint8Array:i,ArrayBuffer:o,SharedArrayBuffer:a}=globalThis;u.TYPED_ARRAY_SUPPORT=c(),!u.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{const S=new i(1),k={foo:function(){return 42}};return Object.setPrototypeOf(k,i.prototype),Object.setPrototypeOf(S,k),S.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function l(S){if(S>s)throw new RangeError('The value "'+S+'" is invalid for option "size"');const k=new i(S);return Object.setPrototypeOf(k,u.prototype),k}function u(S,k,R){if(typeof S=="number"){if(typeof k=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g(S)}return d(S,k,R)}u.poolSize=8192;function d(S,k,R){if(typeof S=="string")return m(S,k);if(o.isView(S))return v(S);if(S==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S);if(se(S,o)||S&&se(S.buffer,o)||typeof a<"u"&&(se(S,a)||S&&se(S.buffer,a)))return A(S,k,R);if(typeof S=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Z=S.valueOf&&S.valueOf();if(Z!=null&&Z!==S)return u.from(Z,k,R);const ce=E(S);if(ce)return ce;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof S[Symbol.toPrimitive]=="function")return u.from(S[Symbol.toPrimitive]("string"),k,R);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof S)}u.from=function(S,k,R){return d(S,k,R)},Object.setPrototypeOf(u.prototype,i.prototype),Object.setPrototypeOf(u,i);function h(S){if(typeof S!="number")throw new TypeError('"size" argument must be of type number');if(S<0)throw new RangeError('The value "'+S+'" is invalid for option "size"')}function p(S,k,R){return h(S),S<=0?l(S):k!==void 0?typeof R=="string"?l(S).fill(k,R):l(S).fill(k):l(S)}u.alloc=function(S,k,R){return p(S,k,R)};function g(S){return h(S),l(S<0?0:w(S)|0)}u.allocUnsafe=function(S){return g(S)},u.allocUnsafeSlow=function(S){return g(S)};function m(S,k){if((typeof k!="string"||k==="")&&(k="utf8"),!u.isEncoding(k))throw new TypeError("Unknown encoding: "+k);const R=B(S,k)|0;let Z=l(R);const ce=Z.write(S,k);return ce!==R&&(Z=Z.slice(0,ce)),Z}function y(S){const k=S.length<0?0:w(S.length)|0,R=l(k);for(let Z=0;Z<k;Z+=1)R[Z]=S[Z]&255;return R}function v(S){if(se(S,i)){const k=new i(S);return A(k.buffer,k.byteOffset,k.byteLength)}return y(S)}function A(S,k,R){if(k<0||S.byteLength<k)throw new RangeError('"offset" is outside of buffer bounds');if(S.byteLength<k+(R||0))throw new RangeError('"length" is outside of buffer bounds');let Z;return k===void 0&&R===void 0?Z=new i(S):R===void 0?Z=new i(S,k):Z=new i(S,k,R),Object.setPrototypeOf(Z,u.prototype),Z}function E(S){if(u.isBuffer(S)){const k=w(S.length)|0,R=l(k);return R.length===0||S.copy(R,0,0,k),R}if(S.length!==void 0)return typeof S.length!="number"||ae(S.length)?l(0):y(S);if(S.type==="Buffer"&&Array.isArray(S.data))return y(S.data)}function w(S){if(S>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return S|0}function C(S){return+S!=S&&(S=0),u.alloc(+S)}u.isBuffer=function(k){return k!=null&&k._isBuffer===!0&&k!==u.prototype},u.compare=function(k,R){if(se(k,i)&&(k=u.from(k,k.offset,k.byteLength)),se(R,i)&&(R=u.from(R,R.offset,R.byteLength)),!u.isBuffer(k)||!u.isBuffer(R))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(k===R)return 0;let Z=k.length,ce=R.length;for(let he=0,ke=Math.min(Z,ce);he<ke;++he)if(k[he]!==R[he]){Z=k[he],ce=R[he];break}return Z<ce?-1:ce<Z?1:0},u.isEncoding=function(k){switch(String(k).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(k,R){if(!Array.isArray(k))throw new TypeError('"list" argument must be an Array of Buffers');if(k.length===0)return u.alloc(0);let Z;if(R===void 0)for(R=0,Z=0;Z<k.length;++Z)R+=k[Z].length;const ce=u.allocUnsafe(R);let he=0;for(Z=0;Z<k.length;++Z){let ke=k[Z];if(se(ke,i))he+ke.length>ce.length?(u.isBuffer(ke)||(ke=u.from(ke)),ke.copy(ce,he)):i.prototype.set.call(ce,ke,he);else if(u.isBuffer(ke))ke.copy(ce,he);else throw new TypeError('"list" argument must be an Array of Buffers');he+=ke.length}return ce};function B(S,k){if(u.isBuffer(S))return S.length;if(o.isView(S)||se(S,o))return S.byteLength;if(typeof S!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof S);const R=S.length,Z=arguments.length>2&&arguments[2]===!0;if(!Z&&R===0)return 0;let ce=!1;for(;;)switch(k){case"ascii":case"latin1":case"binary":return R;case"utf8":case"utf-8":return Se(S).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R*2;case"hex":return R>>>1;case"base64":return Pe(S).length;default:if(ce)return Z?-1:Se(S).length;k=(""+k).toLowerCase(),ce=!0}}u.byteLength=B;function L(S,k,R){let Z=!1;if((k===void 0||k<0)&&(k=0),k>this.length||((R===void 0||R>this.length)&&(R=this.length),R<=0)||(R>>>=0,k>>>=0,R<=k))return"";for(S||(S="utf8");;)switch(S){case"hex":return te(this,k,R);case"utf8":case"utf-8":return G(this,k,R);case"ascii":return Y(this,k,R);case"latin1":case"binary":return K(this,k,R);case"base64":return j(this,k,R);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oe(this,k,R);default:if(Z)throw new TypeError("Unknown encoding: "+S);S=(S+"").toLowerCase(),Z=!0}}u.prototype._isBuffer=!0;function I(S,k,R){const Z=S[k];S[k]=S[R],S[R]=Z}u.prototype.swap16=function(){const k=this.length;if(k%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let R=0;R<k;R+=2)I(this,R,R+1);return this},u.prototype.swap32=function(){const k=this.length;if(k%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let R=0;R<k;R+=4)I(this,R,R+3),I(this,R+1,R+2);return this},u.prototype.swap64=function(){const k=this.length;if(k%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let R=0;R<k;R+=8)I(this,R,R+7),I(this,R+1,R+6),I(this,R+2,R+5),I(this,R+3,R+4);return this},u.prototype.toString=function(){const k=this.length;return k===0?"":arguments.length===0?G(this,0,k):L.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(k){if(!u.isBuffer(k))throw new TypeError("Argument must be a Buffer");return this===k?!0:u.compare(this,k)===0},u.prototype.inspect=function(){let k="";const R=t.INSPECT_MAX_BYTES;return k=this.toString("hex",0,R).replace(/(.{2})/g,"$1 ").trim(),this.length>R&&(k+=" ... "),"<Buffer "+k+">"},n&&(u.prototype[n]=u.prototype.inspect),u.prototype.compare=function(k,R,Z,ce,he){if(se(k,i)&&(k=u.from(k,k.offset,k.byteLength)),!u.isBuffer(k))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof k);if(R===void 0&&(R=0),Z===void 0&&(Z=k?k.length:0),ce===void 0&&(ce=0),he===void 0&&(he=this.length),R<0||Z>k.length||ce<0||he>this.length)throw new RangeError("out of range index");if(ce>=he&&R>=Z)return 0;if(ce>=he)return-1;if(R>=Z)return 1;if(R>>>=0,Z>>>=0,ce>>>=0,he>>>=0,this===k)return 0;let ke=he-ce,Ne=Z-R;const ze=Math.min(ke,Ne),Ft=this.slice(ce,he),Ct=k.slice(R,Z);for(let vt=0;vt<ze;++vt)if(Ft[vt]!==Ct[vt]){ke=Ft[vt],Ne=Ct[vt];break}return ke<Ne?-1:Ne<ke?1:0};function M(S,k,R,Z,ce){if(S.length===0)return-1;if(typeof R=="string"?(Z=R,R=0):R>2147483647?R=2147483647:R<-2147483648&&(R=-2147483648),R=+R,ae(R)&&(R=ce?0:S.length-1),R<0&&(R=S.length+R),R>=S.length){if(ce)return-1;R=S.length-1}else if(R<0)if(ce)R=0;else return-1;if(typeof k=="string"&&(k=u.from(k,Z)),u.isBuffer(k))return k.length===0?-1:W(S,k,R,Z,ce);if(typeof k=="number")return k=k&255,typeof i.prototype.indexOf=="function"?ce?i.prototype.indexOf.call(S,k,R):i.prototype.lastIndexOf.call(S,k,R):W(S,[k],R,Z,ce);throw new TypeError("val must be string, number or Buffer")}function W(S,k,R,Z,ce){let he=1,ke=S.length,Ne=k.length;if(Z!==void 0&&(Z=String(Z).toLowerCase(),Z==="ucs2"||Z==="ucs-2"||Z==="utf16le"||Z==="utf-16le")){if(S.length<2||k.length<2)return-1;he=2,ke/=2,Ne/=2,R/=2}function ze(Ct,vt){return he===1?Ct[vt]:Ct.readUInt16BE(vt*he)}let Ft;if(ce){let Ct=-1;for(Ft=R;Ft<ke;Ft++)if(ze(S,Ft)===ze(k,Ct===-1?0:Ft-Ct)){if(Ct===-1&&(Ct=Ft),Ft-Ct+1===Ne)return Ct*he}else Ct!==-1&&(Ft-=Ft-Ct),Ct=-1}else for(R+Ne>ke&&(R=ke-Ne),Ft=R;Ft>=0;Ft--){let Ct=!0;for(let vt=0;vt<Ne;vt++)if(ze(S,Ft+vt)!==ze(k,vt)){Ct=!1;break}if(Ct)return Ft}return-1}u.prototype.includes=function(k,R,Z){return this.indexOf(k,R,Z)!==-1},u.prototype.indexOf=function(k,R,Z){return M(this,k,R,Z,!0)},u.prototype.lastIndexOf=function(k,R,Z){return M(this,k,R,Z,!1)};function U(S,k,R,Z){R=Number(R)||0;const ce=S.length-R;Z?(Z=Number(Z),Z>ce&&(Z=ce)):Z=ce;const he=k.length;Z>he/2&&(Z=he/2);let ke;for(ke=0;ke<Z;++ke){const Ne=parseInt(k.substr(ke*2,2),16);if(ae(Ne))return ke;S[R+ke]=Ne}return ke}function x(S,k,R,Z){return Ve(Se(k,S.length-R),S,R,Z)}function P(S,k,R,Z){return Ve(J(k),S,R,Z)}function F(S,k,R,Z){return Ve(Pe(k),S,R,Z)}function O(S,k,R,Z){return Ve(ge(k,S.length-R),S,R,Z)}u.prototype.write=function(k,R,Z,ce){if(R===void 0)ce="utf8",Z=this.length,R=0;else if(Z===void 0&&typeof R=="string")ce=R,Z=this.length,R=0;else if(isFinite(R))R=R>>>0,isFinite(Z)?(Z=Z>>>0,ce===void 0&&(ce="utf8")):(ce=Z,Z=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const he=this.length-R;if((Z===void 0||Z>he)&&(Z=he),k.length>0&&(Z<0||R<0)||R>this.length)throw new RangeError("Attempt to write outside buffer bounds");ce||(ce="utf8");let ke=!1;for(;;)switch(ce){case"hex":return U(this,k,R,Z);case"utf8":case"utf-8":return x(this,k,R,Z);case"ascii":case"latin1":case"binary":return P(this,k,R,Z);case"base64":return F(this,k,R,Z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,k,R,Z);default:if(ke)throw new TypeError("Unknown encoding: "+ce);ce=(""+ce).toLowerCase(),ke=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function j(S,k,R){return k===0&&R===S.length?e.fromByteArray(S):e.fromByteArray(S.slice(k,R))}function G(S,k,R){R=Math.min(S.length,R);const Z=[];let ce=k;for(;ce<R;){const he=S[ce];let ke=null,Ne=he>239?4:he>223?3:he>191?2:1;if(ce+Ne<=R){let ze,Ft,Ct,vt;switch(Ne){case 1:he<128&&(ke=he);break;case 2:ze=S[ce+1],(ze&192)===128&&(vt=(he&31)<<6|ze&63,vt>127&&(ke=vt));break;case 3:ze=S[ce+1],Ft=S[ce+2],(ze&192)===128&&(Ft&192)===128&&(vt=(he&15)<<12|(ze&63)<<6|Ft&63,vt>2047&&(vt<55296||vt>57343)&&(ke=vt));break;case 4:ze=S[ce+1],Ft=S[ce+2],Ct=S[ce+3],(ze&192)===128&&(Ft&192)===128&&(Ct&192)===128&&(vt=(he&15)<<18|(ze&63)<<12|(Ft&63)<<6|Ct&63,vt>65535&&vt<1114112&&(ke=vt))}}ke===null?(ke=65533,Ne=1):ke>65535&&(ke-=65536,Z.push(ke>>>10&1023|55296),ke=56320|ke&1023),Z.push(ke),ce+=Ne}return H(Z)}const q=4096;function H(S){const k=S.length;if(k<=q)return String.fromCharCode.apply(String,S);let R="",Z=0;for(;Z<k;)R+=String.fromCharCode.apply(String,S.slice(Z,Z+=q));return R}function Y(S,k,R){let Z="";R=Math.min(S.length,R);for(let ce=k;ce<R;++ce)Z+=String.fromCharCode(S[ce]&127);return Z}function K(S,k,R){let Z="";R=Math.min(S.length,R);for(let ce=k;ce<R;++ce)Z+=String.fromCharCode(S[ce]);return Z}function te(S,k,R){const Z=S.length;(!k||k<0)&&(k=0),(!R||R<0||R>Z)&&(R=Z);let ce="";for(let he=k;he<R;++he)ce+=f[S[he]];return ce}function oe(S,k,R){const Z=S.slice(k,R);let ce="";for(let he=0;he<Z.length-1;he+=2)ce+=String.fromCharCode(Z[he]+Z[he+1]*256);return ce}u.prototype.slice=function(k,R){const Z=this.length;k=~~k,R=R===void 0?Z:~~R,k<0?(k+=Z,k<0&&(k=0)):k>Z&&(k=Z),R<0?(R+=Z,R<0&&(R=0)):R>Z&&(R=Z),R<k&&(R=k);const ce=this.subarray(k,R);return Object.setPrototypeOf(ce,u.prototype),ce};function ye(S,k,R){if(S%1!==0||S<0)throw new RangeError("offset is not uint");if(S+k>R)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(k,R,Z){k=k>>>0,R=R>>>0,Z||ye(k,R,this.length);let ce=this[k],he=1,ke=0;for(;++ke<R&&(he*=256);)ce+=this[k+ke]*he;return ce},u.prototype.readUintBE=u.prototype.readUIntBE=function(k,R,Z){k=k>>>0,R=R>>>0,Z||ye(k,R,this.length);let ce=this[k+--R],he=1;for(;R>0&&(he*=256);)ce+=this[k+--R]*he;return ce},u.prototype.readUint8=u.prototype.readUInt8=function(k,R){return k=k>>>0,R||ye(k,1,this.length),this[k]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(k,R){return k=k>>>0,R||ye(k,2,this.length),this[k]|this[k+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(k,R){return k=k>>>0,R||ye(k,2,this.length),this[k]<<8|this[k+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(k,R){return k=k>>>0,R||ye(k,4,this.length),(this[k]|this[k+1]<<8|this[k+2]<<16)+this[k+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(k,R){return k=k>>>0,R||ye(k,4,this.length),this[k]*16777216+(this[k+1]<<16|this[k+2]<<8|this[k+3])},u.prototype.readBigUInt64LE=b(function(k){k=k>>>0,z(k,"offset");const R=this[k],Z=this[k+7];(R===void 0||Z===void 0)&&ee(k,this.length-8);const ce=R+this[++k]*2**8+this[++k]*2**16+this[++k]*2**24,he=this[++k]+this[++k]*2**8+this[++k]*2**16+Z*2**24;return BigInt(ce)+(BigInt(he)<<BigInt(32))}),u.prototype.readBigUInt64BE=b(function(k){k=k>>>0,z(k,"offset");const R=this[k],Z=this[k+7];(R===void 0||Z===void 0)&&ee(k,this.length-8);const ce=R*2**24+this[++k]*2**16+this[++k]*2**8+this[++k],he=this[++k]*2**24+this[++k]*2**16+this[++k]*2**8+Z;return(BigInt(ce)<<BigInt(32))+BigInt(he)}),u.prototype.readIntLE=function(k,R,Z){k=k>>>0,R=R>>>0,Z||ye(k,R,this.length);let ce=this[k],he=1,ke=0;for(;++ke<R&&(he*=256);)ce+=this[k+ke]*he;return he*=128,ce>=he&&(ce-=Math.pow(2,8*R)),ce},u.prototype.readIntBE=function(k,R,Z){k=k>>>0,R=R>>>0,Z||ye(k,R,this.length);let ce=R,he=1,ke=this[k+--ce];for(;ce>0&&(he*=256);)ke+=this[k+--ce]*he;return he*=128,ke>=he&&(ke-=Math.pow(2,8*R)),ke},u.prototype.readInt8=function(k,R){return k=k>>>0,R||ye(k,1,this.length),this[k]&128?(255-this[k]+1)*-1:this[k]},u.prototype.readInt16LE=function(k,R){k=k>>>0,R||ye(k,2,this.length);const Z=this[k]|this[k+1]<<8;return Z&32768?Z|4294901760:Z},u.prototype.readInt16BE=function(k,R){k=k>>>0,R||ye(k,2,this.length);const Z=this[k+1]|this[k]<<8;return Z&32768?Z|4294901760:Z},u.prototype.readInt32LE=function(k,R){return k=k>>>0,R||ye(k,4,this.length),this[k]|this[k+1]<<8|this[k+2]<<16|this[k+3]<<24},u.prototype.readInt32BE=function(k,R){return k=k>>>0,R||ye(k,4,this.length),this[k]<<24|this[k+1]<<16|this[k+2]<<8|this[k+3]},u.prototype.readBigInt64LE=b(function(k){k=k>>>0,z(k,"offset");const R=this[k],Z=this[k+7];(R===void 0||Z===void 0)&&ee(k,this.length-8);const ce=this[k+4]+this[k+5]*2**8+this[k+6]*2**16+(Z<<24);return(BigInt(ce)<<BigInt(32))+BigInt(R+this[++k]*2**8+this[++k]*2**16+this[++k]*2**24)}),u.prototype.readBigInt64BE=b(function(k){k=k>>>0,z(k,"offset");const R=this[k],Z=this[k+7];(R===void 0||Z===void 0)&&ee(k,this.length-8);const ce=(R<<24)+this[++k]*2**16+this[++k]*2**8+this[++k];return(BigInt(ce)<<BigInt(32))+BigInt(this[++k]*2**24+this[++k]*2**16+this[++k]*2**8+Z)}),u.prototype.readFloatLE=function(k,R){return k=k>>>0,R||ye(k,4,this.length),r.read(this,k,!0,23,4)},u.prototype.readFloatBE=function(k,R){return k=k>>>0,R||ye(k,4,this.length),r.read(this,k,!1,23,4)},u.prototype.readDoubleLE=function(k,R){return k=k>>>0,R||ye(k,8,this.length),r.read(this,k,!0,52,8)},u.prototype.readDoubleBE=function(k,R){return k=k>>>0,R||ye(k,8,this.length),r.read(this,k,!1,52,8)};function _e(S,k,R,Z,ce,he){if(!u.isBuffer(S))throw new TypeError('"buffer" argument must be a Buffer instance');if(k>ce||k<he)throw new RangeError('"value" argument is out of bounds');if(R+Z>S.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(k,R,Z,ce){if(k=+k,R=R>>>0,Z=Z>>>0,!ce){const Ne=Math.pow(2,8*Z)-1;_e(this,k,R,Z,Ne,0)}let he=1,ke=0;for(this[R]=k&255;++ke<Z&&(he*=256);)this[R+ke]=k/he&255;return R+Z},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(k,R,Z,ce){if(k=+k,R=R>>>0,Z=Z>>>0,!ce){const Ne=Math.pow(2,8*Z)-1;_e(this,k,R,Z,Ne,0)}let he=Z-1,ke=1;for(this[R+he]=k&255;--he>=0&&(ke*=256);)this[R+he]=k/ke&255;return R+Z},u.prototype.writeUint8=u.prototype.writeUInt8=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,1,255,0),this[R]=k&255,R+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,2,65535,0),this[R]=k&255,this[R+1]=k>>>8,R+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,2,65535,0),this[R]=k>>>8,this[R+1]=k&255,R+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,4,4294967295,0),this[R+3]=k>>>24,this[R+2]=k>>>16,this[R+1]=k>>>8,this[R]=k&255,R+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,4,4294967295,0),this[R]=k>>>24,this[R+1]=k>>>16,this[R+2]=k>>>8,this[R+3]=k&255,R+4};function Ce(S,k,R,Z,ce){N(k,Z,ce,S,R,7);let he=Number(k&BigInt(4294967295));S[R++]=he,he=he>>8,S[R++]=he,he=he>>8,S[R++]=he,he=he>>8,S[R++]=he;let ke=Number(k>>BigInt(32)&BigInt(4294967295));return S[R++]=ke,ke=ke>>8,S[R++]=ke,ke=ke>>8,S[R++]=ke,ke=ke>>8,S[R++]=ke,R}function ie(S,k,R,Z,ce){N(k,Z,ce,S,R,7);let he=Number(k&BigInt(4294967295));S[R+7]=he,he=he>>8,S[R+6]=he,he=he>>8,S[R+5]=he,he=he>>8,S[R+4]=he;let ke=Number(k>>BigInt(32)&BigInt(4294967295));return S[R+3]=ke,ke=ke>>8,S[R+2]=ke,ke=ke>>8,S[R+1]=ke,ke=ke>>8,S[R]=ke,R+8}u.prototype.writeBigUInt64LE=b(function(k,R=0){return Ce(this,k,R,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=b(function(k,R=0){return ie(this,k,R,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(k,R,Z,ce){if(k=+k,R=R>>>0,!ce){const ze=Math.pow(2,8*Z-1);_e(this,k,R,Z,ze-1,-ze)}let he=0,ke=1,Ne=0;for(this[R]=k&255;++he<Z&&(ke*=256);)k<0&&Ne===0&&this[R+he-1]!==0&&(Ne=1),this[R+he]=(k/ke>>0)-Ne&255;return R+Z},u.prototype.writeIntBE=function(k,R,Z,ce){if(k=+k,R=R>>>0,!ce){const ze=Math.pow(2,8*Z-1);_e(this,k,R,Z,ze-1,-ze)}let he=Z-1,ke=1,Ne=0;for(this[R+he]=k&255;--he>=0&&(ke*=256);)k<0&&Ne===0&&this[R+he+1]!==0&&(Ne=1),this[R+he]=(k/ke>>0)-Ne&255;return R+Z},u.prototype.writeInt8=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,1,127,-128),k<0&&(k=255+k+1),this[R]=k&255,R+1},u.prototype.writeInt16LE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,2,32767,-32768),this[R]=k&255,this[R+1]=k>>>8,R+2},u.prototype.writeInt16BE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,2,32767,-32768),this[R]=k>>>8,this[R+1]=k&255,R+2},u.prototype.writeInt32LE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,4,2147483647,-2147483648),this[R]=k&255,this[R+1]=k>>>8,this[R+2]=k>>>16,this[R+3]=k>>>24,R+4},u.prototype.writeInt32BE=function(k,R,Z){return k=+k,R=R>>>0,Z||_e(this,k,R,4,2147483647,-2147483648),k<0&&(k=4294967295+k+1),this[R]=k>>>24,this[R+1]=k>>>16,this[R+2]=k>>>8,this[R+3]=k&255,R+4},u.prototype.writeBigInt64LE=b(function(k,R=0){return Ce(this,k,R,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=b(function(k,R=0){return ie(this,k,R,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function le(S,k,R,Z,ce,he){if(R+Z>S.length)throw new RangeError("Index out of range");if(R<0)throw new RangeError("Index out of range")}function we(S,k,R,Z,ce){return k=+k,R=R>>>0,ce||le(S,k,R,4),r.write(S,k,R,Z,23,4),R+4}u.prototype.writeFloatLE=function(k,R,Z){return we(this,k,R,!0,Z)},u.prototype.writeFloatBE=function(k,R,Z){return we(this,k,R,!1,Z)};function D(S,k,R,Z,ce){return k=+k,R=R>>>0,ce||le(S,k,R,8),r.write(S,k,R,Z,52,8),R+8}u.prototype.writeDoubleLE=function(k,R,Z){return D(this,k,R,!0,Z)},u.prototype.writeDoubleBE=function(k,R,Z){return D(this,k,R,!1,Z)},u.prototype.copy=function(k,R,Z,ce){if(!u.isBuffer(k))throw new TypeError("argument should be a Buffer");if(Z||(Z=0),!ce&&ce!==0&&(ce=this.length),R>=k.length&&(R=k.length),R||(R=0),ce>0&&ce<Z&&(ce=Z),ce===Z||k.length===0||this.length===0)return 0;if(R<0)throw new RangeError("targetStart out of bounds");if(Z<0||Z>=this.length)throw new RangeError("Index out of range");if(ce<0)throw new RangeError("sourceEnd out of bounds");ce>this.length&&(ce=this.length),k.length-R<ce-Z&&(ce=k.length-R+Z);const he=ce-Z;return this===k&&typeof i.prototype.copyWithin=="function"?this.copyWithin(R,Z,ce):i.prototype.set.call(k,this.subarray(Z,ce),R),he},u.prototype.fill=function(k,R,Z,ce){if(typeof k=="string"){if(typeof R=="string"?(ce=R,R=0,Z=this.length):typeof Z=="string"&&(ce=Z,Z=this.length),ce!==void 0&&typeof ce!="string")throw new TypeError("encoding must be a string");if(typeof ce=="string"&&!u.isEncoding(ce))throw new TypeError("Unknown encoding: "+ce);if(k.length===1){const ke=k.charCodeAt(0);(ce==="utf8"&&ke<128||ce==="latin1")&&(k=ke)}}else typeof k=="number"?k=k&255:typeof k=="boolean"&&(k=Number(k));if(R<0||this.length<R||this.length<Z)throw new RangeError("Out of range index");if(Z<=R)return this;R=R>>>0,Z=Z===void 0?this.length:Z>>>0,k||(k=0);let he;if(typeof k=="number")for(he=R;he<Z;++he)this[he]=k;else{const ke=u.isBuffer(k)?k:u.from(k,ce),Ne=ke.length;if(Ne===0)throw new TypeError('The value "'+k+'" is invalid for argument "value"');for(he=0;he<Z-R;++he)this[he+R]=ke[he%Ne]}return this};const ue={};function me(S,k,R){ue[S]=class extends R{constructor(){super(),Object.defineProperty(this,"message",{value:k.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${S}]`,this.stack,delete this.name}get code(){return S}set code(ce){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:ce,writable:!0})}toString(){return`${this.name} [${S}]: ${this.message}`}}}me("ERR_BUFFER_OUT_OF_BOUNDS",function(S){return S?`${S} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),me("ERR_INVALID_ARG_TYPE",function(S,k){return`The "${S}" argument must be of type number. Received type ${typeof k}`},TypeError),me("ERR_OUT_OF_RANGE",function(S,k,R){let Z=`The value of "${S}" is out of range.`,ce=R;return Number.isInteger(R)&&Math.abs(R)>2**32?ce=be(String(R)):typeof R=="bigint"&&(ce=String(R),(R>BigInt(2)**BigInt(32)||R<-(BigInt(2)**BigInt(32)))&&(ce=be(ce)),ce+="n"),Z+=` It must be ${k}. Received ${ce}`,Z},RangeError);function be(S){let k="",R=S.length;const Z=S[0]==="-"?1:0;for(;R>=Z+4;R-=3)k=`_${S.slice(R-3,R)}${k}`;return`${S.slice(0,R)}${k}`}function re(S,k,R){z(k,"offset"),(S[k]===void 0||S[k+R]===void 0)&&ee(k,S.length-(R+1))}function N(S,k,R,Z,ce,he){if(S>R||S<k){const ke=typeof k=="bigint"?"n":"";let Ne;throw k===0||k===BigInt(0)?Ne=`>= 0${ke} and < 2${ke} ** ${(he+1)*8}${ke}`:Ne=`>= -(2${ke} ** ${(he+1)*8-1}${ke}) and < 2 ** ${(he+1)*8-1}${ke}`,new ue.ERR_OUT_OF_RANGE("value",Ne,S)}re(Z,ce,he)}function z(S,k){if(typeof S!="number")throw new ue.ERR_INVALID_ARG_TYPE(k,"number",S)}function ee(S,k,R){throw Math.floor(S)!==S?(z(S,R),new ue.ERR_OUT_OF_RANGE("offset","an integer",S)):k<0?new ue.ERR_BUFFER_OUT_OF_BOUNDS:new ue.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${k}`,S)}const fe=/[^+/0-9A-Za-z-_]/g;function Ae(S){if(S=S.split("=")[0],S=S.trim().replace(fe,""),S.length<2)return"";for(;S.length%4!==0;)S=S+"=";return S}function Se(S,k){k=k||1/0;let R;const Z=S.length;let ce=null;const he=[];for(let ke=0;ke<Z;++ke){if(R=S.charCodeAt(ke),R>55295&&R<57344){if(!ce){if(R>56319){(k-=3)>-1&&he.push(239,191,189);continue}else if(ke+1===Z){(k-=3)>-1&&he.push(239,191,189);continue}ce=R;continue}if(R<56320){(k-=3)>-1&&he.push(239,191,189),ce=R;continue}R=(ce-55296<<10|R-56320)+65536}else ce&&(k-=3)>-1&&he.push(239,191,189);if(ce=null,R<128){if((k-=1)<0)break;he.push(R)}else if(R<2048){if((k-=2)<0)break;he.push(R>>6|192,R&63|128)}else if(R<65536){if((k-=3)<0)break;he.push(R>>12|224,R>>6&63|128,R&63|128)}else if(R<1114112){if((k-=4)<0)break;he.push(R>>18|240,R>>12&63|128,R>>6&63|128,R&63|128)}else throw new Error("Invalid code point")}return he}function J(S){const k=[];for(let R=0;R<S.length;++R)k.push(S.charCodeAt(R)&255);return k}function ge(S,k){let R,Z,ce;const he=[];for(let ke=0;ke<S.length&&!((k-=2)<0);++ke)R=S.charCodeAt(ke),Z=R>>8,ce=R%256,he.push(ce),he.push(Z);return he}function Pe(S){return e.toByteArray(Ae(S))}function Ve(S,k,R,Z){let ce;for(ce=0;ce<Z&&!(ce+R>=k.length||ce>=S.length);++ce)k[ce+R]=S[ce];return ce}function se(S,k){return S instanceof k||S!=null&&S.constructor!=null&&S.constructor.name!=null&&S.constructor.name===k.name}function ae(S){return S!==S}const f=function(){const S="0123456789abcdef",k=new Array(256);for(let R=0;R<16;++R){const Z=R*16;for(let ce=0;ce<16;++ce)k[Z+ce]=S[R]+S[ce]}return k}();function b(S){return typeof BigInt>"u"?_:S}function _(){throw new Error("BigInt not supported")}})(RI);const el=RI.Buffer;var Vv={GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_06ad2afc-790d-484e-b802-85a42fd5cea9",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"pnpm/10.24.0 npm/? node/v24.11.1 linux x64",CI:"true",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_06ad2afc-790d-484e-b802-85a42fd5cea9",PIPX_HOME:"/opt/pipx",RUNNER_ENVIRONMENT:"github-hosted",npm_node_execpath:"/opt/hostedtoolcache/node/24.11.1/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",NODE_AUTH_TOKEN:"XXXXX-XXXXX-XXXXX-XXXXX",SHLVL:"1",HOME:"/home/runner",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",RUNNER_TEMP:"/home/runner/work/_temp",npm_package_json:"/home/runner/work/passport/passport/packages/passport-evm/package.json",GITHUB_REPOSITORY_OWNER:"credenza-web3",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",npm_package_engines_node:">=20.10.0",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/29.0.14206865",GITHUB_RETENTION_DAYS:"90",GRADLE_HOME:"/usr/share/gradle-9.2.1",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",GITHUB_REPOSITORY_OWNER_ID:"93208388",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",npm_config__credenza3_registry:"https://registry.npmjs.org/",npm_config_userconfig:"/home/runner/work/_temp/.npmrc",SYSTEMD_EXEC_PID:"1767",npm_config_engine_strict:"true",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",JAVA_HOME_25_X64:"/usr/lib/jvm/temurin-25-jdk-amd64",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",ImageVersion:"20251126.144.1",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",LOGNAME:"runner",RUNNER_OS:"Linux",SWIFT_PATH:"/usr/share/swift/usr/bin",pnpm_config_verify_deps_before_run:"false",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GITHUB_WORKFLOW:"Publish @credenza3/passport-evm",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.12/x64",JOURNAL_STREAM:"9:13570",_:"/home/runner/setup-pnpm/node_modules/.bin/pnpm",GOROOT_1_24_X64:"/opt/hostedtoolcache/go/1.24.10/x64",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/hosted-compute-agent.service/memory.pressure",npm_config_registry:"https://registry.npmjs.org/",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",GITHUB_RUN_ID:"20022576421",GOROOT_1_25_X64:"/opt/hostedtoolcache/go/1.25.4/x64",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_BASE_REF:"",GITHUB_REF_TYPE:"branch",GITHUB_WORKFLOW_SHA:"3d4a7c7ee2bfa06e21fed3f572bbeb7c13a91720",ImageOS:"ubuntu24",ACTIONS_ID_TOKEN_REQUEST_TOKEN:"eyJhbGciOiJSUzI1NiIsImtpZCI6IjM4ODI2YjE3LTZhMzAtNWY5Yi1iMTY5LThiZWI4MjAyZjcyMyIsInR5cCI6IkpXVCIsIng1dCI6InlrTmFZNHFNX3RhNGsyVGdaT0NFWUxrY1lsQSJ9.eyJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJhYyI6Ilt7XCJTY29wZVwiOlwicmVmcy9oZWFkcy9tYWluXCIsXCJQZXJtaXNzaW9uXCI6M31dIiwiYWNzbCI6IjEwIiwiYXVkIjoidnNvOmQ5NmZlZWUwLTg5OTYtNDI2Yy1hYzBmLWY0YTQ0NzFkNWNjMyIsImJpbGxpbmdfb3duZXJfaWQiOiJPX2tnRE9CWTRfUkEiLCJleHAiOjE3NjUyMDcwNjMsImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vd3MvMjAwOC8wNi9pZGVudGl0eS9jbGFpbXMvcHJpbWFyeXNpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL3NpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsImlhdCI6MTc2NTE4NDg2MywiaXNzIjoiaHR0cHM6Ly90b2tlbi5hY3Rpb25zLmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImpvYl9pZCI6ImNkOWEyYzkyLTU1YmItNWRjMi04ZDQ1LWY5NzNjZDIyZDc3NyIsIm5hbWVpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsIm5iZiI6MTc2NTE4NDU2Mywib2lkY19leHRyYSI6IntcImFjdG9yXCI6XCJtaWtlYXZ2YWRcIixcImFjdG9yX2lkXCI6XCI4NzI5OTMxNVwiLFwiYmFzZV9yZWZcIjpcIlwiLFwiY2hlY2tfcnVuX2lkXCI6XCI1NzQxMjU4NTQ4NFwiLFwiZXZlbnRfbmFtZVwiOlwicHVzaFwiLFwiaGVhZF9yZWZcIjpcIlwiLFwiam9iX3dvcmtmbG93X3JlZlwiOlwiY3JlZGVuemEtd2ViMy9wYXNzcG9ydC8uZ2l0aHViL3dvcmtmbG93cy9wdWJsaXNoX2V2bS55bWxAcmVmcy9oZWFkcy9tYWluXCIsXCJqb2Jfd29ya2Zsb3dfc2hhXCI6XCIzZDRhN2M3ZWUyYmZhMDZlMjFmZWQzZjU3MmJiZWI3YzEzYTkxNzIwXCIsXCJyZWZcIjpcInJlZnMvaGVhZHMvbWFpblwiLFwicmVmX3Byb3RlY3RlZFwiOlwiZmFsc2VcIixcInJlZl90eXBlXCI6XCJicmFuY2hcIixcInJlcG9zaXRvcnlcIjpcImNyZWRlbnphLXdlYjMvcGFzc3BvcnRcIixcInJlcG9zaXRvcnlfaWRcIjpcIjQ5MzE1NTgxNFwiLFwicmVwb3NpdG9yeV9vd25lclwiOlwiY3JlZGVuemEtd2ViM1wiLFwicmVwb3NpdG9yeV9vd25lcl9pZFwiOlwiOTMyMDgzODhcIixcInJlcG9zaXRvcnlfdmlzaWJpbGl0eVwiOlwicHJpdmF0ZVwiLFwicnVuX2F0dGVtcHRcIjpcIjFcIixcInJ1bl9pZFwiOlwiMjAwMjI1NzY0MjFcIixcInJ1bl9udW1iZXJcIjpcIjlcIixcInJ1bm5lcl9lbnZpcm9ubWVudFwiOlwiZ2l0aHViLWhvc3RlZFwiLFwic2hhXCI6XCIzZDRhN2M3ZWUyYmZhMDZlMjFmZWQzZjU3MmJiZWI3YzEzYTkxNzIwXCIsXCJ3b3JrZmxvd1wiOlwiUHVibGlzaCBAY3JlZGVuemEzL3Bhc3Nwb3J0LWV2bVwiLFwid29ya2Zsb3dfcmVmXCI6XCJjcmVkZW56YS13ZWIzL3Bhc3Nwb3J0Ly5naXRodWIvd29ya2Zsb3dzL3B1Ymxpc2hfZXZtLnltbEByZWZzL2hlYWRzL21haW5cIixcIndvcmtmbG93X3NoYVwiOlwiM2Q0YTdjN2VlMmJmYTA2ZTIxZmVkM2Y1NzJiYmViN2MxM2E5MTcyMFwifSIsIm9pZGNfc3ViIjoicmVwbzpjcmVkZW56YS13ZWIzL3Bhc3Nwb3J0OnJlZjpyZWZzL2hlYWRzL21haW4iLCJvcmNoX2lkIjoiMjMyY2ZmOGItNTc3Zi00MmY5LTlmYWItZGY4OTljYzBjNmJkLnB1Ymxpc2gtZ3ByLl8yNCIsIm93bmVyX2lkIjoiT19rZ0RPQlk0X1JBIiwicGxhbl9pZCI6IjIzMmNmZjhiLTU3N2YtNDJmOS05ZmFiLWRmODk5Y2MwYzZiZCIsInJlcG9zaXRvcnlfaWQiOiI0OTMxNTU4MTQiLCJydW5faWQiOiIyMDAyMjU3NjQyMSIsInJ1bl9udW1iZXIiOiI5IiwicnVuX3R5cGUiOiJmdWxsIiwicnVubmVyX2lkIjoiMTAwMDAwMDgxMiIsInJ1bm5lcl90eXBlIjoiaG9zdGVkIiwic2NwIjoiQWN0aW9ucy5SZXN1bHRzOjIzMmNmZjhiLTU3N2YtNDJmOS05ZmFiLWRmODk5Y2MwYzZiZDpjZDlhMmM5Mi01NWJiLTVkYzItOGQ0NS1mOTczY2QyMmQ3NzcgQWN0aW9ucy5SdW5uZXI6MjMyY2ZmOGItNTc3Zi00MmY5LTlmYWItZGY4OTljYzBjNmJkOmNkOWEyYzkyLTU1YmItNWRjMi04ZDQ1LWY5NzNjZDIyZDc3NyBBY3Rpb25zLlVwbG9hZEFydGlmYWN0czoyMzJjZmY4Yi01NzdmLTQyZjktOWZhYi1kZjg5OWNjMGM2YmQ6Y2Q5YTJjOTItNTViYi01ZGMyLThkNDUtZjk3M2NkMjJkNzc3IGdlbmVyYXRlX2lkX3Rva2VuOjIzMmNmZjhiLTU3N2YtNDJmOS05ZmFiLWRmODk5Y2MwYzZiZDpjZDlhMmM5Mi01NWJiLTVkYzItOGQ0NS1mOTczY2QyMmQ3NzcgQWN0aW9ucy5HZW5lcmljUmVhZDowMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJzaGEiOiIzZDRhN2M3ZWUyYmZhMDZlMjFmZWQzZjU3MmJiZWI3YzEzYTkxNzIwIiwidHJ1c3RfdGllciI6IjIifQ.13u6CCZ4mSOzRj-f6Ksq75SBbzZTXh_1pUjQQYzunwxcHeBRgBmp4enW3eKqvdsDUiR51zA7aLX3RRZyqyrEjvIMiLLfkeJsahc4sXmv9xIIouSBp8qC_S5cr-hwSr-QDX4X3A0zhVgXtZmBASwmSFPeQUvcxb0d2M4M7hD1rY_mbQEJVR8BiaGgq3mRhz5D_iUJPHu2Uk3NrjD9pmBgNt_qT3dD-oGavEafhgozr399tj6EDgkSwflFoGrr-u8LoAFOtHfpwZwpXzD3ScUtnn3LtG8y4R2LpRzLD25_lnNMo-uoAzUszFgynbTa6pWNlAApCFWskaB0KH4LTiySWA",ENABLE_RUNNER_TRACING:"true",GITHUB_ACTION_REPOSITORY:"",GITHUB_WORKFLOW_REF:"credenza-web3/passport/.github/workflows/publish_evm.yml@refs/heads/main",npm_config_node_gyp:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/passport/passport/packages/passport-evm/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/passport/passport/node_modules/.bin:/home/runner/work/passport/passport/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/passport/passport/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/24.11.1/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",INVOCATION_ID:"21ddac2496194361abe0ce5313fa7726",NODE:"/opt/hostedtoolcache/node/24.11.1/x64/bin/node",NPM_CONFIG_USERCONFIG:"/home/runner/work/_temp/.npmrc",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",RUNNER_TRACKING_ID:"github_bf8760f3-7547-41c6-99c2-7d7c966408ef",TURBO_HASH:"66586255ea4f3545",npm_package_name:"@credenza3/passport-evm",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",GITHUB_ACTION:"__run_2",GITHUB_RUN_NUMBER:"9",GITHUB_TRIGGERING_ACTOR:"mikeavvad",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",npm_config_frozen_lockfile:"",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"credenza-web3/passport",RUNNER_NAME:"GitHub Actions 1000000812",XDG_CONFIG_HOME:"/home/runner/.config",npm_lifecycle_script:"vite build",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.3.13750724",DEBIAN_FRONTEND:"noninteractive",GITHUB_ACTION_REF:"",GITHUB_ACTIONS:"true",GITHUB_REPOSITORY_ID:"493155814",NODE_PATH:"/home/runner/work/passport/passport/node_modules/.pnpm/vite@7.1.3_@types+node@24.3.0_jiti@2.4.2_lightningcss@1.29.1_sass@1.91.0_yaml@2.8.1/node_modules/vite/bin/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/vite@7.1.3_@types+node@24.3.0_jiti@2.4.2_lightningcss@1.29.1_sass@1.91.0_yaml@2.8.1/node_modules/vite/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/vite@7.1.3_@types+node@24.3.0_jiti@2.4.2_lightningcss@1.29.1_sass@1.91.0_yaml@2.8.1/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/turbo@1.13.3/node_modules/turbo/bin/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/turbo@1.13.3/node_modules/turbo/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/turbo@1.13.3/node_modules:/home/runner/work/passport/passport/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules",SHELL:"/bin/bash",npm_package_version:"0.3.10",npm_config_verify_deps_before_run:"false",npm_lifecycle_event:"build",GITHUB_REF_PROTECTED:"false",ACCEPT_EULA:"Y",GITHUB_JOB:"publish-gpr",GITHUB_WORKSPACE:"/home/runner/work/passport/passport",TURBO_INVOCATION_DIR:"/home/runner/work/passport/passport",npm_package_engines_pnpm:">=9",npm_config_npm_globalconfig:"/opt/hostedtoolcache/node/24.11.1/x64/etc/npmrc",GITHUB_RUN_ATTEMPT:"1",GITHUB_SHA:"3d4a7c7ee2bfa06e21fed3f572bbeb7c13a91720",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",GITHUB_ACTOR:"mikeavvad",GITHUB_REF:"refs/heads/main",npm_config_globalconfig:"/home/runner/.config/pnpm/rc",GITHUB_ACTOR_ID:"87299315",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_06ad2afc-790d-484e-b802-85a42fd5cea9",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/passport/passport/packages/passport-evm",RUNNER_WORKSPACE:"/home/runner/work/passport",npm_execpath:"/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@10.24.0/node_modules/pnpm/bin/pnpm.cjs",ACTIONS_ID_TOKEN_REQUEST_URL:"https://run-actions-2-azure-eastus.actions.githubusercontent.com/12//idtoken/232cff8b-577f-42f9-9fab-df899cc0c6bd/cd9a2c92-55bb-5dc2-8d45-f973cd22d777?api-version=2.0",ANDROID_HOME:"/usr/local/lib/android/sdk",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_EVENT_NAME:"push",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_06ad2afc-790d-484e-b802-85a42fd5cea9",GITHUB_SERVER_URL:"https://github.com",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",HOMEBREW_NO_AUTO_UPDATE:"1",EDGEWEBDRIVER:"/usr/local/share/edge_driver",PNPM_SCRIPT_SRC_DIR:"/home/runner/work/passport/passport/packages/passport-evm",npm_config__jsr_registry:"https://npm.jsr.io/",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.3.13750724",CHROME_BIN:"/usr/bin/google-chrome",SGX_AESM_ADDR:"1",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",PNPM_HOME:"/home/runner/setup-pnpm/node_modules/.bin",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.3.13750724",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_06ad2afc-790d-484e-b802-85a42fd5cea9",INIT_CWD:"/home/runner/work/passport/passport/packages/passport-evm",NODE_ENV:"production"},tt;if(typeof window>"u"){var NI={hostname:""};tt={crypto:{randomUUID:function(){throw Error("unsupported")}},navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:NI,referrer:""},screen:{width:0,height:0},location:NI,addEventListener:function(){},removeEventListener:function(){}}}else tt=window;function xI(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function II(t,e,r,n,s,i,o){try{var a=t[i](o),c=a.value}catch(l){r(l);return}a.done?e(c):Promise.resolve(c).then(n,s)}function uk(t){return function(){var e=this,r=arguments;return new Promise(function(n,s){var i=t.apply(e,r);function o(c){II(i,n,s,o,a,"next",c)}function a(c){II(i,n,s,o,a,"throw",c)}o(void 0)})}}function Dv(t,e,r){return OI()?Dv=Reflect.construct:Dv=function(s,i,o){var a=[null];a.push.apply(a,i);var c=Function.bind.apply(s,a),l=new c;return o&&Mm(l,o.prototype),l},Dv.apply(null,arguments)}function qY(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Pn(t,e,r){return e&&qY(t.prototype,e),t}function er(){return er=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},er.apply(this,arguments)}function hk(t){return hk=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},hk(t)}function jn(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Mm(t,e)}function Rt(t,e){return e!=null&&typeof Symbol<"u"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function XY(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Bm(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,i;for(i=0;i<n.length;i++)s=n[i],!(e.indexOf(s)>=0)&&(r[s]=t[s]);return r}function Mm(t,e){return Mm=Object.setPrototypeOf||function(n,s){return n.__proto__=s,n},Mm(t,e)}function Vt(t){"@swc/helpers - typeof";return t&&typeof Symbol<"u"&&t.constructor===Symbol?"symbol":typeof t}function eK(t,e){if(t){if(typeof t=="string")return xI(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xI(t,e)}}function Wv(t){var e=typeof Map=="function"?new Map:void 0;return Wv=function(n){if(n===null||!XY(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(n))return e.get(n);e.set(n,s)}function s(){return Dv(n,arguments,hk(this).constructor)}return s.prototype=Object.create(n.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),Mm(s,n)},Wv(t)}function OI(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(OI=function(){return!!t})()}function dt(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=eK(t))||e){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Um(t,e){var r,n,s,i,o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(s=l[0]&2?n.return:l[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,l[1])).done)return s;switch(n=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,n=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(s=o.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){o=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){o.label=l[1];break}if(l[0]===6&&o.label<s[1]){o.label=s[1],s=l;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(l);break}s[2]&&o.ops.pop(),o.trys.pop();continue}l=e.call(t,o)}catch(u){l=[6,u],n=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function BI(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}var tK=Object.defineProperty,rK=function(t,e,r){return e in t?tK(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},et=function(t,e,r){return rK(t,(typeof e>"u"?"undefined":Vt(e))!=="symbol"?e+"":e,r)},MI,nK=Object.defineProperty,sK=function(t,e,r){return e in t?nK(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r},UI=function(t,e,r){return sK(t,(typeof e>"u"?"undefined":Vt(e))!=="symbol"?e+"":e,r)},ln=function(t){return t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t}(ln||{}),LI={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},FI={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},jv={},iK=function(){return!!globalThis.Zone};function dk(t){if(jv[t])return jv[t];var e=globalThis[t],r=e.prototype,n=t in LI?LI[t]:void 0,s=!!(n&&n.every(function(u){var d,h;return!!((h=(d=Object.getOwnPropertyDescriptor(r,u))==null?void 0:d.get)!=null&&h.toString().includes("[native code]"))})),i=t in FI?FI[t]:void 0,o=!!(i&&i.every(function(u){var d;return typeof r[u]=="function"&&((d=r[u])==null?void 0:d.toString().includes("[native code]"))}));if(s&&o&&!iK())return jv[t]=e.prototype,e.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var c=a.contentWindow;if(!c)return e.prototype;var l=c[t].prototype;return document.body.removeChild(a),l?jv[t]=l:r}catch{return r}}var fk={};function tl(t,e,r){var n,s=t+"."+String(r);if(fk[s])return fk[s].call(e);var i=dk(t),o=(n=Object.getOwnPropertyDescriptor(i,r))==null?void 0:n.get;return o?(fk[s]=o,o.call(e)):e[r]}var pk={};function VI(t,e,r){var n=t+"."+String(r);if(pk[n])return pk[n].bind(e);var s=dk(t),i=s[r];return typeof i!="function"?e[r]:(pk[n]=i,i.bind(e))}function oK(t){return tl("Node",t,"childNodes")}function aK(t){return tl("Node",t,"parentNode")}function cK(t){return tl("Node",t,"parentElement")}function lK(t){return tl("Node",t,"textContent")}function uK(t,e){return VI("Node",t,"contains")(e)}function hK(t){return VI("Node",t,"getRootNode")()}function dK(t){return!t||!("host"in t)?null:tl("ShadowRoot",t,"host")}function fK(t){return t.styleSheets}function pK(t){return!t||!("shadowRoot"in t)?null:tl("Element",t,"shadowRoot")}function gK(t,e){return tl("Element",t,"querySelector")(e)}function mK(t,e){return tl("Element",t,"querySelectorAll")(e)}function yK(){return dk("MutationObserver").constructor}function vK(t,e,r){try{if(!(e in t))return function(){};var n=t[e],s=r(n);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:n}})),t[e]=s,function(){t[e]=n}}catch{return function(){}}}var Gn={childNodes:oK,parentNode:aK,parentElement:cK,textContent:lK,contains:uK,getRootNode:hK,host:dK,styleSheets:fK,shadowRoot:pK,querySelector:gK,querySelectorAll:mK,mutationObserver:yK,patch:vK};function DI(t){return t.nodeType===t.ELEMENT_NODE}function Lm(t){var e=t&&"host"in t&&"mode"in t&&Gn.host(t)||null;return!!(e&&"shadowRoot"in e&&Gn.shadowRoot(e)===t)}function Fm(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function bK(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function wK(t){var e=t.cssText;if(e.split('"').length<3)return e;var r=["@import","url("+JSON.stringify(t.href)+")"];return t.layerName===""?r.push("layer"):t.layerName&&r.push("layer("+t.layerName+")"),t.supportsText&&r.push("supports("+t.supportsText+")"),t.media.length&&r.push(t.media.mediaText),r.join(" ")+";"}function gk(t){try{var e=t.rules||t.cssRules;if(!e)return null;var r=t.href;!r&&t.ownerNode&&t.ownerNode.ownerDocument&&(r=t.ownerNode.ownerDocument.location.href);var n=Array.from(e,function(s){return WI(s,r)}).join("");return bK(n)}catch{return null}}function WI(t,e){if(EK(t)){var r;try{r=gk(t.styleSheet)||wK(t)}catch{r=t.cssText}return t.styleSheet.href?$v(r,t.styleSheet.href):r}else{var n=t.cssText;return AK(t)&&t.selectorText.includes(":")&&(n=kK(n)),e?$v(n,e):n}}function kK(t){var e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function EK(t){return"styleSheet"in t}function AK(t){return"selectorText"in t}var jI=function(){function t(){UI(this,"idNodeMap",new Map),UI(this,"nodeMetaMap",new WeakMap)}var e=t.prototype;return e.getId=function(n){var s;if(!n)return-1;var i=(s=this.getMeta(n))==null?void 0:s.id;return i??-1},e.getNode=function(n){return this.idNodeMap.get(n)||null},e.getIds=function(){return Array.from(this.idNodeMap.keys())},e.getMeta=function(n){return this.nodeMetaMap.get(n)||null},e.removeNodeFromMap=function(n){var s=this,i=this.getId(n);this.idNodeMap.delete(i),n.childNodes&&n.childNodes.forEach(function(o){return s.removeNodeFromMap(o)})},e.has=function(n){return this.idNodeMap.has(n)},e.hasNode=function(n){return this.nodeMetaMap.has(n)},e.add=function(n,s){var i=s.id;this.idNodeMap.set(i,n),this.nodeMetaMap.set(n,s)},e.replace=function(n,s){var i=this.getNode(n);if(i){var o=this.nodeMetaMap.get(i);o&&this.nodeMetaMap.set(s,o)}this.idNodeMap.set(n,s)},e.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},t}();function _K(){return new jI}function Gv(t){var e=t.element,r=t.maskInputOptions,n=t.tagName,s=t.type,i=t.value,o=t.maskInputFn,a=i||"",c=s&&oh(s);return(r[n.toLowerCase()]||c&&r[c])&&(o?a=o(a,e):a="*".repeat(a.length)),a}function oh(t){return t.toLowerCase()}var GI="__rrweb_original__";function TK(t){var e=t.getContext("2d");if(!e)return!0;for(var r=50,n=0;n<t.width;n+=r)for(var s=0;s<t.height;s+=r){var i=e.getImageData,o=GI in i?i[GI]:i,a=new Uint32Array(o.call(e,n,s,Math.min(r,t.width-n),Math.min(r,t.height-s)).data.buffer);if(a.some(function(c){return c!==0}))return!1}return!0}function zv(t){var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?oh(e):null}function zI(t,e){var r;try{r=new URL(t,e??window.location.href)}catch{return null}var n=/\.([0-9a-z]+)(?:$)/i,s=r.pathname.match(n),i;return(i=s?.[1])!=null?i:null}function CK(t){var e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}var SK=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,RK=/^(?:[a-z+]+:)?\/\//i,PK=/^www\..*/i,NK=/^(data:)([^,]*),(.*)/i;function $v(t,e){return(t||"").replace(SK,function(r,n,s,i,o,a){var c=s||o||a,l=n||i||"";if(!c)return r;if(RK.test(c)||PK.test(c)||NK.test(c))return"url("+l+c+l+")";if(c[0]==="/")return"url("+l+(CK(e)+c)+l+")";var u=e.split("/"),d=c.split("/");u.pop();for(var h=dt(d),p;!(p=h()).done;){var g=p.value;g!=="."&&(g===".."?u.pop():u.push(g))}return"url("+l+u.join("/")+l+")"})}function Hv(t,e){return e===void 0&&(e=!1),e?t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):t.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function xK(t,e,r){r===void 0&&(r=!1);var n=Array.from(e.childNodes),s=[],i=0;if(n.length>1&&t&&typeof t=="string"){for(var o=Hv(t,r),a=o.length/t.length,c=1;c<n.length;c++)if(n[c].textContent&&typeof n[c].textContent=="string"){for(var l=Hv(n[c].textContent,r),u=100,d=3;d<l.length&&(l[d].match(/[a-zA-Z0-9]/)||l.indexOf(l.substring(0,d),1)!==-1);d++);for(;d<l.length;d++){var h=l.substring(0,d),p=o.split(h),g=-1;if(p.length===2)g=p[0].length;else if(p.length>2&&p[0]===""&&n[c-1].textContent!=="")g=o.indexOf(h,1);else if(p.length===1){if(h=h.substring(0,h.length-1),p=o.split(h),p.length<=1)return s.push(t),s;d=u+1}else d===l.length-1&&(g=o.indexOf(h));if(p.length>=2&&d>u){var m=n[c-1].textContent;if(m&&typeof m=="string"){var y=Hv(m).length;g=o.indexOf(h,y)}g===-1&&(g=p[0].length)}if(g!==-1){for(var v=Math.floor(g/a);v>0&&v<t.length;){if(i+=1,i>50*n.length)return s.push(t),s;var A=Hv(t.substring(0,v),r);if(A.length===g){s.push(t.substring(0,v)),t=t.substring(v),o=o.substring(g);break}else A.length<g?v+=Math.max(1,Math.floor((g-A.length)/a)):v-=Math.max(1,Math.floor((A.length-g)*a))}break}}}}return s.push(t),s}function IK(t,e){return xK(t,e).join("/* rr_split */")}var OK=1,BK=new RegExp("[^a-z0-9-_:]"),Vm=-2;function $I(){return OK++}function MK(t){if(Rt(t,HTMLFormElement))return"form";var e=oh(t.tagName);return BK.test(e)?"div":e}var wf,HI,UK=/^[^ \t\n\r\u000c]+/,LK=/^[, \t\n\r\u000c]+/;function FK(t,e){if(e.trim()==="")return e;var r=0;function n(l){var u,d=l.exec(e.substring(r));return d?(u=d[0],r+=u.length,u):""}for(var s=[];n(LK),!(r>=e.length);){var i=n(UK);if(i.slice(-1)===",")i=kf(t,i.substring(0,i.length-1)),s.push(i);else{var o="";i=kf(t,i);for(var a=!1;;){var c=e.charAt(r);if(c===""){s.push((i+o).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){r+=1,s.push((i+o).trim());break}else c==="("&&(a=!0);o+=c,r+=1}}}return s.join(", ")}var ZI=new WeakMap;function kf(t,e){return!e||e.trim()===""?e:mk(t,e)}function VK(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function mk(t,e){var r=ZI.get(t);if(r||(r=t.createElement("a"),ZI.set(t,r)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return r.setAttribute("href",e),r.href}function JI(t,e,r,n){return n&&(r==="src"||r==="href"&&!(e==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&(e==="table"||e==="td"||e==="th")?kf(t,n):r==="srcset"?FK(t,n):r==="style"?$v(n,mk(t)):e==="object"&&r==="data"?kf(t,n):n)}function QI(t,e,r){return(t==="video"||t==="audio")&&e==="autoplay"}function DK(t,e,r){try{if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(var n=t.classList.length;n--;){var s=t.classList[n];if(e.test(s))return!0}if(r)return t.matches(r)}catch{}return!1}function Zv(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return r?Zv(Gn.parentNode(t),e,r):!1;for(var n=t.classList.length;n--;){var s=t.classList[n];if(e.test(s))return!0}return r?Zv(Gn.parentNode(t),e,r):!1}function YI(t,e,r,n){var s;if(DI(t)){if(s=t,!Gn.childNodes(s).length)return!1}else{if(Gn.parentElement(t)===null)return!1;s=Gn.parentElement(t)}try{if(typeof e=="string"){if(n){if(s.closest("."+e))return!0}else if(s.classList.contains(e))return!0}else if(Zv(s,e,n))return!0;if(r){if(n){if(s.closest(r))return!0}else if(s.matches(r))return!0}}catch{}return!1}function WK(t,e,r){var n=t.contentWindow;if(n){var s=!1,i;try{i=n.document.readyState}catch{return}if(i!=="complete"){var o=setTimeout(function(){s||(e(),s=!0)},r);t.addEventListener("load",function(){clearTimeout(o),s=!0,e()});return}var a="about:blank";if(n.location.href!==a||t.src===a||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}}function jK(t,e,r){var n=!1,s;try{s=t.sheet}catch{return}if(!s){var i=setTimeout(function(){n||(e(),n=!0)},r);t.addEventListener("load",function(){clearTimeout(i),n=!0,e()})}}function GK(t,e){var r=e.doc,n=e.mirror,s=e.blockClass,i=e.blockSelector,o=e.needsMask,a=e.inlineStylesheet,c=e.maskInputOptions,l=c===void 0?{}:c,u=e.maskTextFn,d=e.maskInputFn,h=e.dataURLOptions,p=h===void 0?{}:h,g=e.inlineImages,m=e.recordCanvas,y=e.keepIframeSrcFn,v=e.newlyAddedElement,A=v===void 0?!1:v,E=e.cssCaptured,w=E===void 0?!1:E,C=zK(r,n);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:ln.Document,childNodes:[],compatMode:t.compatMode}:{type:ln.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:ln.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:C};case t.ELEMENT_NODE:return HK(t,{doc:r,blockClass:s,blockSelector:i,inlineStylesheet:a,maskInputOptions:l,maskInputFn:d,dataURLOptions:p,inlineImages:g,recordCanvas:m,keepIframeSrcFn:y,newlyAddedElement:A,rootId:C});case t.TEXT_NODE:return $K(t,{doc:r,needsMask:o,maskTextFn:u,rootId:C,cssCaptured:w});case t.CDATA_SECTION_NODE:return{type:ln.CDATA,textContent:"",rootId:C};case t.COMMENT_NODE:return{type:ln.Comment,textContent:Gn.textContent(t)||"",rootId:C};default:return!1}}function zK(t,e){if(e.hasNode(t)){var r=e.getId(t);return r===1?void 0:r}}function $K(t,e){var r=e.needsMask,n=e.maskTextFn,s=e.rootId,i=e.cssCaptured,o=Gn.parentNode(t),a=o&&o.tagName,c="",l=a==="STYLE"?!0:void 0,u=a==="SCRIPT"?!0:void 0;return u?c="SCRIPT_PLACEHOLDER":i||(c=Gn.textContent(t),l&&c&&(c=$v(c,mk(e.doc)))),!l&&!u&&c&&r&&(c=n?n(c,Gn.parentElement(t)):c.replace(/[\S]/g,"*")),{type:ln.Text,textContent:c||"",rootId:s}}function HK(t,e){for(var r=e.doc,n=e.blockClass,s=e.blockSelector,i=e.inlineStylesheet,o=e.maskInputOptions,a=o===void 0?{}:o,c=e.maskInputFn,l=e.dataURLOptions,u=l===void 0?{}:l,d=e.inlineImages,h=e.recordCanvas,p=e.keepIframeSrcFn,g=e.newlyAddedElement,m=g===void 0?!1:g,y=e.rootId,v=DK(t,n,s),A=MK(t),E={},w=t.attributes.length,C=0;C<w;C++){var B=t.attributes[C];QI(A,B.name,B.value)||(E[B.name]=JI(r,A,oh(B.name),B.value))}if(A==="link"&&i){var L=Array.from(r.styleSheets).find(function(ye){return ye.href===t.href}),I=null;L&&(I=gk(L)),I&&(delete E.rel,delete E.href,E._cssText=I)}if(A==="style"&&t.sheet){var M=gk(t.sheet);M&&(t.childNodes.length>1&&(M=IK(M,t)),E._cssText=M)}if(A==="input"||A==="textarea"||A==="select"){var W=t.value,U=t.checked;E.type!=="radio"&&E.type!=="checkbox"&&E.type!=="submit"&&E.type!=="button"&&W?E.value=Gv({element:t,type:zv(t),tagName:A,value:W,maskInputOptions:a,maskInputFn:c}):U&&(E.checked=U)}if(A==="option"&&(t.selected&&!a.select?E.selected=!0:delete E.selected),A==="dialog"&&t.open&&(E.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"),A==="canvas"&&h){if(t.__context==="2d")TK(t)||(E.rr_dataURL=t.toDataURL(u.type,u.quality));else if(!("__context"in t)){var x=t.toDataURL(u.type,u.quality),P=r.createElement("canvas");P.width=t.width,P.height=t.height;var F=P.toDataURL(u.type,u.quality);x!==F&&(E.rr_dataURL=x)}}if(A==="img"&&d){wf||(wf=r.createElement("canvas"),HI=wf.getContext("2d"));var O=t,j=O.currentSrc||O.getAttribute("src")||"<unknown-src>",G=O.crossOrigin,q=function(){O.removeEventListener("load",q);try{wf.width=O.naturalWidth,wf.height=O.naturalHeight,HI.drawImage(O,0,0),E.rr_dataURL=wf.toDataURL(u.type,u.quality)}catch(ye){if(O.crossOrigin!=="anonymous"){O.crossOrigin="anonymous",O.complete&&O.naturalWidth!==0?q():O.addEventListener("load",q);return}else console.warn("Cannot inline img src="+j+"! Error: "+ye)}O.crossOrigin==="anonymous"&&(G?E.crossOrigin=G:O.removeAttribute("crossorigin"))};O.complete&&O.naturalWidth!==0?q():O.addEventListener("load",q)}if(A==="audio"||A==="video"){var H=E;H.rr_mediaState=t.paused?"paused":"played",H.rr_mediaCurrentTime=t.currentTime,H.rr_mediaPlaybackRate=t.playbackRate,H.rr_mediaMuted=t.muted,H.rr_mediaLoop=t.loop,H.rr_mediaVolume=t.volume}if(m||(t.scrollLeft&&(E.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(E.rr_scrollTop=t.scrollTop)),v){var Y=t.getBoundingClientRect(),K=Y.width,te=Y.height;E={class:E.class,rr_width:""+K+"px",rr_height:""+te+"px"}}A==="iframe"&&!p(E.src)&&(t.contentDocument||(E.rr_src=E.src),delete E.src);var oe;try{customElements.get(A)&&(oe=!0)}catch{}return{type:ln.Element,tagName:A,attributes:E,childNodes:[],isSVG:VK(t)||void 0,needBlock:v,rootId:y,isCustom:oe}}function vr(t){return t==null?"":t.toLowerCase()}function ZK(t,e){if(e.comment&&t.type===ln.Comment)return!0;if(t.type===ln.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"&&t.attributes.as==="script"||t.attributes.rel==="modulepreload")||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&zI(t.attributes.href)==="js"))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(vr(t.attributes.name).match(/^msapplication-tile(image|color)$/)||vr(t.attributes.name)==="application-name"||vr(t.attributes.rel)==="icon"||vr(t.attributes.rel)==="apple-touch-icon"||vr(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&vr(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(vr(t.attributes.property).match(/^(og|twitter|fb):/)||vr(t.attributes.name).match(/^(og|twitter):/)||vr(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(vr(t.attributes.name)==="robots"||vr(t.attributes.name)==="googlebot"||vr(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(vr(t.attributes.name)==="author"||vr(t.attributes.name)==="generator"||vr(t.attributes.name)==="framework"||vr(t.attributes.name)==="publisher"||vr(t.attributes.name)==="progid"||vr(t.attributes.property).match(/^article:/)||vr(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(vr(t.attributes.name)==="google-site-verification"||vr(t.attributes.name)==="yandex-verification"||vr(t.attributes.name)==="csrf-token"||vr(t.attributes.name)==="p:domain_verify"||vr(t.attributes.name)==="verify-v1"||vr(t.attributes.name)==="verification"||vr(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ef(t,e){var r=e.doc,n=e.mirror,s=e.blockClass,i=e.blockSelector,o=e.maskTextClass,a=e.maskTextSelector,c=e.skipChild,l=c===void 0?!1:c,u=e.inlineStylesheet,d=u===void 0?!0:u,h=e.maskInputOptions,p=h===void 0?{}:h,g=e.maskTextFn,m=e.maskInputFn,y=e.slimDOMOptions,v=e.dataURLOptions,A=v===void 0?{}:v,E=e.inlineImages,w=E===void 0?!1:E,C=e.recordCanvas,B=C===void 0?!1:C,L=e.onSerialize,I=e.onIframeLoad,M=e.iframeLoadTimeout,W=M===void 0?5e3:M,U=e.onStylesheetLoad,x=e.stylesheetLoadTimeout,P=x===void 0?5e3:x,F=e.keepIframeSrcFn,O=F===void 0?function(){return!1}:F,j=e.newlyAddedElement,G=j===void 0?!1:j,q=e.cssCaptured,H=q===void 0?!1:q,Y=e.needsMask,K=e.preserveWhiteSpace,te=K===void 0?!0:K;if(!Y){var oe=Y===void 0;Y=YI(t,o,a,oe)}var ye=GK(t,{doc:r,mirror:n,blockClass:s,blockSelector:i,needsMask:Y,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:m,dataURLOptions:A,inlineImages:w,recordCanvas:B,keepIframeSrcFn:O,newlyAddedElement:G,cssCaptured:H});if(!ye)return console.warn(t,"not serialized"),null;var _e;n.hasNode(t)?_e=n.getId(t):ZK(ye,y)||!te&&ye.type===ln.Text&&!ye.textContent.replace(/^\s+|\s+$/gm,"").length?_e=Vm:_e=$I();var Ce=Object.assign(ye,{id:_e});if(n.add(t,Ce),_e===Vm)return null;L&&L(t);var ie=!l;if(Ce.type===ln.Element){ie=ie&&!Ce.needBlock,delete Ce.needBlock;var le=Gn.shadowRoot(t);le&&Fm(le)&&(Ce.isShadowHost=!0)}if((Ce.type===ln.Document||Ce.type===ln.Element)&&ie){y.headWhitespace&&Ce.type===ln.Element&&Ce.tagName==="head"&&(te=!1);var we={doc:r,mirror:n,blockClass:s,blockSelector:i,needsMask:Y,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:A,inlineImages:w,recordCanvas:B,preserveWhiteSpace:te,onSerialize:L,onIframeLoad:I,iframeLoadTimeout:W,onStylesheetLoad:U,stylesheetLoadTimeout:P,keepIframeSrcFn:O,cssCaptured:!1};if(!(Ce.type===ln.Element&&Ce.tagName==="textarea"&&Ce.attributes.value!==void 0)){Ce.type===ln.Element&&Ce.attributes._cssText!==void 0&&typeof Ce.attributes._cssText=="string"&&(we.cssCaptured=!0);for(var D=dt(Array.from(Gn.childNodes(t))),ue;!(ue=D()).done;){var me=ue.value,be=Ef(me,we);be&&Ce.childNodes.push(be)}}var re=null;if(DI(t)&&(re=Gn.shadowRoot(t)))for(var N=dt(Array.from(Gn.childNodes(re))),z;!(z=N()).done;){var ee=z.value,fe=Ef(ee,we);fe&&(Fm(re)&&(fe.isShadow=!0),Ce.childNodes.push(fe))}}var Ae=Gn.parentNode(t);return Ae&&Lm(Ae)&&Fm(Ae)&&(Ce.isShadow=!0),Ce.type===ln.Element&&Ce.tagName==="iframe"&&WK(t,function(){var Se=t.contentDocument;if(Se&&I){var J=Ef(Se,{doc:Se,mirror:n,blockClass:s,blockSelector:i,needsMask:Y,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:A,inlineImages:w,recordCanvas:B,preserveWhiteSpace:te,onSerialize:L,onIframeLoad:I,iframeLoadTimeout:W,onStylesheetLoad:U,stylesheetLoadTimeout:P,keepIframeSrcFn:O});J&&I(t,J)}},W),Ce.type===ln.Element&&Ce.tagName==="link"&&typeof Ce.attributes.rel=="string"&&(Ce.attributes.rel==="stylesheet"||Ce.attributes.rel==="preload"&&typeof Ce.attributes.href=="string"&&zI(Ce.attributes.href)==="css")&&jK(t,function(){if(U){var Se=Ef(t,{doc:r,mirror:n,blockClass:s,blockSelector:i,needsMask:Y,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:y,dataURLOptions:A,inlineImages:w,recordCanvas:B,preserveWhiteSpace:te,onSerialize:L,onIframeLoad:I,iframeLoadTimeout:W,onStylesheetLoad:U,stylesheetLoadTimeout:P,keepIframeSrcFn:O});Se&&U(t,Se)}},P),Ce}function JK(t,e){var r=e||{},n=r.mirror,s=n===void 0?new jI:n,i=r.blockClass,o=i===void 0?"rr-block":i,a=r.blockSelector,c=a===void 0?null:a,l=r.maskTextClass,u=l===void 0?"rr-mask":l,d=r.maskTextSelector,h=d===void 0?null:d,p=r.inlineStylesheet,g=p===void 0?!0:p,m=r.inlineImages,y=m===void 0?!1:m,v=r.recordCanvas,A=v===void 0?!1:v,E=r.maskAllInputs,w=E===void 0?!1:E,C=r.maskTextFn,B=r.maskInputFn,L=r.slimDOM,I=L===void 0?!1:L,M=r.dataURLOptions,W=r.preserveWhiteSpace,U=r.onSerialize,x=r.onIframeLoad,P=r.iframeLoadTimeout,F=r.onStylesheetLoad,O=r.stylesheetLoadTimeout,j=r.keepIframeSrcFn,G=j===void 0?function(){return!1}:j,q=w===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:w===!1?{password:!0}:w,H=I===!0||I==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:I==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:I===!1?{}:I;return Ef(t,{doc:t,mirror:s,blockClass:o,blockSelector:c,maskTextClass:u,maskTextSelector:h,skipChild:!1,inlineStylesheet:g,maskInputOptions:q,maskTextFn:C,maskInputFn:B,slimDOMOptions:H,dataURLOptions:M,inlineImages:y,recordCanvas:A,preserveWhiteSpace:W,onSerialize:U,onIframeLoad:x,iframeLoadTimeout:P,onStylesheetLoad:F,stylesheetLoadTimeout:O,keepIframeSrcFn:G,newlyAddedElement:!1})}function QK(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function YK(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return Rt(this,n)?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}),r}var yk={exports:{}},Cr=String,KI=function(){return{isColorSupported:!1,reset:Cr,bold:Cr,dim:Cr,italic:Cr,underline:Cr,inverse:Cr,hidden:Cr,strikethrough:Cr,black:Cr,red:Cr,green:Cr,yellow:Cr,blue:Cr,magenta:Cr,cyan:Cr,white:Cr,gray:Cr,bgBlack:Cr,bgRed:Cr,bgGreen:Cr,bgYellow:Cr,bgBlue:Cr,bgMagenta:Cr,bgCyan:Cr,bgWhite:Cr}};yk.exports=KI(),yk.exports.createColors=KI;var KK=yk.exports,qK={},XK=Object.freeze(Object.defineProperty({__proto__:null,default:qK},Symbol.toStringTag,{value:"Module"})),Qr=YK(XK),qI=KK,XI=Qr,vk=function(t){jn(e,t);function e(n,s,i,o,a,c){var l;return l=t.call(this,n)||this,l.name="CssSyntaxError",l.reason=n,a&&(l.file=a),o&&(l.source=o),c&&(l.plugin=c),typeof s<"u"&&typeof i<"u"&&(typeof s=="number"?(l.line=s,l.column=i):(l.line=s.line,l.column=s.column,l.endLine=i.line,l.endColumn=i.column)),l.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(l,e),l}var r=e.prototype;return r.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},r.showSourceCode=function(s){var i=this;if(!this.source)return"";var o=this.source;s==null&&(s=qI.isColorSupported),XI&&s&&(o=XI(o));var a=o.split(/\r?\n/),c=Math.max(this.line-3,0),l=Math.min(this.line+2,a.length),u=String(l).length,d,h;if(s){var p=qI.createColors(!0),g=p.bold,m=p.gray,y=p.red;d=function(v){return g(y(v))},h=function(v){return m(v)}}else d=h=function(v){return v};return a.slice(c,l).map(function(v,A){var E=c+1+A,w=" "+(" "+E).slice(-u)+" | ";if(E===i.line){var C=h(w.replace(/\d/g," "))+v.slice(0,i.column-1).replace(/[^\t]/g," ");return d(">")+h(w)+v+`
|
|
569
569
|
`+C+d("^")}return" "+h(w)+v}).join(`
|
|
570
570
|
`)},r.toString=function(){var s=this.showSourceCode();return s&&(s=`
|
|
571
571
|
|
|
@@ -685,7 +685,7 @@ crtw-text-white crtw-mt-[5px] crtw-justify-center crtw-flex"><!></button>`);func
|
|
|
685
685
|
* @license MIT
|
|
686
686
|
*/(function(t){const e=Ww,r=NA,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=a,t.SlowBuffer=A,t.INSPECT_MAX_BYTES=50;const s=2147483647;t.kMaxLength=s,a.TYPED_ARRAY_SUPPORT=i(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const f=new Uint8Array(1),b={foo:function(){return 42}};return Object.setPrototypeOf(b,Uint8Array.prototype),Object.setPrototypeOf(f,b),f.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function o(f){if(f>s)throw new RangeError('The value "'+f+'" is invalid for option "size"');const b=new Uint8Array(f);return Object.setPrototypeOf(b,a.prototype),b}function a(f,b,_){if(typeof f=="number"){if(typeof b=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(f)}return c(f,b,_)}a.poolSize=8192;function c(f,b,_){if(typeof f=="string")return h(f,b);if(ArrayBuffer.isView(f))return g(f);if(f==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof f);if(ge(f,ArrayBuffer)||f&&ge(f.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ge(f,SharedArrayBuffer)||f&&ge(f.buffer,SharedArrayBuffer)))return m(f,b,_);if(typeof f=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const S=f.valueOf&&f.valueOf();if(S!=null&&S!==f)return a.from(S,b,_);const k=y(f);if(k)return k;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof f[Symbol.toPrimitive]=="function")return a.from(f[Symbol.toPrimitive]("string"),b,_);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof f)}a.from=function(f,b,_){return c(f,b,_)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function l(f){if(typeof f!="number")throw new TypeError('"size" argument must be of type number');if(f<0)throw new RangeError('The value "'+f+'" is invalid for option "size"')}function u(f,b,_){return l(f),f<=0?o(f):b!==void 0?typeof _=="string"?o(f).fill(b,_):o(f).fill(b):o(f)}a.alloc=function(f,b,_){return u(f,b,_)};function d(f){return l(f),o(f<0?0:v(f)|0)}a.allocUnsafe=function(f){return d(f)},a.allocUnsafeSlow=function(f){return d(f)};function h(f,b){if((typeof b!="string"||b==="")&&(b="utf8"),!a.isEncoding(b))throw new TypeError("Unknown encoding: "+b);const _=E(f,b)|0;let S=o(_);const k=S.write(f,b);return k!==_&&(S=S.slice(0,k)),S}function p(f){const b=f.length<0?0:v(f.length)|0,_=o(b);for(let S=0;S<b;S+=1)_[S]=f[S]&255;return _}function g(f){if(ge(f,Uint8Array)){const b=new Uint8Array(f);return m(b.buffer,b.byteOffset,b.byteLength)}return p(f)}function m(f,b,_){if(b<0||f.byteLength<b)throw new RangeError('"offset" is outside of buffer bounds');if(f.byteLength<b+(_||0))throw new RangeError('"length" is outside of buffer bounds');let S;return b===void 0&&_===void 0?S=new Uint8Array(f):_===void 0?S=new Uint8Array(f,b):S=new Uint8Array(f,b,_),Object.setPrototypeOf(S,a.prototype),S}function y(f){if(a.isBuffer(f)){const b=v(f.length)|0,_=o(b);return _.length===0||f.copy(_,0,0,b),_}if(f.length!==void 0)return typeof f.length!="number"||Pe(f.length)?o(0):p(f);if(f.type==="Buffer"&&Array.isArray(f.data))return p(f.data)}function v(f){if(f>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return f|0}function A(f){return+f!=f&&(f=0),a.alloc(+f)}a.isBuffer=function(f){return f!=null&&f._isBuffer===!0&&f!==a.prototype},a.compare=function(f,b){if(ge(f,Uint8Array)&&(f=a.from(f,f.offset,f.byteLength)),ge(b,Uint8Array)&&(b=a.from(b,b.offset,b.byteLength)),!a.isBuffer(f)||!a.isBuffer(b))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(f===b)return 0;let _=f.length,S=b.length;for(let k=0,R=Math.min(_,S);k<R;++k)if(f[k]!==b[k]){_=f[k],S=b[k];break}return _<S?-1:S<_?1:0},a.isEncoding=function(f){switch(String(f).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(f,b){if(!Array.isArray(f))throw new TypeError('"list" argument must be an Array of Buffers');if(f.length===0)return a.alloc(0);let _;if(b===void 0)for(b=0,_=0;_<f.length;++_)b+=f[_].length;const S=a.allocUnsafe(b);let k=0;for(_=0;_<f.length;++_){let R=f[_];if(ge(R,Uint8Array))k+R.length>S.length?(a.isBuffer(R)||(R=a.from(R)),R.copy(S,k)):Uint8Array.prototype.set.call(S,R,k);else if(a.isBuffer(R))R.copy(S,k);else throw new TypeError('"list" argument must be an Array of Buffers');k+=R.length}return S};function E(f,b){if(a.isBuffer(f))return f.length;if(ArrayBuffer.isView(f)||ge(f,ArrayBuffer))return f.byteLength;if(typeof f!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof f);const _=f.length,S=arguments.length>2&&arguments[2]===!0;if(!S&&_===0)return 0;let k=!1;for(;;)switch(b){case"ascii":case"latin1":case"binary":return _;case"utf8":case"utf-8":return ee(f).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _*2;case"hex":return _>>>1;case"base64":return Se(f).length;default:if(k)return S?-1:ee(f).length;b=(""+b).toLowerCase(),k=!0}}a.byteLength=E;function w(f,b,_){let S=!1;if((b===void 0||b<0)&&(b=0),b>this.length||((_===void 0||_>this.length)&&(_=this.length),_<=0)||(_>>>=0,b>>>=0,_<=b))return"";for(f||(f="utf8");;)switch(f){case"hex":return H(this,b,_);case"utf8":case"utf-8":return F(this,b,_);case"ascii":return G(this,b,_);case"latin1":case"binary":return q(this,b,_);case"base64":return P(this,b,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y(this,b,_);default:if(S)throw new TypeError("Unknown encoding: "+f);f=(f+"").toLowerCase(),S=!0}}a.prototype._isBuffer=!0;function C(f,b,_){const S=f[b];f[b]=f[_],f[_]=S}a.prototype.swap16=function(){const f=this.length;if(f%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let b=0;b<f;b+=2)C(this,b,b+1);return this},a.prototype.swap32=function(){const f=this.length;if(f%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let b=0;b<f;b+=4)C(this,b,b+3),C(this,b+1,b+2);return this},a.prototype.swap64=function(){const f=this.length;if(f%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let b=0;b<f;b+=8)C(this,b,b+7),C(this,b+1,b+6),C(this,b+2,b+5),C(this,b+3,b+4);return this},a.prototype.toString=function(){const f=this.length;return f===0?"":arguments.length===0?F(this,0,f):w.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(f){if(!a.isBuffer(f))throw new TypeError("Argument must be a Buffer");return this===f?!0:a.compare(this,f)===0},a.prototype.inspect=function(){let f="";const b=t.INSPECT_MAX_BYTES;return f=this.toString("hex",0,b).replace(/(.{2})/g,"$1 ").trim(),this.length>b&&(f+=" ... "),"<Buffer "+f+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(f,b,_,S,k){if(ge(f,Uint8Array)&&(f=a.from(f,f.offset,f.byteLength)),!a.isBuffer(f))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof f);if(b===void 0&&(b=0),_===void 0&&(_=f?f.length:0),S===void 0&&(S=0),k===void 0&&(k=this.length),b<0||_>f.length||S<0||k>this.length)throw new RangeError("out of range index");if(S>=k&&b>=_)return 0;if(S>=k)return-1;if(b>=_)return 1;if(b>>>=0,_>>>=0,S>>>=0,k>>>=0,this===f)return 0;let R=k-S,Z=_-b;const ce=Math.min(R,Z),he=this.slice(S,k),ke=f.slice(b,_);for(let Ne=0;Ne<ce;++Ne)if(he[Ne]!==ke[Ne]){R=he[Ne],Z=ke[Ne];break}return R<Z?-1:Z<R?1:0};function B(f,b,_,S,k){if(f.length===0)return-1;if(typeof _=="string"?(S=_,_=0):_>2147483647?_=2147483647:_<-2147483648&&(_=-2147483648),_=+_,Pe(_)&&(_=k?0:f.length-1),_<0&&(_=f.length+_),_>=f.length){if(k)return-1;_=f.length-1}else if(_<0)if(k)_=0;else return-1;if(typeof b=="string"&&(b=a.from(b,S)),a.isBuffer(b))return b.length===0?-1:L(f,b,_,S,k);if(typeof b=="number")return b=b&255,typeof Uint8Array.prototype.indexOf=="function"?k?Uint8Array.prototype.indexOf.call(f,b,_):Uint8Array.prototype.lastIndexOf.call(f,b,_):L(f,[b],_,S,k);throw new TypeError("val must be string, number or Buffer")}function L(f,b,_,S,k){let R=1,Z=f.length,ce=b.length;if(S!==void 0&&(S=String(S).toLowerCase(),S==="ucs2"||S==="ucs-2"||S==="utf16le"||S==="utf-16le")){if(f.length<2||b.length<2)return-1;R=2,Z/=2,ce/=2,_/=2}function he(Ne,ze){return R===1?Ne[ze]:Ne.readUInt16BE(ze*R)}let ke;if(k){let Ne=-1;for(ke=_;ke<Z;ke++)if(he(f,ke)===he(b,Ne===-1?0:ke-Ne)){if(Ne===-1&&(Ne=ke),ke-Ne+1===ce)return Ne*R}else Ne!==-1&&(ke-=ke-Ne),Ne=-1}else for(_+ce>Z&&(_=Z-ce),ke=_;ke>=0;ke--){let Ne=!0;for(let ze=0;ze<ce;ze++)if(he(f,ke+ze)!==he(b,ze)){Ne=!1;break}if(Ne)return ke}return-1}a.prototype.includes=function(f,b,_){return this.indexOf(f,b,_)!==-1},a.prototype.indexOf=function(f,b,_){return B(this,f,b,_,!0)},a.prototype.lastIndexOf=function(f,b,_){return B(this,f,b,_,!1)};function I(f,b,_,S){_=Number(_)||0;const k=f.length-_;S?(S=Number(S),S>k&&(S=k)):S=k;const R=b.length;S>R/2&&(S=R/2);let Z;for(Z=0;Z<S;++Z){const ce=parseInt(b.substr(Z*2,2),16);if(Pe(ce))return Z;f[_+Z]=ce}return Z}function M(f,b,_,S){return J(ee(b,f.length-_),f,_,S)}function W(f,b,_,S){return J(fe(b),f,_,S)}function U(f,b,_,S){return J(Se(b),f,_,S)}function x(f,b,_,S){return J(Ae(b,f.length-_),f,_,S)}a.prototype.write=function(f,b,_,S){if(b===void 0)S="utf8",_=this.length,b=0;else if(_===void 0&&typeof b=="string")S=b,_=this.length,b=0;else if(isFinite(b))b=b>>>0,isFinite(_)?(_=_>>>0,S===void 0&&(S="utf8")):(S=_,_=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const k=this.length-b;if((_===void 0||_>k)&&(_=k),f.length>0&&(_<0||b<0)||b>this.length)throw new RangeError("Attempt to write outside buffer bounds");S||(S="utf8");let R=!1;for(;;)switch(S){case"hex":return I(this,f,b,_);case"utf8":case"utf-8":return M(this,f,b,_);case"ascii":case"latin1":case"binary":return W(this,f,b,_);case"base64":return U(this,f,b,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,f,b,_);default:if(R)throw new TypeError("Unknown encoding: "+S);S=(""+S).toLowerCase(),R=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function P(f,b,_){return b===0&&_===f.length?e.fromByteArray(f):e.fromByteArray(f.slice(b,_))}function F(f,b,_){_=Math.min(f.length,_);const S=[];let k=b;for(;k<_;){const R=f[k];let Z=null,ce=R>239?4:R>223?3:R>191?2:1;if(k+ce<=_){let he,ke,Ne,ze;switch(ce){case 1:R<128&&(Z=R);break;case 2:he=f[k+1],(he&192)===128&&(ze=(R&31)<<6|he&63,ze>127&&(Z=ze));break;case 3:he=f[k+1],ke=f[k+2],(he&192)===128&&(ke&192)===128&&(ze=(R&15)<<12|(he&63)<<6|ke&63,ze>2047&&(ze<55296||ze>57343)&&(Z=ze));break;case 4:he=f[k+1],ke=f[k+2],Ne=f[k+3],(he&192)===128&&(ke&192)===128&&(Ne&192)===128&&(ze=(R&15)<<18|(he&63)<<12|(ke&63)<<6|Ne&63,ze>65535&&ze<1114112&&(Z=ze))}}Z===null?(Z=65533,ce=1):Z>65535&&(Z-=65536,S.push(Z>>>10&1023|55296),Z=56320|Z&1023),S.push(Z),k+=ce}return j(S)}const O=4096;function j(f){const b=f.length;if(b<=O)return String.fromCharCode.apply(String,f);let _="",S=0;for(;S<b;)_+=String.fromCharCode.apply(String,f.slice(S,S+=O));return _}function G(f,b,_){let S="";_=Math.min(f.length,_);for(let k=b;k<_;++k)S+=String.fromCharCode(f[k]&127);return S}function q(f,b,_){let S="";_=Math.min(f.length,_);for(let k=b;k<_;++k)S+=String.fromCharCode(f[k]);return S}function H(f,b,_){const S=f.length;(!b||b<0)&&(b=0),(!_||_<0||_>S)&&(_=S);let k="";for(let R=b;R<_;++R)k+=Ve[f[R]];return k}function Y(f,b,_){const S=f.slice(b,_);let k="";for(let R=0;R<S.length-1;R+=2)k+=String.fromCharCode(S[R]+S[R+1]*256);return k}a.prototype.slice=function(f,b){const _=this.length;f=~~f,b=b===void 0?_:~~b,f<0?(f+=_,f<0&&(f=0)):f>_&&(f=_),b<0?(b+=_,b<0&&(b=0)):b>_&&(b=_),b<f&&(b=f);const S=this.subarray(f,b);return Object.setPrototypeOf(S,a.prototype),S};function K(f,b,_){if(f%1!==0||f<0)throw new RangeError("offset is not uint");if(f+b>_)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(f,b,_){f=f>>>0,b=b>>>0,_||K(f,b,this.length);let S=this[f],k=1,R=0;for(;++R<b&&(k*=256);)S+=this[f+R]*k;return S},a.prototype.readUintBE=a.prototype.readUIntBE=function(f,b,_){f=f>>>0,b=b>>>0,_||K(f,b,this.length);let S=this[f+--b],k=1;for(;b>0&&(k*=256);)S+=this[f+--b]*k;return S},a.prototype.readUint8=a.prototype.readUInt8=function(f,b){return f=f>>>0,b||K(f,1,this.length),this[f]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(f,b){return f=f>>>0,b||K(f,2,this.length),this[f]|this[f+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(f,b){return f=f>>>0,b||K(f,2,this.length),this[f]<<8|this[f+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(f,b){return f=f>>>0,b||K(f,4,this.length),(this[f]|this[f+1]<<8|this[f+2]<<16)+this[f+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(f,b){return f=f>>>0,b||K(f,4,this.length),this[f]*16777216+(this[f+1]<<16|this[f+2]<<8|this[f+3])},a.prototype.readBigUInt64LE=se(function(f){f=f>>>0,be(f,"offset");const b=this[f],_=this[f+7];(b===void 0||_===void 0)&&re(f,this.length-8);const S=b+this[++f]*2**8+this[++f]*2**16+this[++f]*2**24,k=this[++f]+this[++f]*2**8+this[++f]*2**16+_*2**24;return BigInt(S)+(BigInt(k)<<BigInt(32))}),a.prototype.readBigUInt64BE=se(function(f){f=f>>>0,be(f,"offset");const b=this[f],_=this[f+7];(b===void 0||_===void 0)&&re(f,this.length-8);const S=b*2**24+this[++f]*2**16+this[++f]*2**8+this[++f],k=this[++f]*2**24+this[++f]*2**16+this[++f]*2**8+_;return(BigInt(S)<<BigInt(32))+BigInt(k)}),a.prototype.readIntLE=function(f,b,_){f=f>>>0,b=b>>>0,_||K(f,b,this.length);let S=this[f],k=1,R=0;for(;++R<b&&(k*=256);)S+=this[f+R]*k;return k*=128,S>=k&&(S-=Math.pow(2,8*b)),S},a.prototype.readIntBE=function(f,b,_){f=f>>>0,b=b>>>0,_||K(f,b,this.length);let S=b,k=1,R=this[f+--S];for(;S>0&&(k*=256);)R+=this[f+--S]*k;return k*=128,R>=k&&(R-=Math.pow(2,8*b)),R},a.prototype.readInt8=function(f,b){return f=f>>>0,b||K(f,1,this.length),this[f]&128?(255-this[f]+1)*-1:this[f]},a.prototype.readInt16LE=function(f,b){f=f>>>0,b||K(f,2,this.length);const _=this[f]|this[f+1]<<8;return _&32768?_|4294901760:_},a.prototype.readInt16BE=function(f,b){f=f>>>0,b||K(f,2,this.length);const _=this[f+1]|this[f]<<8;return _&32768?_|4294901760:_},a.prototype.readInt32LE=function(f,b){return f=f>>>0,b||K(f,4,this.length),this[f]|this[f+1]<<8|this[f+2]<<16|this[f+3]<<24},a.prototype.readInt32BE=function(f,b){return f=f>>>0,b||K(f,4,this.length),this[f]<<24|this[f+1]<<16|this[f+2]<<8|this[f+3]},a.prototype.readBigInt64LE=se(function(f){f=f>>>0,be(f,"offset");const b=this[f],_=this[f+7];(b===void 0||_===void 0)&&re(f,this.length-8);const S=this[f+4]+this[f+5]*2**8+this[f+6]*2**16+(_<<24);return(BigInt(S)<<BigInt(32))+BigInt(b+this[++f]*2**8+this[++f]*2**16+this[++f]*2**24)}),a.prototype.readBigInt64BE=se(function(f){f=f>>>0,be(f,"offset");const b=this[f],_=this[f+7];(b===void 0||_===void 0)&&re(f,this.length-8);const S=(b<<24)+this[++f]*2**16+this[++f]*2**8+this[++f];return(BigInt(S)<<BigInt(32))+BigInt(this[++f]*2**24+this[++f]*2**16+this[++f]*2**8+_)}),a.prototype.readFloatLE=function(f,b){return f=f>>>0,b||K(f,4,this.length),r.read(this,f,!0,23,4)},a.prototype.readFloatBE=function(f,b){return f=f>>>0,b||K(f,4,this.length),r.read(this,f,!1,23,4)},a.prototype.readDoubleLE=function(f,b){return f=f>>>0,b||K(f,8,this.length),r.read(this,f,!0,52,8)},a.prototype.readDoubleBE=function(f,b){return f=f>>>0,b||K(f,8,this.length),r.read(this,f,!1,52,8)};function te(f,b,_,S,k,R){if(!a.isBuffer(f))throw new TypeError('"buffer" argument must be a Buffer instance');if(b>k||b<R)throw new RangeError('"value" argument is out of bounds');if(_+S>f.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(f,b,_,S){if(f=+f,b=b>>>0,_=_>>>0,!S){const Z=Math.pow(2,8*_)-1;te(this,f,b,_,Z,0)}let k=1,R=0;for(this[b]=f&255;++R<_&&(k*=256);)this[b+R]=f/k&255;return b+_},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(f,b,_,S){if(f=+f,b=b>>>0,_=_>>>0,!S){const Z=Math.pow(2,8*_)-1;te(this,f,b,_,Z,0)}let k=_-1,R=1;for(this[b+k]=f&255;--k>=0&&(R*=256);)this[b+k]=f/R&255;return b+_},a.prototype.writeUint8=a.prototype.writeUInt8=function(f,b,_){return f=+f,b=b>>>0,_||te(this,f,b,1,255,0),this[b]=f&255,b+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(f,b,_){return f=+f,b=b>>>0,_||te(this,f,b,2,65535,0),this[b]=f&255,this[b+1]=f>>>8,b+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(f,b,_){return f=+f,b=b>>>0,_||te(this,f,b,2,65535,0),this[b]=f>>>8,this[b+1]=f&255,b+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(f,b,_){return f=+f,b=b>>>0,_||te(this,f,b,4,4294967295,0),this[b+3]=f>>>24,this[b+2]=f>>>16,this[b+1]=f>>>8,this[b]=f&255,b+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(f,b,_){return f=+f,b=b>>>0,_||te(this,f,b,4,4294967295,0),this[b]=f>>>24,this[b+1]=f>>>16,this[b+2]=f>>>8,this[b+3]=f&255,b+4};function oe(f,b,_,S,k){me(b,S,k,f,_,7);let R=Number(b&BigInt(4294967295));f[_++]=R,R=R>>8,f[_++]=R,R=R>>8,f[_++]=R,R=R>>8,f[_++]=R;let Z=Number(b>>BigInt(32)&BigInt(4294967295));return f[_++]=Z,Z=Z>>8,f[_++]=Z,Z=Z>>8,f[_++]=Z,Z=Z>>8,f[_++]=Z,_}function ye(f,b,_,S,k){me(b,S,k,f,_,7);let R=Number(b&BigInt(4294967295));f[_+7]=R,R=R>>8,f[_+6]=R,R=R>>8,f[_+5]=R,R=R>>8,f[_+4]=R;let Z=Number(b>>BigInt(32)&BigInt(4294967295));return f[_+3]=Z,Z=Z>>8,f[_+2]=Z,Z=Z>>8,f[_+1]=Z,Z=Z>>8,f[_]=Z,_+8}a.prototype.writeBigUInt64LE=se(function(f,b=0){return oe(this,f,b,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=se(function(f,b=0){return ye(this,f,b,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(f,b,_,S){if(f=+f,b=b>>>0,!S){const ce=Math.pow(2,8*_-1);te(this,f,b,_,ce-1,-ce)}let k=0,R=1,Z=0;for(this[b]=f&255;++k<_&&(R*=256);)f<0&&Z===0&&this[b+k-1]!==0&&(Z=1),this[b+k]=(f/R>>0)-Z&255;return b+_},a.prototype.writeIntBE=function(f,b,_,S){if(f=+f,b=b>>>0,!S){const ce=Math.pow(2,8*_-1);te(this,f,b,_,ce-1,-ce)}let k=_-1,R=1,Z=0;for(this[b+k]=f&255;--k>=0&&(R*=256);)f<0&&Z===0&&this[b+k+1]!==0&&(Z=1),this[b+k]=(f/R>>0)-Z&255;return b+_},a.prototype.writeInt8=function(f,b,_){return f=+f,b=b>>>0,_||te(this,f,b,1,127,-128),f<0&&(f=255+f+1),this[b]=f&255,b+1},a.prototype.writeInt16LE=function(f,b,_){return f=+f,b=b>>>0,_||te(this,f,b,2,32767,-32768),this[b]=f&255,this[b+1]=f>>>8,b+2},a.prototype.writeInt16BE=function(f,b,_){return f=+f,b=b>>>0,_||te(this,f,b,2,32767,-32768),this[b]=f>>>8,this[b+1]=f&255,b+2},a.prototype.writeInt32LE=function(f,b,_){return f=+f,b=b>>>0,_||te(this,f,b,4,2147483647,-2147483648),this[b]=f&255,this[b+1]=f>>>8,this[b+2]=f>>>16,this[b+3]=f>>>24,b+4},a.prototype.writeInt32BE=function(f,b,_){return f=+f,b=b>>>0,_||te(this,f,b,4,2147483647,-2147483648),f<0&&(f=4294967295+f+1),this[b]=f>>>24,this[b+1]=f>>>16,this[b+2]=f>>>8,this[b+3]=f&255,b+4},a.prototype.writeBigInt64LE=se(function(f,b=0){return oe(this,f,b,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=se(function(f,b=0){return ye(this,f,b,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function _e(f,b,_,S,k,R){if(_+S>f.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("Index out of range")}function Ce(f,b,_,S,k){return b=+b,_=_>>>0,k||_e(f,b,_,4),r.write(f,b,_,S,23,4),_+4}a.prototype.writeFloatLE=function(f,b,_){return Ce(this,f,b,!0,_)},a.prototype.writeFloatBE=function(f,b,_){return Ce(this,f,b,!1,_)};function ie(f,b,_,S,k){return b=+b,_=_>>>0,k||_e(f,b,_,8),r.write(f,b,_,S,52,8),_+8}a.prototype.writeDoubleLE=function(f,b,_){return ie(this,f,b,!0,_)},a.prototype.writeDoubleBE=function(f,b,_){return ie(this,f,b,!1,_)},a.prototype.copy=function(f,b,_,S){if(!a.isBuffer(f))throw new TypeError("argument should be a Buffer");if(_||(_=0),!S&&S!==0&&(S=this.length),b>=f.length&&(b=f.length),b||(b=0),S>0&&S<_&&(S=_),S===_||f.length===0||this.length===0)return 0;if(b<0)throw new RangeError("targetStart out of bounds");if(_<0||_>=this.length)throw new RangeError("Index out of range");if(S<0)throw new RangeError("sourceEnd out of bounds");S>this.length&&(S=this.length),f.length-b<S-_&&(S=f.length-b+_);const k=S-_;return this===f&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(b,_,S):Uint8Array.prototype.set.call(f,this.subarray(_,S),b),k},a.prototype.fill=function(f,b,_,S){if(typeof f=="string"){if(typeof b=="string"?(S=b,b=0,_=this.length):typeof _=="string"&&(S=_,_=this.length),S!==void 0&&typeof S!="string")throw new TypeError("encoding must be a string");if(typeof S=="string"&&!a.isEncoding(S))throw new TypeError("Unknown encoding: "+S);if(f.length===1){const R=f.charCodeAt(0);(S==="utf8"&&R<128||S==="latin1")&&(f=R)}}else typeof f=="number"?f=f&255:typeof f=="boolean"&&(f=Number(f));if(b<0||this.length<b||this.length<_)throw new RangeError("Out of range index");if(_<=b)return this;b=b>>>0,_=_===void 0?this.length:_>>>0,f||(f=0);let k;if(typeof f=="number")for(k=b;k<_;++k)this[k]=f;else{const R=a.isBuffer(f)?f:a.from(f,S),Z=R.length;if(Z===0)throw new TypeError('The value "'+f+'" is invalid for argument "value"');for(k=0;k<_-b;++k)this[k+b]=R[k%Z]}return this};const le={};function we(f,b,_){le[f]=class extends _{constructor(){super(),Object.defineProperty(this,"message",{value:b.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${f}]`,this.stack,delete this.name}get code(){return f}set code(S){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:S,writable:!0})}toString(){return`${this.name} [${f}]: ${this.message}`}}}we("ERR_BUFFER_OUT_OF_BOUNDS",function(f){return f?`${f} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),we("ERR_INVALID_ARG_TYPE",function(f,b){return`The "${f}" argument must be of type number. Received type ${typeof b}`},TypeError),we("ERR_OUT_OF_RANGE",function(f,b,_){let S=`The value of "${f}" is out of range.`,k=_;return Number.isInteger(_)&&Math.abs(_)>2**32?k=D(String(_)):typeof _=="bigint"&&(k=String(_),(_>BigInt(2)**BigInt(32)||_<-(BigInt(2)**BigInt(32)))&&(k=D(k)),k+="n"),S+=` It must be ${b}. Received ${k}`,S},RangeError);function D(f){let b="",_=f.length;const S=f[0]==="-"?1:0;for(;_>=S+4;_-=3)b=`_${f.slice(_-3,_)}${b}`;return`${f.slice(0,_)}${b}`}function ue(f,b,_){be(b,"offset"),(f[b]===void 0||f[b+_]===void 0)&&re(b,f.length-(_+1))}function me(f,b,_,S,k,R){if(f>_||f<b){const Z=typeof b=="bigint"?"n":"";let ce;throw b===0||b===BigInt(0)?ce=`>= 0${Z} and < 2${Z} ** ${(R+1)*8}${Z}`:ce=`>= -(2${Z} ** ${(R+1)*8-1}${Z}) and < 2 ** ${(R+1)*8-1}${Z}`,new le.ERR_OUT_OF_RANGE("value",ce,f)}ue(S,k,R)}function be(f,b){if(typeof f!="number")throw new le.ERR_INVALID_ARG_TYPE(b,"number",f)}function re(f,b,_){throw Math.floor(f)!==f?(be(f,_),new le.ERR_OUT_OF_RANGE("offset","an integer",f)):b<0?new le.ERR_BUFFER_OUT_OF_BOUNDS:new le.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${b}`,f)}const N=/[^+/0-9A-Za-z-_]/g;function z(f){if(f=f.split("=")[0],f=f.trim().replace(N,""),f.length<2)return"";for(;f.length%4!==0;)f=f+"=";return f}function ee(f,b){b=b||1/0;let _;const S=f.length;let k=null;const R=[];for(let Z=0;Z<S;++Z){if(_=f.charCodeAt(Z),_>55295&&_<57344){if(!k){if(_>56319){(b-=3)>-1&&R.push(239,191,189);continue}else if(Z+1===S){(b-=3)>-1&&R.push(239,191,189);continue}k=_;continue}if(_<56320){(b-=3)>-1&&R.push(239,191,189),k=_;continue}_=(k-55296<<10|_-56320)+65536}else k&&(b-=3)>-1&&R.push(239,191,189);if(k=null,_<128){if((b-=1)<0)break;R.push(_)}else if(_<2048){if((b-=2)<0)break;R.push(_>>6|192,_&63|128)}else if(_<65536){if((b-=3)<0)break;R.push(_>>12|224,_>>6&63|128,_&63|128)}else if(_<1114112){if((b-=4)<0)break;R.push(_>>18|240,_>>12&63|128,_>>6&63|128,_&63|128)}else throw new Error("Invalid code point")}return R}function fe(f){const b=[];for(let _=0;_<f.length;++_)b.push(f.charCodeAt(_)&255);return b}function Ae(f,b){let _,S,k;const R=[];for(let Z=0;Z<f.length&&!((b-=2)<0);++Z)_=f.charCodeAt(Z),S=_>>8,k=_%256,R.push(k),R.push(S);return R}function Se(f){return e.toByteArray(z(f))}function J(f,b,_,S){let k;for(k=0;k<S&&!(k+_>=b.length||k>=f.length);++k)b[k+_]=f[k];return k}function ge(f,b){return f instanceof b||f!=null&&f.constructor!=null&&f.constructor.name!=null&&f.constructor.name===b.name}function Pe(f){return f!==f}const Ve=function(){const f="0123456789abcdef",b=new Array(256);for(let _=0;_<16;++_){const S=_*16;for(let k=0;k<16;++k)b[S+k]=f[_]+f[k]}return b}();function se(f){return typeof BigInt>"u"?ae:f}function ae(){throw new Error("BigInt not supported")}})(RA);const jue=t=>{const e=RA.Buffer.from(t,"base64").toString("utf8"),r=RA.Buffer.from(e,"binary").toString("base64");return t===r?e:t},Gue=async t=>{const e=jue(t),r=JSON.parse(e);return{message:e,...r}};class Ot{constructor(e,r,n,s,i){this._legacyCanvasSize=Ot.DEFAULT_CANVAS_SIZE,this._preferredCamera="environment",this._maxScansPerSecond=25,this._lastScanTimestamp=-1,this._destroyed=this._flashOn=this._paused=this._active=!1,this.$video=e,this.$canvas=document.createElement("canvas"),n&&typeof n=="object"?this._onDecode=r:(console.warn(n||s||i?"You're using a deprecated version of the QrScanner constructor which will be removed in the future":"Note that the type of the scan result passed to onDecode will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."),this._legacyOnDecode=r),r=typeof n=="object"?n:{},this._onDecodeError=r.onDecodeError||(typeof n=="function"?n:this._onDecodeError),this._calculateScanRegion=r.calculateScanRegion||(typeof s=="function"?s:this._calculateScanRegion),this._preferredCamera=r.preferredCamera||i||this._preferredCamera,this._legacyCanvasSize=typeof n=="number"?n:typeof s=="number"?s:this._legacyCanvasSize,this._maxScansPerSecond=r.maxScansPerSecond||this._maxScansPerSecond,this._onPlay=this._onPlay.bind(this),this._onLoadedMetaData=this._onLoadedMetaData.bind(this),this._onVisibilityChange=this._onVisibilityChange.bind(this),this._updateOverlay=this._updateOverlay.bind(this),e.disablePictureInPicture=!0,e.playsInline=!0,e.muted=!0;let o=!1;if(e.hidden&&(e.hidden=!1,o=!0),document.body.contains(e)||(document.body.appendChild(e),o=!0),n=e.parentElement,r.highlightScanRegion||r.highlightCodeOutline){if(s=!!r.overlay,this.$overlay=r.overlay||document.createElement("div"),i=this.$overlay.style,i.position="absolute",i.display="none",i.pointerEvents="none",this.$overlay.classList.add("scan-region-highlight"),!s&&r.highlightScanRegion){this.$overlay.innerHTML='<svg class="scan-region-highlight-svg" viewBox="0 0 238 238" preserveAspectRatio="none" style="position:absolute;width:100%;height:100%;left:0;top:0;fill:none;stroke:#e9b213;stroke-width:4;stroke-linecap:round;stroke-linejoin:round"><path d="M31 2H10a8 8 0 0 0-8 8v21M207 2h21a8 8 0 0 1 8 8v21m0 176v21a8 8 0 0 1-8 8h-21m-176 0H10a8 8 0 0 1-8-8v-21"/></svg>';try{this.$overlay.firstElementChild.animate({transform:["scale(.98)","scale(1.01)"]},{duration:400,iterations:1/0,direction:"alternate",easing:"ease-in-out"})}catch{}n.insertBefore(this.$overlay,this.$video.nextSibling)}r.highlightCodeOutline&&(this.$overlay.insertAdjacentHTML("beforeend",'<svg class="code-outline-highlight" preserveAspectRatio="none" style="display:none;width:100%;height:100%;fill:none;stroke:#e9b213;stroke-width:5;stroke-dasharray:25;stroke-linecap:round;stroke-linejoin:round"><polygon/></svg>'),this.$codeOutlineHighlight=this.$overlay.lastElementChild)}this._scanRegion=this._calculateScanRegion(e),requestAnimationFrame(()=>{let a=window.getComputedStyle(e);a.display==="none"&&(e.style.setProperty("display","block","important"),o=!0),a.visibility!=="visible"&&(e.style.setProperty("visibility","visible","important"),o=!0),o&&(console.warn("QrScanner has overwritten the video hiding style to avoid Safari stopping the playback."),e.style.opacity="0",e.style.width="0",e.style.height="0",this.$overlay&&this.$overlay.parentElement&&this.$overlay.parentElement.removeChild(this.$overlay),delete this.$overlay,delete this.$codeOutlineHighlight),this.$overlay&&this._updateOverlay()}),e.addEventListener("play",this._onPlay),e.addEventListener("loadedmetadata",this._onLoadedMetaData),document.addEventListener("visibilitychange",this._onVisibilityChange),window.addEventListener("resize",this._updateOverlay),this._qrEnginePromise=Ot.createQrEngine()}static set WORKER_PATH(e){console.warn("Setting QrScanner.WORKER_PATH is not required and not supported anymore. Have a look at the README for new setup instructions.")}static async hasCamera(){try{return!!(await Ot.listCameras(!1)).length}catch{return!1}}static async listCameras(e=!1){if(!navigator.mediaDevices)return[];let r=async()=>(await navigator.mediaDevices.enumerateDevices()).filter(s=>s.kind==="videoinput"),n;try{e&&(await r()).every(s=>!s.label)&&(n=await navigator.mediaDevices.getUserMedia({audio:!1,video:!0}))}catch{}try{return(await r()).map((s,i)=>({id:s.deviceId,label:s.label||(i===0?"Default Camera":`Camera ${i+1}`)}))}finally{n&&(console.warn("Call listCameras after successfully starting a QR scanner to avoid creating a temporary video stream"),Ot._stopVideoStream(n))}}async hasFlash(){let e;try{if(this.$video.srcObject){if(!(this.$video.srcObject instanceof MediaStream))return!1;e=this.$video.srcObject}else e=(await this._getCameraStream()).stream;return"torch"in e.getVideoTracks()[0].getSettings()}catch{return!1}finally{e&&e!==this.$video.srcObject&&(console.warn("Call hasFlash after successfully starting the scanner to avoid creating a temporary video stream"),Ot._stopVideoStream(e))}}isFlashOn(){return this._flashOn}async toggleFlash(){this._flashOn?await this.turnFlashOff():await this.turnFlashOn()}async turnFlashOn(){if(!this._flashOn&&!this._destroyed&&(this._flashOn=!0,this._active&&!this._paused))try{if(!await this.hasFlash())throw"No flash available";await this.$video.srcObject.getVideoTracks()[0].applyConstraints({advanced:[{torch:!0}]})}catch(e){throw this._flashOn=!1,e}}async turnFlashOff(){this._flashOn&&(this._flashOn=!1,await this._restartVideoStream())}destroy(){this.$video.removeEventListener("loadedmetadata",this._onLoadedMetaData),this.$video.removeEventListener("play",this._onPlay),document.removeEventListener("visibilitychange",this._onVisibilityChange),window.removeEventListener("resize",this._updateOverlay),this._destroyed=!0,this._flashOn=!1,this.stop(),Ot._postWorkerMessage(this._qrEnginePromise,"close")}async start(){if(this._destroyed)throw Error("The QR scanner can not be started as it had been destroyed.");if((!this._active||this._paused)&&(window.location.protocol!=="https:"&&console.warn("The camera stream is only accessible if the page is transferred via https."),this._active=!0,!document.hidden))if(this._paused=!1,this.$video.srcObject)await this.$video.play();else try{let{stream:e,facingMode:r}=await this._getCameraStream();!this._active||this._paused?Ot._stopVideoStream(e):(this._setVideoMirror(r),this.$video.srcObject=e,await this.$video.play(),this._flashOn&&(this._flashOn=!1,this.turnFlashOn().catch(()=>{})))}catch(e){if(!this._paused)throw this._active=!1,e}}stop(){this.pause(),this._active=!1}async pause(e=!1){if(this._paused=!0,!this._active)return!0;this.$video.pause(),this.$overlay&&(this.$overlay.style.display="none");let r=()=>{this.$video.srcObject instanceof MediaStream&&(Ot._stopVideoStream(this.$video.srcObject),this.$video.srcObject=null)};return e?(r(),!0):(await new Promise(n=>setTimeout(n,300)),this._paused?(r(),!0):!1)}async setCamera(e){e!==this._preferredCamera&&(this._preferredCamera=e,await this._restartVideoStream())}static async scanImage(e,r,n,s,i=!1,o=!1){let a,c=!1;r&&("scanRegion"in r||"qrEngine"in r||"canvas"in r||"disallowCanvasResizing"in r||"alsoTryWithoutScanRegion"in r||"returnDetailedScanResult"in r)?(a=r.scanRegion,n=r.qrEngine,s=r.canvas,i=r.disallowCanvasResizing||!1,o=r.alsoTryWithoutScanRegion||!1,c=!0):console.warn(r||n||s||i||o?"You're using a deprecated api for scanImage which will be removed in the future.":"Note that the return type of scanImage will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."),r=!!n;try{let l,u;[n,l]=await Promise.all([n||Ot.createQrEngine(),Ot._loadImage(e)]),[s,u]=Ot._drawToCanvas(l,a,s,i);let d;if(n instanceof Worker){let h=n;r||Ot._postWorkerMessageSync(h,"inversionMode","both"),d=await new Promise((p,g)=>{let m,y,v,A=-1;y=w=>{w.data.id===A&&(h.removeEventListener("message",y),h.removeEventListener("error",v),clearTimeout(m),w.data.data!==null?p({data:w.data.data,cornerPoints:Ot._convertPoints(w.data.cornerPoints,a)}):g(Ot.NO_QR_CODE_FOUND))},v=w=>{h.removeEventListener("message",y),h.removeEventListener("error",v),clearTimeout(m),g("Scanner error: "+(w?w.message||w:"Unknown Error"))},h.addEventListener("message",y),h.addEventListener("error",v),m=setTimeout(()=>v("timeout"),1e4);let E=u.getImageData(0,0,s.width,s.height);A=Ot._postWorkerMessageSync(h,"decode",E,[E.data.buffer])})}else d=await Promise.race([new Promise((h,p)=>window.setTimeout(()=>p("Scanner error: timeout"),1e4)),(async()=>{try{var[h]=await n.detect(s);if(!h)throw Ot.NO_QR_CODE_FOUND;return{data:h.rawValue,cornerPoints:Ot._convertPoints(h.cornerPoints,a)}}catch(p){if(h=p.message||p,/not implemented|service unavailable/.test(h))return Ot._disableBarcodeDetector=!0,Ot.scanImage(e,{scanRegion:a,canvas:s,disallowCanvasResizing:i,alsoTryWithoutScanRegion:o});throw`Scanner error: ${h}`}})()]);return c?d:d.data}catch(l){if(!a||!o)throw l;let u=await Ot.scanImage(e,{qrEngine:n,canvas:s,disallowCanvasResizing:i});return c?u:u.data}finally{r||Ot._postWorkerMessage(n,"close")}}setGrayscaleWeights(e,r,n,s=!0){Ot._postWorkerMessage(this._qrEnginePromise,"grayscaleWeights",{red:e,green:r,blue:n,useIntegerApproximation:s})}setInversionMode(e){Ot._postWorkerMessage(this._qrEnginePromise,"inversionMode",e)}static async createQrEngine(e){if(e&&console.warn("Specifying a worker path is not required and not supported anymore."),e=()=>Promise.resolve().then(()=>mhe).then(n=>n.createWorker()),!(!Ot._disableBarcodeDetector&&"BarcodeDetector"in window&&BarcodeDetector.getSupportedFormats&&(await BarcodeDetector.getSupportedFormats()).includes("qr_code")))return e();let r=navigator.userAgentData;return r&&r.brands.some(({brand:n})=>/Chromium/i.test(n))&&/mac ?OS/i.test(r.platform)&&await r.getHighEntropyValues(["architecture","platformVersion"]).then(({architecture:n,platformVersion:s})=>/arm/i.test(n||"arm")&&13<=parseInt(s||"13")).catch(()=>!0)?e():new BarcodeDetector({formats:["qr_code"]})}_onPlay(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay(),this.$overlay&&(this.$overlay.style.display=""),this._scanFrame()}_onLoadedMetaData(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay()}_onVisibilityChange(){document.hidden?this.pause():this._active&&this.start()}_calculateScanRegion(e){let r=Math.round(.6666666666666666*Math.min(e.videoWidth,e.videoHeight));return{x:Math.round((e.videoWidth-r)/2),y:Math.round((e.videoHeight-r)/2),width:r,height:r,downScaledWidth:this._legacyCanvasSize,downScaledHeight:this._legacyCanvasSize}}_updateOverlay(){requestAnimationFrame(()=>{if(this.$overlay){var e=this.$video,r=e.videoWidth,n=e.videoHeight,s=e.offsetWidth,i=e.offsetHeight,o=e.offsetLeft,a=e.offsetTop,c=window.getComputedStyle(e),l=c.objectFit,u=r/n,d=s/i;switch(l){case"none":var h=r,p=n;break;case"fill":h=s,p=i;break;default:(l==="cover"?u>d:u<d)?(p=i,h=p*u):(h=s,p=h/u),l==="scale-down"&&(h=Math.min(h,r),p=Math.min(p,n))}var[g,m]=c.objectPosition.split(" ").map((v,A)=>{const E=parseFloat(v);return v.endsWith("%")?(A?i-p:s-h)*E/100:E});c=this._scanRegion.width||r,d=this._scanRegion.height||n,l=this._scanRegion.x||0;var y=this._scanRegion.y||0;u=this.$overlay.style,u.width=`${c/r*h}px`,u.height=`${d/n*p}px`,u.top=`${a+m+y/n*p}px`,n=/scaleX\(-1\)/.test(e.style.transform),u.left=`${o+(n?s-g-h:g)+(n?r-l-c:l)/r*h}px`,u.transform=e.style.transform}})}static _convertPoints(e,r){if(!r)return e;let n=r.x||0,s=r.y||0,i=r.width&&r.downScaledWidth?r.width/r.downScaledWidth:1;r=r.height&&r.downScaledHeight?r.height/r.downScaledHeight:1;for(let o of e)o.x=o.x*i+n,o.y=o.y*r+s;return e}_scanFrame(){!this._active||this.$video.paused||this.$video.ended||("requestVideoFrameCallback"in this.$video?this.$video.requestVideoFrameCallback.bind(this.$video):requestAnimationFrame)(async()=>{if(!(1>=this.$video.readyState)){var e=Date.now()-this._lastScanTimestamp,r=1e3/this._maxScansPerSecond;e<r&&await new Promise(s=>setTimeout(s,r-e)),this._lastScanTimestamp=Date.now();try{var n=await Ot.scanImage(this.$video,{scanRegion:this._scanRegion,qrEngine:this._qrEnginePromise,canvas:this.$canvas})}catch(s){if(!this._active)return;this._onDecodeError(s)}!Ot._disableBarcodeDetector||await this._qrEnginePromise instanceof Worker||(this._qrEnginePromise=Ot.createQrEngine()),n?(this._onDecode?this._onDecode(n):this._legacyOnDecode&&this._legacyOnDecode(n.data),this.$codeOutlineHighlight&&(clearTimeout(this._codeOutlineHighlightRemovalTimeout),this._codeOutlineHighlightRemovalTimeout=void 0,this.$codeOutlineHighlight.setAttribute("viewBox",`${this._scanRegion.x||0} ${this._scanRegion.y||0} ${this._scanRegion.width||this.$video.videoWidth} ${this._scanRegion.height||this.$video.videoHeight}`),this.$codeOutlineHighlight.firstElementChild.setAttribute("points",n.cornerPoints.map(({x:s,y:i})=>`${s},${i}`).join(" ")),this.$codeOutlineHighlight.style.display="")):this.$codeOutlineHighlight&&!this._codeOutlineHighlightRemovalTimeout&&(this._codeOutlineHighlightRemovalTimeout=setTimeout(()=>this.$codeOutlineHighlight.style.display="none",100))}this._scanFrame()})}_onDecodeError(e){e!==Ot.NO_QR_CODE_FOUND&&console.log(e)}async _getCameraStream(){if(!navigator.mediaDevices)throw"Camera not found.";let e=/^(environment|user)$/.test(this._preferredCamera)?"facingMode":"deviceId",r=[{width:{min:1024}},{width:{min:768}},{}],n=r.map(s=>Object.assign({},s,{[e]:{exact:this._preferredCamera}}));for(let s of[...n,...r])try{let i=await navigator.mediaDevices.getUserMedia({video:s,audio:!1}),o=this._getFacingMode(i)||(s.facingMode?this._preferredCamera:this._preferredCamera==="environment"?"user":"environment");return{stream:i,facingMode:o}}catch{}throw"Camera not found."}async _restartVideoStream(){let e=this._paused;await this.pause(!0)&&!e&&this._active&&await this.start()}static _stopVideoStream(e){for(let r of e.getTracks())r.stop(),e.removeTrack(r)}_setVideoMirror(e){this.$video.style.transform="scaleX("+(e==="user"?-1:1)+")"}_getFacingMode(e){return(e=e.getVideoTracks()[0])?/rear|back|environment/i.test(e.label)?"environment":/front|user|face/i.test(e.label)?"user":null:null}static _drawToCanvas(e,r,n,s=!1){n=n||document.createElement("canvas");let i=r&&r.x?r.x:0,o=r&&r.y?r.y:0,a=r&&r.width?r.width:e.videoWidth||e.width,c=r&&r.height?r.height:e.videoHeight||e.height;return s||(s=r&&r.downScaledWidth?r.downScaledWidth:a,r=r&&r.downScaledHeight?r.downScaledHeight:c,n.width!==s&&(n.width=s),n.height!==r&&(n.height=r)),r=n.getContext("2d",{alpha:!1}),r.imageSmoothingEnabled=!1,r.drawImage(e,i,o,a,c,0,0,n.width,n.height),[n,r]}static async _loadImage(e){if(e instanceof Image)return await Ot._awaitImageLoad(e),e;if(e instanceof HTMLVideoElement||e instanceof HTMLCanvasElement||e instanceof SVGImageElement||"OffscreenCanvas"in window&&e instanceof OffscreenCanvas||"ImageBitmap"in window&&e instanceof ImageBitmap)return e;if(e instanceof File||e instanceof Blob||e instanceof URL||typeof e=="string"){let r=new Image;r.src=e instanceof File||e instanceof Blob?URL.createObjectURL(e):e.toString();try{return await Ot._awaitImageLoad(r),r}finally{(e instanceof File||e instanceof Blob)&&URL.revokeObjectURL(r.src)}}else throw"Unsupported image type."}static async _awaitImageLoad(e){e.complete&&e.naturalWidth!==0||await new Promise((r,n)=>{let s=i=>{e.removeEventListener("load",s),e.removeEventListener("error",s),i instanceof ErrorEvent?n("Image load error"):r()};e.addEventListener("load",s),e.addEventListener("error",s)})}static async _postWorkerMessage(e,r,n,s){return Ot._postWorkerMessageSync(await e,r,n,s)}static _postWorkerMessageSync(e,r,n,s){if(!(e instanceof Worker))return-1;let i=Ot._workerMessageId++;return e.postMessage({id:i,type:r,data:n},s),i}}Ot.DEFAULT_CANVAS_SIZE=400,Ot.NO_QR_CODE_FOUND="No QR code found",Ot._disableBarcodeDetector=!1,Ot._workerMessageId=0;const fV=class{constructor(e,r,n){this.events={};const s=document.querySelector(e.target);if(!s)throw new Error(`Target element '${e.target}' is not found`);this.targetElement=s,this.decode=r,this.scannerElements=n}async _initializeScanner(e,r=25){var n,s,i,o;try{if(!e){const a=await this.listVideoInputDevices();e=this._getMainCameraDeviceId(a)}this.qrScanner=new Ot(document.getElementById(`${this.scannerElements.VIDEO}`),async a=>{var c,l,u,d;if(this.previousScanText!==a.data)try{this.previousScanText=a.data,(l=(c=this.events)==null?void 0:c[ap.CAPTURE])==null||l.call(c,await this.decode(a.data))}catch(h){(d=(u=this.events)==null?void 0:u[ap.ERROR])==null||d.call(u,h)}},{returnDetailedScanResult:!0,maxScansPerSecond:r,preferredCamera:e,highlightScanRegion:!0,highlightCodeOutline:!0,onDecodeError:()=>{}}),await this.qrScanner.start()}catch(a){(s=(n=this.events)==null?void 0:n[ap.ERROR])==null||s.call(n,a),(i=this.qrScanner)==null||i.stop(),(o=this.rootElement)==null||o.remove()}}async listVideoInputDevices(){return Ot.listCameras(!0)}_getMainCameraDeviceId(e){var r,n;if(!(e!=null&&e.length))throw new Error("No video input devices available");const s=["back","задня"],i=e.find(o=>{const a=o.label.toLowerCase();return a.includes(s[0])||a.includes(s[1])});return i?.id||((r=e[1])==null?void 0:r.id)||((n=e[0])==null?void 0:n.id)}close(){var e,r,n,s;this.previousScanText=null,(r=(e=this.events)==null?void 0:e[ap.CANCEL])==null||r.call(e),(n=this.qrScanner)==null||n.stop(),(s=this.rootElement)==null||s.remove()}on(e,r){this.events[e]=r}off(e){this.events[e]=void 0}};fV.events=ap;let zue=fV;class pV extends zue{constructor(e){super(e,Gue,Dw)}async scan({deviceId:e,maxScansPerSecond:r,isCloseButton:n}={}){var s,i;n===void 0&&(n=!0),(s=this.qrScanner)==null||s.stop(),(i=this.rootElement)==null||i.remove(),new Oue({target:this.targetElement,props:{close:this.close.bind(this),isCloseButton:n,scannerElements:Dw}}),this.rootElement=document.getElementById(Dw.ROOT),await this._initializeScanner(e,r)}}typeof window<"u"&&(window.CredenzaScanner=pV);const gV=Object.freeze(Object.defineProperty({__proto__:null,Scanner:pV},Symbol.toStringTag,{value:"Module"}));function mV(t,e){if(new.target)return ht({component:mV,...t});ot(e,!1);const[r,n]=kn(),s=()=>It(wt,"$configStore",r),i=()=>It(Wr,"$providerStore",r),o=()=>It(Mo,"$clientPublicStore",r),a=De(),c=De();var l=this&&this.__awaiter||function(G,q,H,Y){function K(te){return te instanceof H?te:new H(function(oe){oe(te)})}return new(H||(H=Promise))(function(te,oe){function ye(ie){try{Ce(Y.next(ie))}catch(le){oe(le)}}function _e(ie){try{Ce(Y.throw(ie))}catch(le){oe(le)}}function Ce(ie){ie.done?te(ie.value):K(ie.value).then(ye,_e)}Ce((Y=Y.apply(G,q||[])).next())})};const u=We(wt),{sendTokens:d,getCREDContract:h,toastAlert:p}=We(Tr);let g="",m=De(""),y=De(),v=De(""),A=18,E=De("-"),w=De(""),C=18,B=De("-"),L=De(""),I=De(!0),M=De(!1),W,U,x;const P=()=>l(void 0,void 0,void 0,function*(){const{Scanner:G}=yield Promise.resolve().then(()=>gV);x=new G({target:"#cpuiCredScanner"}),OE(Pt.UI_CLOSED,x.close),yield x.scan(),x.on(G.events.CAPTURE,q=>l(void 0,[q],void 0,function*({sub:H}){const{address:Y}=yield fL(H);Re(m,Y),x.close()})),x.on(G.events.CANCEL,()=>Re(I,!0)),x.on(G.events.ERROR,q=>{(q?.message||q).includes("Permission")&&alert("In order to scan please allow the current page to access your camera and try again."),Re(I,!0)}),Re(I,!1)}),F=()=>l(void 0,void 0,void 0,function*(){const G=$(v)===$(E);Re(M,!0);try{const q=dr.parseUnits(String($(y)),G?A:C),H=yield d({address:$(m),amount:q,instance:G?W:void 0});p(`<a href="${qU(H.hash)}" target="_blank">Send TX</a> was created`),Re(m,""),Re(y,void 0);const[Y,K]=yield Promise.all([W.balanceOf(g),U.provider.getBalance(g)]);Re(w,dr.formatUnits(Y,A)),Re(L,parseFloat(dr.formatUnits(K,C)).toFixed(4)),Kt(Pt.RECHECK_BALANCE,[H.hash])}catch(q){p(q?.message||q||"An error occurred while sending tokens","failure"),Kt(Pt.ERROR,{error:q})}Re(M,!1)}),O=()=>l(void 0,void 0,void 0,function*(){var G,q,H,Y,K,te;const oe=We(Ut);Re(m,oe?.to||""),Re(y,oe?.amount||void 0);const{decimals:ye,contract:_e}=yield h();A=ye,W=_e;const Ce=We(Wr);if(!Ce)return;U=yield Ce.getSigner(),g=yield rn();const ie=yield Promise.all([W.symbol(),W.balanceOf(g),Ce.getBalance(g),fetch("https://chainid.network/chains.json").then(le=>le.json()).then(le=>le.find(we=>String(we.chainId)===u.chainId))]);Re(E,ie[0]),Re(w,dr.formatUnits(ie[1],A)),C=(H=(q=(G=ie[3])===null||G===void 0?void 0:G.nativeCurrency)===null||q===void 0?void 0:q.decimals)!==null&&H!==void 0?H:18,Re(L,parseFloat(dr.formatUnits(ie[2],C)).toFixed(4)),Re(B,(te=(K=(Y=ie[3])===null||Y===void 0?void 0:Y.nativeCurrency)===null||K===void 0?void 0:K.symbol)!==null&&te!==void 0?te:"ETH"),Re(v,$(E))});gt(()=>(s(),i()),()=>{s().chainId&&i()&&O()}),gt(()=>$(m),()=>{Re(a,!!dr.isAddress($(m)))}),gt(()=>($(M),$(y),$(a),$(v),$(E),$(w),$(B),$(L)),()=>{Re(c,$(M)||!$(y)||!$(a)||$(v)===$(E)&&$(y)>+$(w)||$(v)===$(B)&&$(y)>+$(L))}),mr(),Et();{let G=bt(()=>(s(),$(I),$(w),$(a),$e(Zt),$e(Xe),$(v),$(E),$(B),$(y),$(L),$(M),$(c),o(),Le(()=>({title:"Send stored value",isNativeCurrecyTransferAllowed:s().transferTokens?.nativeCurrency!==!1,isScannerHidden:$(I),balance:$(w),chainId:u.chainId,isRecipientAddressValid:$(a),onScannerClicked:P,onSendTokens:F,onBackClicked:()=>Zt.set(Xe.WALLET),onChangeCurrency:()=>$(v)===$(E)?Re(v,$(B)):Re(v,$(E)),onSetMaxAmount:()=>$(v)===$(E)?Re(y,+$(w)):Re(y,+$(L)),isLoading:$(M),isSubmitDisabled:$(c),credAlias:o()?.ui_settings.cred_alias,activeCurrency:$(v),symbol:$(E),nativeSymbol:$(B),nativeBalance:$(L)}))));wF(t,{get options(){return $(G)},get recipientAddress(){return $(m)},set recipientAddress(q){Re(m,q)},get amount(){return $(y)},set amount(q){Re(y,q)},$$legacy:!0})}var j=at({$set:ut,$on:(G,q)=>lt(e,G,q)});return n(),j}const $ue=Object.freeze(Object.defineProperty({__proto__:null,default:mV},Symbol.toStringTag,{value:"Module"}));var Hue=Fe('<div id="ctui-wallet-pay" class="crtw-w-full crtw-my-4" style="dispay: none;"><div id="ctui-payment-request-button"></div></div>');function yV(t,e){if(new.target)return ht({component:yV,...t});ot(e,!1);var r=this&&this.__awaiter||function(l,u,d,h){function p(g){return g instanceof d?g:new d(function(m){m(g)})}return new(d||(d=Promise))(function(g,m){function y(E){try{A(h.next(E))}catch(w){m(w)}}function v(E){try{A(h.throw(E))}catch(w){m(w)}}function A(E){E.done?g(E.value):p(E.value).then(y,v)}A((h=h.apply(l,u||[])).next())})};let n=Ge(e,"doPayment",12),s=Ge(e,"stripe",12),i=Ge(e,"stripeElements",12),o=Ge(e,"priceCents",12),a=Ge(e,"isLoading",12);Gh(()=>r(void 0,void 0,void 0,function*(){const l=s().paymentRequest({country:"US",currency:"usd",total:{label:"Apple/Google payment",amount:o()},requestPayerName:!0,requestPayerEmail:!0});if(!(yield l.canMakePayment()))return;const d=document.getElementById("ctui-wallet-pay");d&&(d.style.display="crtw-block"),i().create("paymentRequestButton",{paymentRequest:l,style:{paymentRequestButton:{height:"48px"}}}).mount("#ctui-payment-request-button"),l.on("token",p=>r(void 0,void 0,void 0,function*(){a(!0);try{yield n()(p.token.id),yield p.complete("success")}catch(g){yield p.complete("error"),Kt(Pt.ERROR,{error:g})}a(!1)}))})),Et();var c=Hue();return Ee(t,c),at({get doPayment(){return n()},set doPayment(l){n(l),je()},get stripe(){return s()},set stripe(l){s(l),je()},get stripeElements(){return i()},set stripeElements(l){i(l),je()},get priceCents(){return o()},set priceCents(l){o(l),je()},get isLoading(){return a()},set isLoading(l){a(l),je()},$set:ut,$on:(l,u)=>lt(e,l,u)})}const Zue={base:{color:"#121e2b",fontSize:"12px","::placeholder":{color:"#d9d9d9"}},invalid:{color:"#fa755a"}},Jue=t=>new Promise((e,r)=>{const n=document.createElement("script");n.src=t,document.body.appendChild(n),n.addEventListener("load",()=>e(n)),n.addEventListener("error",()=>r(n))}),Que=async(t,e,r=5)=>{let n=0;for(;n<r;){const s=await fetch(`${t}/orders/completed/${e}`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${We(gs)}`},method:"GET"});if(s.status===204){if(n++,n<r)continue;throw new Error("No content received after multiple attempts")}if(!s.ok)throw new Error("Failed to get order details");return await s.json()}},Yue=(t,e)=>{const r=e.filter(n=>n.error).map(n=>`Name: ${n.metadata?.name||n.directive.resource_id}, reason: ${n.error}`).join(`
|
|
687
687
|
`);if(t.every(n=>n===null))throw new Error(`All transactions failed.
|
|
688
|
-
${r}`);if(e?.every(n=>n.status==="ERROR"))throw new Error("All transactions failed.}");return r},vV=async({hash:t,stripeChargeId:e,title:r,subtitle:n,amount:s,currency:i})=>{const{credenza:o,receiptTarget:a,clientId:c}=We(wt),l=[];a?l.push(...a):l.push(SI.EMAIL);let u=0;for(const d of l){const h=await fetch(`${o.evmApiUrl}/contracts/receipt`,{method:"POST",body:JSON.stringify({...t?{tx:t}:{charge_id:e},...s?{amount:s}:{},...i?{currency:i}:{},target:d,title:r,subtitle:n,source:A1(c).name}),headers:{Authorization:`Bearer ${We(gs)}`,"Content-Type":"application/json"}});h.ok?u++:console.warn(`Failed to send receipt to ${d}:`,h.status)}return u>0},Kue=async(t,e,r)=>{const{toastAlert:n}=We(Tr),s=We(wt),i=Yue(t.chain_txs,t.items);Kt(Pt.PAYMENT,{type:Lv.STRIPE,results:{...t,tokens:r.tokens,memberships:r.memberships}}),n("Your payment was successful"),Kt(Pt.RECHECK_BALANCE,t.chain_txs);const o=We(Wn);o&&xn.track("cp_payment_fiat",{$email:o.email,$phone:o.phone,chain:s.chainId,clientId:s.clientId,address:await rn(),location:window.location.href,tokens:r?.tokens,memberships:r?.memberships,total:e/100,description:(r?.title??"")+`(${r?.subtitle??""})`}),await gE(),e===0&&Ut.set({subtitle:"Your claim was successful!",receipt:!1}),i&&Ut.set({title:"Done!",subtitle:"Your payment was partly successful",orders:t.items}),Zt.set(Xe.PAYMENT_RESULT)};var que=Fe("<!> <!>",1);function bV(t,e){if(new.target)return ht({component:bV,...t});ot(e,!1);const r=De(),n=De();var s=this&&this.__awaiter||function(L,I,M,W){function U(x){return x instanceof M?x:new M(function(P){P(x)})}return new(M||(M=Promise))(function(x,P){function F(G){try{j(W.next(G))}catch(q){P(q)}}function O(G){try{j(W.throw(G))}catch(q){P(q)}}function j(G){G.done?x(G.value):U(G.value).then(F,O)}j((W=W.apply(L,I||[])).next())})};let i=Ge(e,"priceCents",12),o=Ge(e,"isLoading",12),a=Ge(e,"purchaseConfig",12),c=Ge(e,"isPriceLoading",12);const{toastAlert:l}=We(Tr),u=We(wt);let d,h=De(),p=De(),g,m=De(),y=De(!1);Gh(()=>s(void 0,void 0,void 0,function*(){var L;try{if(!d){if(!window.Stripe&&(yield Jue("https://js.stripe.com/v3/"),!window.Stripe))throw{};d=window.Stripe}}catch{return console.log("Please include stripe to use payments.")}if($(h))return;const I=A1(u.clientId).name;Re(h,d((L=u.stripe.pk[I])!==null&&L!==void 0?L:u.stripe.pk.DEFAULT)),Re(p,$(h).elements()),g=$(p).create("card",{style:Zue}),g.mount("#cpui-card-element"),g.on("change",M=>{Re(m,M.complete&&!M.error)}),g.on("focus",()=>Re(y,!0)),g.on("blur",()=>Re(y,!1))}));const v=()=>s(void 0,void 0,void 0,function*(){try{if(!$(m))return;o(!0);const L=yield $(h).createToken(g);if(L.error)throw L.error;yield A(L.token.id)}catch(L){Kt(Pt.ERROR,{error:L})}o(!1)}),A=L=>s(void 0,void 0,void 0,function*(){try{const{processPayment:I}=yield Promise.resolve().then(()=>bhe),M=yield I(L);yield Kue(M,i(),a())}catch(I){l(`Payment error: ${I.message||I}`,"failure"),Ut.set({errorMessage:I.message||I}),Zt.set(Xe.ERROR),Kt(Pt.ERROR,{error:I})}});gt(()=>($(m),$e(o()),$e(c())),()=>{Re(r,!$(m)||o()||c())}),gt(()=>$e(i()),()=>{Re(n,(i()/100).toFixed(2))}),mr(),Et();var E=que(),w=He(E);{let L=bt(()=>($(y),$e(A1),Le(()=>({isCardFocused:$(y),onPay:v,currencySymbol:A1(u.clientId).currencySymbol}))));CF(w,{get options(){return $(L)},get isPaymentDisabled(){return $(r)},set isPaymentDisabled(I){Re(r,I)},get isLoading(){return o()},set isLoading(I){o(I)},get totalToPay(){return $(n)},set totalToPay(I){Re(n,I)},$$legacy:!0})}var C=Me(w,2);{var B=L=>{yV(L,{doPayment:A,get stripe(){return $(h)},get stripeElements(){return $(p)},get priceCents(){return i()},get isLoading(){return o()},set isLoading(I){o(I)},$$legacy:!0})};Je(C,L=>{$(h)&&$(p)&&L(B)})}return Ee(t,E),at({get priceCents(){return i()},set priceCents(L){i(L),je()},get isLoading(){return o()},set isLoading(L){o(L),je()},get purchaseConfig(){return a()},set purchaseConfig(L){a(L),je()},get isPriceLoading(){return c()},set isPriceLoading(L){c(L),je()},$set:ut,$on:(L,I)=>lt(e,L,I)})}var Xue=Fe('<div class="crtw-w-full crtw-justify-items-center crtw-my-5"><!></div>');function wV(t,e){if(new.target)return ht({component:wV,...t});ot(e,!1);const[r,n]=kn(),s=()=>It(Mo,"$clientPublicStore",r);var i=this&&this.__awaiter||function(O,j,G,q){function H(Y){return Y instanceof G?Y:new G(function(K){K(Y)})}return new(G||(G=Promise))(function(Y,K){function te(_e){try{ye(q.next(_e))}catch(Ce){K(Ce)}}function oe(_e){try{ye(q.throw(_e))}catch(Ce){K(Ce)}}function ye(_e){_e.done?Y(_e.value):H(_e.value).then(te,oe)}ye((q=q.apply(O,j||[])).next())})};let o=Ge(e,"totalPriceToken",12),a=Ge(e,"purchaseConfig",12),c=Ge(e,"isLoading",12),l=Ge(e,"isPriceLoading",12),u=Ge(e,"pricesByToken",12);const{getCREDContract:d,toastAlert:h}=We(Tr),{chainId:p,clientId:g}=We(wt);let m=De(!1),y=De(BigInt(0)),v=De(),A="",E,w=De(),C,B,L;const I=(O,j)=>i(void 0,void 0,void 0,function*(){try{const{credenzaSellableMinAbi:G}=yield Promise.resolve().then(()=>kl),q=new dr.Contract(O.contractAddress,G,B),H=O.tokenId?O.tokenId:O.typeId,Y=u()[`${O.contractAddress}/${H}`],K=yield E.approve.populateTransaction(yield q.getAddress(),Y);yield d1(K,E);const te=yield q.buyWithToken.populateTransaction(H,O.amount||1,C),oe=yield d1(te,q);h(`<a href="${qU(oe.hash)}" target="_blank">Purchase TX #${j}</a> was created`),Kt(Pt.PAYMENT,{type:Lv.ERC20,data:oe}),Kt(Pt.RECHECK_BALANCE),yield vV({hash:oe.hash,title:a().title,subtitle:a().subtitle,currency:"CRED",amount:+dr.formatUnits(Y,$(w))}),Kt(Pt.RECEIPT,{hash:oe.hash})}catch(G){h(`Payment error: ${G.message||G}`,"failure"),Ut.set({errorMessage:G.message}),Zt.set(Xe.ERROR),Kt(Pt.ERROR,{error:G})}}),M=()=>i(void 0,void 0,void 0,function*(){var O,j;try{if(BigInt(o())>$(y))return;c(!0);const G=[...a().tokens||[],...a().memberships||[]].map((H,Y)=>I(H,Y+1));yield Promise.all(G);const q=We(Wn);q&&xn.track("cp_payment_stored_value",{$email:q.email,$phone:q.phone,chain:p,clientId:g,address:C,location:window.location.href,tokens:a().tokens,memberships:a().memberships,total:o(),description:((O=a()===null||a()===void 0?void 0:a().title)!==null&&O!==void 0?O:"")+`(${(j=a()===null||a()===void 0?void 0:a().subtitle)!==null&&j!==void 0?j:""})`}),yield gE(),o()===0&&Ut.set({subtitle:"Your claim was successful!",receipt:!1}),Zt.set(Xe.PAYMENT_RESULT)}catch(G){h(`Payment error: ${G.message||G}`,"failure"),Ut.set({errorMessage:G.message}),Zt.set(Xe.ERROR),Kt(Pt.ERROR,{error:G})}finally{c(!1)}});Gh(()=>i(void 0,void 0,void 0,function*(){try{Re(m,!0),L=yield d();const O=We(Wr);if(!O)return;B=yield O.getSigner(),E=L.contract,Re(w,L.decimals),[C,A]=yield Promise.all([rn(),E.symbol()]),Re(y,yield E.balanceOf(C)),Re(v,`${dr.formatUnits(BigInt($(y))-BigInt(o()),$(w))} ${_1(A,"cred")}`)}catch(O){console.log(O)}finally{Re(m,!1)}})),Et();var W=nt(),U=He(W);{var x=O=>{var j=Xue(),G=Ie(j);El(G,{}),xe(j),Ee(O,j)},P=O=>{{let j=bt(()=>($(v),$e(dr),$(y),$(w),s(),$e(Zt),$e(Xe),$e(o()),$e(c()),$e(l()),Le(()=>({formattedBalance:$(v),balance:Number((+dr.formatUnits(BigInt($(y)),$(w))).toFixed(2)),credAlias:s()?.ui_settings.cred_alias,onPay:M,onGetCred:()=>Zt.set(Xe.WALLET),totalToPay:(+dr.formatUnits(o(),$(w))).toFixed(2),isLoading:c(),isPaymentDisabled:!Number($(y))||BigInt(o())>$(y)||l()}))));SF(O,{get options(){return $(j)}})}};Je(U,O=>{$(m)?O(x):O(P,!1)})}Ee(t,W);var F=at({get totalPriceToken(){return o()},set totalPriceToken(O){o(O),je()},get purchaseConfig(){return a()},set purchaseConfig(O){a(O),je()},get isLoading(){return c()},set isLoading(O){c(O),je()},get isPriceLoading(){return l()},set isPriceLoading(O){l(O),je()},get pricesByToken(){return u()},set pricesByToken(O){u(O),je()},$set:ut,$on:(O,j)=>lt(e,O,j)});return n(),F}const ehe=JSON.parse('[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"priceToken","type":"uint256"}],"name":"Redeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"addAvailableCurrencyTokenContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"addOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"requestedAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"buyWithEther","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"requestedAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"currencyTokenContract","type":"address"}],"name":"buyWithToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"requestedAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"buyWithToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"clearOwners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAvailableCurrencyTokenContractsList","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBeneficiaryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDefaultCurrencyTokenContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDescription","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"}],"name":"getLicensePriceEther","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"}],"name":"getLicensePriceFiat","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"}],"name":"getLicensePriceToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOwners","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPriceEther","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPriceFiat","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"currencyContract","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPriceToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPriceToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenLicenseInfo","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTrustedForwarder","outputs":[{"internalType":"address","name":"forwarder","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getVersion","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"image","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"isAvailableCurrencyTokenContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"string","name":"tokenURI","type":"string"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintBatch","outputs":[{"internalType":"uint256[]","name":"arr","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"string","name":"tokenURI","type":"string"},{"internalType":"string","name":"licenseInfo","type":"string"},{"internalType":"uint256","name":"fullLicensePriceFiat","type":"uint256"},{"internalType":"uint256","name":"fullLicensePriceToken","type":"uint256"},{"internalType":"uint256","name":"fullLicensePriceEther","type":"uint256"},{"internalType":"uint256","name":"timeLicensePriceFiat","type":"uint256"},{"internalType":"uint256","name":"timeLicensePriceToken","type":"uint256"},{"internalType":"uint256","name":"timeLicensePriceEther","type":"uint256"},{"internalType":"uint256","name":"oneTimeLicensePriceFiat","type":"uint256"},{"internalType":"uint256","name":"oneTimeLicensePriceToken","type":"uint256"},{"internalType":"uint256","name":"oneTimeLicensePriceEther","type":"uint256"}],"name":"mintWithPrices","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"nonceUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"priceToken","type":"uint256"},{"internalType":"string","name":"licenseInfo","type":"string"},{"internalType":"string","name":"uri","type":"string"}],"internalType":"struct ContentNftContract.ContentNFTVoucher","name":"voucher","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"removeAvailableCurrencyTokenContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"removeOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setBaseUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"addr","type":"address"}],"name":"setBeneficiaryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenContract","type":"address"}],"name":"setDefaultCurrencyTokenContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"description","type":"string"}],"name":"setDescription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newImage","type":"string"}],"name":"setImage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"},{"internalType":"uint256","name":"priceEther","type":"uint256"}],"name":"setLicensePriceEther","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"},{"internalType":"uint256","name":"priceFiat","type":"uint256"}],"name":"setLicensePriceFiat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"},{"internalType":"uint256","name":"priceToken","type":"uint256"}],"name":"setLicensePriceToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"newOwner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceEther","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceFiat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"currencyContract","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newSymbol","type":"string"}],"name":"setSymbol","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"licenseInfo","type":"string"}],"name":"setTokenLicenseInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURIByIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_forwarder","type":"address"}],"name":"setTrustedForwarder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenURIByIndex","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"}]');var the=Fe('<div slot="credit-card"><!></div>'),rhe=Fe('<div slot="cred-balance"><!></div>'),nhe=Fe("<!> <!>",1);function kV(t,e){if(new.target)return ht({component:kV,...t});ot(e,!1);const[r,n]=kn(),s=()=>It(wt,"$configStore",r),i=()=>It(Wr,"$providerStore",r),o=()=>It(jf,"$contractsStore",r),a=()=>It(Wn,"$userStore",r),c=()=>It(Ut,"$pageOptsStore",r);var l=this&&this.__awaiter||function(M,W,U,x){function P(F){return F instanceof U?F:new U(function(O){O(F)})}return new(U||(U=Promise))(function(F,O){function j(H){try{q(x.next(H))}catch(Y){O(Y)}}function G(H){try{q(x.throw(H))}catch(Y){O(Y)}}function q(H){H.done?F(H.value):P(H.value).then(j,G)}q((x=x.apply(M,W||[])).next())})};const{close:u}=We(Tr),d=We(wt).chainId;let h=De(0),p=De(0),g=De(!1),m=De(!1),y=De({});const v=(M,W,U)=>l(void 0,void 0,void 0,function*(){let x=0,P=0;if(U){const j=new dr.Contract(M,ehe,i());return x=yield j.getLicensePriceFiat(String(W),U).then(G=>Number(G)),P=yield j.getLicensePriceToken(String(W),U).then(G=>Number(G)),[x,P]}const{credenzaSellableMinAbi:F}=yield Promise.resolve().then(()=>kl),O=new dr.Contract(M,F,i());return x=yield O.getPriceFiat(W).then(j=>Number(j)),P=0,x===0?[x,P]=yield Promise.all([O.getPriceFiat(fE).then(j=>Number(j)),O.getPriceToken(fE).then(j=>Number(j))]):P=yield O.getPriceToken(W).then(j=>Number(j)),[x,P]}),A=M=>l(void 0,void 0,void 0,function*(){console.log(M);try{Re(g,!0);for(const W of M)if(W.contractAddress===o().erc20Cred.address)Re(h,$(h)+W.amount*100);else{const U=W.tokenId||W.typeId||W.contentTokenId||fE;let[x,P]=yield v(W.contractAddress,+U,W.licenseType);W?.amount&&W?.amount!==0&&(x*=W.amount,P*=W.amount),Re(h,$(h)+x),Re(p,$(p)+P),HD(y,$(y)[`${W.contractAddress}/${U}`]=P)}}catch(W){Kt(Pt.ERROR,W)}finally{Re(g,!1)}}),E=Ut.subscribe(M=>l(void 0,void 0,void 0,function*(){var W,U,x;!(!((W=M?.tokens)===null||W===void 0)&&W.length)&&!(!((U=M?.memberships)===null||U===void 0)&&U.length)&&!(!((x=M?.licenses)===null||x===void 0)&&x.length)||(yield A([...M?.tokens||[],...M?.memberships||[],...M?.licenses||[]]))}));zh(E),gt(()=>s(),()=>{s().chainId!==d&&u()}),mr(),Et();var w=nhe(),C=He(w);{var B=M=>{var W=nt(),U=He(W);wn(U,()=>Promise.resolve().then(()=>RV),null,(x,P)=>{var F=nt(),O=He(F);hn(O,()=>$(P).default,(j,G)=>{G(j,{})}),Ee(x,F)}),Ee(M,W)};Je(C,M=>{$(m)&&M(B)})}var L=Me(C,2);{let M=bt(()=>(a(),c(),$e(Zt),$e(Xe),$(h),$(g),Le(()=>({user:a(),title:c().title||"Order Summary",subtitle:c().subtitle,onBackClick:()=>Zt.set(Xe.WALLET),isStripeDisabled:c().payments?.stripe?.disabled,isCredezaValueDisabled:!$(h)||c().payments?.credenzaStoredValue?.disabled,isPriceLoading:$(g),totalSumCents:$(h)}))));TF(L,{get options(){return $(M)},get isLoading(){return $(m)},set isLoading(W){Re(m,W)},$$slots:{"credit-card":(W,U)=>{var x=the(),P=Ie(x);bV(P,{get priceCents(){return $(h)},get isPriceLoading(){return $(g)},get purchaseConfig(){return c()},get isLoading(){return $(m)},set isLoading(F){Re(m,F)},$$legacy:!0}),xe(x),Ee(W,x)},"cred-balance":(W,U)=>{var x=rhe(),P=Ie(x);wV(P,{get pricesByToken(){return $(y)},get totalPriceToken(){return $(p)},get isPriceLoading(){return $(g)},get purchaseConfig(){return c()},get isLoading(){return $(m)},set isLoading(F){Re(m,F)},$$legacy:!0}),xe(x),Ee(W,x)}},$$legacy:!0})}Ee(t,w);var I=at({$set:ut,$on:(M,W)=>lt(e,M,W)});return n(),I}const she=Object.freeze(Object.defineProperty({__proto__:null,default:kV},Symbol.toStringTag,{value:"Module"}));function EV(t,e){if(new.target)return ht({component:EV,...t});ot(e,!1);const[r,n]=kn(),s=()=>It(Ut,"$pageOptsStore",r);let i=We(wt);Et();{let a=bt(()=>({title:s()?.title||i.content?.paymentResult?.title||"Success!",subtitle:s()?.subtitle||i.content?.paymentResult?.subtitle||"Your payment was successful!",description:s()?.description||i.content?.paymentResult?.description,orders:s()?.orders||[],tokenImage:s()?.tokenImage||""}));gF(t,{get options(){return $(a)}})}var o=at({$set:ut,$on:(a,c)=>lt(e,a,c)});return n(),o}const ihe=Object.freeze(Object.defineProperty({__proto__:null,default:EV},Symbol.toStringTag,{value:"Module"}));function AV(t,e){if(new.target)return ht({component:AV,...t});ot(e,!1);var r=this&&this.__awaiter||function(a,c,l,u){function d(h){return h instanceof l?h:new l(function(p){p(h)})}return new(l||(l=Promise))(function(h,p){function g(v){try{y(u.next(v))}catch(A){p(A)}}function m(v){try{y(u.throw(v))}catch(A){p(A)}}function y(v){v.done?h(v.value):d(v.value).then(g,m)}y((u=u.apply(a,c||[])).next())})};const{close:n}=We(Tr);let s,i=De(!1);const o=a=>r(void 0,[a],void 0,function*({message:c,sub:l,scanType:u}){switch(s.close(),u){case Xc.PASSPORT_ID_PASS:case Xc.PASSPORT_ID:{const d=JSON.parse(c),{address:h}=yield fL(l);Tie({userAddress:h,amount:d?.amount});break}case Xc.TOKENS_PURCHASE:{dL(JSON.parse(c));break}case Xc.AIR_DROP_ASSET:{yield Cie(JSON.parse(c));break}case Xc.REQUEST_LOYALTY_POINTS:{yield Sie(JSON.parse(c));break}default:n(),Zt.set(null)}});Gh(()=>r(void 0,void 0,void 0,function*(){const{Scanner:a}=yield Promise.resolve().then(()=>gV);s=new a({target:"#cpuiScanner"}),OE(Pt.UI_CLOSED,()=>{s.close(),Zt.set(null)}),yield s.scan({isCloseButton:!1}),Re(i,!0),s.on(a.events.CAPTURE,o),s.on(a.events.ERROR,c=>{(c?.message||c).includes("Permission")&&alert("In order to scan please allow the current page to access your camera and try again.")})})),Et();{let a=bt(()=>({isScannerLoaded:$(i)}));vF(t,{get options(){return $(a)}})}return at({$set:ut,$on:(a,c)=>lt(e,a,c)})}const ohe=Object.freeze(Object.defineProperty({__proto__:null,default:AV},Symbol.toStringTag,{value:"Module"})),ahe="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2027.3.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20500%20500'%20style='enable-background:new%200%200%20500%20500;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23010101;}%20%3c/style%3e%3cpath%20class='st0'%20d='M454.1,479.5l-39.2-358c-0.5-7.2-6.7-12.4-13.9-12.4l-67.6,0V88.6c0-45.9-37.7-83.6-83.6-83.6%20s-83.6,37.7-83.6,83.6v20.6H98.2c-7.2,0-12.9,5.2-13.9,12.4L45,479.5c-0.5,4.1,1,7.7,3.6,10.8c2.6,3.1,6.2,4.6,10.3,4.6h381.7%20c4.1,0,7.7-1.5,10.3-4.6C453.6,487.3,454.6,483.6,454.1,479.5L454.1,479.5z%20M204.4,88.6c0-25.3,20.6-45.4,45.4-45.4%20c24.8,0,45.4,20.6,45.4,45.4v20.6l-90.8,0L204.4,88.6z%20M249.8,406.3c-57.3,0-104.2-46.4-104.2-104.2c0-57.3,46.4-104.2,104.2-104.2%20c57.3,0,104.2,46.4,104.2,104.2C354,359.3,307.1,406.3,249.8,406.3z'/%3e%3cpath%20class='st0'%20d='M295.2,256.7c-7.2-7.2-19.6-7.2-26.8,0l-18.6,18.6l-18.6-18.6c-7.2-7.2-19.6-7.2-26.8,0%20c-7.2,7.2-7.2,19.6,0,26.8l18.6,18.6l-18.6,18.6c-7.2,7.2-7.2,19.6,0,26.8c3.6,3.6,8.8,5.7,13.4,5.7c4.6,0,9.8-2.1,13.4-5.7%20l18.6-18.6l18.6,18.6c3.6,3.6,8.8,5.7,13.4,5.7c4.6,0,9.8-2.1,13.4-5.7c7.2-7.2,7.2-19.6,0-26.8l-18.6-18.6l18.6-18.6%20C302.4,276.3,302.4,264.4,295.2,256.7L295.2,256.7z'/%3e%3c/svg%3e",Al={titles:{DEFAULT_ERROR_TITLE:"Something went wrong",TRANSACTION_REVERTED_TITLE:"The transaction is reverted",SOLD_OUT_ERROR_TITLE:"Sold out",INVALID_TOKEN_ERROR_TITLE:"Invalid token ID"},desctiptions:{DEFAULT_ERROR_DESC:"An unexpected error occured and we are unable to complete your order.",SOLD_OUT_ERROR_DESC:"We are unable to complete your order as the item that you are trying to add is currently sold out.",INVALID_TOKEN_ERROR_DESC:"There is no token associated with provided ID.",HAS_MEMBERSHIP_ALREADY_ERROR_DESC:"This membership is already assosiated with your account."}},che=t=>{let e={};return(t.includes("SOLD_OUT")||t.includes("Sold out"))&&(e={title:Al.titles.SOLD_OUT_ERROR_TITLE,description:Al.desctiptions.SOLD_OUT_ERROR_DESC,image:ahe}),t.includes("invalid token ID")&&(e={title:Al.titles.INVALID_TOKEN_ERROR_TITLE,description:Al.desctiptions.INVALID_TOKEN_ERROR_DESC}),t.includes("ALREADY_HAS_MEMBERSHIP")&&(e={title:Al.titles.TRANSACTION_REVERTED_TITLE,description:Al.desctiptions.HAS_MEMBERSHIP_ALREADY_ERROR_DESC}),e};function _V(t,e){if(new.target)return ht({component:_V,...t});ot(e,!1);const r=()=>We(Tr).close(),{openUI:n}=We(Tr);let s=De();const i=Ut.subscribe(a=>{a.errorMessage?Re(s,Object.assign(Object.assign({},$(s)),che(a.errorMessage))):a.title&&a.description&&Re(s,Object.assign(Object.assign({},$(s)),a))}),o=()=>{const{primaryAction:a}=$(s);let c={tokens:[{contractAddress:a?.contractAddress,tokenId:a?.tokenId}]},l={memberships:[{contractAddress:a?.contractAddress,typeId:a?.typeId}]};n(Xe.PAYMENT,Object.assign({title:a?.text,subtitle:""},a?.typeId?l:c))};zh(i),Et();{let a=bt(()=>({title:$(s)?.title||Al.titles.DEFAULT_ERROR_TITLE,description:$(s)?.description||Al.desctiptions.DEFAULT_ERROR_DESC,image:$(s)?.image,shouldRenderBackButton:$(s)?.shouldRenderBackButton,onCloseClick:r,secondaryAction:$(s)?.secondaryAction,primaryActionText:$(s)?.primaryAction?.text,openPaymentFunction:o}));oF(t,{get options(){return $(a)}})}return at({$set:ut,$on:(a,c)=>lt(e,a,c)})}const lhe=Object.freeze(Object.defineProperty({__proto__:null,default:_V},Symbol.toStringTag,{value:"Module"}));var uhe=Fe("<button> </button>"),hhe=Fe(`<a class="crtw-flex crtw-justify-center crtw-items-center crtw-w-full crtw-h-[50px] crtw-cursor-pointer
|
|
688
|
+
${r}`);if(e?.every(n=>n.status==="ERROR"))throw new Error("All transactions failed.}");return r},vV=async({hash:t,stripeChargeId:e,title:r,subtitle:n,amount:s,currency:i})=>{const{credenza:o,receiptTarget:a,clientId:c}=We(wt),l=[];a?l.push(...a):l.push(SI.EMAIL);let u=0;for(const d of l){const h=await fetch(`${o.evmApiUrl}/contracts/receipt`,{method:"POST",body:JSON.stringify({...t?{tx:t}:{charge_id:e},...s?{amount:s}:{},...i?{currency:i}:{},target:d,title:r,subtitle:n,source:A1(c).name}),headers:{Authorization:`Bearer ${We(gs)}`,"Content-Type":"application/json"}});h.ok?u++:console.warn(`Failed to send receipt to ${d}:`,h.status)}return u>0},Kue=async(t,e,r)=>{const{toastAlert:n}=We(Tr),s=We(wt),i=Yue(t.chain_txs,t.items);Kt(Pt.PAYMENT,{type:Lv.STRIPE,results:{...t,tokens:r.tokens,memberships:r.memberships}}),n("Your payment was successful"),Kt(Pt.RECHECK_BALANCE,t.chain_txs);const o=We(Wn);o&&xn.track("cp_payment_fiat",{$email:o.email,$phone:o.phone,chain:s.chainId,clientId:s.clientId,address:await rn(),location:window.location.href,tokens:r?.tokens,memberships:r?.memberships,total:e/100,description:(r?.title??"")+`(${r?.subtitle??""})`}),await gE(),e===0&&Ut.set({subtitle:"Your claim was successful!",receipt:!1}),i&&Ut.set({title:"Done!",subtitle:"Your payment was partly successful",orders:t.items}),Zt.set(Xe.PAYMENT_RESULT)};var que=Fe("<!> <!>",1);function bV(t,e){if(new.target)return ht({component:bV,...t});ot(e,!1);const r=De(),n=De();var s=this&&this.__awaiter||function(L,I,M,W){function U(x){return x instanceof M?x:new M(function(P){P(x)})}return new(M||(M=Promise))(function(x,P){function F(G){try{j(W.next(G))}catch(q){P(q)}}function O(G){try{j(W.throw(G))}catch(q){P(q)}}function j(G){G.done?x(G.value):U(G.value).then(F,O)}j((W=W.apply(L,I||[])).next())})};let i=Ge(e,"priceCents",12),o=Ge(e,"isLoading",12),a=Ge(e,"purchaseConfig",12),c=Ge(e,"isPriceLoading",12);const{toastAlert:l}=We(Tr),u=We(wt);let d,h=De(),p=De(),g,m=De(),y=De(!1);Gh(()=>s(void 0,void 0,void 0,function*(){var L;try{if(!d){if(!window.Stripe&&(yield Jue("https://js.stripe.com/v3/"),!window.Stripe))throw{};d=window.Stripe}}catch{return console.log("Please include stripe to use payments.")}if($(h))return;const I=A1(u.clientId).name;Re(h,d((L=u.stripe.pk[I])!==null&&L!==void 0?L:u.stripe.pk.DEFAULT)),Re(p,$(h).elements()),g=$(p).create("card",{style:Zue}),g.mount("#cpui-card-element"),g.on("change",M=>{Re(m,M.complete&&!M.error)}),g.on("focus",()=>Re(y,!0)),g.on("blur",()=>Re(y,!1))}));const v=()=>s(void 0,void 0,void 0,function*(){try{if(!$(m))return;o(!0);const L=yield $(h).createToken(g);if(L.error)throw L.error;yield A(L.token.id)}catch(L){Kt(Pt.ERROR,{error:L})}o(!1)}),A=L=>s(void 0,void 0,void 0,function*(){try{const{processPayment:I}=yield Promise.resolve().then(()=>bhe),M=yield I(L);yield Kue(M,i(),a())}catch(I){l(`Payment error: ${I.message||I}`,"failure"),Ut.set({errorMessage:I.message||I}),Zt.set(Xe.ERROR),Kt(Pt.ERROR,{error:I})}});gt(()=>($(m),$e(o()),$e(c())),()=>{Re(r,!$(m)||o()||c())}),gt(()=>$e(i()),()=>{Re(n,(i()/100).toFixed(2))}),mr(),Et();var E=que(),w=He(E);{let L=bt(()=>($(y),$e(A1),Le(()=>({isCardFocused:$(y),onPay:v,currencySymbol:A1(u.clientId).currencySymbol}))));CF(w,{get options(){return $(L)},get isPaymentDisabled(){return $(r)},set isPaymentDisabled(I){Re(r,I)},get isLoading(){return o()},set isLoading(I){o(I)},get totalToPay(){return $(n)},set totalToPay(I){Re(n,I)},$$legacy:!0})}var C=Me(w,2);{var B=L=>{yV(L,{doPayment:A,get stripe(){return $(h)},get stripeElements(){return $(p)},get priceCents(){return i()},get isLoading(){return o()},set isLoading(I){o(I)},$$legacy:!0})};Je(C,L=>{$(h)&&$(p)&&L(B)})}return Ee(t,E),at({get priceCents(){return i()},set priceCents(L){i(L),je()},get isLoading(){return o()},set isLoading(L){o(L),je()},get purchaseConfig(){return a()},set purchaseConfig(L){a(L),je()},get isPriceLoading(){return c()},set isPriceLoading(L){c(L),je()},$set:ut,$on:(L,I)=>lt(e,L,I)})}var Xue=Fe('<div class="crtw-w-full crtw-justify-items-center crtw-my-5"><!></div>');function wV(t,e){if(new.target)return ht({component:wV,...t});ot(e,!1);const[r,n]=kn(),s=()=>It(Mo,"$clientPublicStore",r);var i=this&&this.__awaiter||function(O,j,G,q){function H(Y){return Y instanceof G?Y:new G(function(K){K(Y)})}return new(G||(G=Promise))(function(Y,K){function te(_e){try{ye(q.next(_e))}catch(Ce){K(Ce)}}function oe(_e){try{ye(q.throw(_e))}catch(Ce){K(Ce)}}function ye(_e){_e.done?Y(_e.value):H(_e.value).then(te,oe)}ye((q=q.apply(O,j||[])).next())})};let o=Ge(e,"totalPriceToken",12),a=Ge(e,"purchaseConfig",12),c=Ge(e,"isLoading",12),l=Ge(e,"isPriceLoading",12),u=Ge(e,"pricesByToken",12);const{getCREDContract:d,toastAlert:h}=We(Tr),{chainId:p,clientId:g}=We(wt);let m=De(!1),y=De(BigInt(0)),v=De(),A="",E,w=De(),C,B,L;const I=(O,j)=>i(void 0,void 0,void 0,function*(){try{const{credenzaSellableMinAbi:G}=yield Promise.resolve().then(()=>kl),q=new dr.Contract(O.contractAddress,G,B),H=O.tokenId?O.tokenId:O.typeId,Y=u()[`${O.contractAddress}/${H}`],K=yield E.approve.populateTransaction(yield q.getAddress(),Y);yield d1(K,E);const te=yield q.buyWithToken.populateTransaction(H,O.amount||1,C),oe=yield d1(te,q);h(`<a href="${qU(oe.hash)}" target="_blank">Purchase TX #${j}</a> was created`),Kt(Pt.PAYMENT,{type:Lv.ERC20,data:oe}),Kt(Pt.RECHECK_BALANCE),yield vV({hash:oe.hash,title:a().title,subtitle:a().subtitle,currency:"CRED",amount:+dr.formatUnits(Y,$(w))}),Kt(Pt.RECEIPT,{hash:oe.hash})}catch(G){h(`Payment error: ${G.message||G}`,"failure"),Ut.set({errorMessage:G.message}),Zt.set(Xe.ERROR),Kt(Pt.ERROR,{error:G})}}),M=()=>i(void 0,void 0,void 0,function*(){var O,j;try{if(BigInt(o())>$(y))return;c(!0);const G=[...a().tokens||[],...a().memberships||[]].map((H,Y)=>I(H,Y+1));yield Promise.all(G);const q=We(Wn);q&&xn.track("cp_payment_stored_value",{$email:q.email,$phone:q.phone,chain:p,clientId:g,address:C,location:window.location.href,tokens:a().tokens,memberships:a().memberships,total:o(),description:((O=a()===null||a()===void 0?void 0:a().title)!==null&&O!==void 0?O:"")+`(${(j=a()===null||a()===void 0?void 0:a().subtitle)!==null&&j!==void 0?j:""})`}),yield gE(),o()===0&&Ut.set({subtitle:"Your claim was successful!",receipt:!1}),Zt.set(Xe.PAYMENT_RESULT)}catch(G){h(`Payment error: ${G.message||G}`,"failure"),Ut.set({errorMessage:G.message}),Zt.set(Xe.ERROR),Kt(Pt.ERROR,{error:G})}finally{c(!1)}});Gh(()=>i(void 0,void 0,void 0,function*(){try{Re(m,!0),L=yield d();const O=We(Wr);if(!O)return;B=yield O.getSigner(),E=L.contract,Re(w,L.decimals),[C,A]=yield Promise.all([rn(),E.symbol()]),Re(y,yield E.balanceOf(C)),Re(v,`${dr.formatUnits(BigInt($(y))-BigInt(o()),$(w))} ${_1(A,"cred")}`)}catch(O){console.log(O)}finally{Re(m,!1)}})),Et();var W=nt(),U=He(W);{var x=O=>{var j=Xue(),G=Ie(j);El(G,{}),xe(j),Ee(O,j)},P=O=>{{let j=bt(()=>($(v),$e(dr),$(y),$(w),s(),$e(Zt),$e(Xe),$e(o()),$e(c()),$e(l()),Le(()=>({formattedBalance:$(v),balance:Number((+dr.formatUnits(BigInt($(y)),$(w))).toFixed(2)),credAlias:s()?.ui_settings.cred_alias,onPay:M,onGetCred:()=>Zt.set(Xe.WALLET),totalToPay:(+dr.formatUnits(o(),$(w))).toFixed(2),isLoading:c(),isPaymentDisabled:!Number($(y))||BigInt(o())>$(y)||l()}))));SF(O,{get options(){return $(j)}})}};Je(U,O=>{$(m)?O(x):O(P,!1)})}Ee(t,W);var F=at({get totalPriceToken(){return o()},set totalPriceToken(O){o(O),je()},get purchaseConfig(){return a()},set purchaseConfig(O){a(O),je()},get isLoading(){return c()},set isLoading(O){c(O),je()},get isPriceLoading(){return l()},set isPriceLoading(O){l(O),je()},get pricesByToken(){return u()},set pricesByToken(O){u(O),je()},$set:ut,$on:(O,j)=>lt(e,O,j)});return n(),F}const ehe=JSON.parse('[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"priceToken","type":"uint256"}],"name":"Redeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"addAvailableCurrencyTokenContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"addOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"requestedAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"buyWithEther","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"requestedAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"currencyTokenContract","type":"address"}],"name":"buyWithToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"requestedAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"buyWithToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"clearOwners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAvailableCurrencyTokenContractsList","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBeneficiaryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDefaultCurrencyTokenContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDescription","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"}],"name":"getLicensePriceEther","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"}],"name":"getLicensePriceFiat","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"}],"name":"getLicensePriceToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOwners","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPriceEther","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPriceFiat","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"currencyContract","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPriceToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getPriceToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenLicenseInfo","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTrustedForwarder","outputs":[{"internalType":"address","name":"forwarder","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getVersion","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"image","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"isAvailableCurrencyTokenContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"string","name":"tokenURI","type":"string"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintBatch","outputs":[{"internalType":"uint256[]","name":"arr","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"string","name":"tokenURI","type":"string"},{"internalType":"string","name":"licenseInfo","type":"string"},{"internalType":"uint256","name":"fullLicensePriceFiat","type":"uint256"},{"internalType":"uint256","name":"fullLicensePriceToken","type":"uint256"},{"internalType":"uint256","name":"fullLicensePriceEther","type":"uint256"},{"internalType":"uint256","name":"timeLicensePriceFiat","type":"uint256"},{"internalType":"uint256","name":"timeLicensePriceToken","type":"uint256"},{"internalType":"uint256","name":"timeLicensePriceEther","type":"uint256"},{"internalType":"uint256","name":"oneTimeLicensePriceFiat","type":"uint256"},{"internalType":"uint256","name":"oneTimeLicensePriceToken","type":"uint256"},{"internalType":"uint256","name":"oneTimeLicensePriceEther","type":"uint256"}],"name":"mintWithPrices","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"nonceUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"priceToken","type":"uint256"},{"internalType":"string","name":"licenseInfo","type":"string"},{"internalType":"string","name":"uri","type":"string"}],"internalType":"struct ContentNftContract.ContentNFTVoucher","name":"voucher","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"removeAvailableCurrencyTokenContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"removeOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setBaseUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"addr","type":"address"}],"name":"setBeneficiaryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenContract","type":"address"}],"name":"setDefaultCurrencyTokenContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"description","type":"string"}],"name":"setDescription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newImage","type":"string"}],"name":"setImage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"},{"internalType":"uint256","name":"priceEther","type":"uint256"}],"name":"setLicensePriceEther","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"},{"internalType":"uint256","name":"priceFiat","type":"uint256"}],"name":"setLicensePriceFiat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"enum ContentNftTypes.LicenseType","name":"licenseType","type":"uint8"},{"internalType":"uint256","name":"priceToken","type":"uint256"}],"name":"setLicensePriceToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"newOwner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceEther","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceFiat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"currencyContract","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPriceToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newSymbol","type":"string"}],"name":"setSymbol","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"licenseInfo","type":"string"}],"name":"setTokenLicenseInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURIByIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_forwarder","type":"address"}],"name":"setTrustedForwarder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenURIByIndex","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"}]');var the=Fe('<div slot="credit-card"><!></div>'),rhe=Fe('<div slot="cred-balance"><!></div>'),nhe=Fe("<!> <!>",1);function kV(t,e){if(new.target)return ht({component:kV,...t});ot(e,!1);const[r,n]=kn(),s=()=>It(wt,"$configStore",r),i=()=>It(Wr,"$providerStore",r),o=()=>It(jf,"$contractsStore",r),a=()=>It(Wn,"$userStore",r),c=()=>It(Ut,"$pageOptsStore",r);var l=this&&this.__awaiter||function(M,W,U,x){function P(F){return F instanceof U?F:new U(function(O){O(F)})}return new(U||(U=Promise))(function(F,O){function j(H){try{q(x.next(H))}catch(Y){O(Y)}}function G(H){try{q(x.throw(H))}catch(Y){O(Y)}}function q(H){H.done?F(H.value):P(H.value).then(j,G)}q((x=x.apply(M,W||[])).next())})};const{close:u}=We(Tr),d=We(wt).chainId;let h=De(0),p=De(0),g=De(!1),m=De(!1),y=De({});const v=(M,W,U)=>l(void 0,void 0,void 0,function*(){let x=0,P=0;if(U){const j=new dr.Contract(M,ehe,i());return x=yield j.getLicensePriceFiat(String(W),U).then(G=>Number(G)),P=yield j.getLicensePriceToken(String(W),U).then(G=>Number(G)),[x,P]}const{credenzaSellableMinAbi:F}=yield Promise.resolve().then(()=>kl),O=new dr.Contract(M,F,i());return x=yield O.getPriceFiat(W).then(j=>Number(j)),P=0,x===0?[x,P]=yield Promise.all([O.getPriceFiat(fE).then(j=>Number(j)),O.getPriceToken(fE).then(j=>Number(j))]):P=yield O.getPriceToken(W).then(j=>Number(j)),[x,P]}),A=M=>l(void 0,void 0,void 0,function*(){console.log(M);try{Re(g,!0);for(const W of M)if(W.contractAddress===o().erc20Cred.address)Re(h,$(h)+W.amount*100);else{const U=W.tokenId||W.typeId||W.contentTokenId||fE,x=W.licenseContractAddress||W.contractAddress;let[P,F]=yield v(x,+U,W.licenseType);W?.amount&&W?.amount!==0&&(P*=W.amount,F*=W.amount),Re(h,$(h)+P),Re(p,$(p)+F),HD(y,$(y)[`${x}/${U}`]=F)}}catch(W){Kt(Pt.ERROR,W)}finally{Re(g,!1)}}),E=Ut.subscribe(M=>l(void 0,void 0,void 0,function*(){var W,U,x;!(!((W=M?.tokens)===null||W===void 0)&&W.length)&&!(!((U=M?.memberships)===null||U===void 0)&&U.length)&&!(!((x=M?.licenses)===null||x===void 0)&&x.length)||(yield A([...M?.tokens||[],...M?.memberships||[],...M?.licenses||[]]))}));zh(E),gt(()=>s(),()=>{s().chainId!==d&&u()}),mr(),Et();var w=nhe(),C=He(w);{var B=M=>{var W=nt(),U=He(W);wn(U,()=>Promise.resolve().then(()=>RV),null,(x,P)=>{var F=nt(),O=He(F);hn(O,()=>$(P).default,(j,G)=>{G(j,{})}),Ee(x,F)}),Ee(M,W)};Je(C,M=>{$(m)&&M(B)})}var L=Me(C,2);{let M=bt(()=>(a(),c(),$e(Zt),$e(Xe),$(h),$(g),Le(()=>({user:a(),title:c().title||"Order Summary",subtitle:c().subtitle,onBackClick:()=>Zt.set(Xe.WALLET),isStripeDisabled:c().payments?.stripe?.disabled,isCredezaValueDisabled:!$(h)||c().payments?.credenzaStoredValue?.disabled,isPriceLoading:$(g),totalSumCents:$(h)}))));TF(L,{get options(){return $(M)},get isLoading(){return $(m)},set isLoading(W){Re(m,W)},$$slots:{"credit-card":(W,U)=>{var x=the(),P=Ie(x);bV(P,{get priceCents(){return $(h)},get isPriceLoading(){return $(g)},get purchaseConfig(){return c()},get isLoading(){return $(m)},set isLoading(F){Re(m,F)},$$legacy:!0}),xe(x),Ee(W,x)},"cred-balance":(W,U)=>{var x=rhe(),P=Ie(x);wV(P,{get pricesByToken(){return $(y)},get totalPriceToken(){return $(p)},get isPriceLoading(){return $(g)},get purchaseConfig(){return c()},get isLoading(){return $(m)},set isLoading(F){Re(m,F)},$$legacy:!0}),xe(x),Ee(W,x)}},$$legacy:!0})}Ee(t,w);var I=at({$set:ut,$on:(M,W)=>lt(e,M,W)});return n(),I}const she=Object.freeze(Object.defineProperty({__proto__:null,default:kV},Symbol.toStringTag,{value:"Module"}));function EV(t,e){if(new.target)return ht({component:EV,...t});ot(e,!1);const[r,n]=kn(),s=()=>It(Ut,"$pageOptsStore",r);let i=We(wt);Et();{let a=bt(()=>({title:s()?.title||i.content?.paymentResult?.title||"Success!",subtitle:s()?.subtitle||i.content?.paymentResult?.subtitle||"Your payment was successful!",description:s()?.description||i.content?.paymentResult?.description,orders:s()?.orders||[],tokenImage:s()?.tokenImage||""}));gF(t,{get options(){return $(a)}})}var o=at({$set:ut,$on:(a,c)=>lt(e,a,c)});return n(),o}const ihe=Object.freeze(Object.defineProperty({__proto__:null,default:EV},Symbol.toStringTag,{value:"Module"}));function AV(t,e){if(new.target)return ht({component:AV,...t});ot(e,!1);var r=this&&this.__awaiter||function(a,c,l,u){function d(h){return h instanceof l?h:new l(function(p){p(h)})}return new(l||(l=Promise))(function(h,p){function g(v){try{y(u.next(v))}catch(A){p(A)}}function m(v){try{y(u.throw(v))}catch(A){p(A)}}function y(v){v.done?h(v.value):d(v.value).then(g,m)}y((u=u.apply(a,c||[])).next())})};const{close:n}=We(Tr);let s,i=De(!1);const o=a=>r(void 0,[a],void 0,function*({message:c,sub:l,scanType:u}){switch(s.close(),u){case Xc.PASSPORT_ID_PASS:case Xc.PASSPORT_ID:{const d=JSON.parse(c),{address:h}=yield fL(l);Tie({userAddress:h,amount:d?.amount});break}case Xc.TOKENS_PURCHASE:{dL(JSON.parse(c));break}case Xc.AIR_DROP_ASSET:{yield Cie(JSON.parse(c));break}case Xc.REQUEST_LOYALTY_POINTS:{yield Sie(JSON.parse(c));break}default:n(),Zt.set(null)}});Gh(()=>r(void 0,void 0,void 0,function*(){const{Scanner:a}=yield Promise.resolve().then(()=>gV);s=new a({target:"#cpuiScanner"}),OE(Pt.UI_CLOSED,()=>{s.close(),Zt.set(null)}),yield s.scan({isCloseButton:!1}),Re(i,!0),s.on(a.events.CAPTURE,o),s.on(a.events.ERROR,c=>{(c?.message||c).includes("Permission")&&alert("In order to scan please allow the current page to access your camera and try again.")})})),Et();{let a=bt(()=>({isScannerLoaded:$(i)}));vF(t,{get options(){return $(a)}})}return at({$set:ut,$on:(a,c)=>lt(e,a,c)})}const ohe=Object.freeze(Object.defineProperty({__proto__:null,default:AV},Symbol.toStringTag,{value:"Module"})),ahe="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2027.3.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20500%20500'%20style='enable-background:new%200%200%20500%20500;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23010101;}%20%3c/style%3e%3cpath%20class='st0'%20d='M454.1,479.5l-39.2-358c-0.5-7.2-6.7-12.4-13.9-12.4l-67.6,0V88.6c0-45.9-37.7-83.6-83.6-83.6%20s-83.6,37.7-83.6,83.6v20.6H98.2c-7.2,0-12.9,5.2-13.9,12.4L45,479.5c-0.5,4.1,1,7.7,3.6,10.8c2.6,3.1,6.2,4.6,10.3,4.6h381.7%20c4.1,0,7.7-1.5,10.3-4.6C453.6,487.3,454.6,483.6,454.1,479.5L454.1,479.5z%20M204.4,88.6c0-25.3,20.6-45.4,45.4-45.4%20c24.8,0,45.4,20.6,45.4,45.4v20.6l-90.8,0L204.4,88.6z%20M249.8,406.3c-57.3,0-104.2-46.4-104.2-104.2c0-57.3,46.4-104.2,104.2-104.2%20c57.3,0,104.2,46.4,104.2,104.2C354,359.3,307.1,406.3,249.8,406.3z'/%3e%3cpath%20class='st0'%20d='M295.2,256.7c-7.2-7.2-19.6-7.2-26.8,0l-18.6,18.6l-18.6-18.6c-7.2-7.2-19.6-7.2-26.8,0%20c-7.2,7.2-7.2,19.6,0,26.8l18.6,18.6l-18.6,18.6c-7.2,7.2-7.2,19.6,0,26.8c3.6,3.6,8.8,5.7,13.4,5.7c4.6,0,9.8-2.1,13.4-5.7%20l18.6-18.6l18.6,18.6c3.6,3.6,8.8,5.7,13.4,5.7c4.6,0,9.8-2.1,13.4-5.7c7.2-7.2,7.2-19.6,0-26.8l-18.6-18.6l18.6-18.6%20C302.4,276.3,302.4,264.4,295.2,256.7L295.2,256.7z'/%3e%3c/svg%3e",Al={titles:{DEFAULT_ERROR_TITLE:"Something went wrong",TRANSACTION_REVERTED_TITLE:"The transaction is reverted",SOLD_OUT_ERROR_TITLE:"Sold out",INVALID_TOKEN_ERROR_TITLE:"Invalid token ID"},desctiptions:{DEFAULT_ERROR_DESC:"An unexpected error occured and we are unable to complete your order.",SOLD_OUT_ERROR_DESC:"We are unable to complete your order as the item that you are trying to add is currently sold out.",INVALID_TOKEN_ERROR_DESC:"There is no token associated with provided ID.",HAS_MEMBERSHIP_ALREADY_ERROR_DESC:"This membership is already assosiated with your account."}},che=t=>{let e={};return(t.includes("SOLD_OUT")||t.includes("Sold out"))&&(e={title:Al.titles.SOLD_OUT_ERROR_TITLE,description:Al.desctiptions.SOLD_OUT_ERROR_DESC,image:ahe}),t.includes("invalid token ID")&&(e={title:Al.titles.INVALID_TOKEN_ERROR_TITLE,description:Al.desctiptions.INVALID_TOKEN_ERROR_DESC}),t.includes("ALREADY_HAS_MEMBERSHIP")&&(e={title:Al.titles.TRANSACTION_REVERTED_TITLE,description:Al.desctiptions.HAS_MEMBERSHIP_ALREADY_ERROR_DESC}),e};function _V(t,e){if(new.target)return ht({component:_V,...t});ot(e,!1);const r=()=>We(Tr).close(),{openUI:n}=We(Tr);let s=De();const i=Ut.subscribe(a=>{a.errorMessage?Re(s,Object.assign(Object.assign({},$(s)),che(a.errorMessage))):a.title&&a.description&&Re(s,Object.assign(Object.assign({},$(s)),a))}),o=()=>{const{primaryAction:a}=$(s);let c={tokens:[{contractAddress:a?.contractAddress,tokenId:a?.tokenId}]},l={memberships:[{contractAddress:a?.contractAddress,typeId:a?.typeId}]};n(Xe.PAYMENT,Object.assign({title:a?.text,subtitle:""},a?.typeId?l:c))};zh(i),Et();{let a=bt(()=>({title:$(s)?.title||Al.titles.DEFAULT_ERROR_TITLE,description:$(s)?.description||Al.desctiptions.DEFAULT_ERROR_DESC,image:$(s)?.image,shouldRenderBackButton:$(s)?.shouldRenderBackButton,onCloseClick:r,secondaryAction:$(s)?.secondaryAction,primaryActionText:$(s)?.primaryAction?.text,openPaymentFunction:o}));oF(t,{get options(){return $(a)}})}return at({$set:ut,$on:(a,c)=>lt(e,a,c)})}const lhe=Object.freeze(Object.defineProperty({__proto__:null,default:_V},Symbol.toStringTag,{value:"Module"}));var uhe=Fe("<button> </button>"),hhe=Fe(`<a class="crtw-flex crtw-justify-center crtw-items-center crtw-w-full crtw-h-[50px] crtw-cursor-pointer
|
|
689
689
|
crtw-border-2 crtw-border-black crtw-rounded crtw-font-['Poppins'] crtw-text-base crtw-font-medium"> </a>`),dhe=Fe(`<div class="crtw-flex crtw-flex-col crtw-justify-start crtw-items-start crtw-w-full crtw-mx-[50px]"><img alt="credenza-logo" class="crtw-w-[200px] crtw-mx-auto"/> <div class="crtw-flex crtw-flex-col crtw-justify-start crtw-items-start crtw-font-['Poppins'] crtw-w-full crtw-mt-[36px]"><span class="crtw-text-[24px] crtw-text-[#313a2c] crtw-font-medium"> </span> <span class="crtw-text-base crtw-text-[#747474] crtw-mb-1"> </span></div> <div class="crtw-flex crtw-flex crtw-gap-[6px] crtw-w-full crtw-items-center crtw-mb-[100px] crtw-mt-[30px]"><!> <button> </button></div></div>`);function TV(t,e){if(new.target)return ht({component:TV,...t});ot(e,!1);let r=Ge(e,"options",12),n=De(),s=De(),i=De();const{close:o}=We(Tr),a=`crtw-px-[36px] crtw-flex crtw-justify-center crtw-items-center crtw-bg-black crtw-text-white crtw-h-[50px] crtw-cursor-pointer
|
|
690
690
|
crtw-border-0 crtw-rounded crtw-font-['Poppins'] crtw-text-sm crtw-font-medium`;gt(()=>($e(r()),$(n),$(s),$(i)),()=>{r()&&(w=>{Re(n,w.title),Re(s,w.description),Re(i,w.action)})(r())}),mr(),Et();var c=dhe(),l=Ie(c),u=Me(l,2),d=Ie(u),h=Ie(d,!0);xe(d);var p=Me(d,2),g=Ie(p,!0);xe(p),xe(u);var m=Me(u,2),y=Ie(m);{var v=w=>{var C=nt(),B=He(C);{var L=M=>{var W=uhe();Fr(W,1,A3(a));var U=Ie(W,!0);xe(W),Ye(()=>pt(U,($(i),Le(()=>$(i).text)))),un("click",W,function(...x){$(i).onClick?.apply(this,x)}),Ee(M,W)},I=M=>{var W=nt(),U=He(W);{var x=P=>{var F=hhe(),O=Ie(F,!0);xe(F),Ye(()=>{kt(F,"href",($(i),Le(()=>$(i)?.link))),pt(O,($(i),Le(()=>$(i)?.text)))}),Ee(P,F)};Je(U,P=>{$(i),Le(()=>$(i)?.link)&&P(x)},!0)}Ee(M,W)};Je(B,M=>{$(i),Le(()=>$(i)?.onClick)?M(L):M(I,!1)})}Ee(w,C)};Je(y,w=>{$(i)&&w(v)})}var A=Me(y,2);Fr(A,1,A3(a));var E=Ie(A,!0);return xe(A),xe(m),xe(c),Ye(()=>{kt(l,"src",tF),pt(h,$(n)),pt(g,$(s)),pt(E,($e(r()),Le(()=>r().closeButtonText||"Close")))}),un("click",A,o),Ee(t,c),at({get options(){return r()},set options(w){r(w),je()},$set:ut,$on:(w,C)=>lt(e,w,C)})}function CV(t,e){if(new.target)return ht({component:CV,...t});ot(e,!1);let r=De();const n=Ut.subscribe(s=>{Re(r,Object.assign(Object.assign({},$(r)),s.richAlertData))});zh(n),Et();{let s=bt(()=>({title:$(r).title||"Notification",description:$(r).description||"Choose your next steps",action:$(r).action,closeButtonText:$(r).closeButtonText}));TV(t,{get options(){return $(s)}})}return at({$set:ut,$on:(s,i)=>lt(e,s,i)})}const fhe=Object.freeze(Object.defineProperty({__proto__:null,default:CV},Symbol.toStringTag,{value:"Module"}));function SV(t,e){if(new.target)return ht({component:SV,...t});ot(e,!1);const[r,n]=kn(),s=()=>It(Ut,"$pageOptsStore",r);var i,o,a,c;const l=((i=We(Ut))===null||i===void 0?void 0:i.loaderText)||NU,u=((o=We(Ut))===null||o===void 0?void 0:o.progressVideos)||((c=(a=We(wt))===null||a===void 0?void 0:a.content)===null||c===void 0?void 0:c.progressVideos)||[pE];let d=De(pE);Gh(()=>{const p=Math.floor(Math.random()*u.length);Re(d,Kce(u[p].src)?u[p]:pE)}),Et();{let p=bt(()=>({text:l,selected:$(d),onSetVideoEnded:Nne}));sF(t,{get options(){return $(p)},get isProgressFinished(){return s().isProgressFinished},set isProgressFinished(g){EW(Ut,Le(s).isProgressFinished=g,Le(s))},$$legacy:!0})}var h=at({$set:ut,$on:(p,g)=>lt(e,p,g)});return n(),h}const RV=Object.freeze(Object.defineProperty({__proto__:null,default:SV},Symbol.toStringTag,{value:"Module"})),phe=t=>{const{chainId:e}=We(wt);switch(e){case Qe.POLYGON_AMOY:return{scanName:"Polygonscan",scanIcon:"https://amoy.polygonscan.com/assets/poly/images/svg/logos/polygon-chain.svg?v=23.11.1.0",scanLink:Yt[Qe.POLYGON_AMOY].scanUrl+"/address/"+t,nftsIcon:"https://opensea.io/static/images/logos/opensea.svg",nftsLink:"https://testnets.opensea.io/"+t,passportLink:"https://passport.testnets.credenza3.com"};case Qe.CHILIZ_SPICY:return{scanName:"Explorer",scanIcon:"https://cloudflare-ipfs.com/ipfs/bafkreic5h74pwuf3ony3c5zmqoenps4pxj7l5q5j3o2mdcflfpb7g5tivy",scanLink:Yt[Qe.CHILIZ_SPICY].scanUrl+"/address/"+t,passportLink:"https://passport.testnets.credenza3.com"};case Qe.CHILIZ:return{scanName:"Explorer",scanIcon:"https://cloudflare-ipfs.com/ipfs/bafkreic5h74pwuf3ony3c5zmqoenps4pxj7l5q5j3o2mdcflfpb7g5tivy",scanLink:Yt[Qe.CHILIZ].scanUrl+"/address/"+t,passportLink:"https://passport.credenza3.com"};case Qe.AVALANCHE_FUJI:return{scanName:"Explorer",scanIcon:"https://cryptologos.cc/logos/avalanche-avax-logo.svg?v=040",scanLink:Yt[Qe.AVALANCHE_FUJI].scanUrl+"/address/"+t,passportLink:"https://passport.testnets.credenza3.com",nftsIcon:"https://opensea.io/static/images/logos/opensea.svg",nftsLink:"https://testnets.opensea.io/"+t};case Qe.AVALANCHE:return{scanName:"Explorer",scanIcon:"https://cryptologos.cc/logos/avalanche-avax-logo.svg?v=040",scanLink:Yt[Qe.AVALANCHE].scanUrl+"/address/"+t,passportLink:"https://passport.credenza3.com",nftsIcon:"https://opensea.io/static/images/logos/opensea.svg",nftsLink:"https://opensea.io/"+t};case Qe.BASE:return{scanName:"Explorer",scanIcon:"https://cdn.brandfetch.io/id6XsSOVVS/theme/dark/logo.svg?c=1dxbfHSJFAPEGdCLU4o5B",scanLink:Yt[Qe.BASE].scanUrl+"/address/"+t,passportLink:"https://passport.credenza3.com",nftsIcon:"https://opensea.io/static/images/logos/opensea.svg",nftsLink:"https://opensea.io/"+t};case Qe.BASE_SEPOLIA:return{scanName:"Explorer",scanIcon:"https://cdn.brandfetch.io/id6XsSOVVS/theme/dark/logo.svg?c=1dxbfHSJFAPEGdCLU4o5B",scanLink:Yt[Qe.BASE_SEPOLIA].scanUrl+"/address/"+t,passportLink:"https://passport.testnets.credenza3.com",nftsIcon:"https://opensea.io/static/images/logos/opensea.svg",nftsLink:"https://testnets.opensea.io/"+t};case Qe.POLYGON:default:return{scanName:"Polygonscan",scanIcon:Yt[Qe.POLYGON].scanUrl+"/assets/poly/images/svg/logos/polygon-chain.svg?v=23.11.1.0",scanLink:Yt[Qe.POLYGON].scanUrl+"/address/"+t,nftsIcon:"https://opensea.io/static/images/logos/opensea.svg",nftsLink:"https://opensea.io/"+t,passportLink:"https://passport.credenza3.com"}}};function PV(t,e){if(new.target)return ht({component:PV,...t});ot(e,!1);const[r,n]=kn(),s=()=>It(wt,"$configStore",r),i=()=>It(Mo,"$clientPublicStore",r),o=()=>It(Wn,"$userStore",r);var a=this&&this.__awaiter||function(m,y,v,A){function E(w){return w instanceof v?w:new v(function(C){C(w)})}return new(v||(v=Promise))(function(w,C){function B(M){try{I(A.next(M))}catch(W){C(W)}}function L(M){try{I(A.throw(M))}catch(W){C(W)}}function I(M){M.done?w(M.value):E(M.value).then(B,L)}I((A=A.apply(m,y||[])).next())})};const{getCREDContract:c,checkMembership:l}=We(Tr);let u=De({}),d=De(null),h=De(null);const p=()=>a(void 0,void 0,void 0,function*(){const m=yield rn();Re(u,phe(m));try{const{isMember:y}=yield l(m);y&&Re(h,yield Iie())}catch{Re(h,null)}if(s().buyTokens!==!1)try{const{contract:y,decimals:v,address:A}=yield c(),[E,w]=yield Promise.all([y.balanceOf(m).then(C=>dr.formatUnits(C,v)),y.symbol()]);Re(d,`${E} ${w}`),xn.track("cp_profile_balance_read",{chain:s().chainId,contract:A,decimals:v,balance:E,symbol:w})}catch{Re(d,"-")}});gt(()=>s(),()=>{s().chainId&&p()}),mr(),Et();{let m=bt(()=>($(u),$(h),$e(We),$e(wt),$e(Zt),$e(Xe),$e(Za),$(d),i(),o(),$e(rn),Le(()=>({links:$(u),gitbookToken:$(h),gitbookUrl:We(wt).credenza.gitbookUrl,onSignOut:()=>Zt.set(Xe.LOGOUT),onUpdateProfile:()=>Za.set(Xe.UPDATE_PROFILE),balance:$(d),storedValueAlias:i()?.ui_settings.stored_value_alias,userData:o(),userAddress:rn()}))));yF(t,{get options(){return $(m)}})}var g=at({$set:ut,$on:(m,y)=>lt(e,m,y)});return n(),g}const ghe=Object.freeze(Object.defineProperty({__proto__:null,default:PV},Symbol.toStringTag,{value:"Module"})),mhe=Object.freeze(Object.defineProperty({__proto__:null,createWorker:()=>new Worker(URL.createObjectURL(new Blob([`class x{constructor(a,b){this.width=b;this.height=a.length/b;this.data=a}static createEmpty(a,b){return new x(new Uint8ClampedArray(a*b),a)}get(a,b){return 0>a||a>=this.width||0>b||b>=this.height?!1:!!this.data[b*this.width+a]}set(a,b,c){this.data[b*this.width+a]=c?1:0}setRegion(a,b,c,d,e){for(let f=b;f<b+d;f++)for(let g=a;g<a+c;g++)this.set(g,f,!!e)}}
|
|
691
691
|
class A{constructor(a,b,c){this.width=a;a*=b;if(c&&c.length!==a)throw Error("Wrong buffer size");this.data=c||new Uint8ClampedArray(a)}get(a,b){return this.data[b*this.width+a]}set(a,b,c){this.data[b*this.width+a]=c}}
|