@adland/embed 0.1.2 → 0.1.3
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/CHANGELOG.md +13 -0
- package/dist/adland-farcaster.js +53 -52
- package/dist/adland-farcaster.js.map +1 -1
- package/dist/adland.js +44 -43
- package/dist/adland.js.map +1 -1
- package/package.json +3 -3
package/dist/adland-farcaster.js
CHANGED
|
@@ -1,73 +1,74 @@
|
|
|
1
1
|
(function(){'use strict';globalThis.process||(globalThis.process={env:{}});
|
|
2
|
-
var pO=Object.create;var bp=Object.defineProperty;var mO=Object.getOwnPropertyDescriptor;var hO=Object.getOwnPropertyNames;var gO=Object.getPrototypeOf,yO=Object.prototype.hasOwnProperty;var j=(e,t)=>()=>(e&&(t=e(e=0)),t);var Gr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ir=(e,t)=>{for(var r in t)bp(e,r,{get:t[r],enumerable:true});},gE=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of hO(t))!yO.call(e,n)&&n!==r&&bp(e,n,{get:()=>t[n],enumerable:!(o=mO(t,n))||o.enumerable});return e};var Ho=(e,t,r)=>(r=e!=null?pO(gO(e)):{},gE(t||!e||!e.__esModule?bp(r,"default",{value:e,enumerable:true}):r,e)),yE=e=>gE(bp({},"__esModule",{value:true}),e);var UE=Gr(Ap=>{Ap.byteLength=sP;Ap.toByteArray=cP;Ap.fromByteArray=lP;var yo=[],kn=[],iP=typeof Uint8Array<"u"?Uint8Array:Array,Qy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Ks=0,zE=Qy.length;Ks<zE;++Ks)yo[Ks]=Qy[Ks],kn[Qy.charCodeAt(Ks)]=Ks;var Ks,zE;kn[45]=62;kn[95]=63;function LE(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var o=r===t?0:4-r%4;return [r,o]}function sP(e){var t=LE(e),r=t[0],o=t[1];return (r+o)*3/4-o}function aP(e,t,r){return (t+r)*3/4-r}function cP(e){var t,r=LE(e),o=r[0],n=r[1],i=new iP(aP(e,o,n)),s=0,a=n>0?o-4:o,c;for(c=0;c<a;c+=4)t=kn[e.charCodeAt(c)]<<18|kn[e.charCodeAt(c+1)]<<12|kn[e.charCodeAt(c+2)]<<6|kn[e.charCodeAt(c+3)],i[s++]=t>>16&255,i[s++]=t>>8&255,i[s++]=t&255;return n===2&&(t=kn[e.charCodeAt(c)]<<2|kn[e.charCodeAt(c+1)]>>4,i[s++]=t&255),n===1&&(t=kn[e.charCodeAt(c)]<<10|kn[e.charCodeAt(c+1)]<<4|kn[e.charCodeAt(c+2)]>>2,i[s++]=t>>8&255,i[s++]=t&255),i}function uP(e){return yo[e>>18&63]+yo[e>>12&63]+yo[e>>6&63]+yo[e&63]}function fP(e,t,r){for(var o,n=[],i=t;i<r;i+=3)o=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255),n.push(uP(o));return n.join("")}function lP(e){for(var t,r=e.length,o=r%3,n=[],i=16383,s=0,a=r-o;s<a;s+=i)n.push(fP(e,s,s+i>a?a:s+i));return o===1?(t=e[r-1],n.push(yo[t>>2]+yo[t<<4&63]+"==")):o===2&&(t=(e[r-2]<<8)+e[r-1],n.push(yo[t>>10]+yo[t>>4&63]+yo[t<<2&63]+"=")),n.join("")}});var ME=Gr(eb=>{eb.read=function(e,t,r,o,n){var i,s,a=n*8-o-1,c=(1<<a)-1,u=c>>1,l=-7,d=r?n-1:0,g=r?-1:1,h=e[t+d];for(d+=g,i=h&(1<<-l)-1,h>>=-l,l+=a;l>0;i=i*256+e[t+d],d+=g,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=o;l>0;s=s*256+e[t+d],d+=g,l-=8);if(i===0)i=1-u;else {if(i===c)return s?NaN:(h?-1:1)*(1/0);s=s+Math.pow(2,o),i=i-u;}return (h?-1:1)*s*Math.pow(2,i-o)};eb.write=function(e,t,r,o,n,i){var s,a,c,u=i*8-n-1,l=(1<<u)-1,d=l>>1,g=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=o?0:i-1,v=o?1:-1,E=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+d>=1?t+=g/c:t+=g*Math.pow(2,1-d),t*c>=2&&(s++,c/=2),s+d>=l?(a=0,s=l):s+d>=1?(a=(t*c-1)*Math.pow(2,n),s=s+d):(a=t*Math.pow(2,d-1)*Math.pow(2,n),s=0));n>=8;e[r+h]=a&255,h+=v,a/=256,n-=8);for(s=s<<n|a,u+=n;u>0;e[r+h]=s&255,h+=v,s/=256,u-=8);e[r+h-v]|=E*128;};});var If=Gr(ac=>{var tb=UE(),ic=ME(),DE=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;ac.Buffer=H;ac.SlowBuffer=yP;ac.INSPECT_MAX_BYTES=50;var kp=2147483647;ac.kMaxLength=kp;H.TYPED_ARRAY_SUPPORT=dP();!H.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 dP(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return false}}Object.defineProperty(H.prototype,"parent",{enumerable:true,get:function(){if(H.isBuffer(this))return this.buffer}});Object.defineProperty(H.prototype,"offset",{enumerable:true,get:function(){if(H.isBuffer(this))return this.byteOffset}});function Wo(e){if(e>kp)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,H.prototype),t}function H(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return ib(e)}return VE(e,t,r)}H.poolSize=8192;function VE(e,t,r){if(typeof e=="string")return mP(e,t);if(ArrayBuffer.isView(e))return hP(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(bo(e,ArrayBuffer)||e&&bo(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(bo(e,SharedArrayBuffer)||e&&bo(e.buffer,SharedArrayBuffer)))return nb(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let o=e.valueOf&&e.valueOf();if(o!=null&&o!==e)return H.from(o,t,r);let n=gP(e);if(n)return n;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return H.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}H.from=function(e,t,r){return VE(e,t,r)};Object.setPrototypeOf(H.prototype,Uint8Array.prototype);Object.setPrototypeOf(H,Uint8Array);function ZE(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function pP(e,t,r){return ZE(e),e<=0?Wo(e):t!==void 0?typeof r=="string"?Wo(e).fill(t,r):Wo(e).fill(t):Wo(e)}H.alloc=function(e,t,r){return pP(e,t,r)};function ib(e){return ZE(e),Wo(e<0?0:sb(e)|0)}H.allocUnsafe=function(e){return ib(e)};H.allocUnsafeSlow=function(e){return ib(e)};function mP(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!H.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=GE(e,t)|0,o=Wo(r),n=o.write(e,t);return n!==r&&(o=o.slice(0,n)),o}function rb(e){let t=e.length<0?0:sb(e.length)|0,r=Wo(t);for(let o=0;o<t;o+=1)r[o]=e[o]&255;return r}function hP(e){if(bo(e,Uint8Array)){let t=new Uint8Array(e);return nb(t.buffer,t.byteOffset,t.byteLength)}return rb(e)}function nb(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let o;return t===void 0&&r===void 0?o=new Uint8Array(e):r===void 0?o=new Uint8Array(e,t):o=new Uint8Array(e,t,r),Object.setPrototypeOf(o,H.prototype),o}function gP(e){if(H.isBuffer(e)){let t=sb(e.length)|0,r=Wo(t);return r.length===0||e.copy(r,0,0,t),r}if(e.length!==void 0)return typeof e.length!="number"||cb(e.length)?Wo(0):rb(e);if(e.type==="Buffer"&&Array.isArray(e.data))return rb(e.data)}function sb(e){if(e>=kp)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kp.toString(16)+" bytes");return e|0}function yP(e){return +e!=e&&(e=0),H.alloc(+e)}H.isBuffer=function(t){return t!=null&&t._isBuffer===true&&t!==H.prototype};H.compare=function(t,r){if(bo(t,Uint8Array)&&(t=H.from(t,t.offset,t.byteLength)),bo(r,Uint8Array)&&(r=H.from(r,r.offset,r.byteLength)),!H.isBuffer(t)||!H.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let o=t.length,n=r.length;for(let i=0,s=Math.min(o,n);i<s;++i)if(t[i]!==r[i]){o=t[i],n=r[i];break}return o<n?-1:n<o?1:0};H.isEncoding=function(t){switch(String(t).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 true;default:return false}};H.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return H.alloc(0);let o;if(r===void 0)for(r=0,o=0;o<t.length;++o)r+=t[o].length;let n=H.allocUnsafe(r),i=0;for(o=0;o<t.length;++o){let s=t[o];if(bo(s,Uint8Array))i+s.length>n.length?(H.isBuffer(s)||(s=H.from(s)),s.copy(n,i)):Uint8Array.prototype.set.call(n,s,i);else if(H.isBuffer(s))s.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=s.length;}return n};function GE(e,t){if(H.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||bo(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,o=arguments.length>2&&arguments[2]===true;if(!o&&r===0)return 0;let n=false;for(;;)switch(t){case "ascii":case "latin1":case "binary":return r;case "utf8":case "utf-8":return ob(e).length;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return r*2;case "hex":return r>>>1;case "base64":return tS(e).length;default:if(n)return o?-1:ob(e).length;t=(""+t).toLowerCase(),n=true;}}H.byteLength=GE;function bP(e,t,r){let o=false;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return "";for(e||(e="utf8");;)switch(e){case "hex":return RP(this,t,r);case "utf8":case "utf-8":return WE(this,t,r);case "ascii":return AP(this,t,r);case "latin1":case "binary":return kP(this,t,r);case "base64":return SP(this,t,r);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return TP(this,t,r);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=true;}}H.prototype._isBuffer=true;function Js(e,t,r){let o=e[t];e[t]=e[r],e[r]=o;}H.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<t;r+=2)Js(this,r,r+1);return this};H.prototype.swap32=function(){let t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<t;r+=4)Js(this,r,r+3),Js(this,r+1,r+2);return this};H.prototype.swap64=function(){let t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<t;r+=8)Js(this,r,r+7),Js(this,r+1,r+6),Js(this,r+2,r+5),Js(this,r+3,r+4);return this};H.prototype.toString=function(){let t=this.length;return t===0?"":arguments.length===0?WE(this,0,t):bP.apply(this,arguments)};H.prototype.toLocaleString=H.prototype.toString;H.prototype.equals=function(t){if(!H.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?true:H.compare(this,t)===0};H.prototype.inspect=function(){let t="",r=ac.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"};DE&&(H.prototype[DE]=H.prototype.inspect);H.prototype.compare=function(t,r,o,n,i){if(bo(t,Uint8Array)&&(t=H.from(t,t.offset,t.byteLength)),!H.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),o===void 0&&(o=t?t.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),r<0||o>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=o)return 0;if(n>=i)return -1;if(r>=o)return 1;if(r>>>=0,o>>>=0,n>>>=0,i>>>=0,this===t)return 0;let s=i-n,a=o-r,c=Math.min(s,a),u=this.slice(n,i),l=t.slice(r,o);for(let d=0;d<c;++d)if(u[d]!==l[d]){s=u[d],a=l[d];break}return s<a?-1:a<s?1:0};function qE(e,t,r,o,n){if(e.length===0)return -1;if(typeof r=="string"?(o=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,cb(r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return -1;r=e.length-1;}else if(r<0)if(n)r=0;else return -1;if(typeof t=="string"&&(t=H.from(t,o)),H.isBuffer(t))return t.length===0?-1:jE(e,t,r,o,n);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):jE(e,[t],r,o,n);throw new TypeError("val must be string, number or Buffer")}function jE(e,t,r,o,n){let i=1,s=e.length,a=t.length;if(o!==void 0&&(o=String(o).toLowerCase(),o==="ucs2"||o==="ucs-2"||o==="utf16le"||o==="utf-16le")){if(e.length<2||t.length<2)return -1;i=2,s/=2,a/=2,r/=2;}function c(l,d){return i===1?l[d]:l.readUInt16BE(d*i)}let u;if(n){let l=-1;for(u=r;u<s;u++)if(c(e,u)===c(t,l===-1?0:u-l)){if(l===-1&&(l=u),u-l+1===a)return l*i}else l!==-1&&(u-=u-l),l=-1;}else for(r+a>s&&(r=s-a),u=r;u>=0;u--){let l=true;for(let d=0;d<a;d++)if(c(e,u+d)!==c(t,d)){l=false;break}if(l)return u}return -1}H.prototype.includes=function(t,r,o){return this.indexOf(t,r,o)!==-1};H.prototype.indexOf=function(t,r,o){return qE(this,t,r,o,true)};H.prototype.lastIndexOf=function(t,r,o){return qE(this,t,r,o,false)};function xP(e,t,r,o){r=Number(r)||0;let n=e.length-r;o?(o=Number(o),o>n&&(o=n)):o=n;let i=t.length;o>i/2&&(o=i/2);let s;for(s=0;s<o;++s){let a=parseInt(t.substr(s*2,2),16);if(cb(a))return s;e[r+s]=a;}return s}function vP(e,t,r,o){return Rp(ob(t,e.length-r),e,r,o)}function _P(e,t,r,o){return Rp(PP(t),e,r,o)}function wP(e,t,r,o){return Rp(tS(t),e,r,o)}function EP(e,t,r,o){return Rp(BP(t,e.length-r),e,r,o)}H.prototype.write=function(t,r,o,n){if(r===void 0)n="utf8",o=this.length,r=0;else if(o===void 0&&typeof r=="string")n=r,o=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(o)?(o=o>>>0,n===void 0&&(n="utf8")):(n=o,o=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-r;if((o===void 0||o>i)&&(o=i),t.length>0&&(o<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let s=false;for(;;)switch(n){case "hex":return xP(this,t,r,o);case "utf8":case "utf-8":return vP(this,t,r,o);case "ascii":case "latin1":case "binary":return _P(this,t,r,o);case "base64":return wP(this,t,r,o);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return EP(this,t,r,o);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=true;}};H.prototype.toJSON=function(){return {type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function SP(e,t,r){return t===0&&r===e.length?tb.fromByteArray(e):tb.fromByteArray(e.slice(t,r))}function WE(e,t,r){r=Math.min(e.length,r);let o=[],n=t;for(;n<r;){let i=e[n],s=null,a=i>239?4:i>223?3:i>191?2:1;if(n+a<=r){let c,u,l,d;switch(a){case 1:i<128&&(s=i);break;case 2:c=e[n+1],(c&192)===128&&(d=(i&31)<<6|c&63,d>127&&(s=d));break;case 3:c=e[n+1],u=e[n+2],(c&192)===128&&(u&192)===128&&(d=(i&15)<<12|(c&63)<<6|u&63,d>2047&&(d<55296||d>57343)&&(s=d));break;case 4:c=e[n+1],u=e[n+2],l=e[n+3],(c&192)===128&&(u&192)===128&&(l&192)===128&&(d=(i&15)<<18|(c&63)<<12|(u&63)<<6|l&63,d>65535&&d<1114112&&(s=d));}}s===null?(s=65533,a=1):s>65535&&(s-=65536,o.push(s>>>10&1023|55296),s=56320|s&1023),o.push(s),n+=a;}return IP(o)}var FE=4096;function IP(e){let t=e.length;if(t<=FE)return String.fromCharCode.apply(String,e);let r="",o=0;for(;o<t;)r+=String.fromCharCode.apply(String,e.slice(o,o+=FE));return r}function AP(e,t,r){let o="";r=Math.min(e.length,r);for(let n=t;n<r;++n)o+=String.fromCharCode(e[n]&127);return o}function kP(e,t,r){let o="";r=Math.min(e.length,r);for(let n=t;n<r;++n)o+=String.fromCharCode(e[n]);return o}function RP(e,t,r){let o=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>o)&&(r=o);let n="";for(let i=t;i<r;++i)n+=CP[e[i]];return n}function TP(e,t,r){let o=e.slice(t,r),n="";for(let i=0;i<o.length-1;i+=2)n+=String.fromCharCode(o[i]+o[i+1]*256);return n}H.prototype.slice=function(t,r){let o=this.length;t=~~t,r=r===void 0?o:~~r,t<0?(t+=o,t<0&&(t=0)):t>o&&(t=o),r<0?(r+=o,r<0&&(r=0)):r>o&&(r=o),r<t&&(r=t);let n=this.subarray(t,r);return Object.setPrototypeOf(n,H.prototype),n};function or(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}H.prototype.readUintLE=H.prototype.readUIntLE=function(t,r,o){t=t>>>0,r=r>>>0,o||or(t,r,this.length);let n=this[t],i=1,s=0;for(;++s<r&&(i*=256);)n+=this[t+s]*i;return n};H.prototype.readUintBE=H.prototype.readUIntBE=function(t,r,o){t=t>>>0,r=r>>>0,o||or(t,r,this.length);let n=this[t+--r],i=1;for(;r>0&&(i*=256);)n+=this[t+--r]*i;return n};H.prototype.readUint8=H.prototype.readUInt8=function(t,r){return t=t>>>0,r||or(t,1,this.length),this[t]};H.prototype.readUint16LE=H.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||or(t,2,this.length),this[t]|this[t+1]<<8};H.prototype.readUint16BE=H.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||or(t,2,this.length),this[t]<<8|this[t+1]};H.prototype.readUint32LE=H.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||or(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};H.prototype.readUint32BE=H.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||or(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};H.prototype.readBigUInt64LE=zi(function(t){t=t>>>0,sc(t,"offset");let r=this[t],o=this[t+7];(r===void 0||o===void 0)&&Sf(t,this.length-8);let n=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,i=this[++t]+this[++t]*2**8+this[++t]*2**16+o*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))});H.prototype.readBigUInt64BE=zi(function(t){t=t>>>0,sc(t,"offset");let r=this[t],o=this[t+7];(r===void 0||o===void 0)&&Sf(t,this.length-8);let n=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],i=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+o;return (BigInt(n)<<BigInt(32))+BigInt(i)});H.prototype.readIntLE=function(t,r,o){t=t>>>0,r=r>>>0,o||or(t,r,this.length);let n=this[t],i=1,s=0;for(;++s<r&&(i*=256);)n+=this[t+s]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*r)),n};H.prototype.readIntBE=function(t,r,o){t=t>>>0,r=r>>>0,o||or(t,r,this.length);let n=r,i=1,s=this[t+--n];for(;n>0&&(i*=256);)s+=this[t+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*r)),s};H.prototype.readInt8=function(t,r){return t=t>>>0,r||or(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};H.prototype.readInt16LE=function(t,r){t=t>>>0,r||or(t,2,this.length);let o=this[t]|this[t+1]<<8;return o&32768?o|4294901760:o};H.prototype.readInt16BE=function(t,r){t=t>>>0,r||or(t,2,this.length);let o=this[t+1]|this[t]<<8;return o&32768?o|4294901760:o};H.prototype.readInt32LE=function(t,r){return t=t>>>0,r||or(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};H.prototype.readInt32BE=function(t,r){return t=t>>>0,r||or(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};H.prototype.readBigInt64LE=zi(function(t){t=t>>>0,sc(t,"offset");let r=this[t],o=this[t+7];(r===void 0||o===void 0)&&Sf(t,this.length-8);let n=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(o<<24);return (BigInt(n)<<BigInt(32))+BigInt(r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)});H.prototype.readBigInt64BE=zi(function(t){t=t>>>0,sc(t,"offset");let r=this[t],o=this[t+7];(r===void 0||o===void 0)&&Sf(t,this.length-8);let n=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return (BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+o)});H.prototype.readFloatLE=function(t,r){return t=t>>>0,r||or(t,4,this.length),ic.read(this,t,true,23,4)};H.prototype.readFloatBE=function(t,r){return t=t>>>0,r||or(t,4,this.length),ic.read(this,t,false,23,4)};H.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||or(t,8,this.length),ic.read(this,t,true,52,8)};H.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||or(t,8,this.length),ic.read(this,t,false,52,8)};function Kr(e,t,r,o,n,i){if(!H.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<i)throw new RangeError('"value" argument is out of bounds');if(r+o>e.length)throw new RangeError("Index out of range")}H.prototype.writeUintLE=H.prototype.writeUIntLE=function(t,r,o,n){if(t=+t,r=r>>>0,o=o>>>0,!n){let a=Math.pow(2,8*o)-1;Kr(this,t,r,o,a,0);}let i=1,s=0;for(this[r]=t&255;++s<o&&(i*=256);)this[r+s]=t/i&255;return r+o};H.prototype.writeUintBE=H.prototype.writeUIntBE=function(t,r,o,n){if(t=+t,r=r>>>0,o=o>>>0,!n){let a=Math.pow(2,8*o)-1;Kr(this,t,r,o,a,0);}let i=o-1,s=1;for(this[r+i]=t&255;--i>=0&&(s*=256);)this[r+i]=t/s&255;return r+o};H.prototype.writeUint8=H.prototype.writeUInt8=function(t,r,o){return t=+t,r=r>>>0,o||Kr(this,t,r,1,255,0),this[r]=t&255,r+1};H.prototype.writeUint16LE=H.prototype.writeUInt16LE=function(t,r,o){return t=+t,r=r>>>0,o||Kr(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};H.prototype.writeUint16BE=H.prototype.writeUInt16BE=function(t,r,o){return t=+t,r=r>>>0,o||Kr(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};H.prototype.writeUint32LE=H.prototype.writeUInt32LE=function(t,r,o){return t=+t,r=r>>>0,o||Kr(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};H.prototype.writeUint32BE=H.prototype.writeUInt32BE=function(t,r,o){return t=+t,r=r>>>0,o||Kr(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function KE(e,t,r,o,n){eS(t,o,n,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function JE(e,t,r,o,n){eS(t,o,n,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i=i>>8,e[r+6]=i,i=i>>8,e[r+5]=i,i=i>>8,e[r+4]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}H.prototype.writeBigUInt64LE=zi(function(t,r=0){return KE(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});H.prototype.writeBigUInt64BE=zi(function(t,r=0){return JE(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});H.prototype.writeIntLE=function(t,r,o,n){if(t=+t,r=r>>>0,!n){let c=Math.pow(2,8*o-1);Kr(this,t,r,o,c-1,-c);}let i=0,s=1,a=0;for(this[r]=t&255;++i<o&&(s*=256);)t<0&&a===0&&this[r+i-1]!==0&&(a=1),this[r+i]=(t/s>>0)-a&255;return r+o};H.prototype.writeIntBE=function(t,r,o,n){if(t=+t,r=r>>>0,!n){let c=Math.pow(2,8*o-1);Kr(this,t,r,o,c-1,-c);}let i=o-1,s=1,a=0;for(this[r+i]=t&255;--i>=0&&(s*=256);)t<0&&a===0&&this[r+i+1]!==0&&(a=1),this[r+i]=(t/s>>0)-a&255;return r+o};H.prototype.writeInt8=function(t,r,o){return t=+t,r=r>>>0,o||Kr(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};H.prototype.writeInt16LE=function(t,r,o){return t=+t,r=r>>>0,o||Kr(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};H.prototype.writeInt16BE=function(t,r,o){return t=+t,r=r>>>0,o||Kr(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};H.prototype.writeInt32LE=function(t,r,o){return t=+t,r=r>>>0,o||Kr(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};H.prototype.writeInt32BE=function(t,r,o){return t=+t,r=r>>>0,o||Kr(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};H.prototype.writeBigInt64LE=zi(function(t,r=0){return KE(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});H.prototype.writeBigInt64BE=zi(function(t,r=0){return JE(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function YE(e,t,r,o,n,i){if(r+o>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function XE(e,t,r,o,n){return t=+t,r=r>>>0,n||YE(e,t,r,4),ic.write(e,t,r,o,23,4),r+4}H.prototype.writeFloatLE=function(t,r,o){return XE(this,t,r,true,o)};H.prototype.writeFloatBE=function(t,r,o){return XE(this,t,r,false,o)};function QE(e,t,r,o,n){return t=+t,r=r>>>0,n||YE(e,t,r,8),ic.write(e,t,r,o,52,8),r+8}H.prototype.writeDoubleLE=function(t,r,o){return QE(this,t,r,true,o)};H.prototype.writeDoubleBE=function(t,r,o){return QE(this,t,r,false,o)};H.prototype.copy=function(t,r,o,n){if(!H.isBuffer(t))throw new TypeError("argument should be a Buffer");if(o||(o=0),!n&&n!==0&&(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<o&&(n=o),n===o||t.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(o<0||o>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-o&&(n=t.length-r+o);let i=n-o;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,o,n):Uint8Array.prototype.set.call(t,this.subarray(o,n),r),i};H.prototype.fill=function(t,r,o,n){if(typeof t=="string"){if(typeof r=="string"?(n=r,r=0,o=this.length):typeof o=="string"&&(n=o,o=this.length),n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!H.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(t.length===1){let s=t.charCodeAt(0);(n==="utf8"&&s<128||n==="latin1")&&(t=s);}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(r<0||this.length<r||this.length<o)throw new RangeError("Out of range index");if(o<=r)return this;r=r>>>0,o=o===void 0?this.length:o>>>0,t||(t=0);let i;if(typeof t=="number")for(i=r;i<o;++i)this[i]=t;else {let s=H.isBuffer(t)?t:H.from(t,n),a=s.length;if(a===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<o-r;++i)this[i+r]=s[i%a];}return this};var oc={};function ab(e,t,r){oc[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:true,configurable:true}),this.name=`${this.name} [${e}]`,this.stack,delete this.name;}get code(){return e}set code(n){Object.defineProperty(this,"code",{configurable:true,enumerable:true,value:n,writable:true});}toString(){return `${this.name} [${e}]: ${this.message}`}};}ab("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);ab("ERR_INVALID_ARG_TYPE",function(e,t){return `The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError);ab("ERR_OUT_OF_RANGE",function(e,t,r){let o=`The value of "${e}" is out of range.`,n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=HE(String(r)):typeof r=="bigint"&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=HE(n)),n+="n"),o+=` It must be ${t}. Received ${n}`,o},RangeError);function HE(e){let t="",r=e.length,o=e[0]==="-"?1:0;for(;r>=o+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return `${e.slice(0,r)}${t}`}function $P(e,t,r){sc(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Sf(t,e.length-(r+1));}function eS(e,t,r,o,n,i){if(e>r||e<t){let s=typeof t=="bigint"?"n":"",a;throw t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(i+1)*8}${s}`:a=`>= -(2${s} ** ${(i+1)*8-1}${s}) and < 2 ** ${(i+1)*8-1}${s}`,new oc.ERR_OUT_OF_RANGE("value",a,e)}$P(o,n,i);}function sc(e,t){if(typeof e!="number")throw new oc.ERR_INVALID_ARG_TYPE(t,"number",e)}function Sf(e,t,r){throw Math.floor(e)!==e?(sc(e,r),new oc.ERR_OUT_OF_RANGE("offset","an integer",e)):t<0?new oc.ERR_BUFFER_OUT_OF_BOUNDS:new oc.ERR_OUT_OF_RANGE("offset",`>= ${0} and <= ${t}`,e)}var OP=/[^+/0-9A-Za-z-_]/g;function NP(e){if(e=e.split("=")[0],e=e.trim().replace(OP,""),e.length<2)return "";for(;e.length%4!==0;)e=e+"=";return e}function ob(e,t){t=t||1/0;let r,o=e.length,n=null,i=[];for(let s=0;s<o;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(s+1===o){(t-=3)>-1&&i.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536;}else n&&(t-=3)>-1&&i.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;i.push(r);}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128);}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128);}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128);}else throw new Error("Invalid code point")}return i}function PP(e){let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r)&255);return t}function BP(e,t){let r,o,n,i=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),o=r>>8,n=r%256,i.push(n),i.push(o);return i}function tS(e){return tb.toByteArray(NP(e))}function Rp(e,t,r,o){let n;for(n=0;n<o&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function bo(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function cb(e){return e!==e}var CP=(function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let o=r*16;for(let n=0;n<16;++n)t[o+n]=e[r]+e[n];}return t})();function zi(e){return typeof BigInt>"u"?zP:e}function zP(){throw new Error("BigInt not supported")}});var Ys,rS=j(()=>{Ys=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;});function LP(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Xs(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function xo(e,...t){if(!LP(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function nS(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");Xs(e.outputLen),Xs(e.blockLen);}function Ko(e,t=true){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Tp(e,t){xo(e);let r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function oS(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Rn(...e){for(let t=0;t<e.length;t++)e[t].fill(0);}function $p(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Kn(e,t){return e<<32-t|e>>>t}function MP(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function DP(e){for(let t=0;t<e.length;t++)e[t]=MP(e[t]);return e}function iS(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Qs(e){return typeof e=="string"&&(e=iS(e)),xo(e),e}function fb(...e){let t=0;for(let o=0;o<e.length;o++){let n=e[o];xo(n),t+=n.length;}let r=new Uint8Array(t);for(let o=0,n=0;o<e.length;o++){let i=e[o];r.set(i,n),n+=i.length;}return r}function Af(e){let t=o=>e().update(Qs(o)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function cc(e=32){if(Ys&&typeof Ys.getRandomValues=="function")return Ys.getRandomValues(new Uint8Array(e));if(Ys&&typeof Ys.randomBytes=="function")return Uint8Array.from(Ys.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}var UP,ub,Li,Jo=j(()=>{rS();UP=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;ub=UP?e=>e:DP;Li=class{};});function jP(e,t,r,o){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,o);let n=BigInt(32),i=BigInt(4294967295),s=Number(r>>n&i),a=Number(r&i),c=o?4:0,u=o?0:4;e.setUint32(t+c,s,o),e.setUint32(t+u,a,o);}function sS(e,t,r){return e&t^~e&r}function aS(e,t,r){return e&t^e&r^t&r}var kf,Yo,dr,cS=j(()=>{Jo();kf=class extends Li{constructor(t,r,o,n){super(),this.finished=false,this.length=0,this.pos=0,this.destroyed=false,this.blockLen=t,this.outputLen=r,this.padOffset=o,this.isLE=n,this.buffer=new Uint8Array(t),this.view=$p(this.buffer);}update(t){Ko(this),t=Qs(t),xo(t);let{view:r,buffer:o,blockLen:n}=this,i=t.length;for(let s=0;s<i;){let a=Math.min(n-this.pos,i-s);if(a===n){let c=$p(t);for(;n<=i-s;s+=n)this.process(c,s);continue}o.set(t.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===n&&(this.process(r,0),this.pos=0);}return this.length+=t.length,this.roundClean(),this}digestInto(t){Ko(this),Tp(t,this),this.finished=true;let{buffer:r,view:o,blockLen:n,isLE:i}=this,{pos:s}=this;r[s++]=128,Rn(this.buffer.subarray(s)),this.padOffset>n-s&&(this.process(o,0),s=0);for(let d=s;d<n;d++)r[d]=0;jP(o,n-8,BigInt(this.length*8),i),this.process(o,0);let a=$p(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let u=c/4,l=this.get();if(u>l.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<u;d++)a.setUint32(4*d,l[d],i);}digest(){let{buffer:t,outputLen:r}=this;this.digestInto(t);let o=t.slice(0,r);return this.destroy(),o}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());let{blockLen:r,buffer:o,length:n,finished:i,destroyed:s,pos:a}=this;return t.destroyed=s,t.finished=i,t.length=n,t.pos=a,n%r&&t.buffer.set(o),t}clone(){return this._cloneInto()}},Yo=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),dr=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]);});function FP(e,t=false){return t?{h:Number(e&Op),l:Number(e>>uS&Op)}:{h:Number(e>>uS&Op)|0,l:Number(e&Op)|0}}function Np(e,t=false){let r=e.length,o=new Uint32Array(r),n=new Uint32Array(r);for(let i=0;i<r;i++){let{h:s,l:a}=FP(e[i],t);[o[i],n[i]]=[s,a];}return [o,n]}function vo(e,t,r,o){let n=(t>>>0)+(o>>>0);return {h:e+r+(n/2**32|0)|0,l:n|0}}var Op,uS,lb,db,ea,ta,Rf,Tf,fS,lS,dS,pS,mS,hS,gS,yS,bS,xS,pb=j(()=>{Op=BigInt(4294967295),uS=BigInt(32);lb=(e,t,r)=>e>>>r,db=(e,t,r)=>e<<32-r|t>>>r,ea=(e,t,r)=>e>>>r|t<<32-r,ta=(e,t,r)=>e<<32-r|t>>>r,Rf=(e,t,r)=>e<<64-r|t>>>r-32,Tf=(e,t,r)=>e>>>r-32|t<<64-r,fS=(e,t,r)=>e<<r|t>>>32-r,lS=(e,t,r)=>t<<r|e>>>32-r,dS=(e,t,r)=>t<<r-32|e>>>64-r,pS=(e,t,r)=>e<<r-32|t>>>64-r;mS=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),hS=(e,t,r,o)=>t+r+o+(e/2**32|0)|0,gS=(e,t,r,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0),yS=(e,t,r,o,n)=>t+r+o+n+(e/2**32|0)|0,bS=(e,t,r,o,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0)+(n>>>0),xS=(e,t,r,o,n,i)=>t+r+o+n+i+(e/2**32|0)|0;});var VP,Ui,Pp,vS,ZP,GP,Mi,Di,mb,ra,_S,Bp=j(()=>{cS();pb();Jo();VP=Uint32Array.from([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]),Ui=new Uint32Array(64),Pp=class extends kf{constructor(t=32){super(64,t,8,false),this.A=Yo[0]|0,this.B=Yo[1]|0,this.C=Yo[2]|0,this.D=Yo[3]|0,this.E=Yo[4]|0,this.F=Yo[5]|0,this.G=Yo[6]|0,this.H=Yo[7]|0;}get(){let{A:t,B:r,C:o,D:n,E:i,F:s,G:a,H:c}=this;return [t,r,o,n,i,s,a,c]}set(t,r,o,n,i,s,a,c){this.A=t|0,this.B=r|0,this.C=o|0,this.D=n|0,this.E=i|0,this.F=s|0,this.G=a|0,this.H=c|0;}process(t,r){for(let d=0;d<16;d++,r+=4)Ui[d]=t.getUint32(r,false);for(let d=16;d<64;d++){let g=Ui[d-15],h=Ui[d-2],v=Kn(g,7)^Kn(g,18)^g>>>3,E=Kn(h,17)^Kn(h,19)^h>>>10;Ui[d]=E+Ui[d-7]+v+Ui[d-16]|0;}let{A:o,B:n,C:i,D:s,E:a,F:c,G:u,H:l}=this;for(let d=0;d<64;d++){let g=Kn(a,6)^Kn(a,11)^Kn(a,25),h=l+g+sS(a,c,u)+VP[d]+Ui[d]|0,E=(Kn(o,2)^Kn(o,13)^Kn(o,22))+aS(o,n,i)|0;l=u,u=c,c=a,a=s+h|0,s=i,i=n,n=o,o=h+E|0;}o=o+this.A|0,n=n+this.B|0,i=i+this.C|0,s=s+this.D|0,a=a+this.E|0,c=c+this.F|0,u=u+this.G|0,l=l+this.H|0,this.set(o,n,i,s,a,c,u,l);}roundClean(){Rn(Ui);}destroy(){this.set(0,0,0,0,0,0,0,0),Rn(this.buffer);}},vS=Np(["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(e=>BigInt(e))),ZP=vS[0],GP=vS[1],Mi=new Uint32Array(80),Di=new Uint32Array(80),mb=class extends kf{constructor(t=64){super(128,t,16,false),this.Ah=dr[0]|0,this.Al=dr[1]|0,this.Bh=dr[2]|0,this.Bl=dr[3]|0,this.Ch=dr[4]|0,this.Cl=dr[5]|0,this.Dh=dr[6]|0,this.Dl=dr[7]|0,this.Eh=dr[8]|0,this.El=dr[9]|0,this.Fh=dr[10]|0,this.Fl=dr[11]|0,this.Gh=dr[12]|0,this.Gl=dr[13]|0,this.Hh=dr[14]|0,this.Hl=dr[15]|0;}get(){let{Ah:t,Al:r,Bh:o,Bl:n,Ch:i,Cl:s,Dh:a,Dl:c,Eh:u,El:l,Fh:d,Fl:g,Gh:h,Gl:v,Hh:E,Hl:R}=this;return [t,r,o,n,i,s,a,c,u,l,d,g,h,v,E,R]}set(t,r,o,n,i,s,a,c,u,l,d,g,h,v,E,R){this.Ah=t|0,this.Al=r|0,this.Bh=o|0,this.Bl=n|0,this.Ch=i|0,this.Cl=s|0,this.Dh=a|0,this.Dl=c|0,this.Eh=u|0,this.El=l|0,this.Fh=d|0,this.Fl=g|0,this.Gh=h|0,this.Gl=v|0,this.Hh=E|0,this.Hl=R|0;}process(t,r){for(let O=0;O<16;O++,r+=4)Mi[O]=t.getUint32(r),Di[O]=t.getUint32(r+=4);for(let O=16;O<80;O++){let I=Mi[O-15]|0,N=Di[O-15]|0,C=ea(I,N,1)^ea(I,N,8)^lb(I,N,7),z=ta(I,N,1)^ta(I,N,8)^db(I,N,7),F=Mi[O-2]|0,W=Di[O-2]|0,V=ea(F,W,19)^Rf(F,W,61)^lb(F,W,6),G=ta(F,W,19)^Tf(F,W,61)^db(F,W,6),ne=gS(z,G,Di[O-7],Di[O-16]),S=yS(ne,C,V,Mi[O-7],Mi[O-16]);Mi[O]=S|0,Di[O]=ne|0;}let{Ah:o,Al:n,Bh:i,Bl:s,Ch:a,Cl:c,Dh:u,Dl:l,Eh:d,El:g,Fh:h,Fl:v,Gh:E,Gl:R,Hh:$,Hl:P}=this;for(let O=0;O<80;O++){let I=ea(d,g,14)^ea(d,g,18)^Rf(d,g,41),N=ta(d,g,14)^ta(d,g,18)^Tf(d,g,41),C=d&h^~d&E,z=g&v^~g&R,F=bS(P,N,z,GP[O],Di[O]),W=xS(F,$,I,C,ZP[O],Mi[O]),V=F|0,G=ea(o,n,28)^Rf(o,n,34)^Rf(o,n,39),ne=ta(o,n,28)^Tf(o,n,34)^Tf(o,n,39),S=o&i^o&a^i&a,f=n&s^n&c^s&c;$=E|0,P=R|0,E=h|0,R=v|0,h=d|0,v=g|0,{h:d,l:g}=vo(u|0,l|0,W|0,V|0),u=a|0,l=c|0,a=i|0,c=s|0,i=o|0,s=n|0;let m=mS(V,ne,f);o=hS(m,W,G,S),n=m|0;}(({h:o,l:n}=vo(this.Ah|0,this.Al|0,o|0,n|0))),{h:i,l:s}=vo(this.Bh|0,this.Bl|0,i|0,s|0),{h:a,l:c}=vo(this.Ch|0,this.Cl|0,a|0,c|0),{h:u,l}=vo(this.Dh|0,this.Dl|0,u|0,l|0),{h:d,l:g}=vo(this.Eh|0,this.El|0,d|0,g|0),{h,l:v}=vo(this.Fh|0,this.Fl|0,h|0,v|0),{h:E,l:R}=vo(this.Gh|0,this.Gl|0,E|0,R|0),{h:$,l:P}=vo(this.Hh|0,this.Hl|0,$|0,P|0),this.set(o,n,i,s,a,c,u,l,d,g,h,v,E,R,$,P);}roundClean(){Rn(Mi,Di);}destroy(){Rn(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);}},ra=Af(()=>new Pp),_S=Af(()=>new mb);});function uc(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Qo(e){if(!uc(e))throw new Error("Uint8Array expected")}function _o(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function $f(e){let t=e.toString(16);return t.length&1?"0"+t:t}function SS(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?bb:BigInt("0x"+e)}function ji(e){if(Qo(e),IS)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=qP[e[r]];return t}function wS(e){if(e>=Xo._0&&e<=Xo._9)return e-Xo._0;if(e>=Xo.A&&e<=Xo.F)return e-(Xo.A-10);if(e>=Xo.a&&e<=Xo.f)return e-(Xo.a-10)}function Of(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(IS)return Uint8Array.fromHex(e);let t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);let o=new Uint8Array(r);for(let n=0,i=0;n<r;n++,i+=2){let s=wS(e.charCodeAt(i)),a=wS(e.charCodeAt(i+1));if(s===void 0||a===void 0){let c=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+i)}o[n]=s*16+a;}return o}function Jr(e){return SS(ji(e))}function na(e){return Qo(e),SS(ji(Uint8Array.from(e).reverse()))}function wo(e,t){return Of(e.toString(16).padStart(t*2,"0"))}function fc(e,t){return wo(e,t).reverse()}function Ve(e,t,r){let o;if(typeof t=="string")try{o=Of(t);}catch(i){throw new Error(e+" must be hex string or Uint8Array, cause: "+i)}else if(uc(t))o=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");let n=o.length;if(typeof r=="number"&&n!==r)throw new Error(e+" of length "+r+" expected, got "+n);return o}function ir(...e){let t=0;for(let o=0;o<e.length;o++){let n=e[o];Qo(n),t+=n.length;}let r=new Uint8Array(t);for(let o=0,n=0;o<e.length;o++){let i=e[o];r.set(i,n),n+=i.length;}return r}function Cp(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function oa(e,t,r){return hb(e)&&hb(t)&&hb(r)&&t<=e&&e<r}function Ur(e,t,r,o){if(!oa(t,r,o))throw new Error("expected valid "+e+": "+r+" <= n < "+o+", got "+t)}function AS(e){let t;for(t=0;e>bb;e>>=yb,t+=1);return t}function kS(e,t,r){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let o=gb(e),n=gb(e),i=0,s=()=>{o.fill(1),n.fill(0),i=0;},a=(...d)=>r(n,o,...d),c=(d=gb(0))=>{n=a(ES([0]),d),o=a(),d.length!==0&&(n=a(ES([1]),d),o=a());},u=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let d=0,g=[];for(;d<t;){o=a();let h=o.slice();g.push(h),d+=o.length;}return ir(...g)};return (d,g)=>{s(),c(d);let h;for(;!(h=g(u()));)c();return s(),h}}function Jn(e,t,r={}){let o=(n,i,s)=>{let a=WP[i];if(typeof a!="function")throw new Error("invalid validator function");let c=e[n];if(!(s&&c===void 0)&&!a(c,e))throw new Error("param "+String(n)+" is invalid. Expected "+i+", got "+c)};for(let[n,i]of Object.entries(t))o(n,i,false);for(let[n,i]of Object.entries(r))o(n,i,true);return e}function lc(e){let t=new WeakMap;return (r,...o)=>{let n=t.get(r);if(n!==void 0)return n;let i=e(r,...o);return t.set(r,i),i}}var bb,yb,IS,qP,Xo,hb,ia,gb,ES,WP,sa=j(()=>{bb=BigInt(0),yb=BigInt(1);IS=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",qP=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));Xo={_0:48,_9:57,A:65,F:70,a:97,f:102};hb=e=>typeof e=="bigint"&&bb<=e;ia=e=>(yb<<BigInt(e))-yb,gb=e=>new Uint8Array(e),ES=e=>Uint8Array.from(e);WP={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||uc(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};});function ze(e,t){let r=e%t;return r>=Mr?r:t+r}function it(e,t,r){let o=e;for(;t-- >Mr;)o*=o,o%=r;return o}function zp(e,t){if(e===Mr)throw new Error("invert: expected non-zero number");if(t<=Mr)throw new Error("invert: expected positive modulus, got "+t);let r=ze(e,t),o=t,n=Mr,s=sr;for(;r!==Mr;){let u=o/r,l=o%r,d=n-s*u;o=r,r=l,n=s,s=d;}if(o!==sr)throw new Error("invert: does not exist");return ze(n,t)}function NS(e,t){let r=(e.ORDER+sr)/TS,o=e.pow(t,r);if(!e.eql(e.sqr(o),t))throw new Error("Cannot find square root");return o}function JP(e,t){let r=(e.ORDER-$S)/OS,o=e.mul(t,aa),n=e.pow(o,r),i=e.mul(t,n),s=e.mul(e.mul(i,aa),n),a=e.mul(i,e.sub(s,e.ONE));if(!e.eql(e.sqr(a),t))throw new Error("Cannot find square root");return a}function YP(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-sr,r=0;for(;t%aa===Mr;)t/=aa,r++;let o=aa,n=ti(e);for(;RS(n,o)===1;)if(o++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return NS;let i=n.pow(o,t),s=(t+sr)/aa;return function(c,u){if(c.is0(u))return u;if(RS(c,u)!==1)throw new Error("Cannot find square root");let l=r,d=c.mul(c.ONE,i),g=c.pow(u,t),h=c.pow(u,s);for(;!c.eql(g,c.ONE);){if(c.is0(g))return c.ZERO;let v=1,E=c.sqr(g);for(;!c.eql(E,c.ONE);)if(v++,E=c.sqr(E),v===l)throw new Error("Cannot find square root");let R=sr<<BigInt(l-v-1),$=c.pow(d,R);l=v,d=c.sqr($),g=c.mul(g,d),h=c.mul(h,$);}return h}}function XP(e){return e%TS===KP?NS:e%OS===$S?JP:YP(e)}function Lp(e){let t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=QP.reduce((o,n)=>(o[n]="function",o),t);return Jn(e,r)}function e3(e,t,r){if(r<Mr)throw new Error("invalid exponent, negatives unsupported");if(r===Mr)return e.ONE;if(r===sr)return t;let o=e.ONE,n=t;for(;r>Mr;)r&sr&&(o=e.mul(o,n)),n=e.sqr(n),r>>=sr;return o}function ei(e,t,r=false){let o=new Array(t.length).fill(r?e.ZERO:void 0),n=t.reduce((s,a,c)=>e.is0(a)?s:(o[c]=s,e.mul(s,a)),e.ONE),i=e.inv(n);return t.reduceRight((s,a,c)=>e.is0(a)?s:(o[c]=e.mul(s,o[c]),e.mul(s,a)),i),o}function RS(e,t){let r=(e.ORDER-sr)/aa,o=e.pow(t,r),n=e.eql(o,e.ONE),i=e.eql(o,e.ZERO),s=e.eql(o,e.neg(e.ONE));if(!n&&!i&&!s)throw new Error("invalid Legendre symbol result");return n?1:i?0:-1}function xb(e,t){t!==void 0&&Xs(t);let r=t!==void 0?t:e.toString(2).length,o=Math.ceil(r/8);return {nBitLength:r,nByteLength:o}}function ti(e,t,r=false,o={}){if(e<=Mr)throw new Error("invalid field: expected ORDER > 0, got "+e);let{nBitLength:n,nByteLength:i}=xb(e,t);if(i>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let s,a=Object.freeze({ORDER:e,isLE:r,BITS:n,BYTES:i,MASK:ia(n),ZERO:Mr,ONE:sr,create:c=>ze(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return Mr<=c&&c<e},is0:c=>c===Mr,isOdd:c=>(c&sr)===sr,neg:c=>ze(-c,e),eql:(c,u)=>c===u,sqr:c=>ze(c*c,e),add:(c,u)=>ze(c+u,e),sub:(c,u)=>ze(c-u,e),mul:(c,u)=>ze(c*u,e),pow:(c,u)=>e3(a,c,u),div:(c,u)=>ze(c*zp(u,e),e),sqrN:c=>c*c,addN:(c,u)=>c+u,subN:(c,u)=>c-u,mulN:(c,u)=>c*u,inv:c=>zp(c,e),sqrt:o.sqrt||(c=>(s||(s=XP(e)),s(a,c))),toBytes:c=>r?fc(c,i):wo(c,i),fromBytes:c=>{if(c.length!==i)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+c.length);return r?na(c):Jr(c)},invertBatch:c=>ei(a,c),cmov:(c,u,l)=>l?u:c});return Object.freeze(a)}function BS(e){if(typeof e!="bigint")throw new Error("field order must be bigint");let t=e.toString(2).length;return Math.ceil(t/8)}function vb(e){let t=BS(e);return t+Math.ceil(t/2)}function CS(e,t,r=false){let o=e.length,n=BS(t),i=vb(t);if(o<16||o<i||o>1024)throw new Error("expected "+i+"-1024 bytes of input, got "+o);let s=r?na(e):Jr(e),a=ze(s,t-sr)+sr;return r?fc(a,n):wo(a,n)}var Mr,sr,aa,KP,TS,$S,OS,PS,QP,ca=j(()=>{Jo();sa();Mr=BigInt(0),sr=BigInt(1),aa=BigInt(2),KP=BigInt(3),TS=BigInt(4),$S=BigInt(5),OS=BigInt(8);PS=(e,t)=>(ze(e,t)&sr)===sr,QP=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];});function _b(e,t){let r=t.negate();return e?r:t}function US(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function wb(e,t){US(e,t);let r=Math.ceil(t/e)+1,o=2**(e-1),n=2**e,i=ia(e),s=BigInt(e);return {windows:r,windowSize:o,mask:i,maxNumber:n,shiftBy:s}}function LS(e,t,r){let{windowSize:o,mask:n,maxNumber:i,shiftBy:s}=r,a=Number(e&n),c=e>>s;a>o&&(a-=i,c+=Ib);let u=t*o,l=u+Math.abs(a)-1,d=a===0,g=a<0,h=t%2!==0;return {nextN:c,offset:l,isZero:d,isNeg:g,isNegF:h,offsetF:u}}function t3(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((r,o)=>{if(!(r instanceof t))throw new Error("invalid point at index "+o)});}function r3(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((r,o)=>{if(!t.isValid(r))throw new Error("invalid scalar at index "+o)});}function Sb(e){return MS.get(e)||1}function Up(e,t){return {constTimeNegate:_b,hasPrecomputes(r){return Sb(r)!==1},unsafeLadder(r,o,n=e.ZERO){let i=r;for(;o>zS;)o&Ib&&(n=n.add(i)),i=i.double(),o>>=Ib;return n},precomputeWindow(r,o){let{windows:n,windowSize:i}=wb(o,t),s=[],a=r,c=a;for(let u=0;u<n;u++){c=a,s.push(c);for(let l=1;l<i;l++)c=c.add(a),s.push(c);a=c.double();}return s},wNAF(r,o,n){let i=e.ZERO,s=e.BASE,a=wb(r,t);for(let c=0;c<a.windows;c++){let{nextN:u,offset:l,isZero:d,isNeg:g,isNegF:h,offsetF:v}=LS(n,c,a);n=u,d?s=s.add(_b(h,o[v])):i=i.add(_b(g,o[l]));}return {p:i,f:s}},wNAFUnsafe(r,o,n,i=e.ZERO){let s=wb(r,t);for(let a=0;a<s.windows&&n!==zS;a++){let{nextN:c,offset:u,isZero:l,isNeg:d}=LS(n,a,s);if(n=c,!l){let g=o[u];i=i.add(d?g.negate():g);}}return i},getPrecomputes(r,o,n){let i=Eb.get(o);return i||(i=this.precomputeWindow(o,r),r!==1&&Eb.set(o,n(i))),i},wNAFCached(r,o,n){let i=Sb(r);return this.wNAF(i,this.getPrecomputes(i,r,n),o)},wNAFCachedUnsafe(r,o,n,i){let s=Sb(r);return s===1?this.unsafeLadder(r,o,i):this.wNAFUnsafe(s,this.getPrecomputes(s,r,n),o,i)},setWindowSize(r,o){US(o,t),MS.set(r,o),Eb.delete(r);}}}function Mp(e,t,r,o){t3(r,e),r3(o,t);let n=r.length,i=o.length;if(n!==i)throw new Error("arrays of points and scalars must have equal length");let s=e.ZERO,a=AS(BigInt(n)),c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);let u=ia(c),l=new Array(Number(u)+1).fill(s),d=Math.floor((t.BITS-1)/c)*c,g=s;for(let h=d;h>=0;h-=c){l.fill(s);for(let E=0;E<i;E++){let R=o[E],$=Number(R>>BigInt(h)&u);l[$]=l[$].add(r[E]);}let v=s;for(let E=l.length-1,R=s;E>0;E--)R=R.add(l[E]),v=v.add(R);if(g=g.add(v),h!==0)for(let E=0;E<c;E++)g=g.double();}return g}function Nf(e){return Lp(e.Fp),Jn(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...xb(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}var zS,Ib,Eb,MS,Ab=j(()=>{ca();sa();zS=BigInt(0),Ib=BigInt(1);Eb=new WeakMap,MS=new WeakMap;});function Fi(e,t){if(Pf(e),Pf(t),e<0||e>=1<<8*t)throw new Error("invalid I2OSP input: "+e);let r=Array.from({length:t}).fill(0);for(let o=t-1;o>=0;o--)r[o]=e&255,e>>>=8;return new Uint8Array(r)}function a3(e,t){let r=new Uint8Array(e.length);for(let o=0;o<e.length;o++)r[o]=e[o]^t[o];return r}function Pf(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function c3(e,t,r,o){Qo(e),Qo(t),Pf(r),t.length>255&&(t=o(ir(Cp("H2C-OVERSIZE-DST-"),t)));let{outputLen:n,blockLen:i}=o,s=Math.ceil(r/n);if(r>65535||s>255)throw new Error("expand_message_xmd: invalid lenInBytes");let a=ir(t,Fi(t.length,1)),c=Fi(0,i),u=Fi(r,2),l=new Array(s),d=o(ir(c,e,u,Fi(0,1),a));l[0]=o(ir(d,Fi(1,1),a));for(let h=1;h<=s;h++){let v=[a3(d,l[h-1]),Fi(h+1,1),a];l[h]=o(ir(...v));}return ir(...l).slice(0,r)}function u3(e,t,r,o,n){if(Qo(e),Qo(t),Pf(r),t.length>255){let i=Math.ceil(2*o/8);t=n.create({dkLen:i}).update(Cp("H2C-OVERSIZE-DST-")).update(t).digest();}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return n.create({dkLen:r}).update(e).update(Fi(r,2)).update(t).update(Fi(t.length,1)).digest()}function FS(e,t,r){Jn(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});let{p:o,k:n,m:i,hash:s,expand:a,DST:c}=r;Qo(e),Pf(t);let u=typeof c=="string"?Cp(c):c,l=o.toString(2).length,d=Math.ceil((l+n)/8),g=t*i*d,h;if(a==="xmd")h=c3(e,u,g,s);else if(a==="xof")h=u3(e,u,g,n,s);else if(a==="_internal_pass")h=e;else throw new Error('expand must be "xmd" or "xof"');let v=new Array(t);for(let E=0;E<t;E++){let R=new Array(i);for(let $=0;$<i;$++){let P=d*($+E*i),O=h.subarray(P,P+d);R[$]=ze(s3(O),o);}v[E]=R;}return v}function HS(e,t){let r=t.map(o=>Array.from(o).reverse());return (o,n)=>{let[i,s,a,c]=r.map(d=>d.reduce((g,h)=>e.add(e.mul(g,o),h))),[u,l]=ei(e,[s,c],true);return o=e.mul(i,u),n=e.mul(n,e.mul(a,l)),{x:o,y:n}}}function VS(e,t,r){if(typeof t!="function")throw new Error("mapToCurve() must be defined");function o(i){return e.fromAffine(t(i))}function n(i){let s=i.clearCofactor();return s.equals(e.ZERO)?e.ZERO:(s.assertValidity(),s)}return {defaults:r,hashToCurve(i,s){let a=FS(i,2,{...r,DST:r.DST,...s}),c=o(a[0]),u=o(a[1]);return n(c.add(u))},encodeToCurve(i,s){let a=FS(i,1,{...r,DST:r.encodeDST,...s});return n(o(a[0]))},mapToCurve(i){if(!Array.isArray(i))throw new Error("expected array of bigints");for(let s of i)if(typeof s!="bigint")throw new Error("expected array of bigints");return n(o(i))}}}var s3,ZS=j(()=>{ca();sa();s3=Jr;});var KS=Gr(()=>{});var Tb=Gr((JS,Rb)=>{(function(e,t){function r(S,f){if(!S)throw new Error(f||"Assertion failed")}function o(S,f){S.super_=f;var m=function(){};m.prototype=f.prototype,S.prototype=new m,S.prototype.constructor=S;}function n(S,f,m){if(n.isBN(S))return S;this.negative=0,this.words=null,this.length=0,this.red=null,S!==null&&((f==="le"||f==="be")&&(m=f,f=10),this._init(S||0,f||10,m||"be"));}typeof e=="object"?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;var i;try{typeof window<"u"&&typeof window.Buffer<"u"?i=window.Buffer:i=KS().Buffer;}catch{}n.isBN=function(f){return f instanceof n?true:f!==null&&typeof f=="object"&&f.constructor.wordSize===n.wordSize&&Array.isArray(f.words)},n.max=function(f,m){return f.cmp(m)>0?f:m},n.min=function(f,m){return f.cmp(m)<0?f:m},n.prototype._init=function(f,m,y){if(typeof f=="number")return this._initNumber(f,m,y);if(typeof f=="object")return this._initArray(f,m,y);m==="hex"&&(m=16),r(m===(m|0)&&m>=2&&m<=36),f=f.toString().replace(/\s+/g,"");var x=0;f[0]==="-"&&(x++,this.negative=1),x<f.length&&(m===16?this._parseHex(f,x,y):(this._parseBase(f,m,x),y==="le"&&this._initArray(this.toArray(),m,y)));},n.prototype._initNumber=function(f,m,y){f<0&&(this.negative=1,f=-f),f<67108864?(this.words=[f&67108863],this.length=1):f<4503599627370496?(this.words=[f&67108863,f/67108864&67108863],this.length=2):(r(f<9007199254740992),this.words=[f&67108863,f/67108864&67108863,1],this.length=3),y==="le"&&this._initArray(this.toArray(),m,y);},n.prototype._initArray=function(f,m,y){if(r(typeof f.length=="number"),f.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(f.length/3),this.words=new Array(this.length);for(var x=0;x<this.length;x++)this.words[x]=0;var b,w,k=0;if(y==="be")for(x=f.length-1,b=0;x>=0;x-=3)w=f[x]|f[x-1]<<8|f[x-2]<<16,this.words[b]|=w<<k&67108863,this.words[b+1]=w>>>26-k&67108863,k+=24,k>=26&&(k-=26,b++);else if(y==="le")for(x=0,b=0;x<f.length;x+=3)w=f[x]|f[x+1]<<8|f[x+2]<<16,this.words[b]|=w<<k&67108863,this.words[b+1]=w>>>26-k&67108863,k+=24,k>=26&&(k-=26,b++);return this._strip()};function s(S,f){var m=S.charCodeAt(f);if(m>=48&&m<=57)return m-48;if(m>=65&&m<=70)return m-55;if(m>=97&&m<=102)return m-87;r(false,"Invalid character in "+S);}function a(S,f,m){var y=s(S,m);return m-1>=f&&(y|=s(S,m-1)<<4),y}n.prototype._parseHex=function(f,m,y){this.length=Math.ceil((f.length-m)/6),this.words=new Array(this.length);for(var x=0;x<this.length;x++)this.words[x]=0;var b=0,w=0,k;if(y==="be")for(x=f.length-1;x>=m;x-=2)k=a(f,m,x)<<b,this.words[w]|=k&67108863,b>=18?(b-=18,w+=1,this.words[w]|=k>>>26):b+=8;else {var _=f.length-m;for(x=_%2===0?m+1:m;x<f.length;x+=2)k=a(f,m,x)<<b,this.words[w]|=k&67108863,b>=18?(b-=18,w+=1,this.words[w]|=k>>>26):b+=8;}this._strip();};function c(S,f,m,y){for(var x=0,b=0,w=Math.min(S.length,m),k=f;k<w;k++){var _=S.charCodeAt(k)-48;x*=y,_>=49?b=_-49+10:_>=17?b=_-17+10:b=_,r(_>=0&&b<y,"Invalid character"),x+=b;}return x}n.prototype._parseBase=function(f,m,y){this.words=[0],this.length=1;for(var x=0,b=1;b<=67108863;b*=m)x++;x--,b=b/m|0;for(var w=f.length-y,k=w%x,_=Math.min(w,w-k)+y,p=0,A=y;A<_;A+=x)p=c(f,A,A+x,m),this.imuln(b),this.words[0]+p<67108864?this.words[0]+=p:this._iaddn(p);if(k!==0){var Z=1;for(p=c(f,A,f.length,m),A=0;A<k;A++)Z*=m;this.imuln(Z),this.words[0]+p<67108864?this.words[0]+=p:this._iaddn(p);}this._strip();},n.prototype.copy=function(f){f.words=new Array(this.length);for(var m=0;m<this.length;m++)f.words[m]=this.words[m];f.length=this.length,f.negative=this.negative,f.red=this.red;};function u(S,f){S.words=f.words,S.length=f.length,S.negative=f.negative,S.red=f.red;}if(n.prototype._move=function(f){u(f,this);},n.prototype.clone=function(){var f=new n(null);return this.copy(f),f},n.prototype._expand=function(f){for(;this.length<f;)this.words[this.length++]=0;return this},n.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=l;}catch{n.prototype.inspect=l;}else n.prototype.inspect=l;function l(){return (this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(f,m){f=f||10,m=m|0||1;var y;if(f===16||f==="hex"){y="";for(var x=0,b=0,w=0;w<this.length;w++){var k=this.words[w],_=((k<<x|b)&16777215).toString(16);b=k>>>24-x&16777215,x+=2,x>=26&&(x-=26,w--),b!==0||w!==this.length-1?y=d[6-_.length]+_+y:y=_+y;}for(b!==0&&(y=b.toString(16)+y);y.length%m!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}if(f===(f|0)&&f>=2&&f<=36){var p=g[f],A=h[f];y="";var Z=this.clone();for(Z.negative=0;!Z.isZero();){var K=Z.modrn(A).toString(f);Z=Z.idivn(A),Z.isZero()?y=K+y:y=d[p-K.length]+K+y;}for(this.isZero()&&(y="0"+y);y.length%m!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}r(false,"Base should be between 2 and 36");},n.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&r(false,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},n.prototype.toJSON=function(){return this.toString(16,2)},i&&(n.prototype.toBuffer=function(f,m){return this.toArrayLike(i,f,m)}),n.prototype.toArray=function(f,m){return this.toArrayLike(Array,f,m)};var v=function(f,m){return f.allocUnsafe?f.allocUnsafe(m):new f(m)};n.prototype.toArrayLike=function(f,m,y){this._strip();var x=this.byteLength(),b=y||Math.max(1,x);r(x<=b,"byte array longer than desired length"),r(b>0,"Requested array length <= 0");var w=v(f,b),k=m==="le"?"LE":"BE";return this["_toArrayLike"+k](w,x),w},n.prototype._toArrayLikeLE=function(f,m){for(var y=0,x=0,b=0,w=0;b<this.length;b++){var k=this.words[b]<<w|x;f[y++]=k&255,y<f.length&&(f[y++]=k>>8&255),y<f.length&&(f[y++]=k>>16&255),w===6?(y<f.length&&(f[y++]=k>>24&255),x=0,w=0):(x=k>>>24,w+=2);}if(y<f.length)for(f[y++]=x;y<f.length;)f[y++]=0;},n.prototype._toArrayLikeBE=function(f,m){for(var y=f.length-1,x=0,b=0,w=0;b<this.length;b++){var k=this.words[b]<<w|x;f[y--]=k&255,y>=0&&(f[y--]=k>>8&255),y>=0&&(f[y--]=k>>16&255),w===6?(y>=0&&(f[y--]=k>>24&255),x=0,w=0):(x=k>>>24,w+=2);}if(y>=0)for(f[y--]=x;y>=0;)f[y--]=0;},Math.clz32?n.prototype._countBits=function(f){return 32-Math.clz32(f)}:n.prototype._countBits=function(f){var m=f,y=0;return m>=4096&&(y+=13,m>>>=13),m>=64&&(y+=7,m>>>=7),m>=8&&(y+=4,m>>>=4),m>=2&&(y+=2,m>>>=2),y+m},n.prototype._zeroBits=function(f){if(f===0)return 26;var m=f,y=0;return (m&8191)===0&&(y+=13,m>>>=13),(m&127)===0&&(y+=7,m>>>=7),(m&15)===0&&(y+=4,m>>>=4),(m&3)===0&&(y+=2,m>>>=2),(m&1)===0&&y++,y},n.prototype.bitLength=function(){var f=this.words[this.length-1],m=this._countBits(f);return (this.length-1)*26+m};function E(S){for(var f=new Array(S.bitLength()),m=0;m<f.length;m++){var y=m/26|0,x=m%26;f[m]=S.words[y]>>>x&1;}return f}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,m=0;m<this.length;m++){var y=this._zeroBits(this.words[m]);if(f+=y,y!==26)break}return f},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(f){return this.negative!==0?this.abs().inotn(f).iaddn(1):this.clone()},n.prototype.fromTwos=function(f){return this.testn(f-1)?this.notn(f).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(f){for(;this.length<f.length;)this.words[this.length++]=0;for(var m=0;m<f.length;m++)this.words[m]=this.words[m]|f.words[m];return this._strip()},n.prototype.ior=function(f){return r((this.negative|f.negative)===0),this.iuor(f)},n.prototype.or=function(f){return this.length>f.length?this.clone().ior(f):f.clone().ior(this)},n.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},n.prototype.iuand=function(f){var m;this.length>f.length?m=f:m=this;for(var y=0;y<m.length;y++)this.words[y]=this.words[y]&f.words[y];return this.length=m.length,this._strip()},n.prototype.iand=function(f){return r((this.negative|f.negative)===0),this.iuand(f)},n.prototype.and=function(f){return this.length>f.length?this.clone().iand(f):f.clone().iand(this)},n.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},n.prototype.iuxor=function(f){var m,y;this.length>f.length?(m=this,y=f):(m=f,y=this);for(var x=0;x<y.length;x++)this.words[x]=m.words[x]^y.words[x];if(this!==m)for(;x<m.length;x++)this.words[x]=m.words[x];return this.length=m.length,this._strip()},n.prototype.ixor=function(f){return r((this.negative|f.negative)===0),this.iuxor(f)},n.prototype.xor=function(f){return this.length>f.length?this.clone().ixor(f):f.clone().ixor(this)},n.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},n.prototype.inotn=function(f){r(typeof f=="number"&&f>=0);var m=Math.ceil(f/26)|0,y=f%26;this._expand(m),y>0&&m--;for(var x=0;x<m;x++)this.words[x]=~this.words[x]&67108863;for(y>0&&(this.words[x]=~this.words[x]&67108863>>26-y,x++);x<this.length;x++)this.words[x]=0;return this._strip()},n.prototype.notn=function(f){return this.clone().inotn(f)},n.prototype.setn=function(f,m){r(typeof f=="number"&&f>=0);var y=f/26|0,x=f%26;return this._expand(y+1),m?this.words[y]=this.words[y]|1<<x:this.words[y]=this.words[y]&~(1<<x),this._strip()},n.prototype.iadd=function(f){var m;if(this.negative!==0&&f.negative===0)return this.negative=0,m=this.isub(f),this.negative^=1,this._normSign();if(this.negative===0&&f.negative!==0)return f.negative=0,m=this.isub(f),f.negative=1,m._normSign();var y,x;this.length>f.length?(y=this,x=f):(y=f,x=this);for(var b=0,w=0;w<x.length;w++)m=(y.words[w]|0)+(x.words[w]|0)+b,this.words[w]=m&67108863,b=m>>>26;for(;b!==0&&w<y.length;w++)m=(y.words[w]|0)+b,this.words[w]=m&67108863,b=m>>>26;if(this.length=y.length,b!==0)this.words[this.length]=b,this.length++;else if(y!==this)for(;w<y.length;w++)this.words[w]=y.words[w];return this},n.prototype.add=function(f){var m;return f.negative!==0&&this.negative===0?(f.negative=0,m=this.sub(f),f.negative^=1,m):f.negative===0&&this.negative!==0?(this.negative=0,m=f.sub(this),this.negative=1,m):this.length>f.length?this.clone().iadd(f):f.clone().iadd(this)},n.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var m=this.iadd(f);return f.negative=1,m._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var y=this.cmp(f);if(y===0)return this.negative=0,this.length=1,this.words[0]=0,this;var x,b;y>0?(x=this,b=f):(x=f,b=this);for(var w=0,k=0;k<b.length;k++)m=(x.words[k]|0)-(b.words[k]|0)+w,w=m>>26,this.words[k]=m&67108863;for(;w!==0&&k<x.length;k++)m=(x.words[k]|0)+w,w=m>>26,this.words[k]=m&67108863;if(w===0&&k<x.length&&x!==this)for(;k<x.length;k++)this.words[k]=x.words[k];return this.length=Math.max(this.length,k),x!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(f){return this.clone().isub(f)};function R(S,f,m){m.negative=f.negative^S.negative;var y=S.length+f.length|0;m.length=y,y=y-1|0;var x=S.words[0]|0,b=f.words[0]|0,w=x*b,k=w&67108863,_=w/67108864|0;m.words[0]=k;for(var p=1;p<y;p++){for(var A=_>>>26,Z=_&67108863,K=Math.min(p,f.length-1),te=Math.max(0,p-S.length+1);te<=K;te++){var ae=p-te|0;x=S.words[ae]|0,b=f.words[te]|0,w=x*b+Z,A+=w/67108864|0,Z=w&67108863;}m.words[p]=Z|0,_=A|0;}return _!==0?m.words[p]=_|0:m.length--,m._strip()}var $=function(f,m,y){var x=f.words,b=m.words,w=y.words,k=0,_,p,A,Z=x[0]|0,K=Z&8191,te=Z>>>13,ae=x[1]|0,me=ae&8191,ye=ae>>>13,Ye=x[2]|0,Se=Ye&8191,_e=Ye>>>13,Qt=x[3]|0,Be=Qt&8191,Ue=Qt>>>13,Oi=x[4]|0,ut=Oi&8191,mt=Oi>>>13,yp=x[5]|0,ht=yp&8191,gt=yp>>>13,rE=x[6]|0,Et=rE&8191,St=rE>>>13,nE=x[7]|0,It=nE&8191,At=nE>>>13,oE=x[8]|0,kt=oE&8191,Rt=oE>>>13,iE=x[9]|0,Tt=iE&8191,$t=iE>>>13,sE=b[0]|0,Ot=sE&8191,Nt=sE>>>13,aE=b[1]|0,Pt=aE&8191,Bt=aE>>>13,cE=b[2]|0,Ct=cE&8191,zt=cE>>>13,uE=b[3]|0,Lt=uE&8191,Ut=uE>>>13,fE=b[4]|0,Mt=fE&8191,Dt=fE>>>13,lE=b[5]|0,jt=lE&8191,Ft=lE>>>13,dE=b[6]|0,Ht=dE&8191,Vt=dE>>>13,pE=b[7]|0,Zt=pE&8191,Gt=pE>>>13,mE=b[8]|0,qt=mE&8191,Wt=mE>>>13,hE=b[9]|0,Kt=hE&8191,Jt=hE>>>13;y.negative=f.negative^m.negative,y.length=19,_=Math.imul(K,Ot),p=Math.imul(K,Nt),p=p+Math.imul(te,Ot)|0,A=Math.imul(te,Nt);var Sy=(k+_|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Sy>>>26)|0,Sy&=67108863,_=Math.imul(me,Ot),p=Math.imul(me,Nt),p=p+Math.imul(ye,Ot)|0,A=Math.imul(ye,Nt),_=_+Math.imul(K,Pt)|0,p=p+Math.imul(K,Bt)|0,p=p+Math.imul(te,Pt)|0,A=A+Math.imul(te,Bt)|0;var Iy=(k+_|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Iy>>>26)|0,Iy&=67108863,_=Math.imul(Se,Ot),p=Math.imul(Se,Nt),p=p+Math.imul(_e,Ot)|0,A=Math.imul(_e,Nt),_=_+Math.imul(me,Pt)|0,p=p+Math.imul(me,Bt)|0,p=p+Math.imul(ye,Pt)|0,A=A+Math.imul(ye,Bt)|0,_=_+Math.imul(K,Ct)|0,p=p+Math.imul(K,zt)|0,p=p+Math.imul(te,Ct)|0,A=A+Math.imul(te,zt)|0;var Ay=(k+_|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Ay>>>26)|0,Ay&=67108863,_=Math.imul(Be,Ot),p=Math.imul(Be,Nt),p=p+Math.imul(Ue,Ot)|0,A=Math.imul(Ue,Nt),_=_+Math.imul(Se,Pt)|0,p=p+Math.imul(Se,Bt)|0,p=p+Math.imul(_e,Pt)|0,A=A+Math.imul(_e,Bt)|0,_=_+Math.imul(me,Ct)|0,p=p+Math.imul(me,zt)|0,p=p+Math.imul(ye,Ct)|0,A=A+Math.imul(ye,zt)|0,_=_+Math.imul(K,Lt)|0,p=p+Math.imul(K,Ut)|0,p=p+Math.imul(te,Lt)|0,A=A+Math.imul(te,Ut)|0;var ky=(k+_|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(ky>>>26)|0,ky&=67108863,_=Math.imul(ut,Ot),p=Math.imul(ut,Nt),p=p+Math.imul(mt,Ot)|0,A=Math.imul(mt,Nt),_=_+Math.imul(Be,Pt)|0,p=p+Math.imul(Be,Bt)|0,p=p+Math.imul(Ue,Pt)|0,A=A+Math.imul(Ue,Bt)|0,_=_+Math.imul(Se,Ct)|0,p=p+Math.imul(Se,zt)|0,p=p+Math.imul(_e,Ct)|0,A=A+Math.imul(_e,zt)|0,_=_+Math.imul(me,Lt)|0,p=p+Math.imul(me,Ut)|0,p=p+Math.imul(ye,Lt)|0,A=A+Math.imul(ye,Ut)|0,_=_+Math.imul(K,Mt)|0,p=p+Math.imul(K,Dt)|0,p=p+Math.imul(te,Mt)|0,A=A+Math.imul(te,Dt)|0;var Ry=(k+_|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Ry>>>26)|0,Ry&=67108863,_=Math.imul(ht,Ot),p=Math.imul(ht,Nt),p=p+Math.imul(gt,Ot)|0,A=Math.imul(gt,Nt),_=_+Math.imul(ut,Pt)|0,p=p+Math.imul(ut,Bt)|0,p=p+Math.imul(mt,Pt)|0,A=A+Math.imul(mt,Bt)|0,_=_+Math.imul(Be,Ct)|0,p=p+Math.imul(Be,zt)|0,p=p+Math.imul(Ue,Ct)|0,A=A+Math.imul(Ue,zt)|0,_=_+Math.imul(Se,Lt)|0,p=p+Math.imul(Se,Ut)|0,p=p+Math.imul(_e,Lt)|0,A=A+Math.imul(_e,Ut)|0,_=_+Math.imul(me,Mt)|0,p=p+Math.imul(me,Dt)|0,p=p+Math.imul(ye,Mt)|0,A=A+Math.imul(ye,Dt)|0,_=_+Math.imul(K,jt)|0,p=p+Math.imul(K,Ft)|0,p=p+Math.imul(te,jt)|0,A=A+Math.imul(te,Ft)|0;var Ty=(k+_|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Ty>>>26)|0,Ty&=67108863,_=Math.imul(Et,Ot),p=Math.imul(Et,Nt),p=p+Math.imul(St,Ot)|0,A=Math.imul(St,Nt),_=_+Math.imul(ht,Pt)|0,p=p+Math.imul(ht,Bt)|0,p=p+Math.imul(gt,Pt)|0,A=A+Math.imul(gt,Bt)|0,_=_+Math.imul(ut,Ct)|0,p=p+Math.imul(ut,zt)|0,p=p+Math.imul(mt,Ct)|0,A=A+Math.imul(mt,zt)|0,_=_+Math.imul(Be,Lt)|0,p=p+Math.imul(Be,Ut)|0,p=p+Math.imul(Ue,Lt)|0,A=A+Math.imul(Ue,Ut)|0,_=_+Math.imul(Se,Mt)|0,p=p+Math.imul(Se,Dt)|0,p=p+Math.imul(_e,Mt)|0,A=A+Math.imul(_e,Dt)|0,_=_+Math.imul(me,jt)|0,p=p+Math.imul(me,Ft)|0,p=p+Math.imul(ye,jt)|0,A=A+Math.imul(ye,Ft)|0,_=_+Math.imul(K,Ht)|0,p=p+Math.imul(K,Vt)|0,p=p+Math.imul(te,Ht)|0,A=A+Math.imul(te,Vt)|0;var $y=(k+_|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+($y>>>26)|0,$y&=67108863,_=Math.imul(It,Ot),p=Math.imul(It,Nt),p=p+Math.imul(At,Ot)|0,A=Math.imul(At,Nt),_=_+Math.imul(Et,Pt)|0,p=p+Math.imul(Et,Bt)|0,p=p+Math.imul(St,Pt)|0,A=A+Math.imul(St,Bt)|0,_=_+Math.imul(ht,Ct)|0,p=p+Math.imul(ht,zt)|0,p=p+Math.imul(gt,Ct)|0,A=A+Math.imul(gt,zt)|0,_=_+Math.imul(ut,Lt)|0,p=p+Math.imul(ut,Ut)|0,p=p+Math.imul(mt,Lt)|0,A=A+Math.imul(mt,Ut)|0,_=_+Math.imul(Be,Mt)|0,p=p+Math.imul(Be,Dt)|0,p=p+Math.imul(Ue,Mt)|0,A=A+Math.imul(Ue,Dt)|0,_=_+Math.imul(Se,jt)|0,p=p+Math.imul(Se,Ft)|0,p=p+Math.imul(_e,jt)|0,A=A+Math.imul(_e,Ft)|0,_=_+Math.imul(me,Ht)|0,p=p+Math.imul(me,Vt)|0,p=p+Math.imul(ye,Ht)|0,A=A+Math.imul(ye,Vt)|0,_=_+Math.imul(K,Zt)|0,p=p+Math.imul(K,Gt)|0,p=p+Math.imul(te,Zt)|0,A=A+Math.imul(te,Gt)|0;var Oy=(k+_|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Oy>>>26)|0,Oy&=67108863,_=Math.imul(kt,Ot),p=Math.imul(kt,Nt),p=p+Math.imul(Rt,Ot)|0,A=Math.imul(Rt,Nt),_=_+Math.imul(It,Pt)|0,p=p+Math.imul(It,Bt)|0,p=p+Math.imul(At,Pt)|0,A=A+Math.imul(At,Bt)|0,_=_+Math.imul(Et,Ct)|0,p=p+Math.imul(Et,zt)|0,p=p+Math.imul(St,Ct)|0,A=A+Math.imul(St,zt)|0,_=_+Math.imul(ht,Lt)|0,p=p+Math.imul(ht,Ut)|0,p=p+Math.imul(gt,Lt)|0,A=A+Math.imul(gt,Ut)|0,_=_+Math.imul(ut,Mt)|0,p=p+Math.imul(ut,Dt)|0,p=p+Math.imul(mt,Mt)|0,A=A+Math.imul(mt,Dt)|0,_=_+Math.imul(Be,jt)|0,p=p+Math.imul(Be,Ft)|0,p=p+Math.imul(Ue,jt)|0,A=A+Math.imul(Ue,Ft)|0,_=_+Math.imul(Se,Ht)|0,p=p+Math.imul(Se,Vt)|0,p=p+Math.imul(_e,Ht)|0,A=A+Math.imul(_e,Vt)|0,_=_+Math.imul(me,Zt)|0,p=p+Math.imul(me,Gt)|0,p=p+Math.imul(ye,Zt)|0,A=A+Math.imul(ye,Gt)|0,_=_+Math.imul(K,qt)|0,p=p+Math.imul(K,Wt)|0,p=p+Math.imul(te,qt)|0,A=A+Math.imul(te,Wt)|0;var Ny=(k+_|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Ny>>>26)|0,Ny&=67108863,_=Math.imul(Tt,Ot),p=Math.imul(Tt,Nt),p=p+Math.imul($t,Ot)|0,A=Math.imul($t,Nt),_=_+Math.imul(kt,Pt)|0,p=p+Math.imul(kt,Bt)|0,p=p+Math.imul(Rt,Pt)|0,A=A+Math.imul(Rt,Bt)|0,_=_+Math.imul(It,Ct)|0,p=p+Math.imul(It,zt)|0,p=p+Math.imul(At,Ct)|0,A=A+Math.imul(At,zt)|0,_=_+Math.imul(Et,Lt)|0,p=p+Math.imul(Et,Ut)|0,p=p+Math.imul(St,Lt)|0,A=A+Math.imul(St,Ut)|0,_=_+Math.imul(ht,Mt)|0,p=p+Math.imul(ht,Dt)|0,p=p+Math.imul(gt,Mt)|0,A=A+Math.imul(gt,Dt)|0,_=_+Math.imul(ut,jt)|0,p=p+Math.imul(ut,Ft)|0,p=p+Math.imul(mt,jt)|0,A=A+Math.imul(mt,Ft)|0,_=_+Math.imul(Be,Ht)|0,p=p+Math.imul(Be,Vt)|0,p=p+Math.imul(Ue,Ht)|0,A=A+Math.imul(Ue,Vt)|0,_=_+Math.imul(Se,Zt)|0,p=p+Math.imul(Se,Gt)|0,p=p+Math.imul(_e,Zt)|0,A=A+Math.imul(_e,Gt)|0,_=_+Math.imul(me,qt)|0,p=p+Math.imul(me,Wt)|0,p=p+Math.imul(ye,qt)|0,A=A+Math.imul(ye,Wt)|0,_=_+Math.imul(K,Kt)|0,p=p+Math.imul(K,Jt)|0,p=p+Math.imul(te,Kt)|0,A=A+Math.imul(te,Jt)|0;var Py=(k+_|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Py>>>26)|0,Py&=67108863,_=Math.imul(Tt,Pt),p=Math.imul(Tt,Bt),p=p+Math.imul($t,Pt)|0,A=Math.imul($t,Bt),_=_+Math.imul(kt,Ct)|0,p=p+Math.imul(kt,zt)|0,p=p+Math.imul(Rt,Ct)|0,A=A+Math.imul(Rt,zt)|0,_=_+Math.imul(It,Lt)|0,p=p+Math.imul(It,Ut)|0,p=p+Math.imul(At,Lt)|0,A=A+Math.imul(At,Ut)|0,_=_+Math.imul(Et,Mt)|0,p=p+Math.imul(Et,Dt)|0,p=p+Math.imul(St,Mt)|0,A=A+Math.imul(St,Dt)|0,_=_+Math.imul(ht,jt)|0,p=p+Math.imul(ht,Ft)|0,p=p+Math.imul(gt,jt)|0,A=A+Math.imul(gt,Ft)|0,_=_+Math.imul(ut,Ht)|0,p=p+Math.imul(ut,Vt)|0,p=p+Math.imul(mt,Ht)|0,A=A+Math.imul(mt,Vt)|0,_=_+Math.imul(Be,Zt)|0,p=p+Math.imul(Be,Gt)|0,p=p+Math.imul(Ue,Zt)|0,A=A+Math.imul(Ue,Gt)|0,_=_+Math.imul(Se,qt)|0,p=p+Math.imul(Se,Wt)|0,p=p+Math.imul(_e,qt)|0,A=A+Math.imul(_e,Wt)|0,_=_+Math.imul(me,Kt)|0,p=p+Math.imul(me,Jt)|0,p=p+Math.imul(ye,Kt)|0,A=A+Math.imul(ye,Jt)|0;var By=(k+_|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(By>>>26)|0,By&=67108863,_=Math.imul(Tt,Ct),p=Math.imul(Tt,zt),p=p+Math.imul($t,Ct)|0,A=Math.imul($t,zt),_=_+Math.imul(kt,Lt)|0,p=p+Math.imul(kt,Ut)|0,p=p+Math.imul(Rt,Lt)|0,A=A+Math.imul(Rt,Ut)|0,_=_+Math.imul(It,Mt)|0,p=p+Math.imul(It,Dt)|0,p=p+Math.imul(At,Mt)|0,A=A+Math.imul(At,Dt)|0,_=_+Math.imul(Et,jt)|0,p=p+Math.imul(Et,Ft)|0,p=p+Math.imul(St,jt)|0,A=A+Math.imul(St,Ft)|0,_=_+Math.imul(ht,Ht)|0,p=p+Math.imul(ht,Vt)|0,p=p+Math.imul(gt,Ht)|0,A=A+Math.imul(gt,Vt)|0,_=_+Math.imul(ut,Zt)|0,p=p+Math.imul(ut,Gt)|0,p=p+Math.imul(mt,Zt)|0,A=A+Math.imul(mt,Gt)|0,_=_+Math.imul(Be,qt)|0,p=p+Math.imul(Be,Wt)|0,p=p+Math.imul(Ue,qt)|0,A=A+Math.imul(Ue,Wt)|0,_=_+Math.imul(Se,Kt)|0,p=p+Math.imul(Se,Jt)|0,p=p+Math.imul(_e,Kt)|0,A=A+Math.imul(_e,Jt)|0;var Cy=(k+_|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Cy>>>26)|0,Cy&=67108863,_=Math.imul(Tt,Lt),p=Math.imul(Tt,Ut),p=p+Math.imul($t,Lt)|0,A=Math.imul($t,Ut),_=_+Math.imul(kt,Mt)|0,p=p+Math.imul(kt,Dt)|0,p=p+Math.imul(Rt,Mt)|0,A=A+Math.imul(Rt,Dt)|0,_=_+Math.imul(It,jt)|0,p=p+Math.imul(It,Ft)|0,p=p+Math.imul(At,jt)|0,A=A+Math.imul(At,Ft)|0,_=_+Math.imul(Et,Ht)|0,p=p+Math.imul(Et,Vt)|0,p=p+Math.imul(St,Ht)|0,A=A+Math.imul(St,Vt)|0,_=_+Math.imul(ht,Zt)|0,p=p+Math.imul(ht,Gt)|0,p=p+Math.imul(gt,Zt)|0,A=A+Math.imul(gt,Gt)|0,_=_+Math.imul(ut,qt)|0,p=p+Math.imul(ut,Wt)|0,p=p+Math.imul(mt,qt)|0,A=A+Math.imul(mt,Wt)|0,_=_+Math.imul(Be,Kt)|0,p=p+Math.imul(Be,Jt)|0,p=p+Math.imul(Ue,Kt)|0,A=A+Math.imul(Ue,Jt)|0;var zy=(k+_|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(zy>>>26)|0,zy&=67108863,_=Math.imul(Tt,Mt),p=Math.imul(Tt,Dt),p=p+Math.imul($t,Mt)|0,A=Math.imul($t,Dt),_=_+Math.imul(kt,jt)|0,p=p+Math.imul(kt,Ft)|0,p=p+Math.imul(Rt,jt)|0,A=A+Math.imul(Rt,Ft)|0,_=_+Math.imul(It,Ht)|0,p=p+Math.imul(It,Vt)|0,p=p+Math.imul(At,Ht)|0,A=A+Math.imul(At,Vt)|0,_=_+Math.imul(Et,Zt)|0,p=p+Math.imul(Et,Gt)|0,p=p+Math.imul(St,Zt)|0,A=A+Math.imul(St,Gt)|0,_=_+Math.imul(ht,qt)|0,p=p+Math.imul(ht,Wt)|0,p=p+Math.imul(gt,qt)|0,A=A+Math.imul(gt,Wt)|0,_=_+Math.imul(ut,Kt)|0,p=p+Math.imul(ut,Jt)|0,p=p+Math.imul(mt,Kt)|0,A=A+Math.imul(mt,Jt)|0;var Ly=(k+_|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Ly>>>26)|0,Ly&=67108863,_=Math.imul(Tt,jt),p=Math.imul(Tt,Ft),p=p+Math.imul($t,jt)|0,A=Math.imul($t,Ft),_=_+Math.imul(kt,Ht)|0,p=p+Math.imul(kt,Vt)|0,p=p+Math.imul(Rt,Ht)|0,A=A+Math.imul(Rt,Vt)|0,_=_+Math.imul(It,Zt)|0,p=p+Math.imul(It,Gt)|0,p=p+Math.imul(At,Zt)|0,A=A+Math.imul(At,Gt)|0,_=_+Math.imul(Et,qt)|0,p=p+Math.imul(Et,Wt)|0,p=p+Math.imul(St,qt)|0,A=A+Math.imul(St,Wt)|0,_=_+Math.imul(ht,Kt)|0,p=p+Math.imul(ht,Jt)|0,p=p+Math.imul(gt,Kt)|0,A=A+Math.imul(gt,Jt)|0;var Uy=(k+_|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Uy>>>26)|0,Uy&=67108863,_=Math.imul(Tt,Ht),p=Math.imul(Tt,Vt),p=p+Math.imul($t,Ht)|0,A=Math.imul($t,Vt),_=_+Math.imul(kt,Zt)|0,p=p+Math.imul(kt,Gt)|0,p=p+Math.imul(Rt,Zt)|0,A=A+Math.imul(Rt,Gt)|0,_=_+Math.imul(It,qt)|0,p=p+Math.imul(It,Wt)|0,p=p+Math.imul(At,qt)|0,A=A+Math.imul(At,Wt)|0,_=_+Math.imul(Et,Kt)|0,p=p+Math.imul(Et,Jt)|0,p=p+Math.imul(St,Kt)|0,A=A+Math.imul(St,Jt)|0;var My=(k+_|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(My>>>26)|0,My&=67108863,_=Math.imul(Tt,Zt),p=Math.imul(Tt,Gt),p=p+Math.imul($t,Zt)|0,A=Math.imul($t,Gt),_=_+Math.imul(kt,qt)|0,p=p+Math.imul(kt,Wt)|0,p=p+Math.imul(Rt,qt)|0,A=A+Math.imul(Rt,Wt)|0,_=_+Math.imul(It,Kt)|0,p=p+Math.imul(It,Jt)|0,p=p+Math.imul(At,Kt)|0,A=A+Math.imul(At,Jt)|0;var Dy=(k+_|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Dy>>>26)|0,Dy&=67108863,_=Math.imul(Tt,qt),p=Math.imul(Tt,Wt),p=p+Math.imul($t,qt)|0,A=Math.imul($t,Wt),_=_+Math.imul(kt,Kt)|0,p=p+Math.imul(kt,Jt)|0,p=p+Math.imul(Rt,Kt)|0,A=A+Math.imul(Rt,Jt)|0;var jy=(k+_|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(jy>>>26)|0,jy&=67108863,_=Math.imul(Tt,Kt),p=Math.imul(Tt,Jt),p=p+Math.imul($t,Kt)|0,A=Math.imul($t,Jt);var Fy=(k+_|0)+((p&8191)<<13)|0;return k=(A+(p>>>13)|0)+(Fy>>>26)|0,Fy&=67108863,w[0]=Sy,w[1]=Iy,w[2]=Ay,w[3]=ky,w[4]=Ry,w[5]=Ty,w[6]=$y,w[7]=Oy,w[8]=Ny,w[9]=Py,w[10]=By,w[11]=Cy,w[12]=zy,w[13]=Ly,w[14]=Uy,w[15]=My,w[16]=Dy,w[17]=jy,w[18]=Fy,k!==0&&(w[19]=k,y.length++),y};Math.imul||($=R);function P(S,f,m){m.negative=f.negative^S.negative,m.length=S.length+f.length;for(var y=0,x=0,b=0;b<m.length-1;b++){var w=x;x=0;for(var k=y&67108863,_=Math.min(b,f.length-1),p=Math.max(0,b-S.length+1);p<=_;p++){var A=b-p,Z=S.words[A]|0,K=f.words[p]|0,te=Z*K,ae=te&67108863;w=w+(te/67108864|0)|0,ae=ae+k|0,k=ae&67108863,w=w+(ae>>>26)|0,x+=w>>>26,w&=67108863;}m.words[b]=k,y=w,w=x;}return y!==0?m.words[b]=y:m.length--,m._strip()}function O(S,f,m){return P(S,f,m)}n.prototype.mulTo=function(f,m){var y,x=this.length+f.length;return this.length===10&&f.length===10?y=$(this,f,m):x<63?y=R(this,f,m):x<1024?y=P(this,f,m):y=O(this,f,m),y};n.prototype.mul=function(f){var m=new n(null);return m.words=new Array(this.length+f.length),this.mulTo(f,m)},n.prototype.mulf=function(f){var m=new n(null);return m.words=new Array(this.length+f.length),O(this,f,m)},n.prototype.imul=function(f){return this.clone().mulTo(f,this)},n.prototype.imuln=function(f){var m=f<0;m&&(f=-f),r(typeof f=="number"),r(f<67108864);for(var y=0,x=0;x<this.length;x++){var b=(this.words[x]|0)*f,w=(b&67108863)+(y&67108863);y>>=26,y+=b/67108864|0,y+=w>>>26,this.words[x]=w&67108863;}return y!==0&&(this.words[x]=y,this.length++),f===0&&(this.length=1,this._normSign()),m?this.ineg():this},n.prototype.muln=function(f){return this.clone().imuln(f)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(f){var m=E(f);if(m.length===0)return new n(1);for(var y=this,x=0;x<m.length&&m[x]===0;x++,y=y.sqr());if(++x<m.length)for(var b=y.sqr();x<m.length;x++,b=b.sqr())m[x]!==0&&(y=y.mul(b));return y},n.prototype.iushln=function(f){r(typeof f=="number"&&f>=0);var m=f%26,y=(f-m)/26,x=67108863>>>26-m<<26-m,b;if(m!==0){var w=0;for(b=0;b<this.length;b++){var k=this.words[b]&x,_=(this.words[b]|0)-k<<m;this.words[b]=_|w,w=k>>>26-m;}w&&(this.words[b]=w,this.length++);}if(y!==0){for(b=this.length-1;b>=0;b--)this.words[b+y]=this.words[b];for(b=0;b<y;b++)this.words[b]=0;this.length+=y;}return this._strip()},n.prototype.ishln=function(f){return r(this.negative===0),this.iushln(f)},n.prototype.iushrn=function(f,m,y){r(typeof f=="number"&&f>=0);var x;m?x=(m-m%26)/26:x=0;var b=f%26,w=Math.min((f-b)/26,this.length),k=67108863^67108863>>>b<<b,_=y;if(x-=w,x=Math.max(0,x),_){for(var p=0;p<w;p++)_.words[p]=this.words[p];_.length=w;}if(w!==0)if(this.length>w)for(this.length-=w,p=0;p<this.length;p++)this.words[p]=this.words[p+w];else this.words[0]=0,this.length=1;var A=0;for(p=this.length-1;p>=0&&(A!==0||p>=x);p--){var Z=this.words[p]|0;this.words[p]=A<<26-b|Z>>>b,A=Z&k;}return _&&A!==0&&(_.words[_.length++]=A),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(f,m,y){return r(this.negative===0),this.iushrn(f,m,y)},n.prototype.shln=function(f){return this.clone().ishln(f)},n.prototype.ushln=function(f){return this.clone().iushln(f)},n.prototype.shrn=function(f){return this.clone().ishrn(f)},n.prototype.ushrn=function(f){return this.clone().iushrn(f)},n.prototype.testn=function(f){r(typeof f=="number"&&f>=0);var m=f%26,y=(f-m)/26,x=1<<m;if(this.length<=y)return false;var b=this.words[y];return !!(b&x)},n.prototype.imaskn=function(f){r(typeof f=="number"&&f>=0);var m=f%26,y=(f-m)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=y)return this;if(m!==0&&y++,this.length=Math.min(y,this.length),m!==0){var x=67108863^67108863>>>m<<m;this.words[this.length-1]&=x;}return this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.maskn=function(f){return this.clone().imaskn(f)},n.prototype.iaddn=function(f){return r(typeof f=="number"),r(f<67108864),f<0?this.isubn(-f):this.negative!==0?this.length===1&&(this.words[0]|0)<=f?(this.words[0]=f-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(f),this.negative=1,this):this._iaddn(f)},n.prototype._iaddn=function(f){this.words[0]+=f;for(var m=0;m<this.length&&this.words[m]>=67108864;m++)this.words[m]-=67108864,m===this.length-1?this.words[m+1]=1:this.words[m+1]++;return this.length=Math.max(this.length,m+1),this},n.prototype.isubn=function(f){if(r(typeof f=="number"),r(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var m=0;m<this.length&&this.words[m]<0;m++)this.words[m]+=67108864,this.words[m+1]-=1;return this._strip()},n.prototype.addn=function(f){return this.clone().iaddn(f)},n.prototype.subn=function(f){return this.clone().isubn(f)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(f,m,y){var x=f.length+y,b;this._expand(x);var w,k=0;for(b=0;b<f.length;b++){w=(this.words[b+y]|0)+k;var _=(f.words[b]|0)*m;w-=_&67108863,k=(w>>26)-(_/67108864|0),this.words[b+y]=w&67108863;}for(;b<this.length-y;b++)w=(this.words[b+y]|0)+k,k=w>>26,this.words[b+y]=w&67108863;if(k===0)return this._strip();for(r(k===-1),k=0,b=0;b<this.length;b++)w=-(this.words[b]|0)+k,k=w>>26,this.words[b]=w&67108863;return this.negative=1,this._strip()},n.prototype._wordDiv=function(f,m){var y=this.length-f.length,x=this.clone(),b=f,w=b.words[b.length-1]|0,k=this._countBits(w);y=26-k,y!==0&&(b=b.ushln(y),x.iushln(y),w=b.words[b.length-1]|0);var _=x.length-b.length,p;if(m!=="mod"){p=new n(null),p.length=_+1,p.words=new Array(p.length);for(var A=0;A<p.length;A++)p.words[A]=0;}var Z=x.clone()._ishlnsubmul(b,1,_);Z.negative===0&&(x=Z,p&&(p.words[_]=1));for(var K=_-1;K>=0;K--){var te=(x.words[b.length+K]|0)*67108864+(x.words[b.length+K-1]|0);for(te=Math.min(te/w|0,67108863),x._ishlnsubmul(b,te,K);x.negative!==0;)te--,x.negative=0,x._ishlnsubmul(b,1,K),x.isZero()||(x.negative^=1);p&&(p.words[K]=te);}return p&&p._strip(),x._strip(),m!=="div"&&y!==0&&x.iushrn(y),{div:p||null,mod:x}},n.prototype.divmod=function(f,m,y){if(r(!f.isZero()),this.isZero())return {div:new n(0),mod:new n(0)};var x,b,w;return this.negative!==0&&f.negative===0?(w=this.neg().divmod(f,m),m!=="mod"&&(x=w.div.neg()),m!=="div"&&(b=w.mod.neg(),y&&b.negative!==0&&b.iadd(f)),{div:x,mod:b}):this.negative===0&&f.negative!==0?(w=this.divmod(f.neg(),m),m!=="mod"&&(x=w.div.neg()),{div:x,mod:w.mod}):(this.negative&f.negative)!==0?(w=this.neg().divmod(f.neg(),m),m!=="div"&&(b=w.mod.neg(),y&&b.negative!==0&&b.isub(f)),{div:w.div,mod:b}):f.length>this.length||this.cmp(f)<0?{div:new n(0),mod:this}:f.length===1?m==="div"?{div:this.divn(f.words[0]),mod:null}:m==="mod"?{div:null,mod:new n(this.modrn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new n(this.modrn(f.words[0]))}:this._wordDiv(f,m)},n.prototype.div=function(f){return this.divmod(f,"div",false).div},n.prototype.mod=function(f){return this.divmod(f,"mod",false).mod},n.prototype.umod=function(f){return this.divmod(f,"mod",true).mod},n.prototype.divRound=function(f){var m=this.divmod(f);if(m.mod.isZero())return m.div;var y=m.mod.abs(),x=f.abs().iushrn(1),b=f.words[0]&1,w=y.cmp(x);if(w<0||b===1&&w===0)return m.div;var k=new n(1);return k.negative=this.negative^f.negative,m.div.iadd(k)},n.prototype.modrn=function(f){var m=f<0;m&&(f=-f),r(f<=67108863);for(var y=(1<<26)%f,x=0,b=this.length-1;b>=0;b--)x=(y*x+(this.words[b]|0))%f;return m?-x:x},n.prototype.modn=function(f){return this.modrn(f)},n.prototype.idivn=function(f){var m=f<0;m&&(f=-f),r(f<=67108863);for(var y=0,x=this.length-1;x>=0;x--){var b=(this.words[x]|0)+y*67108864;this.words[x]=b/f|0,y=b%f;}return this._strip(),m?this.ineg():this},n.prototype.divn=function(f){return this.clone().idivn(f)},n.prototype.egcd=function(f){r(f.negative===0),r(!f.isZero());var m=this,y=f.clone();m.negative!==0?m=m.umod(f):m=m.clone();for(var x=new n(1),b=new n(0),w=new n(0),k=new n(1),_=0;m.isEven()&&y.isEven();)m.iushrn(1),y.iushrn(1),++_;for(var p=y.clone(),A=m.clone();!m.isZero();){for(var Z=0,K=1;(m.words[0]&K)===0&&Z<26;++Z,K<<=1);if(Z>0)for(m.iushrn(Z);Z-- >0;)(x.isOdd()||b.isOdd())&&(x.iadd(p),b.isub(A)),x.iushrn(1),b.iushrn(1);for(var te=0,ae=1;(y.words[0]&ae)===0&&te<26;++te,ae<<=1);if(te>0)for(y.iushrn(te);te-- >0;)(w.isOdd()||k.isOdd())&&(w.iadd(p),k.isub(A)),w.iushrn(1),k.iushrn(1);m.cmp(y)>=0?(m.isub(y),x.isub(w),b.isub(k)):(y.isub(m),w.isub(x),k.isub(b));}return {a:w,b:k,gcd:y.iushln(_)}},n.prototype._invmp=function(f){r(f.negative===0),r(!f.isZero());var m=this,y=f.clone();m.negative!==0?m=m.umod(f):m=m.clone();for(var x=new n(1),b=new n(0),w=y.clone();m.cmpn(1)>0&&y.cmpn(1)>0;){for(var k=0,_=1;(m.words[0]&_)===0&&k<26;++k,_<<=1);if(k>0)for(m.iushrn(k);k-- >0;)x.isOdd()&&x.iadd(w),x.iushrn(1);for(var p=0,A=1;(y.words[0]&A)===0&&p<26;++p,A<<=1);if(p>0)for(y.iushrn(p);p-- >0;)b.isOdd()&&b.iadd(w),b.iushrn(1);m.cmp(y)>=0?(m.isub(y),x.isub(b)):(y.isub(m),b.isub(x));}var Z;return m.cmpn(1)===0?Z=x:Z=b,Z.cmpn(0)<0&&Z.iadd(f),Z},n.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var m=this.clone(),y=f.clone();m.negative=0,y.negative=0;for(var x=0;m.isEven()&&y.isEven();x++)m.iushrn(1),y.iushrn(1);do{for(;m.isEven();)m.iushrn(1);for(;y.isEven();)y.iushrn(1);var b=m.cmp(y);if(b<0){var w=m;m=y,y=w;}else if(b===0||y.cmpn(1)===0)break;m.isub(y);}while(true);return y.iushln(x)},n.prototype.invm=function(f){return this.egcd(f).a.umod(f)},n.prototype.isEven=function(){return (this.words[0]&1)===0},n.prototype.isOdd=function(){return (this.words[0]&1)===1},n.prototype.andln=function(f){return this.words[0]&f},n.prototype.bincn=function(f){r(typeof f=="number");var m=f%26,y=(f-m)/26,x=1<<m;if(this.length<=y)return this._expand(y+1),this.words[y]|=x,this;for(var b=x,w=y;b!==0&&w<this.length;w++){var k=this.words[w]|0;k+=b,b=k>>>26,k&=67108863,this.words[w]=k;}return b!==0&&(this.words[w]=b,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(f){var m=f<0;if(this.negative!==0&&!m)return -1;if(this.negative===0&&m)return 1;this._strip();var y;if(this.length>1)y=1;else {m&&(f=-f),r(f<=67108863,"Number is too big");var x=this.words[0]|0;y=x===f?0:x<f?-1:1;}return this.negative!==0?-y|0:y},n.prototype.cmp=function(f){if(this.negative!==0&&f.negative===0)return -1;if(this.negative===0&&f.negative!==0)return 1;var m=this.ucmp(f);return this.negative!==0?-m|0:m},n.prototype.ucmp=function(f){if(this.length>f.length)return 1;if(this.length<f.length)return -1;for(var m=0,y=this.length-1;y>=0;y--){var x=this.words[y]|0,b=f.words[y]|0;if(x!==b){x<b?m=-1:x>b&&(m=1);break}}return m},n.prototype.gtn=function(f){return this.cmpn(f)===1},n.prototype.gt=function(f){return this.cmp(f)===1},n.prototype.gten=function(f){return this.cmpn(f)>=0},n.prototype.gte=function(f){return this.cmp(f)>=0},n.prototype.ltn=function(f){return this.cmpn(f)===-1},n.prototype.lt=function(f){return this.cmp(f)===-1},n.prototype.lten=function(f){return this.cmpn(f)<=0},n.prototype.lte=function(f){return this.cmp(f)<=0},n.prototype.eqn=function(f){return this.cmpn(f)===0},n.prototype.eq=function(f){return this.cmp(f)===0},n.red=function(f){return new G(f)},n.prototype.toRed=function(f){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(f){return this.red=f,this},n.prototype.forceRed=function(f){return r(!this.red,"Already a number in reduction context"),this._forceRed(f)},n.prototype.redAdd=function(f){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},n.prototype.redIAdd=function(f){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},n.prototype.redSub=function(f){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},n.prototype.redISub=function(f){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},n.prototype.redShl=function(f){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},n.prototype.redMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},n.prototype.redIMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(f){return r(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var N={k256:null,p224:null,p192:null,p25519:null};function C(S,f){this.name=S,this.p=new n(f,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp();}C.prototype._tmp=function(){var f=new n(null);return f.words=new Array(Math.ceil(this.n/13)),f},C.prototype.ireduce=function(f){var m=f,y;do this.split(m,this.tmp),m=this.imulK(m),m=m.iadd(this.tmp),y=m.bitLength();while(y>this.n);var x=y<this.n?-1:m.ucmp(this.p);return x===0?(m.words[0]=0,m.length=1):x>0?m.isub(this.p):m.strip!==void 0?m.strip():m._strip(),m},C.prototype.split=function(f,m){f.iushrn(this.n,0,m);},C.prototype.imulK=function(f){return f.imul(this.k)};function z(){C.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}o(z,C),z.prototype.split=function(f,m){for(var y=4194303,x=Math.min(f.length,9),b=0;b<x;b++)m.words[b]=f.words[b];if(m.length=x,f.length<=9){f.words[0]=0,f.length=1;return}var w=f.words[9];for(m.words[m.length++]=w&y,b=10;b<f.length;b++){var k=f.words[b]|0;f.words[b-10]=(k&y)<<4|w>>>22,w=k;}w>>>=22,f.words[b-10]=w,w===0&&f.length>10?f.length-=10:f.length-=9;},z.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var m=0,y=0;y<f.length;y++){var x=f.words[y]|0;m+=x*977,f.words[y]=m&67108863,m=x*64+(m/67108864|0);}return f.words[f.length-1]===0&&(f.length--,f.words[f.length-1]===0&&f.length--),f};function F(){C.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}o(F,C);function W(){C.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}o(W,C);function V(){C.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}o(V,C),V.prototype.imulK=function(f){for(var m=0,y=0;y<f.length;y++){var x=(f.words[y]|0)*19+m,b=x&67108863;x>>>=26,f.words[y]=b,m=x;}return m!==0&&(f.words[f.length++]=m),f},n._prime=function(f){if(N[f])return N[f];var m;if(f==="k256")m=new z;else if(f==="p224")m=new F;else if(f==="p192")m=new W;else if(f==="p25519")m=new V;else throw new Error("Unknown prime "+f);return N[f]=m,m};function G(S){if(typeof S=="string"){var f=n._prime(S);this.m=f.p,this.prime=f;}else r(S.gtn(1),"modulus must be greater than 1"),this.m=S,this.prime=null;}G.prototype._verify1=function(f){r(f.negative===0,"red works only with positives"),r(f.red,"red works only with red numbers");},G.prototype._verify2=function(f,m){r((f.negative|m.negative)===0,"red works only with positives"),r(f.red&&f.red===m.red,"red works only with red numbers");},G.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):(u(f,f.umod(this.m)._forceRed(this)),f)},G.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},G.prototype.add=function(f,m){this._verify2(f,m);var y=f.add(m);return y.cmp(this.m)>=0&&y.isub(this.m),y._forceRed(this)},G.prototype.iadd=function(f,m){this._verify2(f,m);var y=f.iadd(m);return y.cmp(this.m)>=0&&y.isub(this.m),y},G.prototype.sub=function(f,m){this._verify2(f,m);var y=f.sub(m);return y.cmpn(0)<0&&y.iadd(this.m),y._forceRed(this)},G.prototype.isub=function(f,m){this._verify2(f,m);var y=f.isub(m);return y.cmpn(0)<0&&y.iadd(this.m),y},G.prototype.shl=function(f,m){return this._verify1(f),this.imod(f.ushln(m))},G.prototype.imul=function(f,m){return this._verify2(f,m),this.imod(f.imul(m))},G.prototype.mul=function(f,m){return this._verify2(f,m),this.imod(f.mul(m))},G.prototype.isqr=function(f){return this.imul(f,f.clone())},G.prototype.sqr=function(f){return this.mul(f,f)},G.prototype.sqrt=function(f){if(f.isZero())return f.clone();var m=this.m.andln(3);if(r(m%2===1),m===3){var y=this.m.add(new n(1)).iushrn(2);return this.pow(f,y)}for(var x=this.m.subn(1),b=0;!x.isZero()&&x.andln(1)===0;)b++,x.iushrn(1);r(!x.isZero());var w=new n(1).toRed(this),k=w.redNeg(),_=this.m.subn(1).iushrn(1),p=this.m.bitLength();for(p=new n(2*p*p).toRed(this);this.pow(p,_).cmp(k)!==0;)p.redIAdd(k);for(var A=this.pow(p,x),Z=this.pow(f,x.addn(1).iushrn(1)),K=this.pow(f,x),te=b;K.cmp(w)!==0;){for(var ae=K,me=0;ae.cmp(w)!==0;me++)ae=ae.redSqr();r(me<te);var ye=this.pow(A,new n(1).iushln(te-me-1));Z=Z.redMul(ye),A=ye.redSqr(),K=K.redMul(A),te=me;}return Z},G.prototype.invm=function(f){var m=f._invmp(this.m);return m.negative!==0?(m.negative=0,this.imod(m).redNeg()):this.imod(m)},G.prototype.pow=function(f,m){if(m.isZero())return new n(1).toRed(this);if(m.cmpn(1)===0)return f.clone();var y=4,x=new Array(1<<y);x[0]=new n(1).toRed(this),x[1]=f;for(var b=2;b<x.length;b++)x[b]=this.mul(x[b-1],f);var w=x[0],k=0,_=0,p=m.bitLength()%26;for(p===0&&(p=26),b=m.length-1;b>=0;b--){for(var A=m.words[b],Z=p-1;Z>=0;Z--){var K=A>>Z&1;if(w!==x[0]&&(w=this.sqr(w)),K===0&&k===0){_=0;continue}k<<=1,k|=K,_++,!(_!==y&&(b!==0||Z!==0))&&(w=this.mul(w,x[k]),_=0,k=0);}p=26;}return w},G.prototype.convertTo=function(f){var m=f.umod(this.m);return m===f?m.clone():m},G.prototype.convertFrom=function(f){var m=f.clone();return m.red=null,m},n.mont=function(f){return new ne(f)};function ne(S){G.call(this,S),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv);}o(ne,G),ne.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},ne.prototype.convertFrom=function(f){var m=this.imod(f.mul(this.rinv));return m.red=null,m},ne.prototype.imul=function(f,m){if(f.isZero()||m.isZero())return f.words[0]=0,f.length=1,f;var y=f.imul(m),x=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),b=y.isub(x).iushrn(this.shift),w=b;return b.cmp(this.m)>=0?w=b.isub(this.m):b.cmpn(0)<0&&(w=b.iadd(this.m)),w._forceRed(this)},ne.prototype.mul=function(f,m){if(f.isZero()||m.isZero())return new n(0)._forceRed(this);var y=f.mul(m),x=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),b=y.isub(x).iushrn(this.shift),w=b;return b.cmp(this.m)>=0?w=b.isub(this.m):b.cmpn(0)<0&&(w=b.iadd(this.m)),w._forceRed(this)},ne.prototype.invm=function(f){var m=this.imod(f._invmp(this.m).mul(this.r2));return m._forceRed(this)};})(typeof Rb>"u"||Rb,JS);});var QS=Gr(($b,XS)=>{var Dp=If(),So=Dp.Buffer;function YS(e,t){for(var r in e)t[r]=e[r];}So.from&&So.alloc&&So.allocUnsafe&&So.allocUnsafeSlow?XS.exports=Dp:(YS(Dp,$b),$b.Buffer=fa);function fa(e,t,r){return So(e,t,r)}fa.prototype=Object.create(So.prototype);YS(So,fa);fa.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return So(e,t,r)};fa.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var o=So(e);return t!==void 0?typeof r=="string"?o.fill(t,r):o.fill(t):o.fill(0),o};fa.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return So(e)};fa.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Dp.SlowBuffer(e)};});var tI=Gr((Cq,eI)=>{var jp=QS().Buffer;function y3(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var o=0;o<e.length;o++){var n=e.charAt(o),i=n.charCodeAt(0);if(t[i]!==255)throw new TypeError(n+" is ambiguous");t[i]=o;}var s=e.length,a=e.charAt(0),c=Math.log(s)/Math.log(256),u=Math.log(256)/Math.log(s);function l(h){if((Array.isArray(h)||h instanceof Uint8Array)&&(h=jp.from(h)),!jp.isBuffer(h))throw new TypeError("Expected Buffer");if(h.length===0)return "";for(var v=0,E=0,R=0,$=h.length;R!==$&&h[R]===0;)R++,v++;for(var P=($-R)*u+1>>>0,O=new Uint8Array(P);R!==$;){for(var I=h[R],N=0,C=P-1;(I!==0||N<E)&&C!==-1;C--,N++)I+=256*O[C]>>>0,O[C]=I%s>>>0,I=I/s>>>0;if(I!==0)throw new Error("Non-zero carry");E=N,R++;}for(var z=P-E;z!==P&&O[z]===0;)z++;for(var F=a.repeat(v);z<P;++z)F+=e.charAt(O[z]);return F}function d(h){if(typeof h!="string")throw new TypeError("Expected String");if(h.length===0)return jp.alloc(0);for(var v=0,E=0,R=0;h[v]===a;)E++,v++;for(var $=(h.length-v)*c+1>>>0,P=new Uint8Array($);v<h.length;){var O=h.charCodeAt(v);if(O>255)return;var I=t[O];if(I===255)return;for(var N=0,C=$-1;(I!==0||N<R)&&C!==-1;C--,N++)I+=s*P[C]>>>0,P[C]=I%256>>>0,I=I/256>>>0;if(I!==0)throw new Error("Non-zero carry");R=N,v++;}for(var z=$-R;z!==$&&P[z]===0;)z++;var F=jp.allocUnsafe(E+($-z));F.fill(0,0,E);for(var W=E;z!==$;)F[W++]=P[z++];return F}function g(h){var v=d(h);if(v)return v;throw new Error("Non-base"+s+" character")}return {encode:l,decodeUnsafe:d,decode:g}}eI.exports=y3;});var Ob=Gr((zq,rI)=>{var b3=tI(),x3="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";rI.exports=b3(x3);});var nI=Gr(Bb=>{function ri(e,t,r){return t<=e&&e<=r}function Gp(e){if(e===void 0)return {};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function v3(e){for(var t=String(e),r=t.length,o=0,n=[];o<r;){var i=t.charCodeAt(o);if(i<55296||i>57343)n.push(i);else if(56320<=i&&i<=57343)n.push(65533);else if(55296<=i&&i<=56319)if(o===r-1)n.push(65533);else {var s=e.charCodeAt(o+1);if(56320<=s&&s<=57343){var a=i&1023,c=s&1023;n.push(65536+(a<<10)+c),o+=1;}else n.push(65533);}o+=1;}return n}function _3(e){for(var t="",r=0;r<e.length;++r){var o=e[r];o<=65535?t+=String.fromCharCode(o):(o-=65536,t+=String.fromCharCode((o>>10)+55296,(o&1023)+56320));}return t}var Fp=-1;function Pb(e){this.tokens=[].slice.call(e);}Pb.prototype={endOfStream:function(){return !this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():Fp},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(e);},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.shift());else this.tokens.push(e);}};var dc=-1;function Nb(e,t){if(e)throw TypeError("Decoder error");return t||65533}var Hp="utf-8";function Vp(e,t){if(!(this instanceof Vp))return new Vp(e,t);if(e=e!==void 0?String(e).toLowerCase():Hp,e!==Hp)throw new Error("Encoding not supported. Only utf-8 is supported");t=Gp(t),this._streaming=false,this._BOMseen=false,this._decoder=null,this._fatal=!!t.fatal,this._ignoreBOM=!!t.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM});}Vp.prototype={decode:function(t,r){var o;typeof t=="object"&&t instanceof ArrayBuffer?o=new Uint8Array(t):typeof t=="object"&&"buffer"in t&&t.buffer instanceof ArrayBuffer?o=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):o=new Uint8Array(0),r=Gp(r),this._streaming||(this._decoder=new w3({fatal:this._fatal}),this._BOMseen=false),this._streaming=!!r.stream;for(var n=new Pb(o),i=[],s;!n.endOfStream()&&(s=this._decoder.handler(n,n.read()),s!==dc);)s!==null&&(Array.isArray(s)?i.push.apply(i,s):i.push(s));if(!this._streaming){do{if(s=this._decoder.handler(n,n.read()),s===dc)break;s!==null&&(Array.isArray(s)?i.push.apply(i,s):i.push(s));}while(!n.endOfStream());this._decoder=null;}return i.length&&["utf-8"].indexOf(this.encoding)!==-1&&!this._ignoreBOM&&!this._BOMseen&&(i[0]===65279?(this._BOMseen=true,i.shift()):this._BOMseen=true),_3(i)}};function Zp(e,t){if(!(this instanceof Zp))return new Zp(e,t);if(e=e!==void 0?String(e).toLowerCase():Hp,e!==Hp)throw new Error("Encoding not supported. Only utf-8 is supported");t=Gp(t),this._streaming=false,this._encoder=null,this._options={fatal:!!t.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"});}Zp.prototype={encode:function(t,r){t=t?String(t):"",r=Gp(r),this._streaming||(this._encoder=new E3(this._options)),this._streaming=!!r.stream;for(var o=[],n=new Pb(v3(t)),i;!n.endOfStream()&&(i=this._encoder.handler(n,n.read()),i!==dc);)Array.isArray(i)?o.push.apply(o,i):o.push(i);if(!this._streaming){for(;i=this._encoder.handler(n,n.read()),i!==dc;)Array.isArray(i)?o.push.apply(o,i):o.push(i);this._encoder=null;}return new Uint8Array(o)}};function w3(e){var t=e.fatal,r=0,o=0,n=0,i=128,s=191;this.handler=function(a,c){if(c===Fp&&n!==0)return n=0,Nb(t);if(c===Fp)return dc;if(n===0){if(ri(c,0,127))return c;if(ri(c,194,223))n=1,r=c-192;else if(ri(c,224,239))c===224&&(i=160),c===237&&(s=159),n=2,r=c-224;else if(ri(c,240,244))c===240&&(i=144),c===244&&(s=143),n=3,r=c-240;else return Nb(t);return r=r<<6*n,null}if(!ri(c,i,s))return r=n=o=0,i=128,s=191,a.prepend(c),Nb(t);if(i=128,s=191,o+=1,r+=c-128<<6*(n-o),o!==n)return null;var u=r;return r=n=o=0,u};}function E3(e){e.fatal;this.handler=function(r,o){if(o===Fp)return dc;if(ri(o,0,127))return o;var n,i;ri(o,128,2047)?(n=1,i=192):ri(o,2048,65535)?(n=2,i=224):ri(o,65536,1114111)&&(n=3,i=240);for(var s=[(o>>6*n)+i];n>0;){var a=o>>6*(n-1);s.push(128|a&63),n-=1;}return s};}Bb.TextEncoder=Zp;Bb.TextDecoder=Vp;});var cI=Gr(Ge=>{var S3=Ge&&Ge.__createBinding||(Object.create?(function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:true,get:function(){return t[r]}});}):(function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r];})),I3=Ge&&Ge.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t});}):function(e,t){e.default=t;}),Io=Ge&&Ge.__decorate||function(e,t,r,o){var n=arguments.length,i=n<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(n<3?s(i):n>3?s(t,r,i):s(t,r))||i);return n>3&&i&&Object.defineProperty(t,r,i),i},A3=Ge&&Ge.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&S3(t,e,r);return I3(t,e),t},oI=Ge&&Ge.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ge,"__esModule",{value:true});Ge.deserializeUnchecked=Ge.deserialize=Ge.serialize=Ge.BinaryReader=Ge.BinaryWriter=Ge.BorshError=Ge.baseDecode=Ge.baseEncode=void 0;var Hi=oI(Tb()),iI=oI(Ob()),k3=A3(nI()),R3=typeof TextDecoder!="function"?k3.TextDecoder:TextDecoder,T3=new R3("utf-8",{fatal:true});function $3(e){return typeof e=="string"&&(e=Buffer.from(e,"utf8")),iI.default.encode(Buffer.from(e))}Ge.baseEncode=$3;function O3(e){return Buffer.from(iI.default.decode(e))}Ge.baseDecode=O3;var Cb=1024,pr=class extends Error{constructor(t){super(t),this.fieldPath=[],this.originalMessage=t;}addToFieldPath(t){this.fieldPath.splice(0,0,t),this.message=this.originalMessage+": "+this.fieldPath.join(".");}};Ge.BorshError=pr;var qp=class{constructor(){this.buf=Buffer.alloc(Cb),this.length=0;}maybeResize(){this.buf.length<16+this.length&&(this.buf=Buffer.concat([this.buf,Buffer.alloc(Cb)]));}writeU8(t){this.maybeResize(),this.buf.writeUInt8(t,this.length),this.length+=1;}writeU16(t){this.maybeResize(),this.buf.writeUInt16LE(t,this.length),this.length+=2;}writeU32(t){this.maybeResize(),this.buf.writeUInt32LE(t,this.length),this.length+=4;}writeU64(t){this.maybeResize(),this.writeBuffer(Buffer.from(new Hi.default(t).toArray("le",8)));}writeU128(t){this.maybeResize(),this.writeBuffer(Buffer.from(new Hi.default(t).toArray("le",16)));}writeU256(t){this.maybeResize(),this.writeBuffer(Buffer.from(new Hi.default(t).toArray("le",32)));}writeU512(t){this.maybeResize(),this.writeBuffer(Buffer.from(new Hi.default(t).toArray("le",64)));}writeBuffer(t){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),t,Buffer.alloc(Cb)]),this.length+=t.length;}writeString(t){this.maybeResize();let r=Buffer.from(t,"utf8");this.writeU32(r.length),this.writeBuffer(r);}writeFixedArray(t){this.writeBuffer(Buffer.from(t));}writeArray(t,r){this.maybeResize(),this.writeU32(t.length);for(let o of t)this.maybeResize(),r(o);}toArray(){return this.buf.subarray(0,this.length)}};Ge.BinaryWriter=qp;function Ao(e,t,r){let o=r.value;r.value=function(...n){try{return o.apply(this,n)}catch(i){if(i instanceof RangeError){let s=i.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(s)>=0)throw new pr("Reached the end of buffer when deserializing")}throw i}};}var jr=class{constructor(t){this.buf=t,this.offset=0;}readU8(){let t=this.buf.readUInt8(this.offset);return this.offset+=1,t}readU16(){let t=this.buf.readUInt16LE(this.offset);return this.offset+=2,t}readU32(){let t=this.buf.readUInt32LE(this.offset);return this.offset+=4,t}readU64(){let t=this.readBuffer(8);return new Hi.default(t,"le")}readU128(){let t=this.readBuffer(16);return new Hi.default(t,"le")}readU256(){let t=this.readBuffer(32);return new Hi.default(t,"le")}readU512(){let t=this.readBuffer(64);return new Hi.default(t,"le")}readBuffer(t){if(this.offset+t>this.buf.length)throw new pr(`Expected buffer length ${t} isn't within bounds`);let r=this.buf.slice(this.offset,this.offset+t);return this.offset+=t,r}readString(){let t=this.readU32(),r=this.readBuffer(t);try{return T3.decode(r)}catch(o){throw new pr(`Error decoding UTF-8 string: ${o}`)}}readFixedArray(t){return new Uint8Array(this.readBuffer(t))}readArray(t){let r=this.readU32(),o=Array();for(let n=0;n<r;++n)o.push(t());return o}};Io([Ao],jr.prototype,"readU8",null);Io([Ao],jr.prototype,"readU16",null);Io([Ao],jr.prototype,"readU32",null);Io([Ao],jr.prototype,"readU64",null);Io([Ao],jr.prototype,"readU128",null);Io([Ao],jr.prototype,"readU256",null);Io([Ao],jr.prototype,"readU512",null);Io([Ao],jr.prototype,"readString",null);Io([Ao],jr.prototype,"readFixedArray",null);Io([Ao],jr.prototype,"readArray",null);Ge.BinaryReader=jr;function sI(e){return e.charAt(0).toUpperCase()+e.slice(1)}function la(e,t,r,o,n){try{if(typeof o=="string")n[`write${sI(o)}`](r);else if(o instanceof Array)if(typeof o[0]=="number"){if(r.length!==o[0])throw new pr(`Expecting byte array of length ${o[0]}, but got ${r.length} bytes`);n.writeFixedArray(r);}else if(o.length===2&&typeof o[1]=="number"){if(r.length!==o[1])throw new pr(`Expecting byte array of length ${o[1]}, but got ${r.length} bytes`);for(let i=0;i<o[1];i++)la(e,null,r[i],o[0],n);}else n.writeArray(r,i=>{la(e,t,i,o[0],n);});else if(o.kind!==void 0)switch(o.kind){case "option":{r==null?n.writeU8(0):(n.writeU8(1),la(e,t,r,o.type,n));break}case "map":{n.writeU32(r.size),r.forEach((i,s)=>{la(e,t,s,o.key,n),la(e,t,i,o.value,n);});break}default:throw new pr(`FieldType ${o} unrecognized`)}else aI(e,r,n);}catch(i){throw i instanceof pr&&i.addToFieldPath(t),i}}function aI(e,t,r){if(typeof t.borshSerialize=="function"){t.borshSerialize(r);return}let o=e.get(t.constructor);if(!o)throw new pr(`Class ${t.constructor.name} is missing in schema`);if(o.kind==="struct")o.fields.map(([n,i])=>{la(e,n,t[n],i,r);});else if(o.kind==="enum"){let n=t[o.field];for(let i=0;i<o.values.length;++i){let[s,a]=o.values[i];if(s===n){r.writeU8(i),la(e,s,t[s],a,r);break}}}else throw new pr(`Unexpected schema kind: ${o.kind} for ${t.constructor.name}`)}function N3(e,t,r=qp){let o=new r;return aI(e,t,o),o.toArray()}Ge.serialize=N3;function da(e,t,r,o){try{if(typeof r=="string")return o[`read${sI(r)}`]();if(r instanceof Array){if(typeof r[0]=="number")return o.readFixedArray(r[0]);if(typeof r[1]=="number"){let n=[];for(let i=0;i<r[1];i++)n.push(da(e,null,r[0],o));return n}else return o.readArray(()=>da(e,t,r[0],o))}if(r.kind==="option")return o.readU8()?da(e,t,r.type,o):void 0;if(r.kind==="map"){let n=new Map,i=o.readU32();for(let s=0;s<i;s++){let a=da(e,t,r.key,o),c=da(e,t,r.value,o);n.set(a,c);}return n}return zb(e,r,o)}catch(n){throw n instanceof pr&&n.addToFieldPath(t),n}}function zb(e,t,r){if(typeof t.borshDeserialize=="function")return t.borshDeserialize(r);let o=e.get(t);if(!o)throw new pr(`Class ${t.name} is missing in schema`);if(o.kind==="struct"){let n={};for(let[i,s]of e.get(t).fields)n[i]=da(e,i,s,r);return new t(n)}if(o.kind==="enum"){let n=r.readU8();if(n>=o.values.length)throw new pr(`Enum index: ${n} is out of range`);let[i,s]=o.values[n],a=da(e,i,s,r);return new t({[i]:a})}throw new pr(`Unexpected schema kind: ${o.kind} for ${t.constructor.name}`)}function P3(e,t,r,o=jr){let n=new o(r),i=zb(e,t,n);if(n.offset<r.length)throw new pr(`Unexpected ${r.length-n.offset} bytes after deserialized data`);return i}Ge.deserialize=P3;function B3(e,t,r,o=jr){let n=new o(r);return zb(e,t,n)}Ge.deserializeUnchecked=B3;});var Db=Gr(U=>{Object.defineProperty(U,"__esModule",{value:true});U.s16=U.s8=U.nu64be=U.u48be=U.u40be=U.u32be=U.u24be=U.u16be=U.nu64=U.u48=U.u40=U.u32=U.u24=U.u16=U.u8=U.offset=U.greedy=U.Constant=U.UTF8=U.CString=U.Blob=U.Boolean=U.BitField=U.BitStructure=U.VariantLayout=U.Union=U.UnionLayoutDiscriminator=U.UnionDiscriminator=U.Structure=U.Sequence=U.DoubleBE=U.Double=U.FloatBE=U.Float=U.NearInt64BE=U.NearInt64=U.NearUInt64BE=U.NearUInt64=U.IntBE=U.Int=U.UIntBE=U.UInt=U.OffsetLayout=U.GreedyCount=U.ExternalLayout=U.bindConstructorLayout=U.nameWithProperty=U.Layout=U.uint8ArrayToBuffer=U.checkUint8Array=void 0;U.constant=U.utf8=U.cstr=U.blob=U.unionLayoutDiscriminator=U.union=U.seq=U.bits=U.struct=U.f64be=U.f64=U.f32be=U.f32=U.ns64be=U.s48be=U.s40be=U.s32be=U.s24be=U.s16be=U.ns64=U.s48=U.s40=U.s32=U.s24=void 0;var Ub=If();function hc(e){if(!(e instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}U.checkUint8Array=hc;function Me(e){return hc(e),Ub.Buffer.from(e.buffer,e.byteOffset,e.length)}U.uint8ArrayToBuffer=Me;var He=class{constructor(t,r){if(!Number.isInteger(t))throw new TypeError("span must be an integer");this.span=t,this.property=r;}makeDestinationObject(){return {}}getSpan(t,r){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(t){let r=Object.create(this.constructor.prototype);return Object.assign(r,this),r.property=t,r}fromArray(t){}};U.Layout=He;function Mb(e,t){return t.property?e+"["+t.property+"]":e}U.nameWithProperty=Mb;function C3(e,t){if(typeof e!="function")throw new TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call(e,"layout_"))throw new Error("Class is already bound to a layout");if(!(t&&t instanceof He))throw new TypeError("layout must be a Layout");if(Object.prototype.hasOwnProperty.call(t,"boundConstructor_"))throw new Error("layout is already bound to a constructor");e.layout_=t,t.boundConstructor_=e,t.makeDestinationObject=(()=>new e),Object.defineProperty(e.prototype,"encode",{value(r,o){return t.encode(this,r,o)},writable:true}),Object.defineProperty(e,"decode",{value(r,o){return t.decode(r,o)},writable:true});}U.bindConstructorLayout=C3;var kr=class extends He{isCount(){throw new Error("ExternalLayout is abstract")}};U.ExternalLayout=kr;var Wp=class extends kr{constructor(t=1,r){if(!Number.isInteger(t)||0>=t)throw new TypeError("elementSpan must be a (positive) integer");super(-1,r),this.elementSpan=t;}isCount(){return true}decode(t,r=0){hc(t);let o=t.length-r;return Math.floor(o/this.elementSpan)}encode(t,r,o){return 0}};U.GreedyCount=Wp;var Cf=class extends kr{constructor(t,r=0,o){if(!(t instanceof He))throw new TypeError("layout must be a Layout");if(!Number.isInteger(r))throw new TypeError("offset must be integer or undefined");super(t.span,o||t.property),this.layout=t,this.offset=r;}isCount(){return this.layout instanceof Yr||this.layout instanceof dn}decode(t,r=0){return this.layout.decode(t,r+this.offset)}encode(t,r,o=0){return this.layout.encode(t,r,o+this.offset)}};U.OffsetLayout=Cf;var Yr=class extends He{constructor(t,r){if(super(t,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(t,r=0){return Me(t).readUIntLE(r,this.span)}encode(t,r,o=0){return Me(r).writeUIntLE(t,o,this.span),this.span}};U.UInt=Yr;var dn=class extends He{constructor(t,r){if(super(t,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(t,r=0){return Me(t).readUIntBE(r,this.span)}encode(t,r,o=0){return Me(r).writeUIntBE(t,o,this.span),this.span}};U.UIntBE=dn;var ni=class extends He{constructor(t,r){if(super(t,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(t,r=0){return Me(t).readIntLE(r,this.span)}encode(t,r,o=0){return Me(r).writeIntLE(t,o,this.span),this.span}};U.Int=ni;var Vi=class extends He{constructor(t,r){if(super(t,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(t,r=0){return Me(t).readIntBE(r,this.span)}encode(t,r,o=0){return Me(r).writeIntBE(t,o,this.span),this.span}};U.IntBE=Vi;var Lb=Math.pow(2,32);function lm(e){let t=Math.floor(e/Lb),r=e-t*Lb;return {hi32:t,lo32:r}}function dm(e,t){return e*Lb+t}var Kp=class extends He{constructor(t){super(8,t);}decode(t,r=0){let o=Me(t),n=o.readUInt32LE(r),i=o.readUInt32LE(r+4);return dm(i,n)}encode(t,r,o=0){let n=lm(t),i=Me(r);return i.writeUInt32LE(n.lo32,o),i.writeUInt32LE(n.hi32,o+4),8}};U.NearUInt64=Kp;var Jp=class extends He{constructor(t){super(8,t);}decode(t,r=0){let o=Me(t),n=o.readUInt32BE(r),i=o.readUInt32BE(r+4);return dm(n,i)}encode(t,r,o=0){let n=lm(t),i=Me(r);return i.writeUInt32BE(n.hi32,o),i.writeUInt32BE(n.lo32,o+4),8}};U.NearUInt64BE=Jp;var Yp=class extends He{constructor(t){super(8,t);}decode(t,r=0){let o=Me(t),n=o.readUInt32LE(r),i=o.readInt32LE(r+4);return dm(i,n)}encode(t,r,o=0){let n=lm(t),i=Me(r);return i.writeUInt32LE(n.lo32,o),i.writeInt32LE(n.hi32,o+4),8}};U.NearInt64=Yp;var Xp=class extends He{constructor(t){super(8,t);}decode(t,r=0){let o=Me(t),n=o.readInt32BE(r),i=o.readUInt32BE(r+4);return dm(n,i)}encode(t,r,o=0){let n=lm(t),i=Me(r);return i.writeInt32BE(n.hi32,o),i.writeUInt32BE(n.lo32,o+4),8}};U.NearInt64BE=Xp;var Qp=class extends He{constructor(t){super(4,t);}decode(t,r=0){return Me(t).readFloatLE(r)}encode(t,r,o=0){return Me(r).writeFloatLE(t,o),4}};U.Float=Qp;var em=class extends He{constructor(t){super(4,t);}decode(t,r=0){return Me(t).readFloatBE(r)}encode(t,r,o=0){return Me(r).writeFloatBE(t,o),4}};U.FloatBE=em;var tm=class extends He{constructor(t){super(8,t);}decode(t,r=0){return Me(t).readDoubleLE(r)}encode(t,r,o=0){return Me(r).writeDoubleLE(t,o),8}};U.Double=tm;var rm=class extends He{constructor(t){super(8,t);}decode(t,r=0){return Me(t).readDoubleBE(r)}encode(t,r,o=0){return Me(r).writeDoubleBE(t,o),8}};U.DoubleBE=rm;var nm=class extends He{constructor(t,r,o){if(!(t instanceof He))throw new TypeError("elementLayout must be a Layout");if(!(r instanceof kr&&r.isCount()||Number.isInteger(r)&&0<=r))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let n=-1;!(r instanceof kr)&&0<t.span&&(n=r*t.span),super(n,o),this.elementLayout=t,this.count=r;}getSpan(t,r=0){if(0<=this.span)return this.span;let o=0,n=this.count;if(n instanceof kr&&(n=n.decode(t,r)),0<this.elementLayout.span)o=n*this.elementLayout.span;else {let i=0;for(;i<n;)o+=this.elementLayout.getSpan(t,r+o),++i;}return o}decode(t,r=0){let o=[],n=0,i=this.count;for(i instanceof kr&&(i=i.decode(t,r));n<i;)o.push(this.elementLayout.decode(t,r)),r+=this.elementLayout.getSpan(t,r),n+=1;return o}encode(t,r,o=0){let n=this.elementLayout,i=t.reduce((s,a)=>s+n.encode(a,r,o+s),0);return this.count instanceof kr&&this.count.encode(t.length,r,o),i}};U.Sequence=nm;var om=class extends He{constructor(t,r,o){if(!(Array.isArray(t)&&t.reduce((i,s)=>i&&s instanceof He,true)))throw new TypeError("fields must be array of Layout instances");typeof r=="boolean"&&o===void 0&&(o=r,r=void 0);for(let i of t)if(0>i.span&&i.property===void 0)throw new Error("fields cannot contain unnamed variable-length layout");let n=-1;try{n=t.reduce((i,s)=>i+s.getSpan(),0);}catch{}super(n,r),this.fields=t,this.decodePrefixes=!!o;}getSpan(t,r=0){if(0<=this.span)return this.span;let o=0;try{o=this.fields.reduce((n,i)=>{let s=i.getSpan(t,r);return r+=s,n+s},0);}catch{throw new RangeError("indeterminate span")}return o}decode(t,r=0){hc(t);let o=this.makeDestinationObject();for(let n of this.fields)if(n.property!==void 0&&(o[n.property]=n.decode(t,r)),r+=n.getSpan(t,r),this.decodePrefixes&&t.length===r)break;return o}encode(t,r,o=0){let n=o,i=0,s=0;for(let a of this.fields){let c=a.span;if(s=0<c?c:0,a.property!==void 0){let u=t[a.property];u!==void 0&&(s=a.encode(u,r,o),0>c&&(c=a.getSpan(r,o)));}i=o,o+=c;}return i+s-n}fromArray(t){let r=this.makeDestinationObject();for(let o of this.fields)o.property!==void 0&&0<t.length&&(r[o.property]=t.shift());return r}layoutFor(t){if(typeof t!="string")throw new TypeError("property must be string");for(let r of this.fields)if(r.property===t)return r}offsetOf(t){if(typeof t!="string")throw new TypeError("property must be string");let r=0;for(let o of this.fields){if(o.property===t)return r;0>o.span?r=-1:0<=r&&(r+=o.span);}}};U.Structure=om;var zf=class{constructor(t){this.property=t;}decode(t,r){throw new Error("UnionDiscriminator is abstract")}encode(t,r,o){throw new Error("UnionDiscriminator is abstract")}};U.UnionDiscriminator=zf;var mc=class extends zf{constructor(t,r){if(!(t instanceof kr&&t.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(r||t.property||"variant"),this.layout=t;}decode(t,r){return this.layout.decode(t,r)}encode(t,r,o){return this.layout.encode(t,r,o)}};U.UnionLayoutDiscriminator=mc;var Lf=class extends He{constructor(t,r,o){let n;if(t instanceof Yr||t instanceof dn)n=new mc(new Cf(t));else if(t instanceof kr&&t.isCount())n=new mc(t);else if(t instanceof zf)n=t;else throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(r===void 0&&(r=null),!(r===null||r instanceof He))throw new TypeError("defaultLayout must be null or a Layout");if(r!==null){if(0>r.span)throw new Error("defaultLayout must have constant span");r.property===void 0&&(r=r.replicate("content"));}let i=-1;r&&(i=r.span,0<=i&&(t instanceof Yr||t instanceof dn)&&(i+=n.layout.span)),super(i,o),this.discriminator=n,this.usesPrefixDiscriminator=t instanceof Yr||t instanceof dn,this.defaultLayout=r,this.registry={};let s=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(a){return s(a)},this.configGetSourceVariant=function(a){s=a.bind(this);};}getSpan(t,r=0){if(0<=this.span)return this.span;let o=this.getVariant(t,r);if(!o)throw new Error("unable to determine span for unrecognized variant");return o.getSpan(t,r)}defaultGetSourceVariant(t){if(Object.prototype.hasOwnProperty.call(t,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(t,this.defaultLayout.property))return;let r=this.registry[t[this.discriminator.property]];if(r&&(!r.layout||r.property&&Object.prototype.hasOwnProperty.call(t,r.property)))return r}else for(let r in this.registry){let o=this.registry[r];if(o.property&&Object.prototype.hasOwnProperty.call(t,o.property))return o}throw new Error("unable to infer src variant")}decode(t,r=0){let o,n=this.discriminator,i=n.decode(t,r),s=this.registry[i];if(s===void 0){let a=this.defaultLayout,c=0;this.usesPrefixDiscriminator&&(c=n.layout.span),o=this.makeDestinationObject(),o[n.property]=i,o[a.property]=a.decode(t,r+c);}else o=s.decode(t,r);return o}encode(t,r,o=0){let n=this.getSourceVariant(t);if(n===void 0){let i=this.discriminator,s=this.defaultLayout,a=0;return this.usesPrefixDiscriminator&&(a=i.layout.span),i.encode(t[i.property],r,o),a+s.encode(t[s.property],r,o+a)}return n.encode(t,r,o)}addVariant(t,r,o){let n=new im(this,t,r,o);return this.registry[t]=n,n}getVariant(t,r=0){let o;return t instanceof Uint8Array?o=this.discriminator.decode(t,r):o=t,this.registry[o]}};U.Union=Lf;var im=class extends He{constructor(t,r,o,n){if(!(t instanceof Lf))throw new TypeError("union must be a Union");if(!Number.isInteger(r)||0>r)throw new TypeError("variant must be a (non-negative) integer");if(typeof o=="string"&&n===void 0&&(n=o,o=null),o){if(!(o instanceof He))throw new TypeError("layout must be a Layout");if(t.defaultLayout!==null&&0<=o.span&&o.span>t.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if(typeof n!="string")throw new TypeError("variant must have a String property")}let i=t.span;0>t.span&&(i=o?o.span:0,0<=i&&t.usesPrefixDiscriminator&&(i+=t.discriminator.layout.span)),super(i,n),this.union=t,this.variant=r,this.layout=o||null;}getSpan(t,r=0){if(0<=this.span)return this.span;let o=0;this.union.usesPrefixDiscriminator&&(o=this.union.discriminator.layout.span);let n=0;return this.layout&&(n=this.layout.getSpan(t,r+o)),o+n}decode(t,r=0){let o=this.makeDestinationObject();if(this!==this.union.getVariant(t,r))throw new Error("variant mismatch");let n=0;return this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout?o[this.property]=this.layout.decode(t,r+n):this.property?o[this.property]=true:this.union.usesPrefixDiscriminator&&(o[this.union.discriminator.property]=this.variant),o}encode(t,r,o=0){let n=0;if(this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(t,this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,r,o);let i=n;if(this.layout&&(this.layout.encode(t[this.property],r,o+n),i+=this.layout.getSpan(r,o+n),0<=this.union.span&&i>this.union.span))throw new Error("encoded variant overruns containing union");return i}fromArray(t){if(this.layout)return this.layout.fromArray(t)}};U.VariantLayout=im;function pc(e){return 0>e&&(e+=4294967296),e}var Uf=class extends He{constructor(t,r,o){if(!(t instanceof Yr||t instanceof dn))throw new TypeError("word must be a UInt or UIntBE layout");if(typeof r=="string"&&o===void 0&&(o=r,r=false),4<t.span)throw new RangeError("word cannot exceed 32 bits");super(t.span,o),this.word=t,this.msb=!!r,this.fields=[];let n=0;this._packedSetValue=function(i){return n=pc(i),this},this._packedGetValue=function(){return n};}decode(t,r=0){let o=this.makeDestinationObject(),n=this.word.decode(t,r);this._packedSetValue(n);for(let i of this.fields)i.property!==void 0&&(o[i.property]=i.decode(t));return o}encode(t,r,o=0){let n=this.word.decode(r,o);this._packedSetValue(n);for(let i of this.fields)if(i.property!==void 0){let s=t[i.property];s!==void 0&&i.encode(s);}return this.word.encode(this._packedGetValue(),r,o)}addField(t,r){let o=new Mf(this,t,r);return this.fields.push(o),o}addBoolean(t){let r=new sm(this,t);return this.fields.push(r),r}fieldFor(t){if(typeof t!="string")throw new TypeError("property must be string");for(let r of this.fields)if(r.property===t)return r}};U.BitStructure=Uf;var Mf=class{constructor(t,r,o){if(!(t instanceof Uf))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(r)||0>=r)throw new TypeError("bits must be positive integer");let n=8*t.span,i=t.fields.reduce((s,a)=>s+a.bits,0);if(r+i>n)throw new Error("bits too long for span remainder ("+(n-i)+" of "+n+" remain)");this.container=t,this.bits=r,this.valueMask=(1<<r)-1,r===32&&(this.valueMask=4294967295),this.start=i,this.container.msb&&(this.start=n-i-r),this.wordMask=pc(this.valueMask<<this.start),this.property=o;}decode(t,r){let o=this.container._packedGetValue();return pc(o&this.wordMask)>>>this.start}encode(t){if(typeof t!="number"||!Number.isInteger(t)||t!==pc(t&this.valueMask))throw new TypeError(Mb("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);let r=this.container._packedGetValue(),o=pc(t<<this.start);this.container._packedSetValue(pc(r&~this.wordMask)|o);}};U.BitField=Mf;var sm=class extends Mf{constructor(t,r){super(t,1,r);}decode(t,r){return !!super.decode(t,r)}encode(t){typeof t=="boolean"&&(t=+t),super.encode(t);}};U.Boolean=sm;var am=class extends He{constructor(t,r){if(!(t instanceof kr&&t.isCount()||Number.isInteger(t)&&0<=t))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let o=-1;t instanceof kr||(o=t),super(o,r),this.length=t;}getSpan(t,r){let o=this.span;return 0>o&&(o=this.length.decode(t,r)),o}decode(t,r=0){let o=this.span;return 0>o&&(o=this.length.decode(t,r)),Me(t).slice(r,r+o)}encode(t,r,o){let n=this.length;if(this.length instanceof kr&&(n=t.length),!(t instanceof Uint8Array&&n===t.length))throw new TypeError(Mb("Blob.encode",this)+" requires (length "+n+") Uint8Array as src");if(o+n>r.length)throw new RangeError("encoding overruns Uint8Array");let i=Me(t);return Me(r).write(i.toString("hex"),o,n,"hex"),this.length instanceof kr&&this.length.encode(n,r,o),n}};U.Blob=am;var cm=class extends He{constructor(t){super(-1,t);}getSpan(t,r=0){hc(t);let o=r;for(;o<t.length&&t[o]!==0;)o+=1;return 1+o-r}decode(t,r=0){let o=this.getSpan(t,r);return Me(t).slice(r,r+o-1).toString("utf-8")}encode(t,r,o=0){typeof t!="string"&&(t=String(t));let n=Ub.Buffer.from(t,"utf8"),i=n.length;if(o+i>r.length)throw new RangeError("encoding overruns Buffer");let s=Me(r);return n.copy(s,o),s[o+i]=0,i+1}};U.CString=cm;var um=class extends He{constructor(t,r){if(typeof t=="string"&&r===void 0&&(r=t,t=void 0),t===void 0)t=-1;else if(!Number.isInteger(t))throw new TypeError("maxSpan must be an integer");super(-1,r),this.maxSpan=t;}getSpan(t,r=0){return hc(t),t.length-r}decode(t,r=0){let o=this.getSpan(t,r);if(0<=this.maxSpan&&this.maxSpan<o)throw new RangeError("text length exceeds maxSpan");return Me(t).slice(r,r+o).toString("utf-8")}encode(t,r,o=0){typeof t!="string"&&(t=String(t));let n=Ub.Buffer.from(t,"utf8"),i=n.length;if(0<=this.maxSpan&&this.maxSpan<i)throw new RangeError("text length exceeds maxSpan");if(o+i>r.length)throw new RangeError("encoding overruns Buffer");return n.copy(Me(r),o),i}};U.UTF8=um;var fm=class extends He{constructor(t,r){super(0,r),this.value=t;}decode(t,r){return this.value}encode(t,r,o){return 0}};U.Constant=fm;U.greedy=((e,t)=>new Wp(e,t));U.offset=((e,t,r)=>new Cf(e,t,r));U.u8=(e=>new Yr(1,e));U.u16=(e=>new Yr(2,e));U.u24=(e=>new Yr(3,e));U.u32=(e=>new Yr(4,e));U.u40=(e=>new Yr(5,e));U.u48=(e=>new Yr(6,e));U.nu64=(e=>new Kp(e));U.u16be=(e=>new dn(2,e));U.u24be=(e=>new dn(3,e));U.u32be=(e=>new dn(4,e));U.u40be=(e=>new dn(5,e));U.u48be=(e=>new dn(6,e));U.nu64be=(e=>new Jp(e));U.s8=(e=>new ni(1,e));U.s16=(e=>new ni(2,e));U.s24=(e=>new ni(3,e));U.s32=(e=>new ni(4,e));U.s40=(e=>new ni(5,e));U.s48=(e=>new ni(6,e));U.ns64=(e=>new Yp(e));U.s16be=(e=>new Vi(2,e));U.s24be=(e=>new Vi(3,e));U.s32be=(e=>new Vi(4,e));U.s40be=(e=>new Vi(5,e));U.s48be=(e=>new Vi(6,e));U.ns64be=(e=>new Xp(e));U.f32=(e=>new Qp(e));U.f32be=(e=>new em(e));U.f64=(e=>new tm(e));U.f64be=(e=>new rm(e));U.struct=((e,t,r)=>new om(e,t,r));U.bits=((e,t,r)=>new Uf(e,t,r));U.seq=((e,t,r)=>new nm(e,t,r));U.union=((e,t,r)=>new Lf(e,t,r));U.unionLayoutDiscriminator=((e,t)=>new mc(e,t));U.blob=((e,t)=>new am(e,t));U.cstr=(e=>new cm(e));U.utf8=((e,t)=>new um(e,t));U.constant=((e,t)=>new fm(e,t));});function Ff(){if(!gm&&(gm=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!gm))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return gm(KL)}var gm,KL,Yb=j(()=>{KL=new Uint8Array(16);});var kI,RI=j(()=>{kI=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;});function JL(e){return typeof e=="string"&&kI.test(e)}var Gi,Hf=j(()=>{RI();Gi=JL;});function YL(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(mr[e[t+0]]+mr[e[t+1]]+mr[e[t+2]]+mr[e[t+3]]+"-"+mr[e[t+4]]+mr[e[t+5]]+"-"+mr[e[t+6]]+mr[e[t+7]]+"-"+mr[e[t+8]]+mr[e[t+9]]+"-"+mr[e[t+10]]+mr[e[t+11]]+mr[e[t+12]]+mr[e[t+13]]+mr[e[t+14]]+mr[e[t+15]]).toLowerCase();if(!Gi(r))throw TypeError("Stringified UUID is invalid");return r}var mr,ym,qi,Vf=j(()=>{Hf();mr=[];for(ym=0;ym<256;++ym)mr.push((ym+256).toString(16).substr(1));qi=YL;});function XL(e,t,r){var o=t&&r||0,n=t||new Array(16);e=e||{};var i=e.node||TI,s=e.clockseq!==void 0?e.clockseq:Xb;if(i==null||s==null){var a=e.random||(e.rng||Ff)();i==null&&(i=TI=[a[0]|1,a[1],a[2],a[3],a[4],a[5]]),s==null&&(s=Xb=(a[6]<<8|a[7])&16383);}var c=e.msecs!==void 0?e.msecs:Date.now(),u=e.nsecs!==void 0?e.nsecs:ex+1,l=c-Qb+(u-ex)/1e4;if(l<0&&e.clockseq===void 0&&(s=s+1&16383),(l<0||c>Qb)&&e.nsecs===void 0&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Qb=c,ex=u,Xb=s,c+=122192928e5;var d=((c&268435455)*1e4+u)%4294967296;n[o++]=d>>>24&255,n[o++]=d>>>16&255,n[o++]=d>>>8&255,n[o++]=d&255;var g=c/4294967296*1e4&268435455;n[o++]=g>>>8&255,n[o++]=g&255,n[o++]=g>>>24&15|16,n[o++]=g>>>16&255,n[o++]=s>>>8|128,n[o++]=s&255;for(var h=0;h<6;++h)n[o+h]=i[h];return t||qi(n)}var TI,Xb,Qb,ex,$I,OI=j(()=>{Yb();Vf();Qb=0,ex=0;$I=XL;});function QL(e){if(!Gi(e))throw TypeError("Invalid UUID");var t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}var bm,tx=j(()=>{Hf();bm=QL;});function eU(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}function xm(e,t,r){function o(n,i,s,a){if(typeof n=="string"&&(n=eU(n)),typeof i=="string"&&(i=bm(i)),i.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var c=new Uint8Array(16+n.length);if(c.set(i),c.set(n,i.length),c=r(c),c[6]=c[6]&15|t,c[8]=c[8]&63|128,s){a=a||0;for(var u=0;u<16;++u)s[a+u]=c[u];return s}return qi(c)}try{o.name=e;}catch{}return o.DNS=tU,o.URL=rU,o}var tU,rU,rx=j(()=>{Vf();tx();tU="6ba7b810-9dad-11d1-80b4-00c04fd430c8",rU="6ba7b811-9dad-11d1-80b4-00c04fd430c8";});function nU(e){if(typeof e=="string"){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var r=0;r<t.length;++r)e[r]=t.charCodeAt(r);}return oU(iU(sU(e),e.length*8))}function oU(e){for(var t=[],r=e.length*32,o="0123456789abcdef",n=0;n<r;n+=8){var i=e[n>>5]>>>n%32&255,s=parseInt(o.charAt(i>>>4&15)+o.charAt(i&15),16);t.push(s);}return t}function NI(e){return (e+64>>>9<<4)+14+1}function iU(e,t){e[t>>5]|=128<<t%32,e[NI(t)-1]=t;for(var r=1732584193,o=-271733879,n=-1732584194,i=271733878,s=0;s<e.length;s+=16){var a=r,c=o,u=n,l=i;r=Tr(r,o,n,i,e[s],7,-680876936),i=Tr(i,r,o,n,e[s+1],12,-389564586),n=Tr(n,i,r,o,e[s+2],17,606105819),o=Tr(o,n,i,r,e[s+3],22,-1044525330),r=Tr(r,o,n,i,e[s+4],7,-176418897),i=Tr(i,r,o,n,e[s+5],12,1200080426),n=Tr(n,i,r,o,e[s+6],17,-1473231341),o=Tr(o,n,i,r,e[s+7],22,-45705983),r=Tr(r,o,n,i,e[s+8],7,1770035416),i=Tr(i,r,o,n,e[s+9],12,-1958414417),n=Tr(n,i,r,o,e[s+10],17,-42063),o=Tr(o,n,i,r,e[s+11],22,-1990404162),r=Tr(r,o,n,i,e[s+12],7,1804603682),i=Tr(i,r,o,n,e[s+13],12,-40341101),n=Tr(n,i,r,o,e[s+14],17,-1502002290),o=Tr(o,n,i,r,e[s+15],22,1236535329),r=$r(r,o,n,i,e[s+1],5,-165796510),i=$r(i,r,o,n,e[s+6],9,-1069501632),n=$r(n,i,r,o,e[s+11],14,643717713),o=$r(o,n,i,r,e[s],20,-373897302),r=$r(r,o,n,i,e[s+5],5,-701558691),i=$r(i,r,o,n,e[s+10],9,38016083),n=$r(n,i,r,o,e[s+15],14,-660478335),o=$r(o,n,i,r,e[s+4],20,-405537848),r=$r(r,o,n,i,e[s+9],5,568446438),i=$r(i,r,o,n,e[s+14],9,-1019803690),n=$r(n,i,r,o,e[s+3],14,-187363961),o=$r(o,n,i,r,e[s+8],20,1163531501),r=$r(r,o,n,i,e[s+13],5,-1444681467),i=$r(i,r,o,n,e[s+2],9,-51403784),n=$r(n,i,r,o,e[s+7],14,1735328473),o=$r(o,n,i,r,e[s+12],20,-1926607734),r=Or(r,o,n,i,e[s+5],4,-378558),i=Or(i,r,o,n,e[s+8],11,-2022574463),n=Or(n,i,r,o,e[s+11],16,1839030562),o=Or(o,n,i,r,e[s+14],23,-35309556),r=Or(r,o,n,i,e[s+1],4,-1530992060),i=Or(i,r,o,n,e[s+4],11,1272893353),n=Or(n,i,r,o,e[s+7],16,-155497632),o=Or(o,n,i,r,e[s+10],23,-1094730640),r=Or(r,o,n,i,e[s+13],4,681279174),i=Or(i,r,o,n,e[s],11,-358537222),n=Or(n,i,r,o,e[s+3],16,-722521979),o=Or(o,n,i,r,e[s+6],23,76029189),r=Or(r,o,n,i,e[s+9],4,-640364487),i=Or(i,r,o,n,e[s+12],11,-421815835),n=Or(n,i,r,o,e[s+15],16,530742520),o=Or(o,n,i,r,e[s+2],23,-995338651),r=Nr(r,o,n,i,e[s],6,-198630844),i=Nr(i,r,o,n,e[s+7],10,1126891415),n=Nr(n,i,r,o,e[s+14],15,-1416354905),o=Nr(o,n,i,r,e[s+5],21,-57434055),r=Nr(r,o,n,i,e[s+12],6,1700485571),i=Nr(i,r,o,n,e[s+3],10,-1894986606),n=Nr(n,i,r,o,e[s+10],15,-1051523),o=Nr(o,n,i,r,e[s+1],21,-2054922799),r=Nr(r,o,n,i,e[s+8],6,1873313359),i=Nr(i,r,o,n,e[s+15],10,-30611744),n=Nr(n,i,r,o,e[s+6],15,-1560198380),o=Nr(o,n,i,r,e[s+13],21,1309151649),r=Nr(r,o,n,i,e[s+4],6,-145523070),i=Nr(i,r,o,n,e[s+11],10,-1120210379),n=Nr(n,i,r,o,e[s+2],15,718787259),o=Nr(o,n,i,r,e[s+9],21,-343485551),r=Wi(r,a),o=Wi(o,c),n=Wi(n,u),i=Wi(i,l);}return [r,o,n,i]}function sU(e){if(e.length===0)return [];for(var t=e.length*8,r=new Uint32Array(NI(t)),o=0;o<t;o+=8)r[o>>5]|=(e[o/8]&255)<<o%32;return r}function Wi(e,t){var r=(e&65535)+(t&65535),o=(e>>16)+(t>>16)+(r>>16);return o<<16|r&65535}function aU(e,t){return e<<t|e>>>32-t}function vm(e,t,r,o,n,i){return Wi(aU(Wi(Wi(t,e),Wi(o,i)),n),r)}function Tr(e,t,r,o,n,i,s){return vm(t&r|~t&o,e,t,n,i,s)}function $r(e,t,r,o,n,i,s){return vm(t&o|r&~o,e,t,n,i,s)}function Or(e,t,r,o,n,i,s){return vm(t^r^o,e,t,n,i,s)}function Nr(e,t,r,o,n,i,s){return vm(r^(t|~o),e,t,n,i,s)}var PI,BI=j(()=>{PI=nU;});var cU,CI,zI=j(()=>{rx();BI();cU=xm("v3",48,PI),CI=cU;});function uU(e,t,r){e=e||{};var o=e.random||(e.rng||Ff)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){r=r||0;for(var n=0;n<16;++n)t[r+n]=o[n];return t}return qi(o)}var LI,UI=j(()=>{Yb();Vf();LI=uU;});function fU(e,t,r,o){switch(e){case 0:return t&r^~t&o;case 1:return t^r^o;case 2:return t&r^t&o^r&o;case 3:return t^r^o}}function nx(e,t){return e<<t|e>>>32-t}function lU(e){var t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){var o=unescape(encodeURIComponent(e));e=[];for(var n=0;n<o.length;++n)e.push(o.charCodeAt(n));}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var i=e.length/4+2,s=Math.ceil(i/16),a=new Array(s),c=0;c<s;++c){for(var u=new Uint32Array(16),l=0;l<16;++l)u[l]=e[c*64+l*4]<<24|e[c*64+l*4+1]<<16|e[c*64+l*4+2]<<8|e[c*64+l*4+3];a[c]=u;}a[s-1][14]=(e.length-1)*8/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=(e.length-1)*8&4294967295;for(var d=0;d<s;++d){for(var g=new Uint32Array(80),h=0;h<16;++h)g[h]=a[d][h];for(var v=16;v<80;++v)g[v]=nx(g[v-3]^g[v-8]^g[v-14]^g[v-16],1);for(var E=r[0],R=r[1],$=r[2],P=r[3],O=r[4],I=0;I<80;++I){var N=Math.floor(I/20),C=nx(E,5)+fU(N,R,$,P)+O+t[N]+g[I]>>>0;O=P,P=$,$=nx(R,30)>>>0,R=E,E=C;}r[0]=r[0]+E>>>0,r[1]=r[1]+R>>>0,r[2]=r[2]+$>>>0,r[3]=r[3]+P>>>0,r[4]=r[4]+O>>>0;}return [r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var MI,DI=j(()=>{MI=lU;});var dU,jI,FI=j(()=>{rx();DI();dU=xm("v5",80,MI),jI=dU;});var HI,VI=j(()=>{HI="00000000-0000-0000-0000-000000000000";});function pU(e){if(!Gi(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}var ZI,GI=j(()=>{Hf();ZI=pU;});var ox={};Ir(ox,{NIL:()=>HI,parse:()=>bm,stringify:()=>qi,v1:()=>$I,v3:()=>CI,v4:()=>LI,v5:()=>jI,validate:()=>Gi,version:()=>ZI});var ix=j(()=>{OI();zI();UI();FI();VI();GI();Hf();Vf();tx();});var WI=Gr((zW,qI)=>{var mU=(ix(),yE(ox)).v4,hU=function(e,t,r,o){if(typeof e!="string")throw new TypeError(e+" must be a string");o=o||{};let n=typeof o.version=="number"?o.version:2;if(n!==1&&n!==2)throw new TypeError(n+" must be 1 or 2");let i={method:e};if(n===2&&(i.jsonrpc="2.0"),t){if(typeof t!="object"&&!Array.isArray(t))throw new TypeError(t+" must be an object, array or omitted");i.params=t;}if(typeof r>"u"){let s=typeof o.generator=="function"?o.generator:function(){return mU()};i.id=s(i,o);}else n===2&&r===null?o.notificationIdNull&&(i.id=null):i.id=r;return i};qI.exports=hU;});var JI=Gr((LW,KI)=>{var gU=(ix(),yE(ox)).v4,yU=WI(),Zf=function(e,t){if(!(this instanceof Zf))return new Zf(e,t);t||(t={}),this.options={reviver:typeof t.reviver<"u"?t.reviver:null,replacer:typeof t.replacer<"u"?t.replacer:null,generator:typeof t.generator<"u"?t.generator:function(){return gU()},version:typeof t.version<"u"?t.version:2,notificationIdNull:typeof t.notificationIdNull=="boolean"?t.notificationIdNull:false},this.callServer=e;};KI.exports=Zf;Zf.prototype.request=function(e,t,r,o){let n=this,i=null,s=Array.isArray(e)&&typeof t=="function";if(this.options.version===1&&s)throw new TypeError("JSON-RPC 1.0 does not support batching");if(s||!s&&e&&typeof e=="object"&&typeof t=="function")o=t,i=e;else {typeof r=="function"&&(o=r,r=void 0);let u=typeof o=="function";try{i=yU(e,t,r,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull});}catch(l){if(u){o(l);return}throw l}if(!u)return i}let c;try{c=JSON.stringify(i,this.options.replacer);}catch(u){o(u);return}return this.callServer(c,function(u,l){n._parseResponse(u,l,o);}),i};Zf.prototype._parseResponse=function(e,t,r){if(e){r(e);return}if(!t){r();return}let o;try{o=JSON.parse(t,this.options.reviver);}catch(n){r(n);return}if(r.length===3)if(Array.isArray(o)){let n=function(s){return typeof s.error<"u"},i=function(s){return !n(s)};r(null,o.filter(n),o.filter(i));return}else {r(null,o.error,o.result);return}r(null,o);};});var XI=Gr((UW,sx)=>{var bU=Object.prototype.hasOwnProperty,Fr="~";function Gf(){}Object.create&&(Gf.prototype=Object.create(null),new Gf().__proto__||(Fr=false));function xU(e,t,r){this.fn=e,this.context=t,this.once=r||false;}function YI(e,t,r,o,n){if(typeof r!="function")throw new TypeError("The listener must be a function");var i=new xU(r,o||e,n),s=Fr?Fr+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],i]:e._events[s].push(i):(e._events[s]=i,e._eventsCount++),e}function _m(e,t){--e._eventsCount===0?e._events=new Gf:delete e._events[t];}function Pr(){this._events=new Gf,this._eventsCount=0;}Pr.prototype.eventNames=function(){var t=[],r,o;if(this._eventsCount===0)return t;for(o in r=this._events)bU.call(r,o)&&t.push(Fr?o.slice(1):o);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(r)):t};Pr.prototype.listeners=function(t){var r=Fr?Fr+t:t,o=this._events[r];if(!o)return [];if(o.fn)return [o.fn];for(var n=0,i=o.length,s=new Array(i);n<i;n++)s[n]=o[n].fn;return s};Pr.prototype.listenerCount=function(t){var r=Fr?Fr+t:t,o=this._events[r];return o?o.fn?1:o.length:0};Pr.prototype.emit=function(t,r,o,n,i,s){var a=Fr?Fr+t:t;if(!this._events[a])return false;var c=this._events[a],u=arguments.length,l,d;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,true),u){case 1:return c.fn.call(c.context),true;case 2:return c.fn.call(c.context,r),true;case 3:return c.fn.call(c.context,r,o),true;case 4:return c.fn.call(c.context,r,o,n),true;case 5:return c.fn.call(c.context,r,o,n,i),true;case 6:return c.fn.call(c.context,r,o,n,i,s),true}for(d=1,l=new Array(u-1);d<u;d++)l[d-1]=arguments[d];c.fn.apply(c.context,l);}else {var g=c.length,h;for(d=0;d<g;d++)switch(c[d].once&&this.removeListener(t,c[d].fn,void 0,true),u){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,r);break;case 3:c[d].fn.call(c[d].context,r,o);break;case 4:c[d].fn.call(c[d].context,r,o,n);break;default:if(!l)for(h=1,l=new Array(u-1);h<u;h++)l[h-1]=arguments[h];c[d].fn.apply(c[d].context,l);}}return true};Pr.prototype.on=function(t,r,o){return YI(this,t,r,o,false)};Pr.prototype.once=function(t,r,o){return YI(this,t,r,o,true)};Pr.prototype.removeListener=function(t,r,o,n){var i=Fr?Fr+t:t;if(!this._events[i])return this;if(!r)return _m(this,i),this;var s=this._events[i];if(s.fn)s.fn===r&&(!n||s.once)&&(!o||s.context===o)&&_m(this,i);else {for(var a=0,c=[],u=s.length;a<u;a++)(s[a].fn!==r||n&&!s[a].once||o&&s[a].context!==o)&&c.push(s[a]);c.length?this._events[i]=c.length===1?c[0]:c:_m(this,i);}return this};Pr.prototype.removeAllListeners=function(t){var r;return t?(r=Fr?Fr+t:t,this._events[r]&&_m(this,r)):(this._events=new Gf,this._eventsCount=0),this};Pr.prototype.off=Pr.prototype.removeListener;Pr.prototype.addListener=Pr.prototype.on;Pr.prefixed=Fr;Pr.EventEmitter=Pr;typeof sx<"u"&&(sx.exports=Pr);});function RU(e,t=24){let r=new Uint32Array(10);for(let o=24-t;o<24;o++){for(let s=0;s<10;s++)r[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){let a=(s+8)%10,c=(s+2)%10,u=r[c],l=r[c+1],d=e5(u,l,1)^r[a],g=t5(u,l,1)^r[a+1];for(let h=0;h<50;h+=10)e[s+h]^=d,e[s+h+1]^=g;}let n=e[2],i=e[3];for(let s=0;s<24;s++){let a=n5[s],c=e5(n,i,a),u=t5(n,i,a),l=r5[s];n=e[l],i=e[l+1],e[l]=c,e[l+1]=u;}for(let s=0;s<50;s+=10){for(let a=0;a<10;a++)r[a]=e[s+a];for(let a=0;a<10;a++)e[s+a]^=~r[(a+2)%10]&r[(a+4)%10];}e[0]^=AU[o],e[1]^=kU[o];}Rn(r);}var _U,Wf,wU,EU,SU,IU,r5,n5,o5,i5,AU,kU,e5,t5,ax,TU,ha,wm=j(()=>{pb();Jo();_U=BigInt(0),Wf=BigInt(1),wU=BigInt(2),EU=BigInt(7),SU=BigInt(256),IU=BigInt(113),r5=[],n5=[],o5=[];for(let e=0,t=Wf,r=1,o=0;e<24;e++){[r,o]=[o,(2*r+3*o)%5],r5.push(2*(5*o+r)),n5.push((e+1)*(e+2)/2%64);let n=_U;for(let i=0;i<7;i++)t=(t<<Wf^(t>>EU)*IU)%SU,t&wU&&(n^=Wf<<(Wf<<BigInt(i))-Wf);o5.push(n);}i5=Np(o5,true),AU=i5[0],kU=i5[1],e5=(e,t,r)=>r>32?dS(e,t,r):fS(e,t,r),t5=(e,t,r)=>r>32?pS(e,t,r):lS(e,t,r);ax=class e extends Li{constructor(t,r,o,n=false,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=false,this.destroyed=false,this.enableXOF=false,this.blockLen=t,this.suffix=r,this.outputLen=o,this.enableXOF=n,this.rounds=i,Xs(o),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=oS(this.state);}clone(){return this._cloneInto()}keccak(){ub(this.state32),RU(this.state32,this.rounds),ub(this.state32),this.posOut=0,this.pos=0;}update(t){Ko(this),t=Qs(t),xo(t);let{blockLen:r,state:o}=this,n=t.length;for(let i=0;i<n;){let s=Math.min(r-this.pos,n-i);for(let a=0;a<s;a++)o[this.pos++]^=t[i++];this.pos===r&&this.keccak();}return this}finish(){if(this.finished)return;this.finished=true;let{state:t,suffix:r,pos:o,blockLen:n}=this;t[o]^=r,(r&128)!==0&&o===n-1&&this.keccak(),t[n-1]^=128,this.keccak();}writeInto(t){Ko(this,false),xo(t),this.finish();let r=this.state,{blockLen:o}=this;for(let n=0,i=t.length;n<i;){this.posOut>=o&&this.keccak();let s=Math.min(o-this.posOut,i-n);t.set(r.subarray(this.posOut,this.posOut+s),n),this.posOut+=s,n+=s;}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Xs(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(Tp(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=true,Rn(this.state);}_cloneInto(t){let{blockLen:r,suffix:o,outputLen:n,rounds:i,enableXOF:s}=this;return t||(t=new e(r,o,n,s,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=o,t.outputLen=n,t.enableXOF=s,t.destroyed=this.destroyed,t}},TU=(e,t,r)=>Af(()=>new ax(t,e,r)),ha=TU(1,136,256/8);});var Em,cx,s5=j(()=>{Jo();Em=class extends Li{constructor(t,r){super(),this.finished=false,this.destroyed=false,nS(t);let o=Qs(r);if(this.iHash=t.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;let n=this.blockLen,i=new Uint8Array(n);i.set(o.length>n?t.create().update(o).digest():o);for(let s=0;s<i.length;s++)i[s]^=54;this.iHash.update(i),this.oHash=t.create();for(let s=0;s<i.length;s++)i[s]^=106;this.oHash.update(i),Rn(i);}update(t){return Ko(this),this.iHash.update(t),this}digestInto(t){Ko(this),xo(t,this.outputLen),this.finished=true,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy();}digest(){let t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));let{oHash:r,iHash:o,finished:n,destroyed:i,blockLen:s,outputLen:a}=this;return t=t,t.finished=n,t.destroyed=i,t.blockLen=s,t.outputLen=a,t.oHash=r._cloneInto(t.oHash),t.iHash=o._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=true,this.oHash.destroy(),this.iHash.destroy();}},cx=(e,t,r)=>new Em(e,t).update(r).digest();cx.create=(e,t)=>new Em(e,t);});function a5(e){e.lowS!==void 0&&_o("lowS",e.lowS),e.prehash!==void 0&&_o("prehash",e.prehash);}function $U(e){let t=Nf(e);Jn(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});let{endo:r,Fp:o,a:n}=t;if(r){if(!o.eql(n,o.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}function ux(e,t){return ji(wo(e,t))}function OU(e){let t=$U(e),{Fp:r}=t,o=ti(t.n,t.nBitLength),n=t.toBytes||((O,I,N)=>{let C=I.toAffine();return ir(Uint8Array.from([4]),r.toBytes(C.x),r.toBytes(C.y))}),i=t.fromBytes||(O=>{let I=O.subarray(1),N=r.fromBytes(I.subarray(0,r.BYTES)),C=r.fromBytes(I.subarray(r.BYTES,2*r.BYTES));return {x:N,y:C}});function s(O){let{a:I,b:N}=t,C=r.sqr(O),z=r.mul(C,O);return r.add(r.add(z,r.mul(O,I)),N)}function a(O,I){let N=r.sqr(I),C=s(O);return r.eql(N,C)}if(!a(t.Gx,t.Gy))throw new Error("bad curve params: generator point");let c=r.mul(r.pow(t.a,Kf),lx),u=r.mul(r.sqr(t.b),BigInt(27));if(r.is0(r.add(c,u)))throw new Error("bad curve params: a or b");function l(O){return oa(O,qe,t.n)}function d(O){let{allowedPrivateKeyLengths:I,nByteLength:N,wrapPrivateKey:C,n:z}=t;if(I&&typeof O!="bigint"){if(uc(O)&&(O=ji(O)),typeof O!="string"||!I.includes(O.length))throw new Error("invalid private key");O=O.padStart(N*2,"0");}let F;try{F=typeof O=="bigint"?O:Jr(Ve("private key",O,N));}catch{throw new Error("invalid private key, expected hex or "+N+" bytes, got "+typeof O)}return C&&(F=ze(F,z)),Ur("private key",F,qe,z),F}function g(O){if(!(O instanceof E))throw new Error("ProjectivePoint expected")}let h=lc((O,I)=>{let{px:N,py:C,pz:z}=O;if(r.eql(z,r.ONE))return {x:N,y:C};let F=O.is0();I==null&&(I=F?r.ONE:r.inv(z));let W=r.mul(N,I),V=r.mul(C,I),G=r.mul(z,I);if(F)return {x:r.ZERO,y:r.ZERO};if(!r.eql(G,r.ONE))throw new Error("invZ was invalid");return {x:W,y:V}}),v=lc(O=>{if(O.is0()){if(t.allowInfinityPoint&&!r.is0(O.py))return;throw new Error("bad point: ZERO")}let{x:I,y:N}=O.toAffine();if(!r.isValid(I)||!r.isValid(N))throw new Error("bad point: x or y not FE");if(!a(I,N))throw new Error("bad point: equation left != right");if(!O.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return true});class E{constructor(I,N,C){if(I==null||!r.isValid(I))throw new Error("x required");if(N==null||!r.isValid(N)||r.is0(N))throw new Error("y required");if(C==null||!r.isValid(C))throw new Error("z required");this.px=I,this.py=N,this.pz=C,Object.freeze(this);}static fromAffine(I){let{x:N,y:C}=I||{};if(!I||!r.isValid(N)||!r.isValid(C))throw new Error("invalid affine point");if(I instanceof E)throw new Error("projective point not allowed");let z=F=>r.eql(F,r.ZERO);return z(N)&&z(C)?E.ZERO:new E(N,C,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(I){let N=ei(r,I.map(C=>C.pz));return I.map((C,z)=>C.toAffine(N[z])).map(E.fromAffine)}static fromHex(I){let N=E.fromAffine(i(Ve("pointHex",I)));return N.assertValidity(),N}static fromPrivateKey(I){return E.BASE.multiply(d(I))}static msm(I,N){return Mp(E,o,I,N)}_setWindowSize(I){P.setWindowSize(this,I);}assertValidity(){v(this);}hasEvenY(){let{y:I}=this.toAffine();if(r.isOdd)return !r.isOdd(I);throw new Error("Field doesn't support isOdd")}equals(I){g(I);let{px:N,py:C,pz:z}=this,{px:F,py:W,pz:V}=I,G=r.eql(r.mul(N,V),r.mul(F,z)),ne=r.eql(r.mul(C,V),r.mul(W,z));return G&&ne}negate(){return new E(this.px,r.neg(this.py),this.pz)}double(){let{a:I,b:N}=t,C=r.mul(N,Kf),{px:z,py:F,pz:W}=this,V=r.ZERO,G=r.ZERO,ne=r.ZERO,S=r.mul(z,z),f=r.mul(F,F),m=r.mul(W,W),y=r.mul(z,F);return y=r.add(y,y),ne=r.mul(z,W),ne=r.add(ne,ne),V=r.mul(I,ne),G=r.mul(C,m),G=r.add(V,G),V=r.sub(f,G),G=r.add(f,G),G=r.mul(V,G),V=r.mul(y,V),ne=r.mul(C,ne),m=r.mul(I,m),y=r.sub(S,m),y=r.mul(I,y),y=r.add(y,ne),ne=r.add(S,S),S=r.add(ne,S),S=r.add(S,m),S=r.mul(S,y),G=r.add(G,S),m=r.mul(F,W),m=r.add(m,m),S=r.mul(m,y),V=r.sub(V,S),ne=r.mul(m,f),ne=r.add(ne,ne),ne=r.add(ne,ne),new E(V,G,ne)}add(I){g(I);let{px:N,py:C,pz:z}=this,{px:F,py:W,pz:V}=I,G=r.ZERO,ne=r.ZERO,S=r.ZERO,f=t.a,m=r.mul(t.b,Kf),y=r.mul(N,F),x=r.mul(C,W),b=r.mul(z,V),w=r.add(N,C),k=r.add(F,W);w=r.mul(w,k),k=r.add(y,x),w=r.sub(w,k),k=r.add(N,z);let _=r.add(F,V);return k=r.mul(k,_),_=r.add(y,b),k=r.sub(k,_),_=r.add(C,z),G=r.add(W,V),_=r.mul(_,G),G=r.add(x,b),_=r.sub(_,G),S=r.mul(f,k),G=r.mul(m,b),S=r.add(G,S),G=r.sub(x,S),S=r.add(x,S),ne=r.mul(G,S),x=r.add(y,y),x=r.add(x,y),b=r.mul(f,b),k=r.mul(m,k),x=r.add(x,b),b=r.sub(y,b),b=r.mul(f,b),k=r.add(k,b),y=r.mul(x,k),ne=r.add(ne,y),y=r.mul(_,k),G=r.mul(w,G),G=r.sub(G,y),y=r.mul(w,x),S=r.mul(_,S),S=r.add(S,y),new E(G,ne,S)}subtract(I){return this.add(I.negate())}is0(){return this.equals(E.ZERO)}wNAF(I){return P.wNAFCached(this,I,E.normalizeZ)}multiplyUnsafe(I){let{endo:N,n:C}=t;Ur("scalar",I,Qn,C);let z=E.ZERO;if(I===Qn)return z;if(this.is0()||I===qe)return this;if(!N||P.hasPrecomputes(this))return P.wNAFCachedUnsafe(this,I,E.normalizeZ);let{k1neg:F,k1:W,k2neg:V,k2:G}=N.splitScalar(I),ne=z,S=z,f=this;for(;W>Qn||G>Qn;)W&qe&&(ne=ne.add(f)),G&qe&&(S=S.add(f)),f=f.double(),W>>=qe,G>>=qe;return F&&(ne=ne.negate()),V&&(S=S.negate()),S=new E(r.mul(S.px,N.beta),S.py,S.pz),ne.add(S)}multiply(I){let{endo:N,n:C}=t;Ur("scalar",I,qe,C);let z,F;if(N){let{k1neg:W,k1:V,k2neg:G,k2:ne}=N.splitScalar(I),{p:S,f}=this.wNAF(V),{p:m,f:y}=this.wNAF(ne);S=P.constTimeNegate(W,S),m=P.constTimeNegate(G,m),m=new E(r.mul(m.px,N.beta),m.py,m.pz),z=S.add(m),F=f.add(y);}else {let{p:W,f:V}=this.wNAF(I);z=W,F=V;}return E.normalizeZ([z,F])[0]}multiplyAndAddUnsafe(I,N,C){let z=E.BASE,F=(V,G)=>G===Qn||G===qe||!V.equals(z)?V.multiplyUnsafe(G):V.multiply(G),W=F(this,N).add(F(I,C));return W.is0()?void 0:W}toAffine(I){return h(this,I)}isTorsionFree(){let{h:I,isTorsionFree:N}=t;if(I===qe)return true;if(N)return N(E,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:I,clearCofactor:N}=t;return I===qe?this:N?N(E,this):this.multiplyUnsafe(t.h)}toRawBytes(I=true){return _o("isCompressed",I),this.assertValidity(),n(E,this,I)}toHex(I=true){return _o("isCompressed",I),ji(this.toRawBytes(I))}}E.BASE=new E(t.Gx,t.Gy,r.ONE),E.ZERO=new E(r.ZERO,r.ONE,r.ZERO);let{endo:R,nBitLength:$}=t,P=Up(E,R?Math.ceil($/2):$);return {CURVE:t,ProjectivePoint:E,normPrivateKeyToScalar:d,weierstrassEquation:s,isWithinCurveOrder:l}}function NU(e){let t=Nf(e);return Jn(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:true,...t})}function c5(e){let t=NU(e),{Fp:r,n:o,nByteLength:n,nBitLength:i}=t,s=r.BYTES+1,a=2*r.BYTES+1;function c(m){return ze(m,o)}function u(m){return zp(m,o)}let{ProjectivePoint:l,normPrivateKeyToScalar:d,weierstrassEquation:g,isWithinCurveOrder:h}=OU({...t,toBytes(m,y,x){let b=y.toAffine(),w=r.toBytes(b.x),k=ir;return _o("isCompressed",x),x?k(Uint8Array.from([y.hasEvenY()?2:3]),w):k(Uint8Array.from([4]),w,r.toBytes(b.y))},fromBytes(m){let y=m.length,x=m[0],b=m.subarray(1);if(y===s&&(x===2||x===3)){let w=Jr(b);if(!oa(w,qe,r.ORDER))throw new Error("Point is not on curve");let k=g(w),_;try{_=r.sqrt(k);}catch(Z){let K=Z instanceof Error?": "+Z.message:"";throw new Error("Point is not on curve"+K)}let p=(_&qe)===qe;return (x&1)===1!==p&&(_=r.neg(_)),{x:w,y:_}}else if(y===a&&x===4){let w=r.fromBytes(b.subarray(0,r.BYTES)),k=r.fromBytes(b.subarray(r.BYTES,2*r.BYTES));return {x:w,y:k}}else {let w=s,k=a;throw new Error("invalid Point, expected length of "+w+", or uncompressed "+k+", got "+y)}}});function v(m){let y=o>>qe;return m>y}function E(m){return v(m)?c(-m):m}let R=(m,y,x)=>Jr(m.slice(y,x));class ${constructor(y,x,b){Ur("r",y,qe,o),Ur("s",x,qe,o),this.r=y,this.s=x,b!=null&&(this.recovery=b),Object.freeze(this);}static fromCompact(y){let x=n;return y=Ve("compactSignature",y,x*2),new $(R(y,0,x),R(y,x,2*x))}static fromDER(y){let{r:x,s:b}=oi.toSig(Ve("DER",y));return new $(x,b)}assertValidity(){}addRecoveryBit(y){return new $(this.r,this.s,y)}recoverPublicKey(y){let{r:x,s:b,recovery:w}=this,k=z(Ve("msgHash",y));if(w==null||![0,1,2,3].includes(w))throw new Error("recovery id invalid");let _=w===2||w===3?x+t.n:x;if(_>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");let p=(w&1)===0?"02":"03",A=l.fromHex(p+ux(_,r.BYTES)),Z=u(_),K=c(-k*Z),te=c(b*Z),ae=l.BASE.multiplyAndAddUnsafe(A,K,te);if(!ae)throw new Error("point at infinify");return ae.assertValidity(),ae}hasHighS(){return v(this.s)}normalizeS(){return this.hasHighS()?new $(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return Of(this.toDERHex())}toDERHex(){return oi.hexFromSig(this)}toCompactRawBytes(){return Of(this.toCompactHex())}toCompactHex(){let y=n;return ux(this.r,y)+ux(this.s,y)}}let P={isValidPrivateKey(m){try{return d(m),!0}catch{return false}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{let m=vb(t.n);return CS(t.randomBytes(m),t.n)},precompute(m=8,y=l.BASE){return y._setWindowSize(m),y.multiply(BigInt(3)),y}};function O(m,y=true){return l.fromPrivateKey(m).toRawBytes(y)}function I(m){if(typeof m=="bigint")return false;if(m instanceof l)return true;let x=Ve("key",m).length,b=r.BYTES,w=b+1,k=2*b+1;if(!(t.allowedPrivateKeyLengths||n===w))return x===w||x===k}function N(m,y,x=true){if(I(m)===true)throw new Error("first arg must be private key");if(I(y)===false)throw new Error("second arg must be public key");return l.fromHex(y).multiply(d(m)).toRawBytes(x)}let C=t.bits2int||function(m){if(m.length>8192)throw new Error("input is too large");let y=Jr(m),x=m.length*8-i;return x>0?y>>BigInt(x):y},z=t.bits2int_modN||function(m){return c(C(m))},F=ia(i);function W(m){return Ur("num < 2^"+i,m,Qn,F),wo(m,n)}function V(m,y,x=G){if(["recovered","canonical"].some(ye=>ye in x))throw new Error("sign() legacy options not supported");let{hash:b,randomBytes:w}=t,{lowS:k,prehash:_,extraEntropy:p}=x;k==null&&(k=true),m=Ve("msgHash",m),a5(x),_&&(m=Ve("prehashed msgHash",b(m)));let A=z(m),Z=d(y),K=[W(Z),W(A)];if(p!=null&&p!==false){let ye=p===true?w(r.BYTES):p;K.push(Ve("extraEntropy",ye));}let te=ir(...K),ae=A;function me(ye){let Ye=C(ye);if(!h(Ye))return;let Se=u(Ye),_e=l.BASE.multiply(Ye).toAffine(),Qt=c(_e.x);if(Qt===Qn)return;let Be=c(Se*c(ae+Qt*Z));if(Be===Qn)return;let Ue=(_e.x===Qt?0:2)|Number(_e.y&qe),Oi=Be;return k&&v(Be)&&(Oi=E(Be),Ue^=1),new $(Qt,Oi,Ue)}return {seed:te,k2sig:me}}let G={lowS:t.lowS,prehash:false},ne={lowS:t.lowS,prehash:false};function S(m,y,x=G){let{seed:b,k2sig:w}=V(m,y,x),k=t;return kS(k.hash.outputLen,k.nByteLength,k.hmac)(b,w)}l.BASE._setWindowSize(8);function f(m,y,x,b=ne){let w=m;y=Ve("msgHash",y),x=Ve("publicKey",x);let{lowS:k,prehash:_,format:p}=b;if(a5(b),"strict"in b)throw new Error("options.strict was renamed to lowS");if(p!==void 0&&p!=="compact"&&p!=="der")throw new Error("format must be compact or der");let A=typeof w=="string"||uc(w),Z=!A&&!p&&typeof w=="object"&&w!==null&&typeof w.r=="bigint"&&typeof w.s=="bigint";if(!A&&!Z)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let K,te;try{if(Z&&(K=new $(w.r,w.s)),A){try{p!=="compact"&&(K=$.fromDER(w));}catch(Ue){if(!(Ue instanceof oi.Err))throw Ue}!K&&p!=="der"&&(K=$.fromCompact(w));}te=l.fromHex(x);}catch{return false}if(!K||k&&K.hasHighS())return false;_&&(y=t.hash(y));let{r:ae,s:me}=K,ye=z(y),Ye=u(me),Se=c(ye*Ye),_e=c(ae*Ye),Qt=l.BASE.multiplyAndAddUnsafe(te,Se,_e)?.toAffine();return Qt?c(Qt.x)===ae:false}return {CURVE:t,getPublicKey:O,getSharedSecret:N,sign:S,verify:f,ProjectivePoint:l,Signature:$,utils:P}}function PU(e,t){let r=e.ORDER,o=Qn;for(let v=r-qe;v%Ki===Qn;v/=Ki)o+=qe;let n=o,i=Ki<<n-qe-qe,s=i*Ki,a=(r-qe)/s,c=(a-qe)/Ki,u=s-qe,l=i,d=e.pow(t,a),g=e.pow(t,(a+qe)/Ki),h=(v,E)=>{let R=d,$=e.pow(E,u),P=e.sqr($);P=e.mul(P,E);let O=e.mul(v,P);O=e.pow(O,c),O=e.mul(O,$),$=e.mul(O,E),P=e.mul(O,v);let I=e.mul(P,$);O=e.pow(I,l);let N=e.eql(O,e.ONE);$=e.mul(P,g),O=e.mul(I,R),P=e.cmov($,P,N),I=e.cmov(O,I,N);for(let C=n;C>qe;C--){let z=C-Ki;z=Ki<<z-qe;let F=e.pow(I,z),W=e.eql(F,e.ONE);$=e.mul(P,R),R=e.mul(R,R),F=e.mul(I,R),P=e.cmov($,P,W),I=e.cmov(F,I,W);}return {isValid:N,value:P}};if(e.ORDER%lx===Kf){let v=(e.ORDER-Kf)/lx,E=e.sqrt(e.neg(t));h=(R,$)=>{let P=e.sqr($),O=e.mul(R,$);P=e.mul(P,O);let I=e.pow(P,v);I=e.mul(I,O);let N=e.mul(I,E),C=e.mul(e.sqr(I),$),z=e.eql(C,R),F=e.cmov(N,I,z);return {isValid:z,value:F}};}return h}function u5(e,t){if(Lp(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");let r=PU(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return o=>{let n,i,s,a,c,u,l,d;n=e.sqr(o),n=e.mul(n,t.Z),i=e.sqr(n),i=e.add(i,n),s=e.add(i,e.ONE),s=e.mul(s,t.B),a=e.cmov(t.Z,e.neg(i),!e.eql(i,e.ZERO)),a=e.mul(a,t.A),i=e.sqr(s),u=e.sqr(a),c=e.mul(u,t.A),i=e.add(i,c),i=e.mul(i,s),u=e.mul(u,a),c=e.mul(u,t.B),i=e.add(i,c),l=e.mul(n,s);let{isValid:g,value:h}=r(i,u);d=e.mul(n,o),d=e.mul(d,h),l=e.cmov(l,s,g),d=e.cmov(d,h,g);let v=e.isOdd(o)===e.isOdd(d);d=e.cmov(e.neg(d),d,v);let E=ei(e,[a],true)[0];return l=e.mul(l,E),{x:l,y:d}}}var fx,oi,Qn,qe,Ki,Kf,lx,dx=j(()=>{Ab();ca();sa();fx=class extends Error{constructor(t=""){super(t);}},oi={Err:fx,_tlv:{encode:(e,t)=>{let{Err:r}=oi;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length&1)throw new r("tlv.encode: unpadded data");let o=t.length/2,n=$f(o);if(n.length/2&128)throw new r("tlv.encode: long form length too big");let i=o>127?$f(n.length/2|128):"";return $f(e)+i+n+t},decode(e,t){let{Err:r}=oi,o=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[o++]!==e)throw new r("tlv.decode: wrong tlv");let n=t[o++],i=!!(n&128),s=0;if(!i)s=n;else {let c=n&127;if(!c)throw new r("tlv.decode(long): indefinite length not supported");if(c>4)throw new r("tlv.decode(long): byte length is too big");let u=t.subarray(o,o+c);if(u.length!==c)throw new r("tlv.decode: length bytes not complete");if(u[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(let l of u)s=s<<8|l;if(o+=c,s<128)throw new r("tlv.decode(long): not minimal encoding")}let a=t.subarray(o,o+s);if(a.length!==s)throw new r("tlv.decode: wrong value length");return {v:a,l:t.subarray(o+s)}}},_int:{encode(e){let{Err:t}=oi;if(e<Qn)throw new t("integer: negative integers are not allowed");let r=$f(e);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){let{Err:t}=oi;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return Jr(e)}},toSig(e){let{Err:t,_int:r,_tlv:o}=oi,n=Ve("signature",e),{v:i,l:s}=o.decode(48,n);if(s.length)throw new t("invalid signature: left bytes after parsing");let{v:a,l:c}=o.decode(2,i),{v:u,l}=o.decode(2,c);if(l.length)throw new t("invalid signature: left bytes after parsing");return {r:r.decode(a),s:r.decode(u)}},hexFromSig(e){let{_tlv:t,_int:r}=oi,o=t.encode(2,r.encode(e.r)),n=t.encode(2,r.encode(e.s)),i=o+n;return t.encode(48,i)}};Qn=BigInt(0),qe=BigInt(1),Ki=BigInt(2),Kf=BigInt(3),lx=BigInt(4);});function BU(e){return {hash:e,hmac:(t,...r)=>cx(e,t,fb(...r)),randomBytes:cc}}function f5(e,t){let r=o=>c5({...e,...BU(o)});return {...r(t),create:r}}var l5=j(()=>{s5();Jo();dx();});var b5={};Ir(b5,{encodeToCurve:()=>FU,hashToCurve:()=>jU,schnorr:()=>UU,secp256k1:()=>pn,secp256k1_hasher:()=>xx});function m5(e){let t=Xf,r=BigInt(3),o=BigInt(6),n=BigInt(11),i=BigInt(22),s=BigInt(23),a=BigInt(44),c=BigInt(88),u=e*e*e%t,l=u*u*e%t,d=it(l,r,t)*l%t,g=it(d,r,t)*l%t,h=it(g,Im,t)*u%t,v=it(h,n,t)*h%t,E=it(v,i,t)*v%t,R=it(E,a,t)*E%t,$=it(R,c,t)*R%t,P=it($,a,t)*E%t,O=it(P,r,t)*l%t,I=it(O,s,t)*v%t,N=it(I,o,t)*u%t,C=it(N,Im,t);if(!Ji.eql(Ji.sqr(C),e))throw new Error("Cannot find square root");return C}function Am(e,...t){let r=p5[e];if(r===void 0){let o=ra(Uint8Array.from(e,n=>n.charCodeAt(0)));r=ir(o,o),p5[e]=r;}return ra(ir(r,...t))}function hx(e){let t=pn.utils.normPrivateKeyToScalar(e),r=bx.fromPrivateKey(t);return {scalar:r.hasEvenY()?t:Yf(-t),bytes:yx(r)}}function h5(e){Ur("x",e,Jf,Xf);let t=px(e*e),r=px(t*e+BigInt(7)),o=m5(r);o%Im!==gx&&(o=px(-o));let n=new bx(e,o,Jf);return n.assertValidity(),n}function g5(...e){return Yf(xc(Am("BIP0340/challenge",...e)))}function zU(e){return hx(e).bytes}function LU(e,t,r=cc(32)){let o=Ve("message",e),{bytes:n,scalar:i}=hx(t),s=Ve("auxRand",r,32),a=mx(i^xc(Am("BIP0340/aux",s))),c=Am("BIP0340/nonce",a,n,o),u=Yf(xc(c));if(u===gx)throw new Error("sign failed: k is zero");let{bytes:l,scalar:d}=hx(u),g=g5(l,n,o),h=new Uint8Array(64);if(h.set(l,0),h.set(mx(Yf(d+g*i)),32),!y5(h,o,n))throw new Error("sign: Invalid signature produced");return h}function y5(e,t,r){let o=Ve("signature",e,64),n=Ve("message",t),i=Ve("publicKey",r,32);try{let s=h5(xc(i)),a=xc(o.subarray(0,32));if(!oa(a,Jf,Xf))return !1;let c=xc(o.subarray(32,64));if(!oa(c,Jf,Sm))return !1;let u=g5(mx(a),yx(s),n),l=CU(s,c,Yf(-u));return !(!l||!l.hasEvenY()||l.toAffine().x!==a)}catch{return false}}var Xf,Sm,gx,Jf,Im,d5,Ji,pn,p5,yx,mx,px,Yf,bx,CU,xc,UU,MU,DU,xx,jU,FU,Qf=j(()=>{Bp();Jo();l5();ZS();ca();sa();dx();Xf=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Sm=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),gx=BigInt(0),Jf=BigInt(1),Im=BigInt(2),d5=(e,t)=>(e+t/Im)/t;Ji=ti(Xf,void 0,void 0,{sqrt:m5}),pn=f5({a:gx,b:BigInt(7),Fp:Ji,n:Sm,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:true,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=Sm,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),o=-Jf*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=r,s=BigInt("0x100000000000000000000000000000000"),a=d5(i*e,t),c=d5(-o*e,t),u=ze(e-a*r-c*n,t),l=ze(-a*o-c*i,t),d=u>s,g=l>s;if(d&&(u=t-u),g&&(l=t-l),u>s||l>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return {k1neg:d,k1:u,k2neg:g,k2:l}}}},ra),p5={};yx=e=>e.toRawBytes(true).slice(1),mx=e=>wo(e,32),px=e=>ze(e,Xf),Yf=e=>ze(e,Sm),bx=pn.ProjectivePoint,CU=(e,t,r)=>bx.BASE.multiplyAndAddUnsafe(e,t,r);xc=Jr;UU={getPublicKey:zU,sign:LU,verify:y5,utils:{randomPrivateKey:pn.utils.randomPrivateKey,lift_x:h5,pointToBytes:yx,numberToBytesBE:wo,bytesToNumberBE:Jr,taggedHash:Am,mod:ze}},MU=HS(Ji,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(t=>BigInt(t)))),DU=u5(Ji,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:Ji.create(BigInt("-11"))}),xx=VS(pn.ProjectivePoint,e=>{let{x:t,y:r}=DU(Ji.create(e[0]));return MU(t,r)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:Ji.ORDER,m:1,k:128,expand:"xmd",hash:ra}),jU=xx.hashToCurve,FU=xx.encodeToCurve;});var TA,$A=j(()=>{TA="1.2.3";});var bt,Rc=j(()=>{$A();bt=class e extends Error{constructor(t,r={}){let o=r.cause instanceof e?r.cause.details:r.cause?.message?r.cause.message:r.details,n=r.cause instanceof e&&r.cause.docsPath||r.docsPath,i=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...n?[`Docs: https://abitype.dev${n}`]:[],...o?[`Details: ${o}`]:[],`Version: abitype@${TA}`].join(`
|
|
3
|
-
`);super(i),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiTypeError"}),r.cause&&(this.cause=r.cause),this.details=o,this.docsPath=n,this.metaMessages=r.metaMessages,this.shortMessage=t;}};});function yn(e,t){return e.exec(t)?.groups}var l1,d1,Km,_l=j(()=>{l1=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,d1=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,Km=/^\(.+?\).*?$/;});function Jm(e){let t=e.type;if(OA.test(e.type)&&"components"in e){t="(";let r=e.components.length;for(let n=0;n<r;n++){let i=e.components[n];t+=Jm(i),n<r-1&&(t+=", ");}let o=yn(OA,e.type);return t+=`)${o?.array||""}`,Jm({...e,type:t})}return "indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}var OA,NA=j(()=>{_l();OA=/^tuple(?<array>(\[(\d*)\])*)$/;});function ai(e){let t="",r=e.length;for(let o=0;o<r;o++){let n=e[o];t+=Jm(n),o!==r-1&&(t+=", ");}return t}var p1=j(()=>{NA();});function _a(e){return e.type==="function"?`function ${e.name}(${ai(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${ai(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${ai(e.inputs)})`:e.type==="error"?`error ${e.name}(${ai(e.inputs)})`:e.type==="constructor"?`constructor(${ai(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}var PA=j(()=>{p1();});function CA(e){return BA.test(e)}function zA(e){return yn(BA,e)}function UA(e){return LA.test(e)}function MA(e){return yn(LA,e)}function jA(e){return DA.test(e)}function FA(e){return yn(DA,e)}function es(e){return HA.test(e)}function VA(e){return yn(HA,e)}function GA(e){return ZA.test(e)}function qA(e){return yn(ZA,e)}function KA(e){return WA.test(e)}function JA(e){return yn(WA,e)}function YA(e){return hM.test(e)}var BA,LA,DA,HA,ZA,WA,hM,m1,XA,Ym,Tc=j(()=>{_l();BA=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;LA=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;DA=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;HA=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;ZA=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;WA=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;hM=/^receive\(\) external payable$/;m1=new Set(["memory","indexed","storage","calldata"]),XA=new Set(["indexed"]),Ym=new Set(["calldata","memory","storage"]);});var wl,El,Xm,Qm=j(()=>{Rc();wl=class extends bt{constructor({signature:t}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidAbiItemError"});}},El=class extends bt{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"UnknownTypeError"});}},Xm=class extends bt{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"UnknownSolidityTypeError"});}};});var Sl,Il,Al,kl,Rl,Tl,eh=j(()=>{Rc();Sl=class extends bt{constructor({params:t}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidAbiParametersError"});}},Il=class extends bt{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidParameterError"});}},Al=class extends bt{constructor({param:t,name:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${r}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"SolidityProtectedKeywordError"});}},kl=class extends bt{constructor({param:t,type:r,modifier:o}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${o}" not allowed${r?` in "${r}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidModifierError"});}},Rl=class extends bt{constructor({param:t,type:r,modifier:o}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${o}" not allowed${r?` in "${r}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${o}" was given.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidFunctionModifierError"});}},Tl=class extends bt{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidAbiTypeParameterError"});}};});var ro,$l,Ol,h1=j(()=>{Rc();ro=class extends bt{constructor({signature:t,type:r}){super(`Invalid ${r} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidSignatureError"});}},$l=class extends bt{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"UnknownSignatureError"});}},Ol=class extends bt{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidStructSignatureError"});}};});var Nl,QA=j(()=>{Rc();Nl=class extends bt{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"CircularReferenceError"});}};});var Pl,ek=j(()=>{Rc();Pl=class extends bt{constructor({current:t,depth:r}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${r>0?"opening":"closing"} parentheses.`],details:`Depth "${r}"`}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidParenthesisError"});}};});function tk(e,t,r){let o="";if(r)for(let n of Object.entries(r)){if(!n)continue;let i="";for(let s of n[1])i+=`[${s.type}${s.name?`:${s.name}`:""}]`;o+=`(${n[0]}{${i}})`;}return t?`${t}:${e}${o}`:`${e}${o}`}var th,rk=j(()=>{th=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:true}],["event:address indexed to",{type:"address",name:"to",indexed:true}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:true}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:true}]]);});function Bl(e,t={}){if(jA(e))return gM(e,t);if(UA(e))return yM(e,t);if(CA(e))return bM(e,t);if(GA(e))return xM(e,t);if(KA(e))return vM(e);if(YA(e))return {type:"receive",stateMutability:"payable"};throw new $l({signature:e})}function gM(e,t={}){let r=FA(e);if(!r)throw new ro({signature:e,type:"function"});let o=Xr(r.parameters),n=[],i=o.length;for(let a=0;a<i;a++)n.push(no(o[a],{modifiers:Ym,structs:t,type:"function"}));let s=[];if(r.returns){let a=Xr(r.returns),c=a.length;for(let u=0;u<c;u++)s.push(no(a[u],{modifiers:Ym,structs:t,type:"function"}));}return {name:r.name,type:"function",stateMutability:r.stateMutability??"nonpayable",inputs:n,outputs:s}}function yM(e,t={}){let r=MA(e);if(!r)throw new ro({signature:e,type:"event"});let o=Xr(r.parameters),n=[],i=o.length;for(let s=0;s<i;s++)n.push(no(o[s],{modifiers:XA,structs:t,type:"event"}));return {name:r.name,type:"event",inputs:n}}function bM(e,t={}){let r=zA(e);if(!r)throw new ro({signature:e,type:"error"});let o=Xr(r.parameters),n=[],i=o.length;for(let s=0;s<i;s++)n.push(no(o[s],{structs:t,type:"error"}));return {name:r.name,type:"error",inputs:n}}function xM(e,t={}){let r=qA(e);if(!r)throw new ro({signature:e,type:"constructor"});let o=Xr(r.parameters),n=[],i=o.length;for(let s=0;s<i;s++)n.push(no(o[s],{structs:t,type:"constructor"}));return {type:"constructor",stateMutability:r.stateMutability??"nonpayable",inputs:n}}function vM(e){let t=JA(e);if(!t)throw new ro({signature:e,type:"fallback"});return {type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}function no(e,t){let r=tk(e,t?.type,t?.structs);if(th.has(r))return th.get(r);let o=Km.test(e),n=yn(o?wM:_M,e);if(!n)throw new Il({param:e});if(n.name&&IM(n.name))throw new Al({param:e,name:n.name});let i=n.name?{name:n.name}:{},s=n.modifier==="indexed"?{indexed:true}:{},a=t?.structs??{},c,u={};if(o){c="tuple";let d=Xr(n.type),g=[],h=d.length;for(let v=0;v<h;v++)g.push(no(d[v],{structs:a}));u={components:g};}else if(n.type in a)c="tuple",u={components:a[n.type]};else if(EM.test(n.type))c=`${n.type}256`;else if(n.type==="address payable")c="address";else if(c=n.type,t?.type!=="struct"&&!g1(c))throw new Xm({type:c});if(n.modifier){if(!t?.modifiers?.has?.(n.modifier))throw new kl({param:e,type:t?.type,modifier:n.modifier});if(Ym.has(n.modifier)&&!AM(c,!!n.array))throw new Rl({param:e,type:t?.type,modifier:n.modifier})}let l={type:`${c}${n.array??""}`,...i,...s,...u};return th.set(r,l),l}function Xr(e,t=[],r="",o=0){let n=e.trim().length;for(let i=0;i<n;i++){let s=e[i],a=e.slice(i+1);switch(s){case ",":return o===0?Xr(a,[...t,r.trim()]):Xr(a,t,`${r}${s}`,o);case "(":return Xr(a,t,`${r}${s}`,o+1);case ")":return Xr(a,t,`${r}${s}`,o-1);default:return Xr(a,t,`${r}${s}`,o)}}if(r==="")return t;if(o!==0)throw new Pl({current:r,depth:o});return t.push(r.trim()),t}function g1(e){return e==="address"||e==="bool"||e==="function"||e==="string"||l1.test(e)||d1.test(e)}function IM(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||l1.test(e)||d1.test(e)||SM.test(e)}function AM(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}var _M,wM,EM,SM,$c=j(()=>{_l();Qm();eh();h1();ek();rk();Tc();_M=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,wM=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,EM=/^u?int$/;SM=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;});function Oc(e){let t={},r=e.length;for(let s=0;s<r;s++){let a=e[s];if(!es(a))continue;let c=VA(a);if(!c)throw new ro({signature:a,type:"struct"});let u=c.properties.split(";"),l=[],d=u.length;for(let g=0;g<d;g++){let v=u[g].trim();if(!v)continue;let E=no(v,{type:"struct"});l.push(E);}if(!l.length)throw new Ol({signature:a});t[c.name]=l;}let o={},n=Object.entries(t),i=n.length;for(let s=0;s<i;s++){let[a,c]=n[s];o[a]=nk(c,t);}return o}function nk(e=[],t={},r=new Set){let o=[],n=e.length;for(let i=0;i<n;i++){let s=e[i];if(Km.test(s.type))o.push(s);else {let c=yn(kM,s.type);if(!c?.type)throw new Tl({abiParameter:s});let{array:u,type:l}=c;if(l in t){if(r.has(l))throw new Nl({type:l});o.push({...s,type:`tuple${u??""}`,components:nk(t[l],t,new Set([...r,l]))});}else if(g1(l))o.push(s);else throw new El({type:l})}}return o}var kM,rh=j(()=>{_l();Qm();eh();h1();QA();Tc();$c();kM=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;});function ts(e){let t=Oc(e),r=[],o=e.length;for(let n=0;n<o;n++){let i=e[n];es(i)||r.push(Bl(i,t));}return r}var ok=j(()=>{Tc();rh();$c();});function Cl(e){let t;if(typeof e=="string")t=Bl(e);else {let r=Oc(e),o=e.length;for(let n=0;n<o;n++){let i=e[n];if(!es(i)){t=Bl(i,r);break}}}if(!t)throw new wl({signature:e});return t}var ik=j(()=>{Qm();Tc();rh();$c();});function zl(e){let t=[];if(typeof e=="string"){let r=Xr(e),o=r.length;for(let n=0;n<o;n++)t.push(no(r[n],{modifiers:m1}));}else {let r=Oc(e),o=e.length;for(let n=0;n<o;n++){let i=e[n];if(es(i))continue;let s=Xr(i),a=s.length;for(let c=0;c<a;c++)t.push(no(s[c],{modifiers:m1,structs:r}));}}if(t.length===0)throw new Sl({params:e});return t}var sk=j(()=>{eh();Tc();rh();$c();$c();});var Nc=j(()=>{PA();p1();ok();ik();sk();});function er(e,{includeName:t=false}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new nh(e.type);return `${e.name}(${Ll(e.inputs,{includeName:t})})`}function Ll(e,{includeName:t=false}={}){return e?e.map(r=>RM(r,{includeName:t})).join(t?", ":","):""}function RM(e,{includeName:t}){return e.type.startsWith("tuple")?`(${Ll(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}var ci=j(()=>{xt();});function vt(e,{strict:t=true}={}){return !e||typeof e!="string"?false:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}var oo=j(()=>{});function Te(e){return vt(e,{strict:false})?Math.ceil((e.length-2)/2):e.length}var Qr=j(()=>{oo();});var y1,ck=j(()=>{y1="2.50.4";});function uk(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?uk(e.cause,t):t?null:e}var b1,M,Oe=j(()=>{ck();b1={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${y1}`},M=class e extends Error{constructor(t,r={}){let o=r.cause instanceof e?r.cause.details:r.cause?.message?r.cause.message:r.details,n=r.cause instanceof e&&r.cause.docsPath||r.docsPath,i=b1.getDocsUrl?.({...r,docsPath:n}),s=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...i?[`Docs: ${i}`]:[],...o?[`Details: ${o}`]:[],...b1.version?[`Version: ${b1.version}`]:[]].join(`
|
|
4
|
-
`);super(s,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"version",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"BaseError"}),this.details=o,this.docsPath=n,this.metaMessages=r.metaMessages,this.name=r.name??this.name,this.shortMessage=t,this.version=
|
|
5
|
-
`),{docsPath:t,name:"AbiConstructorNotFoundError"});}},
|
|
6
|
-
`),{docsPath:t,name:"AbiConstructorParamsNotFoundError"});}},
|
|
7
|
-
`),{metaMessages:[`Params: (${
|
|
8
|
-
`),{name:"AbiEncodingArrayLengthMismatchError"});}},
|
|
9
|
-
`),{name:"AbiEncodingLengthMismatchError"});}},
|
|
10
|
-
`),{docsPath:r,name:"AbiErrorInputsNotFoundError"});}},
|
|
11
|
-
`),{docsPath:r,name:"AbiErrorNotFoundError"});}},
|
|
12
|
-
`),{docsPath:r,name:"AbiErrorSignatureNotFoundError",cause:o}),Object.defineProperty(this,"signature",{enumerable:true,configurable:true,writable:true,value:void 0}),this.signature=t;}},
|
|
13
|
-
`),{docsPath:r,name:"AbiEventSignatureNotFoundError"});}},
|
|
14
|
-
`),{docsPath:r,name:"AbiEventNotFoundError"});}},
|
|
15
|
-
`),{docsPath:r,name:"AbiFunctionNotFoundError"});}},
|
|
16
|
-
`),{docsPath:r,name:"AbiFunctionOutputsNotFoundError"});}},
|
|
17
|
-
`),{docsPath:r,name:"AbiFunctionSignatureNotFoundError"});}},
|
|
18
|
-
`),{metaMessages:[`Params: (${
|
|
19
|
-
`),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:true,configurable:true,writable:true,value:void 0}),this.abiItem=t;}},
|
|
20
|
-
`),{docsPath:r,name:"InvalidAbiEncodingType"});}},
|
|
21
|
-
`),{docsPath:r,name:"InvalidAbiDecodingType"});}},
|
|
22
|
-
`),{name:"InvalidArrayError"});}},
|
|
23
|
-
`),{name:"InvalidDefinitionTypeError"});}};});var jl,Fl,Hl,yh=j(()=>{Oe();jl=class extends M{constructor({offset:t,position:r,size:o}){super(`Slice ${r==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${o}).`,{name:"SliceOffsetOutOfBoundsError"});}},Fl=class extends M{constructor({size:t,targetSize:r,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (${t}) exceeds padding size (${r}).`,{name:"SizeExceedsPaddingSizeError"});}},Hl=class extends M{constructor({size:t,targetSize:r,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} is expected to be ${r} ${o} long, but is ${t} ${o} long.`,{name:"InvalidBytesLengthError"});}};});function ns(e,{dir:t,size:r=32}={}){return typeof e=="string"?fi(e,{dir:t,size:r}):TM(e,{dir:t,size:r})}function fi(e,{dir:t,size:r=32}={}){if(r===null)return e;let o=e.replace("0x","");if(o.length>r*2)throw new Fl({size:Math.ceil(o.length/2),targetSize:r,type:"hex"});return `0x${o[t==="right"?"padEnd":"padStart"](r*2,"0")}`}function TM(e,{dir:t,size:r=32}={}){if(r===null)return e;if(e.length>r)throw new Fl({size:e.length,targetSize:r,type:"bytes"});let o=new Uint8Array(r);for(let n=0;n<r;n++){let i=t==="right";o[i?n:r-n-1]=e[i?n:e.length-n-1];}return o}var bh=j(()=>{yh();});var os,xh,vh,_h,Vl=j(()=>{Oe();os=class extends M{constructor({max:t,min:r,signed:o,size:n,value:i}){super(`Number "${i}" is not in safe ${n?`${n*8}-bit ${o?"signed":"unsigned"} `:""}integer range ${t?`(${r} to ${t})`:`(above ${r})`}`,{name:"IntegerOutOfRangeError"});}},xh=class extends M{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"});}},vh=class extends M{constructor(t){super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"});}},_h=class extends M{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"});}};});function br(e,{dir:t="left"}={}){let r=typeof e=="string"?e.replace("0x",""):e,o=0;for(let n=0;n<r.length-1&&r[t==="left"?n:r.length-n-1].toString()==="0";n++)o++;return r=t==="left"?r.slice(o):r.slice(0,r.length-o),typeof e=="string"?(r.length===1&&t==="right"&&(r=`${r}0`),`0x${r.length%2===1?`0${r}`:r}`):r}var Lc=j(()=>{});function en(e,{size:t}){if(Te(e)>t)throw new _h({givenSize:Te(e),maxSize:t})}function ft(e,t={}){let{signed:r}=t;t.size&&en(e,{size:t.size});let o=BigInt(e);if(!r)return o;let n=(e.length-2)/2,i=(1n<<BigInt(n)*8n-1n)-1n;return o<=i?o:o-BigInt(`0x${"f".padStart(n*2,"f")}`)-1n}function x1(e,t={}){let r=e;if(t.size&&(en(r,{size:t.size}),r=br(r)),br(r)==="0x00")return false;if(br(r)==="0x01")return true;throw new vh(r)}function Yt(e,t={}){let r=ft(e,t),o=Number(r);if(!Number.isSafeInteger(o))throw new os({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:t.signed,size:t.size,value:`${r}n`});return o}var xr=j(()=>{Vl();Qr();Lc();});function lt(e,t={}){return typeof e=="number"||typeof e=="bigint"?Y(e,t):typeof e=="string"?Uc(e,t):typeof e=="boolean"?v1(e,t):Le(e,t)}function v1(e,t={}){let r=`0x${Number(e)}`;return typeof t.size=="number"?(en(r,{size:t.size}),ns(r,{size:t.size})):r}function Le(e,t={}){let r="";for(let n=0;n<e.length;n++)r+=$M[e[n]];let o=`0x${r}`;return typeof t.size=="number"?(en(o,{size:t.size}),ns(o,{dir:"right",size:t.size})):o}function Y(e,t={}){let{signed:r,size:o}=t,n=BigInt(e),i;o?r?i=(1n<<BigInt(o)*8n-1n)-1n:i=2n**(BigInt(o)*8n)-1n:typeof e=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));let s=typeof i=="bigint"&&r?-i-1n:0;if(i&&n>i||n<s){let c=typeof e=="bigint"?"n":"";throw new os({max:i?`${i}${c}`:void 0,min:`${s}${c}`,signed:r,size:o,value:`${e}${c}`})}let a=`0x${(r&&n<0?(1n<<BigInt(o*8))+BigInt(n):n).toString(16)}`;return o?ns(a,{size:o}):a}function Uc(e,t={}){let r=OM.encode(e);return Le(r,t)}var $M,OM,Re=j(()=>{Vl();bh();xr();$M=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));OM=new TextEncoder;});function Nn(e,t={}){return typeof e=="number"||typeof e=="bigint"?BM(e,t):typeof e=="boolean"?PM(e,t):vt(e)?vr(e,t):so(e,t)}function PM(e,t={}){let r=new Uint8Array(1);return r[0]=Number(e),typeof t.size=="number"?(en(r,{size:t.size}),ns(r,{size:t.size})):r}function fk(e){if(e>=li.zero&&e<=li.nine)return e-li.zero;if(e>=li.A&&e<=li.F)return e-(li.A-10);if(e>=li.a&&e<=li.f)return e-(li.a-10)}function vr(e,t={}){let r=e;t.size&&(en(r,{size:t.size}),r=ns(r,{dir:"right",size:t.size}));let o=r.slice(2);o.length%2&&(o=`0${o}`);let n=o.length/2,i=new Uint8Array(n);for(let s=0,a=0;s<n;s++){let c=fk(o.charCodeAt(a++)),u=fk(o.charCodeAt(a++));if(c===void 0||u===void 0)throw new M(`Invalid byte sequence ("${o[a-2]}${o[a-1]}" in "${o}").`);i[s]=c*16+u;}return i}function BM(e,t){let r=Y(e,t);return vr(r)}function so(e,t={}){let r=NM.encode(e);return typeof t.size=="number"?(en(r,{size:t.size}),ns(r,{dir:"right",size:t.size})):r}var NM,li,_r=j(()=>{Oe();oo();bh();xr();Re();NM=new TextEncoder;li={zero:48,nine:57,A:65,F:70,a:97,f:102};});function Ke(e,t){let r=t||"hex",o=ha(vt(e,{strict:false})?Nn(e):e);return r==="bytes"?o:lt(o)}var ao=j(()=>{wm();oo();_r();Re();});function lk(e){return CM(e)}var CM,dk=j(()=>{_r();ao();CM=e=>Ke(Nn(e));});function pk(e){let t=true,r="",o=0,n="",i=false;for(let s=0;s<e.length;s++){let a=e[s];if(["(",")",","].includes(a)&&(t=true),a==="("&&o++,a===")"&&o--,!!t){if(o===0){if(a===" "&&["event","function",""].includes(n))n="";else if(n+=a,a===")"){i=true;break}continue}if(a===" "){e[s-1]!==","&&r!==","&&r!==",("&&(r="",t=false);continue}n+=a,r+=a;}}if(!i)throw new M("Unable to normalize signature.");return n}var mk=j(()=>{Oe();});var hk,gk=j(()=>{Nc();mk();hk=e=>{let t=typeof e=="string"?e:_a(e);return pk(t)};});function wh(e){return lk(hk(e))}var _1=j(()=>{dk();gk();});var is,Zl=j(()=>{_1();is=wh;});var et,Ro=j(()=>{Oe();et=class extends M{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"});}};});var To,Gl=j(()=>{To=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:true,configurable:true,writable:true,value:void 0}),this.maxSize=t;}get(t){let r=super.get(t);return super.has(t)&&(super.delete(t),super.set(t,r)),r}set(t,r){if(super.has(t)&&super.delete(t),super.set(t,r),this.maxSize&&this.size>this.maxSize){let o=super.keys().next().value;o!==void 0&&super.delete(o);}return this}};});function ss(e,t){if(w1.has(`${e}.${t}`))return w1.get(`${e}.${t}`);let r=e.substring(2).toLowerCase(),o=Ke(so(r),"bytes"),n=(r).split("");for(let s=0;s<40;s+=2)o[s>>1]>>4>=8&&n[s]&&(n[s]=n[s].toUpperCase()),(o[s>>1]&15)>=8&&n[s+1]&&(n[s+1]=n[s+1].toUpperCase());let i=`0x${n.join("")}`;return w1.set(`${e}.${t}`,i),i}function Pn(e,t){if(!Ze(e,{strict:false}))throw new et({address:e});return ss(e,t)}var w1,di=j(()=>{Ro();_r();ao();Gl();Bn();w1=new To(8192);});function Ze(e,t){let{strict:r=true}=t??{},o=`${e}.${r}`;if(E1.has(o))return E1.get(o);let n=zM.test(e)?e.toLowerCase()===e?true:r?ss(e)===e:true:false;return E1.set(o,n),n}var zM,E1,Bn=j(()=>{Gl();di();zM=/^0x[a-fA-F0-9]{40}$/,E1=new To(8192);});function wr(e){return typeof e[0]=="string"?ar(e):LM(e)}function LM(e){let t=0;for(let n of e)t+=n.length;let r=new Uint8Array(t),o=0;for(let n of e)r.set(n,o),o+=n.length;return r}function ar(e){return `0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}var tn=j(()=>{});function rn(e,t,r,{strict:o}={}){return vt(e,{strict:false})?UM(e,t,r,{strict:o}):S1(e,t,r,{strict:o})}function yk(e,t){if(typeof t=="number"&&t>0&&t>Te(e)-1)throw new jl({offset:t,position:"start",size:Te(e)})}function bk(e,t,r){if(typeof t=="number"&&typeof r=="number"&&Te(e)!==r-t)throw new jl({offset:r,position:"end",size:Te(e)})}function S1(e,t,r,{strict:o}={}){yk(e,t);let n=e.slice(t,r);return o&&bk(n,t,r),n}function UM(e,t,r,{strict:o}={}){yk(e,t);let n=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return o&&bk(n,t,r),n}var as=j(()=>{yh();oo();Qr();});var xk,Eh,I1=j(()=>{xk=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Eh=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;});function Vr(e,t){if(e.length!==t.length)throw new ah({expectedLength:e.length,givenLength:t.length});let r=MM({params:e,values:t}),o=k1(r);return o.length===0?"0x":o}function MM({params:e,values:t}){let r=[];for(let o=0;o<e.length;o++)r.push(A1({param:e[o],value:t[o]}));return r}function A1({param:e,value:t}){let r=Sh(e.type);if(r){let[o,n]=r;return jM(t,{length:o,param:{...e,type:n}})}if(e.type==="tuple")return GM(t,{param:e});if(e.type==="address")return DM(t);if(e.type==="bool")return HM(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){let o=e.type.startsWith("int"),[,,n="256"]=Eh.exec(e.type)??[];return VM(t,{signed:o,size:Number(n)})}if(e.type.startsWith("bytes"))return FM(t,{param:e});if(e.type==="string")return ZM(t);throw new mh(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function k1(e){let t=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?t+=32:t+=Te(a);}let r=[],o=[],n=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?(r.push(Y(t+n,{size:32})),o.push(a),n+=Te(a)):r.push(a);}return wr([...r,...o])}function DM(e){if(!Ze(e))throw new et({address:e});return {dynamic:false,encoded:fi(e.toLowerCase())}}function jM(e,{length:t,param:r}){let o=t===null;if(!Array.isArray(e))throw new zc(e);if(!o&&e.length!==t)throw new ih({expectedLength:t,givenLength:e.length,type:`${r.type}[${t}]`});let n=false,i=[];for(let s=0;s<e.length;s++){let a=A1({param:r,value:e[s]});a.dynamic&&(n=true),i.push(a);}if(o||n){let s=k1(i);if(o){let a=Y(i.length,{size:32});return {dynamic:true,encoded:i.length>0?wr([a,s]):a}}if(n)return {dynamic:true,encoded:s}}return {dynamic:false,encoded:wr(i.map(({encoded:s})=>s))}}function FM(e,{param:t}){let[,r]=t.type.split("bytes"),o=Te(e);if(!r){let n=e;return o%32!==0&&(n=fi(n,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:true,encoded:wr([fi(Y(o,{size:32})),n])}}if(o!==Number.parseInt(r,10))throw new sh({expectedSize:Number.parseInt(r,10),value:e});return {dynamic:false,encoded:fi(e,{dir:"right"})}}function HM(e){if(typeof e!="boolean")throw new M(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return {dynamic:false,encoded:fi(v1(e))}}function VM(e,{signed:t,size:r=256}){if(typeof r=="number"){let o=2n**(BigInt(r)-(t?1n:0n))-1n,n=t?-o-1n:0n;if(e>o||e<n)throw new os({max:o.toString(),min:n.toString(),signed:t,size:r/8,value:e.toString()})}return {dynamic:false,encoded:Y(e,{size:32,signed:t})}}function ZM(e){let t=Uc(e),r=Math.ceil(Te(t)/32),o=[];for(let n=0;n<r;n++)o.push(fi(rn(t,n*32,(n+1)*32),{dir:"right"}));return {dynamic:true,encoded:wr([fi(Y(Te(t),{size:32})),...o])}}function GM(e,{param:t}){let r=false,o=[];for(let n=0;n<t.components.length;n++){let i=t.components[n],s=Array.isArray(e)?n:i.name,a=A1({param:i,value:e[s]});o.push(a),a.dynamic&&(r=true);}return {dynamic:r,encoded:r?k1(o):wr(o.map(({encoded:n})=>n))}}function Sh(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}var pi=j(()=>{xt();Ro();Oe();Vl();Bn();tn();bh();Qr();as();Re();I1();});var $o,Mc=j(()=>{as();_1();$o=e=>rn(wh(e),0,4);});function nn(e){let{abi:t,args:r=[],name:o}=e,n=vt(o,{strict:false}),i=t.filter(a=>n?a.type==="function"?$o(a)===o:a.type==="event"?is(a)===o:false:"name"in a&&a.name===o);if(i.length===0)return;if(i.length===1)return i[0];let s;for(let a of i){if(!("inputs"in a))continue;if(!r||r.length===0){if(!a.inputs||a.inputs.length===0)return a;continue}if(!a.inputs||a.inputs.length===0||a.inputs.length!==r.length)continue;if(r.every((u,l)=>{let d="inputs"in a&&a.inputs[l];return d?R1(u,d):false})){if(s&&"inputs"in s&&s.inputs){let u=vk(a.inputs,s.inputs,r);if(u)throw new dh({abiItem:a,type:u[0]},{abiItem:s,type:u[1]})}s=a;}}return s||i[0]}function R1(e,t){let r=typeof e,o=t.type;switch(o){case "address":return Ze(e,{strict:false});case "bool":return r==="boolean";case "function":return r==="string";case "string":return r==="string";default:return o==="tuple"&&"components"in t?Object.values(t.components).every((n,i)=>r==="object"&&R1(Object.values(e)[i],n)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(o)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(o)?r==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(o)?Array.isArray(e)&&e.every(n=>R1(n,{...t,type:o.replace(/(\[[0-9]{0,}\])$/,"")})):false}}function vk(e,t,r){for(let o in e){let n=e[o],i=t[o];if(n.type==="tuple"&&i.type==="tuple"&&"components"in n&&"components"in i)return vk(n.components,i.components,r[o]);let s=[n.type,i.type];if(s.includes("address")&&s.includes("bytes20")?true:s.includes("address")&&s.includes("string")?Ze(r[o],{strict:false}):s.includes("address")&&s.includes("bytes")?Ze(r[o],{strict:false}):false)return s}}var cs=j(()=>{xt();oo();Bn();Zl();Mc();});function nt(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}var bn=j(()=>{});function Sk(e){let{abi:t,args:r,functionName:o}=e,n=t[0];if(o){let i=nn({abi:t,args:r,name:o});if(!i)throw new io(o,{docsPath:Ek});n=i;}if(n.type!=="function")throw new io(void 0,{docsPath:Ek});return {abi:[n],functionName:$o(er(n))}}var Ek,Ik=j(()=>{xt();Mc();ci();cs();Ek="/docs/contract/encodeFunctionData";});function dt(e){let{args:t}=e,{abi:r,functionName:o}=e.abi.length===1&&e.functionName?.startsWith("0x")?e:Sk(e),n=r[0],i=o,s="inputs"in n&&n.inputs?Vr(n.inputs,t??[]):void 0;return ar([i,s??"0x"])}var Cn=j(()=>{tn();pi();Ik();});var Ak,Ah,kk,kh=j(()=>{Ak={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},Ah={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},kk={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};});var ql,Dc,Rh,T1=j(()=>{Oe();ql=class extends M{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"});}},Dc=class extends M{constructor({length:t,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"});}},Rh=class extends M{constructor({count:t,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"});}};});function jc(e,{recursiveReadLimit:t=8192}={}){let r=Object.create(qM);return r.bytes=e,r.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}var qM,Th=j(()=>{T1();qM={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new Rh({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new Dc({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new ql({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t;},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new ql({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t;},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++;},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length;},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++;},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2;},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3;},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4;},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++;}};});function Rk(e,t={}){typeof t.size<"u"&&en(e,{size:t.size});let r=Le(e,t);return ft(r,t)}function Tk(e,t={}){let r=e;if(typeof t.size<"u"&&(en(r,{size:t.size}),r=br(r)),r.length>1||r[0]>1)throw new xh(r);return !!r[0]}function No(e,t={}){typeof t.size<"u"&&en(e,{size:t.size});let r=Le(e,t);return Yt(r,t)}function $k(e,t={}){let r=e;return typeof t.size<"u"&&(en(r,{size:t.size}),r=br(r,{dir:"right"})),new TextDecoder().decode(r)}var Ok=j(()=>{Vl();Lc();xr();Re();});function mi(e,t){let r=typeof t=="string"?vr(t):t,o=jc(r);if(Te(r)===0&&e.length>0)throw new On;if(Te(t)&&Te(t)<32)throw new Pc({data:typeof t=="string"?t:Le(t),params:e,size:Te(t)});let n=0,i=[];for(let s=0;s<e.length;++s){let a=e[s];o.setPosition(n);let[c,u]=Fc(o,a,{staticPosition:0});n+=u,i.push(c);}return i}function Fc(e,t,{staticPosition:r}){let o=Sh(t.type);if(o){let[n,i]=o;return KM(e,{...t,type:i},{length:n,staticPosition:r})}if(t.type==="tuple")return QM(e,t,{staticPosition:r});if(t.type==="address")return WM(e);if(t.type==="bool")return JM(e);if(t.type.startsWith("bytes"))return YM(e,t,{staticPosition:r});if(t.type.startsWith("uint")||t.type.startsWith("int"))return XM(e,t);if(t.type==="string")return eD(e,{staticPosition:r});throw new hh(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function WM(e){let t=e.readBytes(32);return [ss(Le(S1(t,-20))),32]}function KM(e,t,{length:r,staticPosition:o}){if(!r){let s=No(e.readBytes($1)),a=o+s,c=a+Nk;e.setPosition(a);let u=No(e.readBytes(Nk)),l=Wl(t),d=0,g=[];for(let h=0;h<u;++h){e.setPosition(c+(l?h*32:d));let[v,E]=Fc(e,t,{staticPosition:c});d+=E,g.push(v);}return e.setPosition(o+32),[g,32]}if(Wl(t)){let s=No(e.readBytes($1)),a=o+s,c=[];for(let u=0;u<r;++u){e.setPosition(a+u*32);let[l]=Fc(e,t,{staticPosition:a});c.push(l);}return e.setPosition(o+32),[c,32]}let n=0,i=[];for(let s=0;s<r;++s){let[a,c]=Fc(e,t,{staticPosition:o+n});n+=c,i.push(a);}return [i,n]}function JM(e){return [Tk(e.readBytes(32),{size:32}),32]}function YM(e,t,{staticPosition:r}){let[o,n]=t.type.split("bytes");if(!n){let s=No(e.readBytes(32));e.setPosition(r+s);let a=No(e.readBytes(32));if(a===0)return e.setPosition(r+32),["0x",32];let c=e.readBytes(a);return e.setPosition(r+32),[Le(c),32]}return [Le(e.readBytes(Number.parseInt(n,10),32)),32]}function XM(e,t){let r=t.type.startsWith("int"),o=Number.parseInt(t.type.split("int")[1]||"256",10),n=e.readBytes(32);return [o>48?Rk(n,{signed:r}):No(n,{signed:r}),32]}function QM(e,t,{staticPosition:r}){let o=t.components.length===0||t.components.some(({name:s})=>!s),n=o?[]:{},i=0;if(Wl(t)){let s=No(e.readBytes($1)),a=r+s;for(let c=0;c<t.components.length;++c){let u=t.components[c];e.setPosition(a+i);let[l,d]=Fc(e,u,{staticPosition:a});i+=d,n[o?c:u?.name]=l;}return e.setPosition(r+32),[n,32]}for(let s=0;s<t.components.length;++s){let a=t.components[s],[c,u]=Fc(e,a,{staticPosition:r});n[o?s:a?.name]=c,i+=u;}return [n,i]}function eD(e,{staticPosition:t}){let r=No(e.readBytes(32)),o=t+r;e.setPosition(o);let n=No(e.readBytes(32));if(n===0)return e.setPosition(t+32),["",32];let i=e.readBytes(n,32),s=$k(br(i));return e.setPosition(t+32),[s,32]}function Wl(e){let{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return true;if(t==="tuple")return e.components?.some(Wl);let r=Sh(e.type);return !!(r&&Wl({...e,type:r[1]}))}var Nk,$1,Kl=j(()=>{xt();di();Th();Qr();as();Lc();Ok();_r();Re();pi();Nk=32,$1=32;});function $h(e){let{abi:t,data:r,cause:o}=e,n=rn(r,0,4);if(n==="0x")throw new On({cause:o});let s=[...t||[],Ah,kk].find(a=>a.type==="error"&&n===$o(er(a)));if(!s)throw new Bc(n,{docsPath:"/docs/contract/decodeErrorResult",cause:o});return {abiItem:s,args:"inputs"in s&&s.inputs&&s.inputs.length>0?mi(s.inputs,rn(r,4)):void 0,errorName:s.name}}var O1=j(()=>{kh();xt();as();Mc();Kl();ci();});var je,on=j(()=>{je=(e,t,r)=>JSON.stringify(e,(o,n)=>{let i=typeof n=="bigint"?n.toString():n;return typeof t=="function"?t(o,i):i},r);});function N1({abiItem:e,args:t,includeFunctionName:r=true,includeName:o=false}){if("name"in e&&"inputs"in e&&e.inputs)return `${r?e.name:""}(${e.inputs.map((n,i)=>`${o&&n.name?`${n.name}: `:""}${typeof t[i]=="object"?je(t[i]):t[i]}`).join(", ")})`}var Pk=j(()=>{on();});var Bk,Ck,P1=j(()=>{Bk={gwei:9,wei:18},Ck={ether:-9,wei:9};});function Oh(e,t){let r=e.toString(),o=r.startsWith("-");o&&(r=r.slice(1)),r=r.padStart(t,"0");let[n,i]=[r.slice(0,r.length-t),r.slice(r.length-t)];return i=i.replace(/(0+)$/,""),`${o?"-":""}${n||"0"}${i?`.${i}`:""}`}var B1=j(()=>{});function Hc(e,t="wei"){return Oh(e,Bk[t])}var Nh=j(()=>{P1();B1();});function tr(e,t="wei"){return Oh(e,Ck[t])}var Vc=j(()=>{P1();B1();});function zk(e){return e.reduce((t,{slot:r,value:o})=>`${t} ${r}: ${o}
|
|
24
|
-
`,"")}function
|
|
2
|
+
var JO=Object.create;var Cp=Object.defineProperty;var YO=Object.getOwnPropertyDescriptor;var XO=Object.getOwnPropertyNames;var QO=Object.getPrototypeOf,eN=Object.prototype.hasOwnProperty;var F=(e,t)=>()=>(e&&(t=e(e=0)),t);var Wr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Er=(e,t)=>{for(var r in t)Cp(e,r,{get:t[r],enumerable:true});},DE=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of XO(t))!eN.call(e,n)&&n!==r&&Cp(e,n,{get:()=>t[n],enumerable:!(o=YO(t,n))||o.enumerable});return e};var Ko=(e,t,r)=>(r=e!=null?JO(QO(e)):{},DE(t||!e||!e.__esModule?Cp(r,"default",{value:e,enumerable:true}):r,e)),jE=e=>DE(Cp({},"__esModule",{value:true}),e);var vI=Wr(Xm=>{Xm.byteLength=Kz;Xm.toByteArray=Yz;Xm.fromByteArray=eL;var So=[],On=[],Wz=typeof Uint8Array<"u"?Uint8Array:Array,yw="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(ca=0,bI=yw.length;ca<bI;++ca)So[ca]=yw[ca],On[yw.charCodeAt(ca)]=ca;var ca,bI;On[45]=62;On[95]=63;function xI(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var o=r===t?0:4-r%4;return [r,o]}function Kz(e){var t=xI(e),r=t[0],o=t[1];return (r+o)*3/4-o}function Jz(e,t,r){return (t+r)*3/4-r}function Yz(e){var t,r=xI(e),o=r[0],n=r[1],i=new Wz(Jz(e,o,n)),s=0,a=n>0?o-4:o,c;for(c=0;c<a;c+=4)t=On[e.charCodeAt(c)]<<18|On[e.charCodeAt(c+1)]<<12|On[e.charCodeAt(c+2)]<<6|On[e.charCodeAt(c+3)],i[s++]=t>>16&255,i[s++]=t>>8&255,i[s++]=t&255;return n===2&&(t=On[e.charCodeAt(c)]<<2|On[e.charCodeAt(c+1)]>>4,i[s++]=t&255),n===1&&(t=On[e.charCodeAt(c)]<<10|On[e.charCodeAt(c+1)]<<4|On[e.charCodeAt(c+2)]>>2,i[s++]=t>>8&255,i[s++]=t&255),i}function Xz(e){return So[e>>18&63]+So[e>>12&63]+So[e>>6&63]+So[e&63]}function Qz(e,t,r){for(var o,n=[],i=t;i<r;i+=3)o=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255),n.push(Xz(o));return n.join("")}function eL(e){for(var t,r=e.length,o=r%3,n=[],i=16383,s=0,a=r-o;s<a;s+=i)n.push(Qz(e,s,s+i>a?a:s+i));return o===1?(t=e[r-1],n.push(So[t>>2]+So[t<<4&63]+"==")):o===2&&(t=(e[r-2]<<8)+e[r-1],n.push(So[t>>10]+So[t>>4&63]+So[t<<2&63]+"=")),n.join("")}});var wI=Wr(bw=>{bw.read=function(e,t,r,o,n){var i,s,a=n*8-o-1,c=(1<<a)-1,u=c>>1,f=-7,d=r?n-1:0,g=r?-1:1,h=e[t+d];for(d+=g,i=h&(1<<-f)-1,h>>=-f,f+=a;f>0;i=i*256+e[t+d],d+=g,f-=8);for(s=i&(1<<-f)-1,i>>=-f,f+=o;f>0;s=s*256+e[t+d],d+=g,f-=8);if(i===0)i=1-u;else {if(i===c)return s?NaN:(h?-1:1)*(1/0);s=s+Math.pow(2,o),i=i-u;}return (h?-1:1)*s*Math.pow(2,i-o)};bw.write=function(e,t,r,o,n,i){var s,a,c,u=i*8-n-1,f=(1<<u)-1,d=f>>1,g=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=o?0:i-1,v=o?1:-1,E=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+d>=1?t+=g/c:t+=g*Math.pow(2,1-d),t*c>=2&&(s++,c/=2),s+d>=f?(a=0,s=f):s+d>=1?(a=(t*c-1)*Math.pow(2,n),s=s+d):(a=t*Math.pow(2,d-1)*Math.pow(2,n),s=0));n>=8;e[r+h]=a&255,h+=v,a/=256,n-=8);for(s=s<<n|a,u+=n;u>0;e[r+h]=s&255,h+=v,s/=256,u-=8);e[r+h-v]|=E*128;};});var Rl=Wr(Cc=>{var xw=vI(),Pc=wI(),_I=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Cc.Buffer=V;Cc.SlowBuffer=sL;Cc.INSPECT_MAX_BYTES=50;var Qm=2147483647;Cc.kMaxLength=Qm;V.TYPED_ARRAY_SUPPORT=tL();!V.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 tL(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return false}}Object.defineProperty(V.prototype,"parent",{enumerable:true,get:function(){if(V.isBuffer(this))return this.buffer}});Object.defineProperty(V.prototype,"offset",{enumerable:true,get:function(){if(V.isBuffer(this))return this.byteOffset}});function ii(e){if(e>Qm)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,V.prototype),t}function V(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Ew(e)}return AI(e,t,r)}V.poolSize=8192;function AI(e,t,r){if(typeof e=="string")return nL(e,t);if(ArrayBuffer.isView(e))return oL(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Io(e,ArrayBuffer)||e&&Io(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Io(e,SharedArrayBuffer)||e&&Io(e.buffer,SharedArrayBuffer)))return ww(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let o=e.valueOf&&e.valueOf();if(o!=null&&o!==e)return V.from(o,t,r);let n=iL(e);if(n)return n;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return V.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}V.from=function(e,t,r){return AI(e,t,r)};Object.setPrototypeOf(V.prototype,Uint8Array.prototype);Object.setPrototypeOf(V,Uint8Array);function kI(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function rL(e,t,r){return kI(e),e<=0?ii(e):t!==void 0?typeof r=="string"?ii(e).fill(t,r):ii(e).fill(t):ii(e)}V.alloc=function(e,t,r){return rL(e,t,r)};function Ew(e){return kI(e),ii(e<0?0:Sw(e)|0)}V.allocUnsafe=function(e){return Ew(e)};V.allocUnsafeSlow=function(e){return Ew(e)};function nL(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!V.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=RI(e,t)|0,o=ii(r),n=o.write(e,t);return n!==r&&(o=o.slice(0,n)),o}function vw(e){let t=e.length<0?0:Sw(e.length)|0,r=ii(t);for(let o=0;o<t;o+=1)r[o]=e[o]&255;return r}function oL(e){if(Io(e,Uint8Array)){let t=new Uint8Array(e);return ww(t.buffer,t.byteOffset,t.byteLength)}return vw(e)}function ww(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let o;return t===void 0&&r===void 0?o=new Uint8Array(e):r===void 0?o=new Uint8Array(e,t):o=new Uint8Array(e,t,r),Object.setPrototypeOf(o,V.prototype),o}function iL(e){if(V.isBuffer(e)){let t=Sw(e.length)|0,r=ii(t);return r.length===0||e.copy(r,0,0,t),r}if(e.length!==void 0)return typeof e.length!="number"||Aw(e.length)?ii(0):vw(e);if(e.type==="Buffer"&&Array.isArray(e.data))return vw(e.data)}function Sw(e){if(e>=Qm)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Qm.toString(16)+" bytes");return e|0}function sL(e){return +e!=e&&(e=0),V.alloc(+e)}V.isBuffer=function(t){return t!=null&&t._isBuffer===true&&t!==V.prototype};V.compare=function(t,r){if(Io(t,Uint8Array)&&(t=V.from(t,t.offset,t.byteLength)),Io(r,Uint8Array)&&(r=V.from(r,r.offset,r.byteLength)),!V.isBuffer(t)||!V.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let o=t.length,n=r.length;for(let i=0,s=Math.min(o,n);i<s;++i)if(t[i]!==r[i]){o=t[i],n=r[i];break}return o<n?-1:n<o?1:0};V.isEncoding=function(t){switch(String(t).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 true;default:return false}};V.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return V.alloc(0);let o;if(r===void 0)for(r=0,o=0;o<t.length;++o)r+=t[o].length;let n=V.allocUnsafe(r),i=0;for(o=0;o<t.length;++o){let s=t[o];if(Io(s,Uint8Array))i+s.length>n.length?(V.isBuffer(s)||(s=V.from(s)),s.copy(n,i)):Uint8Array.prototype.set.call(n,s,i);else if(V.isBuffer(s))s.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=s.length;}return n};function RI(e,t){if(V.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Io(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,o=arguments.length>2&&arguments[2]===true;if(!o&&r===0)return 0;let n=false;for(;;)switch(t){case "ascii":case "latin1":case "binary":return r;case "utf8":case "utf-8":return _w(e).length;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return r*2;case "hex":return r>>>1;case "base64":return LI(e).length;default:if(n)return o?-1:_w(e).length;t=(""+t).toLowerCase(),n=true;}}V.byteLength=RI;function aL(e,t,r){let o=false;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return "";for(e||(e="utf8");;)switch(e){case "hex":return yL(this,t,r);case "utf8":case "utf-8":return $I(this,t,r);case "ascii":return hL(this,t,r);case "latin1":case "binary":return gL(this,t,r);case "base64":return pL(this,t,r);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return bL(this,t,r);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=true;}}V.prototype._isBuffer=true;function ua(e,t,r){let o=e[t];e[t]=e[r],e[r]=o;}V.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<t;r+=2)ua(this,r,r+1);return this};V.prototype.swap32=function(){let t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<t;r+=4)ua(this,r,r+3),ua(this,r+1,r+2);return this};V.prototype.swap64=function(){let t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<t;r+=8)ua(this,r,r+7),ua(this,r+1,r+6),ua(this,r+2,r+5),ua(this,r+3,r+4);return this};V.prototype.toString=function(){let t=this.length;return t===0?"":arguments.length===0?$I(this,0,t):aL.apply(this,arguments)};V.prototype.toLocaleString=V.prototype.toString;V.prototype.equals=function(t){if(!V.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?true:V.compare(this,t)===0};V.prototype.inspect=function(){let t="",r=Cc.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"};_I&&(V.prototype[_I]=V.prototype.inspect);V.prototype.compare=function(t,r,o,n,i){if(Io(t,Uint8Array)&&(t=V.from(t,t.offset,t.byteLength)),!V.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),o===void 0&&(o=t?t.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),r<0||o>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=o)return 0;if(n>=i)return -1;if(r>=o)return 1;if(r>>>=0,o>>>=0,n>>>=0,i>>>=0,this===t)return 0;let s=i-n,a=o-r,c=Math.min(s,a),u=this.slice(n,i),f=t.slice(r,o);for(let d=0;d<c;++d)if(u[d]!==f[d]){s=u[d],a=f[d];break}return s<a?-1:a<s?1:0};function TI(e,t,r,o,n){if(e.length===0)return -1;if(typeof r=="string"?(o=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Aw(r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return -1;r=e.length-1;}else if(r<0)if(n)r=0;else return -1;if(typeof t=="string"&&(t=V.from(t,o)),V.isBuffer(t))return t.length===0?-1:EI(e,t,r,o,n);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):EI(e,[t],r,o,n);throw new TypeError("val must be string, number or Buffer")}function EI(e,t,r,o,n){let i=1,s=e.length,a=t.length;if(o!==void 0&&(o=String(o).toLowerCase(),o==="ucs2"||o==="ucs-2"||o==="utf16le"||o==="utf-16le")){if(e.length<2||t.length<2)return -1;i=2,s/=2,a/=2,r/=2;}function c(f,d){return i===1?f[d]:f.readUInt16BE(d*i)}let u;if(n){let f=-1;for(u=r;u<s;u++)if(c(e,u)===c(t,f===-1?0:u-f)){if(f===-1&&(f=u),u-f+1===a)return f*i}else f!==-1&&(u-=u-f),f=-1;}else for(r+a>s&&(r=s-a),u=r;u>=0;u--){let f=true;for(let d=0;d<a;d++)if(c(e,u+d)!==c(t,d)){f=false;break}if(f)return u}return -1}V.prototype.includes=function(t,r,o){return this.indexOf(t,r,o)!==-1};V.prototype.indexOf=function(t,r,o){return TI(this,t,r,o,true)};V.prototype.lastIndexOf=function(t,r,o){return TI(this,t,r,o,false)};function cL(e,t,r,o){r=Number(r)||0;let n=e.length-r;o?(o=Number(o),o>n&&(o=n)):o=n;let i=t.length;o>i/2&&(o=i/2);let s;for(s=0;s<o;++s){let a=parseInt(t.substr(s*2,2),16);if(Aw(a))return s;e[r+s]=a;}return s}function uL(e,t,r,o){return eh(_w(t,e.length-r),e,r,o)}function fL(e,t,r,o){return eh(_L(t),e,r,o)}function lL(e,t,r,o){return eh(LI(t),e,r,o)}function dL(e,t,r,o){return eh(EL(t,e.length-r),e,r,o)}V.prototype.write=function(t,r,o,n){if(r===void 0)n="utf8",o=this.length,r=0;else if(o===void 0&&typeof r=="string")n=r,o=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(o)?(o=o>>>0,n===void 0&&(n="utf8")):(n=o,o=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-r;if((o===void 0||o>i)&&(o=i),t.length>0&&(o<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let s=false;for(;;)switch(n){case "hex":return cL(this,t,r,o);case "utf8":case "utf-8":return uL(this,t,r,o);case "ascii":case "latin1":case "binary":return fL(this,t,r,o);case "base64":return lL(this,t,r,o);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return dL(this,t,r,o);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=true;}};V.prototype.toJSON=function(){return {type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function pL(e,t,r){return t===0&&r===e.length?xw.fromByteArray(e):xw.fromByteArray(e.slice(t,r))}function $I(e,t,r){r=Math.min(e.length,r);let o=[],n=t;for(;n<r;){let i=e[n],s=null,a=i>239?4:i>223?3:i>191?2:1;if(n+a<=r){let c,u,f,d;switch(a){case 1:i<128&&(s=i);break;case 2:c=e[n+1],(c&192)===128&&(d=(i&31)<<6|c&63,d>127&&(s=d));break;case 3:c=e[n+1],u=e[n+2],(c&192)===128&&(u&192)===128&&(d=(i&15)<<12|(c&63)<<6|u&63,d>2047&&(d<55296||d>57343)&&(s=d));break;case 4:c=e[n+1],u=e[n+2],f=e[n+3],(c&192)===128&&(u&192)===128&&(f&192)===128&&(d=(i&15)<<18|(c&63)<<12|(u&63)<<6|f&63,d>65535&&d<1114112&&(s=d));}}s===null?(s=65533,a=1):s>65535&&(s-=65536,o.push(s>>>10&1023|55296),s=56320|s&1023),o.push(s),n+=a;}return mL(o)}var SI=4096;function mL(e){let t=e.length;if(t<=SI)return String.fromCharCode.apply(String,e);let r="",o=0;for(;o<t;)r+=String.fromCharCode.apply(String,e.slice(o,o+=SI));return r}function hL(e,t,r){let o="";r=Math.min(e.length,r);for(let n=t;n<r;++n)o+=String.fromCharCode(e[n]&127);return o}function gL(e,t,r){let o="";r=Math.min(e.length,r);for(let n=t;n<r;++n)o+=String.fromCharCode(e[n]);return o}function yL(e,t,r){let o=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>o)&&(r=o);let n="";for(let i=t;i<r;++i)n+=SL[e[i]];return n}function bL(e,t,r){let o=e.slice(t,r),n="";for(let i=0;i<o.length-1;i+=2)n+=String.fromCharCode(o[i]+o[i+1]*256);return n}V.prototype.slice=function(t,r){let o=this.length;t=~~t,r=r===void 0?o:~~r,t<0?(t+=o,t<0&&(t=0)):t>o&&(t=o),r<0?(r+=o,r<0&&(r=0)):r>o&&(r=o),r<t&&(r=t);let n=this.subarray(t,r);return Object.setPrototypeOf(n,V.prototype),n};function sr(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}V.prototype.readUintLE=V.prototype.readUIntLE=function(t,r,o){t=t>>>0,r=r>>>0,o||sr(t,r,this.length);let n=this[t],i=1,s=0;for(;++s<r&&(i*=256);)n+=this[t+s]*i;return n};V.prototype.readUintBE=V.prototype.readUIntBE=function(t,r,o){t=t>>>0,r=r>>>0,o||sr(t,r,this.length);let n=this[t+--r],i=1;for(;r>0&&(i*=256);)n+=this[t+--r]*i;return n};V.prototype.readUint8=V.prototype.readUInt8=function(t,r){return t=t>>>0,r||sr(t,1,this.length),this[t]};V.prototype.readUint16LE=V.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||sr(t,2,this.length),this[t]|this[t+1]<<8};V.prototype.readUint16BE=V.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||sr(t,2,this.length),this[t]<<8|this[t+1]};V.prototype.readUint32LE=V.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};V.prototype.readUint32BE=V.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};V.prototype.readBigUInt64LE=Ki(function(t){t=t>>>0,Bc(t,"offset");let r=this[t],o=this[t+7];(r===void 0||o===void 0)&&kl(t,this.length-8);let n=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,i=this[++t]+this[++t]*2**8+this[++t]*2**16+o*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))});V.prototype.readBigUInt64BE=Ki(function(t){t=t>>>0,Bc(t,"offset");let r=this[t],o=this[t+7];(r===void 0||o===void 0)&&kl(t,this.length-8);let n=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],i=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+o;return (BigInt(n)<<BigInt(32))+BigInt(i)});V.prototype.readIntLE=function(t,r,o){t=t>>>0,r=r>>>0,o||sr(t,r,this.length);let n=this[t],i=1,s=0;for(;++s<r&&(i*=256);)n+=this[t+s]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*r)),n};V.prototype.readIntBE=function(t,r,o){t=t>>>0,r=r>>>0,o||sr(t,r,this.length);let n=r,i=1,s=this[t+--n];for(;n>0&&(i*=256);)s+=this[t+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*r)),s};V.prototype.readInt8=function(t,r){return t=t>>>0,r||sr(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};V.prototype.readInt16LE=function(t,r){t=t>>>0,r||sr(t,2,this.length);let o=this[t]|this[t+1]<<8;return o&32768?o|4294901760:o};V.prototype.readInt16BE=function(t,r){t=t>>>0,r||sr(t,2,this.length);let o=this[t+1]|this[t]<<8;return o&32768?o|4294901760:o};V.prototype.readInt32LE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};V.prototype.readInt32BE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};V.prototype.readBigInt64LE=Ki(function(t){t=t>>>0,Bc(t,"offset");let r=this[t],o=this[t+7];(r===void 0||o===void 0)&&kl(t,this.length-8);let n=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(o<<24);return (BigInt(n)<<BigInt(32))+BigInt(r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)});V.prototype.readBigInt64BE=Ki(function(t){t=t>>>0,Bc(t,"offset");let r=this[t],o=this[t+7];(r===void 0||o===void 0)&&kl(t,this.length-8);let n=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return (BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+o)});V.prototype.readFloatLE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),Pc.read(this,t,true,23,4)};V.prototype.readFloatBE=function(t,r){return t=t>>>0,r||sr(t,4,this.length),Pc.read(this,t,false,23,4)};V.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||sr(t,8,this.length),Pc.read(this,t,true,52,8)};V.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||sr(t,8,this.length),Pc.read(this,t,false,52,8)};function en(e,t,r,o,n,i){if(!V.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<i)throw new RangeError('"value" argument is out of bounds');if(r+o>e.length)throw new RangeError("Index out of range")}V.prototype.writeUintLE=V.prototype.writeUIntLE=function(t,r,o,n){if(t=+t,r=r>>>0,o=o>>>0,!n){let a=Math.pow(2,8*o)-1;en(this,t,r,o,a,0);}let i=1,s=0;for(this[r]=t&255;++s<o&&(i*=256);)this[r+s]=t/i&255;return r+o};V.prototype.writeUintBE=V.prototype.writeUIntBE=function(t,r,o,n){if(t=+t,r=r>>>0,o=o>>>0,!n){let a=Math.pow(2,8*o)-1;en(this,t,r,o,a,0);}let i=o-1,s=1;for(this[r+i]=t&255;--i>=0&&(s*=256);)this[r+i]=t/s&255;return r+o};V.prototype.writeUint8=V.prototype.writeUInt8=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,1,255,0),this[r]=t&255,r+1};V.prototype.writeUint16LE=V.prototype.writeUInt16LE=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};V.prototype.writeUint16BE=V.prototype.writeUInt16BE=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};V.prototype.writeUint32LE=V.prototype.writeUInt32LE=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};V.prototype.writeUint32BE=V.prototype.writeUInt32BE=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function OI(e,t,r,o,n){zI(t,o,n,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function NI(e,t,r,o,n){zI(t,o,n,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i=i>>8,e[r+6]=i,i=i>>8,e[r+5]=i,i=i>>8,e[r+4]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}V.prototype.writeBigUInt64LE=Ki(function(t,r=0){return OI(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});V.prototype.writeBigUInt64BE=Ki(function(t,r=0){return NI(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});V.prototype.writeIntLE=function(t,r,o,n){if(t=+t,r=r>>>0,!n){let c=Math.pow(2,8*o-1);en(this,t,r,o,c-1,-c);}let i=0,s=1,a=0;for(this[r]=t&255;++i<o&&(s*=256);)t<0&&a===0&&this[r+i-1]!==0&&(a=1),this[r+i]=(t/s>>0)-a&255;return r+o};V.prototype.writeIntBE=function(t,r,o,n){if(t=+t,r=r>>>0,!n){let c=Math.pow(2,8*o-1);en(this,t,r,o,c-1,-c);}let i=o-1,s=1,a=0;for(this[r+i]=t&255;--i>=0&&(s*=256);)t<0&&a===0&&this[r+i+1]!==0&&(a=1),this[r+i]=(t/s>>0)-a&255;return r+o};V.prototype.writeInt8=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};V.prototype.writeInt16LE=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};V.prototype.writeInt16BE=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};V.prototype.writeInt32LE=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};V.prototype.writeInt32BE=function(t,r,o){return t=+t,r=r>>>0,o||en(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};V.prototype.writeBigInt64LE=Ki(function(t,r=0){return OI(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});V.prototype.writeBigInt64BE=Ki(function(t,r=0){return NI(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function PI(e,t,r,o,n,i){if(r+o>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function BI(e,t,r,o,n){return t=+t,r=r>>>0,n||PI(e,t,r,4),Pc.write(e,t,r,o,23,4),r+4}V.prototype.writeFloatLE=function(t,r,o){return BI(this,t,r,true,o)};V.prototype.writeFloatBE=function(t,r,o){return BI(this,t,r,false,o)};function CI(e,t,r,o,n){return t=+t,r=r>>>0,n||PI(e,t,r,8),Pc.write(e,t,r,o,52,8),r+8}V.prototype.writeDoubleLE=function(t,r,o){return CI(this,t,r,true,o)};V.prototype.writeDoubleBE=function(t,r,o){return CI(this,t,r,false,o)};V.prototype.copy=function(t,r,o,n){if(!V.isBuffer(t))throw new TypeError("argument should be a Buffer");if(o||(o=0),!n&&n!==0&&(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<o&&(n=o),n===o||t.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(o<0||o>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-o&&(n=t.length-r+o);let i=n-o;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,o,n):Uint8Array.prototype.set.call(t,this.subarray(o,n),r),i};V.prototype.fill=function(t,r,o,n){if(typeof t=="string"){if(typeof r=="string"?(n=r,r=0,o=this.length):typeof o=="string"&&(n=o,o=this.length),n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!V.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(t.length===1){let s=t.charCodeAt(0);(n==="utf8"&&s<128||n==="latin1")&&(t=s);}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(r<0||this.length<r||this.length<o)throw new RangeError("Out of range index");if(o<=r)return this;r=r>>>0,o=o===void 0?this.length:o>>>0,t||(t=0);let i;if(typeof t=="number")for(i=r;i<o;++i)this[i]=t;else {let s=V.isBuffer(t)?t:V.from(t,n),a=s.length;if(a===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<o-r;++i)this[i+r]=s[i%a];}return this};var Nc={};function Iw(e,t,r){Nc[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:true,configurable:true}),this.name=`${this.name} [${e}]`,this.stack,delete this.name;}get code(){return e}set code(n){Object.defineProperty(this,"code",{configurable:true,enumerable:true,value:n,writable:true});}toString(){return `${this.name} [${e}]: ${this.message}`}};}Iw("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);Iw("ERR_INVALID_ARG_TYPE",function(e,t){return `The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError);Iw("ERR_OUT_OF_RANGE",function(e,t,r){let o=`The value of "${e}" is out of range.`,n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=II(String(r)):typeof r=="bigint"&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=II(n)),n+="n"),o+=` It must be ${t}. Received ${n}`,o},RangeError);function II(e){let t="",r=e.length,o=e[0]==="-"?1:0;for(;r>=o+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return `${e.slice(0,r)}${t}`}function xL(e,t,r){Bc(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&kl(t,e.length-(r+1));}function zI(e,t,r,o,n,i){if(e>r||e<t){let s=typeof t=="bigint"?"n":"",a;throw t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(i+1)*8}${s}`:a=`>= -(2${s} ** ${(i+1)*8-1}${s}) and < 2 ** ${(i+1)*8-1}${s}`,new Nc.ERR_OUT_OF_RANGE("value",a,e)}xL(o,n,i);}function Bc(e,t){if(typeof e!="number")throw new Nc.ERR_INVALID_ARG_TYPE(t,"number",e)}function kl(e,t,r){throw Math.floor(e)!==e?(Bc(e,r),new Nc.ERR_OUT_OF_RANGE("offset","an integer",e)):t<0?new Nc.ERR_BUFFER_OUT_OF_BOUNDS:new Nc.ERR_OUT_OF_RANGE("offset",`>= ${0} and <= ${t}`,e)}var vL=/[^+/0-9A-Za-z-_]/g;function wL(e){if(e=e.split("=")[0],e=e.trim().replace(vL,""),e.length<2)return "";for(;e.length%4!==0;)e=e+"=";return e}function _w(e,t){t=t||1/0;let r,o=e.length,n=null,i=[];for(let s=0;s<o;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(s+1===o){(t-=3)>-1&&i.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536;}else n&&(t-=3)>-1&&i.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;i.push(r);}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128);}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128);}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128);}else throw new Error("Invalid code point")}return i}function _L(e){let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r)&255);return t}function EL(e,t){let r,o,n,i=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),o=r>>8,n=r%256,i.push(n),i.push(o);return i}function LI(e){return xw.toByteArray(wL(e))}function eh(e,t,r,o){let n;for(n=0;n<o&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function Io(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Aw(e){return e!==e}var SL=(function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let o=r*16;for(let n=0;n<16;++n)t[o+n]=e[r]+e[n];}return t})();function Ki(e){return typeof BigInt>"u"?IL:e}function IL(){throw new Error("BigInt not supported")}});var fa,UI=F(()=>{fa=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;});function AL(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function la(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function Ao(e,...t){if(!AL(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function MI(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");la(e.outputLen),la(e.blockLen);}function si(e,t=true){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function th(e,t){Ao(e);let r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)}function DI(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Nn(...e){for(let t=0;t<e.length;t++)e[t].fill(0);}function rh(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function eo(e,t){return e<<32-t|e>>>t}function RL(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function TL(e){for(let t=0;t<e.length;t++)e[t]=RL(e[t]);return e}function jI(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function da(e){return typeof e=="string"&&(e=jI(e)),Ao(e),e}function Rw(...e){let t=0;for(let o=0;o<e.length;o++){let n=e[o];Ao(n),t+=n.length;}let r=new Uint8Array(t);for(let o=0,n=0;o<e.length;o++){let i=e[o];r.set(i,n),n+=i.length;}return r}function Tl(e){let t=o=>e().update(da(o)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function zc(e=32){if(fa&&typeof fa.getRandomValues=="function")return fa.getRandomValues(new Uint8Array(e));if(fa&&typeof fa.randomBytes=="function")return Uint8Array.from(fa.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}var kL,kw,Ji,ai=F(()=>{UI();kL=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;kw=kL?e=>e:TL;Ji=class{};});function $L(e,t,r,o){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,o);let n=BigInt(32),i=BigInt(4294967295),s=Number(r>>n&i),a=Number(r&i),c=o?4:0,u=o?0:4;e.setUint32(t+c,s,o),e.setUint32(t+u,a,o);}function FI(e,t,r){return e&t^~e&r}function HI(e,t,r){return e&t^e&r^t&r}var $l,ci,pr,VI=F(()=>{ai();$l=class extends Ji{constructor(t,r,o,n){super(),this.finished=false,this.length=0,this.pos=0,this.destroyed=false,this.blockLen=t,this.outputLen=r,this.padOffset=o,this.isLE=n,this.buffer=new Uint8Array(t),this.view=rh(this.buffer);}update(t){si(this),t=da(t),Ao(t);let{view:r,buffer:o,blockLen:n}=this,i=t.length;for(let s=0;s<i;){let a=Math.min(n-this.pos,i-s);if(a===n){let c=rh(t);for(;n<=i-s;s+=n)this.process(c,s);continue}o.set(t.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===n&&(this.process(r,0),this.pos=0);}return this.length+=t.length,this.roundClean(),this}digestInto(t){si(this),th(t,this),this.finished=true;let{buffer:r,view:o,blockLen:n,isLE:i}=this,{pos:s}=this;r[s++]=128,Nn(this.buffer.subarray(s)),this.padOffset>n-s&&(this.process(o,0),s=0);for(let d=s;d<n;d++)r[d]=0;$L(o,n-8,BigInt(this.length*8),i),this.process(o,0);let a=rh(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let u=c/4,f=this.get();if(u>f.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<u;d++)a.setUint32(4*d,f[d],i);}digest(){let{buffer:t,outputLen:r}=this;this.digestInto(t);let o=t.slice(0,r);return this.destroy(),o}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());let{blockLen:r,buffer:o,length:n,finished:i,destroyed:s,pos:a}=this;return t.destroyed=s,t.finished=i,t.length=n,t.pos=a,n%r&&t.buffer.set(o),t}clone(){return this._cloneInto()}},ci=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),pr=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]);});function OL(e,t=false){return t?{h:Number(e&nh),l:Number(e>>ZI&nh)}:{h:Number(e>>ZI&nh)|0,l:Number(e&nh)|0}}function oh(e,t=false){let r=e.length,o=new Uint32Array(r),n=new Uint32Array(r);for(let i=0;i<r;i++){let{h:s,l:a}=OL(e[i],t);[o[i],n[i]]=[s,a];}return [o,n]}function ko(e,t,r,o){let n=(t>>>0)+(o>>>0);return {h:e+r+(n/2**32|0)|0,l:n|0}}var nh,ZI,Tw,$w,pa,ma,Ol,Nl,GI,qI,WI,KI,JI,YI,XI,QI,eA,tA,Ow=F(()=>{nh=BigInt(4294967295),ZI=BigInt(32);Tw=(e,t,r)=>e>>>r,$w=(e,t,r)=>e<<32-r|t>>>r,pa=(e,t,r)=>e>>>r|t<<32-r,ma=(e,t,r)=>e<<32-r|t>>>r,Ol=(e,t,r)=>e<<64-r|t>>>r-32,Nl=(e,t,r)=>e>>>r-32|t<<64-r,GI=(e,t,r)=>e<<r|t>>>32-r,qI=(e,t,r)=>t<<r|e>>>32-r,WI=(e,t,r)=>t<<r-32|e>>>64-r,KI=(e,t,r)=>e<<r-32|t>>>64-r;JI=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),YI=(e,t,r,o)=>t+r+o+(e/2**32|0)|0,XI=(e,t,r,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0),QI=(e,t,r,o,n)=>t+r+o+n+(e/2**32|0)|0,eA=(e,t,r,o,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0)+(n>>>0),tA=(e,t,r,o,n,i)=>t+r+o+n+i+(e/2**32|0)|0;});var PL,Yi,ih,rA,BL,CL,Xi,Qi,Nw,ha,nA,sh=F(()=>{VI();Ow();ai();PL=Uint32Array.from([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]),Yi=new Uint32Array(64),ih=class extends $l{constructor(t=32){super(64,t,8,false),this.A=ci[0]|0,this.B=ci[1]|0,this.C=ci[2]|0,this.D=ci[3]|0,this.E=ci[4]|0,this.F=ci[5]|0,this.G=ci[6]|0,this.H=ci[7]|0;}get(){let{A:t,B:r,C:o,D:n,E:i,F:s,G:a,H:c}=this;return [t,r,o,n,i,s,a,c]}set(t,r,o,n,i,s,a,c){this.A=t|0,this.B=r|0,this.C=o|0,this.D=n|0,this.E=i|0,this.F=s|0,this.G=a|0,this.H=c|0;}process(t,r){for(let d=0;d<16;d++,r+=4)Yi[d]=t.getUint32(r,false);for(let d=16;d<64;d++){let g=Yi[d-15],h=Yi[d-2],v=eo(g,7)^eo(g,18)^g>>>3,E=eo(h,17)^eo(h,19)^h>>>10;Yi[d]=E+Yi[d-7]+v+Yi[d-16]|0;}let{A:o,B:n,C:i,D:s,E:a,F:c,G:u,H:f}=this;for(let d=0;d<64;d++){let g=eo(a,6)^eo(a,11)^eo(a,25),h=f+g+FI(a,c,u)+PL[d]+Yi[d]|0,E=(eo(o,2)^eo(o,13)^eo(o,22))+HI(o,n,i)|0;f=u,u=c,c=a,a=s+h|0,s=i,i=n,n=o,o=h+E|0;}o=o+this.A|0,n=n+this.B|0,i=i+this.C|0,s=s+this.D|0,a=a+this.E|0,c=c+this.F|0,u=u+this.G|0,f=f+this.H|0,this.set(o,n,i,s,a,c,u,f);}roundClean(){Nn(Yi);}destroy(){this.set(0,0,0,0,0,0,0,0),Nn(this.buffer);}},rA=oh(["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(e=>BigInt(e))),BL=rA[0],CL=rA[1],Xi=new Uint32Array(80),Qi=new Uint32Array(80),Nw=class extends $l{constructor(t=64){super(128,t,16,false),this.Ah=pr[0]|0,this.Al=pr[1]|0,this.Bh=pr[2]|0,this.Bl=pr[3]|0,this.Ch=pr[4]|0,this.Cl=pr[5]|0,this.Dh=pr[6]|0,this.Dl=pr[7]|0,this.Eh=pr[8]|0,this.El=pr[9]|0,this.Fh=pr[10]|0,this.Fl=pr[11]|0,this.Gh=pr[12]|0,this.Gl=pr[13]|0,this.Hh=pr[14]|0,this.Hl=pr[15]|0;}get(){let{Ah:t,Al:r,Bh:o,Bl:n,Ch:i,Cl:s,Dh:a,Dl:c,Eh:u,El:f,Fh:d,Fl:g,Gh:h,Gl:v,Hh:E,Hl:R}=this;return [t,r,o,n,i,s,a,c,u,f,d,g,h,v,E,R]}set(t,r,o,n,i,s,a,c,u,f,d,g,h,v,E,R){this.Ah=t|0,this.Al=r|0,this.Bh=o|0,this.Bl=n|0,this.Ch=i|0,this.Cl=s|0,this.Dh=a|0,this.Dl=c|0,this.Eh=u|0,this.El=f|0,this.Fh=d|0,this.Fl=g|0,this.Gh=h|0,this.Gl=v|0,this.Hh=E|0,this.Hl=R|0;}process(t,r){for(let O=0;O<16;O++,r+=4)Xi[O]=t.getUint32(r),Qi[O]=t.getUint32(r+=4);for(let O=16;O<80;O++){let I=Xi[O-15]|0,P=Qi[O-15]|0,L=pa(I,P,1)^pa(I,P,8)^Tw(I,P,7),C=ma(I,P,1)^ma(I,P,8)^$w(I,P,7),D=Xi[O-2]|0,q=Qi[O-2]|0,H=pa(D,q,19)^Ol(D,q,61)^Tw(D,q,6),Z=ma(D,q,19)^Nl(D,q,61)^$w(D,q,6),re=XI(C,Z,Qi[O-7],Qi[O-16]),S=QI(re,L,H,Xi[O-7],Xi[O-16]);Xi[O]=S|0,Qi[O]=re|0;}let{Ah:o,Al:n,Bh:i,Bl:s,Ch:a,Cl:c,Dh:u,Dl:f,Eh:d,El:g,Fh:h,Fl:v,Gh:E,Gl:R,Hh:$,Hl:N}=this;for(let O=0;O<80;O++){let I=pa(d,g,14)^pa(d,g,18)^Ol(d,g,41),P=ma(d,g,14)^ma(d,g,18)^Nl(d,g,41),L=d&h^~d&E,C=g&v^~g&R,D=eA(N,P,C,CL[O],Qi[O]),q=tA(D,$,I,L,BL[O],Xi[O]),H=D|0,Z=pa(o,n,28)^Ol(o,n,34)^Ol(o,n,39),re=ma(o,n,28)^Nl(o,n,34)^Nl(o,n,39),S=o&i^o&a^i&a,l=n&s^n&c^s&c;$=E|0,N=R|0,E=h|0,R=v|0,h=d|0,v=g|0,{h:d,l:g}=ko(u|0,f|0,q|0,H|0),u=a|0,f=c|0,a=i|0,c=s|0,i=o|0,s=n|0;let m=JI(H,re,l);o=YI(m,q,Z,S),n=m|0;}(({h:o,l:n}=ko(this.Ah|0,this.Al|0,o|0,n|0))),{h:i,l:s}=ko(this.Bh|0,this.Bl|0,i|0,s|0),{h:a,l:c}=ko(this.Ch|0,this.Cl|0,a|0,c|0),{h:u,l:f}=ko(this.Dh|0,this.Dl|0,u|0,f|0),{h:d,l:g}=ko(this.Eh|0,this.El|0,d|0,g|0),{h,l:v}=ko(this.Fh|0,this.Fl|0,h|0,v|0),{h:E,l:R}=ko(this.Gh|0,this.Gl|0,E|0,R|0),{h:$,l:N}=ko(this.Hh|0,this.Hl|0,$|0,N|0),this.set(o,n,i,s,a,c,u,f,d,g,h,v,E,R,$,N);}roundClean(){Nn(Xi,Qi);}destroy(){Nn(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);}},ha=Tl(()=>new ih),nA=Tl(()=>new Nw);});function Lc(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function fi(e){if(!Lc(e))throw new Error("Uint8Array expected")}function Ro(e,t){if(typeof t!="boolean")throw new Error(e+" boolean expected, got "+t)}function Pl(e){let t=e.toString(16);return t.length&1?"0"+t:t}function sA(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?zw:BigInt("0x"+e)}function es(e){if(fi(e),aA)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=zL[e[r]];return t}function oA(e){if(e>=ui._0&&e<=ui._9)return e-ui._0;if(e>=ui.A&&e<=ui.F)return e-(ui.A-10);if(e>=ui.a&&e<=ui.f)return e-(ui.a-10)}function Bl(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(aA)return Uint8Array.fromHex(e);let t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);let o=new Uint8Array(r);for(let n=0,i=0;n<r;n++,i+=2){let s=oA(e.charCodeAt(i)),a=oA(e.charCodeAt(i+1));if(s===void 0||a===void 0){let c=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+i)}o[n]=s*16+a;}return o}function tn(e){return sA(es(e))}function ga(e){return fi(e),sA(es(Uint8Array.from(e).reverse()))}function To(e,t){return Bl(e.toString(16).padStart(t*2,"0"))}function Uc(e,t){return To(e,t).reverse()}function Ge(e,t,r){let o;if(typeof t=="string")try{o=Bl(t);}catch(i){throw new Error(e+" must be hex string or Uint8Array, cause: "+i)}else if(Lc(t))o=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");let n=o.length;if(typeof r=="number"&&n!==r)throw new Error(e+" of length "+r+" expected, got "+n);return o}function ar(...e){let t=0;for(let o=0;o<e.length;o++){let n=e[o];fi(n),t+=n.length;}let r=new Uint8Array(t);for(let o=0,n=0;o<e.length;o++){let i=e[o];r.set(i,n),n+=i.length;}return r}function ah(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function ya(e,t,r){return Pw(e)&&Pw(t)&&Pw(r)&&t<=e&&e<r}function Dr(e,t,r,o){if(!ya(t,r,o))throw new Error("expected valid "+e+": "+r+" <= n < "+o+", got "+t)}function cA(e){let t;for(t=0;e>zw;e>>=Cw,t+=1);return t}function uA(e,t,r){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let o=Bw(e),n=Bw(e),i=0,s=()=>{o.fill(1),n.fill(0),i=0;},a=(...d)=>r(n,o,...d),c=(d=Bw(0))=>{n=a(iA([0]),d),o=a(),d.length!==0&&(n=a(iA([1]),d),o=a());},u=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let d=0,g=[];for(;d<t;){o=a();let h=o.slice();g.push(h),d+=o.length;}return ar(...g)};return (d,g)=>{s(),c(d);let h;for(;!(h=g(u()));)c();return s(),h}}function to(e,t,r={}){let o=(n,i,s)=>{let a=LL[i];if(typeof a!="function")throw new Error("invalid validator function");let c=e[n];if(!(s&&c===void 0)&&!a(c,e))throw new Error("param "+String(n)+" is invalid. Expected "+i+", got "+c)};for(let[n,i]of Object.entries(t))o(n,i,false);for(let[n,i]of Object.entries(r))o(n,i,true);return e}function Mc(e){let t=new WeakMap;return (r,...o)=>{let n=t.get(r);if(n!==void 0)return n;let i=e(r,...o);return t.set(r,i),i}}var zw,Cw,aA,zL,ui,Pw,ba,Bw,iA,LL,xa=F(()=>{zw=BigInt(0),Cw=BigInt(1);aA=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",zL=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));ui={_0:48,_9:57,A:65,F:70,a:97,f:102};Pw=e=>typeof e=="bigint"&&zw<=e;ba=e=>(Cw<<BigInt(e))-Cw,Bw=e=>new Uint8Array(e),iA=e=>Uint8Array.from(e);LL={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||Lc(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};});function Le(e,t){let r=e%t;return r>=jr?r:t+r}function at(e,t,r){let o=e;for(;t-- >jr;)o*=o,o%=r;return o}function ch(e,t){if(e===jr)throw new Error("invert: expected non-zero number");if(t<=jr)throw new Error("invert: expected positive modulus, got "+t);let r=Le(e,t),o=t,n=jr,s=cr;for(;r!==jr;){let u=o/r,f=o%r,d=n-s*u;o=r,r=f,n=s,s=d;}if(o!==cr)throw new Error("invert: does not exist");return Le(n,t)}function mA(e,t){let r=(e.ORDER+cr)/lA,o=e.pow(t,r);if(!e.eql(e.sqr(o),t))throw new Error("Cannot find square root");return o}function ML(e,t){let r=(e.ORDER-dA)/pA,o=e.mul(t,va),n=e.pow(o,r),i=e.mul(t,n),s=e.mul(e.mul(i,va),n),a=e.mul(i,e.sub(s,e.ONE));if(!e.eql(e.sqr(a),t))throw new Error("Cannot find square root");return a}function DL(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-cr,r=0;for(;t%va===jr;)t/=va,r++;let o=va,n=di(e);for(;fA(n,o)===1;)if(o++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(r===1)return mA;let i=n.pow(o,t),s=(t+cr)/va;return function(c,u){if(c.is0(u))return u;if(fA(c,u)!==1)throw new Error("Cannot find square root");let f=r,d=c.mul(c.ONE,i),g=c.pow(u,t),h=c.pow(u,s);for(;!c.eql(g,c.ONE);){if(c.is0(g))return c.ZERO;let v=1,E=c.sqr(g);for(;!c.eql(E,c.ONE);)if(v++,E=c.sqr(E),v===f)throw new Error("Cannot find square root");let R=cr<<BigInt(f-v-1),$=c.pow(d,R);f=v,d=c.sqr($),g=c.mul(g,d),h=c.mul(h,$);}return h}}function jL(e){return e%lA===UL?mA:e%pA===dA?ML:DL(e)}function uh(e){let t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=FL.reduce((o,n)=>(o[n]="function",o),t);return to(e,r)}function HL(e,t,r){if(r<jr)throw new Error("invalid exponent, negatives unsupported");if(r===jr)return e.ONE;if(r===cr)return t;let o=e.ONE,n=t;for(;r>jr;)r&cr&&(o=e.mul(o,n)),n=e.sqr(n),r>>=cr;return o}function li(e,t,r=false){let o=new Array(t.length).fill(r?e.ZERO:void 0),n=t.reduce((s,a,c)=>e.is0(a)?s:(o[c]=s,e.mul(s,a)),e.ONE),i=e.inv(n);return t.reduceRight((s,a,c)=>e.is0(a)?s:(o[c]=e.mul(s,o[c]),e.mul(s,a)),i),o}function fA(e,t){let r=(e.ORDER-cr)/va,o=e.pow(t,r),n=e.eql(o,e.ONE),i=e.eql(o,e.ZERO),s=e.eql(o,e.neg(e.ONE));if(!n&&!i&&!s)throw new Error("invalid Legendre symbol result");return n?1:i?0:-1}function Lw(e,t){t!==void 0&&la(t);let r=t!==void 0?t:e.toString(2).length,o=Math.ceil(r/8);return {nBitLength:r,nByteLength:o}}function di(e,t,r=false,o={}){if(e<=jr)throw new Error("invalid field: expected ORDER > 0, got "+e);let{nBitLength:n,nByteLength:i}=Lw(e,t);if(i>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let s,a=Object.freeze({ORDER:e,isLE:r,BITS:n,BYTES:i,MASK:ba(n),ZERO:jr,ONE:cr,create:c=>Le(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof c);return jr<=c&&c<e},is0:c=>c===jr,isOdd:c=>(c&cr)===cr,neg:c=>Le(-c,e),eql:(c,u)=>c===u,sqr:c=>Le(c*c,e),add:(c,u)=>Le(c+u,e),sub:(c,u)=>Le(c-u,e),mul:(c,u)=>Le(c*u,e),pow:(c,u)=>HL(a,c,u),div:(c,u)=>Le(c*ch(u,e),e),sqrN:c=>c*c,addN:(c,u)=>c+u,subN:(c,u)=>c-u,mulN:(c,u)=>c*u,inv:c=>ch(c,e),sqrt:o.sqrt||(c=>(s||(s=jL(e)),s(a,c))),toBytes:c=>r?Uc(c,i):To(c,i),fromBytes:c=>{if(c.length!==i)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+c.length);return r?ga(c):tn(c)},invertBatch:c=>li(a,c),cmov:(c,u,f)=>f?u:c});return Object.freeze(a)}function gA(e){if(typeof e!="bigint")throw new Error("field order must be bigint");let t=e.toString(2).length;return Math.ceil(t/8)}function Uw(e){let t=gA(e);return t+Math.ceil(t/2)}function yA(e,t,r=false){let o=e.length,n=gA(t),i=Uw(t);if(o<16||o<i||o>1024)throw new Error("expected "+i+"-1024 bytes of input, got "+o);let s=r?ga(e):tn(e),a=Le(s,t-cr)+cr;return r?Uc(a,n):To(a,n)}var jr,cr,va,UL,lA,dA,pA,hA,FL,wa=F(()=>{ai();xa();jr=BigInt(0),cr=BigInt(1),va=BigInt(2),UL=BigInt(3),lA=BigInt(4),dA=BigInt(5),pA=BigInt(8);hA=(e,t)=>(Le(e,t)&cr)===cr,FL=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];});function Mw(e,t){let r=t.negate();return e?r:t}function vA(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function Dw(e,t){vA(e,t);let r=Math.ceil(t/e)+1,o=2**(e-1),n=2**e,i=ba(e),s=BigInt(e);return {windows:r,windowSize:o,mask:i,maxNumber:n,shiftBy:s}}function xA(e,t,r){let{windowSize:o,mask:n,maxNumber:i,shiftBy:s}=r,a=Number(e&n),c=e>>s;a>o&&(a-=i,c+=Hw);let u=t*o,f=u+Math.abs(a)-1,d=a===0,g=a<0,h=t%2!==0;return {nextN:c,offset:f,isZero:d,isNeg:g,isNegF:h,offsetF:u}}function VL(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((r,o)=>{if(!(r instanceof t))throw new Error("invalid point at index "+o)});}function ZL(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((r,o)=>{if(!t.isValid(r))throw new Error("invalid scalar at index "+o)});}function Fw(e){return wA.get(e)||1}function fh(e,t){return {constTimeNegate:Mw,hasPrecomputes(r){return Fw(r)!==1},unsafeLadder(r,o,n=e.ZERO){let i=r;for(;o>bA;)o&Hw&&(n=n.add(i)),i=i.double(),o>>=Hw;return n},precomputeWindow(r,o){let{windows:n,windowSize:i}=Dw(o,t),s=[],a=r,c=a;for(let u=0;u<n;u++){c=a,s.push(c);for(let f=1;f<i;f++)c=c.add(a),s.push(c);a=c.double();}return s},wNAF(r,o,n){let i=e.ZERO,s=e.BASE,a=Dw(r,t);for(let c=0;c<a.windows;c++){let{nextN:u,offset:f,isZero:d,isNeg:g,isNegF:h,offsetF:v}=xA(n,c,a);n=u,d?s=s.add(Mw(h,o[v])):i=i.add(Mw(g,o[f]));}return {p:i,f:s}},wNAFUnsafe(r,o,n,i=e.ZERO){let s=Dw(r,t);for(let a=0;a<s.windows&&n!==bA;a++){let{nextN:c,offset:u,isZero:f,isNeg:d}=xA(n,a,s);if(n=c,!f){let g=o[u];i=i.add(d?g.negate():g);}}return i},getPrecomputes(r,o,n){let i=jw.get(o);return i||(i=this.precomputeWindow(o,r),r!==1&&jw.set(o,n(i))),i},wNAFCached(r,o,n){let i=Fw(r);return this.wNAF(i,this.getPrecomputes(i,r,n),o)},wNAFCachedUnsafe(r,o,n,i){let s=Fw(r);return s===1?this.unsafeLadder(r,o,i):this.wNAFUnsafe(s,this.getPrecomputes(s,r,n),o,i)},setWindowSize(r,o){vA(o,t),wA.set(r,o),jw.delete(r);}}}function lh(e,t,r,o){VL(r,e),ZL(o,t);let n=r.length,i=o.length;if(n!==i)throw new Error("arrays of points and scalars must have equal length");let s=e.ZERO,a=cA(BigInt(n)),c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);let u=ba(c),f=new Array(Number(u)+1).fill(s),d=Math.floor((t.BITS-1)/c)*c,g=s;for(let h=d;h>=0;h-=c){f.fill(s);for(let E=0;E<i;E++){let R=o[E],$=Number(R>>BigInt(h)&u);f[$]=f[$].add(r[E]);}let v=s;for(let E=f.length-1,R=s;E>0;E--)R=R.add(f[E]),v=v.add(R);if(g=g.add(v),h!==0)for(let E=0;E<c;E++)g=g.double();}return g}function Cl(e){return uh(e.Fp),to(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Lw(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}var bA,Hw,jw,wA,Vw=F(()=>{wa();xa();bA=BigInt(0),Hw=BigInt(1);jw=new WeakMap,wA=new WeakMap;});function ts(e,t){if(zl(e),zl(t),e<0||e>=1<<8*t)throw new Error("invalid I2OSP input: "+e);let r=Array.from({length:t}).fill(0);for(let o=t-1;o>=0;o--)r[o]=e&255,e>>>=8;return new Uint8Array(r)}function JL(e,t){let r=new Uint8Array(e.length);for(let o=0;o<e.length;o++)r[o]=e[o]^t[o];return r}function zl(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function YL(e,t,r,o){fi(e),fi(t),zl(r),t.length>255&&(t=o(ar(ah("H2C-OVERSIZE-DST-"),t)));let{outputLen:n,blockLen:i}=o,s=Math.ceil(r/n);if(r>65535||s>255)throw new Error("expand_message_xmd: invalid lenInBytes");let a=ar(t,ts(t.length,1)),c=ts(0,i),u=ts(r,2),f=new Array(s),d=o(ar(c,e,u,ts(0,1),a));f[0]=o(ar(d,ts(1,1),a));for(let h=1;h<=s;h++){let v=[JL(d,f[h-1]),ts(h+1,1),a];f[h]=o(ar(...v));}return ar(...f).slice(0,r)}function XL(e,t,r,o,n){if(fi(e),fi(t),zl(r),t.length>255){let i=Math.ceil(2*o/8);t=n.create({dkLen:i}).update(ah("H2C-OVERSIZE-DST-")).update(t).digest();}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return n.create({dkLen:r}).update(e).update(ts(r,2)).update(t).update(ts(t.length,1)).digest()}function SA(e,t,r){to(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});let{p:o,k:n,m:i,hash:s,expand:a,DST:c}=r;fi(e),zl(t);let u=typeof c=="string"?ah(c):c,f=o.toString(2).length,d=Math.ceil((f+n)/8),g=t*i*d,h;if(a==="xmd")h=YL(e,u,g,s);else if(a==="xof")h=XL(e,u,g,n,s);else if(a==="_internal_pass")h=e;else throw new Error('expand must be "xmd" or "xof"');let v=new Array(t);for(let E=0;E<t;E++){let R=new Array(i);for(let $=0;$<i;$++){let N=d*($+E*i),O=h.subarray(N,N+d);R[$]=Le(KL(O),o);}v[E]=R;}return v}function IA(e,t){let r=t.map(o=>Array.from(o).reverse());return (o,n)=>{let[i,s,a,c]=r.map(d=>d.reduce((g,h)=>e.add(e.mul(g,o),h))),[u,f]=li(e,[s,c],true);return o=e.mul(i,u),n=e.mul(n,e.mul(a,f)),{x:o,y:n}}}function AA(e,t,r){if(typeof t!="function")throw new Error("mapToCurve() must be defined");function o(i){return e.fromAffine(t(i))}function n(i){let s=i.clearCofactor();return s.equals(e.ZERO)?e.ZERO:(s.assertValidity(),s)}return {defaults:r,hashToCurve(i,s){let a=SA(i,2,{...r,DST:r.DST,...s}),c=o(a[0]),u=o(a[1]);return n(c.add(u))},encodeToCurve(i,s){let a=SA(i,1,{...r,DST:r.encodeDST,...s});return n(o(a[0]))},mapToCurve(i){if(!Array.isArray(i))throw new Error("expected array of bigints");for(let s of i)if(typeof s!="bigint")throw new Error("expected array of bigints");return n(o(i))}}}var KL,kA=F(()=>{wa();xa();KL=tn;});var OA=Wr(()=>{});var qw=Wr((NA,Gw)=>{(function(e,t){function r(S,l){if(!S)throw new Error(l||"Assertion failed")}function o(S,l){S.super_=l;var m=function(){};m.prototype=l.prototype,S.prototype=new m,S.prototype.constructor=S;}function n(S,l,m){if(n.isBN(S))return S;this.negative=0,this.words=null,this.length=0,this.red=null,S!==null&&((l==="le"||l==="be")&&(m=l,l=10),this._init(S||0,l||10,m||"be"));}typeof e=="object"?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;var i;try{typeof window<"u"&&typeof window.Buffer<"u"?i=window.Buffer:i=OA().Buffer;}catch{}n.isBN=function(l){return l instanceof n?true:l!==null&&typeof l=="object"&&l.constructor.wordSize===n.wordSize&&Array.isArray(l.words)},n.max=function(l,m){return l.cmp(m)>0?l:m},n.min=function(l,m){return l.cmp(m)<0?l:m},n.prototype._init=function(l,m,y){if(typeof l=="number")return this._initNumber(l,m,y);if(typeof l=="object")return this._initArray(l,m,y);m==="hex"&&(m=16),r(m===(m|0)&&m>=2&&m<=36),l=l.toString().replace(/\s+/g,"");var b=0;l[0]==="-"&&(b++,this.negative=1),b<l.length&&(m===16?this._parseHex(l,b,y):(this._parseBase(l,m,b),y==="le"&&this._initArray(this.toArray(),m,y)));},n.prototype._initNumber=function(l,m,y){l<0&&(this.negative=1,l=-l),l<67108864?(this.words=[l&67108863],this.length=1):l<4503599627370496?(this.words=[l&67108863,l/67108864&67108863],this.length=2):(r(l<9007199254740992),this.words=[l&67108863,l/67108864&67108863,1],this.length=3),y==="le"&&this._initArray(this.toArray(),m,y);},n.prototype._initArray=function(l,m,y){if(r(typeof l.length=="number"),l.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(l.length/3),this.words=new Array(this.length);for(var b=0;b<this.length;b++)this.words[b]=0;var x,_,k=0;if(y==="be")for(b=l.length-1,x=0;b>=0;b-=3)_=l[b]|l[b-1]<<8|l[b-2]<<16,this.words[x]|=_<<k&67108863,this.words[x+1]=_>>>26-k&67108863,k+=24,k>=26&&(k-=26,x++);else if(y==="le")for(b=0,x=0;b<l.length;b+=3)_=l[b]|l[b+1]<<8|l[b+2]<<16,this.words[x]|=_<<k&67108863,this.words[x+1]=_>>>26-k&67108863,k+=24,k>=26&&(k-=26,x++);return this._strip()};function s(S,l){var m=S.charCodeAt(l);if(m>=48&&m<=57)return m-48;if(m>=65&&m<=70)return m-55;if(m>=97&&m<=102)return m-87;r(false,"Invalid character in "+S);}function a(S,l,m){var y=s(S,m);return m-1>=l&&(y|=s(S,m-1)<<4),y}n.prototype._parseHex=function(l,m,y){this.length=Math.ceil((l.length-m)/6),this.words=new Array(this.length);for(var b=0;b<this.length;b++)this.words[b]=0;var x=0,_=0,k;if(y==="be")for(b=l.length-1;b>=m;b-=2)k=a(l,m,b)<<x,this.words[_]|=k&67108863,x>=18?(x-=18,_+=1,this.words[_]|=k>>>26):x+=8;else {var w=l.length-m;for(b=w%2===0?m+1:m;b<l.length;b+=2)k=a(l,m,b)<<x,this.words[_]|=k&67108863,x>=18?(x-=18,_+=1,this.words[_]|=k>>>26):x+=8;}this._strip();};function c(S,l,m,y){for(var b=0,x=0,_=Math.min(S.length,m),k=l;k<_;k++){var w=S.charCodeAt(k)-48;b*=y,w>=49?x=w-49+10:w>=17?x=w-17+10:x=w,r(w>=0&&x<y,"Invalid character"),b+=x;}return b}n.prototype._parseBase=function(l,m,y){this.words=[0],this.length=1;for(var b=0,x=1;x<=67108863;x*=m)b++;b--,x=x/m|0;for(var _=l.length-y,k=_%b,w=Math.min(_,_-k)+y,p=0,A=y;A<w;A+=b)p=c(l,A,A+b,m),this.imuln(x),this.words[0]+p<67108864?this.words[0]+=p:this._iaddn(p);if(k!==0){var G=1;for(p=c(l,A,l.length,m),A=0;A<k;A++)G*=m;this.imuln(G),this.words[0]+p<67108864?this.words[0]+=p:this._iaddn(p);}this._strip();},n.prototype.copy=function(l){l.words=new Array(this.length);for(var m=0;m<this.length;m++)l.words[m]=this.words[m];l.length=this.length,l.negative=this.negative,l.red=this.red;};function u(S,l){S.words=l.words,S.length=l.length,S.negative=l.negative,S.red=l.red;}if(n.prototype._move=function(l){u(l,this);},n.prototype.clone=function(){var l=new n(null);return this.copy(l),l},n.prototype._expand=function(l){for(;this.length<l;)this.words[this.length++]=0;return this},n.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=f;}catch{n.prototype.inspect=f;}else n.prototype.inspect=f;function f(){return (this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],g=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(l,m){l=l||10,m=m|0||1;var y;if(l===16||l==="hex"){y="";for(var b=0,x=0,_=0;_<this.length;_++){var k=this.words[_],w=((k<<b|x)&16777215).toString(16);x=k>>>24-b&16777215,b+=2,b>=26&&(b-=26,_--),x!==0||_!==this.length-1?y=d[6-w.length]+w+y:y=w+y;}for(x!==0&&(y=x.toString(16)+y);y.length%m!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}if(l===(l|0)&&l>=2&&l<=36){var p=g[l],A=h[l];y="";var G=this.clone();for(G.negative=0;!G.isZero();){var K=G.modrn(A).toString(l);G=G.idivn(A),G.isZero()?y=K+y:y=d[p-K.length]+K+y;}for(this.isZero()&&(y="0"+y);y.length%m!==0;)y="0"+y;return this.negative!==0&&(y="-"+y),y}r(false,"Base should be between 2 and 36");},n.prototype.toNumber=function(){var l=this.words[0];return this.length===2?l+=this.words[1]*67108864:this.length===3&&this.words[2]===1?l+=4503599627370496+this.words[1]*67108864:this.length>2&&r(false,"Number can only safely store up to 53 bits"),this.negative!==0?-l:l},n.prototype.toJSON=function(){return this.toString(16,2)},i&&(n.prototype.toBuffer=function(l,m){return this.toArrayLike(i,l,m)}),n.prototype.toArray=function(l,m){return this.toArrayLike(Array,l,m)};var v=function(l,m){return l.allocUnsafe?l.allocUnsafe(m):new l(m)};n.prototype.toArrayLike=function(l,m,y){this._strip();var b=this.byteLength(),x=y||Math.max(1,b);r(b<=x,"byte array longer than desired length"),r(x>0,"Requested array length <= 0");var _=v(l,x),k=m==="le"?"LE":"BE";return this["_toArrayLike"+k](_,b),_},n.prototype._toArrayLikeLE=function(l,m){for(var y=0,b=0,x=0,_=0;x<this.length;x++){var k=this.words[x]<<_|b;l[y++]=k&255,y<l.length&&(l[y++]=k>>8&255),y<l.length&&(l[y++]=k>>16&255),_===6?(y<l.length&&(l[y++]=k>>24&255),b=0,_=0):(b=k>>>24,_+=2);}if(y<l.length)for(l[y++]=b;y<l.length;)l[y++]=0;},n.prototype._toArrayLikeBE=function(l,m){for(var y=l.length-1,b=0,x=0,_=0;x<this.length;x++){var k=this.words[x]<<_|b;l[y--]=k&255,y>=0&&(l[y--]=k>>8&255),y>=0&&(l[y--]=k>>16&255),_===6?(y>=0&&(l[y--]=k>>24&255),b=0,_=0):(b=k>>>24,_+=2);}if(y>=0)for(l[y--]=b;y>=0;)l[y--]=0;},Math.clz32?n.prototype._countBits=function(l){return 32-Math.clz32(l)}:n.prototype._countBits=function(l){var m=l,y=0;return m>=4096&&(y+=13,m>>>=13),m>=64&&(y+=7,m>>>=7),m>=8&&(y+=4,m>>>=4),m>=2&&(y+=2,m>>>=2),y+m},n.prototype._zeroBits=function(l){if(l===0)return 26;var m=l,y=0;return (m&8191)===0&&(y+=13,m>>>=13),(m&127)===0&&(y+=7,m>>>=7),(m&15)===0&&(y+=4,m>>>=4),(m&3)===0&&(y+=2,m>>>=2),(m&1)===0&&y++,y},n.prototype.bitLength=function(){var l=this.words[this.length-1],m=this._countBits(l);return (this.length-1)*26+m};function E(S){for(var l=new Array(S.bitLength()),m=0;m<l.length;m++){var y=m/26|0,b=m%26;l[m]=S.words[y]>>>b&1;}return l}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var l=0,m=0;m<this.length;m++){var y=this._zeroBits(this.words[m]);if(l+=y,y!==26)break}return l},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(l){return this.negative!==0?this.abs().inotn(l).iaddn(1):this.clone()},n.prototype.fromTwos=function(l){return this.testn(l-1)?this.notn(l).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(l){for(;this.length<l.length;)this.words[this.length++]=0;for(var m=0;m<l.length;m++)this.words[m]=this.words[m]|l.words[m];return this._strip()},n.prototype.ior=function(l){return r((this.negative|l.negative)===0),this.iuor(l)},n.prototype.or=function(l){return this.length>l.length?this.clone().ior(l):l.clone().ior(this)},n.prototype.uor=function(l){return this.length>l.length?this.clone().iuor(l):l.clone().iuor(this)},n.prototype.iuand=function(l){var m;this.length>l.length?m=l:m=this;for(var y=0;y<m.length;y++)this.words[y]=this.words[y]&l.words[y];return this.length=m.length,this._strip()},n.prototype.iand=function(l){return r((this.negative|l.negative)===0),this.iuand(l)},n.prototype.and=function(l){return this.length>l.length?this.clone().iand(l):l.clone().iand(this)},n.prototype.uand=function(l){return this.length>l.length?this.clone().iuand(l):l.clone().iuand(this)},n.prototype.iuxor=function(l){var m,y;this.length>l.length?(m=this,y=l):(m=l,y=this);for(var b=0;b<y.length;b++)this.words[b]=m.words[b]^y.words[b];if(this!==m)for(;b<m.length;b++)this.words[b]=m.words[b];return this.length=m.length,this._strip()},n.prototype.ixor=function(l){return r((this.negative|l.negative)===0),this.iuxor(l)},n.prototype.xor=function(l){return this.length>l.length?this.clone().ixor(l):l.clone().ixor(this)},n.prototype.uxor=function(l){return this.length>l.length?this.clone().iuxor(l):l.clone().iuxor(this)},n.prototype.inotn=function(l){r(typeof l=="number"&&l>=0);var m=Math.ceil(l/26)|0,y=l%26;this._expand(m),y>0&&m--;for(var b=0;b<m;b++)this.words[b]=~this.words[b]&67108863;for(y>0&&(this.words[b]=~this.words[b]&67108863>>26-y,b++);b<this.length;b++)this.words[b]=0;return this._strip()},n.prototype.notn=function(l){return this.clone().inotn(l)},n.prototype.setn=function(l,m){r(typeof l=="number"&&l>=0);var y=l/26|0,b=l%26;return this._expand(y+1),m?this.words[y]=this.words[y]|1<<b:this.words[y]=this.words[y]&~(1<<b),this._strip()},n.prototype.iadd=function(l){var m;if(this.negative!==0&&l.negative===0)return this.negative=0,m=this.isub(l),this.negative^=1,this._normSign();if(this.negative===0&&l.negative!==0)return l.negative=0,m=this.isub(l),l.negative=1,m._normSign();var y,b;this.length>l.length?(y=this,b=l):(y=l,b=this);for(var x=0,_=0;_<b.length;_++)m=(y.words[_]|0)+(b.words[_]|0)+x,this.words[_]=m&67108863,x=m>>>26;for(;x!==0&&_<y.length;_++)m=(y.words[_]|0)+x,this.words[_]=m&67108863,x=m>>>26;if(this.length=y.length,x!==0)this.words[this.length]=x,this.length++;else if(y!==this)for(;_<y.length;_++)this.words[_]=y.words[_];return this},n.prototype.add=function(l){var m;return l.negative!==0&&this.negative===0?(l.negative=0,m=this.sub(l),l.negative^=1,m):l.negative===0&&this.negative!==0?(this.negative=0,m=l.sub(this),this.negative=1,m):this.length>l.length?this.clone().iadd(l):l.clone().iadd(this)},n.prototype.isub=function(l){if(l.negative!==0){l.negative=0;var m=this.iadd(l);return l.negative=1,m._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(l),this.negative=1,this._normSign();var y=this.cmp(l);if(y===0)return this.negative=0,this.length=1,this.words[0]=0,this;var b,x;y>0?(b=this,x=l):(b=l,x=this);for(var _=0,k=0;k<x.length;k++)m=(b.words[k]|0)-(x.words[k]|0)+_,_=m>>26,this.words[k]=m&67108863;for(;_!==0&&k<b.length;k++)m=(b.words[k]|0)+_,_=m>>26,this.words[k]=m&67108863;if(_===0&&k<b.length&&b!==this)for(;k<b.length;k++)this.words[k]=b.words[k];return this.length=Math.max(this.length,k),b!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(l){return this.clone().isub(l)};function R(S,l,m){m.negative=l.negative^S.negative;var y=S.length+l.length|0;m.length=y,y=y-1|0;var b=S.words[0]|0,x=l.words[0]|0,_=b*x,k=_&67108863,w=_/67108864|0;m.words[0]=k;for(var p=1;p<y;p++){for(var A=w>>>26,G=w&67108863,K=Math.min(p,l.length-1),Q=Math.max(0,p-S.length+1);Q<=K;Q++){var ae=p-Q|0;b=S.words[ae]|0,x=l.words[Q]|0,_=b*x+G,A+=_/67108864|0,G=_&67108863;}m.words[p]=G|0,w=A|0;}return w!==0?m.words[p]=w|0:m.length--,m._strip()}var $=function(l,m,y){var b=l.words,x=m.words,_=y.words,k=0,w,p,A,G=b[0]|0,K=G&8191,Q=G>>>13,ae=b[1]|0,he=ae&8191,ye=ae>>>13,We=b[2]|0,Se=We&8191,_e=We>>>13,tr=b[3]|0,Ce=tr&8191,je=tr>>>13,Li=b[4]|0,pt=Li&8191,gt=Li>>>13,Bp=b[5]|0,yt=Bp&8191,bt=Bp>>>13,AE=b[6]|0,At=AE&8191,kt=AE>>>13,kE=b[7]|0,Rt=kE&8191,Tt=kE>>>13,RE=b[8]|0,$t=RE&8191,Ot=RE>>>13,TE=b[9]|0,Nt=TE&8191,Pt=TE>>>13,$E=x[0]|0,Bt=$E&8191,Ct=$E>>>13,OE=x[1]|0,zt=OE&8191,Lt=OE>>>13,NE=x[2]|0,Ut=NE&8191,Mt=NE>>>13,PE=x[3]|0,Dt=PE&8191,jt=PE>>>13,BE=x[4]|0,Ft=BE&8191,Ht=BE>>>13,CE=x[5]|0,Vt=CE&8191,Zt=CE>>>13,zE=x[6]|0,Gt=zE&8191,qt=zE>>>13,LE=x[7]|0,Wt=LE&8191,Kt=LE>>>13,UE=x[8]|0,Jt=UE&8191,Yt=UE>>>13,ME=x[9]|0,Xt=ME&8191,Qt=ME>>>13;y.negative=l.negative^m.negative,y.length=19,w=Math.imul(K,Bt),p=Math.imul(K,Ct),p=p+Math.imul(Q,Bt)|0,A=Math.imul(Q,Ct);var jy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(jy>>>26)|0,jy&=67108863,w=Math.imul(he,Bt),p=Math.imul(he,Ct),p=p+Math.imul(ye,Bt)|0,A=Math.imul(ye,Ct),w=w+Math.imul(K,zt)|0,p=p+Math.imul(K,Lt)|0,p=p+Math.imul(Q,zt)|0,A=A+Math.imul(Q,Lt)|0;var Fy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Fy>>>26)|0,Fy&=67108863,w=Math.imul(Se,Bt),p=Math.imul(Se,Ct),p=p+Math.imul(_e,Bt)|0,A=Math.imul(_e,Ct),w=w+Math.imul(he,zt)|0,p=p+Math.imul(he,Lt)|0,p=p+Math.imul(ye,zt)|0,A=A+Math.imul(ye,Lt)|0,w=w+Math.imul(K,Ut)|0,p=p+Math.imul(K,Mt)|0,p=p+Math.imul(Q,Ut)|0,A=A+Math.imul(Q,Mt)|0;var Hy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Hy>>>26)|0,Hy&=67108863,w=Math.imul(Ce,Bt),p=Math.imul(Ce,Ct),p=p+Math.imul(je,Bt)|0,A=Math.imul(je,Ct),w=w+Math.imul(Se,zt)|0,p=p+Math.imul(Se,Lt)|0,p=p+Math.imul(_e,zt)|0,A=A+Math.imul(_e,Lt)|0,w=w+Math.imul(he,Ut)|0,p=p+Math.imul(he,Mt)|0,p=p+Math.imul(ye,Ut)|0,A=A+Math.imul(ye,Mt)|0,w=w+Math.imul(K,Dt)|0,p=p+Math.imul(K,jt)|0,p=p+Math.imul(Q,Dt)|0,A=A+Math.imul(Q,jt)|0;var Vy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Vy>>>26)|0,Vy&=67108863,w=Math.imul(pt,Bt),p=Math.imul(pt,Ct),p=p+Math.imul(gt,Bt)|0,A=Math.imul(gt,Ct),w=w+Math.imul(Ce,zt)|0,p=p+Math.imul(Ce,Lt)|0,p=p+Math.imul(je,zt)|0,A=A+Math.imul(je,Lt)|0,w=w+Math.imul(Se,Ut)|0,p=p+Math.imul(Se,Mt)|0,p=p+Math.imul(_e,Ut)|0,A=A+Math.imul(_e,Mt)|0,w=w+Math.imul(he,Dt)|0,p=p+Math.imul(he,jt)|0,p=p+Math.imul(ye,Dt)|0,A=A+Math.imul(ye,jt)|0,w=w+Math.imul(K,Ft)|0,p=p+Math.imul(K,Ht)|0,p=p+Math.imul(Q,Ft)|0,A=A+Math.imul(Q,Ht)|0;var Zy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Zy>>>26)|0,Zy&=67108863,w=Math.imul(yt,Bt),p=Math.imul(yt,Ct),p=p+Math.imul(bt,Bt)|0,A=Math.imul(bt,Ct),w=w+Math.imul(pt,zt)|0,p=p+Math.imul(pt,Lt)|0,p=p+Math.imul(gt,zt)|0,A=A+Math.imul(gt,Lt)|0,w=w+Math.imul(Ce,Ut)|0,p=p+Math.imul(Ce,Mt)|0,p=p+Math.imul(je,Ut)|0,A=A+Math.imul(je,Mt)|0,w=w+Math.imul(Se,Dt)|0,p=p+Math.imul(Se,jt)|0,p=p+Math.imul(_e,Dt)|0,A=A+Math.imul(_e,jt)|0,w=w+Math.imul(he,Ft)|0,p=p+Math.imul(he,Ht)|0,p=p+Math.imul(ye,Ft)|0,A=A+Math.imul(ye,Ht)|0,w=w+Math.imul(K,Vt)|0,p=p+Math.imul(K,Zt)|0,p=p+Math.imul(Q,Vt)|0,A=A+Math.imul(Q,Zt)|0;var Gy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Gy>>>26)|0,Gy&=67108863,w=Math.imul(At,Bt),p=Math.imul(At,Ct),p=p+Math.imul(kt,Bt)|0,A=Math.imul(kt,Ct),w=w+Math.imul(yt,zt)|0,p=p+Math.imul(yt,Lt)|0,p=p+Math.imul(bt,zt)|0,A=A+Math.imul(bt,Lt)|0,w=w+Math.imul(pt,Ut)|0,p=p+Math.imul(pt,Mt)|0,p=p+Math.imul(gt,Ut)|0,A=A+Math.imul(gt,Mt)|0,w=w+Math.imul(Ce,Dt)|0,p=p+Math.imul(Ce,jt)|0,p=p+Math.imul(je,Dt)|0,A=A+Math.imul(je,jt)|0,w=w+Math.imul(Se,Ft)|0,p=p+Math.imul(Se,Ht)|0,p=p+Math.imul(_e,Ft)|0,A=A+Math.imul(_e,Ht)|0,w=w+Math.imul(he,Vt)|0,p=p+Math.imul(he,Zt)|0,p=p+Math.imul(ye,Vt)|0,A=A+Math.imul(ye,Zt)|0,w=w+Math.imul(K,Gt)|0,p=p+Math.imul(K,qt)|0,p=p+Math.imul(Q,Gt)|0,A=A+Math.imul(Q,qt)|0;var qy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(qy>>>26)|0,qy&=67108863,w=Math.imul(Rt,Bt),p=Math.imul(Rt,Ct),p=p+Math.imul(Tt,Bt)|0,A=Math.imul(Tt,Ct),w=w+Math.imul(At,zt)|0,p=p+Math.imul(At,Lt)|0,p=p+Math.imul(kt,zt)|0,A=A+Math.imul(kt,Lt)|0,w=w+Math.imul(yt,Ut)|0,p=p+Math.imul(yt,Mt)|0,p=p+Math.imul(bt,Ut)|0,A=A+Math.imul(bt,Mt)|0,w=w+Math.imul(pt,Dt)|0,p=p+Math.imul(pt,jt)|0,p=p+Math.imul(gt,Dt)|0,A=A+Math.imul(gt,jt)|0,w=w+Math.imul(Ce,Ft)|0,p=p+Math.imul(Ce,Ht)|0,p=p+Math.imul(je,Ft)|0,A=A+Math.imul(je,Ht)|0,w=w+Math.imul(Se,Vt)|0,p=p+Math.imul(Se,Zt)|0,p=p+Math.imul(_e,Vt)|0,A=A+Math.imul(_e,Zt)|0,w=w+Math.imul(he,Gt)|0,p=p+Math.imul(he,qt)|0,p=p+Math.imul(ye,Gt)|0,A=A+Math.imul(ye,qt)|0,w=w+Math.imul(K,Wt)|0,p=p+Math.imul(K,Kt)|0,p=p+Math.imul(Q,Wt)|0,A=A+Math.imul(Q,Kt)|0;var Wy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Wy>>>26)|0,Wy&=67108863,w=Math.imul($t,Bt),p=Math.imul($t,Ct),p=p+Math.imul(Ot,Bt)|0,A=Math.imul(Ot,Ct),w=w+Math.imul(Rt,zt)|0,p=p+Math.imul(Rt,Lt)|0,p=p+Math.imul(Tt,zt)|0,A=A+Math.imul(Tt,Lt)|0,w=w+Math.imul(At,Ut)|0,p=p+Math.imul(At,Mt)|0,p=p+Math.imul(kt,Ut)|0,A=A+Math.imul(kt,Mt)|0,w=w+Math.imul(yt,Dt)|0,p=p+Math.imul(yt,jt)|0,p=p+Math.imul(bt,Dt)|0,A=A+Math.imul(bt,jt)|0,w=w+Math.imul(pt,Ft)|0,p=p+Math.imul(pt,Ht)|0,p=p+Math.imul(gt,Ft)|0,A=A+Math.imul(gt,Ht)|0,w=w+Math.imul(Ce,Vt)|0,p=p+Math.imul(Ce,Zt)|0,p=p+Math.imul(je,Vt)|0,A=A+Math.imul(je,Zt)|0,w=w+Math.imul(Se,Gt)|0,p=p+Math.imul(Se,qt)|0,p=p+Math.imul(_e,Gt)|0,A=A+Math.imul(_e,qt)|0,w=w+Math.imul(he,Wt)|0,p=p+Math.imul(he,Kt)|0,p=p+Math.imul(ye,Wt)|0,A=A+Math.imul(ye,Kt)|0,w=w+Math.imul(K,Jt)|0,p=p+Math.imul(K,Yt)|0,p=p+Math.imul(Q,Jt)|0,A=A+Math.imul(Q,Yt)|0;var Ky=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Ky>>>26)|0,Ky&=67108863,w=Math.imul(Nt,Bt),p=Math.imul(Nt,Ct),p=p+Math.imul(Pt,Bt)|0,A=Math.imul(Pt,Ct),w=w+Math.imul($t,zt)|0,p=p+Math.imul($t,Lt)|0,p=p+Math.imul(Ot,zt)|0,A=A+Math.imul(Ot,Lt)|0,w=w+Math.imul(Rt,Ut)|0,p=p+Math.imul(Rt,Mt)|0,p=p+Math.imul(Tt,Ut)|0,A=A+Math.imul(Tt,Mt)|0,w=w+Math.imul(At,Dt)|0,p=p+Math.imul(At,jt)|0,p=p+Math.imul(kt,Dt)|0,A=A+Math.imul(kt,jt)|0,w=w+Math.imul(yt,Ft)|0,p=p+Math.imul(yt,Ht)|0,p=p+Math.imul(bt,Ft)|0,A=A+Math.imul(bt,Ht)|0,w=w+Math.imul(pt,Vt)|0,p=p+Math.imul(pt,Zt)|0,p=p+Math.imul(gt,Vt)|0,A=A+Math.imul(gt,Zt)|0,w=w+Math.imul(Ce,Gt)|0,p=p+Math.imul(Ce,qt)|0,p=p+Math.imul(je,Gt)|0,A=A+Math.imul(je,qt)|0,w=w+Math.imul(Se,Wt)|0,p=p+Math.imul(Se,Kt)|0,p=p+Math.imul(_e,Wt)|0,A=A+Math.imul(_e,Kt)|0,w=w+Math.imul(he,Jt)|0,p=p+Math.imul(he,Yt)|0,p=p+Math.imul(ye,Jt)|0,A=A+Math.imul(ye,Yt)|0,w=w+Math.imul(K,Xt)|0,p=p+Math.imul(K,Qt)|0,p=p+Math.imul(Q,Xt)|0,A=A+Math.imul(Q,Qt)|0;var Jy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Jy>>>26)|0,Jy&=67108863,w=Math.imul(Nt,zt),p=Math.imul(Nt,Lt),p=p+Math.imul(Pt,zt)|0,A=Math.imul(Pt,Lt),w=w+Math.imul($t,Ut)|0,p=p+Math.imul($t,Mt)|0,p=p+Math.imul(Ot,Ut)|0,A=A+Math.imul(Ot,Mt)|0,w=w+Math.imul(Rt,Dt)|0,p=p+Math.imul(Rt,jt)|0,p=p+Math.imul(Tt,Dt)|0,A=A+Math.imul(Tt,jt)|0,w=w+Math.imul(At,Ft)|0,p=p+Math.imul(At,Ht)|0,p=p+Math.imul(kt,Ft)|0,A=A+Math.imul(kt,Ht)|0,w=w+Math.imul(yt,Vt)|0,p=p+Math.imul(yt,Zt)|0,p=p+Math.imul(bt,Vt)|0,A=A+Math.imul(bt,Zt)|0,w=w+Math.imul(pt,Gt)|0,p=p+Math.imul(pt,qt)|0,p=p+Math.imul(gt,Gt)|0,A=A+Math.imul(gt,qt)|0,w=w+Math.imul(Ce,Wt)|0,p=p+Math.imul(Ce,Kt)|0,p=p+Math.imul(je,Wt)|0,A=A+Math.imul(je,Kt)|0,w=w+Math.imul(Se,Jt)|0,p=p+Math.imul(Se,Yt)|0,p=p+Math.imul(_e,Jt)|0,A=A+Math.imul(_e,Yt)|0,w=w+Math.imul(he,Xt)|0,p=p+Math.imul(he,Qt)|0,p=p+Math.imul(ye,Xt)|0,A=A+Math.imul(ye,Qt)|0;var Yy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Yy>>>26)|0,Yy&=67108863,w=Math.imul(Nt,Ut),p=Math.imul(Nt,Mt),p=p+Math.imul(Pt,Ut)|0,A=Math.imul(Pt,Mt),w=w+Math.imul($t,Dt)|0,p=p+Math.imul($t,jt)|0,p=p+Math.imul(Ot,Dt)|0,A=A+Math.imul(Ot,jt)|0,w=w+Math.imul(Rt,Ft)|0,p=p+Math.imul(Rt,Ht)|0,p=p+Math.imul(Tt,Ft)|0,A=A+Math.imul(Tt,Ht)|0,w=w+Math.imul(At,Vt)|0,p=p+Math.imul(At,Zt)|0,p=p+Math.imul(kt,Vt)|0,A=A+Math.imul(kt,Zt)|0,w=w+Math.imul(yt,Gt)|0,p=p+Math.imul(yt,qt)|0,p=p+Math.imul(bt,Gt)|0,A=A+Math.imul(bt,qt)|0,w=w+Math.imul(pt,Wt)|0,p=p+Math.imul(pt,Kt)|0,p=p+Math.imul(gt,Wt)|0,A=A+Math.imul(gt,Kt)|0,w=w+Math.imul(Ce,Jt)|0,p=p+Math.imul(Ce,Yt)|0,p=p+Math.imul(je,Jt)|0,A=A+Math.imul(je,Yt)|0,w=w+Math.imul(Se,Xt)|0,p=p+Math.imul(Se,Qt)|0,p=p+Math.imul(_e,Xt)|0,A=A+Math.imul(_e,Qt)|0;var Xy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Xy>>>26)|0,Xy&=67108863,w=Math.imul(Nt,Dt),p=Math.imul(Nt,jt),p=p+Math.imul(Pt,Dt)|0,A=Math.imul(Pt,jt),w=w+Math.imul($t,Ft)|0,p=p+Math.imul($t,Ht)|0,p=p+Math.imul(Ot,Ft)|0,A=A+Math.imul(Ot,Ht)|0,w=w+Math.imul(Rt,Vt)|0,p=p+Math.imul(Rt,Zt)|0,p=p+Math.imul(Tt,Vt)|0,A=A+Math.imul(Tt,Zt)|0,w=w+Math.imul(At,Gt)|0,p=p+Math.imul(At,qt)|0,p=p+Math.imul(kt,Gt)|0,A=A+Math.imul(kt,qt)|0,w=w+Math.imul(yt,Wt)|0,p=p+Math.imul(yt,Kt)|0,p=p+Math.imul(bt,Wt)|0,A=A+Math.imul(bt,Kt)|0,w=w+Math.imul(pt,Jt)|0,p=p+Math.imul(pt,Yt)|0,p=p+Math.imul(gt,Jt)|0,A=A+Math.imul(gt,Yt)|0,w=w+Math.imul(Ce,Xt)|0,p=p+Math.imul(Ce,Qt)|0,p=p+Math.imul(je,Xt)|0,A=A+Math.imul(je,Qt)|0;var Qy=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(Qy>>>26)|0,Qy&=67108863,w=Math.imul(Nt,Ft),p=Math.imul(Nt,Ht),p=p+Math.imul(Pt,Ft)|0,A=Math.imul(Pt,Ht),w=w+Math.imul($t,Vt)|0,p=p+Math.imul($t,Zt)|0,p=p+Math.imul(Ot,Vt)|0,A=A+Math.imul(Ot,Zt)|0,w=w+Math.imul(Rt,Gt)|0,p=p+Math.imul(Rt,qt)|0,p=p+Math.imul(Tt,Gt)|0,A=A+Math.imul(Tt,qt)|0,w=w+Math.imul(At,Wt)|0,p=p+Math.imul(At,Kt)|0,p=p+Math.imul(kt,Wt)|0,A=A+Math.imul(kt,Kt)|0,w=w+Math.imul(yt,Jt)|0,p=p+Math.imul(yt,Yt)|0,p=p+Math.imul(bt,Jt)|0,A=A+Math.imul(bt,Yt)|0,w=w+Math.imul(pt,Xt)|0,p=p+Math.imul(pt,Qt)|0,p=p+Math.imul(gt,Xt)|0,A=A+Math.imul(gt,Qt)|0;var eb=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(eb>>>26)|0,eb&=67108863,w=Math.imul(Nt,Vt),p=Math.imul(Nt,Zt),p=p+Math.imul(Pt,Vt)|0,A=Math.imul(Pt,Zt),w=w+Math.imul($t,Gt)|0,p=p+Math.imul($t,qt)|0,p=p+Math.imul(Ot,Gt)|0,A=A+Math.imul(Ot,qt)|0,w=w+Math.imul(Rt,Wt)|0,p=p+Math.imul(Rt,Kt)|0,p=p+Math.imul(Tt,Wt)|0,A=A+Math.imul(Tt,Kt)|0,w=w+Math.imul(At,Jt)|0,p=p+Math.imul(At,Yt)|0,p=p+Math.imul(kt,Jt)|0,A=A+Math.imul(kt,Yt)|0,w=w+Math.imul(yt,Xt)|0,p=p+Math.imul(yt,Qt)|0,p=p+Math.imul(bt,Xt)|0,A=A+Math.imul(bt,Qt)|0;var tb=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(tb>>>26)|0,tb&=67108863,w=Math.imul(Nt,Gt),p=Math.imul(Nt,qt),p=p+Math.imul(Pt,Gt)|0,A=Math.imul(Pt,qt),w=w+Math.imul($t,Wt)|0,p=p+Math.imul($t,Kt)|0,p=p+Math.imul(Ot,Wt)|0,A=A+Math.imul(Ot,Kt)|0,w=w+Math.imul(Rt,Jt)|0,p=p+Math.imul(Rt,Yt)|0,p=p+Math.imul(Tt,Jt)|0,A=A+Math.imul(Tt,Yt)|0,w=w+Math.imul(At,Xt)|0,p=p+Math.imul(At,Qt)|0,p=p+Math.imul(kt,Xt)|0,A=A+Math.imul(kt,Qt)|0;var rb=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(rb>>>26)|0,rb&=67108863,w=Math.imul(Nt,Wt),p=Math.imul(Nt,Kt),p=p+Math.imul(Pt,Wt)|0,A=Math.imul(Pt,Kt),w=w+Math.imul($t,Jt)|0,p=p+Math.imul($t,Yt)|0,p=p+Math.imul(Ot,Jt)|0,A=A+Math.imul(Ot,Yt)|0,w=w+Math.imul(Rt,Xt)|0,p=p+Math.imul(Rt,Qt)|0,p=p+Math.imul(Tt,Xt)|0,A=A+Math.imul(Tt,Qt)|0;var nb=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(nb>>>26)|0,nb&=67108863,w=Math.imul(Nt,Jt),p=Math.imul(Nt,Yt),p=p+Math.imul(Pt,Jt)|0,A=Math.imul(Pt,Yt),w=w+Math.imul($t,Xt)|0,p=p+Math.imul($t,Qt)|0,p=p+Math.imul(Ot,Xt)|0,A=A+Math.imul(Ot,Qt)|0;var ob=(k+w|0)+((p&8191)<<13)|0;k=(A+(p>>>13)|0)+(ob>>>26)|0,ob&=67108863,w=Math.imul(Nt,Xt),p=Math.imul(Nt,Qt),p=p+Math.imul(Pt,Xt)|0,A=Math.imul(Pt,Qt);var ib=(k+w|0)+((p&8191)<<13)|0;return k=(A+(p>>>13)|0)+(ib>>>26)|0,ib&=67108863,_[0]=jy,_[1]=Fy,_[2]=Hy,_[3]=Vy,_[4]=Zy,_[5]=Gy,_[6]=qy,_[7]=Wy,_[8]=Ky,_[9]=Jy,_[10]=Yy,_[11]=Xy,_[12]=Qy,_[13]=eb,_[14]=tb,_[15]=rb,_[16]=nb,_[17]=ob,_[18]=ib,k!==0&&(_[19]=k,y.length++),y};Math.imul||($=R);function N(S,l,m){m.negative=l.negative^S.negative,m.length=S.length+l.length;for(var y=0,b=0,x=0;x<m.length-1;x++){var _=b;b=0;for(var k=y&67108863,w=Math.min(x,l.length-1),p=Math.max(0,x-S.length+1);p<=w;p++){var A=x-p,G=S.words[A]|0,K=l.words[p]|0,Q=G*K,ae=Q&67108863;_=_+(Q/67108864|0)|0,ae=ae+k|0,k=ae&67108863,_=_+(ae>>>26)|0,b+=_>>>26,_&=67108863;}m.words[x]=k,y=_,_=b;}return y!==0?m.words[x]=y:m.length--,m._strip()}function O(S,l,m){return N(S,l,m)}n.prototype.mulTo=function(l,m){var y,b=this.length+l.length;return this.length===10&&l.length===10?y=$(this,l,m):b<63?y=R(this,l,m):b<1024?y=N(this,l,m):y=O(this,l,m),y};n.prototype.mul=function(l){var m=new n(null);return m.words=new Array(this.length+l.length),this.mulTo(l,m)},n.prototype.mulf=function(l){var m=new n(null);return m.words=new Array(this.length+l.length),O(this,l,m)},n.prototype.imul=function(l){return this.clone().mulTo(l,this)},n.prototype.imuln=function(l){var m=l<0;m&&(l=-l),r(typeof l=="number"),r(l<67108864);for(var y=0,b=0;b<this.length;b++){var x=(this.words[b]|0)*l,_=(x&67108863)+(y&67108863);y>>=26,y+=x/67108864|0,y+=_>>>26,this.words[b]=_&67108863;}return y!==0&&(this.words[b]=y,this.length++),l===0&&(this.length=1,this._normSign()),m?this.ineg():this},n.prototype.muln=function(l){return this.clone().imuln(l)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(l){var m=E(l);if(m.length===0)return new n(1);for(var y=this,b=0;b<m.length&&m[b]===0;b++,y=y.sqr());if(++b<m.length)for(var x=y.sqr();b<m.length;b++,x=x.sqr())m[b]!==0&&(y=y.mul(x));return y},n.prototype.iushln=function(l){r(typeof l=="number"&&l>=0);var m=l%26,y=(l-m)/26,b=67108863>>>26-m<<26-m,x;if(m!==0){var _=0;for(x=0;x<this.length;x++){var k=this.words[x]&b,w=(this.words[x]|0)-k<<m;this.words[x]=w|_,_=k>>>26-m;}_&&(this.words[x]=_,this.length++);}if(y!==0){for(x=this.length-1;x>=0;x--)this.words[x+y]=this.words[x];for(x=0;x<y;x++)this.words[x]=0;this.length+=y;}return this._strip()},n.prototype.ishln=function(l){return r(this.negative===0),this.iushln(l)},n.prototype.iushrn=function(l,m,y){r(typeof l=="number"&&l>=0);var b;m?b=(m-m%26)/26:b=0;var x=l%26,_=Math.min((l-x)/26,this.length),k=67108863^67108863>>>x<<x,w=y;if(b-=_,b=Math.max(0,b),w){for(var p=0;p<_;p++)w.words[p]=this.words[p];w.length=_;}if(_!==0)if(this.length>_)for(this.length-=_,p=0;p<this.length;p++)this.words[p]=this.words[p+_];else this.words[0]=0,this.length=1;var A=0;for(p=this.length-1;p>=0&&(A!==0||p>=b);p--){var G=this.words[p]|0;this.words[p]=A<<26-x|G>>>x,A=G&k;}return w&&A!==0&&(w.words[w.length++]=A),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(l,m,y){return r(this.negative===0),this.iushrn(l,m,y)},n.prototype.shln=function(l){return this.clone().ishln(l)},n.prototype.ushln=function(l){return this.clone().iushln(l)},n.prototype.shrn=function(l){return this.clone().ishrn(l)},n.prototype.ushrn=function(l){return this.clone().iushrn(l)},n.prototype.testn=function(l){r(typeof l=="number"&&l>=0);var m=l%26,y=(l-m)/26,b=1<<m;if(this.length<=y)return false;var x=this.words[y];return !!(x&b)},n.prototype.imaskn=function(l){r(typeof l=="number"&&l>=0);var m=l%26,y=(l-m)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=y)return this;if(m!==0&&y++,this.length=Math.min(y,this.length),m!==0){var b=67108863^67108863>>>m<<m;this.words[this.length-1]&=b;}return this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.maskn=function(l){return this.clone().imaskn(l)},n.prototype.iaddn=function(l){return r(typeof l=="number"),r(l<67108864),l<0?this.isubn(-l):this.negative!==0?this.length===1&&(this.words[0]|0)<=l?(this.words[0]=l-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(l),this.negative=1,this):this._iaddn(l)},n.prototype._iaddn=function(l){this.words[0]+=l;for(var m=0;m<this.length&&this.words[m]>=67108864;m++)this.words[m]-=67108864,m===this.length-1?this.words[m+1]=1:this.words[m+1]++;return this.length=Math.max(this.length,m+1),this},n.prototype.isubn=function(l){if(r(typeof l=="number"),r(l<67108864),l<0)return this.iaddn(-l);if(this.negative!==0)return this.negative=0,this.iaddn(l),this.negative=1,this;if(this.words[0]-=l,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var m=0;m<this.length&&this.words[m]<0;m++)this.words[m]+=67108864,this.words[m+1]-=1;return this._strip()},n.prototype.addn=function(l){return this.clone().iaddn(l)},n.prototype.subn=function(l){return this.clone().isubn(l)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(l,m,y){var b=l.length+y,x;this._expand(b);var _,k=0;for(x=0;x<l.length;x++){_=(this.words[x+y]|0)+k;var w=(l.words[x]|0)*m;_-=w&67108863,k=(_>>26)-(w/67108864|0),this.words[x+y]=_&67108863;}for(;x<this.length-y;x++)_=(this.words[x+y]|0)+k,k=_>>26,this.words[x+y]=_&67108863;if(k===0)return this._strip();for(r(k===-1),k=0,x=0;x<this.length;x++)_=-(this.words[x]|0)+k,k=_>>26,this.words[x]=_&67108863;return this.negative=1,this._strip()},n.prototype._wordDiv=function(l,m){var y=this.length-l.length,b=this.clone(),x=l,_=x.words[x.length-1]|0,k=this._countBits(_);y=26-k,y!==0&&(x=x.ushln(y),b.iushln(y),_=x.words[x.length-1]|0);var w=b.length-x.length,p;if(m!=="mod"){p=new n(null),p.length=w+1,p.words=new Array(p.length);for(var A=0;A<p.length;A++)p.words[A]=0;}var G=b.clone()._ishlnsubmul(x,1,w);G.negative===0&&(b=G,p&&(p.words[w]=1));for(var K=w-1;K>=0;K--){var Q=(b.words[x.length+K]|0)*67108864+(b.words[x.length+K-1]|0);for(Q=Math.min(Q/_|0,67108863),b._ishlnsubmul(x,Q,K);b.negative!==0;)Q--,b.negative=0,b._ishlnsubmul(x,1,K),b.isZero()||(b.negative^=1);p&&(p.words[K]=Q);}return p&&p._strip(),b._strip(),m!=="div"&&y!==0&&b.iushrn(y),{div:p||null,mod:b}},n.prototype.divmod=function(l,m,y){if(r(!l.isZero()),this.isZero())return {div:new n(0),mod:new n(0)};var b,x,_;return this.negative!==0&&l.negative===0?(_=this.neg().divmod(l,m),m!=="mod"&&(b=_.div.neg()),m!=="div"&&(x=_.mod.neg(),y&&x.negative!==0&&x.iadd(l)),{div:b,mod:x}):this.negative===0&&l.negative!==0?(_=this.divmod(l.neg(),m),m!=="mod"&&(b=_.div.neg()),{div:b,mod:_.mod}):(this.negative&l.negative)!==0?(_=this.neg().divmod(l.neg(),m),m!=="div"&&(x=_.mod.neg(),y&&x.negative!==0&&x.isub(l)),{div:_.div,mod:x}):l.length>this.length||this.cmp(l)<0?{div:new n(0),mod:this}:l.length===1?m==="div"?{div:this.divn(l.words[0]),mod:null}:m==="mod"?{div:null,mod:new n(this.modrn(l.words[0]))}:{div:this.divn(l.words[0]),mod:new n(this.modrn(l.words[0]))}:this._wordDiv(l,m)},n.prototype.div=function(l){return this.divmod(l,"div",false).div},n.prototype.mod=function(l){return this.divmod(l,"mod",false).mod},n.prototype.umod=function(l){return this.divmod(l,"mod",true).mod},n.prototype.divRound=function(l){var m=this.divmod(l);if(m.mod.isZero())return m.div;var y=m.mod.abs(),b=l.abs().iushrn(1),x=l.words[0]&1,_=y.cmp(b);if(_<0||x===1&&_===0)return m.div;var k=new n(1);return k.negative=this.negative^l.negative,m.div.iadd(k)},n.prototype.modrn=function(l){var m=l<0;m&&(l=-l),r(l<=67108863);for(var y=(1<<26)%l,b=0,x=this.length-1;x>=0;x--)b=(y*b+(this.words[x]|0))%l;return m?-b:b},n.prototype.modn=function(l){return this.modrn(l)},n.prototype.idivn=function(l){var m=l<0;m&&(l=-l),r(l<=67108863);for(var y=0,b=this.length-1;b>=0;b--){var x=(this.words[b]|0)+y*67108864;this.words[b]=x/l|0,y=x%l;}return this._strip(),m?this.ineg():this},n.prototype.divn=function(l){return this.clone().idivn(l)},n.prototype.egcd=function(l){r(l.negative===0),r(!l.isZero());var m=this,y=l.clone();m.negative!==0?m=m.umod(l):m=m.clone();for(var b=new n(1),x=new n(0),_=new n(0),k=new n(1),w=0;m.isEven()&&y.isEven();)m.iushrn(1),y.iushrn(1),++w;for(var p=y.clone(),A=m.clone();!m.isZero();){for(var G=0,K=1;(m.words[0]&K)===0&&G<26;++G,K<<=1);if(G>0)for(m.iushrn(G);G-- >0;)(b.isOdd()||x.isOdd())&&(b.iadd(p),x.isub(A)),b.iushrn(1),x.iushrn(1);for(var Q=0,ae=1;(y.words[0]&ae)===0&&Q<26;++Q,ae<<=1);if(Q>0)for(y.iushrn(Q);Q-- >0;)(_.isOdd()||k.isOdd())&&(_.iadd(p),k.isub(A)),_.iushrn(1),k.iushrn(1);m.cmp(y)>=0?(m.isub(y),b.isub(_),x.isub(k)):(y.isub(m),_.isub(b),k.isub(x));}return {a:_,b:k,gcd:y.iushln(w)}},n.prototype._invmp=function(l){r(l.negative===0),r(!l.isZero());var m=this,y=l.clone();m.negative!==0?m=m.umod(l):m=m.clone();for(var b=new n(1),x=new n(0),_=y.clone();m.cmpn(1)>0&&y.cmpn(1)>0;){for(var k=0,w=1;(m.words[0]&w)===0&&k<26;++k,w<<=1);if(k>0)for(m.iushrn(k);k-- >0;)b.isOdd()&&b.iadd(_),b.iushrn(1);for(var p=0,A=1;(y.words[0]&A)===0&&p<26;++p,A<<=1);if(p>0)for(y.iushrn(p);p-- >0;)x.isOdd()&&x.iadd(_),x.iushrn(1);m.cmp(y)>=0?(m.isub(y),b.isub(x)):(y.isub(m),x.isub(b));}var G;return m.cmpn(1)===0?G=b:G=x,G.cmpn(0)<0&&G.iadd(l),G},n.prototype.gcd=function(l){if(this.isZero())return l.abs();if(l.isZero())return this.abs();var m=this.clone(),y=l.clone();m.negative=0,y.negative=0;for(var b=0;m.isEven()&&y.isEven();b++)m.iushrn(1),y.iushrn(1);do{for(;m.isEven();)m.iushrn(1);for(;y.isEven();)y.iushrn(1);var x=m.cmp(y);if(x<0){var _=m;m=y,y=_;}else if(x===0||y.cmpn(1)===0)break;m.isub(y);}while(true);return y.iushln(b)},n.prototype.invm=function(l){return this.egcd(l).a.umod(l)},n.prototype.isEven=function(){return (this.words[0]&1)===0},n.prototype.isOdd=function(){return (this.words[0]&1)===1},n.prototype.andln=function(l){return this.words[0]&l},n.prototype.bincn=function(l){r(typeof l=="number");var m=l%26,y=(l-m)/26,b=1<<m;if(this.length<=y)return this._expand(y+1),this.words[y]|=b,this;for(var x=b,_=y;x!==0&&_<this.length;_++){var k=this.words[_]|0;k+=x,x=k>>>26,k&=67108863,this.words[_]=k;}return x!==0&&(this.words[_]=x,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(l){var m=l<0;if(this.negative!==0&&!m)return -1;if(this.negative===0&&m)return 1;this._strip();var y;if(this.length>1)y=1;else {m&&(l=-l),r(l<=67108863,"Number is too big");var b=this.words[0]|0;y=b===l?0:b<l?-1:1;}return this.negative!==0?-y|0:y},n.prototype.cmp=function(l){if(this.negative!==0&&l.negative===0)return -1;if(this.negative===0&&l.negative!==0)return 1;var m=this.ucmp(l);return this.negative!==0?-m|0:m},n.prototype.ucmp=function(l){if(this.length>l.length)return 1;if(this.length<l.length)return -1;for(var m=0,y=this.length-1;y>=0;y--){var b=this.words[y]|0,x=l.words[y]|0;if(b!==x){b<x?m=-1:b>x&&(m=1);break}}return m},n.prototype.gtn=function(l){return this.cmpn(l)===1},n.prototype.gt=function(l){return this.cmp(l)===1},n.prototype.gten=function(l){return this.cmpn(l)>=0},n.prototype.gte=function(l){return this.cmp(l)>=0},n.prototype.ltn=function(l){return this.cmpn(l)===-1},n.prototype.lt=function(l){return this.cmp(l)===-1},n.prototype.lten=function(l){return this.cmpn(l)<=0},n.prototype.lte=function(l){return this.cmp(l)<=0},n.prototype.eqn=function(l){return this.cmpn(l)===0},n.prototype.eq=function(l){return this.cmp(l)===0},n.red=function(l){return new Z(l)},n.prototype.toRed=function(l){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),l.convertTo(this)._forceRed(l)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(l){return this.red=l,this},n.prototype.forceRed=function(l){return r(!this.red,"Already a number in reduction context"),this._forceRed(l)},n.prototype.redAdd=function(l){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,l)},n.prototype.redIAdd=function(l){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,l)},n.prototype.redSub=function(l){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,l)},n.prototype.redISub=function(l){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,l)},n.prototype.redShl=function(l){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,l)},n.prototype.redMul=function(l){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.mul(this,l)},n.prototype.redIMul=function(l){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,l),this.red.imul(this,l)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(l){return r(this.red&&!l.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,l)};var P={k256:null,p224:null,p192:null,p25519:null};function L(S,l){this.name=S,this.p=new n(l,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp();}L.prototype._tmp=function(){var l=new n(null);return l.words=new Array(Math.ceil(this.n/13)),l},L.prototype.ireduce=function(l){var m=l,y;do this.split(m,this.tmp),m=this.imulK(m),m=m.iadd(this.tmp),y=m.bitLength();while(y>this.n);var b=y<this.n?-1:m.ucmp(this.p);return b===0?(m.words[0]=0,m.length=1):b>0?m.isub(this.p):m.strip!==void 0?m.strip():m._strip(),m},L.prototype.split=function(l,m){l.iushrn(this.n,0,m);},L.prototype.imulK=function(l){return l.imul(this.k)};function C(){L.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}o(C,L),C.prototype.split=function(l,m){for(var y=4194303,b=Math.min(l.length,9),x=0;x<b;x++)m.words[x]=l.words[x];if(m.length=b,l.length<=9){l.words[0]=0,l.length=1;return}var _=l.words[9];for(m.words[m.length++]=_&y,x=10;x<l.length;x++){var k=l.words[x]|0;l.words[x-10]=(k&y)<<4|_>>>22,_=k;}_>>>=22,l.words[x-10]=_,_===0&&l.length>10?l.length-=10:l.length-=9;},C.prototype.imulK=function(l){l.words[l.length]=0,l.words[l.length+1]=0,l.length+=2;for(var m=0,y=0;y<l.length;y++){var b=l.words[y]|0;m+=b*977,l.words[y]=m&67108863,m=b*64+(m/67108864|0);}return l.words[l.length-1]===0&&(l.length--,l.words[l.length-1]===0&&l.length--),l};function D(){L.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}o(D,L);function q(){L.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}o(q,L);function H(){L.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}o(H,L),H.prototype.imulK=function(l){for(var m=0,y=0;y<l.length;y++){var b=(l.words[y]|0)*19+m,x=b&67108863;b>>>=26,l.words[y]=x,m=b;}return m!==0&&(l.words[l.length++]=m),l},n._prime=function(l){if(P[l])return P[l];var m;if(l==="k256")m=new C;else if(l==="p224")m=new D;else if(l==="p192")m=new q;else if(l==="p25519")m=new H;else throw new Error("Unknown prime "+l);return P[l]=m,m};function Z(S){if(typeof S=="string"){var l=n._prime(S);this.m=l.p,this.prime=l;}else r(S.gtn(1),"modulus must be greater than 1"),this.m=S,this.prime=null;}Z.prototype._verify1=function(l){r(l.negative===0,"red works only with positives"),r(l.red,"red works only with red numbers");},Z.prototype._verify2=function(l,m){r((l.negative|m.negative)===0,"red works only with positives"),r(l.red&&l.red===m.red,"red works only with red numbers");},Z.prototype.imod=function(l){return this.prime?this.prime.ireduce(l)._forceRed(this):(u(l,l.umod(this.m)._forceRed(this)),l)},Z.prototype.neg=function(l){return l.isZero()?l.clone():this.m.sub(l)._forceRed(this)},Z.prototype.add=function(l,m){this._verify2(l,m);var y=l.add(m);return y.cmp(this.m)>=0&&y.isub(this.m),y._forceRed(this)},Z.prototype.iadd=function(l,m){this._verify2(l,m);var y=l.iadd(m);return y.cmp(this.m)>=0&&y.isub(this.m),y},Z.prototype.sub=function(l,m){this._verify2(l,m);var y=l.sub(m);return y.cmpn(0)<0&&y.iadd(this.m),y._forceRed(this)},Z.prototype.isub=function(l,m){this._verify2(l,m);var y=l.isub(m);return y.cmpn(0)<0&&y.iadd(this.m),y},Z.prototype.shl=function(l,m){return this._verify1(l),this.imod(l.ushln(m))},Z.prototype.imul=function(l,m){return this._verify2(l,m),this.imod(l.imul(m))},Z.prototype.mul=function(l,m){return this._verify2(l,m),this.imod(l.mul(m))},Z.prototype.isqr=function(l){return this.imul(l,l.clone())},Z.prototype.sqr=function(l){return this.mul(l,l)},Z.prototype.sqrt=function(l){if(l.isZero())return l.clone();var m=this.m.andln(3);if(r(m%2===1),m===3){var y=this.m.add(new n(1)).iushrn(2);return this.pow(l,y)}for(var b=this.m.subn(1),x=0;!b.isZero()&&b.andln(1)===0;)x++,b.iushrn(1);r(!b.isZero());var _=new n(1).toRed(this),k=_.redNeg(),w=this.m.subn(1).iushrn(1),p=this.m.bitLength();for(p=new n(2*p*p).toRed(this);this.pow(p,w).cmp(k)!==0;)p.redIAdd(k);for(var A=this.pow(p,b),G=this.pow(l,b.addn(1).iushrn(1)),K=this.pow(l,b),Q=x;K.cmp(_)!==0;){for(var ae=K,he=0;ae.cmp(_)!==0;he++)ae=ae.redSqr();r(he<Q);var ye=this.pow(A,new n(1).iushln(Q-he-1));G=G.redMul(ye),A=ye.redSqr(),K=K.redMul(A),Q=he;}return G},Z.prototype.invm=function(l){var m=l._invmp(this.m);return m.negative!==0?(m.negative=0,this.imod(m).redNeg()):this.imod(m)},Z.prototype.pow=function(l,m){if(m.isZero())return new n(1).toRed(this);if(m.cmpn(1)===0)return l.clone();var y=4,b=new Array(1<<y);b[0]=new n(1).toRed(this),b[1]=l;for(var x=2;x<b.length;x++)b[x]=this.mul(b[x-1],l);var _=b[0],k=0,w=0,p=m.bitLength()%26;for(p===0&&(p=26),x=m.length-1;x>=0;x--){for(var A=m.words[x],G=p-1;G>=0;G--){var K=A>>G&1;if(_!==b[0]&&(_=this.sqr(_)),K===0&&k===0){w=0;continue}k<<=1,k|=K,w++,!(w!==y&&(x!==0||G!==0))&&(_=this.mul(_,b[k]),w=0,k=0);}p=26;}return _},Z.prototype.convertTo=function(l){var m=l.umod(this.m);return m===l?m.clone():m},Z.prototype.convertFrom=function(l){var m=l.clone();return m.red=null,m},n.mont=function(l){return new re(l)};function re(S){Z.call(this,S),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv);}o(re,Z),re.prototype.convertTo=function(l){return this.imod(l.ushln(this.shift))},re.prototype.convertFrom=function(l){var m=this.imod(l.mul(this.rinv));return m.red=null,m},re.prototype.imul=function(l,m){if(l.isZero()||m.isZero())return l.words[0]=0,l.length=1,l;var y=l.imul(m),b=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=y.isub(b).iushrn(this.shift),_=x;return x.cmp(this.m)>=0?_=x.isub(this.m):x.cmpn(0)<0&&(_=x.iadd(this.m)),_._forceRed(this)},re.prototype.mul=function(l,m){if(l.isZero()||m.isZero())return new n(0)._forceRed(this);var y=l.mul(m),b=y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=y.isub(b).iushrn(this.shift),_=x;return x.cmp(this.m)>=0?_=x.isub(this.m):x.cmpn(0)<0&&(_=x.iadd(this.m)),_._forceRed(this)},re.prototype.invm=function(l){var m=this.imod(l._invmp(this.m).mul(this.r2));return m._forceRed(this)};})(typeof Gw>"u"||Gw,NA);});var CA=Wr((Ww,BA)=>{var dh=Rl(),Oo=dh.Buffer;function PA(e,t){for(var r in e)t[r]=e[r];}Oo.from&&Oo.alloc&&Oo.allocUnsafe&&Oo.allocUnsafeSlow?BA.exports=dh:(PA(dh,Ww),Ww.Buffer=Ea);function Ea(e,t,r){return Oo(e,t,r)}Ea.prototype=Object.create(Oo.prototype);PA(Oo,Ea);Ea.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Oo(e,t,r)};Ea.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var o=Oo(e);return t!==void 0?typeof r=="string"?o.fill(t,r):o.fill(t):o.fill(0),o};Ea.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Oo(e)};Ea.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return dh.SlowBuffer(e)};});var LA=Wr((kY,zA)=>{var ph=CA().Buffer;function sU(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var o=0;o<e.length;o++){var n=e.charAt(o),i=n.charCodeAt(0);if(t[i]!==255)throw new TypeError(n+" is ambiguous");t[i]=o;}var s=e.length,a=e.charAt(0),c=Math.log(s)/Math.log(256),u=Math.log(256)/Math.log(s);function f(h){if((Array.isArray(h)||h instanceof Uint8Array)&&(h=ph.from(h)),!ph.isBuffer(h))throw new TypeError("Expected Buffer");if(h.length===0)return "";for(var v=0,E=0,R=0,$=h.length;R!==$&&h[R]===0;)R++,v++;for(var N=($-R)*u+1>>>0,O=new Uint8Array(N);R!==$;){for(var I=h[R],P=0,L=N-1;(I!==0||P<E)&&L!==-1;L--,P++)I+=256*O[L]>>>0,O[L]=I%s>>>0,I=I/s>>>0;if(I!==0)throw new Error("Non-zero carry");E=P,R++;}for(var C=N-E;C!==N&&O[C]===0;)C++;for(var D=a.repeat(v);C<N;++C)D+=e.charAt(O[C]);return D}function d(h){if(typeof h!="string")throw new TypeError("Expected String");if(h.length===0)return ph.alloc(0);for(var v=0,E=0,R=0;h[v]===a;)E++,v++;for(var $=(h.length-v)*c+1>>>0,N=new Uint8Array($);v<h.length;){var O=h.charCodeAt(v);if(O>255)return;var I=t[O];if(I===255)return;for(var P=0,L=$-1;(I!==0||P<R)&&L!==-1;L--,P++)I+=s*N[L]>>>0,N[L]=I%256>>>0,I=I/256>>>0;if(I!==0)throw new Error("Non-zero carry");R=P,v++;}for(var C=$-R;C!==$&&N[C]===0;)C++;var D=ph.allocUnsafe(E+($-C));D.fill(0,0,E);for(var q=E;C!==$;)D[q++]=N[C++];return D}function g(h){var v=d(h);if(v)return v;throw new Error("Non-base"+s+" character")}return {encode:f,decodeUnsafe:d,decode:g}}zA.exports=sU;});var Kw=Wr((RY,UA)=>{var aU=LA(),cU="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";UA.exports=aU(cU);});var MA=Wr(Xw=>{function pi(e,t,r){return t<=e&&e<=r}function bh(e){if(e===void 0)return {};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function uU(e){for(var t=String(e),r=t.length,o=0,n=[];o<r;){var i=t.charCodeAt(o);if(i<55296||i>57343)n.push(i);else if(56320<=i&&i<=57343)n.push(65533);else if(55296<=i&&i<=56319)if(o===r-1)n.push(65533);else {var s=e.charCodeAt(o+1);if(56320<=s&&s<=57343){var a=i&1023,c=s&1023;n.push(65536+(a<<10)+c),o+=1;}else n.push(65533);}o+=1;}return n}function fU(e){for(var t="",r=0;r<e.length;++r){var o=e[r];o<=65535?t+=String.fromCharCode(o):(o-=65536,t+=String.fromCharCode((o>>10)+55296,(o&1023)+56320));}return t}var mh=-1;function Yw(e){this.tokens=[].slice.call(e);}Yw.prototype={endOfStream:function(){return !this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():mh},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(e);},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.shift());else this.tokens.push(e);}};var Dc=-1;function Jw(e,t){if(e)throw TypeError("Decoder error");return t||65533}var hh="utf-8";function gh(e,t){if(!(this instanceof gh))return new gh(e,t);if(e=e!==void 0?String(e).toLowerCase():hh,e!==hh)throw new Error("Encoding not supported. Only utf-8 is supported");t=bh(t),this._streaming=false,this._BOMseen=false,this._decoder=null,this._fatal=!!t.fatal,this._ignoreBOM=!!t.ignoreBOM,Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM});}gh.prototype={decode:function(t,r){var o;typeof t=="object"&&t instanceof ArrayBuffer?o=new Uint8Array(t):typeof t=="object"&&"buffer"in t&&t.buffer instanceof ArrayBuffer?o=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):o=new Uint8Array(0),r=bh(r),this._streaming||(this._decoder=new lU({fatal:this._fatal}),this._BOMseen=false),this._streaming=!!r.stream;for(var n=new Yw(o),i=[],s;!n.endOfStream()&&(s=this._decoder.handler(n,n.read()),s!==Dc);)s!==null&&(Array.isArray(s)?i.push.apply(i,s):i.push(s));if(!this._streaming){do{if(s=this._decoder.handler(n,n.read()),s===Dc)break;s!==null&&(Array.isArray(s)?i.push.apply(i,s):i.push(s));}while(!n.endOfStream());this._decoder=null;}return i.length&&["utf-8"].indexOf(this.encoding)!==-1&&!this._ignoreBOM&&!this._BOMseen&&(i[0]===65279?(this._BOMseen=true,i.shift()):this._BOMseen=true),fU(i)}};function yh(e,t){if(!(this instanceof yh))return new yh(e,t);if(e=e!==void 0?String(e).toLowerCase():hh,e!==hh)throw new Error("Encoding not supported. Only utf-8 is supported");t=bh(t),this._streaming=false,this._encoder=null,this._options={fatal:!!t.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"});}yh.prototype={encode:function(t,r){t=t?String(t):"",r=bh(r),this._streaming||(this._encoder=new dU(this._options)),this._streaming=!!r.stream;for(var o=[],n=new Yw(uU(t)),i;!n.endOfStream()&&(i=this._encoder.handler(n,n.read()),i!==Dc);)Array.isArray(i)?o.push.apply(o,i):o.push(i);if(!this._streaming){for(;i=this._encoder.handler(n,n.read()),i!==Dc;)Array.isArray(i)?o.push.apply(o,i):o.push(i);this._encoder=null;}return new Uint8Array(o)}};function lU(e){var t=e.fatal,r=0,o=0,n=0,i=128,s=191;this.handler=function(a,c){if(c===mh&&n!==0)return n=0,Jw(t);if(c===mh)return Dc;if(n===0){if(pi(c,0,127))return c;if(pi(c,194,223))n=1,r=c-192;else if(pi(c,224,239))c===224&&(i=160),c===237&&(s=159),n=2,r=c-224;else if(pi(c,240,244))c===240&&(i=144),c===244&&(s=143),n=3,r=c-240;else return Jw(t);return r=r<<6*n,null}if(!pi(c,i,s))return r=n=o=0,i=128,s=191,a.prepend(c),Jw(t);if(i=128,s=191,o+=1,r+=c-128<<6*(n-o),o!==n)return null;var u=r;return r=n=o=0,u};}function dU(e){e.fatal;this.handler=function(r,o){if(o===mh)return Dc;if(pi(o,0,127))return o;var n,i;pi(o,128,2047)?(n=1,i=192):pi(o,2048,65535)?(n=2,i=224):pi(o,65536,1114111)&&(n=3,i=240);for(var s=[(o>>6*n)+i];n>0;){var a=o>>6*(n-1);s.push(128|a&63),n-=1;}return s};}Xw.TextEncoder=yh;Xw.TextDecoder=gh;});var VA=Wr(Ke=>{var pU=Ke&&Ke.__createBinding||(Object.create?(function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:true,get:function(){return t[r]}});}):(function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r];})),mU=Ke&&Ke.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t});}):function(e,t){e.default=t;}),No=Ke&&Ke.__decorate||function(e,t,r,o){var n=arguments.length,i=n<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(n<3?s(i):n>3?s(t,r,i):s(t,r))||i);return n>3&&i&&Object.defineProperty(t,r,i),i},hU=Ke&&Ke.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.hasOwnProperty.call(e,r)&&pU(t,e,r);return mU(t,e),t},DA=Ke&&Ke.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ke,"__esModule",{value:true});Ke.deserializeUnchecked=Ke.deserialize=Ke.serialize=Ke.BinaryReader=Ke.BinaryWriter=Ke.BorshError=Ke.baseDecode=Ke.baseEncode=void 0;var rs=DA(qw()),jA=DA(Kw()),gU=hU(MA()),yU=typeof TextDecoder!="function"?gU.TextDecoder:TextDecoder,bU=new yU("utf-8",{fatal:true});function xU(e){return typeof e=="string"&&(e=Buffer.from(e,"utf8")),jA.default.encode(Buffer.from(e))}Ke.baseEncode=xU;function vU(e){return Buffer.from(jA.default.decode(e))}Ke.baseDecode=vU;var Qw=1024,mr=class extends Error{constructor(t){super(t),this.fieldPath=[],this.originalMessage=t;}addToFieldPath(t){this.fieldPath.splice(0,0,t),this.message=this.originalMessage+": "+this.fieldPath.join(".");}};Ke.BorshError=mr;var xh=class{constructor(){this.buf=Buffer.alloc(Qw),this.length=0;}maybeResize(){this.buf.length<16+this.length&&(this.buf=Buffer.concat([this.buf,Buffer.alloc(Qw)]));}writeU8(t){this.maybeResize(),this.buf.writeUInt8(t,this.length),this.length+=1;}writeU16(t){this.maybeResize(),this.buf.writeUInt16LE(t,this.length),this.length+=2;}writeU32(t){this.maybeResize(),this.buf.writeUInt32LE(t,this.length),this.length+=4;}writeU64(t){this.maybeResize(),this.writeBuffer(Buffer.from(new rs.default(t).toArray("le",8)));}writeU128(t){this.maybeResize(),this.writeBuffer(Buffer.from(new rs.default(t).toArray("le",16)));}writeU256(t){this.maybeResize(),this.writeBuffer(Buffer.from(new rs.default(t).toArray("le",32)));}writeU512(t){this.maybeResize(),this.writeBuffer(Buffer.from(new rs.default(t).toArray("le",64)));}writeBuffer(t){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),t,Buffer.alloc(Qw)]),this.length+=t.length;}writeString(t){this.maybeResize();let r=Buffer.from(t,"utf8");this.writeU32(r.length),this.writeBuffer(r);}writeFixedArray(t){this.writeBuffer(Buffer.from(t));}writeArray(t,r){this.maybeResize(),this.writeU32(t.length);for(let o of t)this.maybeResize(),r(o);}toArray(){return this.buf.subarray(0,this.length)}};Ke.BinaryWriter=xh;function Po(e,t,r){let o=r.value;r.value=function(...n){try{return o.apply(this,n)}catch(i){if(i instanceof RangeError){let s=i.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(s)>=0)throw new mr("Reached the end of buffer when deserializing")}throw i}};}var Hr=class{constructor(t){this.buf=t,this.offset=0;}readU8(){let t=this.buf.readUInt8(this.offset);return this.offset+=1,t}readU16(){let t=this.buf.readUInt16LE(this.offset);return this.offset+=2,t}readU32(){let t=this.buf.readUInt32LE(this.offset);return this.offset+=4,t}readU64(){let t=this.readBuffer(8);return new rs.default(t,"le")}readU128(){let t=this.readBuffer(16);return new rs.default(t,"le")}readU256(){let t=this.readBuffer(32);return new rs.default(t,"le")}readU512(){let t=this.readBuffer(64);return new rs.default(t,"le")}readBuffer(t){if(this.offset+t>this.buf.length)throw new mr(`Expected buffer length ${t} isn't within bounds`);let r=this.buf.slice(this.offset,this.offset+t);return this.offset+=t,r}readString(){let t=this.readU32(),r=this.readBuffer(t);try{return bU.decode(r)}catch(o){throw new mr(`Error decoding UTF-8 string: ${o}`)}}readFixedArray(t){return new Uint8Array(this.readBuffer(t))}readArray(t){let r=this.readU32(),o=Array();for(let n=0;n<r;++n)o.push(t());return o}};No([Po],Hr.prototype,"readU8",null);No([Po],Hr.prototype,"readU16",null);No([Po],Hr.prototype,"readU32",null);No([Po],Hr.prototype,"readU64",null);No([Po],Hr.prototype,"readU128",null);No([Po],Hr.prototype,"readU256",null);No([Po],Hr.prototype,"readU512",null);No([Po],Hr.prototype,"readString",null);No([Po],Hr.prototype,"readFixedArray",null);No([Po],Hr.prototype,"readArray",null);Ke.BinaryReader=Hr;function FA(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Sa(e,t,r,o,n){try{if(typeof o=="string")n[`write${FA(o)}`](r);else if(o instanceof Array)if(typeof o[0]=="number"){if(r.length!==o[0])throw new mr(`Expecting byte array of length ${o[0]}, but got ${r.length} bytes`);n.writeFixedArray(r);}else if(o.length===2&&typeof o[1]=="number"){if(r.length!==o[1])throw new mr(`Expecting byte array of length ${o[1]}, but got ${r.length} bytes`);for(let i=0;i<o[1];i++)Sa(e,null,r[i],o[0],n);}else n.writeArray(r,i=>{Sa(e,t,i,o[0],n);});else if(o.kind!==void 0)switch(o.kind){case "option":{r==null?n.writeU8(0):(n.writeU8(1),Sa(e,t,r,o.type,n));break}case "map":{n.writeU32(r.size),r.forEach((i,s)=>{Sa(e,t,s,o.key,n),Sa(e,t,i,o.value,n);});break}default:throw new mr(`FieldType ${o} unrecognized`)}else HA(e,r,n);}catch(i){throw i instanceof mr&&i.addToFieldPath(t),i}}function HA(e,t,r){if(typeof t.borshSerialize=="function"){t.borshSerialize(r);return}let o=e.get(t.constructor);if(!o)throw new mr(`Class ${t.constructor.name} is missing in schema`);if(o.kind==="struct")o.fields.map(([n,i])=>{Sa(e,n,t[n],i,r);});else if(o.kind==="enum"){let n=t[o.field];for(let i=0;i<o.values.length;++i){let[s,a]=o.values[i];if(s===n){r.writeU8(i),Sa(e,s,t[s],a,r);break}}}else throw new mr(`Unexpected schema kind: ${o.kind} for ${t.constructor.name}`)}function wU(e,t,r=xh){let o=new r;return HA(e,t,o),o.toArray()}Ke.serialize=wU;function Ia(e,t,r,o){try{if(typeof r=="string")return o[`read${FA(r)}`]();if(r instanceof Array){if(typeof r[0]=="number")return o.readFixedArray(r[0]);if(typeof r[1]=="number"){let n=[];for(let i=0;i<r[1];i++)n.push(Ia(e,null,r[0],o));return n}else return o.readArray(()=>Ia(e,t,r[0],o))}if(r.kind==="option")return o.readU8()?Ia(e,t,r.type,o):void 0;if(r.kind==="map"){let n=new Map,i=o.readU32();for(let s=0;s<i;s++){let a=Ia(e,t,r.key,o),c=Ia(e,t,r.value,o);n.set(a,c);}return n}return e_(e,r,o)}catch(n){throw n instanceof mr&&n.addToFieldPath(t),n}}function e_(e,t,r){if(typeof t.borshDeserialize=="function")return t.borshDeserialize(r);let o=e.get(t);if(!o)throw new mr(`Class ${t.name} is missing in schema`);if(o.kind==="struct"){let n={};for(let[i,s]of e.get(t).fields)n[i]=Ia(e,i,s,r);return new t(n)}if(o.kind==="enum"){let n=r.readU8();if(n>=o.values.length)throw new mr(`Enum index: ${n} is out of range`);let[i,s]=o.values[n],a=Ia(e,i,s,r);return new t({[i]:a})}throw new mr(`Unexpected schema kind: ${o.kind} for ${t.constructor.name}`)}function _U(e,t,r,o=Hr){let n=new o(r),i=e_(e,t,n);if(n.offset<r.length)throw new mr(`Unexpected ${r.length-n.offset} bytes after deserialized data`);return i}Ke.deserialize=_U;function EU(e,t,r,o=Hr){let n=new o(r);return e_(e,t,n)}Ke.deserializeUnchecked=EU;});var o_=Wr(M=>{Object.defineProperty(M,"__esModule",{value:true});M.s16=M.s8=M.nu64be=M.u48be=M.u40be=M.u32be=M.u24be=M.u16be=M.nu64=M.u48=M.u40=M.u32=M.u24=M.u16=M.u8=M.offset=M.greedy=M.Constant=M.UTF8=M.CString=M.Blob=M.Boolean=M.BitField=M.BitStructure=M.VariantLayout=M.Union=M.UnionLayoutDiscriminator=M.UnionDiscriminator=M.Structure=M.Sequence=M.DoubleBE=M.Double=M.FloatBE=M.Float=M.NearInt64BE=M.NearInt64=M.NearUInt64BE=M.NearUInt64=M.IntBE=M.Int=M.UIntBE=M.UInt=M.OffsetLayout=M.GreedyCount=M.ExternalLayout=M.bindConstructorLayout=M.nameWithProperty=M.Layout=M.uint8ArrayToBuffer=M.checkUint8Array=void 0;M.constant=M.utf8=M.cstr=M.blob=M.unionLayoutDiscriminator=M.union=M.seq=M.bits=M.struct=M.f64be=M.f64=M.f32be=M.f32=M.ns64be=M.s48be=M.s40be=M.s32be=M.s24be=M.s16be=M.ns64=M.s48=M.s40=M.s32=M.s24=void 0;var r_=Rl();function Hc(e){if(!(e instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}M.checkUint8Array=Hc;function Fe(e){return Hc(e),r_.Buffer.from(e.buffer,e.byteOffset,e.length)}M.uint8ArrayToBuffer=Fe;var Ze=class{constructor(t,r){if(!Number.isInteger(t))throw new TypeError("span must be an integer");this.span=t,this.property=r;}makeDestinationObject(){return {}}getSpan(t,r){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(t){let r=Object.create(this.constructor.prototype);return Object.assign(r,this),r.property=t,r}fromArray(t){}};M.Layout=Ze;function n_(e,t){return t.property?e+"["+t.property+"]":e}M.nameWithProperty=n_;function SU(e,t){if(typeof e!="function")throw new TypeError("Class must be constructor");if(Object.prototype.hasOwnProperty.call(e,"layout_"))throw new Error("Class is already bound to a layout");if(!(t&&t instanceof Ze))throw new TypeError("layout must be a Layout");if(Object.prototype.hasOwnProperty.call(t,"boundConstructor_"))throw new Error("layout is already bound to a constructor");e.layout_=t,t.boundConstructor_=e,t.makeDestinationObject=(()=>new e),Object.defineProperty(e.prototype,"encode",{value(r,o){return t.encode(this,r,o)},writable:true}),Object.defineProperty(e,"decode",{value(r,o){return t.decode(r,o)},writable:true});}M.bindConstructorLayout=SU;var Ir=class extends Ze{isCount(){throw new Error("ExternalLayout is abstract")}};M.ExternalLayout=Ir;var vh=class extends Ir{constructor(t=1,r){if(!Number.isInteger(t)||0>=t)throw new TypeError("elementSpan must be a (positive) integer");super(-1,r),this.elementSpan=t;}isCount(){return true}decode(t,r=0){Hc(t);let o=t.length-r;return Math.floor(o/this.elementSpan)}encode(t,r,o){return 0}};M.GreedyCount=vh;var Ul=class extends Ir{constructor(t,r=0,o){if(!(t instanceof Ze))throw new TypeError("layout must be a Layout");if(!Number.isInteger(r))throw new TypeError("offset must be integer or undefined");super(t.span,o||t.property),this.layout=t,this.offset=r;}isCount(){return this.layout instanceof rn||this.layout instanceof yn}decode(t,r=0){return this.layout.decode(t,r+this.offset)}encode(t,r,o=0){return this.layout.encode(t,r,o+this.offset)}};M.OffsetLayout=Ul;var rn=class extends Ze{constructor(t,r){if(super(t,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(t,r=0){return Fe(t).readUIntLE(r,this.span)}encode(t,r,o=0){return Fe(r).writeUIntLE(t,o,this.span),this.span}};M.UInt=rn;var yn=class extends Ze{constructor(t,r){if(super(t,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(t,r=0){return Fe(t).readUIntBE(r,this.span)}encode(t,r,o=0){return Fe(r).writeUIntBE(t,o,this.span),this.span}};M.UIntBE=yn;var mi=class extends Ze{constructor(t,r){if(super(t,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(t,r=0){return Fe(t).readIntLE(r,this.span)}encode(t,r,o=0){return Fe(r).writeIntLE(t,o,this.span),this.span}};M.Int=mi;var ns=class extends Ze{constructor(t,r){if(super(t,r),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(t,r=0){return Fe(t).readIntBE(r,this.span)}encode(t,r,o=0){return Fe(r).writeIntBE(t,o,this.span),this.span}};M.IntBE=ns;var t_=Math.pow(2,32);function Lh(e){let t=Math.floor(e/t_),r=e-t*t_;return {hi32:t,lo32:r}}function Uh(e,t){return e*t_+t}var wh=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){let o=Fe(t),n=o.readUInt32LE(r),i=o.readUInt32LE(r+4);return Uh(i,n)}encode(t,r,o=0){let n=Lh(t),i=Fe(r);return i.writeUInt32LE(n.lo32,o),i.writeUInt32LE(n.hi32,o+4),8}};M.NearUInt64=wh;var _h=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){let o=Fe(t),n=o.readUInt32BE(r),i=o.readUInt32BE(r+4);return Uh(n,i)}encode(t,r,o=0){let n=Lh(t),i=Fe(r);return i.writeUInt32BE(n.hi32,o),i.writeUInt32BE(n.lo32,o+4),8}};M.NearUInt64BE=_h;var Eh=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){let o=Fe(t),n=o.readUInt32LE(r),i=o.readInt32LE(r+4);return Uh(i,n)}encode(t,r,o=0){let n=Lh(t),i=Fe(r);return i.writeUInt32LE(n.lo32,o),i.writeInt32LE(n.hi32,o+4),8}};M.NearInt64=Eh;var Sh=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){let o=Fe(t),n=o.readInt32BE(r),i=o.readUInt32BE(r+4);return Uh(n,i)}encode(t,r,o=0){let n=Lh(t),i=Fe(r);return i.writeInt32BE(n.hi32,o),i.writeUInt32BE(n.lo32,o+4),8}};M.NearInt64BE=Sh;var Ih=class extends Ze{constructor(t){super(4,t);}decode(t,r=0){return Fe(t).readFloatLE(r)}encode(t,r,o=0){return Fe(r).writeFloatLE(t,o),4}};M.Float=Ih;var Ah=class extends Ze{constructor(t){super(4,t);}decode(t,r=0){return Fe(t).readFloatBE(r)}encode(t,r,o=0){return Fe(r).writeFloatBE(t,o),4}};M.FloatBE=Ah;var kh=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){return Fe(t).readDoubleLE(r)}encode(t,r,o=0){return Fe(r).writeDoubleLE(t,o),8}};M.Double=kh;var Rh=class extends Ze{constructor(t){super(8,t);}decode(t,r=0){return Fe(t).readDoubleBE(r)}encode(t,r,o=0){return Fe(r).writeDoubleBE(t,o),8}};M.DoubleBE=Rh;var Th=class extends Ze{constructor(t,r,o){if(!(t instanceof Ze))throw new TypeError("elementLayout must be a Layout");if(!(r instanceof Ir&&r.isCount()||Number.isInteger(r)&&0<=r))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let n=-1;!(r instanceof Ir)&&0<t.span&&(n=r*t.span),super(n,o),this.elementLayout=t,this.count=r;}getSpan(t,r=0){if(0<=this.span)return this.span;let o=0,n=this.count;if(n instanceof Ir&&(n=n.decode(t,r)),0<this.elementLayout.span)o=n*this.elementLayout.span;else {let i=0;for(;i<n;)o+=this.elementLayout.getSpan(t,r+o),++i;}return o}decode(t,r=0){let o=[],n=0,i=this.count;for(i instanceof Ir&&(i=i.decode(t,r));n<i;)o.push(this.elementLayout.decode(t,r)),r+=this.elementLayout.getSpan(t,r),n+=1;return o}encode(t,r,o=0){let n=this.elementLayout,i=t.reduce((s,a)=>s+n.encode(a,r,o+s),0);return this.count instanceof Ir&&this.count.encode(t.length,r,o),i}};M.Sequence=Th;var $h=class extends Ze{constructor(t,r,o){if(!(Array.isArray(t)&&t.reduce((i,s)=>i&&s instanceof Ze,true)))throw new TypeError("fields must be array of Layout instances");typeof r=="boolean"&&o===void 0&&(o=r,r=void 0);for(let i of t)if(0>i.span&&i.property===void 0)throw new Error("fields cannot contain unnamed variable-length layout");let n=-1;try{n=t.reduce((i,s)=>i+s.getSpan(),0);}catch{}super(n,r),this.fields=t,this.decodePrefixes=!!o;}getSpan(t,r=0){if(0<=this.span)return this.span;let o=0;try{o=this.fields.reduce((n,i)=>{let s=i.getSpan(t,r);return r+=s,n+s},0);}catch{throw new RangeError("indeterminate span")}return o}decode(t,r=0){Hc(t);let o=this.makeDestinationObject();for(let n of this.fields)if(n.property!==void 0&&(o[n.property]=n.decode(t,r)),r+=n.getSpan(t,r),this.decodePrefixes&&t.length===r)break;return o}encode(t,r,o=0){let n=o,i=0,s=0;for(let a of this.fields){let c=a.span;if(s=0<c?c:0,a.property!==void 0){let u=t[a.property];u!==void 0&&(s=a.encode(u,r,o),0>c&&(c=a.getSpan(r,o)));}i=o,o+=c;}return i+s-n}fromArray(t){let r=this.makeDestinationObject();for(let o of this.fields)o.property!==void 0&&0<t.length&&(r[o.property]=t.shift());return r}layoutFor(t){if(typeof t!="string")throw new TypeError("property must be string");for(let r of this.fields)if(r.property===t)return r}offsetOf(t){if(typeof t!="string")throw new TypeError("property must be string");let r=0;for(let o of this.fields){if(o.property===t)return r;0>o.span?r=-1:0<=r&&(r+=o.span);}}};M.Structure=$h;var Ml=class{constructor(t){this.property=t;}decode(t,r){throw new Error("UnionDiscriminator is abstract")}encode(t,r,o){throw new Error("UnionDiscriminator is abstract")}};M.UnionDiscriminator=Ml;var Fc=class extends Ml{constructor(t,r){if(!(t instanceof Ir&&t.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(r||t.property||"variant"),this.layout=t;}decode(t,r){return this.layout.decode(t,r)}encode(t,r,o){return this.layout.encode(t,r,o)}};M.UnionLayoutDiscriminator=Fc;var Dl=class extends Ze{constructor(t,r,o){let n;if(t instanceof rn||t instanceof yn)n=new Fc(new Ul(t));else if(t instanceof Ir&&t.isCount())n=new Fc(t);else if(t instanceof Ml)n=t;else throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");if(r===void 0&&(r=null),!(r===null||r instanceof Ze))throw new TypeError("defaultLayout must be null or a Layout");if(r!==null){if(0>r.span)throw new Error("defaultLayout must have constant span");r.property===void 0&&(r=r.replicate("content"));}let i=-1;r&&(i=r.span,0<=i&&(t instanceof rn||t instanceof yn)&&(i+=n.layout.span)),super(i,o),this.discriminator=n,this.usesPrefixDiscriminator=t instanceof rn||t instanceof yn,this.defaultLayout=r,this.registry={};let s=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(a){return s(a)},this.configGetSourceVariant=function(a){s=a.bind(this);};}getSpan(t,r=0){if(0<=this.span)return this.span;let o=this.getVariant(t,r);if(!o)throw new Error("unable to determine span for unrecognized variant");return o.getSpan(t,r)}defaultGetSourceVariant(t){if(Object.prototype.hasOwnProperty.call(t,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(t,this.defaultLayout.property))return;let r=this.registry[t[this.discriminator.property]];if(r&&(!r.layout||r.property&&Object.prototype.hasOwnProperty.call(t,r.property)))return r}else for(let r in this.registry){let o=this.registry[r];if(o.property&&Object.prototype.hasOwnProperty.call(t,o.property))return o}throw new Error("unable to infer src variant")}decode(t,r=0){let o,n=this.discriminator,i=n.decode(t,r),s=this.registry[i];if(s===void 0){let a=this.defaultLayout,c=0;this.usesPrefixDiscriminator&&(c=n.layout.span),o=this.makeDestinationObject(),o[n.property]=i,o[a.property]=a.decode(t,r+c);}else o=s.decode(t,r);return o}encode(t,r,o=0){let n=this.getSourceVariant(t);if(n===void 0){let i=this.discriminator,s=this.defaultLayout,a=0;return this.usesPrefixDiscriminator&&(a=i.layout.span),i.encode(t[i.property],r,o),a+s.encode(t[s.property],r,o+a)}return n.encode(t,r,o)}addVariant(t,r,o){let n=new Oh(this,t,r,o);return this.registry[t]=n,n}getVariant(t,r=0){let o;return t instanceof Uint8Array?o=this.discriminator.decode(t,r):o=t,this.registry[o]}};M.Union=Dl;var Oh=class extends Ze{constructor(t,r,o,n){if(!(t instanceof Dl))throw new TypeError("union must be a Union");if(!Number.isInteger(r)||0>r)throw new TypeError("variant must be a (non-negative) integer");if(typeof o=="string"&&n===void 0&&(n=o,o=null),o){if(!(o instanceof Ze))throw new TypeError("layout must be a Layout");if(t.defaultLayout!==null&&0<=o.span&&o.span>t.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if(typeof n!="string")throw new TypeError("variant must have a String property")}let i=t.span;0>t.span&&(i=o?o.span:0,0<=i&&t.usesPrefixDiscriminator&&(i+=t.discriminator.layout.span)),super(i,n),this.union=t,this.variant=r,this.layout=o||null;}getSpan(t,r=0){if(0<=this.span)return this.span;let o=0;this.union.usesPrefixDiscriminator&&(o=this.union.discriminator.layout.span);let n=0;return this.layout&&(n=this.layout.getSpan(t,r+o)),o+n}decode(t,r=0){let o=this.makeDestinationObject();if(this!==this.union.getVariant(t,r))throw new Error("variant mismatch");let n=0;return this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout?o[this.property]=this.layout.decode(t,r+n):this.property?o[this.property]=true:this.union.usesPrefixDiscriminator&&(o[this.union.discriminator.property]=this.variant),o}encode(t,r,o=0){let n=0;if(this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(t,this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,r,o);let i=n;if(this.layout&&(this.layout.encode(t[this.property],r,o+n),i+=this.layout.getSpan(r,o+n),0<=this.union.span&&i>this.union.span))throw new Error("encoded variant overruns containing union");return i}fromArray(t){if(this.layout)return this.layout.fromArray(t)}};M.VariantLayout=Oh;function jc(e){return 0>e&&(e+=4294967296),e}var jl=class extends Ze{constructor(t,r,o){if(!(t instanceof rn||t instanceof yn))throw new TypeError("word must be a UInt or UIntBE layout");if(typeof r=="string"&&o===void 0&&(o=r,r=false),4<t.span)throw new RangeError("word cannot exceed 32 bits");super(t.span,o),this.word=t,this.msb=!!r,this.fields=[];let n=0;this._packedSetValue=function(i){return n=jc(i),this},this._packedGetValue=function(){return n};}decode(t,r=0){let o=this.makeDestinationObject(),n=this.word.decode(t,r);this._packedSetValue(n);for(let i of this.fields)i.property!==void 0&&(o[i.property]=i.decode(t));return o}encode(t,r,o=0){let n=this.word.decode(r,o);this._packedSetValue(n);for(let i of this.fields)if(i.property!==void 0){let s=t[i.property];s!==void 0&&i.encode(s);}return this.word.encode(this._packedGetValue(),r,o)}addField(t,r){let o=new Fl(this,t,r);return this.fields.push(o),o}addBoolean(t){let r=new Nh(this,t);return this.fields.push(r),r}fieldFor(t){if(typeof t!="string")throw new TypeError("property must be string");for(let r of this.fields)if(r.property===t)return r}};M.BitStructure=jl;var Fl=class{constructor(t,r,o){if(!(t instanceof jl))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(r)||0>=r)throw new TypeError("bits must be positive integer");let n=8*t.span,i=t.fields.reduce((s,a)=>s+a.bits,0);if(r+i>n)throw new Error("bits too long for span remainder ("+(n-i)+" of "+n+" remain)");this.container=t,this.bits=r,this.valueMask=(1<<r)-1,r===32&&(this.valueMask=4294967295),this.start=i,this.container.msb&&(this.start=n-i-r),this.wordMask=jc(this.valueMask<<this.start),this.property=o;}decode(t,r){let o=this.container._packedGetValue();return jc(o&this.wordMask)>>>this.start}encode(t){if(typeof t!="number"||!Number.isInteger(t)||t!==jc(t&this.valueMask))throw new TypeError(n_("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);let r=this.container._packedGetValue(),o=jc(t<<this.start);this.container._packedSetValue(jc(r&~this.wordMask)|o);}};M.BitField=Fl;var Nh=class extends Fl{constructor(t,r){super(t,1,r);}decode(t,r){return !!super.decode(t,r)}encode(t){typeof t=="boolean"&&(t=+t),super.encode(t);}};M.Boolean=Nh;var Ph=class extends Ze{constructor(t,r){if(!(t instanceof Ir&&t.isCount()||Number.isInteger(t)&&0<=t))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let o=-1;t instanceof Ir||(o=t),super(o,r),this.length=t;}getSpan(t,r){let o=this.span;return 0>o&&(o=this.length.decode(t,r)),o}decode(t,r=0){let o=this.span;return 0>o&&(o=this.length.decode(t,r)),Fe(t).slice(r,r+o)}encode(t,r,o){let n=this.length;if(this.length instanceof Ir&&(n=t.length),!(t instanceof Uint8Array&&n===t.length))throw new TypeError(n_("Blob.encode",this)+" requires (length "+n+") Uint8Array as src");if(o+n>r.length)throw new RangeError("encoding overruns Uint8Array");let i=Fe(t);return Fe(r).write(i.toString("hex"),o,n,"hex"),this.length instanceof Ir&&this.length.encode(n,r,o),n}};M.Blob=Ph;var Bh=class extends Ze{constructor(t){super(-1,t);}getSpan(t,r=0){Hc(t);let o=r;for(;o<t.length&&t[o]!==0;)o+=1;return 1+o-r}decode(t,r=0){let o=this.getSpan(t,r);return Fe(t).slice(r,r+o-1).toString("utf-8")}encode(t,r,o=0){typeof t!="string"&&(t=String(t));let n=r_.Buffer.from(t,"utf8"),i=n.length;if(o+i>r.length)throw new RangeError("encoding overruns Buffer");let s=Fe(r);return n.copy(s,o),s[o+i]=0,i+1}};M.CString=Bh;var Ch=class extends Ze{constructor(t,r){if(typeof t=="string"&&r===void 0&&(r=t,t=void 0),t===void 0)t=-1;else if(!Number.isInteger(t))throw new TypeError("maxSpan must be an integer");super(-1,r),this.maxSpan=t;}getSpan(t,r=0){return Hc(t),t.length-r}decode(t,r=0){let o=this.getSpan(t,r);if(0<=this.maxSpan&&this.maxSpan<o)throw new RangeError("text length exceeds maxSpan");return Fe(t).slice(r,r+o).toString("utf-8")}encode(t,r,o=0){typeof t!="string"&&(t=String(t));let n=r_.Buffer.from(t,"utf8"),i=n.length;if(0<=this.maxSpan&&this.maxSpan<i)throw new RangeError("text length exceeds maxSpan");if(o+i>r.length)throw new RangeError("encoding overruns Buffer");return n.copy(Fe(r),o),i}};M.UTF8=Ch;var zh=class extends Ze{constructor(t,r){super(0,r),this.value=t;}decode(t,r){return this.value}encode(t,r,o){return 0}};M.Constant=zh;M.greedy=((e,t)=>new vh(e,t));M.offset=((e,t,r)=>new Ul(e,t,r));M.u8=(e=>new rn(1,e));M.u16=(e=>new rn(2,e));M.u24=(e=>new rn(3,e));M.u32=(e=>new rn(4,e));M.u40=(e=>new rn(5,e));M.u48=(e=>new rn(6,e));M.nu64=(e=>new wh(e));M.u16be=(e=>new yn(2,e));M.u24be=(e=>new yn(3,e));M.u32be=(e=>new yn(4,e));M.u40be=(e=>new yn(5,e));M.u48be=(e=>new yn(6,e));M.nu64be=(e=>new _h(e));M.s8=(e=>new mi(1,e));M.s16=(e=>new mi(2,e));M.s24=(e=>new mi(3,e));M.s32=(e=>new mi(4,e));M.s40=(e=>new mi(5,e));M.s48=(e=>new mi(6,e));M.ns64=(e=>new Eh(e));M.s16be=(e=>new ns(2,e));M.s24be=(e=>new ns(3,e));M.s32be=(e=>new ns(4,e));M.s40be=(e=>new ns(5,e));M.s48be=(e=>new ns(6,e));M.ns64be=(e=>new Sh(e));M.f32=(e=>new Ih(e));M.f32be=(e=>new Ah(e));M.f64=(e=>new kh(e));M.f64be=(e=>new Rh(e));M.struct=((e,t,r)=>new $h(e,t,r));M.bits=((e,t,r)=>new jl(e,t,r));M.seq=((e,t,r)=>new Th(e,t,r));M.union=((e,t,r)=>new Dl(e,t,r));M.unionLayoutDiscriminator=((e,t)=>new Fc(e,t));M.blob=((e,t)=>new Ph(e,t));M.cstr=(e=>new Bh(e));M.utf8=((e,t)=>new Ch(e,t));M.constant=((e,t)=>new zh(e,t));});function Zl(){if(!Fh&&(Fh=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Fh))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Fh(Uj)}var Fh,Uj,h_=F(()=>{Uj=new Uint8Array(16);});var uk,fk=F(()=>{uk=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;});function Mj(e){return typeof e=="string"&&uk.test(e)}var is,Gl=F(()=>{fk();is=Mj;});function Dj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=(hr[e[t+0]]+hr[e[t+1]]+hr[e[t+2]]+hr[e[t+3]]+"-"+hr[e[t+4]]+hr[e[t+5]]+"-"+hr[e[t+6]]+hr[e[t+7]]+"-"+hr[e[t+8]]+hr[e[t+9]]+"-"+hr[e[t+10]]+hr[e[t+11]]+hr[e[t+12]]+hr[e[t+13]]+hr[e[t+14]]+hr[e[t+15]]).toLowerCase();if(!is(r))throw TypeError("Stringified UUID is invalid");return r}var hr,Hh,ss,ql=F(()=>{Gl();hr=[];for(Hh=0;Hh<256;++Hh)hr.push((Hh+256).toString(16).substr(1));ss=Dj;});function jj(e,t,r){var o=t&&r||0,n=t||new Array(16);e=e||{};var i=e.node||lk,s=e.clockseq!==void 0?e.clockseq:g_;if(i==null||s==null){var a=e.random||(e.rng||Zl)();i==null&&(i=lk=[a[0]|1,a[1],a[2],a[3],a[4],a[5]]),s==null&&(s=g_=(a[6]<<8|a[7])&16383);}var c=e.msecs!==void 0?e.msecs:Date.now(),u=e.nsecs!==void 0?e.nsecs:b_+1,f=c-y_+(u-b_)/1e4;if(f<0&&e.clockseq===void 0&&(s=s+1&16383),(f<0||c>y_)&&e.nsecs===void 0&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");y_=c,b_=u,g_=s,c+=122192928e5;var d=((c&268435455)*1e4+u)%4294967296;n[o++]=d>>>24&255,n[o++]=d>>>16&255,n[o++]=d>>>8&255,n[o++]=d&255;var g=c/4294967296*1e4&268435455;n[o++]=g>>>8&255,n[o++]=g&255,n[o++]=g>>>24&15|16,n[o++]=g>>>16&255,n[o++]=s>>>8|128,n[o++]=s&255;for(var h=0;h<6;++h)n[o+h]=i[h];return t||ss(n)}var lk,g_,y_,b_,dk,pk=F(()=>{h_();ql();y_=0,b_=0;dk=jj;});function Fj(e){if(!is(e))throw TypeError("Invalid UUID");var t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}var Vh,x_=F(()=>{Gl();Vh=Fj;});function Hj(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}function Zh(e,t,r){function o(n,i,s,a){if(typeof n=="string"&&(n=Hj(n)),typeof i=="string"&&(i=Vh(i)),i.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var c=new Uint8Array(16+n.length);if(c.set(i),c.set(n,i.length),c=r(c),c[6]=c[6]&15|t,c[8]=c[8]&63|128,s){a=a||0;for(var u=0;u<16;++u)s[a+u]=c[u];return s}return ss(c)}try{o.name=e;}catch{}return o.DNS=Vj,o.URL=Zj,o}var Vj,Zj,v_=F(()=>{ql();x_();Vj="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Zj="6ba7b811-9dad-11d1-80b4-00c04fd430c8";});function Gj(e){if(typeof e=="string"){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var r=0;r<t.length;++r)e[r]=t.charCodeAt(r);}return qj(Wj(Kj(e),e.length*8))}function qj(e){for(var t=[],r=e.length*32,o="0123456789abcdef",n=0;n<r;n+=8){var i=e[n>>5]>>>n%32&255,s=parseInt(o.charAt(i>>>4&15)+o.charAt(i&15),16);t.push(s);}return t}function mk(e){return (e+64>>>9<<4)+14+1}function Wj(e,t){e[t>>5]|=128<<t%32,e[mk(t)-1]=t;for(var r=1732584193,o=-271733879,n=-1732584194,i=271733878,s=0;s<e.length;s+=16){var a=r,c=o,u=n,f=i;r=kr(r,o,n,i,e[s],7,-680876936),i=kr(i,r,o,n,e[s+1],12,-389564586),n=kr(n,i,r,o,e[s+2],17,606105819),o=kr(o,n,i,r,e[s+3],22,-1044525330),r=kr(r,o,n,i,e[s+4],7,-176418897),i=kr(i,r,o,n,e[s+5],12,1200080426),n=kr(n,i,r,o,e[s+6],17,-1473231341),o=kr(o,n,i,r,e[s+7],22,-45705983),r=kr(r,o,n,i,e[s+8],7,1770035416),i=kr(i,r,o,n,e[s+9],12,-1958414417),n=kr(n,i,r,o,e[s+10],17,-42063),o=kr(o,n,i,r,e[s+11],22,-1990404162),r=kr(r,o,n,i,e[s+12],7,1804603682),i=kr(i,r,o,n,e[s+13],12,-40341101),n=kr(n,i,r,o,e[s+14],17,-1502002290),o=kr(o,n,i,r,e[s+15],22,1236535329),r=Rr(r,o,n,i,e[s+1],5,-165796510),i=Rr(i,r,o,n,e[s+6],9,-1069501632),n=Rr(n,i,r,o,e[s+11],14,643717713),o=Rr(o,n,i,r,e[s],20,-373897302),r=Rr(r,o,n,i,e[s+5],5,-701558691),i=Rr(i,r,o,n,e[s+10],9,38016083),n=Rr(n,i,r,o,e[s+15],14,-660478335),o=Rr(o,n,i,r,e[s+4],20,-405537848),r=Rr(r,o,n,i,e[s+9],5,568446438),i=Rr(i,r,o,n,e[s+14],9,-1019803690),n=Rr(n,i,r,o,e[s+3],14,-187363961),o=Rr(o,n,i,r,e[s+8],20,1163531501),r=Rr(r,o,n,i,e[s+13],5,-1444681467),i=Rr(i,r,o,n,e[s+2],9,-51403784),n=Rr(n,i,r,o,e[s+7],14,1735328473),o=Rr(o,n,i,r,e[s+12],20,-1926607734),r=Tr(r,o,n,i,e[s+5],4,-378558),i=Tr(i,r,o,n,e[s+8],11,-2022574463),n=Tr(n,i,r,o,e[s+11],16,1839030562),o=Tr(o,n,i,r,e[s+14],23,-35309556),r=Tr(r,o,n,i,e[s+1],4,-1530992060),i=Tr(i,r,o,n,e[s+4],11,1272893353),n=Tr(n,i,r,o,e[s+7],16,-155497632),o=Tr(o,n,i,r,e[s+10],23,-1094730640),r=Tr(r,o,n,i,e[s+13],4,681279174),i=Tr(i,r,o,n,e[s],11,-358537222),n=Tr(n,i,r,o,e[s+3],16,-722521979),o=Tr(o,n,i,r,e[s+6],23,76029189),r=Tr(r,o,n,i,e[s+9],4,-640364487),i=Tr(i,r,o,n,e[s+12],11,-421815835),n=Tr(n,i,r,o,e[s+15],16,530742520),o=Tr(o,n,i,r,e[s+2],23,-995338651),r=$r(r,o,n,i,e[s],6,-198630844),i=$r(i,r,o,n,e[s+7],10,1126891415),n=$r(n,i,r,o,e[s+14],15,-1416354905),o=$r(o,n,i,r,e[s+5],21,-57434055),r=$r(r,o,n,i,e[s+12],6,1700485571),i=$r(i,r,o,n,e[s+3],10,-1894986606),n=$r(n,i,r,o,e[s+10],15,-1051523),o=$r(o,n,i,r,e[s+1],21,-2054922799),r=$r(r,o,n,i,e[s+8],6,1873313359),i=$r(i,r,o,n,e[s+15],10,-30611744),n=$r(n,i,r,o,e[s+6],15,-1560198380),o=$r(o,n,i,r,e[s+13],21,1309151649),r=$r(r,o,n,i,e[s+4],6,-145523070),i=$r(i,r,o,n,e[s+11],10,-1120210379),n=$r(n,i,r,o,e[s+2],15,718787259),o=$r(o,n,i,r,e[s+9],21,-343485551),r=as(r,a),o=as(o,c),n=as(n,u),i=as(i,f);}return [r,o,n,i]}function Kj(e){if(e.length===0)return [];for(var t=e.length*8,r=new Uint32Array(mk(t)),o=0;o<t;o+=8)r[o>>5]|=(e[o/8]&255)<<o%32;return r}function as(e,t){var r=(e&65535)+(t&65535),o=(e>>16)+(t>>16)+(r>>16);return o<<16|r&65535}function Jj(e,t){return e<<t|e>>>32-t}function Gh(e,t,r,o,n,i){return as(Jj(as(as(t,e),as(o,i)),n),r)}function kr(e,t,r,o,n,i,s){return Gh(t&r|~t&o,e,t,n,i,s)}function Rr(e,t,r,o,n,i,s){return Gh(t&o|r&~o,e,t,n,i,s)}function Tr(e,t,r,o,n,i,s){return Gh(t^r^o,e,t,n,i,s)}function $r(e,t,r,o,n,i,s){return Gh(r^(t|~o),e,t,n,i,s)}var hk,gk=F(()=>{hk=Gj;});var Yj,yk,bk=F(()=>{v_();gk();Yj=Zh("v3",48,hk),yk=Yj;});function Xj(e,t,r){e=e||{};var o=e.random||(e.rng||Zl)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){r=r||0;for(var n=0;n<16;++n)t[r+n]=o[n];return t}return ss(o)}var xk,vk=F(()=>{h_();ql();xk=Xj;});function Qj(e,t,r,o){switch(e){case 0:return t&r^~t&o;case 1:return t^r^o;case 2:return t&r^t&o^r&o;case 3:return t^r^o}}function w_(e,t){return e<<t|e>>>32-t}function e7(e){var t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){var o=unescape(encodeURIComponent(e));e=[];for(var n=0;n<o.length;++n)e.push(o.charCodeAt(n));}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var i=e.length/4+2,s=Math.ceil(i/16),a=new Array(s),c=0;c<s;++c){for(var u=new Uint32Array(16),f=0;f<16;++f)u[f]=e[c*64+f*4]<<24|e[c*64+f*4+1]<<16|e[c*64+f*4+2]<<8|e[c*64+f*4+3];a[c]=u;}a[s-1][14]=(e.length-1)*8/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=(e.length-1)*8&4294967295;for(var d=0;d<s;++d){for(var g=new Uint32Array(80),h=0;h<16;++h)g[h]=a[d][h];for(var v=16;v<80;++v)g[v]=w_(g[v-3]^g[v-8]^g[v-14]^g[v-16],1);for(var E=r[0],R=r[1],$=r[2],N=r[3],O=r[4],I=0;I<80;++I){var P=Math.floor(I/20),L=w_(E,5)+Qj(P,R,$,N)+O+t[P]+g[I]>>>0;O=N,N=$,$=w_(R,30)>>>0,R=E,E=L;}r[0]=r[0]+E>>>0,r[1]=r[1]+R>>>0,r[2]=r[2]+$>>>0,r[3]=r[3]+N>>>0,r[4]=r[4]+O>>>0;}return [r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var wk,_k=F(()=>{wk=e7;});var t7,Ek,Sk=F(()=>{v_();_k();t7=Zh("v5",80,wk),Ek=t7;});var Ik,Ak=F(()=>{Ik="00000000-0000-0000-0000-000000000000";});function r7(e){if(!is(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}var kk,Rk=F(()=>{Gl();kk=r7;});var __={};Er(__,{NIL:()=>Ik,parse:()=>Vh,stringify:()=>ss,v1:()=>dk,v3:()=>yk,v4:()=>xk,v5:()=>Ek,validate:()=>is,version:()=>kk});var E_=F(()=>{pk();bk();vk();Sk();Ak();Rk();Gl();ql();x_();});var $k=Wr((RX,Tk)=>{var n7=(E_(),jE(__)).v4,o7=function(e,t,r,o){if(typeof e!="string")throw new TypeError(e+" must be a string");o=o||{};let n=typeof o.version=="number"?o.version:2;if(n!==1&&n!==2)throw new TypeError(n+" must be 1 or 2");let i={method:e};if(n===2&&(i.jsonrpc="2.0"),t){if(typeof t!="object"&&!Array.isArray(t))throw new TypeError(t+" must be an object, array or omitted");i.params=t;}if(typeof r>"u"){let s=typeof o.generator=="function"?o.generator:function(){return n7()};i.id=s(i,o);}else n===2&&r===null?o.notificationIdNull&&(i.id=null):i.id=r;return i};Tk.exports=o7;});var Nk=Wr((TX,Ok)=>{var i7=(E_(),jE(__)).v4,s7=$k(),Wl=function(e,t){if(!(this instanceof Wl))return new Wl(e,t);t||(t={}),this.options={reviver:typeof t.reviver<"u"?t.reviver:null,replacer:typeof t.replacer<"u"?t.replacer:null,generator:typeof t.generator<"u"?t.generator:function(){return i7()},version:typeof t.version<"u"?t.version:2,notificationIdNull:typeof t.notificationIdNull=="boolean"?t.notificationIdNull:false},this.callServer=e;};Ok.exports=Wl;Wl.prototype.request=function(e,t,r,o){let n=this,i=null,s=Array.isArray(e)&&typeof t=="function";if(this.options.version===1&&s)throw new TypeError("JSON-RPC 1.0 does not support batching");if(s||!s&&e&&typeof e=="object"&&typeof t=="function")o=t,i=e;else {typeof r=="function"&&(o=r,r=void 0);let u=typeof o=="function";try{i=s7(e,t,r,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull});}catch(f){if(u){o(f);return}throw f}if(!u)return i}let c;try{c=JSON.stringify(i,this.options.replacer);}catch(u){o(u);return}return this.callServer(c,function(u,f){n._parseResponse(u,f,o);}),i};Wl.prototype._parseResponse=function(e,t,r){if(e){r(e);return}if(!t){r();return}let o;try{o=JSON.parse(t,this.options.reviver);}catch(n){r(n);return}if(r.length===3)if(Array.isArray(o)){let n=function(s){return typeof s.error<"u"},i=function(s){return !n(s)};r(null,o.filter(n),o.filter(i));return}else {r(null,o.error,o.result);return}r(null,o);};});var Bk=Wr(($X,S_)=>{var a7=Object.prototype.hasOwnProperty,Vr="~";function Kl(){}Object.create&&(Kl.prototype=Object.create(null),new Kl().__proto__||(Vr=false));function c7(e,t,r){this.fn=e,this.context=t,this.once=r||false;}function Pk(e,t,r,o,n){if(typeof r!="function")throw new TypeError("The listener must be a function");var i=new c7(r,o||e,n),s=Vr?Vr+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],i]:e._events[s].push(i):(e._events[s]=i,e._eventsCount++),e}function qh(e,t){--e._eventsCount===0?e._events=new Kl:delete e._events[t];}function Or(){this._events=new Kl,this._eventsCount=0;}Or.prototype.eventNames=function(){var t=[],r,o;if(this._eventsCount===0)return t;for(o in r=this._events)a7.call(r,o)&&t.push(Vr?o.slice(1):o);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(r)):t};Or.prototype.listeners=function(t){var r=Vr?Vr+t:t,o=this._events[r];if(!o)return [];if(o.fn)return [o.fn];for(var n=0,i=o.length,s=new Array(i);n<i;n++)s[n]=o[n].fn;return s};Or.prototype.listenerCount=function(t){var r=Vr?Vr+t:t,o=this._events[r];return o?o.fn?1:o.length:0};Or.prototype.emit=function(t,r,o,n,i,s){var a=Vr?Vr+t:t;if(!this._events[a])return false;var c=this._events[a],u=arguments.length,f,d;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,true),u){case 1:return c.fn.call(c.context),true;case 2:return c.fn.call(c.context,r),true;case 3:return c.fn.call(c.context,r,o),true;case 4:return c.fn.call(c.context,r,o,n),true;case 5:return c.fn.call(c.context,r,o,n,i),true;case 6:return c.fn.call(c.context,r,o,n,i,s),true}for(d=1,f=new Array(u-1);d<u;d++)f[d-1]=arguments[d];c.fn.apply(c.context,f);}else {var g=c.length,h;for(d=0;d<g;d++)switch(c[d].once&&this.removeListener(t,c[d].fn,void 0,true),u){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,r);break;case 3:c[d].fn.call(c[d].context,r,o);break;case 4:c[d].fn.call(c[d].context,r,o,n);break;default:if(!f)for(h=1,f=new Array(u-1);h<u;h++)f[h-1]=arguments[h];c[d].fn.apply(c[d].context,f);}}return true};Or.prototype.on=function(t,r,o){return Pk(this,t,r,o,false)};Or.prototype.once=function(t,r,o){return Pk(this,t,r,o,true)};Or.prototype.removeListener=function(t,r,o,n){var i=Vr?Vr+t:t;if(!this._events[i])return this;if(!r)return qh(this,i),this;var s=this._events[i];if(s.fn)s.fn===r&&(!n||s.once)&&(!o||s.context===o)&&qh(this,i);else {for(var a=0,c=[],u=s.length;a<u;a++)(s[a].fn!==r||n&&!s[a].once||o&&s[a].context!==o)&&c.push(s[a]);c.length?this._events[i]=c.length===1?c[0]:c:qh(this,i);}return this};Or.prototype.removeAllListeners=function(t){var r;return t?(r=Vr?Vr+t:t,this._events[r]&&qh(this,r)):(this._events=new Kl,this._eventsCount=0),this};Or.prototype.off=Or.prototype.removeListener;Or.prototype.addListener=Or.prototype.on;Or.prefixed=Vr;Or.EventEmitter=Or;typeof S_<"u"&&(S_.exports=Or);});function y7(e,t=24){let r=new Uint32Array(10);for(let o=24-t;o<24;o++){for(let s=0;s<10;s++)r[s]=e[s]^e[s+10]^e[s+20]^e[s+30]^e[s+40];for(let s=0;s<10;s+=2){let a=(s+8)%10,c=(s+2)%10,u=r[c],f=r[c+1],d=zk(u,f,1)^r[a],g=Lk(u,f,1)^r[a+1];for(let h=0;h<50;h+=10)e[s+h]^=d,e[s+h+1]^=g;}let n=e[2],i=e[3];for(let s=0;s<24;s++){let a=Mk[s],c=zk(n,i,a),u=Lk(n,i,a),f=Uk[s];n=e[f],i=e[f+1],e[f]=c,e[f+1]=u;}for(let s=0;s<50;s+=10){for(let a=0;a<10;a++)r[a]=e[s+a];for(let a=0;a<10;a++)e[s+a]^=~r[(a+2)%10]&r[(a+4)%10];}e[0]^=h7[o],e[1]^=g7[o];}Nn(r);}var f7,Yl,l7,d7,p7,m7,Uk,Mk,Dk,jk,h7,g7,zk,Lk,I_,b7,Ra,Wh=F(()=>{Ow();ai();f7=BigInt(0),Yl=BigInt(1),l7=BigInt(2),d7=BigInt(7),p7=BigInt(256),m7=BigInt(113),Uk=[],Mk=[],Dk=[];for(let e=0,t=Yl,r=1,o=0;e<24;e++){[r,o]=[o,(2*r+3*o)%5],Uk.push(2*(5*o+r)),Mk.push((e+1)*(e+2)/2%64);let n=f7;for(let i=0;i<7;i++)t=(t<<Yl^(t>>d7)*m7)%p7,t&l7&&(n^=Yl<<(Yl<<BigInt(i))-Yl);Dk.push(n);}jk=oh(Dk,true),h7=jk[0],g7=jk[1],zk=(e,t,r)=>r>32?WI(e,t,r):GI(e,t,r),Lk=(e,t,r)=>r>32?KI(e,t,r):qI(e,t,r);I_=class e extends Ji{constructor(t,r,o,n=false,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=false,this.destroyed=false,this.enableXOF=false,this.blockLen=t,this.suffix=r,this.outputLen=o,this.enableXOF=n,this.rounds=i,la(o),!(0<t&&t<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=DI(this.state);}clone(){return this._cloneInto()}keccak(){kw(this.state32),y7(this.state32,this.rounds),kw(this.state32),this.posOut=0,this.pos=0;}update(t){si(this),t=da(t),Ao(t);let{blockLen:r,state:o}=this,n=t.length;for(let i=0;i<n;){let s=Math.min(r-this.pos,n-i);for(let a=0;a<s;a++)o[this.pos++]^=t[i++];this.pos===r&&this.keccak();}return this}finish(){if(this.finished)return;this.finished=true;let{state:t,suffix:r,pos:o,blockLen:n}=this;t[o]^=r,(r&128)!==0&&o===n-1&&this.keccak(),t[n-1]^=128,this.keccak();}writeInto(t){si(this,false),Ao(t),this.finish();let r=this.state,{blockLen:o}=this;for(let n=0,i=t.length;n<i;){this.posOut>=o&&this.keccak();let s=Math.min(o-this.posOut,i-n);t.set(r.subarray(this.posOut,this.posOut+s),n),this.posOut+=s,n+=s;}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return la(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(th(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=true,Nn(this.state);}_cloneInto(t){let{blockLen:r,suffix:o,outputLen:n,rounds:i,enableXOF:s}=this;return t||(t=new e(r,o,n,s,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=o,t.outputLen=n,t.enableXOF=s,t.destroyed=this.destroyed,t}},b7=(e,t,r)=>Tl(()=>new I_(t,e,r)),Ra=b7(1,136,256/8);});var Kh,A_,Fk=F(()=>{ai();Kh=class extends Ji{constructor(t,r){super(),this.finished=false,this.destroyed=false,MI(t);let o=da(r);if(this.iHash=t.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;let n=this.blockLen,i=new Uint8Array(n);i.set(o.length>n?t.create().update(o).digest():o);for(let s=0;s<i.length;s++)i[s]^=54;this.iHash.update(i),this.oHash=t.create();for(let s=0;s<i.length;s++)i[s]^=106;this.oHash.update(i),Nn(i);}update(t){return si(this),this.iHash.update(t),this}digestInto(t){si(this),Ao(t,this.outputLen),this.finished=true,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy();}digest(){let t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));let{oHash:r,iHash:o,finished:n,destroyed:i,blockLen:s,outputLen:a}=this;return t=t,t.finished=n,t.destroyed=i,t.blockLen=s,t.outputLen=a,t.oHash=r._cloneInto(t.oHash),t.iHash=o._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=true,this.oHash.destroy(),this.iHash.destroy();}},A_=(e,t,r)=>new Kh(e,t).update(r).digest();A_.create=(e,t)=>new Kh(e,t);});function Hk(e){e.lowS!==void 0&&Ro("lowS",e.lowS),e.prehash!==void 0&&Ro("prehash",e.prehash);}function x7(e){let t=Cl(e);to(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});let{endo:r,Fp:o,a:n}=t;if(r){if(!o.eql(n,o.ZERO))throw new Error("invalid endo: CURVE.a must be 0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}function k_(e,t){return es(To(e,t))}function v7(e){let t=x7(e),{Fp:r}=t,o=di(t.n,t.nBitLength),n=t.toBytes||((O,I,P)=>{let L=I.toAffine();return ar(Uint8Array.from([4]),r.toBytes(L.x),r.toBytes(L.y))}),i=t.fromBytes||(O=>{let I=O.subarray(1),P=r.fromBytes(I.subarray(0,r.BYTES)),L=r.fromBytes(I.subarray(r.BYTES,2*r.BYTES));return {x:P,y:L}});function s(O){let{a:I,b:P}=t,L=r.sqr(O),C=r.mul(L,O);return r.add(r.add(C,r.mul(O,I)),P)}function a(O,I){let P=r.sqr(I),L=s(O);return r.eql(P,L)}if(!a(t.Gx,t.Gy))throw new Error("bad curve params: generator point");let c=r.mul(r.pow(t.a,Xl),T_),u=r.mul(r.sqr(t.b),BigInt(27));if(r.is0(r.add(c,u)))throw new Error("bad curve params: a or b");function f(O){return ya(O,Je,t.n)}function d(O){let{allowedPrivateKeyLengths:I,nByteLength:P,wrapPrivateKey:L,n:C}=t;if(I&&typeof O!="bigint"){if(Lc(O)&&(O=es(O)),typeof O!="string"||!I.includes(O.length))throw new Error("invalid private key");O=O.padStart(P*2,"0");}let D;try{D=typeof O=="bigint"?O:tn(Ge("private key",O,P));}catch{throw new Error("invalid private key, expected hex or "+P+" bytes, got "+typeof O)}return L&&(D=Le(D,C)),Dr("private key",D,Je,C),D}function g(O){if(!(O instanceof E))throw new Error("ProjectivePoint expected")}let h=Mc((O,I)=>{let{px:P,py:L,pz:C}=O;if(r.eql(C,r.ONE))return {x:P,y:L};let D=O.is0();I==null&&(I=D?r.ONE:r.inv(C));let q=r.mul(P,I),H=r.mul(L,I),Z=r.mul(C,I);if(D)return {x:r.ZERO,y:r.ZERO};if(!r.eql(Z,r.ONE))throw new Error("invZ was invalid");return {x:q,y:H}}),v=Mc(O=>{if(O.is0()){if(t.allowInfinityPoint&&!r.is0(O.py))return;throw new Error("bad point: ZERO")}let{x:I,y:P}=O.toAffine();if(!r.isValid(I)||!r.isValid(P))throw new Error("bad point: x or y not FE");if(!a(I,P))throw new Error("bad point: equation left != right");if(!O.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return true});class E{constructor(I,P,L){if(I==null||!r.isValid(I))throw new Error("x required");if(P==null||!r.isValid(P)||r.is0(P))throw new Error("y required");if(L==null||!r.isValid(L))throw new Error("z required");this.px=I,this.py=P,this.pz=L,Object.freeze(this);}static fromAffine(I){let{x:P,y:L}=I||{};if(!I||!r.isValid(P)||!r.isValid(L))throw new Error("invalid affine point");if(I instanceof E)throw new Error("projective point not allowed");let C=D=>r.eql(D,r.ZERO);return C(P)&&C(L)?E.ZERO:new E(P,L,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(I){let P=li(r,I.map(L=>L.pz));return I.map((L,C)=>L.toAffine(P[C])).map(E.fromAffine)}static fromHex(I){let P=E.fromAffine(i(Ge("pointHex",I)));return P.assertValidity(),P}static fromPrivateKey(I){return E.BASE.multiply(d(I))}static msm(I,P){return lh(E,o,I,P)}_setWindowSize(I){N.setWindowSize(this,I);}assertValidity(){v(this);}hasEvenY(){let{y:I}=this.toAffine();if(r.isOdd)return !r.isOdd(I);throw new Error("Field doesn't support isOdd")}equals(I){g(I);let{px:P,py:L,pz:C}=this,{px:D,py:q,pz:H}=I,Z=r.eql(r.mul(P,H),r.mul(D,C)),re=r.eql(r.mul(L,H),r.mul(q,C));return Z&&re}negate(){return new E(this.px,r.neg(this.py),this.pz)}double(){let{a:I,b:P}=t,L=r.mul(P,Xl),{px:C,py:D,pz:q}=this,H=r.ZERO,Z=r.ZERO,re=r.ZERO,S=r.mul(C,C),l=r.mul(D,D),m=r.mul(q,q),y=r.mul(C,D);return y=r.add(y,y),re=r.mul(C,q),re=r.add(re,re),H=r.mul(I,re),Z=r.mul(L,m),Z=r.add(H,Z),H=r.sub(l,Z),Z=r.add(l,Z),Z=r.mul(H,Z),H=r.mul(y,H),re=r.mul(L,re),m=r.mul(I,m),y=r.sub(S,m),y=r.mul(I,y),y=r.add(y,re),re=r.add(S,S),S=r.add(re,S),S=r.add(S,m),S=r.mul(S,y),Z=r.add(Z,S),m=r.mul(D,q),m=r.add(m,m),S=r.mul(m,y),H=r.sub(H,S),re=r.mul(m,l),re=r.add(re,re),re=r.add(re,re),new E(H,Z,re)}add(I){g(I);let{px:P,py:L,pz:C}=this,{px:D,py:q,pz:H}=I,Z=r.ZERO,re=r.ZERO,S=r.ZERO,l=t.a,m=r.mul(t.b,Xl),y=r.mul(P,D),b=r.mul(L,q),x=r.mul(C,H),_=r.add(P,L),k=r.add(D,q);_=r.mul(_,k),k=r.add(y,b),_=r.sub(_,k),k=r.add(P,C);let w=r.add(D,H);return k=r.mul(k,w),w=r.add(y,x),k=r.sub(k,w),w=r.add(L,C),Z=r.add(q,H),w=r.mul(w,Z),Z=r.add(b,x),w=r.sub(w,Z),S=r.mul(l,k),Z=r.mul(m,x),S=r.add(Z,S),Z=r.sub(b,S),S=r.add(b,S),re=r.mul(Z,S),b=r.add(y,y),b=r.add(b,y),x=r.mul(l,x),k=r.mul(m,k),b=r.add(b,x),x=r.sub(y,x),x=r.mul(l,x),k=r.add(k,x),y=r.mul(b,k),re=r.add(re,y),y=r.mul(w,k),Z=r.mul(_,Z),Z=r.sub(Z,y),y=r.mul(_,b),S=r.mul(w,S),S=r.add(S,y),new E(Z,re,S)}subtract(I){return this.add(I.negate())}is0(){return this.equals(E.ZERO)}wNAF(I){return N.wNAFCached(this,I,E.normalizeZ)}multiplyUnsafe(I){let{endo:P,n:L}=t;Dr("scalar",I,oo,L);let C=E.ZERO;if(I===oo)return C;if(this.is0()||I===Je)return this;if(!P||N.hasPrecomputes(this))return N.wNAFCachedUnsafe(this,I,E.normalizeZ);let{k1neg:D,k1:q,k2neg:H,k2:Z}=P.splitScalar(I),re=C,S=C,l=this;for(;q>oo||Z>oo;)q&Je&&(re=re.add(l)),Z&Je&&(S=S.add(l)),l=l.double(),q>>=Je,Z>>=Je;return D&&(re=re.negate()),H&&(S=S.negate()),S=new E(r.mul(S.px,P.beta),S.py,S.pz),re.add(S)}multiply(I){let{endo:P,n:L}=t;Dr("scalar",I,Je,L);let C,D;if(P){let{k1neg:q,k1:H,k2neg:Z,k2:re}=P.splitScalar(I),{p:S,f:l}=this.wNAF(H),{p:m,f:y}=this.wNAF(re);S=N.constTimeNegate(q,S),m=N.constTimeNegate(Z,m),m=new E(r.mul(m.px,P.beta),m.py,m.pz),C=S.add(m),D=l.add(y);}else {let{p:q,f:H}=this.wNAF(I);C=q,D=H;}return E.normalizeZ([C,D])[0]}multiplyAndAddUnsafe(I,P,L){let C=E.BASE,D=(H,Z)=>Z===oo||Z===Je||!H.equals(C)?H.multiplyUnsafe(Z):H.multiply(Z),q=D(this,P).add(D(I,L));return q.is0()?void 0:q}toAffine(I){return h(this,I)}isTorsionFree(){let{h:I,isTorsionFree:P}=t;if(I===Je)return true;if(P)return P(E,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:I,clearCofactor:P}=t;return I===Je?this:P?P(E,this):this.multiplyUnsafe(t.h)}toRawBytes(I=true){return Ro("isCompressed",I),this.assertValidity(),n(E,this,I)}toHex(I=true){return Ro("isCompressed",I),es(this.toRawBytes(I))}}E.BASE=new E(t.Gx,t.Gy,r.ONE),E.ZERO=new E(r.ZERO,r.ONE,r.ZERO);let{endo:R,nBitLength:$}=t,N=fh(E,R?Math.ceil($/2):$);return {CURVE:t,ProjectivePoint:E,normPrivateKeyToScalar:d,weierstrassEquation:s,isWithinCurveOrder:f}}function w7(e){let t=Cl(e);return to(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:true,...t})}function Vk(e){let t=w7(e),{Fp:r,n:o,nByteLength:n,nBitLength:i}=t,s=r.BYTES+1,a=2*r.BYTES+1;function c(m){return Le(m,o)}function u(m){return ch(m,o)}let{ProjectivePoint:f,normPrivateKeyToScalar:d,weierstrassEquation:g,isWithinCurveOrder:h}=v7({...t,toBytes(m,y,b){let x=y.toAffine(),_=r.toBytes(x.x),k=ar;return Ro("isCompressed",b),b?k(Uint8Array.from([y.hasEvenY()?2:3]),_):k(Uint8Array.from([4]),_,r.toBytes(x.y))},fromBytes(m){let y=m.length,b=m[0],x=m.subarray(1);if(y===s&&(b===2||b===3)){let _=tn(x);if(!ya(_,Je,r.ORDER))throw new Error("Point is not on curve");let k=g(_),w;try{w=r.sqrt(k);}catch(G){let K=G instanceof Error?": "+G.message:"";throw new Error("Point is not on curve"+K)}let p=(w&Je)===Je;return (b&1)===1!==p&&(w=r.neg(w)),{x:_,y:w}}else if(y===a&&b===4){let _=r.fromBytes(x.subarray(0,r.BYTES)),k=r.fromBytes(x.subarray(r.BYTES,2*r.BYTES));return {x:_,y:k}}else {let _=s,k=a;throw new Error("invalid Point, expected length of "+_+", or uncompressed "+k+", got "+y)}}});function v(m){let y=o>>Je;return m>y}function E(m){return v(m)?c(-m):m}let R=(m,y,b)=>tn(m.slice(y,b));class ${constructor(y,b,x){Dr("r",y,Je,o),Dr("s",b,Je,o),this.r=y,this.s=b,x!=null&&(this.recovery=x),Object.freeze(this);}static fromCompact(y){let b=n;return y=Ge("compactSignature",y,b*2),new $(R(y,0,b),R(y,b,2*b))}static fromDER(y){let{r:b,s:x}=hi.toSig(Ge("DER",y));return new $(b,x)}assertValidity(){}addRecoveryBit(y){return new $(this.r,this.s,y)}recoverPublicKey(y){let{r:b,s:x,recovery:_}=this,k=C(Ge("msgHash",y));if(_==null||![0,1,2,3].includes(_))throw new Error("recovery id invalid");let w=_===2||_===3?b+t.n:b;if(w>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");let p=(_&1)===0?"02":"03",A=f.fromHex(p+k_(w,r.BYTES)),G=u(w),K=c(-k*G),Q=c(x*G),ae=f.BASE.multiplyAndAddUnsafe(A,K,Q);if(!ae)throw new Error("point at infinify");return ae.assertValidity(),ae}hasHighS(){return v(this.s)}normalizeS(){return this.hasHighS()?new $(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return Bl(this.toDERHex())}toDERHex(){return hi.hexFromSig(this)}toCompactRawBytes(){return Bl(this.toCompactHex())}toCompactHex(){let y=n;return k_(this.r,y)+k_(this.s,y)}}let N={isValidPrivateKey(m){try{return d(m),!0}catch{return false}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{let m=Uw(t.n);return yA(t.randomBytes(m),t.n)},precompute(m=8,y=f.BASE){return y._setWindowSize(m),y.multiply(BigInt(3)),y}};function O(m,y=true){return f.fromPrivateKey(m).toRawBytes(y)}function I(m){if(typeof m=="bigint")return false;if(m instanceof f)return true;let b=Ge("key",m).length,x=r.BYTES,_=x+1,k=2*x+1;if(!(t.allowedPrivateKeyLengths||n===_))return b===_||b===k}function P(m,y,b=true){if(I(m)===true)throw new Error("first arg must be private key");if(I(y)===false)throw new Error("second arg must be public key");return f.fromHex(y).multiply(d(m)).toRawBytes(b)}let L=t.bits2int||function(m){if(m.length>8192)throw new Error("input is too large");let y=tn(m),b=m.length*8-i;return b>0?y>>BigInt(b):y},C=t.bits2int_modN||function(m){return c(L(m))},D=ba(i);function q(m){return Dr("num < 2^"+i,m,oo,D),To(m,n)}function H(m,y,b=Z){if(["recovered","canonical"].some(ye=>ye in b))throw new Error("sign() legacy options not supported");let{hash:x,randomBytes:_}=t,{lowS:k,prehash:w,extraEntropy:p}=b;k==null&&(k=true),m=Ge("msgHash",m),Hk(b),w&&(m=Ge("prehashed msgHash",x(m)));let A=C(m),G=d(y),K=[q(G),q(A)];if(p!=null&&p!==false){let ye=p===true?_(r.BYTES):p;K.push(Ge("extraEntropy",ye));}let Q=ar(...K),ae=A;function he(ye){let We=L(ye);if(!h(We))return;let Se=u(We),_e=f.BASE.multiply(We).toAffine(),tr=c(_e.x);if(tr===oo)return;let Ce=c(Se*c(ae+tr*G));if(Ce===oo)return;let je=(_e.x===tr?0:2)|Number(_e.y&Je),Li=Ce;return k&&v(Ce)&&(Li=E(Ce),je^=1),new $(tr,Li,je)}return {seed:Q,k2sig:he}}let Z={lowS:t.lowS,prehash:false},re={lowS:t.lowS,prehash:false};function S(m,y,b=Z){let{seed:x,k2sig:_}=H(m,y,b),k=t;return uA(k.hash.outputLen,k.nByteLength,k.hmac)(x,_)}f.BASE._setWindowSize(8);function l(m,y,b,x=re){let _=m;y=Ge("msgHash",y),b=Ge("publicKey",b);let{lowS:k,prehash:w,format:p}=x;if(Hk(x),"strict"in x)throw new Error("options.strict was renamed to lowS");if(p!==void 0&&p!=="compact"&&p!=="der")throw new Error("format must be compact or der");let A=typeof _=="string"||Lc(_),G=!A&&!p&&typeof _=="object"&&_!==null&&typeof _.r=="bigint"&&typeof _.s=="bigint";if(!A&&!G)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let K,Q;try{if(G&&(K=new $(_.r,_.s)),A){try{p!=="compact"&&(K=$.fromDER(_));}catch(je){if(!(je instanceof hi.Err))throw je}!K&&p!=="der"&&(K=$.fromCompact(_));}Q=f.fromHex(b);}catch{return false}if(!K||k&&K.hasHighS())return false;w&&(y=t.hash(y));let{r:ae,s:he}=K,ye=C(y),We=u(he),Se=c(ye*We),_e=c(ae*We),tr=f.BASE.multiplyAndAddUnsafe(Q,Se,_e)?.toAffine();return tr?c(tr.x)===ae:false}return {CURVE:t,getPublicKey:O,getSharedSecret:P,sign:S,verify:l,ProjectivePoint:f,Signature:$,utils:N}}function _7(e,t){let r=e.ORDER,o=oo;for(let v=r-Je;v%cs===oo;v/=cs)o+=Je;let n=o,i=cs<<n-Je-Je,s=i*cs,a=(r-Je)/s,c=(a-Je)/cs,u=s-Je,f=i,d=e.pow(t,a),g=e.pow(t,(a+Je)/cs),h=(v,E)=>{let R=d,$=e.pow(E,u),N=e.sqr($);N=e.mul(N,E);let O=e.mul(v,N);O=e.pow(O,c),O=e.mul(O,$),$=e.mul(O,E),N=e.mul(O,v);let I=e.mul(N,$);O=e.pow(I,f);let P=e.eql(O,e.ONE);$=e.mul(N,g),O=e.mul(I,R),N=e.cmov($,N,P),I=e.cmov(O,I,P);for(let L=n;L>Je;L--){let C=L-cs;C=cs<<C-Je;let D=e.pow(I,C),q=e.eql(D,e.ONE);$=e.mul(N,R),R=e.mul(R,R),D=e.mul(I,R),N=e.cmov($,N,q),I=e.cmov(D,I,q);}return {isValid:P,value:N}};if(e.ORDER%T_===Xl){let v=(e.ORDER-Xl)/T_,E=e.sqrt(e.neg(t));h=(R,$)=>{let N=e.sqr($),O=e.mul(R,$);N=e.mul(N,O);let I=e.pow(N,v);I=e.mul(I,O);let P=e.mul(I,E),L=e.mul(e.sqr(I),$),C=e.eql(L,R),D=e.cmov(P,I,C);return {isValid:C,value:D}};}return h}function Zk(e,t){if(uh(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");let r=_7(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return o=>{let n,i,s,a,c,u,f,d;n=e.sqr(o),n=e.mul(n,t.Z),i=e.sqr(n),i=e.add(i,n),s=e.add(i,e.ONE),s=e.mul(s,t.B),a=e.cmov(t.Z,e.neg(i),!e.eql(i,e.ZERO)),a=e.mul(a,t.A),i=e.sqr(s),u=e.sqr(a),c=e.mul(u,t.A),i=e.add(i,c),i=e.mul(i,s),u=e.mul(u,a),c=e.mul(u,t.B),i=e.add(i,c),f=e.mul(n,s);let{isValid:g,value:h}=r(i,u);d=e.mul(n,o),d=e.mul(d,h),f=e.cmov(f,s,g),d=e.cmov(d,h,g);let v=e.isOdd(o)===e.isOdd(d);d=e.cmov(e.neg(d),d,v);let E=li(e,[a],true)[0];return f=e.mul(f,E),{x:f,y:d}}}var R_,hi,oo,Je,cs,Xl,T_,$_=F(()=>{Vw();wa();xa();R_=class extends Error{constructor(t=""){super(t);}},hi={Err:R_,_tlv:{encode:(e,t)=>{let{Err:r}=hi;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length&1)throw new r("tlv.encode: unpadded data");let o=t.length/2,n=Pl(o);if(n.length/2&128)throw new r("tlv.encode: long form length too big");let i=o>127?Pl(n.length/2|128):"";return Pl(e)+i+n+t},decode(e,t){let{Err:r}=hi,o=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[o++]!==e)throw new r("tlv.decode: wrong tlv");let n=t[o++],i=!!(n&128),s=0;if(!i)s=n;else {let c=n&127;if(!c)throw new r("tlv.decode(long): indefinite length not supported");if(c>4)throw new r("tlv.decode(long): byte length is too big");let u=t.subarray(o,o+c);if(u.length!==c)throw new r("tlv.decode: length bytes not complete");if(u[0]===0)throw new r("tlv.decode(long): zero leftmost byte");for(let f of u)s=s<<8|f;if(o+=c,s<128)throw new r("tlv.decode(long): not minimal encoding")}let a=t.subarray(o,o+s);if(a.length!==s)throw new r("tlv.decode: wrong value length");return {v:a,l:t.subarray(o+s)}}},_int:{encode(e){let{Err:t}=hi;if(e<oo)throw new t("integer: negative integers are not allowed");let r=Pl(e);if(Number.parseInt(r[0],16)&8&&(r="00"+r),r.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){let{Err:t}=hi;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return tn(e)}},toSig(e){let{Err:t,_int:r,_tlv:o}=hi,n=Ge("signature",e),{v:i,l:s}=o.decode(48,n);if(s.length)throw new t("invalid signature: left bytes after parsing");let{v:a,l:c}=o.decode(2,i),{v:u,l:f}=o.decode(2,c);if(f.length)throw new t("invalid signature: left bytes after parsing");return {r:r.decode(a),s:r.decode(u)}},hexFromSig(e){let{_tlv:t,_int:r}=hi,o=t.encode(2,r.encode(e.r)),n=t.encode(2,r.encode(e.s)),i=o+n;return t.encode(48,i)}};oo=BigInt(0),Je=BigInt(1),cs=BigInt(2),Xl=BigInt(3),T_=BigInt(4);});function E7(e){return {hash:e,hmac:(t,...r)=>A_(e,t,Rw(...r)),randomBytes:zc}}function Gk(e,t){let r=o=>Vk({...e,...E7(o)});return {...r(t),create:r}}var qk=F(()=>{Fk();ai();$_();});var eR={};Er(eR,{encodeToCurve:()=>O7,hashToCurve:()=>$7,schnorr:()=>k7,secp256k1:()=>bn,secp256k1_hasher:()=>L_});function Jk(e){let t=td,r=BigInt(3),o=BigInt(6),n=BigInt(11),i=BigInt(22),s=BigInt(23),a=BigInt(44),c=BigInt(88),u=e*e*e%t,f=u*u*e%t,d=at(f,r,t)*f%t,g=at(d,r,t)*f%t,h=at(g,Yh,t)*u%t,v=at(h,n,t)*h%t,E=at(v,i,t)*v%t,R=at(E,a,t)*E%t,$=at(R,c,t)*R%t,N=at($,a,t)*E%t,O=at(N,r,t)*f%t,I=at(O,s,t)*v%t,P=at(I,o,t)*u%t,L=at(P,Yh,t);if(!us.eql(us.sqr(L),e))throw new Error("Cannot find square root");return L}function Xh(e,...t){let r=Kk[e];if(r===void 0){let o=ha(Uint8Array.from(e,n=>n.charCodeAt(0)));r=ar(o,o),Kk[e]=r;}return ha(ar(r,...t))}function P_(e){let t=bn.utils.normPrivateKeyToScalar(e),r=z_.fromPrivateKey(t);return {scalar:r.hasEvenY()?t:ed(-t),bytes:C_(r)}}function Yk(e){Dr("x",e,Ql,td);let t=O_(e*e),r=O_(t*e+BigInt(7)),o=Jk(r);o%Yh!==B_&&(o=O_(-o));let n=new z_(e,o,Ql);return n.assertValidity(),n}function Xk(...e){return ed(qc(Xh("BIP0340/challenge",...e)))}function I7(e){return P_(e).bytes}function A7(e,t,r=zc(32)){let o=Ge("message",e),{bytes:n,scalar:i}=P_(t),s=Ge("auxRand",r,32),a=N_(i^qc(Xh("BIP0340/aux",s))),c=Xh("BIP0340/nonce",a,n,o),u=ed(qc(c));if(u===B_)throw new Error("sign failed: k is zero");let{bytes:f,scalar:d}=P_(u),g=Xk(f,n,o),h=new Uint8Array(64);if(h.set(f,0),h.set(N_(ed(d+g*i)),32),!Qk(h,o,n))throw new Error("sign: Invalid signature produced");return h}function Qk(e,t,r){let o=Ge("signature",e,64),n=Ge("message",t),i=Ge("publicKey",r,32);try{let s=Yk(qc(i)),a=qc(o.subarray(0,32));if(!ya(a,Ql,td))return !1;let c=qc(o.subarray(32,64));if(!ya(c,Ql,Jh))return !1;let u=Xk(N_(a),C_(s),n),f=S7(s,c,ed(-u));return !(!f||!f.hasEvenY()||f.toAffine().x!==a)}catch{return false}}var td,Jh,B_,Ql,Yh,Wk,us,bn,Kk,C_,N_,O_,ed,z_,S7,qc,k7,R7,T7,L_,$7,O7,rd=F(()=>{sh();ai();qk();kA();wa();xa();$_();td=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Jh=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),B_=BigInt(0),Ql=BigInt(1),Yh=BigInt(2),Wk=(e,t)=>(e+t/Yh)/t;us=di(td,void 0,void 0,{sqrt:Jk}),bn=Gk({a:B_,b:BigInt(7),Fp:us,n:Jh,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:true,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=Jh,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),o=-Ql*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=r,s=BigInt("0x100000000000000000000000000000000"),a=Wk(i*e,t),c=Wk(-o*e,t),u=Le(e-a*r-c*n,t),f=Le(-a*o-c*i,t),d=u>s,g=f>s;if(d&&(u=t-u),g&&(f=t-f),u>s||f>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return {k1neg:d,k1:u,k2neg:g,k2:f}}}},ha),Kk={};C_=e=>e.toRawBytes(true).slice(1),N_=e=>To(e,32),O_=e=>Le(e,td),ed=e=>Le(e,Jh),z_=bn.ProjectivePoint,S7=(e,t,r)=>z_.BASE.multiplyAndAddUnsafe(e,t,r);qc=tn;k7={getPublicKey:I7,sign:A7,verify:Qk,utils:{randomPrivateKey:bn.utils.randomPrivateKey,lift_x:Yk,pointToBytes:C_,numberToBytesBE:To,bytesToNumberBE:tn,taggedHash:Xh,mod:Le}},R7=IA(us,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(t=>BigInt(t)))),T7=Zk(us,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:us.create(BigInt("-11"))}),L_=AA(bn.ProjectivePoint,e=>{let{x:t,y:r}=T7(us.create(e[0]));return R7(t,r)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:us.ORDER,m:1,k:128,expand:"xmd",hash:ha}),$7=L_.hashToCurve,O7=L_.encodeToCurve;});var lT,dT=F(()=>{lT="1.2.3";});var _t,ru=F(()=>{dT();_t=class e extends Error{constructor(t,r={}){let o=r.cause instanceof e?r.cause.details:r.cause?.message?r.cause.message:r.details,n=r.cause instanceof e&&r.cause.docsPath||r.docsPath,i=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...n?[`Docs: https://abitype.dev${n}`]:[],...o?[`Details: ${o}`]:[],`Version: abitype@${lT}`].join(`
|
|
3
|
+
`);super(i),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiTypeError"}),r.cause&&(this.cause=r.cause),this.details=o,this.docsPath=n,this.metaMessages=r.metaMessages,this.shortMessage=t;}};});function _n(e,t){return e.exec(t)?.groups}var T6,$6,w0,Sd=F(()=>{T6=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,$6=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,w0=/^\(.+?\).*?$/;});function _0(e){let t=e.type;if(pT.test(e.type)&&"components"in e){t="(";let r=e.components.length;for(let n=0;n<r;n++){let i=e.components[n];t+=_0(i),n<r-1&&(t+=", ");}let o=_n(pT,e.type);return t+=`)${o?.array||""}`,_0({...e,type:t})}return "indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}var pT,mT=F(()=>{Sd();pT=/^tuple(?<array>(\[(\d*)\])*)$/;});function bi(e){let t="",r=e.length;for(let o=0;o<r;o++){let n=e[o];t+=_0(n),o!==r-1&&(t+=", ");}return t}var O6=F(()=>{mT();});function Ba(e){return e.type==="function"?`function ${e.name}(${bi(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${bi(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${bi(e.inputs)})`:e.type==="error"?`error ${e.name}(${bi(e.inputs)})`:e.type==="constructor"?`constructor(${bi(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}var hT=F(()=>{O6();});function yT(e){return gT.test(e)}function bT(e){return _n(gT,e)}function vT(e){return xT.test(e)}function wT(e){return _n(xT,e)}function ET(e){return _T.test(e)}function ST(e){return _n(_T,e)}function ds(e){return IT.test(e)}function AT(e){return _n(IT,e)}function RT(e){return kT.test(e)}function TT(e){return _n(kT,e)}function OT(e){return $T.test(e)}function NT(e){return _n($T,e)}function PT(e){return oH.test(e)}var gT,xT,_T,IT,kT,$T,oH,N6,BT,E0,nu=F(()=>{Sd();gT=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;xT=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;_T=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;IT=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;kT=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;$T=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;oH=/^receive\(\) external payable$/;N6=new Set(["memory","indexed","storage","calldata"]),BT=new Set(["indexed"]),E0=new Set(["calldata","memory","storage"]);});var Id,Ad,S0,I0=F(()=>{ru();Id=class extends _t{constructor({signature:t}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidAbiItemError"});}},Ad=class extends _t{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"UnknownTypeError"});}},S0=class extends _t{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"UnknownSolidityTypeError"});}};});var kd,Rd,Td,$d,Od,Nd,A0=F(()=>{ru();kd=class extends _t{constructor({params:t}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidAbiParametersError"});}},Rd=class extends _t{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidParameterError"});}},Td=class extends _t{constructor({param:t,name:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${r}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"SolidityProtectedKeywordError"});}},$d=class extends _t{constructor({param:t,type:r,modifier:o}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${o}" not allowed${r?` in "${r}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidModifierError"});}},Od=class extends _t{constructor({param:t,type:r,modifier:o}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${o}" not allowed${r?` in "${r}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${o}" was given.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidFunctionModifierError"});}},Nd=class extends _t{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidAbiTypeParameterError"});}};});var ao,Pd,Bd,P6=F(()=>{ru();ao=class extends _t{constructor({signature:t,type:r}){super(`Invalid ${r} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidSignatureError"});}},Pd=class extends _t{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"UnknownSignatureError"});}},Bd=class extends _t{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidStructSignatureError"});}};});var Cd,CT=F(()=>{ru();Cd=class extends _t{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"CircularReferenceError"});}};});var zd,zT=F(()=>{ru();zd=class extends _t{constructor({current:t,depth:r}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${r>0?"opening":"closing"} parentheses.`],details:`Depth "${r}"`}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"InvalidParenthesisError"});}};});function LT(e,t,r){let o="";if(r)for(let n of Object.entries(r)){if(!n)continue;let i="";for(let s of n[1])i+=`[${s.type}${s.name?`:${s.name}`:""}]`;o+=`(${n[0]}{${i}})`;}return t?`${t}:${e}${o}`:`${e}${o}`}var k0,UT=F(()=>{k0=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:true}],["event:address indexed to",{type:"address",name:"to",indexed:true}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:true}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:true}]]);});function Ld(e,t={}){if(ET(e))return iH(e,t);if(vT(e))return sH(e,t);if(yT(e))return aH(e,t);if(RT(e))return cH(e,t);if(OT(e))return uH(e);if(PT(e))return {type:"receive",stateMutability:"payable"};throw new Pd({signature:e})}function iH(e,t={}){let r=ST(e);if(!r)throw new ao({signature:e,type:"function"});let o=nn(r.parameters),n=[],i=o.length;for(let a=0;a<i;a++)n.push(co(o[a],{modifiers:E0,structs:t,type:"function"}));let s=[];if(r.returns){let a=nn(r.returns),c=a.length;for(let u=0;u<c;u++)s.push(co(a[u],{modifiers:E0,structs:t,type:"function"}));}return {name:r.name,type:"function",stateMutability:r.stateMutability??"nonpayable",inputs:n,outputs:s}}function sH(e,t={}){let r=wT(e);if(!r)throw new ao({signature:e,type:"event"});let o=nn(r.parameters),n=[],i=o.length;for(let s=0;s<i;s++)n.push(co(o[s],{modifiers:BT,structs:t,type:"event"}));return {name:r.name,type:"event",inputs:n}}function aH(e,t={}){let r=bT(e);if(!r)throw new ao({signature:e,type:"error"});let o=nn(r.parameters),n=[],i=o.length;for(let s=0;s<i;s++)n.push(co(o[s],{structs:t,type:"error"}));return {name:r.name,type:"error",inputs:n}}function cH(e,t={}){let r=TT(e);if(!r)throw new ao({signature:e,type:"constructor"});let o=nn(r.parameters),n=[],i=o.length;for(let s=0;s<i;s++)n.push(co(o[s],{structs:t,type:"constructor"}));return {type:"constructor",stateMutability:r.stateMutability??"nonpayable",inputs:n}}function uH(e){let t=NT(e);if(!t)throw new ao({signature:e,type:"fallback"});return {type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}function co(e,t){let r=LT(e,t?.type,t?.structs);if(k0.has(r))return k0.get(r);let o=w0.test(e),n=_n(o?lH:fH,e);if(!n)throw new Rd({param:e});if(n.name&&mH(n.name))throw new Td({param:e,name:n.name});let i=n.name?{name:n.name}:{},s=n.modifier==="indexed"?{indexed:true}:{},a=t?.structs??{},c,u={};if(o){c="tuple";let d=nn(n.type),g=[],h=d.length;for(let v=0;v<h;v++)g.push(co(d[v],{structs:a}));u={components:g};}else if(n.type in a)c="tuple",u={components:a[n.type]};else if(dH.test(n.type))c=`${n.type}256`;else if(n.type==="address payable")c="address";else if(c=n.type,t?.type!=="struct"&&!B6(c))throw new S0({type:c});if(n.modifier){if(!t?.modifiers?.has?.(n.modifier))throw new $d({param:e,type:t?.type,modifier:n.modifier});if(E0.has(n.modifier)&&!hH(c,!!n.array))throw new Od({param:e,type:t?.type,modifier:n.modifier})}let f={type:`${c}${n.array??""}`,...i,...s,...u};return k0.set(r,f),f}function nn(e,t=[],r="",o=0){let n=e.trim().length;for(let i=0;i<n;i++){let s=e[i],a=e.slice(i+1);switch(s){case ",":return o===0?nn(a,[...t,r.trim()]):nn(a,t,`${r}${s}`,o);case "(":return nn(a,t,`${r}${s}`,o+1);case ")":return nn(a,t,`${r}${s}`,o-1);default:return nn(a,t,`${r}${s}`,o)}}if(r==="")return t;if(o!==0)throw new zd({current:r,depth:o});return t.push(r.trim()),t}function B6(e){return e==="address"||e==="bool"||e==="function"||e==="string"||T6.test(e)||$6.test(e)}function mH(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||T6.test(e)||$6.test(e)||pH.test(e)}function hH(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}var fH,lH,dH,pH,ou=F(()=>{Sd();I0();A0();P6();zT();UT();nu();fH=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,lH=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,dH=/^u?int$/;pH=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;});function iu(e){let t={},r=e.length;for(let s=0;s<r;s++){let a=e[s];if(!ds(a))continue;let c=AT(a);if(!c)throw new ao({signature:a,type:"struct"});let u=c.properties.split(";"),f=[],d=u.length;for(let g=0;g<d;g++){let v=u[g].trim();if(!v)continue;let E=co(v,{type:"struct"});f.push(E);}if(!f.length)throw new Bd({signature:a});t[c.name]=f;}let o={},n=Object.entries(t),i=n.length;for(let s=0;s<i;s++){let[a,c]=n[s];o[a]=MT(c,t);}return o}function MT(e=[],t={},r=new Set){let o=[],n=e.length;for(let i=0;i<n;i++){let s=e[i];if(w0.test(s.type))o.push(s);else {let c=_n(gH,s.type);if(!c?.type)throw new Nd({abiParameter:s});let{array:u,type:f}=c;if(f in t){if(r.has(f))throw new Cd({type:f});o.push({...s,type:`tuple${u??""}`,components:MT(t[f],t,new Set([...r,f]))});}else if(B6(f))o.push(s);else throw new Ad({type:f})}}return o}var gH,R0=F(()=>{Sd();I0();A0();P6();CT();nu();ou();gH=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;});function ps(e){let t=iu(e),r=[],o=e.length;for(let n=0;n<o;n++){let i=e[n];ds(i)||r.push(Ld(i,t));}return r}var DT=F(()=>{nu();R0();ou();});function Ud(e){let t;if(typeof e=="string")t=Ld(e);else {let r=iu(e),o=e.length;for(let n=0;n<o;n++){let i=e[n];if(!ds(i)){t=Ld(i,r);break}}}if(!t)throw new Id({signature:e});return t}var jT=F(()=>{I0();nu();R0();ou();});function Md(e){let t=[];if(typeof e=="string"){let r=nn(e),o=r.length;for(let n=0;n<o;n++)t.push(co(r[n],{modifiers:N6}));}else {let r=iu(e),o=e.length;for(let n=0;n<o;n++){let i=e[n];if(ds(i))continue;let s=nn(i),a=s.length;for(let c=0;c<a;c++)t.push(co(s[c],{modifiers:N6,structs:r}));}}if(t.length===0)throw new kd({params:e});return t}var FT=F(()=>{A0();nu();R0();ou();ou();});var su=F(()=>{hT();O6();DT();jT();FT();});function nr(e,{includeName:t=false}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new T0(e.type);return `${e.name}(${Dd(e.inputs,{includeName:t})})`}function Dd(e,{includeName:t=false}={}){return e?e.map(r=>yH(r,{includeName:t})).join(t?", ":","):""}function yH(e,{includeName:t}){return e.type.startsWith("tuple")?`(${Dd(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}var xi=F(()=>{Et();});function St(e,{strict:t=true}={}){return !e||typeof e!="string"?false:t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")}var uo=F(()=>{});function $e(e){return St(e,{strict:false})?Math.ceil((e.length-2)/2):e.length}var on=F(()=>{uo();});var C6,VT=F(()=>{C6="2.55.16";});function ZT(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause!==void 0?ZT(e.cause,t):t?null:e}var z6,z,Te=F(()=>{VT();z6={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${C6}`},z=class e extends Error{constructor(t,r={}){let o=r.cause instanceof e?r.cause.details:r.cause?.message?r.cause.message:r.details,n=r.cause instanceof e&&r.cause.docsPath||r.docsPath,i=z6.getDocsUrl?.({...r,docsPath:n}),s=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...i?[`Docs: ${i}`]:[],...o?[`Details: ${o}`]:[],...z6.version?[`Version: ${z6.version}`]:[]].join(`
|
|
4
|
+
`);super(s,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"version",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"BaseError"}),this.details=o,this.docsPath=n,this.metaMessages=r.metaMessages,this.name=r.name??this.name,this.shortMessage=t,this.version=C6;}walk(t){return ZT(this,t)}};});var $0,jd,au,Cn,O0,N0,P0,B0,Fd,cu,C0,z0,Hd,fo,uu,L0,U0,M0,vi,ms,D0,j0,fu,T0,Et=F(()=>{xi();on();Te();$0=class extends z{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
|
|
5
|
+
`),{docsPath:t,name:"AbiConstructorNotFoundError"});}},jd=class extends z{constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
|
|
6
|
+
`),{docsPath:t,name:"AbiConstructorParamsNotFoundError"});}},au=class extends z{constructor({data:t,params:r,size:o}){super([`Data size of ${o} bytes is too small for given parameters.`].join(`
|
|
7
|
+
`),{metaMessages:[`Params: (${Dd(r,{includeName:true})})`,`Data: ${t} (${o} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"params",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"size",{enumerable:true,configurable:true,writable:true,value:void 0}),this.data=t,this.params=r,this.size=o;}},Cn=class extends z{constructor({cause:t}={}){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError",cause:t});}},O0=class extends z{constructor({expectedLength:t,givenLength:r,type:o}){super([`ABI encoding array length mismatch for type ${o}.`,`Expected length: ${t}`,`Given length: ${r}`].join(`
|
|
8
|
+
`),{name:"AbiEncodingArrayLengthMismatchError"});}},N0=class extends z{constructor({expectedSize:t,value:r}){super(`Size of bytes "${r}" (bytes${$e(r)}) does not match expected size (bytes${t}).`,{name:"AbiEncodingBytesSizeMismatchError"});}},P0=class extends z{constructor({expectedLength:t,givenLength:r}){super(["ABI encoding params/values length mismatch.",`Expected length (params): ${t}`,`Given length (values): ${r}`].join(`
|
|
9
|
+
`),{name:"AbiEncodingLengthMismatchError"});}},B0=class extends z{constructor(t,{docsPath:r}){super([`Arguments (\`args\`) were provided to "${t}", but "${t}" on the ABI does not contain any parameters (\`inputs\`).`,"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join(`
|
|
10
|
+
`),{docsPath:r,name:"AbiErrorInputsNotFoundError"});}},Fd=class extends z{constructor(t,{docsPath:r}={}){super([`Error ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it."].join(`
|
|
11
|
+
`),{docsPath:r,name:"AbiErrorNotFoundError"});}},cu=class extends z{constructor(t,{docsPath:r,cause:o}){super([`Encoded error signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${t}.`].join(`
|
|
12
|
+
`),{docsPath:r,name:"AbiErrorSignatureNotFoundError",cause:o}),Object.defineProperty(this,"signature",{enumerable:true,configurable:true,writable:true,value:void 0}),this.signature=t;}},C0=class extends z{constructor({docsPath:t}){super("Cannot extract event signature from empty topics.",{docsPath:t,name:"AbiEventSignatureEmptyTopicsError"});}},z0=class extends z{constructor(t,{docsPath:r}){super([`Encoded event signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it.",`You can look up the signature here: https://4byte.sourcify.dev/?q=${t}.`].join(`
|
|
13
|
+
`),{docsPath:r,name:"AbiEventSignatureNotFoundError"});}},Hd=class extends z{constructor(t,{docsPath:r}={}){super([`Event ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the event exists on it."].join(`
|
|
14
|
+
`),{docsPath:r,name:"AbiEventNotFoundError"});}},fo=class extends z{constructor(t,{docsPath:r}={}){super([`Function ${t?`"${t}" `:""}not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it."].join(`
|
|
15
|
+
`),{docsPath:r,name:"AbiFunctionNotFoundError"});}},uu=class extends z{constructor(t,{docsPath:r}){super([`Function "${t}" does not contain any \`outputs\` on ABI.`,"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join(`
|
|
16
|
+
`),{docsPath:r,name:"AbiFunctionOutputsNotFoundError"});}},L0=class extends z{constructor(t,{docsPath:r}){super([`Encoded function signature "${t}" not found on ABI.`,"Make sure you are using the correct ABI and that the function exists on it.",`You can look up the signature here: https://4byte.sourcify.dev/?q=${t}.`].join(`
|
|
17
|
+
`),{docsPath:r,name:"AbiFunctionSignatureNotFoundError"});}},U0=class extends z{constructor(t,r){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${t.type}\` in \`${nr(t.abiItem)}\`, and`,`\`${r.type}\` in \`${nr(r.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"});}},M0=class extends z{constructor({expectedSize:t,givenSize:r}){super(`Expected bytes${t}, got bytes${r}.`,{name:"BytesSizeMismatchError"});}},vi=class extends z{constructor({abiItem:t,data:r,params:o,size:n}){super([`Data size of ${n} bytes is too small for non-indexed event parameters.`].join(`
|
|
18
|
+
`),{metaMessages:[`Params: (${Dd(o,{includeName:true})})`,`Data: ${r} (${n} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"params",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"size",{enumerable:true,configurable:true,writable:true,value:void 0}),this.abiItem=t,this.data=r,this.params=o,this.size=n;}},ms=class extends z{constructor({abiItem:t,param:r}){super([`Expected a topic for indexed event parameter${r.name?` "${r.name}"`:""} on event "${nr(t,{includeName:true})}".`].join(`
|
|
19
|
+
`),{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:true,configurable:true,writable:true,value:void 0}),this.abiItem=t;}},D0=class extends z{constructor(t,{docsPath:r}){super([`Type "${t}" is not a valid encoding type.`,"Please provide a valid ABI type."].join(`
|
|
20
|
+
`),{docsPath:r,name:"InvalidAbiEncodingType"});}},j0=class extends z{constructor(t,{docsPath:r}){super([`Type "${t}" is not a valid decoding type.`,"Please provide a valid ABI type."].join(`
|
|
21
|
+
`),{docsPath:r,name:"InvalidAbiDecodingType"});}},fu=class extends z{constructor(t){super([`Value "${t}" is not a valid array.`].join(`
|
|
22
|
+
`),{name:"InvalidArrayError"});}},T0=class extends z{constructor(t){super([`"${t}" is not a valid definition type.`,'Valid types: "function", "event", "error"'].join(`
|
|
23
|
+
`),{name:"InvalidDefinitionTypeError"});}};});var Vd,Zd,Gd,H0=F(()=>{Te();Vd=class extends z{constructor({offset:t,position:r,size:o}){super(`Slice ${r==="start"?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${o}).`,{name:"SliceOffsetOutOfBoundsError"});}},Zd=class extends z{constructor({size:t,targetSize:r,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (${t}) exceeds padding size (${r}).`,{name:"SizeExceedsPaddingSizeError"});}},Gd=class extends z{constructor({size:t,targetSize:r,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} is expected to be ${r} ${o} long, but is ${t} ${o} long.`,{name:"InvalidBytesLengthError"});}};});function zo(e,{dir:t,size:r=32}={}){return typeof e=="string"?wi(e,{dir:t,size:r}):bH(e,{dir:t,size:r})}function wi(e,{dir:t,size:r=32}={}){if(r===null)return e;let o=e.replace("0x","");if(o.length>r*2)throw new Zd({size:Math.ceil(o.length/2),targetSize:r,type:"hex"});return `0x${o[t==="right"?"padEnd":"padStart"](r*2,"0")}`}function bH(e,{dir:t,size:r=32}={}){if(r===null)return e;if(e.length>r)throw new Zd({size:e.length,targetSize:r,type:"bytes"});let o=new Uint8Array(r);for(let n=0;n<r;n++){let i=t==="right";o[i?n:r-n-1]=e[i?n:e.length-n-1];}return o}var qd=F(()=>{H0();});var hs,V0,Z0,G0,Wd=F(()=>{Te();hs=class extends z{constructor({max:t,min:r,signed:o,size:n,value:i}){super(`Number "${i}" is not in safe ${n?`${n*8}-bit ${o?"signed":"unsigned"} `:""}integer range ${t?`(${r} to ${t})`:`(above ${r})`}`,{name:"IntegerOutOfRangeError"});}},V0=class extends z{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"});}},Z0=class extends z{constructor(t){super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"});}},G0=class extends z{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed ${r} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"});}};});function Gr(e,{dir:t="left"}={}){let r=typeof e=="string"?e.replace("0x",""):e,o=0;for(let n=0;n<r.length-1&&r[t==="left"?n:r.length-n-1].toString()==="0";n++)o++;return r=t==="left"?r.slice(o):r.slice(0,r.length-o),typeof e=="string"?(r.length===1&&t==="right"&&(r=`${r}0`),`0x${r.length%2===1?`0${r}`:r}`):r}var Kd=F(()=>{});function sn(e,{size:t}){if($e(e)>t)throw new G0({givenSize:$e(e),maxSize:t})}function ut(e,t={}){let{signed:r}=t;t.size&&sn(e,{size:t.size});let o=BigInt(e);if(!r)return o;let n=(e.length-2)/2,i=(1n<<BigInt(n)*8n-1n)-1n;return o<=i?o:o-BigInt(`0x${"f".padStart(n*2,"f")}`)-1n}function L6(e,t={}){let r=e;if(t.size&&(sn(r,{size:t.size}),r=Gr(r)),Gr(r)==="0x00")return false;if(Gr(r)==="0x01")return true;throw new Z0(r)}function vt(e,t={}){let r=ut(e,t),o=Number(r);if(!Number.isSafeInteger(o))throw new hs({max:`${Number.MAX_SAFE_INTEGER}`,min:`${Number.MIN_SAFE_INTEGER}`,signed:t.signed,size:t.size,value:`${r}n`});return o}var ur=F(()=>{Wd();on();Kd();});function mt(e,t={}){return typeof e=="number"||typeof e=="bigint"?J(e,t):typeof e=="string"?lu(e,t):typeof e=="boolean"?U6(e,t):Ue(e,t)}function U6(e,t={}){let r=`0x${Number(e)}`;return typeof t.size=="number"?(sn(r,{size:t.size}),zo(r,{size:t.size})):r}function Ue(e,t={}){let r="";for(let n=0;n<e.length;n++)r+=xH[e[n]];let o=`0x${r}`;return typeof t.size=="number"?(sn(o,{size:t.size}),zo(o,{dir:"right",size:t.size})):o}function J(e,t={}){let{signed:r,size:o}=t,n=BigInt(e),i;o?r?i=(1n<<BigInt(o)*8n-1n)-1n:i=2n**(BigInt(o)*8n)-1n:typeof e=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));let s=typeof i=="bigint"&&r?-i-1n:0;if(i&&n>i||n<s){let c=typeof e=="bigint"?"n":"";throw new hs({max:i?`${i}${c}`:void 0,min:`${s}${c}`,signed:r,size:o,value:`${e}${c}`})}let a=`0x${(r&&n<0?(1n<<BigInt(o*8))+BigInt(n):n).toString(16)}`;return o?zo(a,{size:o}):a}function lu(e,t={}){let r=vH.encode(e);return Ue(r,t)}var xH,vH,Re=F(()=>{Wd();qd();ur();xH=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));vH=new TextEncoder;});function zn(e,t={}){return typeof e=="number"||typeof e=="bigint"?EH(e,t):typeof e=="boolean"?_H(e,t):St(e)?xr(e,t):lo(e,t)}function _H(e,t={}){let r=new Uint8Array(1);return r[0]=Number(e),typeof t.size=="number"?(sn(r,{size:t.size}),zo(r,{size:t.size})):r}function GT(e){if(e>=_i.zero&&e<=_i.nine)return e-_i.zero;if(e>=_i.A&&e<=_i.F)return e-(_i.A-10);if(e>=_i.a&&e<=_i.f)return e-(_i.a-10)}function xr(e,t={}){let r=e;t.size&&(sn(r,{size:t.size}),r=zo(r,{dir:"right",size:t.size}));let o=r.slice(2);o.length%2&&(o=`0${o}`);let n=o.length/2,i=new Uint8Array(n);for(let s=0,a=0;s<n;s++){let c=GT(o.charCodeAt(a++)),u=GT(o.charCodeAt(a++));if(c===void 0||u===void 0)throw new z(`Invalid byte sequence ("${o[a-2]}${o[a-1]}" in "${o}").`);i[s]=c*16+u;}return i}function EH(e,t){let r=J(e,t);return xr(r)}function lo(e,t={}){let r=wH.encode(e);return typeof t.size=="number"?(sn(r,{size:t.size}),zo(r,{dir:"right",size:t.size})):r}var wH,_i,vr=F(()=>{Te();uo();qd();ur();Re();wH=new TextEncoder;_i={zero:48,nine:57,A:65,F:70,a:97,f:102};});function Qe(e,t){let r=t||"hex",o=Ra(St(e,{strict:false})?zn(e):e);return r==="bytes"?o:mt(o)}var po=F(()=>{Wh();uo();vr();Re();});function qT(e){return SH(e)}var SH,WT=F(()=>{vr();po();SH=e=>Qe(zn(e));});function KT(e){let t=true,r="",o=0,n="",i=false;for(let s=0;s<e.length;s++){let a=e[s];if(["(",")",","].includes(a)&&(t=true),a==="("&&o++,a===")"&&o--,!!t){if(o===0){if(a===" "&&["event","function",""].includes(n))n="";else if(n+=a,a===")"){i=true;break}continue}if(a===" "){e[s-1]!==","&&r!==","&&r!==",("&&(r="",t=false);continue}n+=a,r+=a;}}if(!i)throw new z("Unable to normalize signature.");return n}var JT=F(()=>{Te();});var YT,XT=F(()=>{su();JT();YT=e=>{let t=typeof e=="string"?e:Ba(e);return KT(t)};});function q0(e){return qT(YT(e))}var M6=F(()=>{WT();XT();});var gs,Jd=F(()=>{M6();gs=q0;});var nt,Lo=F(()=>{Te();nt=class extends z{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"});}};});var Uo,Yd=F(()=>{Uo=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:true,configurable:true,writable:true,value:void 0}),this.maxSize=t;}get(t){let r=super.get(t);return super.has(t)&&(super.delete(t),super.set(t,r)),r}set(t,r){if(super.has(t)&&super.delete(t),super.set(t,r),this.maxSize&&this.size>this.maxSize){let o=super.keys().next().value;o!==void 0&&super.delete(o);}return this}};});function ys(e,t){if(D6.has(`${e}.${t}`))return D6.get(`${e}.${t}`);let r=e.substring(2).toLowerCase(),o=Qe(lo(r),"bytes"),n=(r).split("");for(let s=0;s<40;s+=2)o[s>>1]>>4>=8&&n[s]&&(n[s]=n[s].toUpperCase()),(o[s>>1]&15)>=8&&n[s+1]&&(n[s+1]=n[s+1].toUpperCase());let i=`0x${n.join("")}`;return D6.set(`${e}.${t}`,i),i}function Ln(e,t){if(!Me(e,{strict:false}))throw new nt({address:e});return ys(e,t)}var D6,Ei=F(()=>{Lo();vr();po();Yd();En();D6=new Uo(8192);});function Me(e,t){let{strict:r=true}=t??{},o=`${e}.${r}`;if(j6.has(o))return j6.get(o);let n=IH.test(e)?e.toLowerCase()===e?true:r?ys(e)===e:true:false;return j6.set(o,n),n}var IH,j6,En=F(()=>{Yd();Ei();IH=/^0x[a-fA-F0-9]{40}$/,j6=new Uo(8192);});function Mo(e){return typeof e[0]=="string"?st(e):AH(e)}function AH(e){let t=0;for(let n of e)t+=n.length;let r=new Uint8Array(t),o=0;for(let n of e)r.set(n,o),o+=n.length;return r}function st(e){return `0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}var an=F(()=>{});function cn(e,t,r,{strict:o}={}){return St(e,{strict:false})?kH(e,t,r,{strict:o}):F6(e,t,r,{strict:o})}function QT(e,t){if(typeof t=="number"&&t>0&&t>$e(e)-1)throw new Vd({offset:t,position:"start",size:$e(e)})}function e4(e,t,r){if(typeof t=="number"&&typeof r=="number"&&$e(e)!==r-t)throw new Vd({offset:r,position:"end",size:$e(e)})}function F6(e,t,r,{strict:o}={}){QT(e,t);let n=e.slice(t,r);return o&&e4(n,t,r),n}function kH(e,t,r,{strict:o}={}){QT(e,t);let n=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return o&&e4(n,t,r),n}var bs=F(()=>{H0();uo();on();});var t4,W0,H6=F(()=>{t4=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,W0=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;});function qr(e,t){if(e.length!==t.length)throw new P0({expectedLength:e.length,givenLength:t.length});let r=RH({params:e,values:t});return G6(r)}function RH({params:e,values:t}){let r=[];for(let o=0;o<e.length;o++)r.push(Z6({param:e[o],value:t[o]}));return r}function Z6({param:e,value:t}){let r=Xd(e.type);if(r){let[o,n]=r;return $H(t,{length:o,param:{...e,type:n}})}if(e.type==="tuple")return CH(t,{param:e});if(e.type==="address")return TH(t);if(e.type==="bool")return NH(t);if(e.type.startsWith("uint")||e.type.startsWith("int")){let o=e.type.startsWith("int"),[,,n="256"]=W0.exec(e.type)??[];return PH(t,{signed:o,size:Number(n)})}if(e.type.startsWith("bytes"))return OH(t,{param:e});if(e.type==="string")return BH(t);throw new D0(e.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function G6(e){let t=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?t+=32:t+=$e(a);}let r=[],o=[],n=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?(r.push(J(t+n,{size:32})),o.push(a),n+=$e(a)):r.push(a);}return st([...r,...o])}function TH(e){if(!Me(e))throw new nt({address:e});return {dynamic:false,encoded:wi(e.toLowerCase())}}function $H(e,{length:t,param:r}){let o=t===null;if(!Array.isArray(e))throw new fu(e);if(!o&&e.length!==t)throw new O0({expectedLength:t,givenLength:e.length,type:`${r.type}[${t}]`});let n=e.length===0&&V6(r),i=[];for(let s=0;s<e.length;s++){let a=Z6({param:r,value:e[s]});a.dynamic&&(n=true),i.push(a);}if(o||n){let s=G6(i);if(o){let a=J(i.length,{size:32});return {dynamic:true,encoded:st([a,s])}}if(n)return {dynamic:true,encoded:s}}return {dynamic:false,encoded:st(i.map(({encoded:s})=>s))}}function OH(e,{param:t}){let[,r]=t.type.split("bytes"),o=$e(e);if(!r){let n=e;return o%32!==0&&(n=wi(n,{dir:"right",size:Math.ceil((e.length-2)/2/32)*32})),{dynamic:true,encoded:st([wi(J(o,{size:32})),n])}}if(o!==Number.parseInt(r,10))throw new N0({expectedSize:Number.parseInt(r,10),value:e});return {dynamic:false,encoded:wi(e,{dir:"right"})}}function NH(e){if(typeof e!="boolean")throw new z(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return {dynamic:false,encoded:wi(U6(e))}}function PH(e,{signed:t,size:r=256}){if(typeof r=="number"){let o=2n**(BigInt(r)-(t?1n:0n))-1n,n=t?-o-1n:0n;if(e>o||e<n)throw new hs({max:o.toString(),min:n.toString(),signed:t,size:r/8,value:e.toString()})}return {dynamic:false,encoded:J(e,{size:32,signed:t})}}function BH(e){let t=lu(e),r=Math.ceil($e(t)/32),o=[];for(let n=0;n<r;n++)o.push(wi(cn(t,n*32,(n+1)*32),{dir:"right"}));return {dynamic:true,encoded:st([wi(J($e(t),{size:32})),...o])}}function CH(e,{param:t}){let r=false,o=[];for(let n=0;n<t.components.length;n++){let i=t.components[n],s=Array.isArray(e)?n:i.name,a=Z6({param:i,value:e[s]});o.push(a),a.dynamic&&(r=true);}return {dynamic:r,encoded:r?G6(o):st(o.map(({encoded:n})=>n))}}function Xd(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function V6(e){let{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return true;if(t==="tuple")return e.components.some(V6);let r=Xd(t);return r?V6({...e,type:r[1]}):false}var Si=F(()=>{Et();Lo();Te();Wd();En();an();qd();on();bs();Re();H6();});var Do,du=F(()=>{bs();M6();Do=e=>cn(q0(e),0,4);});function un(e){let{abi:t,args:r=[],name:o}=e,n=St(o,{strict:false}),i=t.filter(a=>n?a.type==="function"?Do(a)===o:a.type==="event"?gs(a)===o:false:"name"in a&&a.name===o);if(i.length===0)return;if(i.length===1)return i[0];let s;for(let a of i){if(!("inputs"in a))continue;if(!r||r.length===0){if(!a.inputs||a.inputs.length===0)return a;continue}if(!a.inputs||a.inputs.length===0||a.inputs.length!==r.length)continue;if(r.every((u,f)=>{let d="inputs"in a&&a.inputs[f];return d?q6(u,d):false})){if(s&&"inputs"in s&&s.inputs){let u=r4(a.inputs,s.inputs,r);if(u)throw new U0({abiItem:a,type:u[0]},{abiItem:s,type:u[1]})}s=a;}}return s||i[0]}function q6(e,t){let r=typeof e,o=t.type;switch(o){case "address":return Me(e,{strict:false});case "bool":return r==="boolean";case "function":return r==="string";case "string":return r==="string";default:return o==="tuple"&&"components"in t?Object.values(t.components).every((n,i)=>r==="object"&&q6(Object.values(e)[i],n)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(o)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(o)?r==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(o)?Array.isArray(e)&&e.every(n=>q6(n,{...t,type:o.replace(/(\[[0-9]{0,}\])$/,"")})):false}}function r4(e,t,r){for(let o in e){let n=e[o],i=t[o];if(n.type==="tuple"&&i.type==="tuple"&&"components"in n&&"components"in i)return r4(n.components,i.components,r[o]);let s=[n.type,i.type];if(s.includes("address")&&s.includes("bytes20")?true:s.includes("address")&&s.includes("string")?Me(r[o],{strict:false}):s.includes("address")&&s.includes("bytes")?Me(r[o],{strict:false}):false)return s}}var xs=F(()=>{Et();uo();En();Jd();du();});function qe(e){return typeof e=="string"?{address:e,type:"json-rpc"}:e}var fn=F(()=>{});function s4(e){let{abi:t,args:r,functionName:o}=e,n=t[0];if(o){let i=un({abi:t,args:r,name:o});if(!i)throw new fo(o,{docsPath:i4});n=i;}if(n.type!=="function")throw new fo(void 0,{docsPath:i4});return {abi:[n],functionName:Do(nr(n))}}var i4,a4=F(()=>{Et();du();xi();xs();i4="/docs/contract/encodeFunctionData";});function ft(e){let{args:t}=e,{abi:r,functionName:o}=e.abi.length===1&&e.functionName?.startsWith("0x")?e:s4(e),n=r[0],i=o,s="inputs"in n&&n.inputs?qr(n.inputs,t??[]):void 0;return st([i,s??"0x"])}var Un=F(()=>{an();Si();a4();});var c4,J0,u4,Y0=F(()=>{c4={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},J0={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},u4={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"};});var Qd,pu,X0,W6=F(()=>{Te();Qd=class extends z{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`,{name:"NegativeOffsetError"});}},pu=class extends z{constructor({length:t,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${t}\`).`,{name:"PositionOutOfBoundsError"});}},X0=class extends z{constructor({count:t,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${t}\`).`,{name:"RecursiveReadLimitExceededError"});}};});function mu(e,{recursiveReadLimit:t=8192}={}){let r=Object.create(zH);return r.bytes=e,r.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}var zH,Q0=F(()=>{W6();zH={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new X0({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new pu({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Qd({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t;},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new Qd({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t;},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++;},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length;},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++;},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2;},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3;},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4;},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++;}};});function f4(e,t={}){typeof t.size<"u"&&sn(e,{size:t.size});let r=Ue(e);return ut(r,t)}function l4(e,t={}){let r=e;if(typeof t.size<"u"&&(sn(r,{size:t.size}),r=Gr(r)),r.length>1||r[0]>1)throw new V0(r);return !!r[0]}function Fo(e,t={}){typeof t.size<"u"&&sn(e,{size:t.size});let r=Ue(e);return vt(r,t)}function d4(e,t={}){let r=e;return typeof t.size<"u"&&(sn(r,{size:t.size}),r=Gr(r,{dir:"right"})),new TextDecoder().decode(r)}var p4=F(()=>{Wd();Kd();ur();Re();});function Ii(e,t){let r=typeof t=="string"?xr(t):t,o=mu(r);if($e(r)===0&&e.length>0)throw new Cn;if($e(t)&&$e(t)<32)throw new au({data:typeof t=="string"?t:Ue(t),params:e,size:$e(t)});let n=0,i=[];for(let s=0;s<e.length;++s){let a=e[s];n<r.length&&o.setPosition(n);let[c,u]=hu(o,a,{staticPosition:0});n+=u,i.push(c);}return i}function hu(e,t,{staticPosition:r}){let o=Xd(t.type);if(o){let[n,i]=o;return UH(e,{...t,type:i},{length:n,staticPosition:r})}if(t.type==="tuple")return FH(e,t,{staticPosition:r});if(t.type==="address")return LH(e);if(t.type==="bool")return MH(e);if(t.type.startsWith("bytes"))return DH(e,t,{staticPosition:r});if(t.type.startsWith("uint")||t.type.startsWith("int"))return jH(e,t);if(t.type==="string")return HH(e,{staticPosition:r});throw new j0(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}function LH(e){let t=e.readBytes(32);return [ys(Ue(F6(t,-20))),32]}function UH(e,t,{length:r,staticPosition:o}){if(r===null){let s=Fo(e.readBytes(K6)),a=o+s,c=a+m4;e.setPosition(a);let u=Fo(e.readBytes(m4)),f=ep(t),d=0,g=[];for(let h=0;h<u;++h){e.setPosition(c+(f?h*32:d));let[v,E]=hu(e,t,{staticPosition:c});d+=E,g.push(v),E===0&&(e.assertReadLimit(),e._touch());}return e.setPosition(o+32),[g,32]}if(ep(t)){let s=Fo(e.readBytes(K6)),a=o+s,c=[];for(let u=0;u<r;++u){e.setPosition(a+u*32);let[f]=hu(e,t,{staticPosition:a});c.push(f);}return e.setPosition(o+32),[c,32]}let n=0,i=[];for(let s=0;s<r;++s){let[a,c]=hu(e,t,{staticPosition:o+n});n+=c,i.push(a),c===0&&(e.assertReadLimit(),e._touch());}return [i,n]}function MH(e){return [l4(e.readBytes(32),{size:32}),32]}function DH(e,t,{staticPosition:r}){let[o,n]=t.type.split("bytes");if(!n){let s=Fo(e.readBytes(32));e.setPosition(r+s);let a=Fo(e.readBytes(32));if(a===0)return e.setPosition(r+32),["0x",32];let c=e.readBytes(a);return e.setPosition(r+32),[Ue(c),32]}return [Ue(e.readBytes(Number.parseInt(n,10),32)),32]}function jH(e,t){let r=t.type.startsWith("int"),o=Number.parseInt(t.type.split("int")[1]||"256",10),n=e.readBytes(32);return [o>48?f4(n,{signed:r}):Fo(n,{signed:r}),32]}function FH(e,t,{staticPosition:r}){let o=t.components.length===0||t.components.some(({name:s})=>!s),n=o?[]:{},i=0;if(ep(t)){let s=Fo(e.readBytes(K6)),a=r+s;for(let c=0;c<t.components.length;++c){let u=t.components[c];e.setPosition(a+i);let[f,d]=hu(e,u,{staticPosition:a});i+=d,n[o?c:u?.name]=f;}return e.setPosition(r+32),[n,32]}for(let s=0;s<t.components.length;++s){let a=t.components[s],[c,u]=hu(e,a,{staticPosition:r});n[o?s:a?.name]=c,i+=u;}return [n,i]}function HH(e,{staticPosition:t}){let r=Fo(e.readBytes(32)),o=t+r;e.setPosition(o);let n=Fo(e.readBytes(32));if(n===0)return e.setPosition(t+32),["",32];let i=e.readBytes(n,32),s=d4(i);return e.setPosition(t+32),[s,32]}function ep(e){let{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return true;if(t==="tuple")return e.components?.some(ep);let r=Xd(e.type);return !!(r&&ep({...e,type:r[1]}))}var m4,K6,tp=F(()=>{Et();Ei();Q0();on();bs();p4();vr();Re();Si();m4=32,K6=32;});function eg(e){let{abi:t,data:r,cause:o}=e,n=cn(r,0,4);if(n==="0x")throw new Cn({cause:o});let s=[...t||[],J0,u4].find(a=>a.type==="error"&&n===Do(nr(a)));if(!s)throw new cu(n,{docsPath:"/docs/contract/decodeErrorResult",cause:o});return {abiItem:s,args:"inputs"in s&&s.inputs&&s.inputs.length>0?Ii(s.inputs,cn(r,4)):void 0,errorName:s.name}}var J6=F(()=>{Y0();Et();bs();du();tp();xi();});var Be,Pr=F(()=>{Be=(e,t,r)=>JSON.stringify(e,(o,n)=>{let i=typeof n=="bigint"?n.toString():n;return typeof t=="function"?t(o,i):i},r);});function Y6({abiItem:e,args:t,includeFunctionName:r=true,includeName:o=false}){if("name"in e&&"inputs"in e&&e.inputs)return `${r?e.name:""}(${e.inputs.map((n,i)=>`${o&&n.name?`${n.name}: `:""}${typeof t[i]=="object"?Be(t[i]):t[i]}`).join(", ")})`}var h4=F(()=>{Pr();});function rg(e,t=0){if(!Number.isInteger(t)||t<0)throw new X6({decimals:t});let r=e.toString(),o=r.startsWith("-");o&&(r=r.slice(1)),r=r.padStart(t,"0");let[n,i]=[r.slice(0,r.length-t),r.slice(r.length-t)];return i=i.replace(/(0+)$/,""),`${o?"-":""}${n||"0"}${i?`.${i}`:""}`}function g4(e,t="wei"){return rg(e,tg.ether-tg[t])}function y4(e,t="wei"){return rg(e,tg.gwei-tg[t])}var tg,X6,ng=F(()=>{tg={wei:0,gwei:9,szabo:12,finney:15,ether:18};X6=class extends Error{constructor({decimals:t}){super(`\`decimals\` must be a non-negative integer. Got \`${t}\`.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Value.InvalidDecimalsError"});}};});function gu(e,t="wei"){return g4(e,t)}var og=F(()=>{ng();});function or(e,t="wei"){return y4(e,t)}var yu=F(()=>{ng();});function b4(e){return e.reduce((t,{slot:r,value:o})=>`${t} ${r}: ${o}
|
|
24
|
+
`,"")}function x4(e){return e.reduce((t,{address:r,...o})=>{let n=`${t} ${r}:
|
|
25
25
|
`;return o.nonce&&(n+=` nonce: ${o.nonce}
|
|
26
26
|
`),o.balance&&(n+=` balance: ${o.balance}
|
|
27
27
|
`),o.code&&(n+=` code: ${o.code}
|
|
28
28
|
`),o.state&&(n+=` state:
|
|
29
|
-
`,n+=
|
|
30
|
-
`,n+=
|
|
31
|
-
`).slice(0,-1)}var
|
|
32
|
-
`)}var
|
|
33
|
-
${
|
|
34
|
-
`):`The contract function "${o}" reverted.`,{cause:s??i,metaMessages:c,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"raw",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"reason",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"signature",{enumerable:true,configurable:true,writable:true,value:void 0}),this.data=a,this.raw=r,this.reason=u,this.signature=
|
|
35
|
-
`)});}};Object.defineProperty(
|
|
36
|
-
`)});}};Object.defineProperty(
|
|
37
|
-
`),{cause:t,name:"NonceTooLowError"});}};Object.defineProperty(
|
|
38
|
-
`),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"});}};Object.defineProperty(
|
|
39
|
-
`),{cause:t,name:"TipAboveFeeCapError"});}};Object.defineProperty(
|
|
40
|
-
`);super(u,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docs",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsOrigin",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"showVersion",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"version",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"BaseError"}),this.cause=r.cause,this.details=o,this.docs=s,this.docsOrigin=i,this.docsPath=n,this.shortMessage=t,this.showVersion=a,this.version=c;}walk(t){return cR(this,t)}};Object.defineProperty(de,"defaultStaticOptions",{enumerable:true,configurable:true,writable:true,value:{docsOrigin:"https://oxlib.sh",showVersion:false,version:`ox@${sR()}`}});de.setStaticOptions(de.defaultStaticOptions);});function Uu(e,t){if(jn(e)>t)throw new s0({givenSize:jn(e),maxSize:t})}function j1(e){if(e>=xi.zero&&e<=xi.nine)return e-xi.zero;if(e>=xi.A&&e<=xi.F)return e-(xi.A-10);if(e>=xi.a&&e<=xi.f)return e-(xi.a-10)}function lR(e,t={}){let{dir:r,size:o=32}=t;if(o===0)return e;if(e.length>o)throw new a0({size:e.length,targetSize:o,type:"Bytes"});let n=new Uint8Array(o);for(let i=0;i<o;i++){let s=r==="right";n[s?i:o-i-1]=e[s?i:e.length-i-1];}return n}function F1(e,t={}){let{dir:r="left"}=t,o=e,n=0;for(let i=0;i<o.length-1&&o[r==="left"?i:o.length-i-1].toString()==="0";i++)n++;return o=r==="left"?o.slice(n):o.slice(0,o.length-n),o}var xi,dR=j(()=>{ys();xi={zero:48,nine:57,A:65,F:70,a:97,f:102};});function Mu(e,t){if(at(e)>t)throw new c0({givenSize:at(e),maxSize:t})}function pR(e,t){if(typeof t=="number"&&t>0&&t>at(e)-1)throw new nd({offset:t,position:"start",size:at(e)})}function mR(e,t,r){if(typeof t=="number"&&typeof r=="number"&&at(e)!==r-t)throw new nd({offset:r,position:"end",size:at(e)})}function H1(e,t={}){let{dir:r,size:o=32}=t;if(o===0)return e;let n=e.replace("0x","");if(n.length>o*2)throw new u0({size:Math.ceil(n.length/2),targetSize:o,type:"Hex"});return `0x${n[r==="right"?"padEnd":"padStart"](o*2,"0")}`}function hR(e,t={}){let{dir:r="left"}=t,o=e.replace("0x",""),n=0;for(let i=0;i<o.length-1&&o[r==="left"?i:o.length-i-1].toString()==="0";i++)n++;return o=r==="left"?o.slice(n):o.slice(0,o.length-n),o==="0"?"0x":r==="right"&&o.length%2===1?`0x${o}0`:`0x${o}`}var V1=j(()=>{fr();});function bs(e,t,r){return JSON.stringify(e,(o,n)=>typeof n=="bigint"?n.toString()+hD:n,r)}var hD,od=j(()=>{hD="#__bigint";});function bD(e){if(!(e instanceof Uint8Array)){if(!e)throw new Du(e);if(typeof e!="object")throw new Du(e);if(!("BYTES_PER_ELEMENT"in e))throw new Du(e);if(e.BYTES_PER_ELEMENT!==1||e.constructor.name!=="Uint8Array")throw new Du(e)}}function yR(e){return e instanceof Uint8Array?e:typeof e=="string"?ju(e):xD(e)}function xD(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function ju(e,t={}){let{size:r}=t,o=e;r&&(Mu(e,r),o=Lo(e,r));let n=o.slice(2);n.length%2&&(n=`0${n}`);let i=n.length/2,s=new Uint8Array(i);for(let a=0,c=0;a<i;a++){let u=j1(n.charCodeAt(c++)),l=j1(n.charCodeAt(c++));if(u===void 0||l===void 0)throw new de(`Invalid byte sequence ("${n[c-2]}${n[c-1]}" in "${n}").`);s[a]=u<<4|l;}return s}function bR(e,t={}){let{size:r}=t,o=yD.encode(e);return typeof r=="number"?(Uu(o,r),vD(o,r)):o}function vD(e,t){return lR(e,{dir:"right",size:t})}function jn(e){return e.length}function xR(e,t,r,o={}){let{strict:n}=o;let i=e.slice(t,r);return i}function vR(e,t={}){let{size:r}=t;typeof r<"u"&&Uu(e,r);let o=_t(e,t);return q1(o,t)}function _R(e,t={}){let{size:r}=t,o=e;if(typeof r<"u"&&(Uu(o,r),o=G1(o)),o.length>1||o[0]>1)throw new Z1(o);return !!o[0]}function zo(e,t={}){let{size:r}=t;typeof r<"u"&&Uu(e,r);let o=_t(e,t);return l0(o,t)}function wR(e,t={}){let{size:r}=t,o=e;return typeof r<"u"&&(Uu(o,r),o=_D(o)),gD.decode(o)}function G1(e){return F1(e,{dir:"left"})}function _D(e){return F1(e,{dir:"right"})}function ER(e){try{return bD(e),!0}catch{return false}}var gD,yD,Z1,Du,s0,a0,ys=j(()=>{an();fr();dR();V1();od();gD=new TextDecoder,yD=new TextEncoder;Z1=class extends de{constructor(t){super(`Bytes value \`${t}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Bytes.InvalidBytesBooleanError"});}},Du=class extends de{constructor(t){super(`Value \`${typeof t=="object"?bs(t):t}\` of type \`${typeof t}\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Bytes.InvalidBytesTypeError"});}},s0=class extends de{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed \`${r}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Bytes.SizeOverflowError"});}},a0=class extends de{constructor({size:t,targetSize:r,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${r}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Bytes.SizeExceedsPaddingSizeError"});}};});function SD(e,t={}){let{strict:r=false}=t;if(!e)throw new d0(e);if(typeof e!="string")throw new d0(e);if(r&&!/^0x[0-9a-fA-F]*$/.test(e))throw new p0(e);if(!e.startsWith("0x"))throw new p0(e)}function pt(...e){return `0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}function Fu(e){return e instanceof Uint8Array?_t(e):Array.isArray(e)?_t(new Uint8Array(e)):e}function m0(e,t={}){let r=`0x${Number(e)}`;return typeof t.size=="number"?(Mu(r,t.size),vi(r,t.size)):r}function _t(e,t={}){let r="";for(let n=0;n<e.length;n++)r+=ED[e[n]];let o=`0x${r}`;return typeof t.size=="number"?(Mu(o,t.size),Lo(o,t.size)):o}function Fe(e,t={}){let{signed:r,size:o}=t,n=BigInt(e),i;o?r?i=(1n<<BigInt(o)*8n-1n)-1n:i=2n**(BigInt(o)*8n)-1n:typeof e=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));let s=typeof i=="bigint"&&r?-i-1n:0;if(i&&n>i||n<s){let u=typeof e=="bigint"?"n":"";throw new id({max:i?`${i}${u}`:void 0,min:`${s}${u}`,signed:r,size:o,value:`${e}${u}`})}let c=`0x${(r&&n<0?BigInt.asUintN(o*8,BigInt(n)):n).toString(16)}`;return o?vi(c,o):c}function Hu(e,t={}){return _t(wD.encode(e),t)}function vi(e,t){return H1(e,{dir:"left",size:t})}function Lo(e,t){return H1(e,{dir:"right",size:t})}function ct(e,t,r,o={}){let{strict:n}=o;pR(e,t);let i=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return n&&mR(i,t,r),i}function at(e){return Math.ceil((e.length-2)/2)}function W1(e){return hR(e,{dir:"left"})}function q1(e,t={}){let{signed:r}=t;t.size&&Mu(e,t.size);let o=BigInt(e);if(!r)return o;let n=(e.length-2)/2,i=(1n<<BigInt(n)*8n)-1n,s=i>>1n;return o<=s?o:o-i-1n}function l0(e,t={}){let{signed:r,size:o}=t;return Number(!r&&!o?e:q1(e,t))}function sd(e,t={}){let{strict:r=false}=t;try{return SD(e,{strict:r}),!0}catch{return false}}var wD,ED,id,d0,p0,c0,nd,u0,fr=j(()=>{an();V1();od();wD=new TextEncoder,ED=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));id=class extends de{constructor({max:t,min:r,signed:o,size:n,value:i}){super(`Number \`${i}\` is not in safe${n?` ${n*8}-bit`:""}${o?" signed":" unsigned"} integer range ${t?`(\`${r}\` to \`${t}\`)`:`(above \`${r}\`)`}`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.IntegerOutOfRangeError"});}},d0=class extends de{constructor(t){super(`Value \`${typeof t=="object"?bs(t):t}\` of type \`${typeof t}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.InvalidHexTypeError"});}},p0=class extends de{constructor(t){super(`Value \`${t}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.InvalidHexValueError"});}},c0=class extends de{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed \`${r}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.SizeOverflowError"});}},nd=class extends de{constructor({offset:t,position:r,size:o}){super(`Slice ${r==="start"?"starting":"ending"} at offset \`${t}\` is out-of-bounds (size: \`${o}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.SliceOffsetOutOfBoundsError"});}},u0=class extends de{constructor({size:t,targetSize:r,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${r}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.SizeExceedsPaddingSizeError"});}};});function SR(e){return {address:e.address,amount:Fe(e.amount),index:Fe(e.index),validatorIndex:Fe(e.validatorIndex)}}var IR=j(()=>{fr();});function h0(e){return {...typeof e.baseFeePerGas=="bigint"&&{baseFeePerGas:Fe(e.baseFeePerGas)},...typeof e.blobBaseFee=="bigint"&&{blobBaseFee:Fe(e.blobBaseFee)},...typeof e.feeRecipient=="string"&&{feeRecipient:e.feeRecipient},...typeof e.gasLimit=="bigint"&&{gasLimit:Fe(e.gasLimit)},...typeof e.number=="bigint"&&{number:Fe(e.number)},...typeof e.prevRandao=="bigint"&&{prevRandao:Fe(e.prevRandao)},...typeof e.time=="bigint"&&{time:Fe(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(SR)}}}var K1=j(()=>{fr();IR();});var Uo,g0,kR,y0,RR,J1,Y1,X1,Q1,_i=j(()=>{Uo=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{name:"addr",type:"address"}],name:"getEthBalance",outputs:[{name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],g0=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],kR=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}],y0=[...kR,{name:"resolveWithGateways",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],RR=[...kR,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],J1=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],Y1=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],X1=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],Q1=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}];});var TR,$R=j(()=>{TR="0x82ad56cb";});var b0,OR,NR,Vu,ad=j(()=>{b0="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",OR="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",NR="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",Vu="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033";});var Pa,cd,Ba,x0=j(()=>{Oe();Pa=class extends M{constructor({blockNumber:t,chain:r,contract:o}){super(`Chain "${r.name}" does not support contract "${o.name}".`,{metaMessages:["This could be due to any of the following:",...t&&o.blockCreated&&o.blockCreated>t?[`- The contract "${o.name}" was not deployed until block ${o.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${o.name}" configured.`]],name:"ChainDoesNotSupportContract"});}},cd=class extends M{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"});}},Ba=class extends M{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"});}};});function ud(e){let{abi:t,args:r,bytecode:o}=e;if(!r||r.length===0)return o;let n=t.find(s=>"type"in s&&s.type==="constructor");if(!n)throw new oh({docsPath:ev});if(!("inputs"in n))throw new Ul({docsPath:ev});if(!n.inputs||n.inputs.length===0)throw new Ul({docsPath:ev});let i=Vr(n.inputs,r);return ar([o,i])}var ev,tv=j(()=>{xt();tn();pi();ev="/docs/contract/encodeDeployData";});function Fn({blockNumber:e,chain:t,contract:r}){let o=t?.contracts?.[r];if(!o)throw new Pa({chain:t,contract:{name:r}});if(e&&o.blockCreated&&o.blockCreated>e)throw new Pa({blockNumber:e,chain:t,contract:{name:r,blockCreated:o.blockCreated}});return o.address}var Ca=j(()=>{x0();});function v0(e,{docsPath:t,...r}){let o=(()=>{let n=ms(e,r);return n instanceof Mn?e:n})();return new qc(o,{docsPath:t,...r})}var rv=j(()=>{fs();ps();Ql();});function _0(){let e=()=>{},t=()=>{};return {promise:new Promise((o,n)=>{e=o,t=n;}),resolve:e,reject:t}}var nv=j(()=>{});function w0({fn:e,id:t,shouldSplitBatch:r,wait:o=0,sort:n}){let i=async()=>{let l=c();s();let d=l.map(({args:g})=>g);d.length!==0&&e(d).then(g=>{n&&Array.isArray(g)&&g.sort(n);for(let h=0;h<l.length;h++){let{resolve:v}=l[h];v?.([g[h],g]);}}).catch(g=>{for(let h=0;h<l.length;h++){let{reject:v}=l[h];v?.(g);}});},s=()=>ov.delete(t),a=()=>c().map(({args:l})=>l),c=()=>ov.get(t)||[],u=l=>ov.set(t,[...c(),l]);return {flush:s,async schedule(l){let{promise:d,resolve:g,reject:h}=_0();return r?.([...a(),l])&&i(),c().length>0?(u({args:l,resolve:g,reject:h}),d):(u({args:l,resolve:g,reject:h}),setTimeout(i,o),d)}}}var ov,iv=j(()=>{nv();ov=new Map;});var E0,S0,I0,PR=j(()=>{on();Oe();uo();E0=class extends M{constructor({callbackSelector:t,cause:r,data:o,extraData:n,sender:i,urls:s}){super(r.shortMessage||"An error occurred while fetching for an offchain result.",{cause:r,metaMessages:[...r.metaMessages||[],r.metaMessages?.length?"":[],"Offchain Gateway Call:",s&&[" Gateway URL(s):",...s.map(a=>` ${Ea(a)}`)],` Sender: ${i}`,` Data: ${o}`,` Callback selector: ${t}`,` Extra data: ${n}`].flat(),name:"OffchainLookupError"});}},S0=class extends M{constructor({result:t,url:r}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${Ea(r)}`,`Response: ${je(t)}`],name:"OffchainLookupResponseMalformedError"});}},I0=class extends M{constructor({sender:t,to:r}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${r}`,`OffchainLookup sender address: ${t}`],name:"OffchainLookupSenderMismatchError"});}};});function BR(e){let{abi:t,data:r}=e,o=rn(r,0,4),n=t.find(i=>i.type==="function"&&o===$o(er(i)));if(!n)throw new lh(o,{docsPath:"/docs/contract/decodeFunctionData"});return {functionName:n.name,args:"inputs"in n&&n.inputs&&n.inputs.length>0?mi(n.inputs,rn(r,4)):void 0}}var CR=j(()=>{xt();as();Mc();Kl();ci();});function av(e){let{abi:t,errorName:r,args:o}=e,n=t[0];if(r){let c=nn({abi:t,args:o,name:r});if(!c)throw new Ml(r,{docsPath:sv});n=c;}if(n.type!=="error")throw new Ml(void 0,{docsPath:sv});let i=er(n),s=$o(i),a="0x";if(o&&o.length>0){if(!n.inputs)throw new ch(n.name,{docsPath:sv});a=Vr(n.inputs,o);}return ar([s,a])}var sv,zR=j(()=>{xt();tn();Mc();pi();ci();cs();sv="/docs/contract/encodeErrorResult";});function LR(e){let{abi:t,functionName:r,result:o}=e,n=t[0];if(r){let s=nn({abi:t,name:r});if(!s)throw new io(r,{docsPath:cv});n=s;}if(n.type!=="function")throw new io(void 0,{docsPath:cv});if(!n.outputs)throw new Cc(n.name,{docsPath:cv});let i=(()=>{if(n.outputs.length===0)return [];if(n.outputs.length===1)return [o];if(Array.isArray(o))return o;throw new zc(o)})();return Vr(n.outputs,i)}var cv,UR=j(()=>{xt();pi();cs();cv="/docs/contract/encodeFunctionResult";});async function uv(e){let{data:t,ccipRequest:r}=e,{args:[o]}=BR({abi:g0,data:t}),n=[],i=[];return await Promise.all(o.map(async(s,a)=>{try{i[a]=s.urls.includes(wi)?await uv({data:s.data,ccipRequest:r}):await r(s),n[a]=!1;}catch(c){n[a]=true,i[a]=AD(c);}})),LR({abi:g0,functionName:"query",result:[n,i]})}function AD(e){return e.name==="HttpRequestError"&&e.status?av({abi:g0,errorName:"HttpError",args:[e.status,e.shortMessage]}):av({abi:[Ah],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}var wi,fd=j(()=>{_i();kh();CR();zR();UR();wi="x-batch-gateway:true";});var jR={};Ir(jR,{ccipRequest:()=>DR,offchainLookup:()=>RD,offchainLookupAbiItem:()=>MR,offchainLookupSignature:()=>kD});async function RD(e,{blockNumber:t,blockTag:r,data:o,requestOptions:n,to:i}){let{args:s}=$h({data:o,abi:[MR]}),[a,c,u,l,d]=s,{ccipRead:g}=e,h=g&&typeof g?.request=="function"?g.request:DR;try{if(!vn(i,a))throw new I0({sender:a,to:i});let v=c.includes(wi)?await uv({data:u,ccipRequest:R=>h({...R,requestOptions:n})}):await h({data:u,requestOptions:n,sender:a,urls:c}),{data:E}=await Hn(e,{blockNumber:t,blockTag:r,data:wr([l,Vr([{type:"bytes"},{type:"bytes"}],[v,d])]),requestOptions:n,to:i});return E}catch(v){throw n?.signal?.aborted?Er(n.signal):sn(v)?v:new E0({callbackSelector:l,cause:v,data:o,extraData:d,sender:a,urls:c})}}async function DR({data:e,requestOptions:t,sender:r,urls:o}){let n=new Error("An unknown error occurred.");for(let i=0;i<o.length;i++){if(t?.signal?.aborted)throw Er(t.signal);let s=o[i],a=s.includes("{data}")?"GET":"POST",c=a==="POST"?{data:e,sender:r}:void 0,u=a==="POST"?{"Content-Type":"application/json"}:{};try{let l=await fetch(s.replace("{sender}",r.toLowerCase()).replace("{data}",e),{body:JSON.stringify(c),headers:u,method:a,...t?.signal?{signal:t.signal}:{}}),d;if(l.headers.get("Content-Type")?.startsWith("application/json")?d=(await l.json()).data:d=await l.text(),!l.ok){n=new zn({body:c,details:d?.error?je(d.error):l.statusText,headers:l.headers,status:l.status,url:s});continue}if(!vt(d)){n=new S0({result:d,url:s});continue}return d}catch(l){if(t?.signal?.aborted)throw Er(t.signal);if(sn(l))throw l;n=new zn({body:c,details:l.message,url:s});}}throw n}var kD,MR,FR=j(()=>{za();PR();Ia();uo();O1();pi();$a();tn();oo();fd();on();kD="0x556f1830",MR={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};});async function Hn(e,t){let{account:r=e.account,authorizationList:o,batch:n=!!e.batch?.multicall,blockHash:i,blockNumber:s,blockTag:a=e.experimental_blockTag??"latest",requireCanonical:c,accessList:u,blobs:l,blockOverrides:d,code:g,data:h,factory:v,factoryData:E,gas:R,gasPrice:$,maxFeePerBlobGas:P,maxFeePerGas:O,maxPriorityFeePerGas:I,nonce:N,requestOptions:C,to:z,value:F,stateOverride:W,...V}=t,G=r?nt(r):void 0;if(g&&(v||E))throw new M("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(g&&z)throw new M("Cannot provide both `code` & `to` as parameters.");let ne=g&&h,S=v&&E&&z&&h,f=ne||S,m=ne?ZR({code:g,data:h}):S?BD({data:h,factory:v,factoryData:E,to:z}):h;try{Dn(t);let y=xn({blockHash:i,blockNumber:s,blockTag:a,requireCanonical:c}),x=d?h0(d):void 0,b=Au(W),w=e.chain?.formatters?.transactionRequest?.format,_=(w||Co)({...hs(V,{format:w}),accessList:u,account:G,authorizationList:o,blobs:l,data:m,gas:R,gasPrice:$,maxFeePerBlobGas:P,maxFeePerGas:O,maxPriorityFeePerGas:I,nonce:N,to:f?void 0:z,value:F},"call");if(n&&TD({request:_})&&!x&&i===void 0)try{let{deployless:Z=!1}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},K=VR(e,{blockNumber:s,deployless:Z});if(!K||!PD(b,K))return await ND(e,{..._,blockHash:i,blockNumber:s,blockTag:a,multicallAddress:K,requestOptions:C,requireCanonical:c,rpcStateOverride:b})}catch(Z){if(!(Z instanceof cd)&&!(Z instanceof Pa))throw Z}let p=(()=>{let Z=[_,y];return b&&x?[...Z,b,x]:b?[...Z,b]:x?[...Z,{},x]:Z})(),A=await e.request({method:"eth_call",params:p},C);return A==="0x"?{data:void 0}:{data:A}}catch(y){if(C?.signal?.aborted)throw Er(C.signal);if(sn(y))throw y;let x=CD(y),{offchainLookup:b,offchainLookupSignature:w}=await Promise.resolve().then(()=>(FR(),jR));if(e.ccipRead!==false&&x?.slice(0,10)===w&&z)return {data:await b(e,{data:x,requestOptions:C,to:z})};throw f&&x?.slice(0,10)==="0x101bb98d"?new Fh({factory:v}):v0(y,{...t,account:G,chain:e.chain})}}function TD({request:e}){let{data:t,to:r,...o}=e;return !(!t||t.startsWith(TR)||!r||Object.values(o).filter(n=>typeof n<"u").length>0)}function OD(e){if(!e)return "default";let t=HR.get(e);if(t!==void 0)return t;let r=$D++;return HR.set(e,r),r}async function ND(e,t){let{batchSize:r=1024,deployless:o=false,wait:n=0}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},{blockHash:i,blockNumber:s,blockTag:a=e.experimental_blockTag??"latest",requireCanonical:c,data:u,multicallAddress:l,requestOptions:d,rpcStateOverride:g,to:h}=t,v=l!==void 0?l:VR(e,{blockNumber:s,deployless:o}),E=xn({blockHash:i,blockNumber:s,blockTag:a,requireCanonical:c}),R=typeof E=="string"?E:JSON.stringify(E),$=g?`.${JSON.stringify(g)}`:"",{schedule:P}=w0({id:`${e.uid}.${R}.${OD(d)}${$}`,wait:n,shouldSplitBatch(N){return N.reduce((z,{data:F})=>z+(F.length-2),0)>r*2},fn:async N=>{let C=N.map(V=>({allowFailure:true,callData:V.data,target:V.to})),z=dt({abi:Uo,args:[C],functionName:"aggregate3"}),F={...v===null?{data:ZR({code:Vu,data:z})}:{to:v,data:z}},W=await e.request({method:"eth_call",params:g?[F,E,g]:[F,E]},d);return Lr({abi:Uo,args:[C],functionName:"aggregate3",data:W||"0x"})}}),[{returnData:O,success:I}]=await P({data:u,to:h});if(!I)throw new Po({data:O});return O==="0x"?{data:void 0}:{data:O}}function VR(e,t){let{blockNumber:r,deployless:o}=t;if(o)return null;if(e.chain)return Fn({blockNumber:r,chain:e.chain,contract:"multicall3"});throw new cd}function PD(e,t){return e?Object.keys(e).some(r=>vn(r,t)):false}function ZR(e){let{code:t,data:r}=e;return ud({abi:ts(["constructor(bytes, bytes)"]),bytecode:b0,args:[t,r]})}function BD(e){let{data:t,factory:r,factoryData:o,to:n}=e;return ud({abi:ts(["constructor(address, bytes, address, bytes)"]),bytecode:OR,args:[n,t,r,o]})}function CD(e){if(!(e instanceof M))return;let t=e.walk();return typeof t?.data=="object"?t.data?.data:t.data}var $D,HR,za=j(()=>{Nc();K1();bn();_i();$R();ad();Oe();x0();fs();uo();bi();tv();Cn();$a();Ta();Ca();rv();ed();Iu();iv();qh();Ra();$D=0,HR=new WeakMap;});var bf={};Ir(bf,{InvalidDomainManifest:()=>Hy,RejectedByUser:()=>Vy});var qn=class extends Error{name="BaseError";cause;constructor(t,r={}){super(t,r.cause?{cause:r.cause}:void 0),this.cause=r.cause;}};var Hy=class extends qn{name="AddMiniApp.InvalidDomainManifest";constructor(){super("Invalid domain manifest");}},Vy=class extends qn{name="AddMiniApp.RejectedByUser";constructor(){super("Add miniapp rejected by user");}};var Wa={};Ir(Wa,{RejectedByUser:()=>Zy});var Zy=class extends qn{name="SignIn.RejectedByUser";constructor(){super("Sign in rejected by user");}};var Ka={};Ir(Ka,{GenericError:()=>Wy,InvalidDomain:()=>qy,RejectedByUser:()=>Gy});var Gy=class extends qn{name="SignManifest.RejectedByUser";constructor(){super("Sign manifest rejected by user");}},qy=class extends qn{name="SignManifest.InvalidDomain";constructor(){super("Invalid domain provided");}},Wy=class extends qn{name="SignManifest.GenericError";constructor(t="Manifest signing failed"){super(t);}};var oe={};Ir(oe,{BRAND:()=>GO,DIRTY:()=>Ns,EMPTY_PATH:()=>SO,INVALID:()=>he,NEVER:()=>$N,OK:()=>Ar,ParseStatus:()=>lr,Schema:()=>Ae,ZodAny:()=>Bi,ZodArray:()=>qo,ZodBigInt:()=>Bs,ZodBoolean:()=>Cs,ZodBranded:()=>vf,ZodCatch:()=>Gs,ZodDate:()=>zs,ZodDefault:()=>Zs,ZodDiscriminatedUnion:()=>wp,ZodEffects:()=>An,ZodEnum:()=>Hs,ZodError:()=>qr,ZodFirstPartyTypeKind:()=>ge,ZodFunction:()=>Sp,ZodIntersection:()=>Ds,ZodIssueCode:()=>J,ZodLazy:()=>js,ZodLiteral:()=>Fs,ZodMap:()=>tc,ZodNaN:()=>nc,ZodNativeEnum:()=>Vs,ZodNever:()=>Wn,ZodNull:()=>Us,ZodNullable:()=>go,ZodNumber:()=>Ps,ZodObject:()=>Wr,ZodOptional:()=>Sn,ZodParsedType:()=>ce,ZodPipeline:()=>_f,ZodPromise:()=>Ci,ZodReadonly:()=>qs,ZodRecord:()=>Ep,ZodSchema:()=>Ae,ZodSet:()=>rc,ZodString:()=>Pi,ZodSymbol:()=>Qa,ZodTransformer:()=>An,ZodTuple:()=>ho,ZodType:()=>Ae,ZodUndefined:()=>Ls,ZodUnion:()=>Ms,ZodUnknown:()=>Go,ZodVoid:()=>ec,addIssueToContext:()=>se,any:()=>tN,array:()=>iN,bigint:()=>JO,boolean:()=>RE,coerce:()=>TN,custom:()=>IE,date:()=>YO,datetimeRegex:()=>EE,defaultErrorMap:()=>Vo,discriminatedUnion:()=>uN,effect:()=>_N,enum:()=>bN,function:()=>hN,getErrorMap:()=>Ja,getParsedType:()=>mo,instanceof:()=>WO,intersection:()=>fN,isAborted:()=>vp,isAsync:()=>Ya,isDirty:()=>_p,isValid:()=>Ni,late:()=>qO,lazy:()=>gN,literal:()=>yN,makeIssue:()=>xf,map:()=>pN,nan:()=>KO,nativeEnum:()=>xN,never:()=>nN,null:()=>eN,nullable:()=>EN,number:()=>kE,object:()=>sN,objectUtil:()=>Ky,oboolean:()=>RN,onumber:()=>kN,optional:()=>wN,ostring:()=>AN,pipeline:()=>IN,preprocess:()=>SN,promise:()=>vN,quotelessJson:()=>_O,record:()=>dN,set:()=>mN,setErrorMap:()=>EO,strictObject:()=>aN,string:()=>AE,symbol:()=>XO,transformer:()=>_N,tuple:()=>lN,undefined:()=>QO,union:()=>cN,unknown:()=>rN,util:()=>$e,void:()=>oN});var $e;(function(e){e.assertEqual=n=>{};function t(n){}e.assertIs=t;function r(n){throw new Error}e.assertNever=r,e.arrayToEnum=n=>{let i={};for(let s of n)i[s]=s;return i},e.getValidEnumValues=n=>{let i=e.objectKeys(n).filter(a=>typeof n[n[a]]!="number"),s={};for(let a of i)s[a]=n[a];return e.objectValues(s)},e.objectValues=n=>e.objectKeys(n).map(function(i){return n[i]}),e.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let i=[];for(let s in n)Object.prototype.hasOwnProperty.call(n,s)&&i.push(s);return i},e.find=(n,i)=>{for(let s of n)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function o(n,i=" | "){return n.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=o,e.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i;})($e||($e={}));var Ky;(function(e){e.mergeShapes=(t,r)=>({...t,...r});})(Ky||(Ky={}));var ce=$e.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),mo=e=>{switch(typeof e){case "undefined":return ce.undefined;case "string":return ce.string;case "number":return Number.isNaN(e)?ce.nan:ce.number;case "boolean":return ce.boolean;case "function":return ce.function;case "bigint":return ce.bigint;case "symbol":return ce.symbol;case "object":return Array.isArray(e)?ce.array:e===null?ce.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ce.promise:typeof Map<"u"&&e instanceof Map?ce.map:typeof Set<"u"&&e instanceof Set?ce.set:typeof Date<"u"&&e instanceof Date?ce.date:ce.object;default:return ce.unknown}};var J=$e.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),_O=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),qr=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o];},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o];};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t;}format(t){let r=t||function(i){return i.message},o={_errors:[]},n=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)o._errors.push(r(s));else {let a=o,c=0;for(;c<s.path.length;){let u=s.path[c];c===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(s))):a[u]=a[u]||{_errors:[]},a=a[u],c++;}}};return n(this),o}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,$e.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},o=[];for(let n of this.issues)if(n.path.length>0){let i=n.path[0];r[i]=r[i]||[],r[i].push(t(n));}else o.push(t(n));return {formErrors:o,fieldErrors:r}}get formErrors(){return this.flatten()}};qr.create=e=>new qr(e);var wO=(e,t)=>{let r;switch(e.code){case J.invalid_type:e.received===ce.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case J.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,$e.jsonStringifyReplacer)}`;break;case J.unrecognized_keys:r=`Unrecognized key(s) in object: ${$e.joinValues(e.keys,", ")}`;break;case J.invalid_union:r="Invalid input";break;case J.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${$e.joinValues(e.options)}`;break;case J.invalid_enum_value:r=`Invalid enum value. Expected ${$e.joinValues(e.options)}, received '${e.received}'`;break;case J.invalid_arguments:r="Invalid function arguments";break;case J.invalid_return_type:r="Invalid function return type";break;case J.invalid_date:r="Invalid date";break;case J.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:$e.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case J.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case J.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case J.custom:r="Invalid input";break;case J.invalid_intersection_types:r="Intersection results could not be merged";break;case J.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case J.not_finite:r="Number must be finite";break;default:r=t.defaultError,$e.assertNever(e);}return {message:r}},Vo=wO;var bE=Vo;function EO(e){bE=e;}function Ja(){return bE}var xf=e=>{let{data:t,path:r,errorMaps:o,issueData:n}=e,i=[...r,...n.path||[]],s={...n,path:i};if(n.message!==void 0)return {...n,path:i,message:n.message};let a="",c=o.filter(u=>!!u).slice().reverse();for(let u of c)a=u(s,{data:t,defaultError:a}).message;return {...n,path:i,message:a}},SO=[];function se(e,t){let r=Ja(),o=xf({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Vo?void 0:Vo].filter(n=>!!n)});e.common.issues.push(o);}var lr=class e{constructor(){this.value="valid";}dirty(){this.value==="valid"&&(this.value="dirty");}abort(){this.value!=="aborted"&&(this.value="aborted");}static mergeArray(t,r){let o=[];for(let n of r){if(n.status==="aborted")return he;n.status==="dirty"&&t.dirty(),o.push(n.value);}return {status:t.value,value:o}}static async mergeObjectAsync(t,r){let o=[];for(let n of r){let i=await n.key,s=await n.value;o.push({key:i,value:s});}return e.mergeObjectSync(t,o)}static mergeObjectSync(t,r){let o={};for(let n of r){let{key:i,value:s}=n;if(i.status==="aborted"||s.status==="aborted")return he;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||n.alwaysSet)&&(o[i.value]=s.value);}return {status:t.value,value:o}}},he=Object.freeze({status:"aborted"}),Ns=e=>({status:"dirty",value:e}),Ar=e=>({status:"valid",value:e}),vp=e=>e.status==="aborted",_p=e=>e.status==="dirty",Ni=e=>e.status==="valid",Ya=e=>typeof Promise<"u"&&e instanceof Promise;var le;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message;})(le||(le={}));var In=class{constructor(t,r,o,n){this._cachedPath=[],this.parent=t,this.data=r,this._path=o,this._key=n;}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},xE=(e,t)=>{if(Ni(t))return {success:true,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return {success:false,get error(){if(this._error)return this._error;let r=new qr(e.common.issues);return this._error=r,this._error}}};function we(e){if(!e)return {};let{errorMap:t,invalid_type_error:r,required_error:o,description:n}=e;if(t&&(r||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:n}:{errorMap:(s,a)=>{let{message:c}=e;return s.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??o??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:n}}var Ae=class{get description(){return this._def.description}_getType(t){return mo(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:mo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return {status:new lr,ctx:{common:t.parent.common,data:t.data,parsedType:mo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(Ya(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let o=this.safeParse(t,r);if(o.success)return o.data;throw o.error}safeParse(t,r){let o={common:{issues:[],async:r?.async??false,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:mo(t)},n=this._parseSync({data:t,path:o.path,parent:o});return xE(o,n)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:mo(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:r});return Ni(o)?{value:o.value}:{issues:r.common.issues}}catch(o){o?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=true),r.common={issues:[],async:true};}return this._parseAsync({data:t,path:[],parent:r}).then(o=>Ni(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(t,r){let o=await this.safeParseAsync(t,r);if(o.success)return o.data;throw o.error}async safeParseAsync(t,r){let o={common:{issues:[],contextualErrorMap:r?.errorMap,async:true},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:mo(t)},n=this._parse({data:t,path:o.path,parent:o}),i=await(Ya(n)?n:Promise.resolve(n));return xE(o,i)}refine(t,r){let o=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,i)=>{let s=t(n),a=()=>i.addIssue({code:J.custom,...o(n)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?true:(a(),false)):s?true:(a(),false)})}refinement(t,r){return this._refinement((o,n)=>t(o)?true:(n.addIssue(typeof r=="function"?r(o,n):r),false))}_refinement(t){return new An({schema:this,typeName:ge.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)};}optional(){return Sn.create(this,this._def)}nullable(){return go.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return qo.create(this)}promise(){return Ci.create(this,this._def)}or(t){return Ms.create([this,t],this._def)}and(t){return Ds.create(this,t,this._def)}transform(t){return new An({...we(this._def),schema:this,typeName:ge.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Zs({...we(this._def),innerType:this,defaultValue:r,typeName:ge.ZodDefault})}brand(){return new vf({typeName:ge.ZodBranded,type:this,...we(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new Gs({...we(this._def),innerType:this,catchValue:r,typeName:ge.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return _f.create(this,t)}readonly(){return qs.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},IO=/^c[^\s-]{8,}$/i,AO=/^[0-9a-z]+$/,kO=/^[0-9A-HJKMNP-TV-Z]{26}$/i,RO=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,TO=/^[a-z0-9_-]{21}$/i,$O=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,OO=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,NO=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,PO="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Jy,BO=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,CO=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,zO=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,LO=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,UO=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,MO=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,_E="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",DO=new RegExp(`^${_E}$`);function wE(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return `([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function jO(e){return new RegExp(`^${wE(e)}$`)}function EE(e){let t=`${_E}T${wE(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function FO(e,t){return !!((t==="v4"||!t)&&BO.test(e)||(t==="v6"||!t)&&zO.test(e))}function HO(e,t){if(!$O.test(e))return false;try{let[r]=e.split(".");if(!r)return !1;let o=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(o));return !(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||t&&n.alg!==t)}catch{return false}}function VO(e,t){return !!((t==="v4"||!t)&&CO.test(e)||(t==="v6"||!t)&&LO.test(e))}var Pi=class e extends Ae{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ce.string){let i=this._getOrReturnCtx(t);return se(i,{code:J.invalid_type,expected:ce.string,received:i.parsedType}),he}let o=new lr,n;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:J.too_small,minimum:i.value,type:"string",inclusive:true,exact:false,message:i.message}),o.dirty());else if(i.kind==="max")t.data.length>i.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:J.too_big,maximum:i.value,type:"string",inclusive:true,exact:false,message:i.message}),o.dirty());else if(i.kind==="length"){let s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(n=this._getOrReturnCtx(t,n),s?se(n,{code:J.too_big,maximum:i.value,type:"string",inclusive:true,exact:true,message:i.message}):a&&se(n,{code:J.too_small,minimum:i.value,type:"string",inclusive:true,exact:true,message:i.message}),o.dirty());}else if(i.kind==="email")NO.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"email",code:J.invalid_string,message:i.message}),o.dirty());else if(i.kind==="emoji")Jy||(Jy=new RegExp(PO,"u")),Jy.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"emoji",code:J.invalid_string,message:i.message}),o.dirty());else if(i.kind==="uuid")RO.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"uuid",code:J.invalid_string,message:i.message}),o.dirty());else if(i.kind==="nanoid")TO.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"nanoid",code:J.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid")IO.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"cuid",code:J.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid2")AO.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"cuid2",code:J.invalid_string,message:i.message}),o.dirty());else if(i.kind==="ulid")kO.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"ulid",code:J.invalid_string,message:i.message}),o.dirty());else if(i.kind==="url")try{new URL(t.data);}catch{n=this._getOrReturnCtx(t,n),se(n,{validation:"url",code:J.invalid_string,message:i.message}),o.dirty();}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"regex",code:J.invalid_string,message:i.message}),o.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(t,n),se(n,{code:J.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),o.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(n=this._getOrReturnCtx(t,n),se(n,{code:J.invalid_string,validation:{startsWith:i.value},message:i.message}),o.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(n=this._getOrReturnCtx(t,n),se(n,{code:J.invalid_string,validation:{endsWith:i.value},message:i.message}),o.dirty()):i.kind==="datetime"?EE(i).test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{code:J.invalid_string,validation:"datetime",message:i.message}),o.dirty()):i.kind==="date"?DO.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{code:J.invalid_string,validation:"date",message:i.message}),o.dirty()):i.kind==="time"?jO(i).test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{code:J.invalid_string,validation:"time",message:i.message}),o.dirty()):i.kind==="duration"?OO.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"duration",code:J.invalid_string,message:i.message}),o.dirty()):i.kind==="ip"?FO(t.data,i.version)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"ip",code:J.invalid_string,message:i.message}),o.dirty()):i.kind==="jwt"?HO(t.data,i.alg)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"jwt",code:J.invalid_string,message:i.message}),o.dirty()):i.kind==="cidr"?VO(t.data,i.version)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"cidr",code:J.invalid_string,message:i.message}),o.dirty()):i.kind==="base64"?UO.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"base64",code:J.invalid_string,message:i.message}),o.dirty()):i.kind==="base64url"?MO.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"base64url",code:J.invalid_string,message:i.message}),o.dirty()):$e.assertNever(i);return {status:o.value,value:t.data}}_regex(t,r,o){return this.refinement(n=>t.test(n),{validation:r,code:J.invalid_string,...le.errToObj(o)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...le.errToObj(t)})}url(t){return this._addCheck({kind:"url",...le.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...le.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...le.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...le.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...le.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...le.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...le.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...le.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...le.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...le.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...le.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...le.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:false,local:false,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??false,local:t?.local??false,...le.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...le.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...le.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...le.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...le.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...le.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...le.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...le.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...le.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...le.errToObj(r)})}nonempty(t){return this.min(1,le.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return !!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return !!this._def.checks.find(t=>t.kind==="date")}get isTime(){return !!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return !!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return !!this._def.checks.find(t=>t.kind==="email")}get isURL(){return !!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return !!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return !!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return !!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return !!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return !!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return !!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return !!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return !!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return !!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return !!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Pi.create=e=>new Pi({checks:[],typeName:ge.ZodString,coerce:e?.coerce??false,...we(e)});function ZO(e,t){let r=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,n=r>o?r:o,i=Number.parseInt(e.toFixed(n).replace(".","")),s=Number.parseInt(t.toFixed(n).replace(".",""));return i%s/10**n}var Ps=class e extends Ae{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf;}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ce.number){let i=this._getOrReturnCtx(t);return se(i,{code:J.invalid_type,expected:ce.number,received:i.parsedType}),he}let o,n=new lr;for(let i of this._def.checks)i.kind==="int"?$e.isInteger(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{code:J.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),se(o,{code:J.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:false,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),se(o,{code:J.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:false,message:i.message}),n.dirty()):i.kind==="multipleOf"?ZO(t.data,i.value)!==0&&(o=this._getOrReturnCtx(t,o),se(o,{code:J.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{code:J.not_finite,message:i.message}),n.dirty()):$e.assertNever(i);return {status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,true,le.toString(r))}gt(t,r){return this.setLimit("min",t,false,le.toString(r))}lte(t,r){return this.setLimit("max",t,true,le.toString(r))}lt(t,r){return this.setLimit("max",t,false,le.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:le.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:le.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:false,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:false,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:true,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:true,message:le.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:le.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:true,value:Number.MIN_SAFE_INTEGER,message:le.toString(t)})._addCheck({kind:"max",inclusive:true,value:Number.MAX_SAFE_INTEGER,message:le.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return !!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&$e.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return true;o.kind==="min"?(r===null||o.value>r)&&(r=o.value):o.kind==="max"&&(t===null||o.value<t)&&(t=o.value);}return Number.isFinite(r)&&Number.isFinite(t)}};Ps.create=e=>new Ps({checks:[],typeName:ge.ZodNumber,coerce:e?.coerce||false,...we(e)});var Bs=class e extends Ae{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte;}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data);}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ce.bigint)return this._getInvalidInput(t);let o,n=new lr;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),se(o,{code:J.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),se(o,{code:J.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(o=this._getOrReturnCtx(t,o),se(o,{code:J.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):$e.assertNever(i);return {status:n.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return se(r,{code:J.invalid_type,expected:ce.bigint,received:r.parsedType}),he}gte(t,r){return this.setLimit("min",t,true,le.toString(r))}gt(t,r){return this.setLimit("min",t,false,le.toString(r))}lte(t,r){return this.setLimit("max",t,true,le.toString(r))}lt(t,r){return this.setLimit("max",t,false,le.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:le.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:false,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:false,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:true,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:true,message:le.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Bs.create=e=>new Bs({checks:[],typeName:ge.ZodBigInt,coerce:e?.coerce??false,...we(e)});var Cs=class extends Ae{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ce.boolean){let o=this._getOrReturnCtx(t);return se(o,{code:J.invalid_type,expected:ce.boolean,received:o.parsedType}),he}return Ar(t.data)}};Cs.create=e=>new Cs({typeName:ge.ZodBoolean,coerce:e?.coerce||false,...we(e)});var zs=class e extends Ae{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ce.date){let i=this._getOrReturnCtx(t);return se(i,{code:J.invalid_type,expected:ce.date,received:i.parsedType}),he}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return se(i,{code:J.invalid_date}),he}let o=new lr,n;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:J.too_small,message:i.message,inclusive:true,exact:false,minimum:i.value,type:"date"}),o.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:J.too_big,message:i.message,inclusive:true,exact:false,maximum:i.value,type:"date"}),o.dirty()):$e.assertNever(i);return {status:o.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:le.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:le.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};zs.create=e=>new zs({checks:[],coerce:e?.coerce||false,typeName:ge.ZodDate,...we(e)});var Qa=class extends Ae{_parse(t){if(this._getType(t)!==ce.symbol){let o=this._getOrReturnCtx(t);return se(o,{code:J.invalid_type,expected:ce.symbol,received:o.parsedType}),he}return Ar(t.data)}};Qa.create=e=>new Qa({typeName:ge.ZodSymbol,...we(e)});var Ls=class extends Ae{_parse(t){if(this._getType(t)!==ce.undefined){let o=this._getOrReturnCtx(t);return se(o,{code:J.invalid_type,expected:ce.undefined,received:o.parsedType}),he}return Ar(t.data)}};Ls.create=e=>new Ls({typeName:ge.ZodUndefined,...we(e)});var Us=class extends Ae{_parse(t){if(this._getType(t)!==ce.null){let o=this._getOrReturnCtx(t);return se(o,{code:J.invalid_type,expected:ce.null,received:o.parsedType}),he}return Ar(t.data)}};Us.create=e=>new Us({typeName:ge.ZodNull,...we(e)});var Bi=class extends Ae{constructor(){super(...arguments),this._any=true;}_parse(t){return Ar(t.data)}};Bi.create=e=>new Bi({typeName:ge.ZodAny,...we(e)});var Go=class extends Ae{constructor(){super(...arguments),this._unknown=true;}_parse(t){return Ar(t.data)}};Go.create=e=>new Go({typeName:ge.ZodUnknown,...we(e)});var Wn=class extends Ae{_parse(t){let r=this._getOrReturnCtx(t);return se(r,{code:J.invalid_type,expected:ce.never,received:r.parsedType}),he}};Wn.create=e=>new Wn({typeName:ge.ZodNever,...we(e)});var ec=class extends Ae{_parse(t){if(this._getType(t)!==ce.undefined){let o=this._getOrReturnCtx(t);return se(o,{code:J.invalid_type,expected:ce.void,received:o.parsedType}),he}return Ar(t.data)}};ec.create=e=>new ec({typeName:ge.ZodVoid,...we(e)});var qo=class e extends Ae{_parse(t){let{ctx:r,status:o}=this._processInputParams(t),n=this._def;if(r.parsedType!==ce.array)return se(r,{code:J.invalid_type,expected:ce.array,received:r.parsedType}),he;if(n.exactLength!==null){let s=r.data.length>n.exactLength.value,a=r.data.length<n.exactLength.value;(s||a)&&(se(r,{code:s?J.too_big:J.too_small,minimum:a?n.exactLength.value:void 0,maximum:s?n.exactLength.value:void 0,type:"array",inclusive:true,exact:true,message:n.exactLength.message}),o.dirty());}if(n.minLength!==null&&r.data.length<n.minLength.value&&(se(r,{code:J.too_small,minimum:n.minLength.value,type:"array",inclusive:true,exact:false,message:n.minLength.message}),o.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(se(r,{code:J.too_big,maximum:n.maxLength.value,type:"array",inclusive:true,exact:false,message:n.maxLength.message}),o.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>n.type._parseAsync(new In(r,s,r.path,a)))).then(s=>lr.mergeArray(o,s));let i=[...r.data].map((s,a)=>n.type._parseSync(new In(r,s,r.path,a)));return lr.mergeArray(o,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:le.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:le.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:le.toString(r)}})}nonempty(t){return this.min(1,t)}};qo.create=(e,t)=>new qo({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ge.ZodArray,...we(t)});function Xa(e){if(e instanceof Wr){let t={};for(let r in e.shape){let o=e.shape[r];t[r]=Sn.create(Xa(o));}return new Wr({...e._def,shape:()=>t})}else return e instanceof qo?new qo({...e._def,type:Xa(e.element)}):e instanceof Sn?Sn.create(Xa(e.unwrap())):e instanceof go?go.create(Xa(e.unwrap())):e instanceof ho?ho.create(e.items.map(t=>Xa(t))):e}var Wr=class e extends Ae{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend;}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=$e.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==ce.object){let u=this._getOrReturnCtx(t);return se(u,{code:J.invalid_type,expected:ce.object,received:u.parsedType}),he}let{status:o,ctx:n}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Wn&&this._def.unknownKeys==="strip"))for(let u in n.data)s.includes(u)||a.push(u);let c=[];for(let u of s){let l=i[u],d=n.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new In(n,d,n.path,u)),alwaysSet:u in n.data});}if(this._def.catchall instanceof Wn){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of a)c.push({key:{status:"valid",value:l},value:{status:"valid",value:n.data[l]}});else if(u==="strict")a.length>0&&(se(n,{code:J.unrecognized_keys,keys:a}),o.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else {let u=this._def.catchall;for(let l of a){let d=n.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new In(n,d,n.path,l)),alwaysSet:l in n.data});}}return n.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let d=await l.key,g=await l.value;u.push({key:d,value:g,alwaysSet:l.alwaysSet});}return u}).then(u=>lr.mergeObjectSync(o,u)):lr.mergeObjectSync(o,c)}get shape(){return this._def.shape()}strict(t){return le.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,o)=>{let n=this._def.errorMap?.(r,o).message??o.defaultError;return r.code==="unrecognized_keys"?{message:le.errToObj(t).message??n}:{message:n}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ge.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let o of $e.objectKeys(t))t[o]&&this.shape[o]&&(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let o of $e.objectKeys(this.shape))t[o]||(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}deepPartial(){return Xa(this)}partial(t){let r={};for(let o of $e.objectKeys(this.shape)){let n=this.shape[o];t&&!t[o]?r[o]=n:r[o]=n.optional();}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let o of $e.objectKeys(this.shape))if(t&&!t[o])r[o]=this.shape[o];else {let i=this.shape[o];for(;i instanceof Sn;)i=i._def.innerType;r[o]=i;}return new e({...this._def,shape:()=>r})}keyof(){return SE($e.objectKeys(this.shape))}};Wr.create=(e,t)=>new Wr({shape:()=>e,unknownKeys:"strip",catchall:Wn.create(),typeName:ge.ZodObject,...we(t)});Wr.strictCreate=(e,t)=>new Wr({shape:()=>e,unknownKeys:"strict",catchall:Wn.create(),typeName:ge.ZodObject,...we(t)});Wr.lazycreate=(e,t)=>new Wr({shape:e,unknownKeys:"strip",catchall:Wn.create(),typeName:ge.ZodObject,...we(t)});var Ms=class extends Ae{_parse(t){let{ctx:r}=this._processInputParams(t),o=this._def.options;function n(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(a=>new qr(a.ctx.common.issues));return se(r,{code:J.invalid_union,unionErrors:s}),he}if(r.common.async)return Promise.all(o.map(async i=>{let s={...r,common:{...r.common,issues:[]},parent:null};return {result:await i._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(n);{let i,s=[];for(let c of o){let u={...r,common:{...r.common,issues:[]},parent:null},l=c._parseSync({data:r.data,path:r.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!i&&(i={result:l,ctx:u}),u.common.issues.length&&s.push(u.common.issues);}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let a=s.map(c=>new qr(c));return se(r,{code:J.invalid_union,unionErrors:a}),he}}get options(){return this._def.options}};Ms.create=(e,t)=>new Ms({options:e,typeName:ge.ZodUnion,...we(t)});var Zo=e=>e instanceof js?Zo(e.schema):e instanceof An?Zo(e.innerType()):e instanceof Fs?[e.value]:e instanceof Hs?e.options:e instanceof Vs?$e.objectValues(e.enum):e instanceof Zs?Zo(e._def.innerType):e instanceof Ls?[void 0]:e instanceof Us?[null]:e instanceof Sn?[void 0,...Zo(e.unwrap())]:e instanceof go?[null,...Zo(e.unwrap())]:e instanceof vf||e instanceof qs?Zo(e.unwrap()):e instanceof Gs?Zo(e._def.innerType):[],wp=class e extends Ae{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ce.object)return se(r,{code:J.invalid_type,expected:ce.object,received:r.parsedType}),he;let o=this.discriminator,n=r.data[o],i=this.optionsMap.get(n);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(se(r,{code:J.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),he)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,o){let n=new Map;for(let i of r){let s=Zo(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of s){if(n.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);n.set(a,i);}}return new e({typeName:ge.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:n,...we(o)})}};function Yy(e,t){let r=mo(e),o=mo(t);if(e===t)return {valid:true,data:e};if(r===ce.object&&o===ce.object){let n=$e.objectKeys(t),i=$e.objectKeys(e).filter(a=>n.indexOf(a)!==-1),s={...e,...t};for(let a of i){let c=Yy(e[a],t[a]);if(!c.valid)return {valid:false};s[a]=c.data;}return {valid:true,data:s}}else if(r===ce.array&&o===ce.array){if(e.length!==t.length)return {valid:false};let n=[];for(let i=0;i<e.length;i++){let s=e[i],a=t[i],c=Yy(s,a);if(!c.valid)return {valid:false};n.push(c.data);}return {valid:true,data:n}}else return r===ce.date&&o===ce.date&&+e==+t?{valid:true,data:e}:{valid:false}}var Ds=class extends Ae{_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=(i,s)=>{if(vp(i)||vp(s))return he;let a=Yy(i.value,s.value);return a.valid?((_p(i)||_p(s))&&r.dirty(),{status:r.value,value:a.data}):(se(o,{code:J.invalid_intersection_types}),he)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([i,s])=>n(i,s)):n(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}};Ds.create=(e,t,r)=>new Ds({left:e,right:t,typeName:ge.ZodIntersection,...we(r)});var ho=class e extends Ae{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.array)return se(o,{code:J.invalid_type,expected:ce.array,received:o.parsedType}),he;if(o.data.length<this._def.items.length)return se(o,{code:J.too_small,minimum:this._def.items.length,inclusive:true,exact:false,type:"array"}),he;!this._def.rest&&o.data.length>this._def.items.length&&(se(o,{code:J.too_big,maximum:this._def.items.length,inclusive:true,exact:false,type:"array"}),r.dirty());let i=[...o.data].map((s,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new In(o,s,o.path,a)):null}).filter(s=>!!s);return o.common.async?Promise.all(i).then(s=>lr.mergeArray(r,s)):lr.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};ho.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ho({items:e,typeName:ge.ZodTuple,rest:null,...we(t)})};var Ep=class e extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.object)return se(o,{code:J.invalid_type,expected:ce.object,received:o.parsedType}),he;let n=[],i=this._def.keyType,s=this._def.valueType;for(let a in o.data)n.push({key:i._parse(new In(o,a,o.path,a)),value:s._parse(new In(o,o.data[a],o.path,a)),alwaysSet:a in o.data});return o.common.async?lr.mergeObjectAsync(r,n):lr.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(t,r,o){return r instanceof Ae?new e({keyType:t,valueType:r,typeName:ge.ZodRecord,...we(o)}):new e({keyType:Pi.create(),valueType:t,typeName:ge.ZodRecord,...we(r)})}},tc=class extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.map)return se(o,{code:J.invalid_type,expected:ce.map,received:o.parsedType}),he;let n=this._def.keyType,i=this._def.valueType,s=[...o.data.entries()].map(([a,c],u)=>({key:n._parse(new In(o,a,o.path,[u,"key"])),value:i._parse(new In(o,c,o.path,[u,"value"]))}));if(o.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of s){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return he;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value);}return {status:r.value,value:a}})}else {let a=new Map;for(let c of s){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return he;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),a.set(u.value,l.value);}return {status:r.value,value:a}}}};tc.create=(e,t,r)=>new tc({valueType:t,keyType:e,typeName:ge.ZodMap,...we(r)});var rc=class e extends Ae{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.set)return se(o,{code:J.invalid_type,expected:ce.set,received:o.parsedType}),he;let n=this._def;n.minSize!==null&&o.data.size<n.minSize.value&&(se(o,{code:J.too_small,minimum:n.minSize.value,type:"set",inclusive:true,exact:false,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&o.data.size>n.maxSize.value&&(se(o,{code:J.too_big,maximum:n.maxSize.value,type:"set",inclusive:true,exact:false,message:n.maxSize.message}),r.dirty());let i=this._def.valueType;function s(c){let u=new Set;for(let l of c){if(l.status==="aborted")return he;l.status==="dirty"&&r.dirty(),u.add(l.value);}return {status:r.value,value:u}}let a=[...o.data.values()].map((c,u)=>i._parse(new In(o,c,o.path,u)));return o.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:le.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:le.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};rc.create=(e,t)=>new rc({valueType:e,minSize:null,maxSize:null,typeName:ge.ZodSet,...we(t)});var Sp=class e extends Ae{constructor(){super(...arguments),this.validate=this.implement;}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ce.function)return se(r,{code:J.invalid_type,expected:ce.function,received:r.parsedType}),he;function o(a,c){return xf({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ja(),Vo].filter(u=>!!u),issueData:{code:J.invalid_arguments,argumentsError:c}})}function n(a,c){return xf({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ja(),Vo].filter(u=>!!u),issueData:{code:J.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof Ci){let a=this;return Ar(async function(...c){let u=new qr([]),l=await a._def.args.parseAsync(c,i).catch(h=>{throw u.addIssue(o(c,h)),u}),d=await Reflect.apply(s,this,l);return await a._def.returns._def.type.parseAsync(d,i).catch(h=>{throw u.addIssue(n(d,h)),u})})}else {let a=this;return Ar(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new qr([o(c,u.error)]);let l=Reflect.apply(s,this,u.data),d=a._def.returns.safeParse(l,i);if(!d.success)throw new qr([n(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:ho.create(t).rest(Go.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,o){return new e({args:t||ho.create([]).rest(Go.create()),returns:r||Go.create(),typeName:ge.ZodFunction,...we(o)})}},js=class extends Ae{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};js.create=(e,t)=>new js({getter:e,typeName:ge.ZodLazy,...we(t)});var Fs=class extends Ae{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return se(r,{received:r.data,code:J.invalid_literal,expected:this._def.value}),he}return {status:"valid",value:t.data}}get value(){return this._def.value}};Fs.create=(e,t)=>new Fs({value:e,typeName:ge.ZodLiteral,...we(t)});function SE(e,t){return new Hs({values:e,typeName:ge.ZodEnum,...we(t)})}var Hs=class e extends Ae{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),o=this._def.values;return se(r,{expected:$e.joinValues(o),received:r.parsedType,code:J.invalid_type}),he}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),o=this._def.values;return se(r,{received:r.data,code:J.invalid_enum_value,options:o}),he}return Ar(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(o=>!t.includes(o)),{...this._def,...r})}};Hs.create=SE;var Vs=class extends Ae{_parse(t){let r=$e.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==ce.string&&o.parsedType!==ce.number){let n=$e.objectValues(r);return se(o,{expected:$e.joinValues(n),received:o.parsedType,code:J.invalid_type}),he}if(this._cache||(this._cache=new Set($e.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let n=$e.objectValues(r);return se(o,{received:o.data,code:J.invalid_enum_value,options:n}),he}return Ar(t.data)}get enum(){return this._def.values}};Vs.create=(e,t)=>new Vs({values:e,typeName:ge.ZodNativeEnum,...we(t)});var Ci=class extends Ae{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ce.promise&&r.common.async===false)return se(r,{code:J.invalid_type,expected:ce.promise,received:r.parsedType}),he;let o=r.parsedType===ce.promise?r.data:Promise.resolve(r.data);return Ar(o.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Ci.create=(e,t)=>new Ci({type:e,typeName:ge.ZodPromise,...we(t)});var An=class extends Ae{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ge.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=this._def.effect||null,i={addIssue:s=>{se(o,s),s.fatal?r.abort():r.dirty();},get path(){return o.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){let s=n.transform(o.data,i);if(o.common.async)return Promise.resolve(s).then(async a=>{if(r.value==="aborted")return he;let c=await this._def.schema._parseAsync({data:a,path:o.path,parent:o});return c.status==="aborted"?he:c.status==="dirty"?Ns(c.value):r.value==="dirty"?Ns(c.value):c});{if(r.value==="aborted")return he;let a=this._def.schema._parseSync({data:s,path:o.path,parent:o});return a.status==="aborted"?he:a.status==="dirty"?Ns(a.value):r.value==="dirty"?Ns(a.value):a}}if(n.type==="refinement"){let s=a=>{let c=n.refinement(a,i);if(o.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(o.common.async===false){let a=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return a.status==="aborted"?he:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(a=>a.status==="aborted"?he:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(n.type==="transform")if(o.common.async===false){let s=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!Ni(s))return he;let a=n.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return {status:r.value,value:a}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=>Ni(s)?Promise.resolve(n.transform(s.value,i)).then(a=>({status:r.value,value:a})):he);$e.assertNever(n);}};An.create=(e,t,r)=>new An({schema:e,typeName:ge.ZodEffects,effect:t,...we(r)});An.createWithPreprocess=(e,t,r)=>new An({schema:t,effect:{type:"preprocess",transform:e},typeName:ge.ZodEffects,...we(r)});var Sn=class extends Ae{_parse(t){return this._getType(t)===ce.undefined?Ar(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Sn.create=(e,t)=>new Sn({innerType:e,typeName:ge.ZodOptional,...we(t)});var go=class extends Ae{_parse(t){return this._getType(t)===ce.null?Ar(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};go.create=(e,t)=>new go({innerType:e,typeName:ge.ZodNullable,...we(t)});var Zs=class extends Ae{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return r.parsedType===ce.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Zs.create=(e,t)=>new Zs({innerType:e,typeName:ge.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...we(t)});var Gs=class extends Ae{_parse(t){let{ctx:r}=this._processInputParams(t),o={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return Ya(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new qr(o.common.issues)},input:o.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new qr(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}};Gs.create=(e,t)=>new Gs({innerType:e,typeName:ge.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...we(t)});var nc=class extends Ae{_parse(t){if(this._getType(t)!==ce.nan){let o=this._getOrReturnCtx(t);return se(o,{code:J.invalid_type,expected:ce.nan,received:o.parsedType}),he}return {status:"valid",value:t.data}}};nc.create=e=>new nc({typeName:ge.ZodNaN,...we(e)});var GO=Symbol("zod_brand"),vf=class extends Ae{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return this._def.type._parse({data:o,path:r.path,parent:r})}unwrap(){return this._def.type}},_f=class e extends Ae{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.common.async)return (async()=>{let i=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?he:i.status==="dirty"?(r.dirty(),Ns(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{let n=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return n.status==="aborted"?he:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:o.path,parent:o})}}static create(t,r){return new e({in:t,out:r,typeName:ge.ZodPipeline})}},qs=class extends Ae{_parse(t){let r=this._def.innerType._parse(t),o=n=>(Ni(n)&&(n.value=Object.freeze(n.value)),n);return Ya(r)?r.then(n=>o(n)):o(r)}unwrap(){return this._def.innerType}};qs.create=(e,t)=>new qs({innerType:e,typeName:ge.ZodReadonly,...we(t)});function vE(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function IE(e,t={},r){return e?Bi.create().superRefine((o,n)=>{let i=e(o);if(i instanceof Promise)return i.then(s=>{if(!s){let a=vE(t,o),c=a.fatal??r??true;n.addIssue({code:"custom",...a,fatal:c});}});if(!i){let s=vE(t,o),a=s.fatal??r??true;n.addIssue({code:"custom",...s,fatal:a});}}):Bi.create()}var qO={object:Wr.lazycreate},ge;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly";})(ge||(ge={}));var WO=(e,t={message:`Input not instance of ${e.name}`})=>IE(r=>r instanceof e,t),AE=Pi.create,kE=Ps.create,KO=nc.create,JO=Bs.create,RE=Cs.create,YO=zs.create,XO=Qa.create,QO=Ls.create,eN=Us.create,tN=Bi.create,rN=Go.create,nN=Wn.create,oN=ec.create,iN=qo.create,sN=Wr.create,aN=Wr.strictCreate,cN=Ms.create,uN=wp.create,fN=Ds.create,lN=ho.create,dN=Ep.create,pN=tc.create,mN=rc.create,hN=Sp.create,gN=js.create,yN=Fs.create,bN=Hs.create,xN=Vs.create,vN=Ci.create,_N=An.create,wN=Sn.create,EN=go.create,SN=An.createWithPreprocess,IN=_f.create,AN=()=>AE().optional(),kN=()=>kE().optional(),RN=()=>RE().optional(),TN={string:(e=>Pi.create({...e,coerce:true})),number:(e=>Ps.create({...e,coerce:true})),boolean:(e=>Cs.create({...e,coerce:true})),bigint:(e=>Bs.create({...e,coerce:true})),date:(e=>zs.create({...e,coerce:true}))};var $N=he;var ON=/[@#$%^&*+=/\\|~«»]/,NN=/(!{2,}|\?{2,}|-{2,})/,PN=/[\u{1F300}-\u{1F9FF}]|[\u{2702}-\u{27B0}]|[\u{2600}-\u{26FF}]|[\u{2B00}-\u{2BFF}]/u,Ws=({max:e,noSpaces:t}={})=>(t?oe.string().max(e??Number.POSITIVE_INFINITY).regex(/^\S*$/,"Spaces are not allowed"):oe.string().max(e??Number.POSITIVE_INFINITY)).refine(o=>!PN.test(o),{message:"Emojis and symbols are not allowed"}).refine(o=>!ON.test(o),{message:"Special characters (@, #, $, %, ^, &, *, +, =, /, \\, |, ~, \xAB, \xBB) are not allowed"}).refine(o=>!NN.test(o),{message:"Repeated punctuations (!!, ??, --) are not allowed"}),nr=oe.string().url().startsWith("https://",{message:"Must be an https url"}).max(1024).refine(e=>!e.includes(" "),{message:"URL must not contain spaces"}).refine(e=>{try{let t=new URL(e).hostname;return !(t==="localhost"||t.endsWith(".localhost")||/^(\d{1,3}\.){3}\d{1,3}$/.test(t)||t.startsWith("[")&&t.endsWith("]"))}catch{return false}},{message:"URL must not use IP addresses or localhost"}),wf=oe.string().max(32),Ip=oe.string().max(32),BN=/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/(?:[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}(?:\/[-.%a-zA-Z0-9]{1,78})?|native)$/,TE=oe.string().regex(BN,{message:"Invalid CAIP-19 asset ID"}),Ef=oe.string().regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i,{message:"Invalid hex color code. It should be in the format #RRGGBB or #RGB."}),CN=/^(?!.*\.\.)([a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,$E=oe.string().max(1024).regex(CN,{message:"Must be a valid domain name (e.g., example.com, sub.example.com)"}).refine(e=>!e.includes("://"),{message:"Domain must not include protocol (http://, https://, etc.)"}).refine(e=>!e.includes("/"),{message:"Domain must not include path separators"}).refine(e=>!e.includes("@"),{message:"Domain must not include @ symbol"}).refine(e=>!e.includes(":"),{message:"Domain must not include port numbers"}),OE=oe.union([oe.literal("1:1"),oe.literal("3:2")]),NE=oe.object({header:oe.string(),payload:oe.string(),signature:oe.string()});oe.object({fid:oe.number(),type:oe.literal("app_key"),key:oe.string().startsWith("0x")});var zN=oe.object({type:oe.literal("launch_frame"),name:wf,url:nr.optional(),splashImageUrl:nr.optional(),splashBackgroundColor:Ef.optional()}),LN=oe.object({type:oe.literal("launch_miniapp"),name:wf,url:nr.optional(),splashImageUrl:nr.optional(),splashBackgroundColor:Ef.optional()}),UN=oe.object({type:oe.literal("view_token"),token:TE}),MN=oe.discriminatedUnion("type",[LN,UN,zN]),DN=oe.object({title:Ip,action:MN});oe.object({version:oe.union([oe.string(),oe.number()]).transform(e=>String(e)).pipe(oe.union([oe.literal("next"),oe.literal("1")])),imageUrl:nr,aspectRatio:OE.optional(),button:DN});var Xy=oe.object({url:oe.string(),token:oe.string()});oe.object({notificationId:oe.string().max(128),title:oe.string().max(32),body:oe.string().max(128),targetUrl:nr,tokens:oe.string().array().max(100)});oe.object({result:oe.object({successfulTokens:oe.array(oe.string()),invalidTokens:oe.array(oe.string()),rateLimitedTokens:oe.array(oe.string())})});var jN=oe.object({event:oe.literal("miniapp_added"),notificationDetails:Xy.optional()}),FN=oe.object({event:oe.literal("miniapp_removed")}),HN=oe.object({event:oe.literal("notifications_enabled"),notificationDetails:Xy.required()}),VN=oe.object({event:oe.literal("notifications_disabled")});oe.discriminatedUnion("event",[jN,FN,HN,VN]);var PE=["wallet.getEthereumProvider","wallet.getSolanaProvider","actions.ready","actions.openUrl","actions.close","actions.setPrimaryButton","actions.addMiniApp","actions.signIn","actions.viewCast","actions.viewProfile","actions.composeCast","actions.viewToken","actions.sendToken","actions.swapToken","actions.openMiniApp","actions.requestCameraAndMicrophoneAccess","experimental.signManifest","haptics.impactOccurred","haptics.notificationOccurred","haptics.selectionChanged","back"];var ZN=["games","social","finance","utility","productivity","health-fitness","news-media","music","shopping","education","developer-tools","entertainment","art-creativity"],GN=oe.enum(ZN),qN=oe.union([oe.literal("0.0.0"),oe.literal("0.0.1"),oe.literal("1"),oe.literal("next")]),WN=Ws({max:30}),KN=Ws({max:170}),JN=oe.array(nr).max(3),YN=oe.array(Ws({max:20,noSpaces:true})).max(5),XN=Ws({max:30}),QN=Ws({max:30}),eP=Ws({max:100}),tP=oe.boolean(),rP=["eip155:1","eip155:8453","eip155:42161","eip155:421614","eip155:84532","eip155:666666666","eip155:100","eip155:10","eip155:11155420","eip155:137","eip155:11155111","eip155:7777777","eip155:130","eip155:10143","eip155:42220","eip155:999","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"];function CE(e){let t=new Set(e);return Array.from(t)}var nP=oe.array(oe.enum(rP)).transform(CE),oP=oe.array(oe.enum(PE)).transform(CE),BE=oe.object({version:qN,name:wf,iconUrl:nr,homeUrl:nr,imageUrl:nr.optional(),buttonTitle:Ip.optional(),splashImageUrl:nr.optional(),splashBackgroundColor:Ef.optional(),webhookUrl:nr.optional(),subtitle:WN.optional(),description:KN.optional(),screenshotUrls:JN.optional(),primaryCategory:GN.optional(),tags:YN.optional(),heroImageUrl:nr.optional(),tagline:XN.optional(),ogTitle:QN.optional(),ogDescription:eP.optional(),ogImageUrl:nr.optional(),noindex:tP.optional(),requiredChains:nP.optional(),requiredCapabilities:oP.optional(),castShareUrl:nr.optional(),canonicalDomain:$E.optional()}).refine(e=>{if(e.castShareUrl===void 0)return true;try{let t=new URL(e.homeUrl).hostname,r=new URL(e.castShareUrl).hostname;return t===r}catch{return false}},{message:"castShareUrl must have the same domain as homeUrl",path:["castShareUrl"]});oe.object({accountAssociation:NE,miniapp:BE.optional(),frame:BE.optional()}).refine(e=>e.frame&&e.miniapp?JSON.stringify(e.frame)===JSON.stringify(e.miniapp):true,{message:'If both "frame" and "miniapp" are provided, they must be identical',path:["frame","miniapp"]}).transform(e=>({...e,frame:e.frame??e.miniapp}));var be=Ho(If());Bp();Jo();Ab();ca();sa();var Eo=BigInt(0),Dr=BigInt(1),DS=BigInt(2),n3=BigInt(8),o3={zip215:true};function i3(e){let t=Nf(e);return Jn(e,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...t})}function jS(e){let t=i3(e),{Fp:r,n:o,prehash:n,hash:i,randomBytes:s,nByteLength:a,h:c}=t,u=DS<<BigInt(a*8)-Dr,l=r.create,d=ti(t.n,t.nBitLength);function g(b,w){let k=r.sqr(b),_=r.sqr(w),p=r.add(r.mul(t.a,k),_),A=r.add(r.ONE,r.mul(t.d,r.mul(k,_)));return r.eql(p,A)}if(!g(t.Gx,t.Gy))throw new Error("bad curve params: generator point");let h=t.uvRatio||((b,w)=>{try{return {isValid:!0,value:r.sqrt(b*r.inv(w))}}catch{return {isValid:false,value:Eo}}}),v=t.adjustScalarBytes||(b=>b),E=t.domain||((b,w,k)=>{if(_o("phflag",k),w.length||k)throw new Error("Contexts/pre-hash are not supported");return b});function R(b,w,k=false){let _=k?Dr:Eo;Ur("coordinate "+b,w,_,u);}function $(b){if(!(b instanceof I))throw new Error("ExtendedPoint expected")}let P=lc((b,w)=>{let{ex:k,ey:_,ez:p}=b,A=b.is0();w==null&&(w=A?n3:r.inv(p));let Z=l(k*w),K=l(_*w),te=l(p*w);if(A)return {x:Eo,y:Dr};if(te!==Dr)throw new Error("invZ was invalid");return {x:Z,y:K}}),O=lc(b=>{let{a:w,d:k}=t;if(b.is0())throw new Error("bad point: ZERO");let{ex:_,ey:p,ez:A,et:Z}=b,K=l(_*_),te=l(p*p),ae=l(A*A),me=l(ae*ae),ye=l(K*w),Ye=l(ae*l(ye+te)),Se=l(me+l(k*l(K*te)));if(Ye!==Se)throw new Error("bad point: equation left != right (1)");let _e=l(_*p),Qt=l(A*Z);if(_e!==Qt)throw new Error("bad point: equation left != right (2)");return true});class I{constructor(w,k,_,p){R("x",w),R("y",k),R("z",_,true),R("t",p),this.ex=w,this.ey=k,this.ez=_,this.et=p,Object.freeze(this);}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(w){if(w instanceof I)throw new Error("extended point not allowed");let{x:k,y:_}=w||{};return R("x",k),R("y",_),new I(k,_,Dr,l(k*_))}static normalizeZ(w){let k=ei(r,w.map(_=>_.ez));return w.map((_,p)=>_.toAffine(k[p])).map(I.fromAffine)}static msm(w,k){return Mp(I,d,w,k)}_setWindowSize(w){z.setWindowSize(this,w);}assertValidity(){O(this);}equals(w){$(w);let{ex:k,ey:_,ez:p}=this,{ex:A,ey:Z,ez:K}=w,te=l(k*K),ae=l(A*p),me=l(_*K),ye=l(Z*p);return te===ae&&me===ye}is0(){return this.equals(I.ZERO)}negate(){return new I(l(-this.ex),this.ey,this.ez,l(-this.et))}double(){let{a:w}=t,{ex:k,ey:_,ez:p}=this,A=l(k*k),Z=l(_*_),K=l(DS*l(p*p)),te=l(w*A),ae=k+_,me=l(l(ae*ae)-A-Z),ye=te+Z,Ye=ye-K,Se=te-Z,_e=l(me*Ye),Qt=l(ye*Se),Be=l(me*Se),Ue=l(Ye*ye);return new I(_e,Qt,Ue,Be)}add(w){$(w);let{a:k,d:_}=t,{ex:p,ey:A,ez:Z,et:K}=this,{ex:te,ey:ae,ez:me,et:ye}=w,Ye=l(p*te),Se=l(A*ae),_e=l(K*_*ye),Qt=l(Z*me),Be=l((p+A)*(te+ae)-Ye-Se),Ue=Qt-_e,Oi=Qt+_e,ut=l(Se-k*Ye),mt=l(Be*Ue),yp=l(Oi*ut),ht=l(Be*ut),gt=l(Ue*Oi);return new I(mt,yp,gt,ht)}subtract(w){return this.add(w.negate())}wNAF(w){return z.wNAFCached(this,w,I.normalizeZ)}multiply(w){let k=w;Ur("scalar",k,Dr,o);let{p:_,f:p}=this.wNAF(k);return I.normalizeZ([_,p])[0]}multiplyUnsafe(w,k=I.ZERO){let _=w;return Ur("scalar",_,Eo,o),_===Eo?C:this.is0()||_===Dr?this:z.wNAFCachedUnsafe(this,_,I.normalizeZ,k)}isSmallOrder(){return this.multiplyUnsafe(c).is0()}isTorsionFree(){return z.unsafeLadder(this,o).is0()}toAffine(w){return P(this,w)}clearCofactor(){let{h:w}=t;return w===Dr?this:this.multiplyUnsafe(w)}static fromHex(w,k=false){let{d:_,a:p}=t,A=r.BYTES;w=Ve("pointHex",w,A),_o("zip215",k);let Z=w.slice(),K=w[A-1];Z[A-1]=K&-129;let te=na(Z),ae=k?u:r.ORDER;Ur("pointHex.y",te,Eo,ae);let me=l(te*te),ye=l(me-Dr),Ye=l(_*me-p),{isValid:Se,value:_e}=h(ye,Ye);if(!Se)throw new Error("Point.fromHex: invalid y coordinate");let Qt=(_e&Dr)===Dr,Be=(K&128)!==0;if(!k&&_e===Eo&&Be)throw new Error("Point.fromHex: x=0 and x_0=1");return Be!==Qt&&(_e=l(-_e)),I.fromAffine({x:_e,y:te})}static fromPrivateKey(w){let{scalar:k}=V(w);return N.multiply(k)}toRawBytes(){let{x:w,y:k}=this.toAffine(),_=fc(k,r.BYTES);return _[_.length-1]|=w&Dr?128:0,_}toHex(){return ji(this.toRawBytes())}}I.BASE=new I(t.Gx,t.Gy,Dr,l(t.Gx*t.Gy)),I.ZERO=new I(Eo,Dr,Dr,Eo);let{BASE:N,ZERO:C}=I,z=Up(I,a*8);function F(b){return ze(b,o)}function W(b){return F(na(b))}function V(b){let w=r.BYTES;b=Ve("private key",b,w);let k=Ve("hashed private key",i(b),2*w),_=v(k.slice(0,w)),p=k.slice(w,2*w),A=W(_);return {head:_,prefix:p,scalar:A}}function G(b){let{head:w,prefix:k,scalar:_}=V(b),p=N.multiply(_),A=p.toRawBytes();return {head:w,prefix:k,scalar:_,point:p,pointBytes:A}}function ne(b){return G(b).pointBytes}function S(b=Uint8Array.of(),...w){let k=ir(...w);return W(i(E(k,Ve("context",b),!!n)))}function f(b,w,k={}){b=Ve("message",b),n&&(b=n(b));let{prefix:_,scalar:p,pointBytes:A}=G(w),Z=S(k.context,_,b),K=N.multiply(Z).toRawBytes(),te=S(k.context,K,A,b),ae=F(Z+te*p);Ur("signature.s",ae,Eo,o);let me=ir(K,fc(ae,r.BYTES));return Ve("result",me,r.BYTES*2)}let m=o3;function y(b,w,k,_=m){let{context:p,zip215:A}=_,Z=r.BYTES;b=Ve("signature",b,2*Z),w=Ve("message",w),k=Ve("publicKey",k,Z),A!==void 0&&_o("zip215",A),n&&(w=n(w));let K=na(b.slice(Z,2*Z)),te,ae,me;try{te=I.fromHex(k,A),ae=I.fromHex(b.slice(0,Z),A),me=N.multiplyUnsafe(K);}catch{return false}if(!A&&te.isSmallOrder())return false;let ye=S(p,ae.toRawBytes(),te.toRawBytes(),w);return ae.add(te.multiplyUnsafe(ye)).subtract(me).clearCofactor().equals(I.ZERO)}return N._setWindowSize(8),{CURVE:t,getPublicKey:ne,sign:f,verify:y,ExtendedPoint:I,utils:{getExtendedPublicKey:G,randomPrivateKey:()=>s(r.BYTES),precompute(b=8,w=I.BASE){return w._setWindowSize(b),w.multiply(BigInt(3)),w}}}}ca();var kb=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),GS=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");BigInt(0);var f3=BigInt(1),qS=BigInt(2);BigInt(3);var l3=BigInt(5),d3=BigInt(8);function p3(e){let t=BigInt(10),r=BigInt(20),o=BigInt(40),n=BigInt(80),i=kb,a=e*e%i*e%i,c=it(a,qS,i)*a%i,u=it(c,f3,i)*e%i,l=it(u,l3,i)*u%i,d=it(l,t,i)*l%i,g=it(d,r,i)*d%i,h=it(g,o,i)*g%i,v=it(h,n,i)*h%i,E=it(v,n,i)*h%i,R=it(E,t,i)*l%i;return {pow_p_5_8:it(R,qS,i)*e%i,b2:a}}function m3(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}function h3(e,t){let r=kb,o=ze(t*t*t,r),n=ze(o*o*t,r),i=p3(e*n).pow_p_5_8,s=ze(e*o*i,r),a=ze(t*s*s,r),c=s,u=ze(s*GS,r),l=a===e,d=a===ze(-e,r),g=a===ze(-e*GS,r);return l&&(s=c),(d||g)&&(s=u),PS(s,r)&&(s=ze(-s,r)),{isValid:l||d,value:s}}var WS=ti(kb,void 0,true),g3={a:WS.create(BigInt(-1)),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:WS,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:d3,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:_S,randomBytes:cc,adjustScalarBytes:m3,uvRatio:h3},ua=jS(g3);var Sx=Ho(Tb()),Br=Ho(Ob());Bp();var Bf=ra;var Ec=Ho(cI()),T=Ho(Db()),O5=Ho(Db());var jb=8078e3,Fb=8078001,Hb=8078004,Vb=8078005,Zb=8078006,Gb=8078011;function hI(e){return Array.isArray(e)?"%5B"+e.map(hI).join("%2C%20")+"%5D":typeof e=="bigint"?`${e}n`:encodeURIComponent(String(e!=null&&Object.getPrototypeOf(e)===null?{...e}:e))}function CL([e,t]){return `${e}=${hI(t)}`}function zL(e){let t=Object.entries(e).map(CL).join("&");return btoa(t)}function LL(e,t={}){{let r=`Solana error #${e}; Decode this error by running \`npx @solana/errors decode -- ${e}`;return Object.keys(t).length&&(r+=` '${zL(t)}'`),`${r}\``}}var Zi=class extends Error{cause=this.cause;context;constructor(...[e,t]){let r,o;if(t){let{cause:i,...s}=t;i&&(o={cause:i}),Object.keys(s).length>0&&(r=s);}let n=LL(e,r);super(n,o),this.context={__code:e,...r},this.name="SolanaError";}};function UL(e,t){return "fixedSize"in t?t.fixedSize:t.getSizeFromValue(e)}function gI(e){return Object.freeze({...e,encode:t=>{let r=new Uint8Array(UL(t,e));return e.write(t,r,0),r}})}function yI(e){return Object.freeze({...e,decode:(t,r=0)=>e.read(t,r)[0]})}function gc(e){return "fixedSize"in e&&typeof e.fixedSize=="number"}function bI(e,t){if(gc(e)!==gc(t))throw new Zi(Hb);if(gc(e)&&gc(t)&&e.fixedSize!==t.fixedSize)throw new Zi(Vb,{decoderFixedSize:t.fixedSize,encoderFixedSize:e.fixedSize});if(!gc(e)&&!gc(t)&&e.maxSize!==t.maxSize)throw new Zi(Zb,{decoderMaxSize:t.maxSize,encoderMaxSize:e.maxSize});return {...t,...e,decode:t.decode,encode:e.encode,read:t.read,write:e.write}}function xI(e,t,r=0){if(t.length-r<=0)throw new Zi(jb,{codecDescription:e})}function vI(e,t,r,o=0){let n=r.length-o;if(n<t)throw new Zi(Fb,{bytesLength:n,codecDescription:e,expected:t})}function ML(e,t,r,o){if(o<t||o>r)throw new Zi(Gb,{codecDescription:e,max:r,min:t,value:o})}function _I(e){return e?.endian!==1}function DL(e){return gI({fixedSize:e.size,write(t,r,o){e.range&&ML(e.name,e.range[0],e.range[1],t);let n=new ArrayBuffer(e.size);return e.set(new DataView(n),t,_I(e.config)),r.set(new Uint8Array(n),o),o+e.size}})}function jL(e){return yI({fixedSize:e.size,read(t,r=0){xI(e.name,t,r),vI(e.name,e.size,t,r);let o=new DataView(FL(t,r,e.size));return [e.get(o,_I(e.config)),r+e.size]}})}function FL(e,t,r){let o=e.byteOffset+(t??0),n=r??e.byteLength;return e.buffer.slice(o,o+n)}var qb=(e={})=>DL({config:e,name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(t,r,o)=>t.setBigUint64(0,BigInt(r),o),size:8}),HL=(e={})=>jL({config:e,get:(t,r)=>t.getBigUint64(0,r),name:"u64",size:8}),wI=(e={})=>bI(qb(e),HL(e));var Wb=class extends TypeError{constructor(t,r){let o,{message:n,explanation:i,...s}=t,{path:a}=t,c=a.length===0?n:`At path: ${a.join(".")} -- ${n}`;super(i??c),i!=null&&(this.cause=c),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>o??(o=[t,...r()]);}};function VL(e){return Df(e)&&typeof e[Symbol.iterator]=="function"}function Df(e){return typeof e=="object"&&e!=null}function pm(e){return Df(e)&&!Array.isArray(e)}function Yn(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function ZL(e){let{done:t,value:r}=e.next();return t?void 0:r}function GL(e,t,r,o){if(e===true)return;e===false?e={}:typeof e=="string"&&(e={message:e});let{path:n,branch:i}=t,{type:s}=r,{refinement:a,message:c=`Expected a value of type \`${s}\`${a?` with refinement \`${a}\``:""}, but received: \`${Yn(o)}\``}=e;return {value:o,type:s,refinement:a,key:n[n.length-1],path:n,branch:i,...e,message:c}}function*EI(e,t,r,o){VL(e)||(e=[e]);for(let n of e){let i=GL(n,t,r,o);i&&(yield i);}}function*Kb(e,t,r={}){let{path:o=[],branch:n=[e],coerce:i=false,mask:s=false}=r,a={path:o,branch:n,mask:s};i&&(e=t.coercer(e,a));let c="valid";for(let u of t.validator(e,a))u.explanation=r.message,c="not_valid",yield [u,void 0];for(let[u,l,d]of t.entries(e,a)){let g=Kb(l,d,{path:u===void 0?o:[...o,u],branch:u===void 0?n:[...n,l],coerce:i,mask:s,message:r.message});for(let h of g)h[0]?(c=h[0].refinement!=null?"not_refined":"not_valid",yield [h[0],void 0]):i&&(l=h[1],u===void 0?e=l:e instanceof Map?e.set(u,l):e instanceof Set?e.add(l):Df(e)&&(l!==void 0||u in e)&&(e[u]=l));}if(c!=="not_valid")for(let u of t.refiner(e,a))u.explanation=r.message,c="not_refined",yield [u,void 0];c==="valid"&&(yield [void 0,e]);}var Tn=class{constructor(t){let{type:r,schema:o,validator:n,refiner:i,coercer:s=c=>c,entries:a=function*(){}}=t;this.type=r,this.schema=o,this.entries=a,this.coercer=s,n?this.validator=(c,u)=>{let l=n(c,u);return EI(l,u,this,c)}:this.validator=()=>[],i?this.refiner=(c,u)=>{let l=i(c,u);return EI(l,u,this,c)}:this.refiner=()=>[];}assert(t,r){return SI(t,this,r)}create(t,r){return yc(t,this,r)}is(t){return II(t,this)}mask(t,r){return qL(t,this,r)}validate(t,r={}){return jf(t,this,r)}};function SI(e,t,r){let o=jf(e,t,{message:r});if(o[0])throw o[0]}function yc(e,t,r){let o=jf(e,t,{coerce:true,message:r});if(o[0])throw o[0];return o[1]}function qL(e,t,r){let o=jf(e,t,{coerce:true,mask:true,message:r});if(o[0])throw o[0];return o[1]}function II(e,t){return !jf(e,t)[0]}function jf(e,t,r={}){let o=Kb(e,t,r),n=ZL(o);return n[0]?[new Wb(n[0],function*(){for(let s of o)s[0]&&(yield s[0]);}),void 0]:[void 0,n[1]]}function pa(e,t){return new Tn({type:e,schema:null,validator:t})}function AI(){return pa("any",()=>true)}function ue(e){return new Tn({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(let[r,o]of t.entries())yield [r,o,e];},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${Yn(t)}`}})}function Xn(){return pa("boolean",e=>typeof e=="boolean")}function mm(e){return pa("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${Yn(t)}`)}function st(e){let t=Yn(e),r=typeof e;return new Tn({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(o){return o===e||`Expected the literal \`${t}\`, but received: ${Yn(o)}`}})}function WL(){return pa("never",()=>false)}function fe(e){return new Tn({...e,validator:(t,r)=>t===null||e.validator(t,r),refiner:(t,r)=>t===null||e.refiner(t,r)})}function L(){return pa("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${Yn(e)}`)}function pe(e){return new Tn({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function Jb(e,t){return new Tn({type:"record",schema:null,*entries(r){if(Df(r))for(let o in r){let n=r[o];yield [o,o,e],yield [o,n,t];}},validator(r){return pm(r)||`Expected an object, but received: ${Yn(r)}`},coercer(r){return pm(r)?{...r}:r}})}function re(){return pa("string",e=>typeof e=="string"||`Expected a string, but received: ${Yn(e)}`)}function hm(e){let t=WL();return new Tn({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){let o=Math.max(e.length,r.length);for(let n=0;n<o;n++)yield [n,r[n],e[n]||t];}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${Yn(r)}`},coercer(r){return Array.isArray(r)?r.slice():r}})}function q(e){let t=Object.keys(e);return new Tn({type:"type",schema:e,*entries(r){if(Df(r))for(let o of t)yield [o,r[o],e[o]];},validator(r){return pm(r)||`Expected an object, but received: ${Yn(r)}`},coercer(r){return pm(r)?{...r}:r}})}function Rr(e){let t=e.map(r=>r.type).join(" | ");return new Tn({type:"union",schema:null,coercer(r,o){for(let n of e){let[i,s]=n.validate(r,{coerce:true,mask:o.mask});if(!i)return s}return r},validator(r,o){let n=[];for(let i of e){let[...s]=Kb(r,i,o),[a]=s;if(a[0])for(let[c]of s)c&&n.push(c);else return []}return [`Expected the value to satisfy a union of \`${t}\`, but received: ${Yn(r)}`,...n]}})}function ma(){return pa("unknown",()=>true)}function bc(e,t,r){return new Tn({...e,coercer:(o,n)=>II(o,t)?e.coercer(r(o,n),n):e.coercer(o,n)})}Ho(JI());Ho(If(),1);var qf=Ho(XI(),1);var QI=qf.default;wm();Qf();function v5(e){try{return ua.ExtendedPoint.fromHex(e),!0}catch{return false}}var Mx=(e,t)=>ua.sign(e,t.slice(0,32)),VU=ua.verify,De=e=>be.Buffer.isBuffer(e)?e:e instanceof Uint8Array?be.Buffer.from(e.buffer,e.byteOffset,e.byteLength):be.Buffer.from(e),Ax=class{constructor(t){Object.assign(this,t);}encode(){return be.Buffer.from((0, Ec.serialize)(Rm,this))}static decode(t){return (0, Ec.deserialize)(Rm,this,t)}static decodeUnchecked(t){return (0, Ec.deserializeUnchecked)(Rm,this,t)}};var Rm=new Map,N5,ZU=32,Xi=32;function GU(e){return e._bn!==void 0}var _5=1,Ie=class e extends Ax{constructor(t){if(super({}),this._bn=void 0,GU(t))this._bn=t._bn;else {if(typeof t=="string"){let r=Br.default.decode(t);if(r.length!=Xi)throw new Error("Invalid public key input");this._bn=new Sx.default(r);}else this._bn=new Sx.default(t);if(this._bn.byteLength()>Xi)throw new Error("Invalid public key input")}}static unique(){let t=new e(_5);return _5+=1,new e(t.toBuffer())}equals(t){return this._bn.eq(t._bn)}toBase58(){return Br.default.encode(this.toBytes())}toJSON(){return this.toBase58()}toBytes(){let t=this.toBuffer();return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}toBuffer(){let t=this._bn.toArrayLike(be.Buffer);if(t.length===Xi)return t;let r=be.Buffer.alloc(32);return t.copy(r,32-t.length),r}get[Symbol.toStringTag](){return `PublicKey(${this.toString()})`}toString(){return this.toBase58()}static async createWithSeed(t,r,o){let n=be.Buffer.concat([t.toBuffer(),be.Buffer.from(r),o.toBuffer()]),i=Bf(n);return new e(i)}static createProgramAddressSync(t,r){let o=be.Buffer.alloc(0);t.forEach(function(i){if(i.length>ZU)throw new TypeError("Max seed length exceeded");o=be.Buffer.concat([o,De(i)]);}),o=be.Buffer.concat([o,r.toBuffer(),be.Buffer.from("ProgramDerivedAddress")]);let n=Bf(o);if(v5(n))throw new Error("Invalid seeds, address must fall off the curve");return new e(n)}static async createProgramAddress(t,r){return this.createProgramAddressSync(t,r)}static findProgramAddressSync(t,r){let o=255,n;for(;o!=0;){try{let i=t.concat(be.Buffer.from([o]));n=this.createProgramAddressSync(i,r);}catch(i){if(i instanceof TypeError)throw i;o--;continue}return [n,o]}throw new Error("Unable to find a viable program address nonce")}static async findProgramAddress(t,r){return this.findProgramAddressSync(t,r)}static isOnCurve(t){let r=new e(t);return v5(r.toBytes())}};N5=Ie;Ie.default=new N5("11111111111111111111111111111111");Rm.set(Ie,{kind:"struct",fields:[["_bn","u256"]]});new Ie("BPFLoader1111111111111111111111111111111111");var ga=1232,Dx=127,Tm=64;var _c=class{constructor(t,r){this.staticAccountKeys=void 0,this.accountKeysFromLookups=void 0,this.staticAccountKeys=t,this.accountKeysFromLookups=r;}keySegments(){let t=[this.staticAccountKeys];return this.accountKeysFromLookups&&(t.push(this.accountKeysFromLookups.writable),t.push(this.accountKeysFromLookups.readonly)),t}get(t){for(let r of this.keySegments()){if(t<r.length)return r[t];t-=r.length;}}get length(){return this.keySegments().flat().length}compileInstructions(t){if(this.length>256)throw new Error("Account index overflow encountered during compilation");let o=new Map;this.keySegments().flat().forEach((i,s)=>{o.set(i.toBase58(),s);});let n=i=>{let s=o.get(i.toBase58());if(s===void 0)throw new Error("Encountered an unknown instruction account key during compilation");return s};return t.map(i=>({programIdIndex:n(i.programId),accountKeyIndexes:i.keys.map(s=>n(s.pubkey)),data:i.data}))}},Pe=(e="publicKey")=>T.blob(32,e),qU=(e="signature")=>T.blob(64,e),vc=(e="string")=>{let t=T.struct([T.u32("length"),T.u32("lengthPadding"),T.blob(T.offset(T.u32(),-8),"chars")],e),r=t.decode.bind(t),o=t.encode.bind(t),n=t;return n.decode=(i,s)=>r(i,s).chars.toString(),n.encode=(i,s,a)=>{let c={chars:be.Buffer.from(i,"utf8")};return o(c,s,a)},n.alloc=i=>T.u32().span+T.u32().span+be.Buffer.from(i,"utf8").length,n},WU=(e="authorized")=>T.struct([Pe("staker"),Pe("withdrawer")],e),KU=(e="lockup")=>T.struct([T.ns64("unixTimestamp"),T.ns64("epoch"),Pe("custodian")],e),JU=(e="voteInit")=>T.struct([Pe("nodePubkey"),Pe("authorizedVoter"),Pe("authorizedWithdrawer"),T.u8("commission")],e),YU=(e="voteAuthorizeWithSeedArgs")=>T.struct([T.u32("voteAuthorizationType"),Pe("currentAuthorityDerivedKeyOwnerPubkey"),vc("currentAuthorityDerivedKeySeed"),Pe("newAuthorized")],e);function mn(e){let t=0,r=0;for(;;){let o=e.shift();if(t|=(o&127)<<r*7,r+=1,(o&128)===0)break}return t}function hn(e,t){let r=t;for(;;){let o=r&127;if(r>>=7,r==0){e.push(o);break}else o|=128,e.push(o);}}function rt(e,t){if(!e)throw new Error(t||"Assertion failed")}var $m=class e{constructor(t,r){this.payer=void 0,this.keyMetaMap=void 0,this.payer=t,this.keyMetaMap=r;}static compile(t,r){let o=new Map,n=s=>{let a=s.toBase58(),c=o.get(a);return c===void 0&&(c={isSigner:false,isWritable:false,isInvoked:false},o.set(a,c)),c},i=n(r);i.isSigner=true,i.isWritable=true;for(let s of t){n(s.programId).isInvoked=true;for(let a of s.keys){let c=n(a.pubkey);c.isSigner||=a.isSigner,c.isWritable||=a.isWritable;}}return new e(r,o)}getMessageComponents(){let t=[...this.keyMetaMap.entries()];rt(t.length<=256,"Max static account keys length exceeded");let r=t.filter(([,c])=>c.isSigner&&c.isWritable),o=t.filter(([,c])=>c.isSigner&&!c.isWritable),n=t.filter(([,c])=>!c.isSigner&&c.isWritable),i=t.filter(([,c])=>!c.isSigner&&!c.isWritable),s={numRequiredSignatures:r.length+o.length,numReadonlySignedAccounts:o.length,numReadonlyUnsignedAccounts:i.length};{rt(r.length>0,"Expected at least one writable signer key");let[c]=r[0];rt(c===this.payer.toBase58(),"Expected first writable signer key to be the fee payer");}let a=[...r.map(([c])=>new Ie(c)),...o.map(([c])=>new Ie(c)),...n.map(([c])=>new Ie(c)),...i.map(([c])=>new Ie(c))];return [s,a]}extractTableLookup(t){let[r,o]=this.drainKeysFoundInLookupTable(t.state.addresses,s=>!s.isSigner&&!s.isInvoked&&s.isWritable),[n,i]=this.drainKeysFoundInLookupTable(t.state.addresses,s=>!s.isSigner&&!s.isInvoked&&!s.isWritable);if(!(r.length===0&&n.length===0))return [{accountKey:t.key,writableIndexes:r,readonlyIndexes:n},{writable:o,readonly:i}]}drainKeysFoundInLookupTable(t,r){let o=new Array,n=new Array;for(let[i,s]of this.keyMetaMap.entries())if(r(s)){let a=new Ie(i),c=t.findIndex(u=>u.equals(a));c>=0&&(rt(c<256,"Max lookup table index exceeded"),o.push(c),n.push(a),this.keyMetaMap.delete(i));}return [o,n]}},B5="Reached end of buffer unexpectedly";function si(e){if(e.length===0)throw new Error(B5);return e.shift()}function gn(e,...t){let[r]=t;if(t.length===2?r+(t[1]??0)>e.length:r>=e.length)throw new Error(B5);return e.splice(...t)}var rl=class e{constructor(t){this.header=void 0,this.accountKeys=void 0,this.recentBlockhash=void 0,this.instructions=void 0,this.indexToProgramIds=new Map,this.header=t.header,this.accountKeys=t.accountKeys.map(r=>new Ie(r)),this.recentBlockhash=t.recentBlockhash,this.instructions=t.instructions,this.instructions.forEach(r=>this.indexToProgramIds.set(r.programIdIndex,this.accountKeys[r.programIdIndex]));}get version(){return "legacy"}get staticAccountKeys(){return this.accountKeys}get compiledInstructions(){return this.instructions.map(t=>({programIdIndex:t.programIdIndex,accountKeyIndexes:t.accounts,data:Br.default.decode(t.data)}))}get addressTableLookups(){return []}getAccountKeys(){return new _c(this.staticAccountKeys)}static compile(t){let r=$m.compile(t.instructions,t.payerKey),[o,n]=r.getMessageComponents(),s=new _c(n).compileInstructions(t.instructions).map(a=>({programIdIndex:a.programIdIndex,accounts:a.accountKeyIndexes,data:Br.default.encode(a.data)}));return new e({header:o,accountKeys:n,recentBlockhash:t.recentBlockhash,instructions:s})}isAccountSigner(t){return t<this.header.numRequiredSignatures}isAccountWritable(t){let r=this.header.numRequiredSignatures;if(t>=this.header.numRequiredSignatures){let o=t-r,i=this.accountKeys.length-r-this.header.numReadonlyUnsignedAccounts;return o<i}else {let o=r-this.header.numReadonlySignedAccounts;return t<o}}isProgramId(t){return this.indexToProgramIds.has(t)}programIds(){return [...this.indexToProgramIds.values()]}nonProgramIds(){return this.accountKeys.filter((t,r)=>!this.isProgramId(r))}serialize(){let t=this.accountKeys.length,r=[];hn(r,t);let o=this.instructions.map(d=>{let{accounts:g,programIdIndex:h}=d,v=Array.from(Br.default.decode(d.data)),E=[];hn(E,g.length);let R=[];return hn(R,v.length),{programIdIndex:h,keyIndicesCount:be.Buffer.from(E),keyIndices:g,dataLength:be.Buffer.from(R),data:v}}),n=[];hn(n,o.length);let i=be.Buffer.alloc(ga);be.Buffer.from(n).copy(i);let s=n.length;o.forEach(d=>{let h=T.struct([T.u8("programIdIndex"),T.blob(d.keyIndicesCount.length,"keyIndicesCount"),T.seq(T.u8("keyIndex"),d.keyIndices.length,"keyIndices"),T.blob(d.dataLength.length,"dataLength"),T.seq(T.u8("userdatum"),d.data.length,"data")]).encode(d,i,s);s+=h;}),i=i.slice(0,s);let a=T.struct([T.blob(1,"numRequiredSignatures"),T.blob(1,"numReadonlySignedAccounts"),T.blob(1,"numReadonlyUnsignedAccounts"),T.blob(r.length,"keyCount"),T.seq(Pe("key"),t,"keys"),Pe("recentBlockhash")]),c={numRequiredSignatures:be.Buffer.from([this.header.numRequiredSignatures]),numReadonlySignedAccounts:be.Buffer.from([this.header.numReadonlySignedAccounts]),numReadonlyUnsignedAccounts:be.Buffer.from([this.header.numReadonlyUnsignedAccounts]),keyCount:be.Buffer.from(r),keys:this.accountKeys.map(d=>De(d.toBytes())),recentBlockhash:Br.default.decode(this.recentBlockhash)},u=be.Buffer.alloc(2048),l=a.encode(c,u);return i.copy(u,l),u.slice(0,l+i.length)}static from(t){let r=[...t],o=si(r);if(o!==(o&Dx))throw new Error("Versioned messages must be deserialized with VersionedMessage.deserialize()");let n=si(r),i=si(r),s=mn(r),a=[];for(let g=0;g<s;g++){let h=gn(r,0,Xi);a.push(new Ie(be.Buffer.from(h)));}let c=gn(r,0,Xi),u=mn(r),l=[];for(let g=0;g<u;g++){let h=si(r),v=mn(r),E=gn(r,0,v),R=mn(r),$=gn(r,0,R),P=Br.default.encode(be.Buffer.from($));l.push({programIdIndex:h,accounts:E,data:P});}let d={header:{numRequiredSignatures:o,numReadonlySignedAccounts:n,numReadonlyUnsignedAccounts:i},recentBlockhash:Br.default.encode(be.Buffer.from(c)),accountKeys:a,instructions:l};return new e(d)}},$x=class e{constructor(t){this.header=void 0,this.staticAccountKeys=void 0,this.recentBlockhash=void 0,this.compiledInstructions=void 0,this.addressTableLookups=void 0,this.header=t.header,this.staticAccountKeys=t.staticAccountKeys,this.recentBlockhash=t.recentBlockhash,this.compiledInstructions=t.compiledInstructions,this.addressTableLookups=t.addressTableLookups;}get version(){return 0}get numAccountKeysFromLookups(){let t=0;for(let r of this.addressTableLookups)t+=r.readonlyIndexes.length+r.writableIndexes.length;return t}getAccountKeys(t){let r;if(t&&"accountKeysFromLookups"in t&&t.accountKeysFromLookups){if(this.numAccountKeysFromLookups!=t.accountKeysFromLookups.writable.length+t.accountKeysFromLookups.readonly.length)throw new Error("Failed to get account keys because of a mismatch in the number of account keys from lookups");r=t.accountKeysFromLookups;}else if(t&&"addressLookupTableAccounts"in t&&t.addressLookupTableAccounts)r=this.resolveAddressTableLookups(t.addressLookupTableAccounts);else if(this.addressTableLookups.length>0)throw new Error("Failed to get account keys because address table lookups were not resolved");return new _c(this.staticAccountKeys,r)}isAccountSigner(t){return t<this.header.numRequiredSignatures}isAccountWritable(t){let r=this.header.numRequiredSignatures,o=this.staticAccountKeys.length;if(t>=o){let n=t-o,i=this.addressTableLookups.reduce((s,a)=>s+a.writableIndexes.length,0);return n<i}else if(t>=this.header.numRequiredSignatures){let n=t-r,s=o-r-this.header.numReadonlyUnsignedAccounts;return n<s}else {let n=r-this.header.numReadonlySignedAccounts;return t<n}}resolveAddressTableLookups(t){let r={writable:[],readonly:[]};for(let o of this.addressTableLookups){let n=t.find(i=>i.key.equals(o.accountKey));if(!n)throw new Error(`Failed to find address lookup table account for table key ${o.accountKey.toBase58()}`);for(let i of o.writableIndexes)if(i<n.state.addresses.length)r.writable.push(n.state.addresses[i]);else throw new Error(`Failed to find address for index ${i} in address lookup table ${o.accountKey.toBase58()}`);for(let i of o.readonlyIndexes)if(i<n.state.addresses.length)r.readonly.push(n.state.addresses[i]);else throw new Error(`Failed to find address for index ${i} in address lookup table ${o.accountKey.toBase58()}`)}return r}static compile(t){let r=$m.compile(t.instructions,t.payerKey),o=new Array,n={writable:new Array,readonly:new Array},i=t.addressLookupTableAccounts||[];for(let l of i){let d=r.extractTableLookup(l);if(d!==void 0){let[g,{writable:h,readonly:v}]=d;o.push(g),n.writable.push(...h),n.readonly.push(...v);}}let[s,a]=r.getMessageComponents(),u=new _c(a,n).compileInstructions(t.instructions);return new e({header:s,staticAccountKeys:a,recentBlockhash:t.recentBlockhash,compiledInstructions:u,addressTableLookups:o})}serialize(){let t=Array();hn(t,this.staticAccountKeys.length);let r=this.serializeInstructions(),o=Array();hn(o,this.compiledInstructions.length);let n=this.serializeAddressTableLookups(),i=Array();hn(i,this.addressTableLookups.length);let s=T.struct([T.u8("prefix"),T.struct([T.u8("numRequiredSignatures"),T.u8("numReadonlySignedAccounts"),T.u8("numReadonlyUnsignedAccounts")],"header"),T.blob(t.length,"staticAccountKeysLength"),T.seq(Pe(),this.staticAccountKeys.length,"staticAccountKeys"),Pe("recentBlockhash"),T.blob(o.length,"instructionsLength"),T.blob(r.length,"serializedInstructions"),T.blob(i.length,"addressTableLookupsLength"),T.blob(n.length,"serializedAddressTableLookups")]),a=new Uint8Array(ga),u=s.encode({prefix:128,header:this.header,staticAccountKeysLength:new Uint8Array(t),staticAccountKeys:this.staticAccountKeys.map(l=>l.toBytes()),recentBlockhash:Br.default.decode(this.recentBlockhash),instructionsLength:new Uint8Array(o),serializedInstructions:r,addressTableLookupsLength:new Uint8Array(i),serializedAddressTableLookups:n},a);return a.slice(0,u)}serializeInstructions(){let t=0,r=new Uint8Array(ga);for(let o of this.compiledInstructions){let n=Array();hn(n,o.accountKeyIndexes.length);let i=Array();hn(i,o.data.length);let s=T.struct([T.u8("programIdIndex"),T.blob(n.length,"encodedAccountKeyIndexesLength"),T.seq(T.u8(),o.accountKeyIndexes.length,"accountKeyIndexes"),T.blob(i.length,"encodedDataLength"),T.blob(o.data.length,"data")]);t+=s.encode({programIdIndex:o.programIdIndex,encodedAccountKeyIndexesLength:new Uint8Array(n),accountKeyIndexes:o.accountKeyIndexes,encodedDataLength:new Uint8Array(i),data:o.data},r,t);}return r.slice(0,t)}serializeAddressTableLookups(){let t=0,r=new Uint8Array(ga);for(let o of this.addressTableLookups){let n=Array();hn(n,o.writableIndexes.length);let i=Array();hn(i,o.readonlyIndexes.length);let s=T.struct([Pe("accountKey"),T.blob(n.length,"encodedWritableIndexesLength"),T.seq(T.u8(),o.writableIndexes.length,"writableIndexes"),T.blob(i.length,"encodedReadonlyIndexesLength"),T.seq(T.u8(),o.readonlyIndexes.length,"readonlyIndexes")]);t+=s.encode({accountKey:o.accountKey.toBytes(),encodedWritableIndexesLength:new Uint8Array(n),writableIndexes:o.writableIndexes,encodedReadonlyIndexesLength:new Uint8Array(i),readonlyIndexes:o.readonlyIndexes},r,t);}return r.slice(0,t)}static deserialize(t){let r=[...t],o=si(r),n=o&Dx;rt(o!==n,"Expected versioned message but received legacy message");let i=n;rt(i===0,`Expected versioned message with version 0 but found version ${i}`);let s={numRequiredSignatures:si(r),numReadonlySignedAccounts:si(r),numReadonlyUnsignedAccounts:si(r)},a=[],c=mn(r);for(let v=0;v<c;v++)a.push(new Ie(gn(r,0,Xi)));let u=Br.default.encode(gn(r,0,Xi)),l=mn(r),d=[];for(let v=0;v<l;v++){let E=si(r),R=mn(r),$=gn(r,0,R),P=mn(r),O=new Uint8Array(gn(r,0,P));d.push({programIdIndex:E,accountKeyIndexes:$,data:O});}let g=mn(r),h=[];for(let v=0;v<g;v++){let E=new Ie(gn(r,0,Xi)),R=mn(r),$=gn(r,0,R),P=mn(r),O=gn(r,0,P);h.push({accountKey:E,writableIndexes:$,readonlyIndexes:O});}return new e({header:s,staticAccountKeys:a,recentBlockhash:u,compiledInstructions:d,addressTableLookups:h})}},Cm={deserializeMessageVersion(e){let t=e[0],r=t&Dx;return r===t?"legacy":r},deserialize:e=>{let t=Cm.deserializeMessageVersion(e);if(t==="legacy")return rl.from(e);if(t===0)return $x.deserialize(e);throw new Error(`Transaction message version ${t} deserialization is not supported`)}};var XU=be.Buffer.alloc(Tm).fill(0),We=class{constructor(t){this.keys=void 0,this.programId=void 0,this.data=be.Buffer.alloc(0),this.programId=t.programId,this.keys=t.keys,t.data&&(this.data=t.data);}toJSON(){return {keys:this.keys.map(({pubkey:t,isSigner:r,isWritable:o})=>({pubkey:t.toJSON(),isSigner:r,isWritable:o})),programId:this.programId.toJSON(),data:[...this.data]}}},Xe=class e{get signature(){return this.signatures.length>0?this.signatures[0].signature:null}constructor(t){if(this.signatures=[],this.feePayer=void 0,this.instructions=[],this.recentBlockhash=void 0,this.lastValidBlockHeight=void 0,this.nonceInfo=void 0,this.minNonceContextSlot=void 0,this._message=void 0,this._json=void 0,!!t)if(t.feePayer&&(this.feePayer=t.feePayer),t.signatures&&(this.signatures=t.signatures),Object.prototype.hasOwnProperty.call(t,"nonceInfo")){let{minContextSlot:r,nonceInfo:o}=t;this.minNonceContextSlot=r,this.nonceInfo=o;}else if(Object.prototype.hasOwnProperty.call(t,"lastValidBlockHeight")){let{blockhash:r,lastValidBlockHeight:o}=t;this.recentBlockhash=r,this.lastValidBlockHeight=o;}else {let{recentBlockhash:r,nonceInfo:o}=t;o&&(this.nonceInfo=o),this.recentBlockhash=r;}}toJSON(){return {recentBlockhash:this.recentBlockhash||null,feePayer:this.feePayer?this.feePayer.toJSON():null,nonceInfo:this.nonceInfo?{nonce:this.nonceInfo.nonce,nonceInstruction:this.nonceInfo.nonceInstruction.toJSON()}:null,instructions:this.instructions.map(t=>t.toJSON()),signers:this.signatures.map(({publicKey:t})=>t.toJSON())}}add(...t){if(t.length===0)throw new Error("No instructions");return t.forEach(r=>{"instructions"in r?this.instructions=this.instructions.concat(r.instructions):"data"in r&&"programId"in r&&"keys"in r?this.instructions.push(r):this.instructions.push(new We(r));}),this}compileMessage(){if(this._message&&JSON.stringify(this.toJSON())===JSON.stringify(this._json))return this._message;let t,r;if(this.nonceInfo?(t=this.nonceInfo.nonce,this.instructions[0]!=this.nonceInfo.nonceInstruction?r=[this.nonceInfo.nonceInstruction,...this.instructions]:r=this.instructions):(t=this.recentBlockhash,r=this.instructions),!t)throw new Error("Transaction recentBlockhash required");r.length<1&&console.warn("No instructions provided");let o;if(this.feePayer)o=this.feePayer;else if(this.signatures.length>0&&this.signatures[0].publicKey)o=this.signatures[0].publicKey;else throw new Error("Transaction fee payer required");for(let E=0;E<r.length;E++)if(r[E].programId===void 0)throw new Error(`Transaction instruction index ${E} has undefined program id`);let n=[],i=[];r.forEach(E=>{E.keys.forEach($=>{i.push({...$});});let R=E.programId.toString();n.includes(R)||n.push(R);}),n.forEach(E=>{i.push({pubkey:new Ie(E),isSigner:false,isWritable:false});});let s=[];i.forEach(E=>{let R=E.pubkey.toString(),$=s.findIndex(P=>P.pubkey.toString()===R);$>-1?(s[$].isWritable=s[$].isWritable||E.isWritable,s[$].isSigner=s[$].isSigner||E.isSigner):s.push(E);}),s.sort(function(E,R){if(E.isSigner!==R.isSigner)return E.isSigner?-1:1;if(E.isWritable!==R.isWritable)return E.isWritable?-1:1;let $={localeMatcher:"best fit",usage:"sort",sensitivity:"variant",ignorePunctuation:false,numeric:false,caseFirst:"lower"};return E.pubkey.toBase58().localeCompare(R.pubkey.toBase58(),"en",$)});let a=s.findIndex(E=>E.pubkey.equals(o));if(a>-1){let[E]=s.splice(a,1);E.isSigner=true,E.isWritable=true,s.unshift(E);}else s.unshift({pubkey:o,isSigner:true,isWritable:true});for(let E of this.signatures){let R=s.findIndex($=>$.pubkey.equals(E.publicKey));if(R>-1)s[R].isSigner||(s[R].isSigner=true,console.warn("Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release."));else throw new Error(`unknown signer: ${E.publicKey.toString()}`)}let c=0,u=0,l=0,d=[],g=[];s.forEach(({pubkey:E,isSigner:R,isWritable:$})=>{R?(d.push(E.toString()),c+=1,$||(u+=1)):(g.push(E.toString()),$||(l+=1));});let h=d.concat(g),v=r.map(E=>{let{data:R,programId:$}=E;return {programIdIndex:h.indexOf($.toString()),accounts:E.keys.map(P=>h.indexOf(P.pubkey.toString())),data:Br.default.encode(R)}});return v.forEach(E=>{rt(E.programIdIndex>=0),E.accounts.forEach(R=>rt(R>=0));}),new rl({header:{numRequiredSignatures:c,numReadonlySignedAccounts:u,numReadonlyUnsignedAccounts:l},accountKeys:h,recentBlockhash:t,instructions:v})}_compile(){let t=this.compileMessage(),r=t.accountKeys.slice(0,t.header.numRequiredSignatures);return this.signatures.length===r.length&&this.signatures.every((n,i)=>r[i].equals(n.publicKey))||(this.signatures=r.map(o=>({signature:null,publicKey:o}))),t}serializeMessage(){return this._compile().serialize()}async getEstimatedFee(t){return (await t.getFeeForMessage(this.compileMessage())).value}setSigners(...t){if(t.length===0)throw new Error("No signers");let r=new Set;this.signatures=t.filter(o=>{let n=o.toString();return r.has(n)?false:(r.add(n),true)}).map(o=>({signature:null,publicKey:o}));}sign(...t){if(t.length===0)throw new Error("No signers");let r=new Set,o=[];for(let i of t){let s=i.publicKey.toString();r.has(s)||(r.add(s),o.push(i));}this.signatures=o.map(i=>({signature:null,publicKey:i.publicKey}));let n=this._compile();this._partialSign(n,...o);}partialSign(...t){if(t.length===0)throw new Error("No signers");let r=new Set,o=[];for(let i of t){let s=i.publicKey.toString();r.has(s)||(r.add(s),o.push(i));}let n=this._compile();this._partialSign(n,...o);}_partialSign(t,...r){let o=t.serialize();r.forEach(n=>{let i=Mx(o,n.secretKey);this._addSignature(n.publicKey,De(i));});}addSignature(t,r){this._compile(),this._addSignature(t,r);}_addSignature(t,r){rt(r.length===64);let o=this.signatures.findIndex(n=>t.equals(n.publicKey));if(o<0)throw new Error(`unknown signer: ${t.toString()}`);this.signatures[o].signature=be.Buffer.from(r);}verifySignatures(t=true){return !this._getMessageSignednessErrors(this.serializeMessage(),t)}_getMessageSignednessErrors(t,r){let o={};for(let{signature:n,publicKey:i}of this.signatures)n===null?r&&(o.missing||=[]).push(i):VU(n,t,i.toBytes())||(o.invalid||=[]).push(i);return o.invalid||o.missing?o:void 0}serialize(t){let{requireAllSignatures:r,verifySignatures:o}=Object.assign({requireAllSignatures:true,verifySignatures:true},t),n=this.serializeMessage();if(o){let i=this._getMessageSignednessErrors(n,r);if(i){let s="Signature verification failed.";throw i.invalid&&(s+=`
|
|
41
|
-
Invalid signature for public key${i.invalid.length===1?"":"(s)"} [\`${i.invalid.map(a=>a.toBase58()).join("`, `")}\`].`),i.missing&&(s+=`
|
|
42
|
-
Missing signature for public key${i.missing.length===1?"":"(s)"} [\`${i.missing.map(a=>a.toBase58()).join("`, `")}\`].`),new Error(s)}}return this._serialize(n)}_serialize(t){let{signatures:r}=this,o=[];hn(o,r.length);let n=o.length+r.length*64+t.length,i=be.Buffer.alloc(n);return rt(r.length<256),be.Buffer.from(o).copy(i,0),r.forEach(({signature:s},a)=>{s!==null&&(rt(s.length===64,"signature has invalid length"),be.Buffer.from(s).copy(i,o.length+a*64));}),t.copy(i,o.length+r.length*64),rt(i.length<=ga,`Transaction too large: ${i.length} > ${ga}`),i}get keys(){return rt(this.instructions.length===1),this.instructions[0].keys.map(t=>t.pubkey)}get programId(){return rt(this.instructions.length===1),this.instructions[0].programId}get data(){return rt(this.instructions.length===1),this.instructions[0].data}static from(t){let r=[...t],o=mn(r),n=[];for(let i=0;i<o;i++){let s=gn(r,0,Tm);n.push(Br.default.encode(be.Buffer.from(s)));}return e.populate(rl.from(r),n)}static populate(t,r=[]){let o=new e;return o.recentBlockhash=t.recentBlockhash,t.header.numRequiredSignatures>0&&(o.feePayer=t.accountKeys[0]),r.forEach((n,i)=>{let s={signature:n==Br.default.encode(XU)?null:Br.default.decode(n),publicKey:t.accountKeys[i]};o.signatures.push(s);}),t.instructions.forEach(n=>{let i=n.accounts.map(s=>{let a=t.accountKeys[s];return {pubkey:a,isSigner:o.signatures.some(c=>c.publicKey.toString()===a.toString())||t.isAccountSigner(s),isWritable:t.isAccountWritable(s)}});o.instructions.push(new We({keys:i,programId:t.accountKeys[n.programIdIndex],data:Br.default.decode(n.data)}));}),o._message=t,o._json=o.toJSON(),o}};var Om=class e{get version(){return this.message.version}constructor(t,r){if(this.signatures=void 0,this.message=void 0,r!==void 0)rt(r.length===t.header.numRequiredSignatures,"Expected signatures length to be equal to the number of required signatures"),this.signatures=r;else {let o=[];for(let n=0;n<t.header.numRequiredSignatures;n++)o.push(new Uint8Array(Tm));this.signatures=o;}this.message=t;}serialize(){let t=this.message.serialize(),r=Array();hn(r,this.signatures.length);let o=T.struct([T.blob(r.length,"encodedSignaturesLength"),T.seq(qU(),this.signatures.length,"signatures"),T.blob(t.length,"serializedMessage")]),n=new Uint8Array(2048),i=o.encode({encodedSignaturesLength:new Uint8Array(r),signatures:this.signatures,serializedMessage:t},n);return n.slice(0,i)}static deserialize(t){let r=[...t],o=[],n=mn(r);for(let s=0;s<n;s++)o.push(new Uint8Array(gn(r,0,Tm)));let i=Cm.deserialize(new Uint8Array(r));return new e(i,o)}sign(t){let r=this.message.serialize(),o=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures);for(let n of t){let i=o.findIndex(s=>s.equals(n.publicKey));rt(i>=0,`Cannot sign with non signer key ${n.publicKey.toBase58()}`),this.signatures[i]=Mx(r,n.secretKey);}}addSignature(t,r){rt(r.byteLength===64,"Signature must be 64 bytes long");let n=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures).findIndex(i=>i.equals(t));rt(n>=0,`Can not add signature; \`${t.toBase58()}\` is not required to sign this transaction`),this.signatures[n]=r;}};new Ie("SysvarC1ock11111111111111111111111111111111");new Ie("SysvarEpochSchedu1e111111111111111111111111");new Ie("Sysvar1nstructions1111111111111111111111111");new Ie("SysvarRecentB1ockHashes11111111111111111111");new Ie("SysvarRent111111111111111111111111111111111");new Ie("SysvarRewards111111111111111111111111111111");new Ie("SysvarS1otHashes111111111111111111111111111");new Ie("SysvarS1otHistory11111111111111111111111111");new Ie("SysvarStakeHistory1111111111111111111111111");var o9=T.nu64("lamportsPerSignature"),i9=T.struct([T.u32("version"),T.u32("state"),Pe("authorizedPubkey"),Pe("nonce"),T.struct([o9],"feeCalculator")]);i9.span;function wc(e){let t=(0, O5.blob)(8,e),r=t.decode.bind(t),o=t.encode.bind(t),n=t,i=wI();return n.decode=(s,a)=>{let c=r(s,a);return i.decode(c)},n.encode=(s,a,c)=>{let u=i.encode(s);return o(u,a,c)},n}Object.freeze({Create:{index:0,layout:T.struct([T.u32("instruction"),T.ns64("lamports"),T.ns64("space"),Pe("programId")])},Assign:{index:1,layout:T.struct([T.u32("instruction"),Pe("programId")])},Transfer:{index:2,layout:T.struct([T.u32("instruction"),wc("lamports")])},CreateWithSeed:{index:3,layout:T.struct([T.u32("instruction"),Pe("base"),vc("seed"),T.ns64("lamports"),T.ns64("space"),Pe("programId")])},AdvanceNonceAccount:{index:4,layout:T.struct([T.u32("instruction")])},WithdrawNonceAccount:{index:5,layout:T.struct([T.u32("instruction"),T.ns64("lamports")])},InitializeNonceAccount:{index:6,layout:T.struct([T.u32("instruction"),Pe("authorized")])},AuthorizeNonceAccount:{index:7,layout:T.struct([T.u32("instruction"),Pe("authorized")])},Allocate:{index:8,layout:T.struct([T.u32("instruction"),T.ns64("space")])},AllocateWithSeed:{index:9,layout:T.struct([T.u32("instruction"),Pe("base"),vc("seed"),T.ns64("space"),Pe("programId")])},AssignWithSeed:{index:10,layout:T.struct([T.u32("instruction"),Pe("base"),vc("seed"),Pe("programId")])},TransferWithSeed:{index:11,layout:T.struct([T.u32("instruction"),wc("lamports"),vc("seed"),Pe("programId")])},UpgradeNonceAccount:{index:12,layout:T.struct([T.u32("instruction")])}});new Ie("11111111111111111111111111111111");new Ie("BPFLoader2111111111111111111111111111111111");({layout:T.struct([T.u32("typeIndex"),wc("deactivationSlot"),T.nu64("lastExtendedSlot"),T.u8("lastExtendedStartIndex"),T.u8(),T.seq(Pe(),T.offset(T.u8(),-1),"authority")])});var yt=bc(mm(Ie),re(),e=>new Ie(e)),C5=hm([re(),st("base64")]),jx=bc(mm(be.Buffer),C5,e=>be.Buffer.from(e[0],"base64"));function z5(e){return Rr([q({jsonrpc:st("2.0"),id:re(),result:e}),q({jsonrpc:st("2.0"),id:re(),error:q({code:ma(),message:re(),data:pe(AI())})})])}var a9=z5(ma());function Qe(e){return bc(z5(e),a9,t=>"error"in t?t:{...t,result:yc(t.result,e)})}function eo(e){return Qe(q({context:q({slot:L()}),value:e}))}function zm(e){return q({context:q({slot:L()}),value:e})}var c9=q({foundation:L(),foundationTerm:L(),initial:L(),taper:L(),terminal:L()});Qe(ue(fe(q({epoch:L(),effectiveSlot:L(),amount:L(),postBalance:L(),commission:pe(fe(L()))}))));var u9=ue(q({slot:L(),prioritizationFee:L()})),f9=q({total:L(),validator:L(),foundation:L(),epoch:L()}),l9=q({epoch:L(),slotIndex:L(),slotsInEpoch:L(),absoluteSlot:L(),blockHeight:pe(L()),transactionCount:pe(L())}),d9=q({slotsPerEpoch:L(),leaderScheduleSlotOffset:L(),warmup:Xn(),firstNormalEpoch:L(),firstNormalSlot:L()}),p9=Jb(re(),ue(L())),ya=fe(Rr([q({}),re()])),m9=q({err:ya}),h9=st("receivedSignature");q({"solana-core":re(),"feature-set":pe(L())});var g9=q({program:re(),programId:yt,parsed:ma()}),y9=q({programId:yt,accounts:ue(yt),data:re()});eo(q({err:fe(Rr([q({}),re()])),logs:fe(ue(re())),accounts:pe(fe(ue(fe(q({executable:Xn(),owner:re(),lamports:L(),data:ue(re()),rentEpoch:pe(L())}))))),unitsConsumed:pe(L()),returnData:pe(fe(q({programId:re(),data:hm([re(),st("base64")])}))),innerInstructions:pe(fe(ue(q({index:L(),instructions:ue(Rr([g9,y9]))}))))}));eo(q({byIdentity:Jb(re(),ue(L())),range:q({firstSlot:L(),lastSlot:L()})}));Qe(c9);Qe(f9);Qe(u9);Qe(l9);Qe(d9);Qe(p9);Qe(L());eo(q({total:L(),circulating:L(),nonCirculating:L(),nonCirculatingAccounts:ue(yt)}));var b9=q({amount:re(),uiAmount:fe(L()),decimals:L(),uiAmountString:pe(re())});eo(ue(q({address:yt,amount:re(),uiAmount:fe(L()),decimals:L(),uiAmountString:pe(re())})));eo(ue(q({pubkey:yt,account:q({executable:Xn(),owner:yt,lamports:L(),data:jx,rentEpoch:L()})})));var Px=q({program:re(),parsed:ma(),space:L()});eo(ue(q({pubkey:yt,account:q({executable:Xn(),owner:yt,lamports:L(),data:Px,rentEpoch:L()})})));eo(ue(q({lamports:L(),address:yt})));var Fx=q({executable:Xn(),owner:yt,lamports:L(),data:jx,rentEpoch:L()});q({pubkey:yt,account:Fx});var x9=bc(Rr([mm(be.Buffer),Px]),Rr([C5,Px]),e=>Array.isArray(e)?yc(e,jx):e),v9=q({executable:Xn(),owner:yt,lamports:L(),data:x9,rentEpoch:L()});q({pubkey:yt,account:v9});q({state:Rr([st("active"),st("inactive"),st("activating"),st("deactivating")]),active:L(),inactive:L()});Qe(ue(q({signature:re(),slot:L(),err:ya,memo:fe(re()),blockTime:pe(fe(L()))})));Qe(ue(q({signature:re(),slot:L(),err:ya,memo:fe(re()),blockTime:pe(fe(L()))})));q({subscription:L(),result:zm(Fx)});var _9=q({pubkey:yt,account:Fx});q({subscription:L(),result:zm(_9)});var w9=q({parent:L(),slot:L(),root:L()});q({subscription:L(),result:w9});var E9=Rr([q({type:Rr([st("firstShredReceived"),st("completed"),st("optimisticConfirmation"),st("root")]),slot:L(),timestamp:L()}),q({type:st("createdBank"),parent:L(),slot:L(),timestamp:L()}),q({type:st("frozen"),slot:L(),timestamp:L(),stats:q({numTransactionEntries:L(),numSuccessfulTransactions:L(),numFailedTransactions:L(),maxTransactionsPerEntry:L()})}),q({type:st("dead"),slot:L(),timestamp:L(),err:re()})]);q({subscription:L(),result:E9});q({subscription:L(),result:zm(Rr([m9,h9]))});q({subscription:L(),result:L()});q({pubkey:re(),gossip:fe(re()),tpu:fe(re()),rpc:fe(re()),version:fe(re())});var S5=q({votePubkey:re(),nodePubkey:re(),activatedStake:L(),epochVoteAccount:Xn(),epochCredits:ue(hm([L(),L(),L()])),commission:L(),lastVote:L(),rootSlot:fe(L())});Qe(q({current:ue(S5),delinquent:ue(S5)}));var S9=Rr([st("processed"),st("confirmed"),st("finalized")]),I9=q({slot:L(),confirmations:fe(L()),err:ya,confirmationStatus:pe(S9)});eo(ue(fe(I9)));Qe(L());var L5=q({accountKey:yt,writableIndexes:ue(L()),readonlyIndexes:ue(L())}),Hx=q({signatures:ue(re()),message:q({accountKeys:ue(re()),header:q({numRequiredSignatures:L(),numReadonlySignedAccounts:L(),numReadonlyUnsignedAccounts:L()}),instructions:ue(q({accounts:ue(L()),data:re(),programIdIndex:L()})),recentBlockhash:re(),addressTableLookups:pe(ue(L5))})}),U5=q({pubkey:yt,signer:Xn(),writable:Xn(),source:pe(Rr([st("transaction"),st("lookupTable")]))}),M5=q({accountKeys:ue(U5),signatures:ue(re())}),D5=q({parsed:ma(),program:re(),programId:yt}),j5=q({accounts:ue(yt),data:re(),programId:yt}),A9=Rr([j5,D5]),k9=Rr([q({parsed:ma(),program:re(),programId:re()}),q({accounts:ue(re()),data:re(),programId:re()})]),F5=bc(A9,k9,e=>"accounts"in e?yc(e,j5):yc(e,D5)),H5=q({signatures:ue(re()),message:q({accountKeys:ue(U5),instructions:ue(F5),recentBlockhash:re(),addressTableLookups:pe(fe(ue(L5)))})}),Nm=q({accountIndex:L(),mint:re(),owner:pe(re()),programId:pe(re()),uiTokenAmount:b9}),V5=q({writable:ue(yt),readonly:ue(yt)}),Lm=q({err:ya,fee:L(),innerInstructions:pe(fe(ue(q({index:L(),instructions:ue(q({accounts:ue(L()),data:re(),programIdIndex:L()}))})))),preBalances:ue(L()),postBalances:ue(L()),logMessages:pe(fe(ue(re()))),preTokenBalances:pe(fe(ue(Nm))),postTokenBalances:pe(fe(ue(Nm))),loadedAddresses:pe(V5),computeUnitsConsumed:pe(L()),costUnits:pe(L())}),Vx=q({err:ya,fee:L(),innerInstructions:pe(fe(ue(q({index:L(),instructions:ue(F5)})))),preBalances:ue(L()),postBalances:ue(L()),logMessages:pe(fe(ue(re()))),preTokenBalances:pe(fe(ue(Nm))),postTokenBalances:pe(fe(ue(Nm))),loadedAddresses:pe(V5),computeUnitsConsumed:pe(L()),costUnits:pe(L())}),Sc=Rr([st(0),st("legacy")]),ba=q({pubkey:re(),lamports:L(),postBalance:fe(L()),rewardType:fe(re()),commission:pe(fe(L()))});Qe(fe(q({blockhash:re(),previousBlockhash:re(),parentSlot:L(),transactions:ue(q({transaction:Hx,meta:fe(Lm),version:pe(Sc)})),rewards:pe(ue(ba)),blockTime:fe(L()),blockHeight:fe(L())})));Qe(fe(q({blockhash:re(),previousBlockhash:re(),parentSlot:L(),rewards:pe(ue(ba)),blockTime:fe(L()),blockHeight:fe(L())})));Qe(fe(q({blockhash:re(),previousBlockhash:re(),parentSlot:L(),transactions:ue(q({transaction:M5,meta:fe(Lm),version:pe(Sc)})),rewards:pe(ue(ba)),blockTime:fe(L()),blockHeight:fe(L())})));Qe(fe(q({blockhash:re(),previousBlockhash:re(),parentSlot:L(),transactions:ue(q({transaction:H5,meta:fe(Vx),version:pe(Sc)})),rewards:pe(ue(ba)),blockTime:fe(L()),blockHeight:fe(L())})));Qe(fe(q({blockhash:re(),previousBlockhash:re(),parentSlot:L(),transactions:ue(q({transaction:M5,meta:fe(Vx),version:pe(Sc)})),rewards:pe(ue(ba)),blockTime:fe(L()),blockHeight:fe(L())})));Qe(fe(q({blockhash:re(),previousBlockhash:re(),parentSlot:L(),rewards:pe(ue(ba)),blockTime:fe(L()),blockHeight:fe(L())})));Qe(fe(q({blockhash:re(),previousBlockhash:re(),parentSlot:L(),transactions:ue(q({transaction:Hx,meta:fe(Lm)})),rewards:pe(ue(ba)),blockTime:fe(L())})));Qe(fe(q({blockhash:re(),previousBlockhash:re(),parentSlot:L(),signatures:ue(re()),blockTime:fe(L())})));Qe(fe(q({slot:L(),meta:fe(Lm),blockTime:pe(fe(L())),transaction:Hx,version:pe(Sc)})));Qe(fe(q({slot:L(),transaction:H5,meta:fe(Vx),blockTime:pe(fe(L())),version:pe(Sc)})));eo(q({blockhash:re(),lastValidBlockHeight:L()}));eo(Xn());var R9=q({slot:L(),numTransactions:L(),numSlots:L(),samplePeriodSecs:L()});Qe(ue(R9));eo(fe(q({feeCalculator:q({lamportsPerSignature:L()})})));Qe(re());Qe(re());var T9=q({err:ya,logs:ue(re()),signature:re()});q({result:zm(T9),subscription:L()});Object.freeze({CreateLookupTable:{index:0,layout:T.struct([T.u32("instruction"),wc("recentSlot"),T.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:T.struct([T.u32("instruction")])},ExtendLookupTable:{index:2,layout:T.struct([T.u32("instruction"),wc(),T.seq(Pe(),T.offset(T.u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:T.struct([T.u32("instruction")])},CloseLookupTable:{index:4,layout:T.struct([T.u32("instruction")])}});new Ie("AddressLookupTab1e1111111111111111111111111");Object.freeze({RequestUnits:{index:0,layout:T.struct([T.u8("instruction"),T.u32("units"),T.u32("additionalFee")])},RequestHeapFrame:{index:1,layout:T.struct([T.u8("instruction"),T.u32("bytes")])},SetComputeUnitLimit:{index:2,layout:T.struct([T.u8("instruction"),T.u32("units")])},SetComputeUnitPrice:{index:3,layout:T.struct([T.u8("instruction"),wc("microLamports")])}});new Ie("ComputeBudget111111111111111111111111111111");T.struct([T.u8("numSignatures"),T.u8("padding"),T.u16("signatureOffset"),T.u16("signatureInstructionIndex"),T.u16("publicKeyOffset"),T.u16("publicKeyInstructionIndex"),T.u16("messageDataOffset"),T.u16("messageDataSize"),T.u16("messageInstructionIndex")]);new Ie("Ed25519SigVerify111111111111111111111111111");pn.utils.isValidPrivateKey;pn.getPublicKey;T.struct([T.u8("numSignatures"),T.u16("signatureOffset"),T.u8("signatureInstructionIndex"),T.u16("ethAddressOffset"),T.u8("ethAddressInstructionIndex"),T.u16("messageDataOffset"),T.u16("messageDataSize"),T.u8("messageInstructionIndex"),T.blob(20,"ethAddress"),T.blob(64,"signature"),T.u8("recoveryId")]);new Ie("KeccakSecp256k11111111111111111111111111111");var Z5;new Ie("StakeConfig11111111111111111111111111111111");var ol=class{constructor(t,r,o){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=t,this.epoch=r,this.custodian=o;}};Z5=ol;ol.default=new Z5(0,0,Ie.default);Object.freeze({Initialize:{index:0,layout:T.struct([T.u32("instruction"),WU(),KU()])},Authorize:{index:1,layout:T.struct([T.u32("instruction"),Pe("newAuthorized"),T.u32("stakeAuthorizationType")])},Delegate:{index:2,layout:T.struct([T.u32("instruction")])},Split:{index:3,layout:T.struct([T.u32("instruction"),T.ns64("lamports")])},Withdraw:{index:4,layout:T.struct([T.u32("instruction"),T.ns64("lamports")])},Deactivate:{index:5,layout:T.struct([T.u32("instruction")])},Merge:{index:7,layout:T.struct([T.u32("instruction")])},AuthorizeWithSeed:{index:8,layout:T.struct([T.u32("instruction"),Pe("newAuthorized"),T.u32("stakeAuthorizationType"),vc("authoritySeed"),Pe("authorityOwner")])}});new Ie("Stake11111111111111111111111111111111111111");Object.freeze({InitializeAccount:{index:0,layout:T.struct([T.u32("instruction"),JU()])},Authorize:{index:1,layout:T.struct([T.u32("instruction"),Pe("newAuthorized"),T.u32("voteAuthorizationType")])},Withdraw:{index:3,layout:T.struct([T.u32("instruction"),T.ns64("lamports")])},UpdateValidatorIdentity:{index:4,layout:T.struct([T.u32("instruction")])},AuthorizeWithSeed:{index:10,layout:T.struct([T.u32("instruction"),YU()])}});new Ie("Vote111111111111111111111111111111111111111");new Ie("Va1idator1nfo111111111111111111111111111111");q({name:re(),website:pe(re()),details:pe(re()),iconUrl:pe(re()),keybaseUsername:pe(re())});new Ie("Vote111111111111111111111111111111111111111");T.struct([Pe("nodePubkey"),Pe("authorizedWithdrawer"),T.u8("commission"),T.nu64(),T.seq(T.struct([T.nu64("slot"),T.u32("confirmationCount")]),T.offset(T.u32(),-8),"votes"),T.u8("rootSlotValid"),T.nu64("rootSlot"),T.nu64(),T.seq(T.struct([T.nu64("epoch"),Pe("authorizedVoter")]),T.offset(T.u32(),-8),"authorizedVoters"),T.struct([T.seq(T.struct([Pe("authorizedPubkey"),T.nu64("epochOfLastAuthorizedSwitch"),T.nu64("targetEpoch")]),32,"buf"),T.nu64("idx"),T.u8("isEmpty")],"priorVoters"),T.nu64(),T.seq(T.struct([T.nu64("epoch"),T.nu64("credits"),T.nu64("prevCredits")]),T.offset(T.u32(),-8),"epochCredits"),T.struct([T.nu64("slot"),T.nu64("timestamp")],"lastTimestamp")]);var G5=e=>({request:e,signMessage:t=>e({method:"signMessage",params:{message:t}}),signTransaction:t=>e({method:"signTransaction",params:{transaction:t}}),signAndSendTransaction:t=>e({method:"signAndSendTransaction",params:t})});function q5(e){return Buffer.from(e.serialize({verifySignatures:false})).toString("base64")}function B9(e){let t=Buffer.from(e,"base64");return Cm.deserializeMessageVersion(t)==="legacy"?Om.deserialize(t):Xe.from(t)}function W5(e){return async r=>{if(r.method==="connect")return await e(r);if(r.method==="signMessage")return await e(r);if(r.method==="signAndSendTransaction"){let{transaction:o}=r.params,n={transaction:q5(o)};return await e({method:"signAndSendTransaction",params:n})}if(r.method==="signTransaction"){let{transaction:o}=r.params,n={transaction:q5(o)},{signedTransaction:i}=await e({method:"signTransaction",params:n});return {signedTransaction:B9(i)}}}}var K5=({miniAppHost:e,emitter:t})=>{let r,o=null;return {visible:false,get onback(){return o},set onback(n){o&&t.removeListener("backNavigationTriggered",o),o=n,n&&t.addListener("backNavigationTriggered",n);},async show(){await e.updateBackState({visible:true}),this.visible=true;},async hide(){await e.updateBackState({visible:false}),this.visible=false;},async enableWebNavigation(){r=C9({back:this,emitter:t});},async disableWebNavigation(){r?.(),r=void 0;}}};function C9({emitter:e,back:t}){let r=z9();if(r)return L9({emitter:e,back:t,navigation:r});if(typeof window<"u")return U9({emitter:e,back:t,window})}function z9(){if(typeof window<"u"&&window.navigation!==void 0)return window.navigation}function L9({emitter:e,back:t,navigation:r}){function o(){r.canGoBack?t.show():t.hide();}function n(){t.visible&&r.canGoBack&&r.back();}return r.addEventListener("navigatesuccess",o),e.addListener("backNavigationTriggered",n),()=>{r.removeEventListener("navigatesuccess",o),e.removeListener("backNavigationTriggered",n);}}function U9({emitter:e,back:t,window:r}){t.show();function o(){t.visible&&r.history.back();}return e.addListener("backNavigationTriggered",o),()=>{e.removeListener("backNavigationTriggered",o);}}var J5="0.1.1";function Y5(){return J5}var Um=class e extends Error{constructor(t,r={}){let o=(()=>{if(r.cause instanceof e){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause?.message?r.cause.message:r.details})(),n=r.cause instanceof e&&r.cause.docsPath||r.docsPath,s=`https://oxlib.sh${n??""}`,a=[t||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...o||n?["",o?`Details: ${o}`:void 0,n?`See: ${s}`:void 0]:[]].filter(c=>typeof c=="string").join(`
|
|
43
|
-
`);super(a,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docs",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:true,configurable:true,writable:true,value:`ox@${Y5()}`}),this.cause=r.cause,this.details=o,this.docs=s,this.docsPath=n,this.shortMessage=t;}walk(t){return X5(this,t)}};function X5(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?X5(e.cause,t):t?null:e}function Mm(e,t={}){let{raw:r=false}=t,o=e;if(r)return e;if(o.error){let{code:n}=o.error,i=n===xa.code?xa:n===il.code?il:n===ml.code?ml:n===dl.code?dl:n===fl.code?fl:n===pl.code?pl:n===ul.code?ul:n===hl.code?hl:n===sl.code?sl:n===al.code?al:n===cl.code?cl:n===ll.code?ll:hr;throw new i(o.error)}return o.result}var hr=class extends Error{constructor(t){let{code:r,message:o,data:n}=t;super(o),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.BaseError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),this.code=r,this.data=n;}},il=class e extends hr{constructor(t={}){super({message:"Missing or invalid parameters.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32e3}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.InvalidInputError"});}};Object.defineProperty(il,"code",{enumerable:true,configurable:true,writable:true,value:-32e3});var sl=class e extends hr{constructor(t={}){super({message:"Requested resource not found.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32001}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.ResourceNotFoundError"});}};Object.defineProperty(sl,"code",{enumerable:true,configurable:true,writable:true,value:-32001});var al=class e extends hr{constructor(t={}){super({message:"Requested resource not available.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32002}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.ResourceUnavailableError"});}};Object.defineProperty(al,"code",{enumerable:true,configurable:true,writable:true,value:-32002});var cl=class e extends hr{constructor(t={}){super({message:"Transaction creation failed.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32003}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.TransactionRejectedError"});}};Object.defineProperty(cl,"code",{enumerable:true,configurable:true,writable:true,value:-32003});var ul=class e extends hr{constructor(t={}){super({message:"Method is not implemented.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32004}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.MethodNotSupportedError"});}};Object.defineProperty(ul,"code",{enumerable:true,configurable:true,writable:true,value:-32004});var fl=class e extends hr{constructor(t={}){super({message:"Rate limit exceeded.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32005}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.LimitExceededError"});}};Object.defineProperty(fl,"code",{enumerable:true,configurable:true,writable:true,value:-32005});var ll=class e extends hr{constructor(t={}){super({message:"JSON-RPC version not supported.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32006}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.VersionNotSupportedError"});}};Object.defineProperty(ll,"code",{enumerable:true,configurable:true,writable:true,value:-32006});var dl=class e extends hr{constructor(t={}){super({message:"Input is not a valid JSON-RPC request.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32600}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.InvalidRequestError"});}};Object.defineProperty(dl,"code",{enumerable:true,configurable:true,writable:true,value:-32600});var pl=class e extends hr{constructor(t={}){super({message:"Method does not exist.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32601}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.MethodNotFoundError"});}};Object.defineProperty(pl,"code",{enumerable:true,configurable:true,writable:true,value:-32601});var ml=class e extends hr{constructor(t={}){super({message:"Invalid method parameters.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32602}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.InvalidParamsError"});}};Object.defineProperty(ml,"code",{enumerable:true,configurable:true,writable:true,value:-32602});var xa=class e extends hr{constructor(t={}){super({message:"Internal JSON-RPC error.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32603}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.InternalErrorError"});}};Object.defineProperty(xa,"code",{enumerable:true,configurable:true,writable:true,value:-32603});var hl=class e extends hr{constructor(t={}){super({message:"Failed to parse JSON-RPC response.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32700}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.ParseError"});}};Object.defineProperty(hl,"code",{enumerable:true,configurable:true,writable:true,value:-32700});var ko=class extends Error{constructor(t,r){super(r),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"ProviderRpcError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),this.code=t,this.details=r;}},gl=class extends ko{constructor({message:t="The user rejected the request."}={}){super(4001,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.UserRejectedRequestError"});}};Object.defineProperty(gl,"code",{enumerable:true,configurable:true,writable:true,value:4001});var yl=class extends ko{constructor({message:t="The requested method and/or account has not been authorized by the user."}={}){super(4100,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.UnauthorizedError"});}};Object.defineProperty(yl,"code",{enumerable:true,configurable:true,writable:true,value:4100});var bl=class extends ko{constructor({message:t="The provider does not support the requested method."}={}){super(4200,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.UnsupportedMethodError"});}};Object.defineProperty(bl,"code",{enumerable:true,configurable:true,writable:true,value:4200});var xl=class extends ko{constructor({message:t="The provider is disconnected from all chains."}={}){super(4900,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.DisconnectedError"});}};Object.defineProperty(xl,"code",{enumerable:true,configurable:true,writable:true,value:4900});var vl=class extends ko{constructor({message:t="The provider is not connected to the requested chain."}={}){super(4901,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.ChainDisconnectedError"});}};Object.defineProperty(vl,"code",{enumerable:true,configurable:true,writable:true,value:4901});function eA(){let e=new qf.default;return {get eventNames(){return e.eventNames.bind(e)},get listenerCount(){return e.listenerCount.bind(e)},get listeners(){return e.listeners.bind(e)},addListener:e.addListener.bind(e),emit:e.emit.bind(e),off:e.off.bind(e),on:e.on.bind(e),once:e.once.bind(e),removeAllListeners:e.removeAllListeners.bind(e),removeListener:e.removeListener.bind(e)}}function tA(e,t={}){let{includeEvents:r=true}=t;if(!e)throw new Zx;return {...r?{on:e.on?.bind(e),removeListener:e.removeListener?.bind(e)}:{},async request(o){let n=await e.request(o);return n&&typeof n=="object"&&"jsonrpc"in n?Mm(n):n}}}var Zx=class extends Um{constructor(){super("`provider` is undefined."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.IsUndefinedError"});}};function rA(e={}){let t=e.id??0;return {prepare(r){return j9({id:t++,...r})},get id(){return t}}}function j9(e){return {...e,jsonrpc:"2.0"}}var oA=Symbol("Comlink.proxy"),H9=Symbol("Comlink.endpoint"),V9=Symbol("Comlink.releaseProxy"),Gx=Symbol("Comlink.finalizer"),jm=Symbol("Comlink.thrown"),iA=e=>typeof e=="object"&&e!==null||typeof e=="function",Z9={canHandle:e=>iA(e)&&e[oA],serialize(e){let{port1:t,port2:r}=new MessageChannel;return aA(e,t),[r,[r]]},deserialize(e){return e.start(),Wx(e)}},G9={canHandle:e=>iA(e)&&jm in e,serialize({value:e}){let t;return e instanceof Error?t={isError:true,value:{message:e.message,name:e.name,stack:e.stack}}:t={isError:false,value:e},[t,[]]},deserialize(e){throw e.isError?Object.assign(new Error(e.value.message),e.value):e.value}},sA=new Map([["proxy",Z9],["throw",G9]]);function q9(e,t){for(let r of e)if(t===r||r==="*"||r instanceof RegExp&&r.test(t))return true;return false}function aA(e,t=globalThis,r=["*"]){t.addEventListener("message",function o(n){if(!n||!n.data)return;if(!q9(r,n.origin)){console.warn(`Invalid origin '${n.origin}' for comlink proxy`);return}let{id:i,type:s,path:a}=Object.assign({path:[]},n.data),c=(n.data.argumentList||[]).map(va),u;try{let l=a.slice(0,-1).reduce((g,h)=>g[h],e),d=a.reduce((g,h)=>g[h],e);switch(s){case "GET":u=d;break;case "SET":l[a.slice(-1)[0]]=va(n.data.value),u=!0;break;case "APPLY":u=d.apply(l,c);break;case "CONSTRUCT":{let g=new d(...c);u=Q9(g);}break;case "ENDPOINT":{let{port1:g,port2:h}=new MessageChannel;aA(e,h),u=X9(g,[g]);}break;case "RELEASE":u=void 0;break;default:return}}catch(l){u={value:l,[jm]:0};}Promise.resolve(u).catch(l=>({value:l,[jm]:0})).then(l=>{let[d,g]=Vm(l);t.postMessage(Object.assign(Object.assign({},d),{id:i}),g),s==="RELEASE"&&(t.removeEventListener("message",o),cA(t),Gx in e&&typeof e[Gx]=="function"&&e[Gx]());}).catch(l=>{let[d,g]=Vm({value:new TypeError("Unserializable return value"),[jm]:0});t.postMessage(Object.assign(Object.assign({},d),{id:i}),g);});}),t.start&&t.start();}function W9(e){return e.constructor.name==="MessagePort"}function cA(e){W9(e)&&e.close();}function Wx(e,t){let r=new Map;return e.addEventListener("message",function(n){let{data:i}=n;if(!i||!i.id)return;let s=r.get(i.id);if(s)try{s(i);}finally{r.delete(i.id);}}),qx(e,r,[],t)}function Dm(e){if(e)throw new Error("Proxy has been released and is not useable")}function uA(e){return Ic(e,new Map,{type:"RELEASE"}).then(()=>{cA(e);})}var Fm=new WeakMap,Hm="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{let t=(Fm.get(e)||0)-1;Fm.set(e,t),t===0&&uA(e);});function K9(e,t){let r=(Fm.get(t)||0)+1;Fm.set(t,r),Hm&&Hm.register(e,t,e);}function J9(e){Hm&&Hm.unregister(e);}function qx(e,t,r=[],o=function(){}){let n=false,i=new Proxy(o,{get(s,a){if(Dm(n),a===V9)return ()=>{J9(i),uA(e),t.clear(),n=true;};if(a==="then"){if(r.length===0)return {then:()=>i};let c=Ic(e,t,{type:"GET",path:r.map(u=>u.toString())}).then(va);return c.then.bind(c)}return qx(e,t,[...r,a])},set(s,a,c){Dm(n);let[u,l]=Vm(c);return Ic(e,t,{type:"SET",path:[...r,a].map(d=>d.toString()),value:u},l).then(va)},apply(s,a,c){Dm(n);let u=r[r.length-1];if(u===H9)return Ic(e,t,{type:"ENDPOINT"}).then(va);if(u==="bind")return qx(e,t,r.slice(0,-1));let[l,d]=nA(c);return Ic(e,t,{type:"APPLY",path:r.map(g=>g.toString()),argumentList:l},d).then(va)},construct(s,a){Dm(n);let[c,u]=nA(a);return Ic(e,t,{type:"CONSTRUCT",path:r.map(l=>l.toString()),argumentList:c},u).then(va)}});return K9(i,e),i}function Y9(e){return Array.prototype.concat.apply([],e)}function nA(e){let t=e.map(Vm);return [t.map(r=>r[0]),Y9(t.map(r=>r[1]))]}var fA=new WeakMap;function X9(e,t){return fA.set(e,t),e}function Q9(e){return Object.assign(e,{[oA]:true})}function lA(e,t=globalThis,r="*"){return {postMessage:(o,n)=>e.postMessage(o,r,n),addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}function Vm(e){for(let[t,r]of sA)if(r.canHandle(e)){let[o,n]=r.serialize(e);return [{type:"HANDLER",name:t,value:o},n]}return [{type:"RAW",value:e},fA.get(e)||[]]}function va(e){switch(e.type){case "HANDLER":return sA.get(e.name).deserialize(e.value);case "RAW":return e.value}}function Ic(e,t,r,o){return new Promise(n=>{let i=eM();t.set(i,n),e.start&&e.start(),e.postMessage(Object.assign({id:i},r),o);})}function eM(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var tM={postMessage(){},addEventListener:()=>{},removeEventListener:()=>{}},rM={postMessage:e=>{window.ReactNativeWebView.postMessage(JSON.stringify(e));},addEventListener:(e,t,...r)=>{document.addEventListener("FarcasterFrameCallback",t,...r);},removeEventListener:(e,t)=>{document.removeEventListener("FarcasterFrameCallback",t);}},dA=typeof window>"u"?tM:window?.ReactNativeWebView?rM:lA(window?.parent??window);var xe=Wx(dA);var Kx=eA(),nM=rA();function oM({code:e,details:t}){switch(e){case 4001:return new gl;case 4100:return new yl;case 4200:return new bl;case 4900:return new xl;case 4901:return new vl;default:return new ko(e,t??"Unknown provider RPC error")}}var Ac=tA({...Kx,async request(e){let t=nM.prepare(e);try{let r=await xe.ethProviderRequestV2(t).then(o=>Mm(o,{request:t,raw:!0}));if(r.error)throw oM(r.error);return r.result}catch(r){if(r instanceof Error&&r.message.match(/cannot read property 'apply'/i))return await xe.ethProviderRequest(t);throw r instanceof ko||r instanceof hr?r:new xa({message:r instanceof Error?r.message:void 0})}}});async function pA(){try{let e=await xe.getCapabilities();return !e.includes("wallet.getEthereumProvider")&&!e.includes("wallet.getEvmProvider")?void 0:Ac}catch{return Ac}}function mA(e){let t=new CustomEvent("eip6963:announceProvider",{detail:Object.freeze(e)});window.dispatchEvent(t);let r=()=>window.dispatchEvent(t);return window.addEventListener("eip6963:requestProvider",r),()=>window.removeEventListener("eip6963:requestProvider",r)}typeof document<"u"&&(document.addEventListener("eip6963:requestProvider",()=>{xe.eip6963RequestProvider();}),document.addEventListener("FarcasterFrameEthProviderEvent",e=>{if(e instanceof MessageEvent){let t=e.data;Kx.emit(t.event,...t.params);}}),document.addEventListener("FarcasterFrameEvent",e=>{if(e instanceof MessageEvent){let t=e.data;t.event==="eip6963:announceProvider"&&mA({info:t.info,provider:Ac});}}));typeof window<"u"&&(window.addEventListener("eip6963:requestProvider",()=>{xe.eip6963RequestProvider();}),window.addEventListener("message",e=>{if(e instanceof MessageEvent&&e.data.type==="frameEthProviderEvent"){let t=e.data;Kx.emit(t.event,...t.params);}}),window.addEventListener("message",e=>{if(e instanceof MessageEvent&&e.data.type==="frameEvent"){let t=e.data.event;t.event==="eip6963:announceProvider"&&mA({info:t.info,provider:Ac});}}));new TextEncoder;var Zm=new TextDecoder;var sM=e=>{let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r},hA=e=>{let t=e;t instanceof Uint8Array&&(t=Zm.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return sM(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}};var gA=hA;function cM(e){return typeof e=="object"&&e!==null}function Jx(e){if(!cM(e)||Object.prototype.toString.call(e)!=="[object Object]")return false;if(Object.getPrototypeOf(e)===null)return true;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}var gr=class extends Error{constructor(t,r){super(t,r),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor);}};gr.code="ERR_JOSE_GENERIC";var Yx=class extends gr{constructor(t,r,o="unspecified",n="unspecified"){super(t,{cause:{claim:o,reason:n,payload:r}}),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=o,this.reason=n,this.payload=r;}};Yx.code="ERR_JWT_CLAIM_VALIDATION_FAILED";var Xx=class extends gr{constructor(t,r,o="unspecified",n="unspecified"){super(t,{cause:{claim:o,reason:n,payload:r}}),this.code="ERR_JWT_EXPIRED",this.claim=o,this.reason=n,this.payload=r;}};Xx.code="ERR_JWT_EXPIRED";var Qx=class extends gr{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED";}};Qx.code="ERR_JOSE_ALG_NOT_ALLOWED";var e1=class extends gr{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED";}};e1.code="ERR_JOSE_NOT_SUPPORTED";var t1=class extends gr{constructor(t="decryption operation failed",r){super(t,r),this.code="ERR_JWE_DECRYPTION_FAILED";}};t1.code="ERR_JWE_DECRYPTION_FAILED";var r1=class extends gr{constructor(){super(...arguments),this.code="ERR_JWE_INVALID";}};r1.code="ERR_JWE_INVALID";var n1=class extends gr{constructor(){super(...arguments),this.code="ERR_JWS_INVALID";}};n1.code="ERR_JWS_INVALID";var to=class extends gr{constructor(){super(...arguments),this.code="ERR_JWT_INVALID";}};to.code="ERR_JWT_INVALID";var o1=class extends gr{constructor(){super(...arguments),this.code="ERR_JWK_INVALID";}};o1.code="ERR_JWK_INVALID";var i1=class extends gr{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID";}};i1.code="ERR_JWKS_INVALID";var s1=class extends gr{constructor(t="no applicable key found in the JSON Web Key Set",r){super(t,r),this.code="ERR_JWKS_NO_MATCHING_KEY";}};s1.code="ERR_JWKS_NO_MATCHING_KEY";var a1=class extends gr{constructor(t="multiple matching keys found in the JSON Web Key Set",r){super(t,r),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";}};a1.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";var c1=class extends gr{constructor(t="request timed out",r){super(t,r),this.code="ERR_JWKS_TIMEOUT";}};c1.code="ERR_JWKS_TIMEOUT";var u1=class extends gr{constructor(t="signature verification failed",r){super(t,r),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";}};u1.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";function yA(e){if(typeof e!="string")throw new to("JWTs must use Compact JWS serialization, JWT must be a string");let{1:t,length:r}=e.split(".");if(r===5)throw new to("Only JWTs using Compact JWS serialization can be decoded");if(r!==3)throw new to("Invalid JWT");if(!t)throw new to("JWTs must contain a payload");let o;try{o=gA(t);}catch{throw new to("Failed to base64url decode the payload")}let n;try{n=JSON.parse(Zm.decode(o));}catch{throw new to("Failed to parse the decoded payload as JSON")}if(!Jx(n))throw new to("Invalid JWT Claims Set");return n}function bA(e){return yA(e)}var Gm=class e extends Error{constructor(t,r={}){let o=(()=>{if(r.cause instanceof e){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause&&"details"in r.cause&&typeof r.cause.details=="string"?r.cause.details:r.cause?.message?r.cause.message:r.details})(),n=[t||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...o?["",o?`Details: ${o}`:void 0]:[]].filter(i=>typeof i=="string").join(`
|
|
44
|
-
`);super(n,r.cause?{cause:r.cause}:void 0),this.name="BaseError",this.cause=r.cause,this.details=o,this.shortMessage=t;}},kc=class extends Gm{constructor({status:t}){super(`Request failed with status ${t}`),this.name="RequestFailedError";}},qm=class extends Gm{constructor(t){super(t),this.name="InvalidToken";}};async function xA({origin:e}){let t=await fetch(`${e}/nonce`,{method:"POST"});if(!t.ok)throw new kc({status:t.status});return await t.json()}async function vA({origin:e},t){let r=await fetch(`${e}/verify-siwf`,{method:"POST",headers:new Headers({"Content-Type":"application/json"}),body:JSON.stringify(t)});if(!r.ok)throw new kc({status:r.status});let o=await r.json();if(o.valid===false)throw new qm(o.message??"unknown");return {token:o.token}}function _A(e={}){return {origin:e.origin??"https://auth.farcaster.xyz"}}function wA(e={}){let t=_A(e);return {generateNonce:()=>xA(t),verifySiwf:r=>vA(t,r)}}var uM=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,fM=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;function EA(e){let{scheme:t,statement:r,...o}=e.match(uM)?.groups??{},{chainId:n,expirationTime:i,issuedAt:s,notBefore:a,requestId:c,...u}=e.match(fM)?.groups??{},l=e.split("Resources:")[1]?.split(`
|
|
45
|
-
- `).slice(1);return {...o,...u,...n?{chainId:Number(n)}:{},...i?{expirationTime:new Date(i)}:{},...s?{issuedAt:new Date(s)}:{},...a?{notBefore:new Date(a)}:{},...c?{requestId:c}:{},...l?{resources:l}:{},...t?{scheme:t}:{},...r?{statement:r}:{}}}var Wm=(()=>{let e,t;async function r(o){let n=wA({origin:o.quickAuthServerOrigin}),{nonce:i}=await n.generateNonce(),s=await xe.signIn({nonce:i,acceptAuthAddress:true});if(s.result){let a=EA(s.result.message);if(!a.domain)throw new Error("Missing domain on SIWE message");let c=await n.verifySiwf({domain:a.domain,message:s.result.message,signature:s.result.signature});return e={token:c.token,payload:bA(c.token)},c}throw s.error.type==="rejected_by_user"?new Wa.RejectedByUser:new Error("Unreachable")}return {get token(){if(e&&new Date(e.payload.exp*1e3)>new Date(Date.now()+15e3))return e.token},async getToken(o={}){let n=o.force??false;return e&&!n&&new Date(e.payload.exp*1e3)>new Date(Date.now()+15e3)?{token:e.token}:(t||(t=r(o)),t.finally(()=>{t=void 0;}),t)},async fetch(o,n){let{token:i}=await this.getToken(),s=new Headers(n?.headers);return s.set("Authorization",`Bearer ${i}`),fetch(o,{...n,headers:s})}}})();function pM(){let e=new QI;return {get eventNames(){return e.eventNames.bind(e)},get listenerCount(){return e.listenerCount.bind(e)},get listeners(){return e.listeners.bind(e)},addListener:e.addListener.bind(e),emit:e.emit.bind(e),off:e.off.bind(e),on:e.on.bind(e),once:e.once.bind(e),removeAllListeners:e.removeAllListeners.bind(e),removeListener:e.removeListener.bind(e)}}var yr=pM();var{solanaProviderRequest:SA}=xe,IA;SA&&(IA=G5(W5(SA)));async function f1(){let e;try{e=await xe.getCapabilities();}catch{}if(e?.includes("wallet.getSolanaProvider"))return IA}var AA=null;async function mM(e=1e3){if(AA===true)return true;if(typeof window>"u"||!window.ReactNativeWebView&&window===window.parent)return false;let t=await Promise.race([xe.context.then(r=>!!r),new Promise(r=>{setTimeout(()=>r(false),e);})]).catch(()=>false);return t&&(AA=true),t}var kA=async()=>{let e=await xe.addFrame();if(e.result)return e.result;throw e.error.type==="invalid_domain_manifest"?new bf.InvalidDomainManifest:e.error.type==="rejected_by_user"?new bf.RejectedByUser:new Error("Unreachable")},RA={...yr,getCapabilities:xe.getCapabilities,getChains:xe.getChains,isInMiniApp:mM,context:xe.context,back:K5({miniAppHost:xe,emitter:yr}),quickAuth:Wm,actions:{setPrimaryButton:xe.setPrimaryButton.bind(xe),ready:async(e={})=>await xe.ready(e),close:xe.close.bind(xe),viewCast:xe.viewCast.bind(xe),viewProfile:xe.viewProfile.bind(xe),openMiniApp:xe.openMiniApp.bind(xe),signIn:async e=>{let t=await xe.signIn({...e,acceptAuthAddress:e.acceptAuthAddress??true});if(t.result)return t.result;throw t.error.type==="rejected_by_user"?new Wa.RejectedByUser:new Error("Unreachable")},openUrl:e=>{let t=typeof e=="string"?e:e.url;return xe.openUrl(t.trim())},addFrame:kA,addMiniApp:kA,composeCast(e={}){return xe.composeCast(e)},viewToken:xe.viewToken.bind(xe),sendToken:xe.sendToken.bind(xe),swapToken:xe.swapToken.bind(xe),requestCameraAndMicrophoneAccess:xe.requestCameraAndMicrophoneAccess.bind(xe)},experimental:{getSolanaProvider:f1,signManifest:async e=>{let t=await xe.signManifest(e);if(t.result)return t.result;throw t.error.type==="rejected_by_user"?new Ka.RejectedByUser:t.error.type==="invalid_domain"?new Ka.InvalidDomain:t.error.type==="generic_error"?new Ka.GenericError(t.error.message):new Error("Unreachable")},quickAuth(e){return Wm.getToken(e)}},wallet:{ethProvider:Ac,getEthereumProvider:pA,getSolanaProvider:f1},haptics:{impactOccurred:xe.impactOccurred.bind(xe),notificationOccurred:xe.notificationOccurred.bind(xe),selectionChanged:xe.selectionChanged.bind(xe)}};typeof document<"u"&&document.addEventListener("FarcasterFrameEvent",e=>{if(e instanceof MessageEvent){let t=e.data;t.event==="primary_button_clicked"?yr.emit("primaryButtonClicked"):t.event==="miniapp_added"?yr.emit("miniAppAdded",{notificationDetails:t.notificationDetails}):t.event==="miniapp_add_rejected"?yr.emit("miniAppAddRejected",{reason:t.reason}):t.event==="miniapp_removed"?yr.emit("miniAppRemoved"):t.event==="notifications_enabled"?yr.emit("notificationsEnabled",{notificationDetails:t.notificationDetails}):t.event==="notifications_disabled"?yr.emit("notificationsDisabled"):t.event==="back_navigation_triggered"&&yr.emit("backNavigationTriggered");}});typeof window<"u"&&window.addEventListener("message",e=>{if(e instanceof MessageEvent&&e.data.type==="frameEvent"){let t=e.data.event;t.event==="primary_button_clicked"?yr.emit("primaryButtonClicked"):t.event==="miniapp_added"?yr.emit("miniAppAdded",{notificationDetails:t.notificationDetails}):t.event==="miniapp_add_rejected"?yr.emit("miniAppAddRejected",{reason:t.reason}):t.event==="miniapp_removed"?yr.emit("miniAppRemoved"):t.event==="notifications_enabled"?yr.emit("notificationsEnabled",{notificationDetails:t.notificationDetails}):t.event==="notifications_disabled"?yr.emit("notificationsDisabled"):t.event==="back_navigation_triggered"&&yr.emit("backNavigationTriggered");}});var Qi=RA;Nc();function ie(e,t,r){let o=e[t.name];if(typeof o=="function")return o;let n=e[r];return typeof n=="function"?n:i=>t(e,i)}xt();Oe();var gh=class extends M{constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"});}};_r();ao();Zl();pi();ci();cs();var _k="/docs/contract/encodeEventTopics";function Oo(e){let{abi:t,eventName:r,args:o}=e,n=t[0];if(r){let c=nn({abi:t,name:r});if(!c)throw new Dl(r,{docsPath:_k});n=c;}if(n.type!=="event")throw new Dl(void 0,{docsPath:_k});let i=[];if(o&&"inputs"in n){let c=n.inputs?.filter(l=>"indexed"in l&&l.indexed),u=Array.isArray(o)?o:Object.values(o).length>0?c?.map(l=>o[l.name])??[]:[];u.length>0&&(i=c?.map((l,d)=>Array.isArray(u[d])?u[d].map((g,h)=>wk({param:l,value:u[d][h]})):typeof u[d]<"u"&&u[d]!==null?wk({param:l,value:u[d]}):null)??[]);}if(n.anonymous)return i;let s=er(n);return [is(s),...i]}function wk({param:e,value:t}){if(e.type==="string"||e.type==="bytes")return Ke(Nn(t));if(e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/))throw new gh(e.type);return Vr([e],[t])}Re();function us(e,{method:t}){let r={};return e.transport.type==="fallback"&&e.transport.onResponse?.(({method:o,response:n,status:i,transport:s})=>{i==="success"&&t===o&&(r[n]=s.request);}),(o=>r[o]||e.request)}async function Ih(e,t){let{address:r,abi:o,args:n,eventName:i,fromBlock:s,strict:a,toBlock:c}=t,u=us(e,{method:"eth_newFilter"}),l=i?Oo({abi:o,args:n,eventName:i}):void 0,d=await e.request({method:"eth_newFilter",params:[{address:r,fromBlock:typeof s=="bigint"?Y(s):s,toBlock:typeof c=="bigint"?Y(c):c,topics:l}]});return {abi:o,args:n,eventName:i,id:d,request:u(d),strict:!!a,type:"event"}}bn();Cn();xt();Oe();fs();Ia();Yl();var rD=3;function fo(e,{abi:t,address:r,args:o,docsPath:n,functionName:i,sender:s}){let a=e instanceof Po?e:e instanceof M?e.walk(v=>"data"in v)||e.walk():{},{code:c,data:u,details:l,message:d,shortMessage:g}=a,h=e instanceof On?new jh({functionName:i,cause:e}):[rD,hi.code].includes(c)&&(u||l||d||g)||c===Ln.code&&l==="execution reverted"&&u?new Sa({abi:t,data:typeof u=="object"?u.data:u,functionName:i,message:a instanceof ls?l:g??d,cause:e}):e;return new Wc(h,{abi:t,args:o,contractAddress:r,docsPath:n,functionName:i,sender:s})}bn();Oe();di();ao();function Mk(e){let t=Ke(`0x${e.substring(4)}`).substring(26);return ss(`0x${t}`)}oo();Qr();xr();Re();async function jk({hash:e,signature:t}){let r=vt(e)?e:lt(e),{secp256k1:o}=await Promise.resolve().then(()=>(Qf(),b5));return `0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){let{r:u,s:l,v:d,yParity:g}=t,h=Number(g??d),v=Dk(h);return new o.Signature(ft(u),ft(l)).addRecoveryBit(v)}let s=vt(t)?t:lt(t);if(Te(s)!==65)throw new Error("invalid signature length");let a=Yt(`0x${s.slice(130)}`),c=Dk(a);return o.Signature.fromCompact(s.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(r.substring(2)).toHex(false)}`}function Dk(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function Xl({hash:e,signature:t}){return Mk(await jk({hash:e,signature:t}))}tn();_r();Re();Oe();Th();_r();Re();function lo(e,t="hex"){let r=Fk(e),o=jc(new Uint8Array(r.length));return r.encode(o),t==="hex"?Le(o.bytes):o.bytes}function Fk(e){return Array.isArray(e)?nD(e.map(t=>Fk(t))):oD(e)}function nD(e){let t=e.reduce((n,i)=>n+i.length,0),r=Hk(t);return {length:t<=55?1+t:1+r+t,encode(n){t<=55?n.pushByte(192+t):(n.pushByte(247+r),r===1?n.pushUint8(t):r===2?n.pushUint16(t):r===3?n.pushUint24(t):n.pushUint32(t));for(let{encode:i}of e)i(n);}}}function oD(e){let t=typeof e=="string"?vr(e):e,r=Hk(t.length);return {length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(n){t.length===1&&t[0]<128?n.pushBytes(t):t.length<=55?(n.pushByte(128+t.length),n.pushBytes(t)):(n.pushByte(183+r),r===1?n.pushUint8(t.length):r===2?n.pushUint16(t.length):r===3?n.pushUint24(t.length):n.pushUint32(t.length),n.pushBytes(t));}}}function Hk(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new M("Length is too large.")}ao();function Vk(e){let{chainId:t,nonce:r,to:o}=e,n=e.contractAddress??e.address,i=Ke(ar(["0x05",lo([t?Y(t):"0x",n,r?Y(r):"0x"])]));return o==="bytes"?vr(i):i}async function Vh(e){let{authorization:t,signature:r}=e;return Xl({hash:Vk(t),signature:r??t})}Re();Nh();Vc();Oe();co();var Zh=class extends M{constructor(t,{account:r,docsPath:o,chain:n,data:i,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:l,to:d,value:g}){let h=wa({from:r?.address,to:d,value:typeof g<"u"&&`${Hc(g)} ${n?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:s,gasPrice:typeof a<"u"&&`${tr(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${tr(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${tr(u)} gwei`,nonce:l});super(t.shortMessage,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",h].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),this.cause=t;}};ps();Ql();function Zk(e,{docsPath:t,...r}){let o=(()=>{let n=ms(e,r);return n instanceof Mn?e:n})();return new Zh(o,{docsPath:t,...r})}ed();Iu();qh();Ra();bn();Vc();Oe();var Ru=class extends M{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"});}},gs=class extends M{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"});}},Wh=class extends M{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${tr(t)} gwei).`,{name:"MaxFeePerGasTooLowError"});}};xr();Oe();var Tu=class extends M{constructor({blockHash:t,blockNumber:r}){let o="Block";t&&(o=`Block at hash "${t}"`),r&&(o=`Block at number "${r}"`),super(`${o} could not be found.`,{name:"BlockNotFoundError"});}};Re();Gh();xr();Gh();var L1={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function yi(e,t){let r={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,...e.blockTimestamp!=null&&{blockTimestamp:BigInt(e.blockTimestamp)},chainId:e.chainId?Yt(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?Yt(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?L1[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(r.authorizationList=cD(e.authorizationList)),r.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof r.v=="bigint"){if(r.v===0n||r.v===27n)return 0;if(r.v===1n||r.v===28n)return 1;if(r.v>=35n)return r.v%2n===0n?1:0}})(),r.type==="legacy"&&(delete r.accessList,delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas,delete r.yParity),r.type==="eip2930"&&(delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas),r.type==="eip1559"&&delete r.maxFeePerBlobGas,r}var qk=Su("transaction",yi);function cD(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function td(e,t){let r=(e.transactions??[]).map(o=>typeof o=="string"?o:yi(o));return {...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:r,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}var Wk=Su("block",td);async function cr(e,{blockHash:t,blockNumber:r,blockTag:o=e.experimental_blockTag??"latest",includeTransactions:n}={}){let i=n??false,s=r!==void 0?Y(r):void 0,a=null;if(t?a=await e.request({method:"eth_getBlockByHash",params:[t,i]},{dedupe:true}):a=await e.request({method:"eth_getBlockByNumber",params:[s||o,i]},{dedupe:!!s}),!a)throw new Tu({blockHash:t,blockNumber:r});return (e.chain?.formatters?.block?.format||td)(a,"getBlock")}async function $u(e){let t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function Kk(e,t){return U1(e,t)}async function U1(e,t){let{block:r,chain:o=e.chain,request:n}=t||{};try{let i=o?.fees?.maxPriorityFeePerGas??o?.fees?.defaultPriorityFee;if(typeof i=="function"){let a=r||await ie(e,cr,"getBlock")({}),c=await i({block:a,client:e,request:n});if(c===null)throw new Error;return c}if(typeof i<"u")return i;let s=await e.request({method:"eth_maxPriorityFeePerGas"});return ft(s)}catch{let[i,s]=await Promise.all([r?Promise.resolve(r):ie(e,cr,"getBlock")({}),ie(e,$u,"getGasPrice")({})]);if(typeof i.baseFeePerGas!="bigint")throw new gs;let a=s-i.baseFeePerGas;return a<0n?0n:a}}async function Jk(e,t){return Kh(e,t)}async function Kh(e,t){let{block:r,chain:o=e.chain,request:n,type:i="eip1559"}=t||{},s=await(async()=>typeof o?.fees?.baseFeeMultiplier=="function"?o.fees.baseFeeMultiplier({block:r,client:e,request:n}):o?.fees?.baseFeeMultiplier??1.2)();if(s<1)throw new Ru;let c=10**(s.toString().split(".")[1]?.length??0),u=g=>g*BigInt(Math.ceil(s*c))/BigInt(c),l=r||await ie(e,cr,"getBlock")({});if(typeof o?.fees?.estimateFeesPerGas=="function"){let g=await o.fees.estimateFeesPerGas({block:r,client:e,multiply:u,request:n,type:i});if(g!==null)return g}if(i==="eip1559"){if(typeof l.baseFeePerGas!="bigint")throw new gs;let g=typeof n?.maxPriorityFeePerGas=="bigint"?n.maxPriorityFeePerGas:await U1(e,{block:l,chain:o,request:n}),h=u(l.baseFeePerGas);return {maxFeePerGas:n?.maxFeePerGas??h+g,maxPriorityFeePerGas:g}}return {gasPrice:n?.gasPrice??u(await ie(e,$u,"getGasPrice")({}))}}Ta();xr();async function Jh(e,{address:t,blockHash:r,blockNumber:o,blockTag:n="latest",requireCanonical:i}){let s=xn({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i}),a=await e.request({method:"eth_getTransactionCount",params:[t,s]},{dedupe:typeof o=="bigint"||r!==void 0});return Yt(a)}_r();Re();function Ou(e){let{kzg:t}=e,r=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),o=typeof e.blobs[0]=="string"?e.blobs.map(i=>vr(i)):e.blobs,n=[];for(let i of o)n.push(Uint8Array.from(t.blobToKzgCommitment(i)));return r==="bytes"?n:n.map(i=>Le(i))}_r();Re();function Nu(e){let{kzg:t}=e,r=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),o=typeof e.blobs[0]=="string"?e.blobs.map(s=>vr(s)):e.blobs,n=typeof e.commitments[0]=="string"?e.commitments.map(s=>vr(s)):e.commitments,i=[];for(let s=0;s<o.length;s++){let a=o[s],c=n[s];i.push(Uint8Array.from(t.computeBlobKzgProof(a,c)));}return r==="bytes"?i:i.map(s=>Le(s))}Re();oo();_r();Re();function Yk(e,t){let r=t,o=Bf(vt(e,{strict:false})?Nn(e):e);return r==="bytes"?o:lt(o)}function Xk(e){let{commitment:t,version:r=1}=e,o=e.to??(typeof t=="string"?"hex":"bytes"),n=Yk(t,"bytes");return n.set([r],0),o==="bytes"?n:Le(n)}function Yh(e){let{commitments:t,version:r}=e,o=e.to??(typeof t[0]=="string"?"hex":"bytes"),n=[];for(let i of t)n.push(Xk({commitment:i,to:o,version:r}));return n}Oe();var Xh=class extends M{constructor({maxSize:t,size:r}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${r} bytes`],name:"BlobSizeTooLargeError"});}},Pu=class extends M{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"});}},Qh=class extends M{constructor({hash:t,size:r}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${r}`],name:"InvalidVersionedHashSizeError"});}},e0=class extends M{constructor({hash:t,version:r}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${1}`,`Received: ${r}`],name:"InvalidVersionedHashVersionError"});}};Th();Qr();_r();Re();function Qk(e){let t=e.to??(typeof e.data=="string"?"hex":"bytes"),r=typeof e.data=="string"?vr(e.data):e.data,o=Te(r);if(!o)throw new Pu;if(o>761855)throw new Xh({maxSize:761855,size:o});let n=[],i=true,s=0;for(;i;){let a=jc(new Uint8Array(131072)),c=0;for(;c<4096;){let u=r.slice(s,s+31);if(a.pushByte(0),a.pushBytes(u),u.length<31){a.pushByte(128),i=false;break}c++,s+=31;}n.push(a);}return t==="bytes"?n.map(a=>a.bytes):n.map(a=>Le(a.bytes))}function t0(e){let{data:t,kzg:r,to:o}=e,n=e.blobs??Qk({data:t,to:o}),i=e.commitments??Ou({blobs:n,kzg:r,to:o}),s=e.proofs??Nu({blobs:n,commitments:i,kzg:r,to:o}),a=[];for(let c=0;c<n.length;c++)a.push({blob:n[c],commitment:i[c],proof:s[c]});return a}Gl();Ra();co();function r0(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return "eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return "eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return "eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new zh({transaction:e})}bn();ps();co();Ql();function eR(e,{docsPath:t,...r}){let o=(()=>{let n=ms(e,r);return n instanceof Mn?e:n})();return new Uh(o,{docsPath:t,...r})}ed();Iu();Ra();xr();async function Bu(e){let t=await e.request({method:"eth_chainId"},{dedupe:true});return Yt(t)}async function n0(e,t){let{account:r=e.account,accessList:o,authorizationList:n,chain:i=e.chain,blobVersionedHashes:s,blobs:a,data:c,gas:u,gasPrice:l,maxFeePerBlobGas:d,maxFeePerGas:g,maxPriorityFeePerGas:h,nonce:v,nonceManager:E,to:R,type:$,value:P,...O}=t,I=await(async()=>{if(!r||!E||typeof v<"u")return v;let F=nt(r),W=i?i.id:await ie(e,Bu,"getChainId")({});return await E.consume({address:F.address,chainId:W,client:e})})();Dn(t);let N=i?.formatters?.transactionRequest?.format,z=(N||Co)({...hs(O,{format:N}),account:r?nt(r):void 0,accessList:o,authorizationList:n,blobs:a,blobVersionedHashes:s,data:c,gas:u,gasPrice:l,maxFeePerBlobGas:d,maxFeePerGas:g,maxPriorityFeePerGas:h,nonce:I,to:R,type:$,value:P},"fillTransaction");try{let F=await e.request({method:"eth_fillTransaction",params:[z]}),V=(i?.formatters?.transaction?.format||yi)(F.tx);delete V.blockHash,delete V.blockNumber,delete V.r,delete V.s,delete V.transactionIndex,delete V.v,delete V.yParity,V.data=V.input,V.gas&&(V.gas=t.gas??V.gas),V.gasPrice&&(V.gasPrice=t.gasPrice??V.gasPrice),V.maxFeePerBlobGas&&(V.maxFeePerBlobGas=t.maxFeePerBlobGas??V.maxFeePerBlobGas),V.maxFeePerGas&&(V.maxFeePerGas=t.maxFeePerGas??V.maxFeePerGas),V.maxPriorityFeePerGas&&(V.maxPriorityFeePerGas=t.maxPriorityFeePerGas??V.maxPriorityFeePerGas),typeof V.nonce<"u"&&(V.nonce=t.nonce??V.nonce);let G=await(async()=>{if(typeof i?.fees?.baseFeeMultiplier=="function"){let m=await ie(e,cr,"getBlock")({});return i.fees.baseFeeMultiplier({block:m,client:e,request:t})}return i?.fees?.baseFeeMultiplier??1.2})();if(G<1)throw new Ru;let S=10**(G.toString().split(".")[1]?.length??0),f=m=>m*BigInt(Math.ceil(G*S))/BigInt(S);return V.feePayerSignature||(V.maxFeePerGas&&!t.maxFeePerGas&&(V.maxFeePerGas=f(V.maxFeePerGas)),V.gasPrice&&!t.gasPrice&&(V.gasPrice=f(V.gasPrice))),{raw:F.raw,transaction:{from:z.from,...V},...F.capabilities?{capabilities:F.capabilities}:{}}}catch(F){throw eR(F,{...t,chain:e.chain})}}var lD=["blobVersionedHashes","chainId","fees","gas","nonce","type"],tR=new Map,M1=new To(128);async function o0(e,t){let r=t;r.account??=e.account,r.parameters??=lD;let{account:o,chain:n=e.chain,nonceManager:i,parameters:s}=r,a=(()=>{if(typeof n?.prepareTransactionRequest=="function")return {fn:n.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(n?.prepareTransactionRequest))return {fn:n.prepareTransactionRequest[0],runAt:n.prepareTransactionRequest[1].runAt}})(),c;async function u(){return c||(typeof r.chainId<"u"?r.chainId:n?n.id:(c=await ie(e,Bu,"getChainId")({}),c))}let l=o&&nt(o),d=r.nonce;if(s.includes("nonce")&&typeof d>"u"&&l&&i){let I=await u();d=await i.consume({address:l.address,chainId:I,client:e});}a?.fn&&a.runAt?.includes("beforeFillTransaction")&&(r=await a.fn({...r,chain:n},{phase:"beforeFillTransaction"}),d??=r.nonce);let h=((s.includes("blobVersionedHashes")||s.includes("sidecars"))&&r.kzg&&r.blobs||M1.get(e.uid)===false||!["fees","gas"].some(N=>s.includes(N))?false:!!(s.includes("chainId")&&typeof r.chainId!="number"||s.includes("nonce")&&typeof d!="number"||s.includes("fees")&&typeof r.gasPrice!="bigint"&&(typeof r.maxFeePerGas!="bigint"||typeof r.maxPriorityFeePerGas!="bigint")||s.includes("gas")&&typeof r.gas!="bigint"))?await ie(e,n0,"fillTransaction")({...r,nonce:d}).then(I=>{let{chainId:N,from:C,gas:z,gasPrice:F,nonce:W,maxFeePerBlobGas:V,maxFeePerGas:G,maxPriorityFeePerGas:ne,type:S,...f}=I.transaction;return M1.set(e.uid,true),{...r,...C?{from:C}:{},...S&&!r.type?{type:S}:{},...typeof N<"u"?{chainId:N}:{},...typeof z<"u"?{gas:z}:{},...typeof F<"u"?{gasPrice:F}:{},...typeof W<"u"?{nonce:W}:{},...typeof V<"u"&&r.type!=="legacy"&&r.type!=="eip2930"?{maxFeePerBlobGas:V}:{},...typeof G<"u"&&r.type!=="legacy"&&r.type!=="eip2930"?{maxFeePerGas:G}:{},...typeof ne<"u"&&r.type!=="legacy"&&r.type!=="eip2930"?{maxPriorityFeePerGas:ne}:{},..."nonceKey"in f&&typeof f.nonceKey<"u"?{nonceKey:f.nonceKey}:{},..."keyAuthorization"in f&&typeof f.keyAuthorization<"u"&&f.keyAuthorization!==null&&!("keyAuthorization"in r)?{keyAuthorization:f.keyAuthorization}:{},..."feePayerSignature"in f&&typeof f.feePayerSignature<"u"&&f.feePayerSignature!==null?{feePayerSignature:f.feePayerSignature}:{},..."feeToken"in f&&typeof f.feeToken<"u"&&f.feeToken!==null&&!("feeToken"in r)?{feeToken:f.feeToken}:{},...I.capabilities?{_capabilities:I.capabilities}:{}}}).catch(I=>{let N=I;if(N.name!=="TransactionExecutionError")return r;if(N.walk?.(F=>F.name==="ExecutionRevertedError"))throw I;return N.walk?.(F=>{let W=F;return W.name==="MethodNotFoundRpcError"||W.name==="MethodNotSupportedRpcError"||W.message?.includes("eth_fillTransaction is not available")})&&M1.set(e.uid,false),r}):r;d??=h.nonce,r={...h,...l?{from:l?.address}:{},...typeof d<"u"?{nonce:d}:{}};let{blobs:v,gas:E,kzg:R,type:$}=r;a?.fn&&a.runAt?.includes("beforeFillParameters")&&(r=await a.fn({...r,chain:n},{phase:"beforeFillParameters"}));let P;async function O(){return P||(P=await ie(e,cr,"getBlock")({blockTag:"latest"}),P)}if(s.includes("nonce")&&typeof d>"u"&&l&&!i&&(r.nonce=await ie(e,Jh,"getTransactionCount")({address:l.address,blockTag:"pending"})),(s.includes("blobVersionedHashes")||s.includes("sidecars"))&&v&&R){let I=Ou({blobs:v,kzg:R});if(s.includes("blobVersionedHashes")){let N=Yh({commitments:I,to:"hex"});r.blobVersionedHashes=N;}if(s.includes("sidecars")){let N=Nu({blobs:v,commitments:I,kzg:R}),C=t0({blobs:v,commitments:I,proofs:N,to:"hex"});r.sidecars=C;}}if(s.includes("chainId")&&(r.chainId=await u()),(s.includes("fees")||s.includes("type"))&&typeof $>"u")try{r.type=r0(r);}catch{let I=tR.get(e.uid);typeof I>"u"&&(I=typeof(await O())?.baseFeePerGas=="bigint",tR.set(e.uid,I)),r.type=I?"eip1559":"legacy";}if(s.includes("fees"))if(r.type!=="legacy"&&r.type!=="eip2930"){if(typeof r.maxFeePerGas>"u"||typeof r.maxPriorityFeePerGas>"u"){let I=await O(),{maxFeePerGas:N,maxPriorityFeePerGas:C}=await Kh(e,{block:I,chain:n,request:r});if(typeof r.maxPriorityFeePerGas>"u"&&r.maxFeePerGas&&r.maxFeePerGas<C)throw new Wh({maxPriorityFeePerGas:C});r.maxPriorityFeePerGas=C,r.maxFeePerGas=N;}}else {if(typeof r.maxFeePerGas<"u"||typeof r.maxPriorityFeePerGas<"u")throw new gs;if(typeof r.gasPrice>"u"){let I=await O(),{gasPrice:N}=await Kh(e,{block:I,chain:n,request:r,type:"legacy"});r.gasPrice=N;}}return s.includes("gas")&&typeof E>"u"&&(r.gas=await ie(e,Cu,"estimateGas")({...r,account:l,prepare:l?.type==="local"?[]:["blobVersionedHashes"]})),a?.fn&&a.runAt?.includes("afterFillParameters")&&(r=await a.fn({...r,chain:n},{phase:"afterFillParameters"})),Dn(r),delete r.parameters,r}async function Cu(e,t){let{account:r=e.account,prepare:o=true}=t,n=r?nt(r):void 0,i=(()=>{if(Array.isArray(o))return o;if(n?.type!=="local")return ["blobVersionedHashes"]})();try{let s=await(async()=>{if(t.to)return t.to;if(t.authorizationList&&t.authorizationList.length>0)return await Vh({authorization:t.authorizationList[0]}).catch(()=>{throw new M("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:a,authorizationList:c,blobs:u,blobVersionedHashes:l,blockNumber:d,blockTag:g,data:h,gas:v,gasPrice:E,maxFeePerBlobGas:R,maxFeePerGas:$,maxPriorityFeePerGas:P,nonce:O,value:I,stateOverride:N,...C}=o?await o0(e,{...t,parameters:i,to:s}):t;if(v&&t.gas!==v)return v;let F=(typeof d=="bigint"?Y(d):void 0)||g,W=Au(N);Dn(t);let V=e.chain?.formatters?.transactionRequest?.format,ne=(V||Co)({...hs(C,{format:V}),account:n,accessList:a,authorizationList:c,blobs:u,blobVersionedHashes:l,data:h,gasPrice:E,maxFeePerBlobGas:R,maxFeePerGas:$,maxPriorityFeePerGas:P,nonce:O,to:s,value:I},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:W?[ne,F??e.experimental_blockTag??"latest",W]:F?[ne,F]:[ne]}))}catch(s){throw Zk(s,{...t,account:n,chain:e.chain})}}async function rR(e,t){let{abi:r,address:o,args:n,functionName:i,dataSuffix:s=typeof e.dataSuffix=="string"?e.dataSuffix:e.dataSuffix?.value,...a}=t,c=dt({abi:r,args:n,functionName:i});try{return await ie(e,Cu,"estimateGas")({data:`${c}${s?s.replace("0x",""):""}`,to:o,...a})}catch(u){let l=a.account?nt(a.account):void 0;throw fo(u,{abi:r,address:o,args:n,docsPath:"/docs/contract/estimateContractGas",functionName:i,sender:l?.address})}}cs();$a();_r();function ur(e,{args:t,eventName:r}={}){return {...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...r?{args:t,eventName:r}:{}}}ao();Zl();xt();T1();Qr();Zl();Kl();ci();var nR="/docs/contract/decodeEventLog";function Oa(e){let{abi:t,data:r,strict:o,topics:n}=e,i=o??true,[s,...a]=n;if(!s)throw new uh({docsPath:nR});let c=t.find($=>$.type==="event"&&s===is(er($)));if(!(c&&"name"in c)||c.type!=="event")throw new fh(s,{docsPath:nR});let{name:u,inputs:l}=c,d=l?.some($=>!("name"in $&&$.name)),g=d?[]:{},h=l.map(($,P)=>[$,P]).filter(([$])=>"indexed"in $&&$.indexed),v=[];for(let $=0;$<h.length;$++){let[P,O]=h[$],I=a[$];if(!I){if(i)throw new rs({abiItem:c,param:P});v.push([P,O]);continue}g[d?O:P.name||O]=dD({param:P,value:I});}let E=l.filter($=>!("indexed"in $&&$.indexed)),R=i?E:[...v.map(([$])=>$),...E];if(R.length>0){if(r&&r!=="0x")try{let $=mi(R,r);if($){let P=0;if(!i)for(let[O,I]of v)g[d?I:O.name||I]=$[P++];if(d)for(let O=0;O<l.length;O++)g[O]===void 0&&P<$.length&&(g[O]=$[P++]);else for(let O=0;O<E.length;O++)g[E[O].name]=$[P++];}}catch($){if(i)throw $ instanceof Pc||$ instanceof Dc?new ui({abiItem:c,data:r,params:R,size:Te(r)}):$}else if(i)throw new ui({abiItem:c,data:"0x",params:R,size:0})}return {eventName:u,args:Object.values(g).length>0?g:void 0}}function dD({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(mi([e],t)||[])[0]}function zu(e){let{abi:t,args:r,logs:o,strict:n=true}=e,i=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})(),s=t.filter(a=>a.type==="event").map(a=>({abi:a,selector:is(a)}));return o.map(a=>{let c=typeof a.blockNumber=="string"?ur(a):a,u=s.filter(g=>c.topics[0]===g.selector);if(u.length===0)return null;let l,d;for(let g of u)try{l=Oa({...c,abi:[g.abi],strict:!0}),d=g;break}catch{}if(!l&&!n){d=u[0];try{l=Oa({data:c.data,topics:c.topics,abi:[d.abi],strict:!1});}catch{let g=d.abi.inputs?.some(h=>!("name"in h&&h.name));return {...c,args:g?[]:{},eventName:d.abi.name}}}return !l||!d||i&&!i.includes(l.eventName)||!pD({args:l.args,inputs:d.abi.inputs,matchArgs:r})?null:{...l,...c}}).filter(Boolean)}function pD(e){let{args:t,inputs:r,matchArgs:o}=e;if(!o)return true;if(!t)return false;function n(i,s,a){try{return i.type==="address"?vn(s,a):i.type==="string"||i.type==="bytes"?Ke(Nn(s))===a:s===a}catch{return false}}return Array.isArray(t)&&Array.isArray(o)?o.every((i,s)=>{if(i==null)return true;let a=r[s];return a?(Array.isArray(i)?i:[i]).some(u=>n(a,u,t[s])):false}):typeof t=="object"&&!Array.isArray(t)&&typeof o=="object"&&!Array.isArray(o)?Object.entries(o).every(([i,s])=>{if(s==null)return true;let a=r.find(u=>u.name===i);return a?(Array.isArray(s)?s:[s]).some(u=>n(a,u,t[i])):false}):false}Re();async function Lu(e,{address:t,blockHash:r,fromBlock:o,toBlock:n,event:i,events:s,args:a,strict:c}={}){let u=c??false,l=s??(i?[i]:void 0),d=[];l&&(d=[l.flatMap(E=>Oo({abi:[E],eventName:E.name,args:s?void 0:a}))],i&&(d=d[0]));let g;r?g=await e.request({method:"eth_getLogs",params:[{address:t,topics:d,blockHash:r}]}):g=await e.request({method:"eth_getLogs",params:[{address:t,topics:d,fromBlock:typeof o=="bigint"?Y(o):o,toBlock:typeof n=="bigint"?Y(n):n}]});let h=g.map(v=>ur(v));return l?zu({abi:l,args:a,logs:h,strict:u}):h}async function i0(e,t){let{abi:r,address:o,args:n,blockHash:i,eventName:s,fromBlock:a,toBlock:c,strict:u}=t,l=s?nn({abi:r,name:s}):void 0,d=l?void 0:r.filter(g=>g.type==="event");return ie(e,Lu,"getLogs")({address:o,args:n,blockHash:i,event:l,events:d,fromBlock:a,toBlock:c,strict:u})}bi();Cn();za();async function Xt(e,t){let{abi:r,address:o,args:n,functionName:i,...s}=t,a=dt({abi:r,args:n,functionName:i});try{let{data:c}=await ie(e,Hn,"call")({...s,data:a,to:o});return Lr({abi:r,args:n,functionName:i,data:c||"0x"})}catch(c){throw fo(c,{abi:r,address:o,args:n,docsPath:"/docs/contract/readContract",functionName:i})}}bn();bi();Cn();za();async function GR(e,t){let{abi:r,address:o,args:n,functionName:i,dataSuffix:s=typeof e.dataSuffix=="string"?e.dataSuffix:e.dataSuffix?.value,...a}=t,c=a.account?nt(a.account):e.account,u=dt({abi:r,args:n,functionName:i});try{let{data:l}=await ie(e,Hn,"call")({batch:!1,data:`${u}${s?s.replace("0x",""):""}`,to:o,...a,account:c}),d=Lr({abi:r,args:n,functionName:i,data:l||"0x"}),g=r.filter(h=>"name"in h&&h.name===t.functionName);return {result:d,request:{abi:g,address:o,args:n,dataSuffix:s,functionName:i,...a,account:c}}}catch(l){throw fo(l,{abi:r,address:o,args:n,docsPath:"/docs/contract/simulateContract",functionName:i,sender:c?.address})}}xt();Yl();var A0=new Map,fv=new Map,zD=0;function cn(e,t,r){let o=++zD,n=()=>A0.get(e)||[],i=()=>{let d=n().filter(g=>g.id!==o);if(d.length===0){A0.delete(e),fv.delete(e);return}A0.set(e,d);},s=()=>{let l=n();if(!l.some(g=>g.id===o))return;let d=fv.get(e);if(l.length===1&&d){let g=d();g instanceof Promise&&g.catch(()=>{});}i();},a=n();if(A0.set(e,[...a,{id:o,fns:t}]),a&&a.length>0)return s;let c={};for(let l in t)c[l]=((...d)=>{let g=n();if(g.length!==0)for(let h of g)h.fns[l]?.(...d);});let u=r(c);return typeof u=="function"&&fv.set(e,u),s}uo();async function ld(e,{signal:t}={}){return new Promise((r,o)=>{if(t?.aborted){o(Er(t));return}let n=()=>t?.removeEventListener("abort",s),i=setTimeout(()=>{n(),r();},e),s=()=>{clearTimeout(i),n(),o(Er(t));};t?.addEventListener("abort",s,{once:true});})}function Mo(e,{emitOnBegin:t,initialWaitTime:r,interval:o}){let n=true,i=()=>n=false;return (async()=>{let a;t&&(a=await e({unpoll:i}));let c=await r?.(a)??o;await ld(c);let u=async()=>{n&&(await e({unpoll:i}),await ld(o),u());};u();})(),i}on();var LD=new Map,UD=new Map;function qR(e){let t=(n,i)=>({clear:()=>i.delete(n),get:()=>i.get(n),set:s=>i.set(n,s)}),r=t(e,LD),o=t(e,UD);return {clear:()=>{r.clear(),o.clear();},promise:r,response:o}}async function WR(e,{cacheKey:t,cacheTime:r=Number.POSITIVE_INFINITY}){let o=qR(t),n=o.response.get();if(n&&r>0&&Date.now()-n.created.getTime()<r)return n.data;let i=o.promise.get();i||(i=e(),o.promise.set(i));try{let s=await i;return o.response.set({created:new Date,data:s}),s}finally{o.promise.clear();}}var MD=e=>`blockNumber.${e}`;async function Do(e,{cacheTime:t=e.cacheTime}={}){let r=await WR(()=>e.request({method:"eth_blockNumber"}),{cacheKey:MD(e.uid),cacheTime:t});return BigInt(r)}async function xs(e,{filter:t}){let r="strict"in t&&t.strict,o=await t.request({method:"eth_getFilterChanges",params:[t.id]});if(typeof o[0]=="string")return o;let n=o.map(i=>ur(i));return !("abi"in t)||!t.abi?n:zu({abi:t.abi,logs:n,strict:r})}async function vs(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}function KR(e,t){let{abi:r,address:o,args:n,batch:i=true,eventName:s,fromBlock:a,onError:c,onLogs:u,poll:l,pollingInterval:d=e.pollingInterval,strict:g}=t;return (typeof l<"u"?l:typeof a=="bigint"?true:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")))?(()=>{let R=g??false,$=je(["watchContractEvent",o,n,i,e.uid,s,d,R,a]);return cn($,{onLogs:u,onError:c},P=>{let O;a!==void 0&&(O=a-1n);let I,N=false,C=Mo(async()=>{if(!N){try{I=await ie(e,Ih,"createContractEventFilter")({abi:r,address:o,args:n,eventName:s,strict:R,fromBlock:a});}catch{}N=true;return}try{let z;if(I)z=await ie(e,xs,"getFilterChanges")({filter:I});else {let F=await ie(e,Do,"getBlockNumber")({});O&&O<F?z=await ie(e,i0,"getContractEvents")({abi:r,address:o,args:n,eventName:s,fromBlock:O+1n,toBlock:F,strict:R}):z=[],O=F;}if(z.length===0)return;if(i)P.onLogs(z);else for(let F of z)P.onLogs([F]);}catch(z){I&&z instanceof Ln&&(N=false),P.onError?.(z);}},{emitOnBegin:true,interval:d});return async()=>{I&&await ie(e,vs,"uninstallFilter")({filter:I}),C();}})})():(()=>{let R=g??false,$=je(["watchContractEvent",o,n,i,e.uid,s,d,R]),P=true,O=()=>P=false;return cn($,{onLogs:u,onError:c},I=>((async()=>{try{let N=(()=>{if(e.transport.type==="fallback"){let F=e.transport.transports.find(W=>W.config.type==="webSocket"||W.config.type==="ipc");return F?F.value:e.transport}return e.transport})(),C=s?Oo({abi:r,eventName:s,args:n}):[],{unsubscribe:z}=await N.subscribe({params:["logs",{address:o,topics:C}],onData(F){if(!P)return;let W=F.result;try{let{eventName:V,args:G}=Oa({abi:r,data:W.data,topics:W.topics,strict:g}),ne=ur(W,{args:G,eventName:V});I.onLogs([ne]);}catch(V){let G,ne;if(V instanceof ui||V instanceof rs){if(g)return;G=V.abiItem.name,ne=V.abiItem.inputs?.some(f=>!("name"in f&&f.name));}let S=ur(W,{args:ne?[]:{},eventName:G});I.onLogs([S]);}},onError(F){I.onError?.(F);}});O=z,P||O();}catch(N){c?.(N);}})(),()=>O()))})()}async function JR(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}uo();function dd(e,{delay:t=100,retryCount:r=2,shouldRetry:o=()=>true,signal:n}={}){return new Promise((i,s)=>{let a=async({count:c=0}={})=>{if(n?.aborted){s(Er(n));return}let u=async({error:l})=>{let d=typeof t=="function"?t({count:c,error:l}):t;if(d)try{await ld(d,{signal:n});}catch(g){s(g);return}a({count:c+1});};try{let l=await e();i(l);}catch(l){if(n?.aborted){s(Er(n));return}if(sn(l)){s(l);return}if(c<r&&await o({count:c,error:l}))return u({error:l});s(l);}};a();})}xr();Gh();var DD={"0x0":"reverted","0x1":"success"};function pd(e,t){let r={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(o=>ur(o)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Yt(e.transactionIndex):null,status:e.status?DD[e.status]:null,type:e.type?L1[e.type]||e.type:null};return e.blobGasPrice&&(r.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(r.blobGasUsed=BigInt(e.blobGasUsed)),r}var YR=Su("transactionReceipt",pd);bn();var k0=256,R0;function T0(e=11){if(!R0||k0+e>256*2){R0="",k0=0;for(let t=0;t<256;t++)R0+=(256+Math.random()*256|0).toString(16).substring(1);}return R0.substring(k0,k0+++e)}function XR(e){let{batch:t,chain:r,ccipRead:o,dataSuffix:n,key:i="base",name:s="Base Client",type:a="base"}=e,c=e.experimental_blockTag??(typeof r?.experimental_preconfirmationTime=="number"?"pending":void 0),u=r?.blockTime??12e3,l=Math.min(Math.max(Math.floor(u/2),500),4e3),d=e.pollingInterval??l,g=e.cacheTime??d,h=e.account?nt(e.account):void 0,{config:v,request:E,value:R}=e.transport({account:h,chain:r,pollingInterval:d}),$={...v,...R},P={account:h,batch:t,cacheTime:g,ccipRead:o,chain:r,dataSuffix:n,key:i,name:s,pollingInterval:d,request:E,transport:$,type:a,uid:T0(),...c?{experimental_blockTag:c}:{}};function O(I){return N=>{let C=N(I);for(let F in P)delete C[F];let z={...I,...C};return Object.assign(z,{extend:O(z)})}}return Object.assign(P,{extend:O(P)})}_i();bi();Cn();di();Ca();Qr();Lc();Re();Oe();fs();function Zu(e){if(!(e instanceof M))return false;let t=e.walk(r=>r instanceof Sa);return t instanceof Sa?t.data?.errorName==="HttpError"||t.data?.errorName==="ResolverError"||t.data?.errorName==="ResolverNotContract"||t.data?.errorName==="ResolverNotFound"||t.data?.errorName==="ReverseAddressMismatch"||t.data?.errorName==="UnsupportedResolverProfile":false}fd();tn();_r();Re();ao();oo();function $0(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;let t=`0x${e.slice(1,65)}`;return vt(t)?t:null}function md(e){let t=new Uint8Array(32).fill(0);if(!e)return Le(t);let r=e.split(".");for(let o=r.length-1;o>=0;o-=1){let n=$0(r[o]),i=n?Nn(n):Ke(so(r[o]),"bytes");t=Ke(wr([t,i]),"bytes");}return Le(t)}_r();function QR(e){return `[${e.slice(2)}]`}_r();Re();ao();function eT(e){let t=new Uint8Array(32).fill(0);return e?$0(e)||Ke(so(e)):Le(t)}function Gu(e){let t=e.replace(/^\.|\.$/gm,"");if(t.length===0)return new Uint8Array(1);let r=new Uint8Array(so(t).byteLength+2),o=0,n=t.split(".");for(let i=0;i<n.length;i++){let s=so(n[i]);s.byteLength>255&&(s=so(QR(eT(n[i])))),r[o]=s.length,r.set(s,o+1),o+=s.length+1;}return r.byteLength!==o+1?r.slice(0,o+1):r}async function tT(e,t){let{blockNumber:r,blockTag:o,coinType:n,name:i,gatewayUrls:s,strict:a}=t,{chain:c}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Fn({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),l=c?.ensTlds;if(l&&!l.some(g=>i.endsWith(g)))return null;let d=n!=null?[md(i),BigInt(n)]:[md(i)];try{let g=dt({abi:Y1,functionName:"addr",args:d}),h={address:u,abi:y0,functionName:"resolveWithGateways",args:[lt(Gu(i)),g,s??[wi]],blockNumber:r,blockTag:o},E=await ie(e,Xt,"readContract")(h);if(E[0]==="0x")return null;let R=jD({coinType:n,data:E[0],args:d});return R==="0x"||br(R)==="0x00"?null:R}catch(g){if(a)throw g;if(Zu(g))return null;throw g}}function jD({coinType:e,data:t,args:r}){try{return Lr({abi:Y1,args:r,functionName:"addr",data:t})}catch(o){if(e==null)throw o;let n=br(t);if(Te(n)===20)return Pn(n);throw o}}Oe();var O0=class extends M{constructor({data:t}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(t)}`],name:"EnsAvatarInvalidMetadataError"});}},_s=class extends M{constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"});}},qu=class extends M{constructor({uri:t}){super(`Unable to resolve ENS avatar URI "${t}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"});}},N0=class extends M{constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"});}};var FD=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,HD=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,VD=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,ZD=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function GD(e){try{let t=await fetch(e,{method:"HEAD"});return t.status===200?t.headers.get("content-type")?.startsWith("image/"):!1}catch(t){return typeof t=="object"&&typeof t.response<"u"||!Object.hasOwn(globalThis,"Image")?false:new Promise(r=>{let o=new Image;o.onload=()=>{r(true);},o.onerror=()=>{r(false);},o.src=e;})}}function rT(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function lv({uri:e,gatewayUrls:t}){let r=VD.test(e);if(r)return {uri:e,isOnChain:true,isEncoded:r};let o=rT(t?.ipfs,"https://ipfs.io"),n=rT(t?.arweave,"https://arweave.net"),i=e.match(FD),{protocol:s,subpath:a,target:c,subtarget:u=""}=i?.groups||{},l=s==="ipns:/"||a==="ipns/",d=s==="ipfs:/"||a==="ipfs/"||HD.test(e);if(e.startsWith("http")&&!l&&!d){let h=e;return t?.arweave&&(h=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:h,isOnChain:false,isEncoded:false}}if((l||d)&&c)return {uri:`${o}/${l?"ipns":"ipfs"}/${c}${u}`,isOnChain:false,isEncoded:false};if(s==="ar:/"&&c)return {uri:`${n}/${c}${u||""}`,isOnChain:false,isEncoded:false};let g=e.replace(ZD,"");if(g.startsWith("<svg")&&(g=`data:image/svg+xml;base64,${btoa(g)}`),g.startsWith("data:")||g.startsWith("{"))return {uri:g,isOnChain:true,isEncoded:false};throw new qu({uri:e})}function dv(e){if(typeof e!="object"||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new O0({data:e});return e.image||e.image_url||e.image_data}async function nT({gatewayUrls:e,uri:t}){try{let r=await fetch(t).then(n=>n.json());return await P0({gatewayUrls:e,uri:dv(r)})}catch{throw new qu({uri:t})}}async function P0({gatewayUrls:e,uri:t}){let{uri:r,isOnChain:o}=lv({uri:t,gatewayUrls:e});if(o||await GD(r))return r;throw new qu({uri:t})}function oT(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));let[r,o,n]=t.split("/"),[i,s]=r.split(":"),[a,c]=o.split(":");if(!i||i.toLowerCase()!=="eip155")throw new _s({reason:"Only EIP-155 supported"});if(!s)throw new _s({reason:"Chain ID not found"});if(!c)throw new _s({reason:"Contract address not found"});if(!n)throw new _s({reason:"Token ID not found"});if(!a)throw new _s({reason:"ERC namespace not found"});return {chainID:Number.parseInt(s,10),namespace:a.toLowerCase(),contractAddress:c,tokenID:n}}async function iT(e,{nft:t}){if(t.namespace==="erc721")return Xt(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if(t.namespace==="erc1155")return Xt(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new N0({namespace:t.namespace})}async function sT(e,{gatewayUrls:t,record:r}){return /eip155:/i.test(r)?qD(e,{gatewayUrls:t,record:r}):P0({uri:r,gatewayUrls:t})}async function qD(e,{gatewayUrls:t,record:r}){let o=oT(r),n=await iT(e,{nft:o}),{uri:i,isOnChain:s,isEncoded:a}=lv({uri:n,gatewayUrls:t});if(s&&(i.includes("data:application/json;base64,")||i.startsWith("{"))){let u=a?atob(i.replace("data:application/json;base64,","")):i,l=JSON.parse(u);return P0({uri:dv(l),gatewayUrls:t})}let c=o.tokenID;return o.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),nT({gatewayUrls:t,uri:i.replace(/(?:0x)?{id}/,c)})}_i();bi();Cn();Ca();Re();fd();async function B0(e,t){let{blockNumber:r,blockTag:o,key:n,name:i,gatewayUrls:s,strict:a}=t,{chain:c}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Fn({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),l=c?.ensTlds;if(l&&!l.some(d=>i.endsWith(d)))return null;try{let d={address:u,abi:y0,args:[lt(Gu(i)),dt({abi:J1,functionName:"text",args:[md(i),n]}),s??[wi]],functionName:"resolveWithGateways",blockNumber:r,blockTag:o},h=await ie(e,Xt,"readContract")(d);if(h[0]==="0x")return null;let v=Lr({abi:J1,functionName:"text",data:h[0]});return v===""?null:v}catch(d){if(a)throw d;if(Zu(d))return null;throw d}}async function aT(e,{blockNumber:t,blockTag:r,assetGatewayUrls:o,name:n,gatewayUrls:i,strict:s,universalResolverAddress:a}){let c=await ie(e,B0,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:n,universalResolverAddress:a,gatewayUrls:i,strict:s});if(!c)return null;try{return await sT(e,{record:c,gatewayUrls:o})}catch{return null}}_i();Ca();fd();async function cT(e,t){let{address:r,blockNumber:o,blockTag:n,coinType:i=60n,gatewayUrls:s,strict:a}=t,{chain:c}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return Fn({blockNumber:o,chain:c,contract:"ensUniversalResolver"})})();try{let l={address:u,abi:RR,args:[r,i,s??[wi]],functionName:"reverseWithGateways",blockNumber:o,blockTag:n},d=ie(e,Xt,"readContract"),[g]=await d(l);return g||null}catch(l){if(a)throw l;if(Zu(l))return null;throw l}}Ca();Re();async function uT(e,t){let{blockNumber:r,blockTag:o,name:n}=t,{chain:i}=e,s=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!i)throw new Error("client chain not configured. universalResolverAddress is required.");return Fn({blockNumber:r,chain:i,contract:"ensUniversalResolver"})})(),a=i?.ensTlds;if(a&&!a.some(u=>n.endsWith(u)))throw new Error(`${n} is not a valid ENS TLD (${a?.join(", ")}) for chain "${i.name}" (id: ${i.id}).`);let[c]=await ie(e,Xt,"readContract")({address:s,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[lt(Gu(n))],blockNumber:r,blockTag:o});return c}za();bn();Re();rv();ed();Iu();Ra();async function C0(e,t){let{account:r=e.account,blockNumber:o,blockTag:n="latest",blobs:i,data:s,gas:a,gasPrice:c,maxFeePerBlobGas:u,maxFeePerGas:l,maxPriorityFeePerGas:d,to:g,value:h,...v}=t,E=r?nt(r):void 0;try{Dn(t);let $=(typeof o=="bigint"?Y(o):void 0)||n,P=e.chain?.formatters?.transactionRequest?.format,I=(P||Co)({...hs(v,{format:P}),account:E,blobs:i,data:s,gas:a,gasPrice:c,maxFeePerBlobGas:u,maxFeePerGas:l,maxPriorityFeePerGas:d,to:g,value:h},"createAccessList"),N=await e.request({method:"eth_createAccessList",params:[I,$]});return {accessList:N.accessList,gasUsed:BigInt(N.gasUsed)}}catch(R){throw v0(R,{...t,account:E,chain:e.chain})}}async function fT(e){let t=us(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return {id:r,request:t(r),type:"block"}}Re();async function z0(e,{address:t,args:r,event:o,events:n,fromBlock:i,strict:s,toBlock:a}={}){let c=n??(o?[o]:void 0),u=us(e,{method:"eth_newFilter"}),l=[];c&&(l=[c.flatMap(h=>Oo({abi:[h],eventName:h.name,args:r}))],o&&(l=l[0]));let d=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof i=="bigint"?Y(i):i,toBlock:typeof a=="bigint"?Y(a):a,...l.length?{topics:l}:{}}]});return {abi:c,args:r,eventName:o?o.name:void 0,fromBlock:i,id:d,request:u(d),strict:!!s,toBlock:a,type:"event"}}async function L0(e){let t=us(e,{method:"eth_newPendingTransactionFilter"}),r=await e.request({method:"eth_newPendingTransactionFilter"});return {id:r,request:t(r),type:"transaction"}}_i();bi();Cn();Ta();za();async function lT(e,{address:t,blockHash:r,blockNumber:o,blockTag:n=e.experimental_blockTag??"latest",requireCanonical:i}){let s=xn({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i});if(e.batch?.multicall&&e.chain?.contracts?.multicall3){let c=e.chain.contracts.multicall3.address,u=dt({abi:Uo,functionName:"getEthBalance",args:[t]}),{data:l}=await ie(e,Hn,"call")({to:c,data:u,blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i});return Lr({abi:Uo,functionName:"getEthBalance",args:[t],data:l||"0x"})}let a=await e.request({method:"eth_getBalance",params:[t,s]});return BigInt(a)}async function dT(e){let t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}xr();Re();async function pT(e,{blockHash:t,blockNumber:r,blockTag:o="latest"}={}){let n=r!==void 0?Y(r):void 0,i;return t?i=await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:true}):i=await e.request({method:"eth_getBlockTransactionCountByNumber",params:[n||o]},{dedupe:!!n}),Yt(i)}Ta();async function La(e,{address:t,blockHash:r,blockNumber:o,blockTag:n="latest",requireCanonical:i}){let s=xn({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i}),a=await e.request({method:"eth_getCode",params:[t,s]},{dedupe:typeof o=="bigint"||r!==void 0});if(a!=="0x")return a}di();Qr();as();async function mT(e,{address:t,blockNumber:r,blockTag:o="latest"}){let n=await La(e,{address:t,...r!==void 0?{blockNumber:r}:{blockTag:o}});if(n&&Te(n)===23&&n.startsWith("0xef0100"))return Pn(rn(n,3,23))}Oe();var U0=class extends M{constructor({address:t}){super(`No EIP-712 domain found on contract "${t}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${t}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"});}};async function hT(e,t){let{address:r,factory:o,factoryData:n}=t;try{let[i,s,a,c,u,l,d]=await ie(e,Xt,"readContract")({abi:WD,address:r,functionName:"eip712Domain",factory:o,factoryData:n});return {domain:{name:s,version:a,chainId:Number(c),verifyingContract:u,salt:l},extensions:d,fields:i}}catch(i){let s=i;throw s.name==="ContractFunctionExecutionError"&&s.cause.name==="ContractFunctionZeroDataError"?new U0({address:r}):s}}var WD=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];Re();function gT(e){return {baseFeePerGas:e.baseFeePerGas.map(t=>BigInt(t)),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:e.reward?.map(t=>t.map(r=>BigInt(r)))}}async function yT(e,{blockCount:t,blockNumber:r,blockTag:o="latest",rewardPercentiles:n}){let i=typeof r=="bigint"?Y(r):void 0,s=await e.request({method:"eth_feeHistory",params:[Y(t),i||o,n]},{dedupe:!!i});return gT(s)}async function bT(e,{filter:t}){let r=t.strict??false,n=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(i=>ur(i));return t.abi?zu({abi:t.abi,logs:n,strict:r}):n}Ta();Re();co();tn();Lc();Re();z1();Ro();Oe();x0();ps();Bn();Qr();as();xr();function xT(e){let{authorizationList:t}=e;if(t)for(let r of t){let{chainId:o}=r,n=r.address;if(!Ze(n))throw new et({address:n});if(o<0)throw new Ba({chainId:o})}M0(e);}function vT(e){let{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new Pu;for(let r of t){let o=Te(r),n=Yt(rn(r,0,1));if(o!==32)throw new Qh({hash:r,size:o});if(n!==1)throw new e0({hash:r,version:n})}}M0(e);}function M0(e){let{chainId:t,maxPriorityFeePerGas:r,maxFeePerGas:o,to:n}=e;if(t<=0)throw new Ba({chainId:t});if(n&&!Ze(n))throw new et({address:n});if(o&&o>ku)throw new Un({maxFeePerGas:o});if(r&&o&&r>o)throw new Bo({maxFeePerGas:o,maxPriorityFeePerGas:r})}function _T(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:o,maxFeePerGas:n,to:i}=e;if(t<=0)throw new Ba({chainId:t});if(i&&!Ze(i))throw new et({address:i});if(r||n)throw new M("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(o&&o>ku)throw new Un({maxFeePerGas:o})}function wT(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:o,maxFeePerGas:n,to:i}=e;if(i&&!Ze(i))throw new et({address:i});if(typeof t<"u"&&t<=0)throw new Ba({chainId:t});if(r||n)throw new M("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(o&&o>ku)throw new Un({maxFeePerGas:o})}Ro();co();Bn();function hd(e){if(!e||e.length===0)return [];let t=[];for(let r=0;r<e.length;r++){let{address:o,storageKeys:n}=e[r];for(let i=0;i<n.length;i++)if(n[i].length-2!==64)throw new Lh({storageKey:n[i]});if(!Ze(o,{strict:false}))throw new et({address:o});t.push([o,n]);}return t}function ET(e,t){let r=r0(e);return r==="eip1559"?YD(e,t):r==="eip2930"?XD(e,t):r==="eip4844"?JD(e,t):r==="eip7702"?KD(e,t):QD(e,t)}function KD(e,t){let{authorizationList:r,chainId:o,gas:n,nonce:i,to:s,value:a,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:l,data:d}=e;xT(e);let g=hd(l),h=ST(r);return ar(["0x04",lo([Y(o),i?Y(i):"0x",u?Y(u):"0x",c?Y(c):"0x",n?Y(n):"0x",s??"0x",a?Y(a):"0x",d??"0x",g,h,...Wu(e,t)])])}function JD(e,t){let{chainId:r,gas:o,nonce:n,to:i,value:s,maxFeePerBlobGas:a,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:l,data:d}=e;vT(e);let g=e.blobVersionedHashes,h=e.sidecars;if(e.blobs&&(typeof g>"u"||typeof h>"u")){let O=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(C=>Le(C)),I=e.kzg,N=Ou({blobs:O,kzg:I});if(typeof g>"u"&&(g=Yh({commitments:N})),typeof h>"u"){let C=Nu({blobs:O,commitments:N,kzg:I});h=t0({blobs:O,commitments:N,proofs:C});}}let v=hd(l),E=[Y(r),n?Y(n):"0x",u?Y(u):"0x",c?Y(c):"0x",o?Y(o):"0x",i??"0x",s?Y(s):"0x",d??"0x",v,a?Y(a):"0x",g??[],...Wu(e,t)],R=[],$=[],P=[];if(h)for(let O=0;O<h.length;O++){let{blob:I,commitment:N,proof:C}=h[O];R.push(I),$.push(N),P.push(C);}return ar(["0x03",h?lo([E,R,$,P]):lo(E)])}function YD(e,t){let{chainId:r,gas:o,nonce:n,to:i,value:s,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:u,data:l}=e;M0(e);let d=hd(u),g=[Y(r),n?Y(n):"0x",c?Y(c):"0x",a?Y(a):"0x",o?Y(o):"0x",i??"0x",s?Y(s):"0x",l??"0x",d,...Wu(e,t)];return ar(["0x02",lo(g)])}function XD(e,t){let{chainId:r,gas:o,data:n,nonce:i,to:s,value:a,accessList:c,gasPrice:u}=e;_T(e);let l=hd(c),d=[Y(r),i?Y(i):"0x",u?Y(u):"0x",o?Y(o):"0x",s??"0x",a?Y(a):"0x",n??"0x",l,...Wu(e,t)];return ar(["0x01",lo(d)])}function QD(e,t){let{chainId:r=0,gas:o,data:n,nonce:i,to:s,value:a,gasPrice:c}=e;wT(e);let u=[i?Y(i):"0x",c?Y(c):"0x",o?Y(o):"0x",s??"0x",a?Y(a):"0x",n??"0x"];if(t){let l=(()=>{if(t.v>=35n)return (t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(r>0)return BigInt(r*2)+BigInt(35n+t.v-27n);let h=27n+(t.v===27n?0n:1n);if(t.v!==h)throw new Ch({v:t.v});return h})(),d=br(t.r),g=br(t.s);u=[...u,Y(l),d==="0x00"?"0x":d,g==="0x00"?"0x":g];}else r>0&&(u=[...u,Y(r),"0x","0x"]);return lo(u)}function Wu(e,t){let r=t??e,{v:o,yParity:n}=r;if(typeof r.r>"u")return [];if(typeof r.s>"u")return [];if(typeof o>"u"&&typeof n>"u")return [];let i=br(r.r),s=br(r.s);return [typeof n=="number"?n?Y(1):"0x":o===0n?"0x":o===1n?Y(1):o===27n?"0x":Y(1),i==="0x00"?"0x":i,s==="0x00"?"0x":s]}function ST(e){if(!e||e.length===0)return [];let t=[];for(let r of e){let{chainId:o,nonce:n,...i}=r,s=r.address;t.push([o?lt(o):"0x",s,n?lt(n):"0x",...Wu({},i)]);}return t}di();$a();async function IT({address:e,authorization:t,signature:r}){return vn(Pn(e),await Vh({authorization:t,signature:r}))}Oe();Ia();Yl();uo();Gl();var D0=new To(8192);function AT(e,{enabled:t=true,id:r}){if(!t||!r)return e();if(D0.get(r))return D0.get(r);let o=e().finally(()=>D0.delete(r));return D0.set(r,o),o}on();function kT(e,t={}){return async(r,o={})=>{let{dedupe:n=false,methods:i,retryDelay:s=150,retryCount:a=3,signal:c,uid:u}={...t,...o},{method:l}=r;if(i?.exclude?.includes(l))throw new ds(new Error("method not supported"),{method:l});if(i?.include&&!i.include.includes(l))throw new ds(new Error("method not supported"),{method:l});if(c?.aborted)throw Er(c);let d=n?tj(`${u}.${je(r)}`):void 0;return AT(()=>dd(async()=>{try{return await e(r,c?{signal:c}:void 0)}catch(g){if(c?.aborted)throw Er(c);if(sn(g))throw g;let h=g;switch(h.code){case Kc.code:throw new Kc(h);case Jc.code:throw new Jc(h);case Yc.code:throw new Yc(h,{method:r.method});case Xc.code:throw new Xc(h);case hi.code:throw new hi(h);case Ln.code:throw new Ln(h);case Qc.code:throw new Qc(h);case eu.code:throw new eu(h);case tu.code:throw new tu(h);case ds.code:throw new ds(h,{method:r.method});case Aa.code:throw new Aa(h);case ru.code:throw new ru(h);case ka.code:throw new ka(h);case nu.code:throw new nu(h);case ou.code:throw new ou(h);case iu.code:throw new iu(h);case su.code:throw new su(h);case au.code:throw new au(h);case cu.code:throw new cu(h);case uu.code:throw new uu(h);case fu.code:throw new fu(h);case lu.code:throw new lu(h);case du.code:throw new du(h);case pu.code:throw new pu(h);case mu.code:throw new mu(h);case 5e3:throw new ka(h);case hu.code:throw new hu(h);default:throw g instanceof M?g:new Hh(h)}}},{delay:({count:g,error:h})=>{if(h&&h instanceof zn){let v=h?.headers?.get("Retry-After");if(v?.match(/\d/))return Number.parseInt(v,10)*1e3}return ~~(1<<g)*s},retryCount:a,signal:c,shouldRetry:({error:g})=>ej(g)}),{enabled:n,id:d})}}function ej(e){return sn(e)?false:"code"in e&&typeof e.code=="number"?e.code===-1||e.code===Aa.code||e.code===hi.code||e.code===429:e instanceof zn&&e.status?e.status===403||e.status===408||e.status===413||e.status===429||e.status===500||e.status===502||e.status===503||e.status===504:true}function tj(e,t=0){let r=3735928559^t,o=1103547991^t;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);r=Math.imul(r^i,2654435761),o=Math.imul(o^i,1597334677);}return r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(o^o>>>16,3266489909),o=Math.imul(o^o>>>16,2246822507),o^=Math.imul(r^r>>>16,3266489909),(4294967296*(2097151&o)+(r>>>0)).toString(36)}function Ku(e){let t={formatters:void 0,fees:void 0,serializers:void 0,...e};function r(o){return n=>{let i=typeof n=="function"?n(o):n,s={...o,...i};return Object.assign(s,{extend:r(s)})}}return Object.assign(t,{extend:r(t)})}xr();Ia();uo();uo();function RT(e,{errorInstance:t=new Error("timed out"),timeout:r,signal:o}){return new Promise((n,i)=>{(async()=>{let s,a=new AbortController;try{r>0&&(s=setTimeout(()=>{o?a.abort():i(t);},r)),n(await e({signal:a?.signal||null}));}catch(c){if(a?.signal.aborted&&sn(c)){i(t);return}i(c);}finally{clearTimeout(s);}})();})}on();function rj(){return {current:0,take(){return this.current++},reset(){this.current=0;}}}var pv=rj();function TT(e,t={}){let{url:r,headers:o}=nj(e);return {async request(n){let{body:i,fetchFn:s=t.fetchFn??fetch,onRequest:a=t.onRequest,onResponse:c=t.onResponse,timeout:u=t.timeout??1e4}=n,l={...t.fetchOptions??{},...n.fetchOptions??{}},{headers:d,method:g,signal:h}=l;try{let v=await RT(async({signal:R})=>{let $={...l,body:Array.isArray(i)?je(i.map(N=>({jsonrpc:"2.0",id:N.id??pv.take(),...N}))):je({jsonrpc:"2.0",id:i.id??pv.take(),...i}),headers:{...o,"Content-Type":"application/json",...d},method:g||"POST",signal:h||(u>0?R:null)},P=new Request(r,$),O=await a?.(P,$)??{...$,url:r};return await s(O.url??r,O)},{errorInstance:new Jl({body:i,url:r}),timeout:u,signal:!0});c&&await c(v);let E;if(v.headers.get("Content-Type")?.startsWith("application/json"))E=await v.json();else {E=await v.text();try{E=JSON.parse(E||"{}");}catch(R){if(v.ok)throw R;E={error:E};}}if(!v.ok){if(typeof E.error?.code=="number"&&typeof E.error?.message=="string")return E;throw new zn({body:i,details:je(E.error)||v.statusText,headers:v.headers,status:v.status,url:r})}return E}catch(v){throw h?.aborted?Er(h):sn(v)||v instanceof zn||v instanceof Jl?v:new zn({body:i,cause:v,url:r})}}}}function nj(e){try{let t=new URL(e),r=(()=>{if(t.username){let o=`${decodeURIComponent(t.username)}:${decodeURIComponent(t.password)}`;return t.username="",t.password="",{url:t.toString(),headers:{Authorization:`Basic ${btoa(o)}`}}}})();return {url:t.toString(),...r}}catch{return {url:e}}}ao();var $T=`Ethereum Signed Message:
|
|
46
|
-
`;tn();Qr();Re();function OT(e){let t=typeof e=="string"?Uc(e):typeof e.raw=="string"?e.raw:Le(e.raw),r=Uc(`${$T}${Te(t)}`);return wr([r,t])}function j0(e,t){return Ke(OT(e),t)}pi();tn();Re();ao();xt();Ro();on();Oe();var F0=class extends M{constructor({domain:t}){super(`Invalid domain "${je(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]});}},H0=class extends M{constructor({primaryType:t,types:r}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(r))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]});}},V0=class extends M{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"});}};Bn();Qr();Re();I1();function NT(e){let{domain:t,message:r,primaryType:o,types:n}=e,i=(s,a)=>{for(let c of s){let{name:u,type:l}=c,d=a[u],g=l.match(Eh);if(g&&(typeof d=="number"||typeof d=="bigint")){let[E,R,$]=g;Y(d,{signed:R==="int",size:Number.parseInt($,10)/8});}if(l==="address"&&typeof d=="string"&&!Ze(d))throw new et({address:d});let h=l.match(xk);if(h){let[E,R]=h;if(R&&Te(d)!==Number.parseInt(R,10))throw new ph({expectedSize:Number.parseInt(R,10),givenSize:Te(d)})}let v=n[l];v&&(oj(l),i(v,d));}};if(n.EIP712Domain&&t){if(typeof t!="object")throw new F0({domain:t});i(n.EIP712Domain,t);}if(o!=="EIP712Domain")if(n[o])i(n[o],r);else throw new H0({primaryType:o,types:n})}function PT({domain:e}){return [typeof e?.name=="string"&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},(typeof e?.chainId=="number"||typeof e?.chainId=="bigint")&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}function oj(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new V0({type:e})}function BT(e){let{domain:t={},message:r,primaryType:o}=e,n={EIP712Domain:PT({domain:t}),...e.types};NT({domain:t,message:r,primaryType:o,types:n});let i=["0x1901"];return t&&i.push(ij({domain:t,types:n})),o!=="EIP712Domain"&&i.push(CT({data:r,primaryType:o,types:n})),Ke(wr(i))}function ij({domain:e,types:t}){return CT({data:e,primaryType:"EIP712Domain",types:t})}function CT({data:e,primaryType:t,types:r}){let o=zT({data:e,primaryType:t,types:r});return Ke(o)}function zT({data:e,primaryType:t,types:r}){let o=[{type:"bytes32"}],n=[sj({primaryType:t,types:r})];for(let i of r[t]){let[s,a]=UT({types:r,name:i.name,type:i.type,value:e[i.name]});o.push(s),n.push(a);}return Vr(o,n)}function sj({primaryType:e,types:t}){let r=lt(aj({primaryType:e,types:t}));return Ke(r)}function aj({primaryType:e,types:t}){let r="",o=LT({primaryType:e,types:t});o.delete(e);let n=[e,...Array.from(o).sort()];for(let i of n)r+=`${i}(${t[i].map(({name:s,type:a})=>`${a} ${s}`).join(",")})`;return r}function LT({primaryType:e,types:t},r=new Set){let n=e.match(/^\w*/u)?.[0];if(r.has(n)||t[n]===void 0)return r;r.add(n);for(let i of t[n])LT({primaryType:i.type,types:t},r);return r}function UT({types:e,name:t,type:r,value:o}){if(e[r]!==void 0)return [{type:"bytes32"},Ke(zT({data:o,primaryType:r,types:e}))];if(r==="bytes")return [{type:"bytes32"},Ke(o)];if(r==="string")return [{type:"bytes32"},Ke(lt(o))];if(r.lastIndexOf("]")===r.length-1){let n=r.slice(0,r.lastIndexOf("[")),i=o.map(s=>UT({name:t,type:n,types:e,value:s}));return [{type:"bytes32"},Ke(Vr(i.map(([s])=>s),i.map(([,s])=>s)))]}return [{type:r},o]}var wd={};Ir(wd,{InvalidWrappedSignatureError:()=>ig,assert:()=>sg,from:()=>Fj,magicBytes:()=>Mv,suffixParameters:()=>Dv,unwrap:()=>i4,validate:()=>Vj,wrap:()=>Hj});Nc();ys();var Z0=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:true,configurable:true,writable:true,value:void 0}),this.maxSize=t;}get(t){let r=super.get(t);return super.has(t)&&r!==void 0&&(this.delete(t),super.set(t,r)),r}set(t,r){if(super.set(t,r),this.maxSize&&this.size>this.maxSize){let o=this.keys().next().value;o&&this.delete(o);}return this}};var cj={checksum:new Z0(8192)},G0=cj.checksum;an();wm();ys();fr();function Ua(e,t={}){let{as:r=typeof e=="string"?"Hex":"Bytes"}=t,o=ha(yR(e));return r==="Bytes"?o:_t(o)}ys();an();fr();od();function MT(e,t={}){let{compressed:r}=t,{prefix:o,x:n,y:i}=e;if(r===false||typeof n=="bigint"&&typeof i=="bigint"){if(o!==4)throw new q0({prefix:o,cause:new yv});return}if(r===true||typeof n=="bigint"&&typeof i>"u"){if(o!==3&&o!==2)throw new q0({prefix:o,cause:new gv});return}throw new hv({publicKey:e})}function DT(e){let t=(()=>{if(sd(e))return jT(e);if(ER(e))return fj(e);let{prefix:r,x:o,y:n}=e;return typeof o=="bigint"&&typeof n=="bigint"?{prefix:r??4,x:o,y:n}:{prefix:r,x:o}})();return MT(t),t}function fj(e){return jT(_t(e))}function jT(e){if(e.length!==132&&e.length!==130&&e.length!==68)throw new bv({publicKey:e});if(e.length===130){let o=BigInt(ct(e,0,32)),n=BigInt(ct(e,32,64));return {prefix:4,x:o,y:n}}if(e.length===132){let o=Number(ct(e,0,1)),n=BigInt(ct(e,1,33)),i=BigInt(ct(e,33,65));return {prefix:o,x:n,y:i}}let t=Number(ct(e,0,1)),r=BigInt(ct(e,1,33));return {prefix:t,x:r}}function xv(e,t={}){MT(e);let{prefix:r,x:o,y:n}=e,{includePrefix:i=true}=t;return pt(i?Fe(r,{size:1}):"0x",Fe(o,{size:32}),typeof n=="bigint"?Fe(n,{size:32}):"0x")}var hv=class extends de{constructor({publicKey:t}){super(`Value \`${bs(t)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidError"});}},q0=class extends de{constructor({prefix:t,cause:r}){super(`Prefix "${t}" is invalid.`,{cause:r}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidPrefixError"});}},gv=class extends de{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidCompressedPrefixError"});}},yv=class extends de{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidUncompressedPrefixError"});}},bv=class extends de{constructor({publicKey:t}){super(`Value \`${t}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${at(Fu(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidSerializedSizeError"});}};var lj=/^0x[a-fA-F0-9]{40}$/;function Ma(e,t={}){let{strict:r=true}=t;if(!lj.test(e))throw new W0({address:e,cause:new vv});if(r){if(e.toLowerCase()===e)return;if(K0(e)!==e)throw new W0({address:e,cause:new _v})}}function K0(e){if(G0.has(e))return G0.get(e);Ma(e,{strict:false});let t=e.substring(2).toLowerCase(),r=Ua(bR(t),{as:"Bytes"}),o=t.split("");for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&o[i]&&(o[i]=o[i].toUpperCase()),(r[i>>1]&15)>=8&&o[i+1]&&(o[i+1]=o[i+1].toUpperCase());let n=`0x${o.join("")}`;return G0.set(e,n),n}function dj(e,t={}){let{checksum:r=false}=t;return Ma(e),r?K0(e):e}function HT(e,t={}){let r=Ua(`0x${xv(e).slice(4)}`).substring(26);return dj(`0x${r}`,t)}function J0(e,t={}){let{strict:r=true}=t??{};try{return Ma(e,{strict:r}),!0}catch{return false}}var W0=class extends de{constructor({address:t,cause:r}){super(`Address "${t}" is invalid.`,{cause:r}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Address.InvalidAddressError"});}},vv=class extends de{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Address.InvalidInputError"});}},_v=class extends de{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Address.InvalidChecksumError"});}};ys();an();fr();ys();an();fr();var VT=/^(.*)\[([0-9]*)\]$/,ZT=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,X0=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,wv=2n**256n-1n;function Da(e,t,r){let{checksumAddress:o,staticPosition:n}=r,i=Iv(t.type);if(i){let[s,a]=i;return mj(e,{...t,type:a},{checksumAddress:o,length:s,staticPosition:n})}if(t.type==="tuple")return bj(e,t,{checksumAddress:o,staticPosition:n});if(t.type==="address")return pj(e,{checksum:o});if(t.type==="bool")return hj(e);if(t.type.startsWith("bytes"))return gj(e,t,{staticPosition:n});if(t.type.startsWith("uint")||t.type.startsWith("int"))return yj(e,t);if(t.type==="string")return xj(e,{staticPosition:n});throw new Ju(t.type)}var qT=32,Ev=32;function pj(e,t={}){let{checksum:r=false}=t,o=e.readBytes(32);return [(i=>r?K0(i):i)(_t(xR(o,-20))),32]}function mj(e,t,r){let{checksumAddress:o,length:n,staticPosition:i}=r;if(!n){let c=zo(e.readBytes(Ev)),u=i+c,l=u+qT;e.setPosition(u);let d=zo(e.readBytes(qT)),g=gd(t),h=0,v=[];for(let E=0;E<d;++E){e.setPosition(l+(g?E*32:h));let[R,$]=Da(e,t,{checksumAddress:o,staticPosition:l});h+=$,v.push(R);}return e.setPosition(i+32),[v,32]}if(gd(t)){let c=zo(e.readBytes(Ev)),u=i+c,l=[];for(let d=0;d<n;++d){e.setPosition(u+d*32);let[g]=Da(e,t,{checksumAddress:o,staticPosition:u});l.push(g);}return e.setPosition(i+32),[l,32]}let s=0,a=[];for(let c=0;c<n;++c){let[u,l]=Da(e,t,{checksumAddress:o,staticPosition:i+s});s+=l,a.push(u);}return [a,s]}function hj(e){return [_R(e.readBytes(32),{size:32}),32]}function gj(e,t,{staticPosition:r}){let[o,n]=t.type.split("bytes");if(!n){let s=zo(e.readBytes(32));e.setPosition(r+s);let a=zo(e.readBytes(32));if(a===0)return e.setPosition(r+32),["0x",32];let c=e.readBytes(a);return e.setPosition(r+32),[_t(c),32]}return [_t(e.readBytes(Number.parseInt(n,10),32)),32]}function yj(e,t){let r=t.type.startsWith("int"),o=Number.parseInt(t.type.split("int")[1]||"256",10),n=e.readBytes(32);return [o>48?vR(n,{signed:r}):zo(n,{signed:r}),32]}function bj(e,t,r){let{checksumAddress:o,staticPosition:n}=r,i=t.components.length===0||t.components.some(({name:c})=>!c),s=i?[]:{},a=0;if(gd(t)){let c=zo(e.readBytes(Ev)),u=n+c;for(let l=0;l<t.components.length;++l){let d=t.components[l];e.setPosition(u+a);let[g,h]=Da(e,d,{checksumAddress:o,staticPosition:u});a+=h,s[i?l:d?.name]=g;}return e.setPosition(n+32),[s,32]}for(let c=0;c<t.components.length;++c){let u=t.components[c],[l,d]=Da(e,u,{checksumAddress:o,staticPosition:n});s[i?c:u?.name]=l,a+=d;}return [s,a]}function xj(e,{staticPosition:t}){let r=zo(e.readBytes(32)),o=t+r;e.setPosition(o);let n=zo(e.readBytes(32));if(n===0)return e.setPosition(t+32),["",32];let i=e.readBytes(n,32),s=wR(G1(i));return e.setPosition(t+32),[s,32]}function WT({checksumAddress:e,parameters:t,values:r}){let o=[];for(let n=0;n<t.length;n++)o.push(Sv({checksumAddress:e,parameter:t[n],value:r[n]}));return o}function Sv({checksumAddress:e=false,parameter:t,value:r}){let o=t,n=Iv(o.type);if(n){let[i,s]=n;return _j(r,{checksumAddress:e,length:i,parameter:{...o,type:s}})}if(o.type==="tuple")return Aj(r,{checksumAddress:e,parameter:o});if(o.type==="address")return vj(r,{checksum:e});if(o.type==="bool")return Ej(r);if(o.type.startsWith("uint")||o.type.startsWith("int")){let i=o.type.startsWith("int"),[,,s="256"]=X0.exec(o.type)??[];return Sj(r,{signed:i,size:Number(s)})}if(o.type.startsWith("bytes"))return wj(r,{type:o.type});if(o.type==="string")return Ij(r);throw new Ju(o.type)}function Q0(e){let t=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?t+=32:t+=at(a);}let r=[],o=[],n=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?(r.push(Fe(t+n,{size:32})),o.push(a),n+=at(a)):r.push(a);}return pt(...r,...o)}function vj(e,t){let{checksum:r=false}=t;return Ma(e,{strict:r}),{dynamic:false,encoded:vi(e.toLowerCase())}}function _j(e,t){let{checksumAddress:r,length:o,parameter:n}=t,i=o===null;if(!Array.isArray(e))throw new tg(e);if(!i&&e.length!==o)throw new eg({expectedLength:o,givenLength:e.length,type:`${n.type}[${o}]`});let s=false,a=[];for(let c=0;c<e.length;c++){let u=Sv({checksumAddress:r,parameter:n,value:e[c]});u.dynamic&&(s=true),a.push(u);}if(i||s){let c=Q0(a);if(i){let u=Fe(a.length,{size:32});return {dynamic:true,encoded:a.length>0?pt(u,c):u}}if(s)return {dynamic:true,encoded:c}}return {dynamic:false,encoded:pt(...a.map(({encoded:c})=>c))}}function wj(e,{type:t}){let[,r]=t.split("bytes"),o=at(e);if(!r){let n=e;return o%32!==0&&(n=Lo(n,Math.ceil((e.length-2)/2/32)*32)),{dynamic:true,encoded:pt(vi(Fe(o,{size:32})),n)}}if(o!==Number.parseInt(r,10))throw new yd({expectedSize:Number.parseInt(r,10),value:e});return {dynamic:false,encoded:Lo(e)}}function Ej(e){if(typeof e!="boolean")throw new de(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return {dynamic:false,encoded:vi(m0(e))}}function Sj(e,{signed:t,size:r}){if(typeof r=="number"){let o=2n**(BigInt(r)-(t?1n:0n))-1n,n=t?-o-1n:0n;if(e>o||e<n)throw new id({max:o.toString(),min:n.toString(),signed:t,size:r/8,value:e.toString()})}return {dynamic:false,encoded:Fe(e,{size:32,signed:t})}}function Ij(e){let t=Hu(e),r=Math.ceil(at(t)/32),o=[];for(let n=0;n<r;n++)o.push(Lo(ct(t,n*32,(n+1)*32)));return {dynamic:true,encoded:pt(Lo(Fe(at(t),{size:32})),...o)}}function Aj(e,t){let{checksumAddress:r,parameter:o}=t,n=false,i=[];for(let s=0;s<o.components.length;s++){let a=o.components[s],c=Array.isArray(e)?s:a.name,u=Sv({checksumAddress:r,parameter:a,value:e[c]});i.push(u),u.dynamic&&(n=true);}return {dynamic:n,encoded:n?Q0(i):pt(...i.map(({encoded:s})=>s))}}function Iv(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function gd(e){let{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return true;if(t==="tuple")return e.components?.some(gd);let r=Iv(e.type);return !!(r&&gd({...e,type:r[1]}))}an();var Rj={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new kv({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new Av({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new rg({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t;},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new rg({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t;},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++;},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length;},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++;},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2;},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3;},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4;},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++;}};function ng(e,{recursiveReadLimit:t=8192}={}){let r=Object.create(Rj);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}var rg=class extends de{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Cursor.NegativeOffsetError"});}},Av=class extends de{constructor({length:t,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${t}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Cursor.PositionOutOfBoundsError"});}},kv=class extends de{constructor({count:t,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${t}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Cursor.RecursiveReadLimitExceededError"});}};function Yu(e,t,r={}){let{as:o="Array",checksumAddress:n=false}=r,i=typeof t=="string"?ju(t):t,s=ng(i);if(jn(i)===0&&e.length>0)throw new $v;if(jn(i)&&jn(i)<32)throw new Tv({data:typeof t=="string"?t:_t(t),parameters:e,size:jn(i)});let a=0,c=o==="Array"?[]:{};for(let u=0;u<e.length;++u){let l=e[u];s.setPosition(a);let[d,g]=Da(s,l,{checksumAddress:n,staticPosition:0});a+=g,o==="Array"?c.push(d):c[l.name??u]=d;}return c}function ws(e,t,r){let{checksumAddress:o=false}={};if(e.length!==t.length)throw new og({expectedLength:e.length,givenLength:t.length});let n=WT({checksumAddress:o,parameters:e,values:t}),i=Q0(n);return i.length===0?"0x":i}function Rv(e,t){if(e.length!==t.length)throw new og({expectedLength:e.length,givenLength:t.length});let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o];r.push(Rv.encode(n,i));}return pt(...r)}(function(e){function t(r,o,n=false){if(r==="address"){let c=o;return Ma(c),vi(c.toLowerCase(),n?32:0)}if(r==="string")return Hu(o);if(r==="bytes")return o;if(r==="bool")return vi(m0(o),n?32:1);let i=r.match(X0);if(i){let[c,u,l="256"]=i,d=Number.parseInt(l,10)/8;return Fe(o,{size:n?32:d,signed:u==="int"})}let s=r.match(ZT);if(s){let[c,u]=s;if(Number.parseInt(u,10)!==(o.length-2)/2)throw new yd({expectedSize:Number.parseInt(u,10),value:o});return Lo(o,n?32:0)}let a=r.match(VT);if(a&&Array.isArray(o)){let[c,u]=a,l=[];for(let d=0;d<o.length;d++)l.push(t(u,o[d],true));return l.length===0?"0x":pt(...l)}throw new Ju(r)}e.encode=t;})(Rv||(Rv={}));function xd(e){return Array.isArray(e)&&typeof e[0]=="string"?zl(e):typeof e=="string"?zl(e):e}var Tv=class extends de{constructor({data:t,parameters:r,size:o}){super(`Data size of ${o} bytes is too small for given parameters.`,{metaMessages:[`Params: (${ai(r)})`,`Data: ${t} (${o} bytes)`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.DataSizeTooSmallError"});}},$v=class extends de{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.ZeroDataError"});}},eg=class extends de{constructor({expectedLength:t,givenLength:r,type:o}){super(`Array length mismatch for type \`${o}\`. Expected: \`${t}\`. Given: \`${r}\`.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.ArrayLengthMismatchError"});}},yd=class extends de{constructor({expectedSize:t,value:r}){super(`Size of bytes "${r}" (bytes${at(r)}) does not match expected size (bytes${t}).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.BytesSizeMismatchError"});}},og=class extends de{constructor({expectedLength:t,givenLength:r}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${t}`,`Given length (values): ${r}`].join(`
|
|
47
|
-
`)),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.LengthMismatchError"});}},tg=class extends de{constructor(t){super(`Value \`${t}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.InvalidArrayError"});}},Ju=class extends de{constructor(t){super(`Type \`${t}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.InvalidTypeError"});}};fr();ys();an();fr();function Tj(e,t){let{as:r}=t,o=YT(e),n=ng(new Uint8Array(o.length));return o.encode(n),r==="Hex"?_t(n.bytes):n.bytes}function JT(e,t={}){let{as:r="Hex"}=t;return Tj(e,{as:r})}function YT(e){return Array.isArray(e)?$j(e.map(t=>YT(t))):Oj(e)}function $j(e){let t=e.reduce((n,i)=>n+i.length,0),r=XT(t);return {length:t<=55?1+t:1+r+t,encode(n){t<=55?n.pushByte(192+t):(n.pushByte(247+r),r===1?n.pushUint8(t):r===2?n.pushUint16(t):r===3?n.pushUint24(t):n.pushUint32(t));for(let{encode:i}of e)i(n);}}}function Oj(e){let t=typeof e=="string"?ju(e):e,r=XT(t.length);return {length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(n){t.length===1&&t[0]<128?n.pushBytes(t):t.length<=55?(n.pushByte(128+t.length),n.pushBytes(t)):(n.pushByte(183+r),r===1?n.pushUint8(t.length):r===2?n.pushUint16(t.length):r===3?n.pushUint24(t.length):n.pushUint32(t.length),n.pushBytes(t));}}}function XT(e){if(e<=255)return 1;if(e<=65535)return 2;if(e<=16777215)return 3;if(e<=4294967295)return 4;throw new de("Length is too large.")}an();fr();od();function Cv(e,t={}){let{recovered:r}=t;if(typeof e.r>"u")throw new vd({signature:e});if(typeof e.s>"u")throw new vd({signature:e});if(r&&typeof e.yParity>"u")throw new vd({signature:e});if(e.r<0n||e.r>wv)throw new Nv({value:e.r});if(e.s<0n||e.s>wv)throw new Pv({value:e.s});if(typeof e.yParity=="number"&&e.yParity!==0&&e.yParity!==1)throw new _d({value:e.yParity})}function Pj(e){return QT(_t(e))}function QT(e){if(e.length!==130&&e.length!==132)throw new Ov({signature:e});let t=BigInt(ct(e,0,32)),r=BigInt(ct(e,32,64)),o=(()=>{let n=+`0x${e.slice(130)}`;if(!Number.isNaN(n))try{return Uv(n)}catch{throw new _d({value:n})}})();return typeof o>"u"?{r:t,s:r}:{r:t,s:r,yParity:o}}function zv(e){if(!(typeof e.r>"u")&&!(typeof e.s>"u"))return Lv(e)}function Lv(e){let t=typeof e=="string"?QT(e):e instanceof Uint8Array?Pj(e):typeof e.r=="string"?Cj(e):e.v?Bj(e):{r:e.r,s:e.s,...typeof e.yParity<"u"?{yParity:e.yParity}:{}};return Cv(t),t}function Bj(e){return {r:e.r,s:e.s,yParity:Uv(e.v)}}function Cj(e){let t=(()=>{let r=e.v?Number(e.v):void 0,o=e.yParity?Number(e.yParity):void 0;if(typeof r=="number"&&typeof o!="number"&&(o=Uv(r)),typeof o!="number")throw new _d({value:e.yParity});return o})();return {r:BigInt(e.r),s:BigInt(e.s),yParity:t}}function e4(e){let{r:t,s:r,yParity:o}=e;return [o?"0x01":"0x",t===0n?"0x":W1(Fe(t)),r===0n?"0x":W1(Fe(r))]}function Uv(e){if(e===0||e===27)return 0;if(e===1||e===28)return 1;if(e>=35)return e%2===0?1:0;throw new Bv({value:e})}var Ov=class extends de{constructor({signature:t}){super(`Value \`${t}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${at(Fu(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidSerializedSizeError"});}},vd=class extends de{constructor({signature:t}){super(`Signature \`${bs(t)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.MissingPropertiesError"});}},Nv=class extends de{constructor({value:t}){super(`Value \`${t}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidRError"});}},Pv=class extends de{constructor({value:t}){super(`Value \`${t}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidSError"});}},_d=class extends de{constructor({value:t}){super(`Value \`${t}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidYParityError"});}},Bv=class extends de{constructor({value:t}){super(`Value \`${t}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidVError"});}};function r4(e,t={}){return typeof e.chainId=="string"?zj(e):{...e,...t.signature}}function zj(e){let{address:t,chainId:r,nonce:o}=e,n=zv(e);return {address:t,chainId:Number(r),nonce:BigInt(o),...n}}function n4(e){return Lj(e,{presign:true})}function Lj(e,t={}){let{presign:r}=t;return Ua(pt("0x05",JT(Uj(r?{address:e.address,chainId:e.chainId,nonce:e.nonce}:e))))}function Uj(e){let{address:t,chainId:r,nonce:o}=e,n=zv(e);return [r?Fe(r):"0x",t,o?Fe(o):"0x",...n?e4(n):[]]}an();fr();Qf();fr();function o4(e){return HT(Dj(e))}function Dj(e){let{payload:t,signature:r}=e,{r:o,s:n,yParity:i}=r,a=new pn.Signature(BigInt(o),BigInt(n)).addRecoveryBit(i).recoverPublicKey(Fu(t).substring(2));return DT(a)}var Mv="0x8010801080108010801080108010801080108010801080108010801080108010",Dv=xd("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function sg(e){if(typeof e=="string"){if(ct(e,-32)!==Mv)throw new ig(e)}else Cv(e.authorization);}function Fj(e){return typeof e=="string"?i4(e):e}function i4(e){sg(e);let t=l0(ct(e,-64,-32)),r=ct(e,-t-64,-64),o=ct(e,0,-t-64),[n,i,s]=Yu(Dv,r);return {authorization:r4({address:n.delegation,chainId:Number(n.chainId),nonce:n.nonce,yParity:n.yParity,r:n.r,s:n.s}),signature:o,...s&&s!=="0x"?{data:s,to:i}:{}}}function Hj(e){let{data:t,signature:r}=e;sg(e);let o=o4({payload:n4(e.authorization),signature:Lv(e.authorization)}),n=ws(Dv,[{...e.authorization,delegation:e.authorization.address,chainId:BigInt(e.authorization.chainId)},e.to??o,t??"0x"]),i=Fe(at(n),{size:32});return pt(r,n,i,Mv)}function Vj(e){try{return sg(e),!0}catch{return false}}var ig=class extends de{constructor(t){super(`Value \`${t}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"SignatureErc8010.InvalidWrappedSignatureError"});}};function Zj(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function s4(e){return {...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?Yt(e.nonce):void 0,storageProof:e.storageProof?Zj(e.storageProof):void 0}}async function a4(e,{address:t,blockHash:r,blockNumber:o,blockTag:n="latest",requireCanonical:i,storageKeys:s}){let a=xn({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i}),c=await e.request({method:"eth_getProof",params:[t,s,a]});return s4(c)}Ta();async function c4(e,{address:t,blockHash:r,blockNumber:o,blockTag:n="latest",requireCanonical:i,slot:s}){let a=xn({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i});return await e.request({method:"eth_getStorageAt",params:[t,s,a]})}co();Re();async function Xu(e,{blockHash:t,blockNumber:r,blockTag:o,hash:n,index:i,sender:s,nonce:a}){let c=o||"latest",u=r!==void 0?Y(r):void 0,l=null;if(n?l=await e.request({method:"eth_getTransactionByHash",params:[n]},{dedupe:true}):t?l=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,Y(i)]},{dedupe:true}):typeof i=="number"?l=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[u||c,Y(i)]},{dedupe:!!u}):s&&typeof a=="number"&&(l=await e.request({method:"eth_getTransactionBySenderAndNonce",params:[s,Y(a)]},{dedupe:true})),!l)throw new Zc({blockHash:t,blockNumber:r,blockTag:c,hash:n,index:i});return (e.chain?.formatters?.transaction?.format||yi)(l,"getTransaction")}async function u4(e,{hash:t,transactionReceipt:r}){let[o,n]=await Promise.all([ie(e,Do,"getBlockNumber")({}),t?ie(e,Xu,"getTransaction")({hash:t}):void 0]),i=r?.blockNumber||n?.blockNumber;return i?o-i+1n:0n}co();async function Qu(e,{hash:t}){let r=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:true});if(!r)throw new Gc({hash:t});return (e.chain?.formatters?.transactionReceipt?.format||pd)(r,"getTransactionReceipt")}_i();ad();xt();Oe();fs();bi();Cn();Ca();async function f4(e,t){let{account:r,authorizationList:o,allowFailure:n=true,blockHash:i,blockNumber:s,blockOverrides:a,blockTag:c,requireCanonical:u,stateOverride:l}=t,d=t.contracts,{batchSize:g=t.batchSize??1024,deployless:h=t.deployless??false}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},v=(()=>{if(t.multicallAddress)return t.multicallAddress;if(h)return null;if(e.chain)return Fn({blockNumber:s,chain:e.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),E=[[]],R=0,$=0;for(let I=0;I<d.length;I++){let{abi:N,address:C,args:z,functionName:F}=d[I];try{let W=dt({abi:N,args:z,functionName:F});$+=(W.length-2)/2,g>0&&$>g&&E[R].length>0&&(R++,$=(W.length-2)/2,E[R]=[]),E[R]=[...E[R],{allowFailure:!0,callData:W,target:C}];}catch(W){let V=fo(W,{abi:N,address:C,args:z,docsPath:"/docs/contract/multicall",functionName:F,sender:r});if(!n)throw V;E[R]=[...E[R],{allowFailure:true,callData:"0x",target:C}];}}let P=await Promise.allSettled(E.map(I=>ie(e,Xt,"readContract")({...v===null?{code:Vu}:{address:v},abi:Uo,account:r,args:[I],authorizationList:o,blockHash:i,blockNumber:s,blockOverrides:a,blockTag:c,functionName:"aggregate3",requireCanonical:u,stateOverride:l}))),O=[];for(let I=0;I<P.length;I++){let N=P[I];if(N.status==="rejected"){if(!n)throw N.reason;for(let z=0;z<E[I].length;z++)O.push({status:"failure",error:N.reason,result:void 0});continue}let C=N.value;for(let z=0;z<C.length;z++){let{returnData:F,success:W}=C[z],{callData:V}=E[I][z],{abi:G,address:ne,functionName:S,args:f}=d[O.length];try{if(V==="0x")throw new On;if(!W)throw new Po({data:F});let m=Lr({abi:G,args:f,data:F,functionName:S});O.push(n?{result:m,status:"success"}:m);}catch(m){let y=fo(m,{abi:G,address:ne,args:f,docsPath:"/docs/contract/multicall",functionName:S});if(!n)throw y;O.push({error:y,result:void 0,status:"failure"});}}}if(O.length!==d.length)throw new M("multicall results mismatch");return O}K1();bn();xt();fs();ps();bi();Cn();tn();Re();Ql();Iu();qh();Ra();async function Ed(e,t){let{blockNumber:r,blockTag:o=e.experimental_blockTag??"latest",blocks:n,returnFullTransactions:i,traceTransfers:s,validation:a}=t;try{let c=[];for(let g of n){let h=g.blockOverrides?h0(g.blockOverrides):void 0,v=g.calls.map(R=>{let $=R,P=$.account?nt($.account):void 0,O=$.abi?dt($):$.data,I={...$,account:P,data:$.dataSuffix?wr([O||"0x",$.dataSuffix]):O,from:$.from??P?.address};return Dn(I),Co(I)}),E=g.stateOverrides?Au(g.stateOverrides):void 0;c.push({blockOverrides:h,calls:v,stateOverrides:E});}let l=(typeof r=="bigint"?Y(r):void 0)||o;return (await e.request({method:"eth_simulateV1",params:[{blockStateCalls:c,returnFullTransactions:i,traceTransfers:s,validation:a},l]})).map((g,h)=>({...td(g),calls:g.calls.map((v,E)=>{let{abi:R,args:$,functionName:P,to:O}=n[h].calls[E],I=v.error?.data??v.returnData,N=BigInt(v.gasUsed),C=v.logs?.map(V=>ur(V)),z=v.status==="0x1"?"success":"failure",F=R&&z==="success"&&I!=="0x"?Lr({abi:R,data:I,functionName:P}):null,W=(()=>{if(z==="success")return;let V;if(I==="0x"?V=new On:I&&(V=new Po({data:I})),!!V)return fo(V,{abi:R??[],address:O??"0x",args:$,functionName:P??"<unknown>"})})();return {data:I,gasUsed:N,logs:C,status:z,...z==="success"?{result:F}:{error:W}}})}))}catch(c){let u=c,l=ms(u,{});throw l instanceof Mn?u:l}}Nc();an();fr();an();function cg(e){let t=true,r="",o=0,n="",i=false;for(let s=0;s<e.length;s++){let a=e[s];if(["(",")",","].includes(a)&&(t=true),a==="("&&o++,a===")"&&o--,!!t){if(o===0){if(a===" "&&["event","function","error",""].includes(n))n="";else if(n+=a,a===")"){i=true;break}continue}if(a===" "){e[s-1]!==","&&r!==","&&r!==",("&&(r="",t=false);continue}n+=a,r+=a;}}if(!i)throw new de("Unable to normalize signature.");return n}function ag(e,t){let r=typeof e,o=t.type;switch(o){case "address":return J0(e,{strict:false});case "bool":return r==="boolean";case "function":return r==="string";case "string":return r==="string";default:return o==="tuple"&&"components"in t?Object.values(t.components).every((n,i)=>ag(Object.values(e)[i],n)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(o)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(o)?r==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(o)?Array.isArray(e)&&e.every(n=>ag(n,{...t,type:o.replace(/(\[[0-9]{0,}\])$/,"")})):false}}function jv(e,t,r){for(let o in e){let n=e[o],i=t[o];if(n.type==="tuple"&&i.type==="tuple"&&"components"in n&&"components"in i)return jv(n.components,i.components,r[o]);let s=[n.type,i.type];if(s.includes("address")&&s.includes("bytes20")?true:s.includes("address")&&s.includes("string")?J0(r[o],{strict:false}):s.includes("address")&&s.includes("bytes")?J0(r[o],{strict:false}):false)return s}}function ug(e,t={}){let{prepare:r=true}=t,o=Array.isArray(e)?Cl(e):typeof e=="string"?Cl(e):e;return {...o,...r?{hash:ef(o)}:{}}}function Sd(e,t,r){let{args:o=[],prepare:n=true}=r??{},i=sd(t,{strict:false}),s=e.filter(u=>i?u.type==="function"||u.type==="error"?Hv(u)===ct(t,0,4):u.type==="event"?ef(u)===t:false:"name"in u&&u.name===t);if(s.length===0)throw new Es({name:t});if(s.length===1)return {...s[0],...n?{hash:ef(s[0])}:{}};let a;for(let u of s){if(!("inputs"in u))continue;if(!o||o.length===0){if(!u.inputs||u.inputs.length===0)return {...u,...n?{hash:ef(u)}:{}};continue}if(!u.inputs||u.inputs.length===0||u.inputs.length!==o.length)continue;if(o.every((d,g)=>{let h="inputs"in u&&u.inputs[g];return h?ag(d,h):false})){if(a&&"inputs"in a&&a.inputs){let d=jv(u.inputs,a.inputs,o);if(d)throw new Fv({abiItem:u,type:d[0]},{abiItem:a,type:d[1]})}a=u;}}let c=(()=>{if(a)return a;let[u,...l]=s;return {...u,overloads:l}})();if(!c)throw new Es({name:t});return {...c,...n?{hash:ef(c)}:{}}}function Hv(...e){let t=(()=>{if(Array.isArray(e[0])){let[r,o]=e;return Sd(r,o)}return e[0]})();return ct(ef(t),0,4)}function qj(...e){let t=(()=>{if(Array.isArray(e[0])){let[o,n]=e;return Sd(o,n)}return e[0]})(),r=typeof t=="string"?t:_a(t);return cg(r)}function ef(...e){let t=(()=>{if(Array.isArray(e[0])){let[r,o]=e;return Sd(r,o)}return e[0]})();return typeof t!="string"&&"hash"in t&&t.hash?t.hash:Ua(Hu(qj(t)))}var Fv=class extends de{constructor(t,r){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${t.type}\` in \`${cg(_a(t.abiItem))}\`, and`,`\`${r.type}\` in \`${cg(_a(r.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiItem.AmbiguityError"});}},Es=class extends de{constructor({name:t,data:r,type:o="item"}){let n=t?` with name "${t}"`:r?` with data "${r}"`:"";super(`ABI ${o}${n} not found.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiItem.NotFoundError"});}};fr();function d4(...e){let[t,r]=(()=>{if(Array.isArray(e[0])){let[i,s]=e;return [Wj(i),s]}return e})(),{bytecode:o,args:n}=r;return pt(o,t.inputs?.length&&n?.length?ws(t.inputs,n):"0x")}function p4(e){return ug(e)}function Wj(e){let t=e.find(r=>r.type==="constructor");if(!t)throw new Es({name:"constructor"});return t}fr();function h4(...e){let[t,r=[]]=(()=>{if(Array.isArray(e[0])){let[u,l,d]=e;return [m4(u,l,{args:d}),d]}let[a,c]=e;return [a,c]})(),{overloads:o}=t,n=o?m4([t,...o],t.name,{args:r}):t,i=Jj(n),s=r.length>0?ws(n.inputs,r):void 0;return s?pt(i,s):i}function ja(e,t={}){return ug(e,t)}function m4(e,t,r){let o=Sd(e,t,r);if(o.type!=="function")throw new Es({name:t,type:"function"});return o}function Jj(e){return Hv(e)}bn();var g4="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",Vn="0x0000000000000000000000000000000000000000";ad();Oe();Cn();var Xj="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033";async function y4(e,t){let{blockNumber:r,blockTag:o,calls:n,stateOverrides:i,traceAssetChanges:s,traceTransfers:a,validation:c}=t,u=t.account?nt(t.account):void 0;if(s&&!u)throw new M("`account` is required when `traceAssetChanges` is true");let l=u?d4(p4("constructor(bytes, bytes)"),{bytecode:b0,args:[Xj,h4(ja("function getBalance(address)"),[u.address])]}):void 0,d=s?await Promise.all(t.calls.map(async b=>{if(!b.data&&!b.abi)return;let{accessList:w}=await C0(e,{account:u.address,...b,data:b.abi?dt(b):b.data});return w.map(({address:k,storageKeys:_})=>_.length>0?k:null)})).then(b=>b.flat().filter(Boolean)):[],g=await Ed(e,{blockNumber:r,blockTag:o,blocks:[...s?[{calls:[{data:l}],stateOverrides:i},{calls:d.map((b,w)=>({abi:[ja("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[u.address],to:b,from:Vn,nonce:w})),stateOverrides:[{address:Vn,nonce:0}]}]:[],{calls:[...n,{to:Vn}].map(b=>({...b,from:u?.address})),stateOverrides:i},...s?[{calls:[{data:l}]},{calls:d.map((b,w)=>({abi:[ja("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[u.address],to:b,from:Vn,nonce:w})),stateOverrides:[{address:Vn,nonce:0}]},{calls:d.map((b,w)=>({to:b,abi:[ja("function decimals() returns (uint256)")],functionName:"decimals",from:Vn,nonce:w})),stateOverrides:[{address:Vn,nonce:0}]},{calls:d.map((b,w)=>({to:b,abi:[ja("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:Vn,nonce:w})),stateOverrides:[{address:Vn,nonce:0}]},{calls:d.map((b,w)=>({to:b,abi:[ja("function symbol() returns (string)")],functionName:"symbol",from:Vn,nonce:w})),stateOverrides:[{address:Vn,nonce:0}]}]:[]],traceTransfers:a,validation:c}),h=s?g[2]:g[0],[v,E,,R,$,P,O,I]=s?g:[],{calls:N,...C}=h,z=N.slice(0,-1)??[],F=v?.calls??[],W=E?.calls??[],V=[...F,...W].map(b=>b.status==="success"?ft(b.data):null),G=R?.calls??[],ne=$?.calls??[],S=[...G,...ne].map(b=>b.status==="success"?ft(b.data):null),f=(P?.calls??[]).map(b=>b.status==="success"?b.result:null),m=(I?.calls??[]).map(b=>b.status==="success"?b.result:null),y=(O?.calls??[]).map(b=>b.status==="success"?b.result:null),x=[];for(let[b,w]of S.entries()){let k=V[b];if(typeof w!="bigint"||typeof k!="bigint")continue;let _=f[b-1],p=m[b-1],A=y[b-1],Z=b===0?{address:g4,decimals:18,symbol:"ETH"}:{address:d[b-1],decimals:A||_?Number(_??1):void 0,symbol:p??void 0};x.some(K=>K.token.address===Z.address)||x.push({token:Z,value:{pre:k,post:w,diff:w-k}});}return {assetChanges:x,block:C,results:z}}var Id={};Ir(Id,{InvalidWrappedSignatureError:()=>fg,assert:()=>Zv,from:()=>t7,magicBytes:()=>Vv,universalSignatureValidatorAbi:()=>e7,universalSignatureValidatorBytecode:()=>Qj,unwrap:()=>b4,validate:()=>n7,wrap:()=>r7});an();fr();var Vv="0x6492649264926492649264926492649264926492649264926492649264926492",Qj="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",e7=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}];function Zv(e){if(ct(e,-32)!==Vv)throw new fg(e)}function t7(e){return typeof e=="string"?b4(e):e}function b4(e){Zv(e);let[t,r,o]=Yu(xd("address, bytes, bytes"),e);return {data:r,signature:o,to:t}}function r7(e){let{data:t,signature:r,to:o}=e;return pt(ws(xd("address, bytes, bytes"),[o,t,r]),Vv)}function n7(e){try{return Zv(e),!0}catch{return false}}var fg=class extends de{constructor(t){super(`Value \`${t}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"SignatureErc6492.InvalidWrappedSignatureError"});}};_i();ad();fs();tv();Cn();di();$a();tn();oo();xr();Re();Qf();xr();_r();function x4({r:e,s:t,to:r="hex",v:o,yParity:n}){let i=(()=>{if(n===0||n===1)return n;if(o&&(o===27n||o===28n||o>=35n))return o%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),s=`0x${new pn.Signature(ft(e),ft(t)).toCompactHex()}${i===0?"1b":"1c"}`;return r==="hex"?s:vr(s)}za();async function Ss(e,t){let{address:r,chain:o=e.chain,hash:n,erc6492VerifierAddress:i=t.universalSignatureVerifierAddress??o?.contracts?.erc6492Verifier?.address,multicallAddress:s=t.multicallAddress??o?.contracts?.multicall3?.address,mode:a="auto"}=t;if(o?.verifyHash)return await o.verifyHash(e,t);let c=(()=>{let u=t.signature;return vt(u)?u:typeof u=="object"&&"r"in u&&"s"in u?x4(u):Le(u)})();try{if(a==="eoa")try{if(vn(Pn(r),await Xl({hash:n,signature:c})))return !0}catch{}return wd.validate(c)?await o7(e,{...t,multicallAddress:s,signature:c}):await i7(e,{...t,verifierAddress:i,signature:c})}catch(u){if(a!=="eoa")try{if(vn(Pn(r),await Xl({hash:n,signature:c})))return !0}catch{}if(u instanceof Ei)return false;throw u}}async function o7(e,t){let{address:r,blockNumber:o,blockTag:n,hash:i,multicallAddress:s}=t,{authorization:a,data:c,signature:u,to:l}=wd.unwrap(t.signature);if(await La(e,{address:r,blockNumber:o,blockTag:n})===ar(["0xef0100",a.address]))return await s7(e,{address:r,blockNumber:o,blockTag:n,hash:i,signature:u});let g={address:a.address,chainId:Number(a.chainId),nonce:Number(a.nonce),r:Y(a.r,{size:32}),s:Y(a.s,{size:32}),yParity:a.yParity};if(!await IT({address:r,authorization:g}))throw new Ei;let v=await ie(e,Xt,"readContract")({...s?{address:s}:{code:Vu},authorizationList:[g],abi:Uo,blockNumber:o,blockTag:"pending",functionName:"aggregate3",args:[[...c?[{allowFailure:true,target:l??r,callData:c}]:[],{allowFailure:true,target:r,callData:dt({abi:X1,functionName:"isValidSignature",args:[i,u]})}]]});if(v[v.length-1]?.returnData?.startsWith("0x1626ba7e"))return true;throw new Ei}async function i7(e,t){let{address:r,factory:o,factoryData:n,hash:i,signature:s,verifierAddress:a,...c}=t,u=await(async()=>!o&&!n||Id.validate(s)?s:Id.wrap({data:n,signature:s,to:o}))(),l=a?{to:a,data:dt({abi:Q1,functionName:"isValidSig",args:[r,i,u]}),...c}:{data:ud({abi:Q1,args:[r,i,u],bytecode:NR}),...c},{data:d}=await ie(e,Hn,"call")(l).catch(g=>{throw g instanceof qc?new Ei:g});if(x1(d??"0x0"))return true;throw new Ei}async function s7(e,t){let{address:r,blockNumber:o,blockTag:n,hash:i,signature:s}=t;if((await ie(e,Xt,"readContract")({address:r,abi:X1,args:[i,s],blockNumber:o,blockTag:n,functionName:"isValidSignature"}).catch(c=>{throw c instanceof Wc?new Ei:c})).startsWith("0x1626ba7e"))return true;throw new Ei}var Ei=class extends Error{};async function v4(e,{address:t,message:r,factory:o,factoryData:n,signature:i,...s}){let a=j0(r);return ie(e,Ss,"verifyHash")({address:t,factory:o,factoryData:n,hash:a,signature:i,...s})}async function _4(e,t){let{address:r,factory:o,factoryData:n,signature:i,message:s,primaryType:a,types:c,domain:u,...l}=t,d=BT({message:s,primaryType:a,types:c,domain:u});return ie(e,Ss,"verifyHash")({address:r,factory:o,factoryData:n,hash:d,signature:i,...l})}co();nv();on();xr();on();function lg(e,{emitOnBegin:t=false,emitMissed:r=false,onBlockNumber:o,onError:n,poll:i,pollingInterval:s=e.pollingInterval}){let a=typeof i<"u"?i:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),c;return a?(()=>{let d=je(["watchBlockNumber",e.uid,t,r,s]);return cn(d,{onBlockNumber:o,onError:n},g=>Mo(async()=>{try{let h=await ie(e,Do,"getBlockNumber")({cacheTime:0});if(c!==void 0){if(h===c)return;if(h-c>1&&r)for(let v=c+1n;v<h;v++)g.onBlockNumber(v,c),c=v;}(c===void 0||h>c)&&(g.onBlockNumber(h,c),c=h);}catch(h){g.onError?.(h);}},{emitOnBegin:t,interval:s}))})():(()=>{let d=je(["watchBlockNumber",e.uid,t,r]);return cn(d,{onBlockNumber:o,onError:n},g=>{let h=true,v=()=>h=false;return (async()=>{try{let E=(()=>{if(e.transport.type==="fallback"){let $=e.transport.transports.find(P=>P.config.type==="webSocket"||P.config.type==="ipc");return $?$.value:e.transport}return e.transport})(),{unsubscribe:R}=await E.subscribe({params:["newHeads"],onData($){if(!h)return;let P=ft($.result?.number);g.onBlockNumber(P,c),c=P;},onError($){g.onError?.($);}});v=R,h||v();}catch(E){n?.(E);}})(),()=>v()})})()}async function w4(e,t){let{checkReplacement:r=true,confirmations:o=1,hash:n,onReplaced:i,retryCount:s=6,retryDelay:a=({count:N})=>~~(1<<N)*200,timeout:c=18e4}=t,u=je(["waitForTransactionReceipt",e.uid,n]),l=t.pollingInterval?t.pollingInterval:e.chain?.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval,d,g,h,v=false,E,R,{promise:$,resolve:P,reject:O}=_0(),I=c?setTimeout(()=>{R?.(),E?.(),O(new Dh({hash:n}));},c):void 0;return E=cn(u,{onReplaced:i,resolve:P,reject:O},async N=>{if(h=await ie(e,Qu,"getTransactionReceipt")({hash:n}).catch(()=>{}),h&&o<=1){clearTimeout(I),N.resolve(h),E?.();return}R=ie(e,lg,"watchBlockNumber")({emitMissed:true,emitOnBegin:true,poll:true,pollingInterval:l,async onBlockNumber(C){let z=W=>{clearTimeout(I),R?.(),W(),E?.();},F=C;if(!v)try{if(h){if(o>1&&(!h.blockNumber||F-h.blockNumber+1n<o))return;z(()=>N.resolve(h));return}if(r&&!d&&(v=!0,await dd(async()=>{d=await ie(e,Xu,"getTransaction")({hash:n}),d.blockNumber&&(F=d.blockNumber);},{delay:a,retryCount:s}),v=!1),h=await ie(e,Qu,"getTransactionReceipt")({hash:n}),o>1&&(!h.blockNumber||F-h.blockNumber+1n<o))return;z(()=>N.resolve(h));}catch(W){if(W instanceof Zc||W instanceof Gc){if(!d){v=false;return}try{g=d,v=!0;let V=await dd(()=>ie(e,cr,"getBlock")({blockNumber:F,includeTransactions:!0}),{delay:a,retryCount:s,shouldRetry:({error:S})=>S instanceof Tu});v=!1;let G=V.transactions.find(({from:S,nonce:f})=>S===g.from&&f===g.nonce);if(!G||(h=await ie(e,Qu,"getTransactionReceipt")({hash:G.hash}),o>1&&(!h.blockNumber||F-h.blockNumber+1n<o)))return;let ne="replaced";G.to===g.to&&G.value===g.value&&G.input===g.input?ne="repriced":G.from===G.to&&G.value===0n&&(ne="cancelled"),z(()=>{N.onReplaced?.({reason:ne,replacedTransaction:g,transaction:G,transactionReceipt:h}),N.resolve(h);});}catch(V){z(()=>N.reject(V));}}else z(()=>N.reject(W));}}});}),$}on();function E4(e,{blockTag:t=e.experimental_blockTag??"latest",emitMissed:r=false,emitOnBegin:o=false,onBlock:n,onError:i,includeTransactions:s,poll:a,pollingInterval:c=e.pollingInterval}){let u=typeof a<"u"?a:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),l=s??false,d;return u?(()=>{let v=je(["watchBlocks",e.uid,t,r,o,l,c]);return cn(v,{onBlock:n,onError:i},E=>Mo(async()=>{try{let R=await ie(e,cr,"getBlock")({blockTag:t,includeTransactions:l});if(R.number!==null&&d?.number!=null){if(R.number===d.number)return;if(R.number-d.number>1&&r)for(let $=d?.number+1n;$<R.number;$++){let P=await ie(e,cr,"getBlock")({blockNumber:$,includeTransactions:l});E.onBlock(P,d),d=P;}}(d?.number==null||t==="pending"&&R?.number==null||R.number!==null&&R.number>d.number)&&(E.onBlock(R,d),d=R);}catch(R){E.onError?.(R);}},{emitOnBegin:o,interval:c}))})():(()=>{let v=true,E=true,R=()=>v=false;return (async()=>{try{o&&ie(e,cr,"getBlock")({blockTag:t,includeTransactions:l}).then(O=>{v&&E&&(n(O,void 0),E=!1);}).catch(i);let $=(()=>{if(e.transport.type==="fallback"){let O=e.transport.transports.find(I=>I.config.type==="webSocket"||I.config.type==="ipc");return O?O.value:e.transport}return e.transport})(),{unsubscribe:P}=await $.subscribe({params:["newHeads"],async onData(O){if(!v)return;let I=await ie(e,cr,"getBlock")({blockNumber:O.result?.number,includeTransactions:l}).catch(()=>{});v&&(n(I,d),E=!1,d=I);},onError(O){i?.(O);}});R=P,v||R();}catch($){i?.($);}})(),()=>R()})()}xt();Yl();on();function S4(e,{address:t,args:r,batch:o=true,event:n,events:i,fromBlock:s,onError:a,onLogs:c,poll:u,pollingInterval:l=e.pollingInterval,strict:d}){let g=typeof u<"u"?u:typeof s=="bigint"?true:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),h=d??false;return g?(()=>{let R=je(["watchEvent",t,r,o,e.uid,n,l,s]);return cn(R,{onLogs:c,onError:a},$=>{let P;s!==void 0&&(P=s-1n);let O,I=false,N=Mo(async()=>{if(!I){try{O=await ie(e,z0,"createEventFilter")({address:t,args:r,event:n,events:i,strict:h,fromBlock:s});}catch{}I=true;return}try{let C;if(O)C=await ie(e,xs,"getFilterChanges")({filter:O});else {let z=await ie(e,Do,"getBlockNumber")({});P&&P!==z?C=await ie(e,Lu,"getLogs")({address:t,args:r,event:n,events:i,fromBlock:P+1n,toBlock:z}):C=[],P=z;}if(C.length===0)return;if(o)$.onLogs(C);else for(let z of C)$.onLogs([z]);}catch(C){O&&C instanceof Ln&&(I=false),$.onError?.(C);}},{emitOnBegin:true,interval:l});return async()=>{O&&await ie(e,vs,"uninstallFilter")({filter:O}),N();}})})():(()=>{let R=true,$=()=>R=false;return (async()=>{try{let P=(()=>{if(e.transport.type==="fallback"){let C=e.transport.transports.find(z=>z.config.type==="webSocket"||z.config.type==="ipc");return C?C.value:e.transport}return e.transport})(),O=i??(n?[n]:void 0),I=[];O&&(I=[O.flatMap(z=>Oo({abi:[z],eventName:z.name,args:r}))],n&&(I=I[0]));let{unsubscribe:N}=await P.subscribe({params:["logs",{address:t,topics:I}],onData(C){if(!R)return;let z=C.result;try{let{eventName:F,args:W}=Oa({abi:O??[],data:z.data,topics:z.topics,strict:h}),V=ur(z,{args:W,eventName:F});c([V]);}catch(F){let W,V;if(F instanceof ui||F instanceof rs){if(d)return;W=F.abiItem.name,V=F.abiItem.inputs?.some(ne=>!("name"in ne&&ne.name));}let G=ur(z,{args:V?[]:{},eventName:W});c([G]);}},onError(C){a?.(C);}});$=N,R||$();}catch(P){a?.(P);}})(),()=>$()})()}on();function I4(e,{batch:t=true,onError:r,onTransactions:o,poll:n,pollingInterval:i=e.pollingInterval}){return (typeof n<"u"?n:e.transport.type!=="webSocket"&&e.transport.type!=="ipc")?(()=>{let u=je(["watchPendingTransactions",e.uid,t,i]);return cn(u,{onTransactions:o,onError:r},l=>{let d,g=Mo(async()=>{try{if(!d)try{d=await ie(e,L0,"createPendingTransactionFilter")({});return}catch(v){throw g(),v}let h=await ie(e,xs,"getFilterChanges")({filter:d});if(h.length===0)return;if(t)l.onTransactions(h);else for(let v of h)l.onTransactions([v]);}catch(h){l.onError?.(h);}},{emitOnBegin:true,interval:i});return async()=>{d&&await ie(e,vs,"uninstallFilter")({filter:d}),g();}})})():(()=>{let u=true,l=()=>u=false;return (async()=>{try{let{unsubscribe:d}=await e.transport.subscribe({params:["newPendingTransactions"],onData(g){if(!u)return;let h=g.result;o([h]);},onError(g){r?.(g);}});l=d,u||l();}catch(d){r?.(d);}})(),()=>l()})()}function A4(e){let{scheme:t,statement:r,...o}=e.match(a7)?.groups??{},{chainId:n,expirationTime:i,issuedAt:s,notBefore:a,requestId:c,...u}=e.match(c7)?.groups??{},l=e.split("Resources:")[1]?.split(`
|
|
48
|
-
- `).slice(1);return {...o,...u,...n?{chainId:Number(n)}:{},...i?{expirationTime:new Date(i)}:{},...s?{issuedAt:new Date(s)}:{},...a?{notBefore:new Date(a)}:{},...c?{requestId:c}:{},...l?{resources:l}:{},...t?{scheme:t}:{},...r?{statement:r}:{}}}var a7=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,c7=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;Bn();$a();function k4(e){let{address:t,domain:r,message:o,nonce:n,scheme:i,time:s=new Date}=e;if(r&&o.domain!==r||n&&o.nonce!==n||i&&o.scheme!==i||o.expirationTime&&s>=o.expirationTime||o.notBefore&&s<o.notBefore)return false;try{if(!o.address||!Ze(o.address,{strict:!1})||t&&!vn(o.address,t))return !1}catch{return false}return true}async function R4(e,t){let{address:r,domain:o,message:n,nonce:i,scheme:s,signature:a,time:c=new Date,...u}=t,l=A4(n);if(!l.address||!k4({address:r,domain:o,message:l,nonce:i,scheme:s,time:c}))return false;let g=j0(n);return Ss(e,{address:l.address,hash:g,signature:a,...u})}co();async function T4(e,{serializedTransaction:t,throwOnReceiptRevert:r,timeout:o}){let n=await e.request({method:"eth_sendRawTransactionSync",params:o?[t,o]:[t]},{retryCount:0}),s=(e.chain?.formatters?.transactionReceipt?.format||pd)(n);if(s.status==="reverted"&&r)throw new Mh({receipt:s});return s}function $4(e){return {call:t=>Hn(e,t),createAccessList:t=>C0(e,t),createBlockFilter:()=>fT(e),createContractEventFilter:t=>Ih(e,t),createEventFilter:t=>z0(e,t),createPendingTransactionFilter:()=>L0(e),estimateContractGas:t=>rR(e,t),estimateGas:t=>Cu(e,t),getBalance:t=>lT(e,t),getBlobBaseFee:()=>dT(e),getBlock:t=>cr(e,t),getBlockNumber:t=>Do(e,t),getBlockTransactionCount:t=>pT(e,t),getBytecode:t=>La(e,t),getChainId:()=>Bu(e),getCode:t=>La(e,t),getContractEvents:t=>i0(e,t),getDelegation:t=>mT(e,t),getEip712Domain:t=>hT(e,t),getEnsAddress:t=>tT(e,t),getEnsAvatar:t=>aT(e,t),getEnsName:t=>cT(e,t),getEnsResolver:t=>uT(e,t),getEnsText:t=>B0(e,t),getFeeHistory:t=>yT(e,t),estimateFeesPerGas:t=>Jk(e,t),getFilterChanges:t=>xs(e,t),getFilterLogs:t=>bT(e,t),getGasPrice:()=>$u(e),getLogs:t=>Lu(e,t),getProof:t=>a4(e,t),estimateMaxPriorityFeePerGas:t=>Kk(e,t),fillTransaction:t=>n0(e,t),getStorageAt:t=>c4(e,t),getTransaction:t=>Xu(e,t),getTransactionConfirmations:t=>u4(e,t),getTransactionCount:t=>Jh(e,t),getTransactionReceipt:t=>Qu(e,t),multicall:t=>f4(e,t),prepareTransactionRequest:t=>o0(e,t),readContract:t=>Xt(e,t),sendRawTransaction:t=>JR(e,t),sendRawTransactionSync:t=>T4(e,t),simulate:t=>Ed(e,t),simulateBlocks:t=>Ed(e,t),simulateCalls:t=>y4(e,t),simulateContract:t=>GR(e,t),verifyHash:t=>Ss(e,t),verifyMessage:t=>v4(e,t),verifySiweMessage:t=>R4(e,t),verifyTypedData:t=>_4(e,t),uninstallFilter:t=>vs(e,t),waitForTransactionReceipt:t=>w4(e,t),watchBlocks:t=>E4(e,t),watchBlockNumber:t=>lg(e,t),watchContractEvent:t=>KR(e,t),watchEvent:t=>S4(e,t),watchPendingTransactions:t=>I4(e,t)}}function Gv(e){let{key:t="public",name:r="Public Client"}=e;return XR({...e,key:t,name:r,type:"publicClient"}).extend($4)}function O4({key:e,methods:t,name:r,request:o,retryCount:n=3,retryDelay:i=150,timeout:s,type:a},c){let u=T0();return {config:{key:e,methods:t,name:r,request:o,retryCount:n,retryDelay:i,timeout:s,type:a},request:kT(o,{methods:t,retryCount:n,retryDelay:i,uid:u}),value:c}}Ia();Oe();var dg=class extends M{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"});}};iv();var u7=0,N4=new WeakMap;function f7(e){if(!e)return "default";let t=N4.get(e);if(t!==void 0)return t;let r=u7++;return N4.set(e,r),r}function qv(e,t={}){let{batch:r,fetchFn:o,fetchOptions:n,key:i="http",methods:s,name:a="HTTP JSON-RPC",onFetchRequest:c,onFetchResponse:u,retryDelay:l,raw:d}=t;return ({chain:g,retryCount:h,timeout:v})=>{let{batchSize:E=1e3,wait:R=0}=typeof r=="object"?r:{},$=t.retryCount??h,P=v??t.timeout??1e4,O=e||g?.rpcUrls.default.http[0];if(!O)throw new dg;let I=TT(O,{fetchFn:o,fetchOptions:n,onRequest:c,onResponse:u,timeout:P});return O4({key:i,methods:s,name:a,async request({method:N,params:C},z){let F={method:N,params:C},W=z?.signal?{signal:z.signal}:void 0,{schedule:V}=w0({id:`${O}.${f7(z?.signal)}`,wait:R,shouldSplitBatch(f){return f.length>E},fn:f=>I.request({body:f,fetchOptions:W}),sort:(f,m)=>f.id-m.id}),G=async f=>r?V(f):[await I.request({body:f,fetchOptions:W})],[{error:ne,result:S}]=await G(F);if(d)return {error:ne,result:S};if(ne)throw new ls({body:F,error:ne,url:O});return S},retryCount:$,retryDelay:l,timeout:P,type:"http"},{fetchOptions:n,url:O})}}di();var pg=null,l7=Qi.isInMiniApp().then(e=>(pg=e,e)).catch(()=>(pg=false,false));async function d7(){return pg!==null?pg:l7}function p7(e){try{switch(e.type){case "link":Qi.actions.openUrl(e.data.url);break;case "cast":Qi.actions.viewCast({hash:e.data.hash});break;case "miniapp":Qi.actions.openMiniApp({url:e.data.url});break;case "token":{let t=e.data.address,o=`eip155:${e.data.chainId}/erc20:${Pn(t)}`;Qi.actions.swapToken({buyToken:o});break}case "farcasterProfile":Qi.actions.viewProfile({fid:Number.parseInt(e.data.fid,10)});break}}catch(t){e.type==="link"||e.type==="miniapp"?window.open(e.data.url,"_blank","noopener,noreferrer"):console.error("[@adland/react] Failed to perform ad action:",t);}}async function m7(e,t,r){let o=`${r}/slots/${e}?chain=${t}`;await d7()?Qi.actions.openMiniApp({url:o}):window.open(o,"_blank","noopener,noreferrer");}var P4={performAdAction:p7,performEmptyAdAction:m7};var B4={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}};xr();var C4={block:Wk({format(e){return {transactions:e.transactions?.map(r=>{if(typeof r=="string")return r;let o=yi(r);return o.typeHex==="0x7e"&&(o.isSystemTx=r.isSystemTx,o.mint=r.mint?ft(r.mint):void 0,o.sourceHash=r.sourceHash,o.type="deposit"),o}),stateRoot:e.stateRoot}}}),transaction:qk({format(e){let t={};return e.type==="0x7e"&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?ft(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:YR({format(e){return {l1GasPrice:e.l1GasPrice?ft(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?ft(e.l1GasUsed):null,l1Fee:e.l1Fee?ft(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null}}})};Ro();Bn();tn();Re();function h7(e,t){return y7(e)?g7(e):ET(e,t)}var z4={transaction:h7};function g7(e){b7(e);let{sourceHash:t,data:r,from:o,gas:n,isSystemTx:i,mint:s,to:a,value:c}=e,u=[t,o,a??"0x",s?lt(s):"0x",c?lt(c):"0x",n?lt(n):"0x",i?"0x1":"0x",r??"0x"];return ar(["0x7e",lo(u)])}function y7(e){return e.type==="deposit"||typeof e.sourceHash<"u"}function b7(e){let{from:t,to:r}=e;if(t&&!Ze(t))throw new et({address:t});if(r&&!Ze(r))throw new et({address:r})}var tf={blockTime:2e3,contracts:B4,formatters:C4,serializers:z4};var Ad=1,kd=Ku({...tf,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...tf.contracts,disputeGameFactory:{[Ad]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[Ad]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[Ad]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[Ad]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:Ad});Ku({...kd,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://mainnet-preconf.base.org"]}}});var Rd=11155111,Td=Ku({...tf,id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://sepolia.basescan.org",apiUrl:"https://api-sepolia.basescan.org/api"}},contracts:{...tf.contracts,disputeGameFactory:{[Rd]:{address:"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"}},l2OutputOracle:{[Rd]:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{[Rd]:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{[Rd]:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:true,sourceId:Rd});Ku({...Td,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://sepolia-preconf.base.org"]}}});var Ee={};Ir(Ee,{$brand:()=>mg,$input:()=>l6,$output:()=>f6,NEVER:()=>Wv,TimePrecision:()=>m6,ZodAny:()=>d$,ZodArray:()=>g$,ZodBase64:()=>O2,ZodBase64URL:()=>N2,ZodBigInt:()=>mp,ZodBigIntFormat:()=>C2,ZodBoolean:()=>pp,ZodCIDRv4:()=>T2,ZodCIDRv6:()=>$2,ZodCUID:()=>w2,ZodCUID2:()=>E2,ZodCatch:()=>C$,ZodCodec:()=>Z2,ZodCustom:()=>wy,ZodCustomStringFormat:()=>lp,ZodDate:()=>xy,ZodDefault:()=>T$,ZodDiscriminatedUnion:()=>y$,ZodE164:()=>P2,ZodEmail:()=>x2,ZodEmoji:()=>v2,ZodEnum:()=>up,ZodError:()=>KH,ZodFile:()=>A$,ZodFirstPartyTypeKind:()=>G2,ZodFunction:()=>V$,ZodGUID:()=>my,ZodIPv4:()=>k2,ZodIPv6:()=>R2,ZodISODate:()=>fy,ZodISODateTime:()=>uy,ZodISODuration:()=>dy,ZodISOTime:()=>ly,ZodIntersection:()=>b$,ZodIssueCode:()=>sZ,ZodJWT:()=>B2,ZodKSUID:()=>A2,ZodLazy:()=>j$,ZodLiteral:()=>I$,ZodMap:()=>E$,ZodNaN:()=>L$,ZodNanoID:()=>_2,ZodNever:()=>m$,ZodNonOptional:()=>H2,ZodNull:()=>f$,ZodNullable:()=>R$,ZodNumber:()=>dp,ZodNumberFormat:()=>yf,ZodObject:()=>_y,ZodOptional:()=>F2,ZodPipe:()=>V2,ZodPrefault:()=>O$,ZodPromise:()=>H$,ZodReadonly:()=>U$,ZodRealError:()=>ln,ZodRecord:()=>M2,ZodSet:()=>S$,ZodString:()=>fp,ZodStringFormat:()=>tt,ZodSuccess:()=>B$,ZodSymbol:()=>c$,ZodTemplateLiteral:()=>D$,ZodTransform:()=>k$,ZodTuple:()=>v$,ZodType:()=>ke,ZodULID:()=>S2,ZodURL:()=>by,ZodUUID:()=>Ri,ZodUndefined:()=>u$,ZodUnion:()=>L2,ZodUnknown:()=>p$,ZodVoid:()=>h$,ZodXID:()=>I2,_ZodString:()=>b2,_default:()=>$$,_function:()=>QV,any:()=>PV,array:()=>vy,base64:()=>gV,base64url:()=>yV,bigint:()=>RV,boolean:()=>a$,catch:()=>z$,check:()=>eZ,cidrv4:()=>mV,cidrv6:()=>hV,clone:()=>Zr,codec:()=>JV,coerce:()=>q2,config:()=>wt,core:()=>ki,cuid:()=>aV,cuid2:()=>cV,custom:()=>tZ,date:()=>CV,decode:()=>u2,decodeAsync:()=>l2,discriminatedUnion:()=>DV,e164:()=>bV,email:()=>YH,emoji:()=>iV,encode:()=>c2,encodeAsync:()=>f2,endsWith:()=>rp,enum:()=>D2,file:()=>GV,flattenError:()=>Ud,float32:()=>SV,float64:()=>IV,formatError:()=>Md,function:()=>QV,getErrorMap:()=>cZ,globalRegistry:()=>Fo,gt:()=>Ii,gte:()=>fn,guid:()=>XH,hash:()=>EV,hex:()=>wV,hostname:()=>_V,httpUrl:()=>oV,includes:()=>ep,instanceof:()=>rZ,int:()=>y2,int32:()=>AV,int64:()=>TV,intersection:()=>x$,ipv4:()=>dV,ipv6:()=>pV,iso:()=>py,json:()=>oZ,jwt:()=>xV,keyof:()=>zV,ksuid:()=>lV,lazy:()=>F$,length:()=>mf,literal:()=>ZV,locales:()=>qd,looseObject:()=>MV,lowercase:()=>Xd,lt:()=>Si,lte:()=>Gn,map:()=>FV,maxLength:()=>pf,maxSize:()=>df,mime:()=>np,minLength:()=>Os,minSize:()=>Ga,multipleOf:()=>Za,nan:()=>KV,nanoid:()=>sV,nativeEnum:()=>VV,negative:()=>H6,never:()=>z2,nonnegative:()=>Z6,nonoptional:()=>P$,nonpositive:()=>V6,normalize:()=>op,null:()=>l$,nullable:()=>gy,nullish:()=>qV,number:()=>s$,object:()=>LV,optional:()=>hy,overwrite:()=>Ai,parse:()=>o2,parseAsync:()=>i2,partialRecord:()=>jV,pipe:()=>yy,positive:()=>F6,prefault:()=>N$,preprocess:()=>iZ,prettifyError:()=>i_,promise:()=>XV,property:()=>G6,readonly:()=>M$,record:()=>w$,refine:()=>Z$,regex:()=>Yd,regexes:()=>Zn,registry:()=>Fg,safeDecode:()=>p2,safeDecodeAsync:()=>h2,safeEncode:()=>d2,safeEncodeAsync:()=>m2,safeParse:()=>s2,safeParseAsync:()=>a2,set:()=>HV,setErrorMap:()=>aZ,size:()=>Jd,startsWith:()=>tp,strictObject:()=>UV,string:()=>g2,stringFormat:()=>vV,stringbool:()=>nZ,success:()=>WV,superRefine:()=>G$,symbol:()=>OV,templateLiteral:()=>YV,toJSONSchema:()=>Q6,toLowerCase:()=>sp,toUpperCase:()=>ap,transform:()=>j2,treeifyError:()=>o_,trim:()=>ip,tuple:()=>_$,uint32:()=>kV,uint64:()=>$V,ulid:()=>uV,undefined:()=>NV,union:()=>U2,unknown:()=>gf,uppercase:()=>Qd,url:()=>nV,util:()=>ee,uuid:()=>QH,uuidv4:()=>eV,uuidv6:()=>tV,uuidv7:()=>rV,void:()=>BV,xid:()=>fV});var ki={};Ir(ki,{$ZodAny:()=>Pw,$ZodArray:()=>Uw,$ZodAsyncError:()=>po,$ZodBase64:()=>Ew,$ZodBase64URL:()=>Sw,$ZodBigInt:()=>zg,$ZodBigIntFormat:()=>Tw,$ZodBoolean:()=>Hd,$ZodCIDRv4:()=>vw,$ZodCIDRv6:()=>_w,$ZodCUID:()=>uw,$ZodCUID2:()=>fw,$ZodCatch:()=>t6,$ZodCheck:()=>ot,$ZodCheckBigIntFormat:()=>M_,$ZodCheckEndsWith:()=>Y_,$ZodCheckGreaterThan:()=>Tg,$ZodCheckIncludes:()=>K_,$ZodCheckLengthEquals:()=>Z_,$ZodCheckLessThan:()=>Rg,$ZodCheckLowerCase:()=>q_,$ZodCheckMaxLength:()=>H_,$ZodCheckMaxSize:()=>D_,$ZodCheckMimeType:()=>Q_,$ZodCheckMinLength:()=>V_,$ZodCheckMinSize:()=>j_,$ZodCheckMultipleOf:()=>L_,$ZodCheckNumberFormat:()=>U_,$ZodCheckOverwrite:()=>ew,$ZodCheckProperty:()=>X_,$ZodCheckRegex:()=>G_,$ZodCheckSizeEquals:()=>F_,$ZodCheckStartsWith:()=>J_,$ZodCheckStringFormat:()=>ff,$ZodCheckUpperCase:()=>W_,$ZodCodec:()=>Vd,$ZodCustom:()=>u6,$ZodCustomStringFormat:()=>kw,$ZodDate:()=>Lw,$ZodDefault:()=>Yw,$ZodDiscriminatedUnion:()=>Dw,$ZodE164:()=>Iw,$ZodEmail:()=>iw,$ZodEmoji:()=>aw,$ZodEncodeError:()=>Is,$ZodEnum:()=>Zw,$ZodError:()=>Ld,$ZodFile:()=>qw,$ZodFunction:()=>s6,$ZodGUID:()=>nw,$ZodIPv4:()=>bw,$ZodIPv6:()=>xw,$ZodISODate:()=>hw,$ZodISODateTime:()=>mw,$ZodISODuration:()=>yw,$ZodISOTime:()=>gw,$ZodIntersection:()=>jw,$ZodJWT:()=>Aw,$ZodKSUID:()=>pw,$ZodLazy:()=>c6,$ZodLiteral:()=>Gw,$ZodMap:()=>Hw,$ZodNaN:()=>r6,$ZodNanoID:()=>cw,$ZodNever:()=>Cw,$ZodNonOptional:()=>Qw,$ZodNull:()=>Nw,$ZodNullable:()=>Jw,$ZodNumber:()=>Cg,$ZodNumberFormat:()=>Rw,$ZodObject:()=>c8,$ZodObjectJIT:()=>Mw,$ZodOptional:()=>Kw,$ZodPipe:()=>n6,$ZodPrefault:()=>Xw,$ZodPromise:()=>a6,$ZodReadonly:()=>o6,$ZodRealError:()=>un,$ZodRecord:()=>Fw,$ZodRegistry:()=>lf,$ZodSet:()=>Vw,$ZodString:()=>Va,$ZodStringFormat:()=>Je,$ZodSuccess:()=>e6,$ZodSymbol:()=>$w,$ZodTemplateLiteral:()=>i6,$ZodTransform:()=>Ww,$ZodTuple:()=>Ug,$ZodType:()=>ve,$ZodULID:()=>lw,$ZodURL:()=>sw,$ZodUUID:()=>ow,$ZodUndefined:()=>Ow,$ZodUnion:()=>Lg,$ZodUnknown:()=>Bw,$ZodVoid:()=>zw,$ZodXID:()=>dw,$brand:()=>mg,$constructor:()=>B,$input:()=>l6,$output:()=>f6,Doc:()=>Fd,JSONSchema:()=>n$,JSONSchemaGenerator:()=>cp,NEVER:()=>Wv,TimePrecision:()=>m6,_any:()=>C6,_array:()=>q6,_base64:()=>iy,_base64url:()=>sy,_bigint:()=>R6,_boolean:()=>A6,_catch:()=>FH,_check:()=>r$,_cidrv4:()=>ny,_cidrv6:()=>oy,_coercedBigint:()=>T6,_coercedBoolean:()=>k6,_coercedDate:()=>D6,_coercedNumber:()=>v6,_coercedString:()=>p6,_cuid:()=>Jg,_cuid2:()=>Yg,_custom:()=>K6,_date:()=>M6,_decode:()=>vg,_decodeAsync:()=>wg,_default:()=>MH,_discriminatedUnion:()=>kH,_e164:()=>ay,_email:()=>Hg,_emoji:()=>Wg,_encode:()=>xg,_encodeAsync:()=>_g,_endsWith:()=>rp,_enum:()=>PH,_file:()=>W6,_float32:()=>w6,_float64:()=>E6,_gt:()=>Ii,_gte:()=>fn,_guid:()=>Wd,_includes:()=>ep,_int:()=>_6,_int32:()=>S6,_int64:()=>$6,_intersection:()=>RH,_ipv4:()=>ty,_ipv6:()=>ry,_isoDate:()=>g6,_isoDateTime:()=>h6,_isoDuration:()=>b6,_isoTime:()=>y6,_jwt:()=>cy,_ksuid:()=>ey,_lazy:()=>GH,_length:()=>mf,_literal:()=>CH,_lowercase:()=>Xd,_lt:()=>Si,_lte:()=>Gn,_map:()=>OH,_max:()=>Gn,_maxLength:()=>pf,_maxSize:()=>df,_mime:()=>np,_min:()=>fn,_minLength:()=>Os,_minSize:()=>Ga,_multipleOf:()=>Za,_nan:()=>j6,_nanoid:()=>Kg,_nativeEnum:()=>BH,_negative:()=>H6,_never:()=>L6,_nonnegative:()=>Z6,_nonoptional:()=>DH,_nonpositive:()=>V6,_normalize:()=>op,_null:()=>B6,_nullable:()=>UH,_number:()=>x6,_optional:()=>LH,_overwrite:()=>Ai,_parse:()=>sf,_parseAsync:()=>af,_pipe:()=>HH,_positive:()=>F6,_promise:()=>qH,_property:()=>G6,_readonly:()=>VH,_record:()=>$H,_refine:()=>J6,_regex:()=>Yd,_safeDecode:()=>Sg,_safeDecodeAsync:()=>Ag,_safeEncode:()=>Eg,_safeEncodeAsync:()=>Ig,_safeParse:()=>cf,_safeParseAsync:()=>uf,_set:()=>NH,_size:()=>Jd,_startsWith:()=>tp,_string:()=>d6,_stringFormat:()=>hf,_stringbool:()=>X6,_success:()=>jH,_superRefine:()=>Y6,_symbol:()=>N6,_templateLiteral:()=>ZH,_toLowerCase:()=>sp,_toUpperCase:()=>ap,_transform:()=>zH,_trim:()=>ip,_tuple:()=>TH,_uint32:()=>I6,_uint64:()=>O6,_ulid:()=>Xg,_undefined:()=>P6,_union:()=>AH,_unknown:()=>z6,_uppercase:()=>Qd,_url:()=>Kd,_uuid:()=>Vg,_uuidv4:()=>Zg,_uuidv6:()=>Gg,_uuidv7:()=>qg,_void:()=>U6,_xid:()=>Qg,clone:()=>Zr,config:()=>wt,decode:()=>W7,decodeAsync:()=>J7,encode:()=>q7,encodeAsync:()=>K7,flattenError:()=>Ud,formatError:()=>Md,globalConfig:()=>$d,globalRegistry:()=>Fo,isValidBase64:()=>ww,isValidBase64URL:()=>o8,isValidJWT:()=>i8,locales:()=>qd,parse:()=>yg,parseAsync:()=>bg,prettifyError:()=>i_,regexes:()=>Zn,registry:()=>Fg,safeDecode:()=>X7,safeDecodeAsync:()=>eF,safeEncode:()=>Y7,safeEncodeAsync:()=>Q7,safeParse:()=>s_,safeParseAsync:()=>a_,toDotPath:()=>j4,toJSONSchema:()=>Q6,treeifyError:()=>o_,util:()=>ee,version:()=>tw});var Wv=Object.freeze({status:"aborted"});function B(e,t,r){function o(a,c){var u;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:false}),(u=a._zod).traits??(u.traits=new Set),a._zod.traits.add(e),t(a,c);for(let l in s.prototype)l in a||Object.defineProperty(a,l,{value:s.prototype[l].bind(a)});a._zod.constr=s,a._zod.def=c;}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function s(a){var c;let u=r?.Parent?new i:this;o(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(s,"init",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?true:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var mg=Symbol("zod_brand"),po=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");}},Is=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError";}},$d={};function wt(e){return e&&Object.assign($d,e),$d}var ee={};Ir(ee,{BIGINT_FORMAT_RANGES:()=>n_,Class:()=>Jv,NUMBER_FORMAT_RANGES:()=>r_,aborted:()=>$s,allowsEval:()=>Xv,assert:()=>I7,assertEqual:()=>_7,assertIs:()=>E7,assertNever:()=>S7,assertNotEqual:()=>w7,assignProp:()=>ks,base64ToUint8Array:()=>U4,base64urlToUint8Array:()=>F7,cached:()=>nf,captureStackTrace:()=>gg,cleanEnum:()=>j7,cleanRegex:()=>Pd,clone:()=>Zr,cloneDef:()=>k7,createTransparentProxy:()=>P7,defineLazy:()=>Ne,esc:()=>hg,escapeRegex:()=>jo,extend:()=>z7,finalizeIssue:()=>En,floatSafeRemainder:()=>Yv,getElementAtPath:()=>R7,getEnumValues:()=>Nd,getLengthableOrigin:()=>zd,getParsedType:()=>N7,getSizableOrigin:()=>Cd,hexToUint8Array:()=>V7,isObject:()=>Fa,isPlainObject:()=>Ts,issue:()=>of,joinValues:()=>D,jsonStringifyReplacer:()=>rf,merge:()=>U7,mergeDefs:()=>Rs,normalizeParams:()=>Q,nullish:()=>As,numKeys:()=>O7,objectClone:()=>A7,omit:()=>C7,optionalKeys:()=>t_,partial:()=>M7,pick:()=>B7,prefixIssues:()=>wn,primitiveTypes:()=>e_,promiseAllObject:()=>T7,propertyKeyTypes:()=>Bd,randomString:()=>$7,required:()=>D7,safeExtend:()=>L7,shallowClone:()=>Qv,stringifyPrimitive:()=>X,uint8ArrayToBase64:()=>M4,uint8ArrayToBase64url:()=>H7,uint8ArrayToHex:()=>Z7,unwrapMessage:()=>Od});function _7(e){return e}function w7(e){return e}function E7(e){}function S7(e){throw new Error}function I7(e){}function Nd(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function D(e,t="|"){return e.map(r=>X(r)).join(t)}function rf(e,t){return typeof t=="bigint"?t.toString():t}function nf(e){return {get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}}}}function As(e){return e==null}function Pd(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Yv(e,t){let r=(e.toString().split(".")[1]||"").length,o=t.toString(),n=(o.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(o)){let c=o.match(/\d?e-(\d?)/);c?.[1]&&(n=Number.parseInt(c[1]));}let i=r>n?r:n,s=Number.parseInt(e.toFixed(i).replace(".","")),a=Number.parseInt(t.toFixed(i).replace(".",""));return s%a/10**i}var L4=Symbol("evaluating");function Ne(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==L4)return o===void 0&&(o=L4,o=r()),o},set(n){Object.defineProperty(e,t,{value:n});},configurable:true});}function A7(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function ks(e,t,r){Object.defineProperty(e,t,{value:r,writable:true,enumerable:true,configurable:true});}function Rs(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o);}return Object.defineProperties({},t)}function k7(e){return Rs(e._zod.def)}function R7(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function T7(e){let t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{let n={};for(let i=0;i<t.length;i++)n[t[i]]=o[i];return n})}function $7(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function hg(e){return JSON.stringify(e)}var gg="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Fa(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Xv=nf(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return false;try{let e=Function;return new e(""),!0}catch{return false}});function Ts(e){if(Fa(e)===false)return false;let t=e.constructor;if(t===void 0)return true;let r=t.prototype;return !(Fa(r)===false||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===false)}function Qv(e){return Ts(e)?{...e}:Array.isArray(e)?[...e]:e}function O7(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var N7=e=>{let t=typeof e;switch(t){case "undefined":return "undefined";case "string":return "string";case "number":return Number.isNaN(e)?"nan":"number";case "boolean":return "boolean";case "function":return "function";case "bigint":return "bigint";case "symbol":return "symbol";case "object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Bd=new Set(["string","number","symbol"]),e_=new Set(["string","number","bigint","boolean","symbol","undefined"]);function jo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Zr(e,t,r){let o=new e._zod.constr(t??e._zod.def);return (!t||r?.parent)&&(o._zod.parent=e),o}function Q(e){let t=e;if(!t)return {};if(typeof t=="string")return {error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message;}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function P7(e){let t;return new Proxy({},{get(r,o,n){return t??(t=e()),Reflect.get(t,o,n)},set(r,o,n,i){return t??(t=e()),Reflect.set(t,o,n,i)},has(r,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t??(t=e()),Reflect.defineProperty(t,o,n)}})}function X(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function t_(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var r_={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},n_={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function B7(e,t){let r=e._zod.def,o=Rs(e._zod.def,{get shape(){let n={};for(let i in t){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(n[i]=r.shape[i]);}return ks(this,"shape",n),n},checks:[]});return Zr(e,o)}function C7(e,t){let r=e._zod.def,o=Rs(e._zod.def,{get shape(){let n={...e._zod.def.shape};for(let i in t){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&delete n[i];}return ks(this,"shape",n),n},checks:[]});return Zr(e,o)}function z7(e,t){if(!Ts(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");let n=Rs(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return ks(this,"shape",i),i},checks:[]});return Zr(e,n)}function L7(e,t){if(!Ts(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r={...e._zod.def,get shape(){let o={...e._zod.def.shape,...t};return ks(this,"shape",o),o},checks:e._zod.def.checks};return Zr(e,r)}function U7(e,t){let r=Rs(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return ks(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return Zr(e,r)}function M7(e,t,r){let o=Rs(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let s in r){if(!(s in n))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=e?new e({type:"optional",innerType:n[s]}):n[s]);}else for(let s in n)i[s]=e?new e({type:"optional",innerType:n[s]}):n[s];return ks(this,"shape",i),i},checks:[]});return Zr(t,o)}function D7(e,t,r){let o=Rs(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=new e({type:"nonoptional",innerType:n[s]}));}else for(let s in n)i[s]=new e({type:"nonoptional",innerType:n[s]});return ks(this,"shape",i),i},checks:[]});return Zr(t,o)}function $s(e,t=0){if(e.aborted===true)return true;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==true)return true;return false}function wn(e,t){return t.map(r=>{var o;return (o=r).path??(o.path=[]),r.path.unshift(e),r})}function Od(e){return typeof e=="string"?e:e?.message}function En(e,t,r){let o={...e,path:e.path??[]};if(!e.message){let n=Od(e.inst?._zod.def?.error?.(e))??Od(t?.error?.(e))??Od(r.customError?.(e))??Od(r.localeError?.(e))??"Invalid input";o.message=n;}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function Cd(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function zd(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function of(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function j7(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function U4(e){let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r}function M4(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function F7(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return U4(t+r)}function H7(e){return M4(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function V7(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)r[o/2]=Number.parseInt(t.slice(o,o+2),16);return r}function Z7(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Jv=class{constructor(...t){}};var D4=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:false}),Object.defineProperty(e,"issues",{value:t,enumerable:false}),e.message=JSON.stringify(t,rf,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:false});},Ld=B("$ZodError",D4),un=B("$ZodError",D4,{Parent:Error});function Ud(e,t=r=>r.message){let r={},o=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):o.push(t(n));return {formErrors:o,fieldErrors:r}}function Md(e,t=r=>r.message){let r={_errors:[]},o=n=>{for(let i of n.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>o({issues:s}));else if(i.code==="invalid_key")o({issues:i.issues});else if(i.code==="invalid_element")o({issues:i.issues});else if(i.path.length===0)r._errors.push(t(i));else {let s=r,a=0;for(;a<i.path.length;){let c=i.path[a];a===i.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(t(i))):s[c]=s[c]||{_errors:[]},s=s[c],a++;}}};return o(e),r}function o_(e,t=r=>r.message){let r={errors:[]},o=(n,i=[])=>{var s,a;for(let c of n.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>o({issues:u},c.path));else if(c.code==="invalid_key")o({issues:c.issues},c.path);else if(c.code==="invalid_element")o({issues:c.issues},c.path);else {let u=[...i,...c.path];if(u.length===0){r.errors.push(t(c));continue}let l=r,d=0;for(;d<u.length;){let g=u[d],h=d===u.length-1;typeof g=="string"?(l.properties??(l.properties={}),(s=l.properties)[g]??(s[g]={errors:[]}),l=l.properties[g]):(l.items??(l.items=[]),(a=l.items)[g]??(a[g]={errors:[]}),l=l.items[g]),h&&l.errors.push(t(c)),d++;}}};return o(e),r}function j4(e){let t=[],r=e.map(o=>typeof o=="object"?o.key:o);for(let o of r)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function i_(e){let t=[],r=[...e.issues].sort((o,n)=>(o.path??[]).length-(n.path??[]).length);for(let o of r)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${j4(o.path)}`);return t.join(`
|
|
49
|
-
`)}var sf=e=>(t,r,o,n)=>{let i=o?Object.assign(o,{async:false}):{async:false},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new po;if(s.issues.length){let a=new(n?.Err??e)(s.issues.map(c=>En(c,i,wt())));throw gg(a,n?.callee),a}return s.value},yg=sf(un),af=e=>async(t,r,o,n)=>{let i=o?Object.assign(o,{async:true}):{async:true},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(n?.Err??e)(s.issues.map(c=>En(c,i,wt())));throw gg(a,n?.callee),a}return s.value},bg=af(un),cf=e=>(t,r,o)=>{let n=o?{...o,async:false}:{async:false},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new po;return i.issues.length?{success:false,error:new(e??Ld)(i.issues.map(s=>En(s,n,wt())))}:{success:true,data:i.value}},s_=cf(un),uf=e=>async(t,r,o)=>{let n=o?Object.assign(o,{async:true}):{async:true},i=t._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:false,error:new e(i.issues.map(s=>En(s,n,wt())))}:{success:true,data:i.value}},a_=uf(un),xg=e=>(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return sf(e)(t,r,n)},q7=xg(un),vg=e=>(t,r,o)=>sf(e)(t,r,o),W7=vg(un),_g=e=>async(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return af(e)(t,r,n)},K7=_g(un),wg=e=>async(t,r,o)=>af(e)(t,r,o),J7=wg(un),Eg=e=>(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return cf(e)(t,r,n)},Y7=Eg(un),Sg=e=>(t,r,o)=>cf(e)(t,r,o),X7=Sg(un),Ig=e=>async(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return uf(e)(t,r,n)},Q7=Ig(un),Ag=e=>async(t,r,o)=>uf(e)(t,r,o),eF=Ag(un);var Zn={};Ir(Zn,{base64:()=>w_,base64url:()=>kg,bigint:()=>T_,boolean:()=>N_,browserEmail:()=>cF,cidrv4:()=>v_,cidrv6:()=>__,cuid:()=>c_,cuid2:()=>u_,date:()=>I_,datetime:()=>k_,domain:()=>fF,duration:()=>m_,e164:()=>S_,email:()=>g_,emoji:()=>y_,extendedDuration:()=>tF,guid:()=>h_,hex:()=>lF,hostname:()=>E_,html5Email:()=>iF,idnEmail:()=>aF,integer:()=>$_,ipv4:()=>b_,ipv6:()=>x_,ksuid:()=>d_,lowercase:()=>C_,md5_base64:()=>pF,md5_base64url:()=>mF,md5_hex:()=>dF,nanoid:()=>p_,null:()=>P_,number:()=>O_,rfc5322Email:()=>sF,sha1_base64:()=>gF,sha1_base64url:()=>yF,sha1_hex:()=>hF,sha256_base64:()=>xF,sha256_base64url:()=>vF,sha256_hex:()=>bF,sha384_base64:()=>wF,sha384_base64url:()=>EF,sha384_hex:()=>_F,sha512_base64:()=>IF,sha512_base64url:()=>AF,sha512_hex:()=>SF,string:()=>R_,time:()=>A_,ulid:()=>f_,undefined:()=>B_,unicodeEmail:()=>F4,uppercase:()=>z_,uuid:()=>Ha,uuid4:()=>rF,uuid6:()=>nF,uuid7:()=>oF,xid:()=>l_});var c_=/^[cC][^\s-]{8,}$/,u_=/^[0-9a-z]+$/,f_=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,l_=/^[0-9a-vA-V]{20}$/,d_=/^[A-Za-z0-9]{27}$/,p_=/^[a-zA-Z0-9_-]{21}$/,m_=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,tF=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,h_=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ha=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,rF=Ha(4),nF=Ha(6),oF=Ha(7),g_=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,iF=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,sF=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,F4=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,aF=F4,cF=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,uF="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function y_(){return new RegExp(uF,"u")}var b_=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,x_=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,v_=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,__=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,w_=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,kg=/^[A-Za-z0-9_-]*$/,E_=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,fF=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,S_=/^\+(?:[0-9]){6,14}[0-9]$/,H4="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",I_=new RegExp(`^${H4}$`);function V4(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function A_(e){return new RegExp(`^${V4(e)}$`)}function k_(e){let t=V4({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${r.join("|")})`;return new RegExp(`^${H4}T(?:${o})$`)}var R_=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},T_=/^-?\d+n?$/,$_=/^-?\d+$/,O_=/^-?\d+(?:\.\d+)?/,N_=/^(?:true|false)$/i,P_=/^null$/i;var B_=/^undefined$/i;var C_=/^[^A-Z]*$/,z_=/^[^a-z]*$/,lF=/^[0-9a-fA-F]*$/;function Dd(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function jd(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var dF=/^[0-9a-fA-F]{32}$/,pF=Dd(22,"=="),mF=jd(22),hF=/^[0-9a-fA-F]{40}$/,gF=Dd(27,"="),yF=jd(27),bF=/^[0-9a-fA-F]{64}$/,xF=Dd(43,"="),vF=jd(43),_F=/^[0-9a-fA-F]{96}$/,wF=Dd(64,""),EF=jd(64),SF=/^[0-9a-fA-F]{128}$/,IF=Dd(86,"=="),AF=jd(86);var ot=B("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[]);}),G4={number:"number",bigint:"bigint",object:"date"},Rg=B("$ZodCheckLessThan",(e,t)=>{ot.init(e,t);let r=G4[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value);}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:r,code:"too_big",maximum:t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort});};}),Tg=B("$ZodCheckGreaterThan",(e,t)=>{ot.init(e,t);let r=G4[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value);}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:r,code:"too_small",minimum:t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort});};}),L_=B("$ZodCheckMultipleOf",(e,t)=>{ot.init(e,t),e._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=t.value);}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Yv(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort});};}),U_=B("$ZodCheckNumberFormat",(e,t)=>{ot.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,i]=r_[t.format];e._zod.onattach.push(s=>{let a=s._zod.bag;a.format=t.format,a.minimum=n,a.maximum=i,r&&(a.pattern=$_);}),e._zod.check=s=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:o,format:t.format,code:"invalid_type",continue:false,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!t.abort});return}}a<n&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:n,inclusive:true,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inst:e});};}),M_=B("$ZodCheckBigIntFormat",(e,t)=>{ot.init(e,t);let[r,o]=n_[t.format];e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o;}),e._zod.check=n=>{let i=n.value;i<r&&n.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:true,inst:e,continue:!t.abort}),i>o&&n.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inst:e});};}),D_=B("$ZodCheckMaxSize",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !As(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum);}),e._zod.check=o=>{let n=o.value;n.size<=t.maximum||o.issues.push({origin:Cd(n),code:"too_big",maximum:t.maximum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),j_=B("$ZodCheckMinSize",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !As(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum);}),e._zod.check=o=>{let n=o.value;n.size>=t.minimum||o.issues.push({origin:Cd(n),code:"too_small",minimum:t.minimum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),F_=B("$ZodCheckSizeEquals",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !As(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size;}),e._zod.check=o=>{let n=o.value,i=n.size;if(i===t.size)return;let s=i>t.size;o.issues.push({origin:Cd(n),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:true,exact:true,input:o.value,inst:e,continue:!t.abort});};}),H_=B("$ZodCheckMaxLength",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !As(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum);}),e._zod.check=o=>{let n=o.value;if(n.length<=t.maximum)return;let s=zd(n);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),V_=B("$ZodCheckMinLength",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !As(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum);}),e._zod.check=o=>{let n=o.value;if(n.length>=t.minimum)return;let s=zd(n);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),Z_=B("$ZodCheckLengthEquals",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !As(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length;}),e._zod.check=o=>{let n=o.value,i=n.length;if(i===t.length)return;let s=zd(n),a=i>t.length;o.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:true,exact:true,input:o.value,inst:e,continue:!t.abort});};}),ff=B("$ZodCheckStringFormat",(e,t)=>{var r,o;ot.init(e,t),e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern));}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort});}):(o=e._zod).check??(o.check=()=>{});}),G_=B("$ZodCheckRegex",(e,t)=>{ff.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort});};}),q_=B("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=C_),ff.init(e,t);}),W_=B("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=z_),ff.init(e,t);}),K_=B("$ZodCheckIncludes",(e,t)=>{ot.init(e,t);let r=jo(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o);}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort});};}),J_=B("$ZodCheckStartsWith",(e,t)=>{ot.init(e,t);let r=new RegExp(`^${jo(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r);}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort});};}),Y_=B("$ZodCheckEndsWith",(e,t)=>{ot.init(e,t);let r=new RegExp(`.*${jo(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r);}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort});};});function Z4(e,t,r){e.issues.length&&t.issues.push(...wn(r,e.issues));}var X_=B("$ZodCheckProperty",(e,t)=>{ot.init(e,t),e._zod.check=r=>{let o=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(n=>Z4(n,r,t.property));Z4(o,r,t.property);};}),Q_=B("$ZodCheckMimeType",(e,t)=>{ot.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime;}),e._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort});};}),ew=B("$ZodCheckOverwrite",(e,t)=>{ot.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value);};});var Fd=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t);}indented(t){this.indent+=1,t(this),this.indent-=1;}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(`
|
|
29
|
+
`,n+=b4(o.state)),o.stateDiff&&(n+=` stateDiff:
|
|
30
|
+
`,n+=b4(o.stateDiff)),n},` State Override:
|
|
31
|
+
`).slice(0,-1)}var ig,sg,e2=F(()=>{Te();ig=class extends z{constructor({address:t}){super(`State for account "${t}" is set multiple times.`,{name:"AccountStateConflictError"});}},sg=class extends z{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"});}};});function Ca(e){let t=Object.entries(e).map(([o,n])=>n===void 0||n===false?null:[o,n]).filter(Boolean),r=t.reduce((o,[n])=>Math.max(o,n.length),0);return t.map(([o,n])=>` ${`${o}:`.padEnd(r+1)} ${n}`).join(`
|
|
32
|
+
`)}var ag,cg,ug,fg,ws,bu,lg,dg,Mn=F(()=>{og();yu();Te();ag=class extends z{constructor({v:t}){super(`Invalid \`v\` value "${t}". Expected 27 or 28.`,{name:"InvalidLegacyVError"});}},cg=class extends z{constructor({transaction:t}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",Ca(t),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"});}},ug=class extends z{constructor({storageKey:t}){super(`Size for storage key "${t}" is invalid. Expected 32 bytes. Got ${Math.floor((t.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"});}},fg=class extends z{constructor(t,{account:r,docsPath:o,chain:n,data:i,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:f,to:d,value:g}){let h=Ca({chain:n&&`${n?.name} (id: ${n?.id})`,from:r?.address,to:d,value:typeof g<"u"&&`${gu(g)} ${n?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:s,gasPrice:typeof a<"u"&&`${or(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${or(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${or(u)} gwei`,nonce:f});super(t.shortMessage,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Request Arguments:",h].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),this.cause=t;}},ws=class extends z{constructor({blockHash:t,blockNumber:r,blockTag:o,hash:n,index:i}){let s="Transaction";o&&i!==void 0&&(s=`Transaction at block time "${o}" at index "${i}"`),t&&i!==void 0&&(s=`Transaction at block hash "${t}" at index "${i}"`),r&&i!==void 0&&(s=`Transaction at block number "${r}" at index "${i}"`),n&&(s=`Transaction with hash "${n}"`),super(`${s} could not be found.`,{name:"TransactionNotFoundError"});}},bu=class extends z{constructor({hash:t}){super(`Transaction receipt with hash "${t}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"});}},lg=class extends z{constructor({receipt:t}){super(`Transaction with hash "${t.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:true,configurable:true,writable:true,value:void 0}),this.receipt=t;}},dg=class extends z{constructor({hash:t}){super(`Timed out while waiting for transaction with hash "${t}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"});}};});function wr(e){if(e?.reason)return e.reason;if(typeof DOMException=="function")return new DOMException("This operation was aborted","AbortError");let t=new Error("This operation was aborted");return t.name="AbortError",t}function ln(e){return typeof e=="object"&&e!==null&&"name"in e&&e.name==="AbortError"}var v4,za,mo=F(()=>{v4=e=>e;za=e=>{try{let t=new URL(e);return !t.username&&!t.password?e:(t.username="",t.password="",t.toString())}catch{return e}};});var _s,xu,La,pg,mg,Ho,Ai=F(()=>{fn();Y0();J6();xi();h4();xs();og();yu();Et();Te();e2();Mn();mo();_s=class extends z{constructor(t,{account:r,docsPath:o,chain:n,data:i,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:f,to:d,value:g,stateOverride:h}){let v=r?qe(r):void 0,E=Ca({from:v?.address,to:d,value:typeof g<"u"&&`${gu(g)} ${n?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:s,gasPrice:typeof a<"u"&&`${or(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${or(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${or(u)} gwei`,nonce:f});h&&(E+=`
|
|
33
|
+
${x4(h)}`),super(t.shortMessage,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Raw Call Arguments:",E].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),this.cause=t;}},xu=class extends z{constructor(t,{abi:r,args:o,contractAddress:n,docsPath:i,functionName:s,sender:a}){let c=un({abi:r,args:o,name:s}),u=c?Y6({abiItem:c,args:o,includeFunctionName:false,includeName:false}):void 0,f=c?nr(c,{includeName:true}):void 0,d=Ca({address:n&&v4(n),function:f,args:u&&u!=="()"&&`${[...Array(s?.length??0).keys()].map(()=>" ").join("")}${u}`,sender:a});super(t.shortMessage||`An unknown error occurred while executing the contract function "${s}".`,{cause:t,docsPath:i,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],d&&"Contract Call:",d].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"args",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"sender",{enumerable:true,configurable:true,writable:true,value:void 0}),this.abi=r,this.args=o,this.cause=t,this.contractAddress=n,this.functionName=s,this.sender=a;}},La=class extends z{constructor({abi:t,data:r,functionName:o,message:n,cause:i}){let s,a,c,u;if(r&&r!=="0x")try{a=eg({abi:t,data:r,cause:i});let{abiItem:d,errorName:g,args:h}=a;if(g==="Error")u=h[0];else if(g==="Panic"){let[v]=h;u=c4[v];}else {let v=d?nr(d,{includeName:!0}):void 0,E=d&&h?Y6({abiItem:d,args:h,includeFunctionName:!1,includeName:!1}):void 0;c=[v?`Error: ${v}`:"",E&&E!=="()"?` ${[...Array(g?.length??0).keys()].map(()=>" ").join("")}${E}`:""];}}catch(d){s=d;}else n&&(u=n);let f;s instanceof cu&&(f=s.signature,c=[`Unable to decode signature "${f}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://4byte.sourcify.dev/?q=${f}.`]),super(u&&u!=="execution reverted"||f?[`The contract function "${o}" reverted with the following ${f?"signature":"reason"}:`,u||f].join(`
|
|
34
|
+
`):`The contract function "${o}" reverted.`,{cause:s??i,metaMessages:c,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"raw",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"reason",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"signature",{enumerable:true,configurable:true,writable:true,value:void 0}),this.data=a,this.raw=r,this.reason=u,this.signature=f;}},pg=class extends z{constructor({functionName:t,cause:r}){super(`The contract function "${t}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${t}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError",cause:r});}},mg=class extends z{constructor({factory:t}){super(`Deployment for counterfactual contract call failed${t?` for factory "${t}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"});}},Ho=class extends z{constructor({data:t,message:r}){super(r||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:3}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),this.data=t;}};});var Dn,Ua,Es,rp,Ma=F(()=>{Pr();Te();mo();Dn=class extends z{constructor({body:t,cause:r,details:o,headers:n,status:i,url:s}){super("HTTP request failed.",{cause:r,details:o,metaMessages:[i&&`Status: ${i}`,`URL: ${za(s)}`,t&&`Request body: ${Be(t)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"headers",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"status",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"url",{enumerable:true,configurable:true,writable:true,value:void 0}),this.body=t,this.headers=n,this.status=i,this.url=s;}},Ua=class extends z{constructor({maxSize:t,size:r}){super("HTTP response body exceeded the size limit.",{metaMessages:[`Max: ${t} bytes`,`Received: ${r} bytes`],name:"ResponseBodyTooLargeError"}),Object.defineProperty(this,"maxSize",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"size",{enumerable:true,configurable:true,writable:true,value:void 0}),this.maxSize=t,this.size=r;}},Es=class extends z{constructor({body:t,error:r,url:o}){super("RPC Request failed.",{cause:r,details:r.message,metaMessages:[`URL: ${za(o)}`,`Request body: ${Be(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"url",{enumerable:true,configurable:true,writable:true,value:void 0}),this.code=r.code,this.data=r.data,this.url=o;}},rp=class extends z{constructor({body:t,url:r}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${za(r)}`,`Request body: ${Be(t)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:true,configurable:true,writable:true,value:void 0}),this.url=r;}};});var VH,Br,Cr,vu,wu,_u,Eu,ki,jn,Su,Iu,Au,Ss,Da,ku,ja,Ru,Tu,$u,Ou,Nu,Pu,Bu,Cu,zu,Lu,Uu,Mu,Du,hg,np=F(()=>{Te();Ma();VH=-1,Br=class extends z{constructor(t,{code:r,docsPath:o,metaMessages:n,name:i,shortMessage:s}){super(s,{cause:t,docsPath:o,metaMessages:n||t?.metaMessages,name:i||"RpcError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0}),this.name=i||t.name,this.code=t instanceof Es?t.code:r??VH;}},Cr=class extends Br{constructor(t,r){super(t,r),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),this.data=r.data;}},vu=class e extends Br{constructor(t){super(t,{code:e.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."});}};Object.defineProperty(vu,"code",{enumerable:true,configurable:true,writable:true,value:-32700});wu=class e extends Br{constructor(t){super(t,{code:e.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."});}};Object.defineProperty(wu,"code",{enumerable:true,configurable:true,writable:true,value:-32600});_u=class e extends Br{constructor(t,{method:r}={}){super(t,{code:e.code,name:"MethodNotFoundRpcError",shortMessage:`The method${r?` "${r}"`:""} does not exist / is not available.`});}};Object.defineProperty(_u,"code",{enumerable:true,configurable:true,writable:true,value:-32601});Eu=class e extends Br{constructor(t){super(t,{code:e.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
|
|
35
|
+
`)});}};Object.defineProperty(Eu,"code",{enumerable:true,configurable:true,writable:true,value:-32602});ki=class e extends Br{constructor(t){super(t,{code:e.code,name:"InternalRpcError",shortMessage:"An internal error was received."});}};Object.defineProperty(ki,"code",{enumerable:true,configurable:true,writable:true,value:-32603});jn=class e extends Br{constructor(t){super(t,{code:e.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
|
|
36
|
+
`)});}};Object.defineProperty(jn,"code",{enumerable:true,configurable:true,writable:true,value:-32e3});Su=class e extends Br{constructor(t){super(t,{code:e.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"ResourceNotFoundRpcError"});}};Object.defineProperty(Su,"code",{enumerable:true,configurable:true,writable:true,value:-32001});Iu=class e extends Br{constructor(t){super(t,{code:e.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."});}};Object.defineProperty(Iu,"code",{enumerable:true,configurable:true,writable:true,value:-32002});Au=class e extends Br{constructor(t){super(t,{code:e.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."});}};Object.defineProperty(Au,"code",{enumerable:true,configurable:true,writable:true,value:-32003});Ss=class e extends Br{constructor(t,{method:r}={}){super(t,{code:e.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${r?` "${r}"`:""} is not supported.`});}};Object.defineProperty(Ss,"code",{enumerable:true,configurable:true,writable:true,value:-32004});Da=class e extends Br{constructor(t){super(t,{code:e.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."});}};Object.defineProperty(Da,"code",{enumerable:true,configurable:true,writable:true,value:-32005});ku=class e extends Br{constructor(t){super(t,{code:e.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."});}};Object.defineProperty(ku,"code",{enumerable:true,configurable:true,writable:true,value:-32006});ja=class e extends Cr{constructor(t){super(t,{code:e.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."});}};Object.defineProperty(ja,"code",{enumerable:true,configurable:true,writable:true,value:4001});Ru=class e extends Cr{constructor(t){super(t,{code:e.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."});}};Object.defineProperty(Ru,"code",{enumerable:true,configurable:true,writable:true,value:4100});Tu=class e extends Cr{constructor(t,{method:r}={}){super(t,{code:e.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${r?` " ${r}"`:""}.`});}};Object.defineProperty(Tu,"code",{enumerable:true,configurable:true,writable:true,value:4200});$u=class e extends Cr{constructor(t){super(t,{code:e.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."});}};Object.defineProperty($u,"code",{enumerable:true,configurable:true,writable:true,value:4900});Ou=class e extends Cr{constructor(t){super(t,{code:e.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."});}};Object.defineProperty(Ou,"code",{enumerable:true,configurable:true,writable:true,value:4901});Nu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."});}};Object.defineProperty(Nu,"code",{enumerable:true,configurable:true,writable:true,value:4902});Pu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."});}};Object.defineProperty(Pu,"code",{enumerable:true,configurable:true,writable:true,value:5700});Bu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."});}};Object.defineProperty(Bu,"code",{enumerable:true,configurable:true,writable:true,value:5710});Cu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."});}};Object.defineProperty(Cu,"code",{enumerable:true,configurable:true,writable:true,value:5720});zu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"});}};Object.defineProperty(zu,"code",{enumerable:true,configurable:true,writable:true,value:5730});Lu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."});}};Object.defineProperty(Lu,"code",{enumerable:true,configurable:true,writable:true,value:5740});Uu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."});}};Object.defineProperty(Uu,"code",{enumerable:true,configurable:true,writable:true,value:5750});Mu=class e extends Cr{constructor(t){super(t,{code:e.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."});}};Object.defineProperty(Mu,"code",{enumerable:true,configurable:true,writable:true,value:5760});Du=class e extends Cr{constructor(t){super(t,{code:e.code,name:"WalletConnectSessionSettlementError",shortMessage:"WalletConnect session settlement failed."});}};Object.defineProperty(Du,"code",{enumerable:true,configurable:true,writable:true,value:7e3});hg=class extends Br{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."});}};});var yo,Fn,ju,Fu,Hu,Vu,Zu,Gu,qu,Wu,Vo,Hn,Ri=F(()=>{yu();Te();yo=class extends z{constructor({cause:t,message:r}={}){let o=r?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${o?`with reason: ${o}`:"for an unknown reason"}.`,{cause:t,name:"ExecutionRevertedError"});}};Object.defineProperty(yo,"code",{enumerable:true,configurable:true,writable:true,value:3});Object.defineProperty(yo,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/execution reverted|gas required exceeds allowance/});Fn=class extends z{constructor({cause:t,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${or(r)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:t,name:"FeeCapTooHighError"});}};Object.defineProperty(Fn,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});ju=class extends z{constructor({cause:t,maxFeePerGas:r}={}){super(`The fee cap (\`maxFeePerGas\`${r?` = ${or(r)}`:""} gwei) cannot be lower than the block base fee.`,{cause:t,name:"FeeCapTooLowError"});}};Object.defineProperty(ju,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});Fu=class extends z{constructor({cause:t,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}is higher than the next one expected.`,{cause:t,name:"NonceTooHighError"});}};Object.defineProperty(Fu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/nonce too high/});Hu=class extends z{constructor({cause:t,nonce:r}={}){super([`Nonce provided for the transaction ${r?`(${r}) `:""}is lower than the current nonce of the account.`,"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join(`
|
|
37
|
+
`),{cause:t,name:"NonceTooLowError"});}};Object.defineProperty(Hu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/nonce too low|transaction already imported|already known/});Vu=class extends z{constructor({cause:t,nonce:r}={}){super(`Nonce provided for the transaction ${r?`(${r}) `:""}exceeds the maximum allowed nonce.`,{cause:t,name:"NonceMaxValueError"});}};Object.defineProperty(Vu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/nonce has max value/});Zu=class extends z{constructor({cause:t}={}){super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join(`
|
|
38
|
+
`),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"});}};Object.defineProperty(Zu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/insufficient funds|exceeds transaction sender account balance/});Gu=class extends z{constructor({cause:t,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"});}};Object.defineProperty(Gu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/intrinsic gas too high|gas limit reached/});qu=class extends z{constructor({cause:t,gas:r}={}){super(`The amount of gas ${r?`(${r}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"});}};Object.defineProperty(qu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/intrinsic gas too low/});Wu=class extends z{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"});}};Object.defineProperty(Wu,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/transaction type not valid/});Vo=class extends z{constructor({cause:t,maxPriorityFeePerGas:r,maxFeePerGas:o}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${r?` = ${or(r)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${o?` = ${or(o)} gwei`:""}).`].join(`
|
|
39
|
+
`),{cause:t,name:"TipAboveFeeCapError"});}};Object.defineProperty(Vo,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});Hn=class extends z{constructor({cause:t}){super(`An error occurred while executing: ${t?.shortMessage}`,{cause:t,name:"UnknownNodeError"});}};});function Is(e,t){let r=(e.details||"").toLowerCase(),o=e instanceof z?e.walk(n=>n?.code===yo.code):e;return o instanceof z?new yo({cause:e,message:o.details}):yo.nodeMessage.test(r)?new yo({cause:e,message:e.details}):Fn.nodeMessage.test(r)?new Fn({cause:e,maxFeePerGas:t?.maxFeePerGas}):ju.nodeMessage.test(r)?new ju({cause:e,maxFeePerGas:t?.maxFeePerGas}):Fu.nodeMessage.test(r)?new Fu({cause:e,nonce:t?.nonce}):Hu.nodeMessage.test(r)?new Hu({cause:e,nonce:t?.nonce}):Vu.nodeMessage.test(r)?new Vu({cause:e,nonce:t?.nonce}):Zu.nodeMessage.test(r)?new Zu({cause:e}):Gu.nodeMessage.test(r)?new Gu({cause:e,gas:t?.gas}):qu.nodeMessage.test(r)?new qu({cause:e,gas:t?.gas}):Wu.nodeMessage.test(r)?new Wu({cause:e}):Vo.nodeMessage.test(r)?new Vo({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new Hn({cause:e})}var ip=F(()=>{Te();Ri();});function As(e,{format:t}){if(!t)return {};let r={};function o(i){let s=Object.keys(i);for(let a of s)a in e&&(r[a]=e[a]),i[a]&&typeof i[a]=="object"&&!Array.isArray(i[a])&&o(i[a]);}let n=t(e||{});return o(n),r}var sp=F(()=>{});function Ku(e,t){return ({exclude:r,format:o})=>({exclude:r,format:(n,i)=>{let s=t(n,i);if(r)for(let a of r)delete s[a];return {...s,...o(n,i)}},type:e})}var bg=F(()=>{});function Zo(e,t){let r={};return typeof e.authorizationList<"u"&&(r.authorizationList=KH(e.authorizationList)),typeof e.accessList<"u"&&(r.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(r.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?r.blobs=e.blobs.map(o=>Ue(o)):r.blobs=e.blobs),typeof e.data<"u"&&(r.data=e.data),e.account&&(r.from=e.account.address),typeof e.from<"u"&&(r.from=e.from),typeof e.gas<"u"&&(r.gas=J(e.gas)),typeof e.gasPrice<"u"&&(r.gasPrice=J(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(r.maxFeePerBlobGas=J(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(r.maxFeePerGas=J(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(r.maxPriorityFeePerGas=J(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(r.nonce=J(e.nonce)),typeof e.to<"u"&&(r.to=e.to),typeof e.type<"u"&&(r.type=WH[e.type]),typeof e.value<"u"&&(r.value=J(e.value)),r}function KH(e){return e.map(t=>({address:t.address,r:t.r?J(BigInt(t.r)):t.r,s:t.s?J(BigInt(t.s)):t.s,chainId:J(t.chainId),nonce:J(t.nonce),...typeof t.yParity<"u"?{yParity:J(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:J(t.v)}:{}}))}var WH,Ju=F(()=>{Re();WH={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};});function R4(e){if(!(!e||e.length===0))return e.reduce((t,{slot:r,value:o})=>{if(r.length!==66)throw new Gd({size:r.length,targetSize:66,type:"hex"});if(o.length!==66)throw new Gd({size:o.length,targetSize:66,type:"hex"});return t[r]=o,t},{})}function JH(e){let{balance:t,nonce:r,state:o,stateDiff:n,code:i}=e,s={};if(i!==void 0&&(s.code=i),t!==void 0&&(s.balance=J(t)),r!==void 0&&(s.nonce=J(r)),o!==void 0&&(s.state=R4(o)),n!==void 0){if(s.state)throw new sg;s.stateDiff=R4(n);}return s}function Yu(e){if(!e)return;let t={};for(let{address:r,...o}of e){if(!Me(r,{strict:false}))throw new nt({address:r});if(t[r])throw new ig({address:r});t[r]=JH(o);}return t}var xg=F(()=>{Lo();H0();e2();En();Re();});var Xu,t2=F(()=>{Xu=2n**256n-1n;});function Vn(e){let{account:t,maxFeePerGas:r,maxPriorityFeePerGas:o,to:n}=e,i=t?qe(t):void 0;if(i&&!Me(i.address))throw new nt({address:i.address});if(n&&!Me(n))throw new nt({address:n});if(r&&r>Xu)throw new Fn({maxFeePerGas:r});if(o&&r&&o>r)throw new Vo({maxFeePerGas:r,maxPriorityFeePerGas:o})}var Fa=F(()=>{fn();t2();Lo();Ri();En();});function Sn(e){let{blockHash:t,blockNumber:r,blockTag:o,requireCanonical:n}=e;if(n!==void 0&&!t)throw new z("`requireCanonical` can only be provided when `blockHash` is set.");return t?n?{blockHash:t,requireCanonical:n}:{blockHash:t}:typeof r=="bigint"?J(r):o??"latest"}var Va=F(()=>{Te();Re();});function zr(e,t){if(!Me(e,{strict:false}))throw new nt({address:e});if(!Me(t,{strict:false}))throw new nt({address:t});return e.toLowerCase()===t.toLowerCase()}var Ts=F(()=>{Lo();En();});function Lr(e){let{abi:t,args:r,functionName:o,data:n}=e,i=t[0];if(o){let a=un({abi:t,args:r,name:o});if(!a)throw new fo(o,{docsPath:i2});i=a;}if(i.type!=="function")throw new fo(void 0,{docsPath:i2});if(!i.outputs)throw new uu(i.name,{docsPath:i2});let s=Ii(i.outputs,n);if(s&&s.length>1)return s;if(s&&s.length===1)return s[0]}var i2,$i=F(()=>{Et();tp();xs();i2="/docs/contract/decodeFunctionResult";});var D4,j4=F(()=>{D4="0.1.1";});function F4(){return D4}var H4=F(()=>{j4();});function V4(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?V4(e.cause,t):t?null:e}var de,dn=F(()=>{H4();de=class e extends Error{static setStaticOptions(t){e.prototype.docsOrigin=t.docsOrigin,e.prototype.showVersion=t.showVersion,e.prototype.version=t.version;}constructor(t,r={}){let o=(()=>{if(r.cause instanceof e){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause&&"details"in r.cause&&typeof r.cause.details=="string"?r.cause.details:r.cause?.message?r.cause.message:r.details})(),n=r.cause instanceof e&&r.cause.docsPath||r.docsPath,i=r.docsOrigin??e.prototype.docsOrigin,s=`${i}${n??""}`,a=!!(r.version??e.prototype.showVersion),c=r.version??e.prototype.version,u=[t||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...o||n||a?["",o?`Details: ${o}`:void 0,n?`See: ${s}`:void 0,a?`Version: ${c}`:void 0]:[]].filter(f=>typeof f=="string").join(`
|
|
40
|
+
`);super(u,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docs",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsOrigin",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"showVersion",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"version",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"BaseError"}),this.cause=r.cause,this.details=o,this.docs=s,this.docsOrigin=i,this.docsPath=n,this.shortMessage=t,this.showVersion=a,this.version=c;}walk(t){return V4(this,t)}};Object.defineProperty(de,"defaultStaticOptions",{enumerable:true,configurable:true,writable:true,value:{docsOrigin:"https://oxlib.sh",showVersion:false,version:`ox@${F4()}`}});de.setStaticOptions(de.defaultStaticOptions);});function uf(e,t){if(Zn(e)>t)throw new Ng({givenSize:Zn(e),maxSize:t})}function s2(e){if(e>=Oi.zero&&e<=Oi.nine)return e-Oi.zero;if(e>=Oi.A&&e<=Oi.F)return e-(Oi.A-10);if(e>=Oi.a&&e<=Oi.f)return e-(Oi.a-10)}function q4(e,t={}){let{dir:r,size:o=32}=t;if(o===0)return e;if(e.length>o)throw new Pg({size:e.length,targetSize:o,type:"Bytes"});let n=new Uint8Array(o);for(let i=0;i<o;i++){let s=r==="right";n[s?i:o-i-1]=e[s?i:e.length-i-1];}return n}function a2(e,t={}){let{dir:r="left"}=t,o=e,n=0;for(let i=0;i<o.length-1&&o[r==="left"?i:o.length-i-1].toString()==="0";i++)n++;return o=r==="left"?o.slice(n):o.slice(0,o.length-n),o}var Oi,W4=F(()=>{$s();Oi={zero:48,nine:57,A:65,F:70,a:97,f:102};});function ff(e,t){if(lt(e)>t)throw new Bg({givenSize:lt(e),maxSize:t})}function K4(e,t){if(typeof t=="number"&&t>0&&t>lt(e)-1)throw new cp({offset:t,position:"start",size:lt(e)})}function J4(e,t,r){if(typeof t=="number"&&typeof r=="number"&<(e)!==r-t)throw new cp({offset:r,position:"end",size:lt(e)})}function c2(e,t={}){let{dir:r,size:o=32}=t;if(o===0)return e;let n=e.replace("0x","");if(n.length>o*2)throw new Cg({size:Math.ceil(n.length/2),targetSize:o,type:"Hex"});return `0x${n[r==="right"?"padEnd":"padStart"](o*2,"0")}`}function Y4(e,t={}){let{dir:r="left"}=t,o=e.replace("0x",""),n=0;for(let i=0;i<o.length-1&&o[r==="left"?i:o.length-i-1].toString()==="0";i++)n++;return o=r==="left"?o.slice(n):o.slice(0,o.length-n),o==="0"?"0x":r==="right"&&o.length%2===1?`0x${o}0`:`0x${o}`}var u2=F(()=>{lr();});function Os(e,t,r){return JSON.stringify(e,(o,n)=>typeof n=="bigint"?n.toString()+oV:n,r)}var oV,up=F(()=>{oV="#__bigint";});function aV(e){if(!(e instanceof Uint8Array)){if(!e)throw new lf(e);if(typeof e!="object")throw new lf(e);if(!("BYTES_PER_ELEMENT"in e))throw new lf(e);if(e.BYTES_PER_ELEMENT!==1||e.constructor.name!=="Uint8Array")throw new lf(e)}}function Q4(e){return e instanceof Uint8Array?e:typeof e=="string"?df(e):cV(e)}function cV(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function df(e,t={}){let{size:r}=t,o=e;r&&(ff(e,r),o=qo(e,r));let n=o.slice(2);n.length%2&&(n=`0${n}`);let i=n.length/2,s=new Uint8Array(i);for(let a=0,c=0;a<i;a++){let u=s2(n.charCodeAt(c++)),f=s2(n.charCodeAt(c++));if(u===void 0||f===void 0)throw new de(`Invalid byte sequence ("${n[c-2]}${n[c-1]}" in "${n}").`);s[a]=u<<4|f;}return s}function e$(e,t={}){let{size:r}=t,o=sV.encode(e);return typeof r=="number"?(uf(o,r),uV(o,r)):o}function uV(e,t){return q4(e,{dir:"right",size:t})}function Zn(e){return e.length}function t$(e,t,r,o={}){let{strict:n}=o;let i=e.slice(t,r);return i}function r$(e,t={}){let{size:r}=t;typeof r<"u"&&uf(e,r);let o=It(e,t);return d2(o,t)}function n$(e,t={}){let{size:r}=t,o=e;if(typeof r<"u"&&(uf(o,r),o=l2(o)),o.length>1||o[0]>1)throw new f2(o);return !!o[0]}function Go(e,t={}){let{size:r}=t;typeof r<"u"&&uf(e,r);let o=It(e,t);return Lg(o,t)}function o$(e,t={}){let{size:r}=t,o=e;return typeof r<"u"&&(uf(o,r),o=fV(o)),iV.decode(o)}function l2(e){return a2(e,{dir:"left"})}function fV(e){return a2(e,{dir:"right"})}function i$(e){try{return aV(e),!0}catch{return false}}var iV,sV,f2,lf,Ng,Pg,$s=F(()=>{dn();lr();W4();u2();up();iV=new TextDecoder,sV=new TextEncoder;f2=class extends de{constructor(t){super(`Bytes value \`${t}\` is not a valid boolean.`,{metaMessages:["The bytes array must contain a single byte of either a `0` or `1` value."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Bytes.InvalidBytesBooleanError"});}},lf=class extends de{constructor(t){super(`Value \`${typeof t=="object"?Os(t):t}\` of type \`${typeof t}\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Bytes.InvalidBytesTypeError"});}},Ng=class extends de{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed \`${r}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Bytes.SizeOverflowError"});}},Pg=class extends de{constructor({size:t,targetSize:r,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${r}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Bytes.SizeExceedsPaddingSizeError"});}};});function pV(e,t={}){let{strict:r=false}=t;if(!e)throw new Ug(e);if(typeof e!="string")throw new Ug(e);if(r&&!/^0x[0-9a-fA-F]*$/.test(e))throw new Mg(e);if(!e.startsWith("0x"))throw new Mg(e)}function ht(...e){return `0x${e.reduce((t,r)=>t+r.replace("0x",""),"")}`}function pf(e){return e instanceof Uint8Array?It(e):Array.isArray(e)?It(new Uint8Array(e)):e}function Dg(e,t={}){let r=`0x${Number(e)}`;return typeof t.size=="number"?(ff(r,t.size),Ni(r,t.size)):r}function It(e,t={}){let r="";for(let n=0;n<e.length;n++)r+=dV[e[n]];let o=`0x${r}`;return typeof t.size=="number"?(ff(o,t.size),qo(o,t.size)):o}function Ve(e,t={}){let{signed:r,size:o}=t,n=BigInt(e),i;o?r?i=(1n<<BigInt(o)*8n-1n)-1n:i=2n**(BigInt(o)*8n)-1n:typeof e=="number"&&(i=BigInt(Number.MAX_SAFE_INTEGER));let s=typeof i=="bigint"&&r?-i-1n:0;if(i&&n>i||n<s){let u=typeof e=="bigint"?"n":"";throw new fp({max:i?`${i}${u}`:void 0,min:`${s}${u}`,signed:r,size:o,value:`${e}${u}`})}let c=`0x${(r&&n<0?BigInt.asUintN(o*8,BigInt(n)):n).toString(16)}`;return o?Ni(c,o):c}function mf(e,t={}){return It(lV.encode(e),t)}function Ni(e,t){return c2(e,{dir:"left",size:t})}function qo(e,t){return c2(e,{dir:"right",size:t})}function dt(e,t,r,o={}){let{strict:n}=o;K4(e,t);let i=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return n&&J4(i,t,r),i}function lt(e){return Math.ceil((e.length-2)/2)}function p2(e){return Y4(e,{dir:"left"})}function d2(e,t={}){let{signed:r}=t;t.size&&ff(e,t.size);let o=BigInt(e);if(!r)return o;let n=(e.length-2)/2,i=(1n<<BigInt(n)*8n)-1n,s=i>>1n;return o<=s?o:o-i-1n}function Lg(e,t={}){let{signed:r,size:o}=t;return Number(!r&&!o?e:d2(e,t))}function lp(e,t={}){let{strict:r=false}=t;try{return pV(e,{strict:r}),!0}catch{return false}}var lV,dV,fp,Ug,Mg,Bg,cp,Cg,lr=F(()=>{dn();u2();up();lV=new TextEncoder,dV=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));fp=class extends de{constructor({max:t,min:r,signed:o,size:n,value:i}){super(`Number \`${i}\` is not in safe${n?` ${n*8}-bit`:""}${o?" signed":" unsigned"} integer range ${t?`(\`${r}\` to \`${t}\`)`:`(above \`${r}\`)`}`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.IntegerOutOfRangeError"});}},Ug=class extends de{constructor(t){super(`Value \`${typeof t=="object"?Os(t):t}\` of type \`${typeof t}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.InvalidHexTypeError"});}},Mg=class extends de{constructor(t){super(`Value \`${t}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.InvalidHexValueError"});}},Bg=class extends de{constructor({givenSize:t,maxSize:r}){super(`Size cannot exceed \`${r}\` bytes. Given size: \`${t}\` bytes.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.SizeOverflowError"});}},cp=class extends de{constructor({offset:t,position:r,size:o}){super(`Slice ${r==="start"?"starting":"ending"} at offset \`${t}\` is out-of-bounds (size: \`${o}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.SliceOffsetOutOfBoundsError"});}},Cg=class extends de{constructor({size:t,targetSize:r,type:o}){super(`${o.charAt(0).toUpperCase()}${o.slice(1).toLowerCase()} size (\`${t}\`) exceeds padding size (\`${r}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Hex.SizeExceedsPaddingSizeError"});}};});function s$(e){return {address:e.address,amount:Ve(e.amount),index:Ve(e.index),validatorIndex:Ve(e.validatorIndex)}}var a$=F(()=>{lr();});function jg(e){return {...typeof e.baseFeePerGas=="bigint"&&{baseFeePerGas:Ve(e.baseFeePerGas)},...typeof e.blobBaseFee=="bigint"&&{blobBaseFee:Ve(e.blobBaseFee)},...typeof e.feeRecipient=="string"&&{feeRecipient:e.feeRecipient},...typeof e.gasLimit=="bigint"&&{gasLimit:Ve(e.gasLimit)},...typeof e.number=="bigint"&&{number:Ve(e.number)},...typeof e.prevRandao=="bigint"&&{prevRandao:Ve(e.prevRandao)},...typeof e.time=="bigint"&&{time:Ve(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(s$)}}}var m2=F(()=>{lr();a$();});var bo,Fg,u$,Hg,f$,h2,g2,y2,b2,Gn,pn=F(()=>{bo=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{name:"addr",type:"address"}],name:"getEthBalance",outputs:[{name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],Fg=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],u$=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}],Hg=[...u$,{name:"resolveWithGateways",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],f$=[...u$,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],h2=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],g2=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],y2=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],b2=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}],Gn=[{type:"event",name:"Approval",inputs:[{indexed:true,name:"owner",type:"address"},{indexed:true,name:"spender",type:"address"},{indexed:false,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:true,name:"from",type:"address"},{indexed:true,name:"to",type:"address"},{indexed:false,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}];});var l$,d$=F(()=>{l$="0x82ad56cb";});var Vg,p$,m$,qa,dp=F(()=>{Vg="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",p$="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",m$="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",qa="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033";});var Wa,pp,Ka,Zg=F(()=>{Te();Wa=class extends z{constructor({blockNumber:t,chain:r,contract:o}){super(`Chain "${r.name}" does not support contract "${o.name}".`,{metaMessages:["This could be due to any of the following:",...t&&o.blockCreated&&o.blockCreated>t?[`- The contract "${o.name}" was not deployed until block ${o.blockCreated} (current block ${t}).`]:[`- The chain does not have the contract "${o.name}" configured.`]],name:"ChainDoesNotSupportContract"});}},pp=class extends z{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"});}},Ka=class extends z{constructor({chainId:t}){super(typeof t=="number"?`Chain ID "${t}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"});}};});function mp(e){let{abi:t,args:r,bytecode:o}=e;if(!r||r.length===0)return o;let n=t.find(s=>"type"in s&&s.type==="constructor");if(!n)throw new $0({docsPath:x2});if(!("inputs"in n))throw new jd({docsPath:x2});if(!n.inputs||n.inputs.length===0)throw new jd({docsPath:x2});let i=qr(n.inputs,r);return st([o,i])}var x2,v2=F(()=>{Et();an();Si();x2="/docs/contract/encodeDeployData";});function qn({blockNumber:e,chain:t,contract:r}){let o=t?.contracts?.[r];if(!o)throw new Wa({chain:t,contract:{name:r}});if(e&&o.blockCreated&&o.blockCreated>e)throw new Wa({blockNumber:e,chain:t,contract:{name:r,blockCreated:o.blockCreated}});return o.address}var Ja=F(()=>{Zg();});function Gg(e,{docsPath:t,...r}){let o=(()=>{let n=Is(e,r);return n instanceof Hn?e:n})();return new _s(o,{docsPath:t,...r})}var w2=F(()=>{Ai();Ri();ip();});function qg(){let e=()=>{},t=()=>{};return {promise:new Promise((o,n)=>{e=o,t=n;}),resolve:e,reject:t}}var _2=F(()=>{});function hf({fn:e,id:t,shouldSplitBatch:r,wait:o=0,sort:n}){let i=async()=>{let f=c();s();let d=f.map(({args:g})=>g);d.length!==0&&e(d).then(g=>{n&&Array.isArray(g)&&g.sort(n);for(let h=0;h<f.length;h++){let{resolve:v}=f[h];v?.([g[h],g]);}}).catch(g=>{for(let h=0;h<f.length;h++){let{reject:v}=f[h];v?.(g);}});},s=()=>E2.delete(t),a=()=>c().map(({args:f})=>f),c=()=>E2.get(t)||[],u=f=>E2.set(t,[...c(),f]);return {flush:s,async schedule(f){let{promise:d,resolve:g,reject:h}=qg();return r?.([...a(),f])&&i(),c().length>0?(u({args:f,resolve:g,reject:h}),d):(u({args:f,resolve:g,reject:h}),setTimeout(i,o),d)}}}var E2,Wg=F(()=>{_2();E2=new Map;});var Kg,Jg,Yg,h$=F(()=>{Pr();Te();mo();Kg=class extends z{constructor({callbackSelector:t,cause:r,data:o,extraData:n,sender:i,urls:s}){super(r.shortMessage||"An error occurred while fetching for an offchain result.",{cause:r,metaMessages:[...r.metaMessages||[],r.metaMessages?.length?"":[],"Offchain Gateway Call:",s&&[" Gateway URL(s):",...s.map(a=>` ${za(a)}`)],` Sender: ${i}`,` Data: ${o}`,` Callback selector: ${t}`,` Extra data: ${n}`].flat(),name:"OffchainLookupError"});}},Jg=class extends z{constructor({result:t,url:r}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${za(r)}`,`Response: ${Be(t)}`],name:"OffchainLookupResponseMalformedError"});}},Yg=class extends z{constructor({sender:t,to:r}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${r}`,`OffchainLookup sender address: ${t}`],name:"OffchainLookupSenderMismatchError"});}};});function g$(e){let{abi:t,data:r}=e,o=cn(r,0,4),n=t.find(i=>i.type==="function"&&o===Do(nr(i)));if(!n)throw new L0(o,{docsPath:"/docs/contract/decodeFunctionData"});return {functionName:n.name,args:"inputs"in n&&n.inputs&&n.inputs.length>0?Ii(n.inputs,cn(r,4)):void 0}}var y$=F(()=>{Et();bs();du();tp();xi();});function I2(e){let{abi:t,errorName:r,args:o}=e,n=t[0];if(r){let c=un({abi:t,args:o,name:r});if(!c)throw new Fd(r,{docsPath:S2});n=c;}if(n.type!=="error")throw new Fd(void 0,{docsPath:S2});let i=nr(n),s=Do(i),a="0x";if(o&&o.length>0){if(!n.inputs)throw new B0(n.name,{docsPath:S2});a=qr(n.inputs,o);}return st([s,a])}var S2,b$=F(()=>{Et();an();du();Si();xi();xs();S2="/docs/contract/encodeErrorResult";});function x$(e){let{abi:t,functionName:r,result:o}=e,n=t[0];if(r){let s=un({abi:t,name:r});if(!s)throw new fo(r,{docsPath:A2});n=s;}if(n.type!=="function")throw new fo(void 0,{docsPath:A2});if(!n.outputs)throw new uu(n.name,{docsPath:A2});let i=(()=>{if(n.outputs.length===0)return [];if(n.outputs.length===1)return [o];if(Array.isArray(o))return o;throw new fu(o)})();return qr(n.outputs,i)}var A2,v$=F(()=>{Et();Si();xs();A2="/docs/contract/encodeFunctionResult";});async function k2(e){let{data:t,ccipRequest:r}=e,{args:[o]}=g$({abi:Fg,data:t}),n=[],i=[];return await Promise.all(o.map(async(s,a)=>{try{i[a]=s.urls.includes(Pi)?await k2({data:s.data,ccipRequest:r}):await r(s),n[a]=!1;}catch(c){n[a]=true,i[a]=hV(c);}})),x$({abi:Fg,functionName:"query",result:[n,i]})}function hV(e){return e.name==="HttpRequestError"&&e.status?I2({abi:Fg,errorName:"HttpError",args:[e.status,e.shortMessage]}):I2({abi:[J0],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}var Pi,hp=F(()=>{pn();Y0();y$();b$();v$();Pi="x-batch-gateway:true";});var E$={};Er(E$,{ccipRequest:()=>_$,offchainLookup:()=>yV,offchainLookupAbiItem:()=>w$,offchainLookupSignature:()=>gV});async function yV(e,{blockNumber:t,blockTag:r,data:o,requestOptions:n,to:i}){let{args:s}=eg({data:o,abi:[w$]}),[a,c,u,f,d]=s,{ccipRead:g}=e,h=g&&typeof g?.request=="function"?g.request:_$;try{if(!zr(i,a))throw new Yg({sender:a,to:i});let v=c.includes(Pi)?await k2({data:u,ccipRequest:R=>h({...R,requestOptions:n})}):await h({data:u,requestOptions:n,sender:a,urls:c}),{data:E}=await mn(e,{blockNumber:t,blockTag:r,data:Mo([f,qr([{type:"bytes"},{type:"bytes"}],[v,d])]),requestOptions:n,to:i});return E}catch(v){throw n?.signal?.aborted?wr(n.signal):ln(v)?v:new Kg({callbackSelector:f,cause:v,data:o,extraData:d,sender:a,urls:c})}}async function _$({data:e,requestOptions:t,sender:r,urls:o}){let n=new Error("An unknown error occurred.");for(let i=0;i<o.length;i++){if(t?.signal?.aborted)throw wr(t.signal);let s=o[i],a=s.includes("{data}")?"GET":"POST",c=a==="POST"?{data:e,sender:r}:void 0,u=a==="POST"?{"Content-Type":"application/json"}:{};try{let f=await fetch(s.replace("{sender}",r.toLowerCase()).replace("{data}",e),{body:JSON.stringify(c),headers:u,method:a,...t?.signal?{signal:t.signal}:{}}),d;if(f.headers.get("Content-Type")?.startsWith("application/json")?d=(await f.json()).data:d=await f.text(),!f.ok){n=new Dn({body:c,details:d?.error?Be(d.error):f.statusText,headers:f.headers,status:f.status,url:s});continue}if(!St(d)){n=new Jg({result:d,url:s});continue}return d}catch(f){if(t?.signal?.aborted)throw wr(t.signal);if(ln(f))throw f;n=new Dn({body:c,details:f.message,url:s});}}throw n}var gV,w$,S$=F(()=>{Ns();h$();Ma();mo();J6();Si();Ts();an();uo();hp();Pr();gV="0x556f1830",w$={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};});async function mn(e,t){let{account:r=e.account,authorizationList:o,batch:n=!!e.batch?.multicall,blockHash:i,blockNumber:s,blockTag:a=e.experimental_blockTag??"latest",requireCanonical:c,accessList:u,blobs:f,blockOverrides:d,code:g,data:h,factory:v,factoryData:E,gas:R,gasPrice:$,maxFeePerBlobGas:N,maxFeePerGas:O,maxPriorityFeePerGas:I,nonce:P,requestOptions:L,to:C,value:D,stateOverride:q,...H}=t,Z=r?qe(r):void 0;if(g&&(v||E))throw new z("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(g&&C)throw new z("Cannot provide both `code` & `to` as parameters.");let re=g&&h,S=v&&E&&C&&h,l=re||S,m=re?k$({code:g,data:h}):S?EV({data:h,factory:v,factoryData:E,to:C}):h;try{Vn(t);let y=Sn({blockHash:i,blockNumber:s,blockTag:a,requireCanonical:c}),b=d?jg(d):void 0,x=Yu(q),_=e.chain?.formatters?.transactionRequest?.format,w=(_||Zo)({...As(H,{format:_}),accessList:u,account:Z,authorizationList:o,blobs:f,data:m,gas:R,gasPrice:$,maxFeePerBlobGas:N,maxFeePerGas:O,maxPriorityFeePerGas:I,nonce:P,to:l?void 0:C,value:D},"call");if(n&&bV({request:w})&&!b&&i===void 0)try{let{deployless:G=!1}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},K=A$(e,{blockNumber:s,deployless:G});if(!K||!_V(x,K))return await wV(e,{...w,blockHash:i,blockNumber:s,blockTag:a,multicallAddress:K,requestOptions:L,requireCanonical:c,rpcStateOverride:x})}catch(G){if(!(G instanceof pp)&&!(G instanceof Wa))throw G}let p=(()=>{let G=[w,y];return x&&b?[...G,x,b]:x?[...G,x]:b?[...G,{},b]:G})(),A=await e.request({method:"eth_call",params:p},L);return A==="0x"?{data:void 0}:{data:A}}catch(y){if(L?.signal?.aborted)throw wr(L.signal);if(ln(y))throw y;let b=SV(y),{offchainLookup:x,offchainLookupSignature:_}=await Promise.resolve().then(()=>(S$(),E$));if(e.ccipRead!==false&&b?.slice(0,10)===_&&C)return {data:await x(e,{data:b,requestOptions:L,to:C})};throw l&&b?.slice(0,10)==="0x101bb98d"?new mg({factory:v}):Gg(y,{...t,account:Z,chain:e.chain})}}function bV({request:e}){let{data:t,to:r,...o}=e;return !(!t||t.startsWith(l$)||!r||Object.values(o).filter(n=>typeof n<"u").length>0)}function vV(e){if(!e)return "default";let t=I$.get(e);if(t!==void 0)return t;let r=xV++;return I$.set(e,r),r}async function wV(e,t){let{batchSize:r=1024,deployless:o=false,wait:n=0}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},{blockHash:i,blockNumber:s,blockTag:a=e.experimental_blockTag??"latest",requireCanonical:c,data:u,multicallAddress:f,requestOptions:d,rpcStateOverride:g,to:h}=t,v=f!==void 0?f:A$(e,{blockNumber:s,deployless:o}),E=Sn({blockHash:i,blockNumber:s,blockTag:a,requireCanonical:c}),R=typeof E=="string"?E:JSON.stringify(E),$=g?`.${JSON.stringify(g)}`:"",{schedule:N}=hf({id:`${e.uid}.${R}.${vV(d)}${$}`,wait:n,shouldSplitBatch(P){return P.reduce((C,{data:D})=>C+(D.length-2),0)>r*2},fn:async P=>{let L=P.map(H=>({allowFailure:true,callData:H.data,target:H.to})),C=ft({abi:bo,args:[L],functionName:"aggregate3"}),D={...v===null?{data:k$({code:qa,data:C})}:{to:v,data:C}},q=await e.request({method:"eth_call",params:g?[D,E,g]:[D,E]},d);return Lr({abi:bo,args:[L],functionName:"aggregate3",data:q||"0x"})}}),[{returnData:O,success:I}]=await N({data:u,to:h});if(!I)throw new Ho({data:O});return O==="0x"?{data:void 0}:{data:O}}function A$(e,t){let{blockNumber:r,deployless:o}=t;if(o)return null;if(e.chain)return qn({blockNumber:r,chain:e.chain,contract:"multicall3"});throw new pp}function _V(e,t){return e?Object.keys(e).some(r=>zr(r,t)):false}function k$(e){let{code:t,data:r}=e;return mp({abi:ps(["constructor(bytes, bytes)"]),bytecode:Vg,args:[t,r]})}function EV(e){let{data:t,factory:r,factoryData:o,to:n}=e;return mp({abi:ps(["constructor(address, bytes, address, bytes)"]),bytecode:p$,args:[n,t,r,o]})}function SV(e){if(!(e instanceof z))return;let t=e.walk();return typeof t?.data=="object"?t.data?.data:t.data}var xV,I$,Ns=F(()=>{su();m2();fn();pn();d$();dp();Te();Zg();Ai();mo();$i();v2();Un();Ts();Va();Ja();w2();sp();Ju();Wg();xg();Fa();xV=0,I$=new WeakMap;});var pe={};Er(pe,{$brand:()=>zp,$input:()=>E1,$output:()=>_1,NEVER:()=>sb,TimePrecision:()=>A1,ZodAny:()=>y5,ZodArray:()=>w5,ZodBase64:()=>Hv,ZodBase64URL:()=>Vv,ZodBigInt:()=>xl,ZodBigIntFormat:()=>qv,ZodBoolean:()=>bl,ZodCIDRv4:()=>jv,ZodCIDRv6:()=>Fv,ZodCUID:()=>Bv,ZodCUID2:()=>Cv,ZodCatch:()=>D5,ZodCodec:()=>nw,ZodCustom:()=>Vm,ZodCustomStringFormat:()=>gl,ZodDate:()=>jm,ZodDefault:()=>B5,ZodDiscriminatedUnion:()=>_5,ZodE164:()=>Zv,ZodEmail:()=>Ov,ZodEmoji:()=>Nv,ZodEnum:()=>ml,ZodError:()=>T3,ZodFile:()=>O5,ZodFirstPartyTypeKind:()=>ow,ZodFunction:()=>K5,ZodGUID:()=>zm,ZodIPv4:()=>Mv,ZodIPv6:()=>Dv,ZodISODate:()=>Nm,ZodISODateTime:()=>Om,ZodISODuration:()=>Bm,ZodISOTime:()=>Pm,ZodIntersection:()=>E5,ZodIssueCode:()=>DB,ZodJWT:()=>Gv,ZodKSUID:()=>Uv,ZodLazy:()=>G5,ZodLiteral:()=>$5,ZodMap:()=>R5,ZodNaN:()=>F5,ZodNanoID:()=>Pv,ZodNever:()=>x5,ZodNonOptional:()=>tw,ZodNull:()=>h5,ZodNullable:()=>P5,ZodNumber:()=>yl,ZodNumberFormat:()=>xc,ZodObject:()=>Hm,ZodOptional:()=>ew,ZodPipe:()=>rw,ZodPrefault:()=>z5,ZodPromise:()=>W5,ZodReadonly:()=>H5,ZodRealError:()=>Yr,ZodRecord:()=>Yv,ZodSet:()=>T5,ZodString:()=>hl,ZodStringFormat:()=>et,ZodSuccess:()=>M5,ZodSymbol:()=>p5,ZodTemplateLiteral:()=>Z5,ZodTransform:()=>N5,ZodTuple:()=>I5,ZodType:()=>Ae,ZodULID:()=>zv,ZodURL:()=>Dm,ZodUUID:()=>ei,ZodUndefined:()=>m5,ZodUnion:()=>Kv,ZodUnknown:()=>b5,ZodVoid:()=>v5,ZodXID:()=>Lv,_ZodString:()=>$v,_default:()=>C5,_function:()=>PB,any:()=>pB,array:()=>Fm,base64:()=>J3,base64url:()=>Y3,bigint:()=>cB,boolean:()=>d5,catch:()=>j5,check:()=>BB,cidrv4:()=>W3,cidrv6:()=>K3,clone:()=>Mr,codec:()=>$B,coerce:()=>iw,config:()=>wt,core:()=>Qo,cuid:()=>j3,cuid2:()=>F3,custom:()=>CB,date:()=>hB,decode:()=>wv,decodeAsync:()=>Ev,discriminatedUnion:()=>vB,e164:()=>X3,email:()=>O3,emoji:()=>M3,encode:()=>vv,encodeAsync:()=>_v,endsWith:()=>al,enum:()=>Xv,file:()=>AB,flattenError:()=>Hf,float32:()=>oB,float64:()=>iB,formatError:()=>Vf,function:()=>PB,getErrorMap:()=>FB,globalRegistry:()=>vo,gt:()=>Yo,gte:()=>Jr,guid:()=>N3,hash:()=>nB,hex:()=>rB,hostname:()=>tB,httpUrl:()=>U3,includes:()=>il,instanceof:()=>zB,int:()=>Tv,int32:()=>sB,int64:()=>uB,intersection:()=>S5,ipv4:()=>G3,ipv6:()=>q3,iso:()=>Cm,json:()=>UB,jwt:()=>Q3,keyof:()=>gB,ksuid:()=>Z3,lazy:()=>q5,length:()=>gc,literal:()=>IB,locales:()=>Xf,looseObject:()=>xB,lowercase:()=>nl,lt:()=>Jo,lte:()=>kn,map:()=>_B,maxLength:()=>hc,maxSize:()=>mc,mime:()=>cl,minLength:()=>Vi,minSize:()=>Vs,multipleOf:()=>Hs,nan:()=>TB,nanoid:()=>D3,nativeEnum:()=>SB,negative:()=>tv,never:()=>Wv,nonnegative:()=>nv,nonoptional:()=>U5,nonpositive:()=>rv,normalize:()=>ul,null:()=>g5,nullable:()=>Um,nullish:()=>kB,number:()=>l5,object:()=>yB,optional:()=>Lm,overwrite:()=>Xo,parse:()=>gv,parseAsync:()=>yv,partialRecord:()=>wB,pipe:()=>Mm,positive:()=>ev,prefault:()=>L5,preprocess:()=>MB,prettifyError:()=>yb,promise:()=>NB,property:()=>ov,readonly:()=>V5,record:()=>k5,refine:()=>J5,regex:()=>rl,regexes:()=>An,registry:()=>fm,safeDecode:()=>Iv,safeDecodeAsync:()=>kv,safeEncode:()=>Sv,safeEncodeAsync:()=>Av,safeParse:()=>bv,safeParseAsync:()=>xv,set:()=>EB,setErrorMap:()=>jB,size:()=>tl,startsWith:()=>sl,strictObject:()=>bB,string:()=>Rv,stringFormat:()=>eB,stringbool:()=>LB,success:()=>RB,superRefine:()=>Y5,symbol:()=>lB,templateLiteral:()=>OB,toJSONSchema:()=>lv,toLowerCase:()=>ll,toUpperCase:()=>dl,transform:()=>Qv,treeifyError:()=>gb,trim:()=>fl,tuple:()=>A5,uint32:()=>aB,uint64:()=>fB,ulid:()=>H3,undefined:()=>dB,union:()=>Jv,unknown:()=>bc,uppercase:()=>ol,url:()=>L3,util:()=>te,uuid:()=>P3,uuidv4:()=>B3,uuidv6:()=>C3,uuidv7:()=>z3,void:()=>mB,xid:()=>V3});var Qo={};Er(Qo,{$ZodAny:()=>Zx,$ZodArray:()=>Jx,$ZodAsyncError:()=>Kn,$ZodBase64:()=>Cx,$ZodBase64URL:()=>zx,$ZodBigInt:()=>om,$ZodBigIntFormat:()=>jx,$ZodBoolean:()=>Wf,$ZodCIDRv4:()=>Nx,$ZodCIDRv6:()=>Px,$ZodCUID:()=>wx,$ZodCUID2:()=>_x,$ZodCatch:()=>p1,$ZodCheck:()=>ot,$ZodCheckBigIntFormat:()=>Yb,$ZodCheckEndsWith:()=>ux,$ZodCheckGreaterThan:()=>Yp,$ZodCheckIncludes:()=>ax,$ZodCheckLengthEquals:()=>nx,$ZodCheckLessThan:()=>Jp,$ZodCheckLowerCase:()=>ix,$ZodCheckMaxLength:()=>tx,$ZodCheckMaxSize:()=>Xb,$ZodCheckMimeType:()=>lx,$ZodCheckMinLength:()=>rx,$ZodCheckMinSize:()=>Qb,$ZodCheckMultipleOf:()=>Kb,$ZodCheckNumberFormat:()=>Jb,$ZodCheckOverwrite:()=>dx,$ZodCheckProperty:()=>fx,$ZodCheckRegex:()=>ox,$ZodCheckSizeEquals:()=>ex,$ZodCheckStartsWith:()=>cx,$ZodCheckStringFormat:()=>dc,$ZodCheckUpperCase:()=>sx,$ZodCodec:()=>Kf,$ZodCustom:()=>w1,$ZodCustomStringFormat:()=>Mx,$ZodDate:()=>Kx,$ZodDefault:()=>u1,$ZodDiscriminatedUnion:()=>Xx,$ZodE164:()=>Lx,$ZodEmail:()=>yx,$ZodEmoji:()=>xx,$ZodEncodeError:()=>Ui,$ZodEnum:()=>n1,$ZodError:()=>Ff,$ZodFile:()=>i1,$ZodFunction:()=>b1,$ZodGUID:()=>hx,$ZodIPv4:()=>$x,$ZodIPv6:()=>Ox,$ZodISODate:()=>kx,$ZodISODateTime:()=>Ax,$ZodISODuration:()=>Tx,$ZodISOTime:()=>Rx,$ZodIntersection:()=>Qx,$ZodJWT:()=>Ux,$ZodKSUID:()=>Ix,$ZodLazy:()=>v1,$ZodLiteral:()=>o1,$ZodMap:()=>t1,$ZodNaN:()=>m1,$ZodNanoID:()=>vx,$ZodNever:()=>qx,$ZodNonOptional:()=>l1,$ZodNull:()=>Vx,$ZodNullable:()=>c1,$ZodNumber:()=>nm,$ZodNumberFormat:()=>Dx,$ZodObject:()=>pS,$ZodObjectJIT:()=>Yx,$ZodOptional:()=>a1,$ZodPipe:()=>h1,$ZodPrefault:()=>f1,$ZodPromise:()=>x1,$ZodReadonly:()=>g1,$ZodRealError:()=>Kr,$ZodRecord:()=>e1,$ZodRegistry:()=>pc,$ZodSet:()=>r1,$ZodString:()=>Fs,$ZodStringFormat:()=>Ye,$ZodSuccess:()=>d1,$ZodSymbol:()=>Fx,$ZodTemplateLiteral:()=>y1,$ZodTransform:()=>s1,$ZodTuple:()=>sm,$ZodType:()=>we,$ZodULID:()=>Ex,$ZodURL:()=>bx,$ZodUUID:()=>gx,$ZodUndefined:()=>Hx,$ZodUnion:()=>im,$ZodUnknown:()=>Gx,$ZodVoid:()=>Wx,$ZodXID:()=>Sx,$brand:()=>zp,$constructor:()=>B,$input:()=>E1,$output:()=>_1,Doc:()=>qf,JSONSchema:()=>c5,JSONSchemaGenerator:()=>pl,NEVER:()=>sb,TimePrecision:()=>A1,_any:()=>q1,_array:()=>iv,_base64:()=>km,_base64url:()=>Rm,_bigint:()=>D1,_boolean:()=>U1,_catch:()=>_3,_check:()=>a5,_cidrv4:()=>Im,_cidrv6:()=>Am,_coercedBigint:()=>j1,_coercedBoolean:()=>M1,_coercedDate:()=>X1,_coercedNumber:()=>N1,_coercedString:()=>I1,_cuid:()=>bm,_cuid2:()=>xm,_custom:()=>av,_date:()=>Y1,_decode:()=>Fp,_decodeAsync:()=>Vp,_default:()=>x3,_discriminatedUnion:()=>a3,_e164:()=>Tm,_email:()=>lm,_emoji:()=>gm,_encode:()=>jp,_encodeAsync:()=>Hp,_endsWith:()=>al,_enum:()=>p3,_file:()=>sv,_float32:()=>B1,_float64:()=>C1,_gt:()=>Yo,_gte:()=>Jr,_guid:()=>Qf,_includes:()=>il,_int:()=>P1,_int32:()=>z1,_int64:()=>F1,_intersection:()=>c3,_ipv4:()=>Em,_ipv6:()=>Sm,_isoDate:()=>R1,_isoDateTime:()=>k1,_isoDuration:()=>$1,_isoTime:()=>T1,_jwt:()=>$m,_ksuid:()=>_m,_lazy:()=>A3,_length:()=>gc,_literal:()=>h3,_lowercase:()=>nl,_lt:()=>Jo,_lte:()=>kn,_map:()=>l3,_max:()=>kn,_maxLength:()=>hc,_maxSize:()=>mc,_mime:()=>cl,_min:()=>Jr,_minLength:()=>Vi,_minSize:()=>Vs,_multipleOf:()=>Hs,_nan:()=>Q1,_nanoid:()=>ym,_nativeEnum:()=>m3,_negative:()=>tv,_never:()=>K1,_nonnegative:()=>nv,_nonoptional:()=>v3,_nonpositive:()=>rv,_normalize:()=>ul,_null:()=>G1,_nullable:()=>b3,_number:()=>O1,_optional:()=>y3,_overwrite:()=>Xo,_parse:()=>cc,_parseAsync:()=>uc,_pipe:()=>E3,_positive:()=>ev,_promise:()=>k3,_property:()=>ov,_readonly:()=>S3,_record:()=>f3,_refine:()=>cv,_regex:()=>rl,_safeDecode:()=>Gp,_safeDecodeAsync:()=>Wp,_safeEncode:()=>Zp,_safeEncodeAsync:()=>qp,_safeParse:()=>fc,_safeParseAsync:()=>lc,_set:()=>d3,_size:()=>tl,_startsWith:()=>sl,_string:()=>S1,_stringFormat:()=>yc,_stringbool:()=>fv,_success:()=>w3,_superRefine:()=>uv,_symbol:()=>V1,_templateLiteral:()=>I3,_toLowerCase:()=>ll,_toUpperCase:()=>dl,_transform:()=>g3,_trim:()=>fl,_tuple:()=>u3,_uint32:()=>L1,_uint64:()=>H1,_ulid:()=>vm,_undefined:()=>Z1,_union:()=>s3,_unknown:()=>W1,_uppercase:()=>ol,_url:()=>el,_uuid:()=>dm,_uuidv4:()=>pm,_uuidv6:()=>mm,_uuidv7:()=>hm,_void:()=>J1,_xid:()=>wm,clone:()=>Mr,config:()=>wt,decode:()=>RN,decodeAsync:()=>$N,encode:()=>kN,encodeAsync:()=>TN,flattenError:()=>Hf,formatError:()=>Vf,globalConfig:()=>Cf,globalRegistry:()=>vo,isValidBase64:()=>Bx,isValidBase64URL:()=>uS,isValidJWT:()=>fS,locales:()=>Xf,parse:()=>Mp,parseAsync:()=>Dp,prettifyError:()=>yb,regexes:()=>An,registry:()=>fm,safeDecode:()=>NN,safeDecodeAsync:()=>BN,safeEncode:()=>ON,safeEncodeAsync:()=>PN,safeParse:()=>bb,safeParseAsync:()=>xb,toDotPath:()=>GE,toJSONSchema:()=>lv,treeifyError:()=>gb,util:()=>te,version:()=>px});var sb=Object.freeze({status:"aborted"});function B(e,t,r){function o(a,c){var u;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:false}),(u=a._zod).traits??(u.traits=new Set),a._zod.traits.add(e),t(a,c);for(let f in s.prototype)f in a||Object.defineProperty(a,f,{value:s.prototype[f].bind(a)});a._zod.constr=s,a._zod.def=c;}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function s(a){var c;let u=r?.Parent?new i:this;o(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let f of u._zod.deferred)f();return u}return Object.defineProperty(s,"init",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?true:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var zp=Symbol("zod_brand"),Kn=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");}},Ui=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError";}},Cf={};function wt(e){return e&&Object.assign(Cf,e),Cf}var te={};Er(te,{BIGINT_FORMAT_RANGES:()=>hb,Class:()=>cb,NUMBER_FORMAT_RANGES:()=>mb,aborted:()=>Hi,allowsEval:()=>fb,assert:()=>iN,assertEqual:()=>tN,assertIs:()=>nN,assertNever:()=>oN,assertNotEqual:()=>rN,assignProp:()=>Di,base64ToUint8Array:()=>HE,base64urlToUint8Array:()=>_N,cached:()=>sc,captureStackTrace:()=>Up,cleanEnum:()=>wN,cleanRegex:()=>Uf,clone:()=>Mr,cloneDef:()=>aN,createTransparentProxy:()=>pN,defineLazy:()=>Oe,esc:()=>Lp,escapeRegex:()=>xo,extend:()=>gN,finalizeIssue:()=>gn,floatSafeRemainder:()=>ub,getElementAtPath:()=>cN,getEnumValues:()=>Lf,getLengthableOrigin:()=>jf,getParsedType:()=>dN,getSizableOrigin:()=>Df,hexToUint8Array:()=>SN,isObject:()=>Ds,isPlainObject:()=>Fi,issue:()=>ac,joinValues:()=>j,jsonStringifyReplacer:()=>ic,merge:()=>bN,mergeDefs:()=>ji,normalizeParams:()=>ee,nullish:()=>Mi,numKeys:()=>lN,objectClone:()=>sN,omit:()=>hN,optionalKeys:()=>pb,partial:()=>xN,pick:()=>mN,prefixIssues:()=>hn,primitiveTypes:()=>db,promiseAllObject:()=>uN,propertyKeyTypes:()=>Mf,randomString:()=>fN,required:()=>vN,safeExtend:()=>yN,shallowClone:()=>lb,stringifyPrimitive:()=>X,uint8ArrayToBase64:()=>VE,uint8ArrayToBase64url:()=>EN,uint8ArrayToHex:()=>IN,unwrapMessage:()=>zf});function tN(e){return e}function rN(e){return e}function nN(e){}function oN(e){throw new Error}function iN(e){}function Lf(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function j(e,t="|"){return e.map(r=>X(r)).join(t)}function ic(e,t){return typeof t=="bigint"?t.toString():t}function sc(e){return {get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}}}}function Mi(e){return e==null}function Uf(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function ub(e,t){let r=(e.toString().split(".")[1]||"").length,o=t.toString(),n=(o.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(o)){let c=o.match(/\d?e-(\d?)/);c?.[1]&&(n=Number.parseInt(c[1]));}let i=r>n?r:n,s=Number.parseInt(e.toFixed(i).replace(".","")),a=Number.parseInt(t.toFixed(i).replace(".",""));return s%a/10**i}var FE=Symbol("evaluating");function Oe(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==FE)return o===void 0&&(o=FE,o=r()),o},set(n){Object.defineProperty(e,t,{value:n});},configurable:true});}function sN(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Di(e,t,r){Object.defineProperty(e,t,{value:r,writable:true,enumerable:true,configurable:true});}function ji(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o);}return Object.defineProperties({},t)}function aN(e){return ji(e._zod.def)}function cN(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function uN(e){let t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{let n={};for(let i=0;i<t.length;i++)n[t[i]]=o[i];return n})}function fN(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function Lp(e){return JSON.stringify(e)}var Up="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ds(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var fb=sc(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return false;try{let e=Function;return new e(""),!0}catch{return false}});function Fi(e){if(Ds(e)===false)return false;let t=e.constructor;if(t===void 0)return true;let r=t.prototype;return !(Ds(r)===false||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===false)}function lb(e){return Fi(e)?{...e}:Array.isArray(e)?[...e]:e}function lN(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var dN=e=>{let t=typeof e;switch(t){case "undefined":return "undefined";case "string":return "string";case "number":return Number.isNaN(e)?"nan":"number";case "boolean":return "boolean";case "function":return "function";case "bigint":return "bigint";case "symbol":return "symbol";case "object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},Mf=new Set(["string","number","symbol"]),db=new Set(["string","number","bigint","boolean","symbol","undefined"]);function xo(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Mr(e,t,r){let o=new e._zod.constr(t??e._zod.def);return (!t||r?.parent)&&(o._zod.parent=e),o}function ee(e){let t=e;if(!t)return {};if(typeof t=="string")return {error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message;}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function pN(e){let t;return new Proxy({},{get(r,o,n){return t??(t=e()),Reflect.get(t,o,n)},set(r,o,n,i){return t??(t=e()),Reflect.set(t,o,n,i)},has(r,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t??(t=e()),Reflect.defineProperty(t,o,n)}})}function X(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function pb(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var mb={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},hb={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function mN(e,t){let r=e._zod.def,o=ji(e._zod.def,{get shape(){let n={};for(let i in t){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(n[i]=r.shape[i]);}return Di(this,"shape",n),n},checks:[]});return Mr(e,o)}function hN(e,t){let r=e._zod.def,o=ji(e._zod.def,{get shape(){let n={...e._zod.def.shape};for(let i in t){if(!(i in r.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&delete n[i];}return Di(this,"shape",n),n},checks:[]});return Mr(e,o)}function gN(e,t){if(!Fi(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");let n=ji(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Di(this,"shape",i),i},checks:[]});return Mr(e,n)}function yN(e,t){if(!Fi(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r={...e._zod.def,get shape(){let o={...e._zod.def.shape,...t};return Di(this,"shape",o),o},checks:e._zod.def.checks};return Mr(e,r)}function bN(e,t){let r=ji(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return Di(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return Mr(e,r)}function xN(e,t,r){let o=ji(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let s in r){if(!(s in n))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=e?new e({type:"optional",innerType:n[s]}):n[s]);}else for(let s in n)i[s]=e?new e({type:"optional",innerType:n[s]}):n[s];return Di(this,"shape",i),i},checks:[]});return Mr(t,o)}function vN(e,t,r){let o=ji(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let s in r){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(i[s]=new e({type:"nonoptional",innerType:n[s]}));}else for(let s in n)i[s]=new e({type:"nonoptional",innerType:n[s]});return Di(this,"shape",i),i},checks:[]});return Mr(t,o)}function Hi(e,t=0){if(e.aborted===true)return true;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==true)return true;return false}function hn(e,t){return t.map(r=>{var o;return (o=r).path??(o.path=[]),r.path.unshift(e),r})}function zf(e){return typeof e=="string"?e:e?.message}function gn(e,t,r){let o={...e,path:e.path??[]};if(!e.message){let n=zf(e.inst?._zod.def?.error?.(e))??zf(t?.error?.(e))??zf(r.customError?.(e))??zf(r.localeError?.(e))??"Invalid input";o.message=n;}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function Df(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function jf(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ac(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function wN(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function HE(e){let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r}function VE(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function _N(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return HE(t+r)}function EN(e){return VE(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function SN(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)r[o/2]=Number.parseInt(t.slice(o,o+2),16);return r}function IN(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var cb=class{constructor(...t){}};var ZE=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:false}),Object.defineProperty(e,"issues",{value:t,enumerable:false}),e.message=JSON.stringify(t,ic,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:false});},Ff=B("$ZodError",ZE),Kr=B("$ZodError",ZE,{Parent:Error});function Hf(e,t=r=>r.message){let r={},o=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):o.push(t(n));return {formErrors:o,fieldErrors:r}}function Vf(e,t=r=>r.message){let r={_errors:[]},o=n=>{for(let i of n.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(s=>o({issues:s}));else if(i.code==="invalid_key")o({issues:i.issues});else if(i.code==="invalid_element")o({issues:i.issues});else if(i.path.length===0)r._errors.push(t(i));else {let s=r,a=0;for(;a<i.path.length;){let c=i.path[a];a===i.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(t(i))):s[c]=s[c]||{_errors:[]},s=s[c],a++;}}};return o(e),r}function gb(e,t=r=>r.message){let r={errors:[]},o=(n,i=[])=>{var s,a;for(let c of n.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>o({issues:u},c.path));else if(c.code==="invalid_key")o({issues:c.issues},c.path);else if(c.code==="invalid_element")o({issues:c.issues},c.path);else {let u=[...i,...c.path];if(u.length===0){r.errors.push(t(c));continue}let f=r,d=0;for(;d<u.length;){let g=u[d],h=d===u.length-1;typeof g=="string"?(f.properties??(f.properties={}),(s=f.properties)[g]??(s[g]={errors:[]}),f=f.properties[g]):(f.items??(f.items=[]),(a=f.items)[g]??(a[g]={errors:[]}),f=f.items[g]),h&&f.errors.push(t(c)),d++;}}};return o(e),r}function GE(e){let t=[],r=e.map(o=>typeof o=="object"?o.key:o);for(let o of r)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function yb(e){let t=[],r=[...e.issues].sort((o,n)=>(o.path??[]).length-(n.path??[]).length);for(let o of r)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${GE(o.path)}`);return t.join(`
|
|
41
|
+
`)}var cc=e=>(t,r,o,n)=>{let i=o?Object.assign(o,{async:false}):{async:false},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new Kn;if(s.issues.length){let a=new(n?.Err??e)(s.issues.map(c=>gn(c,i,wt())));throw Up(a,n?.callee),a}return s.value},Mp=cc(Kr),uc=e=>async(t,r,o,n)=>{let i=o?Object.assign(o,{async:true}):{async:true},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(n?.Err??e)(s.issues.map(c=>gn(c,i,wt())));throw Up(a,n?.callee),a}return s.value},Dp=uc(Kr),fc=e=>(t,r,o)=>{let n=o?{...o,async:false}:{async:false},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new Kn;return i.issues.length?{success:false,error:new(e??Ff)(i.issues.map(s=>gn(s,n,wt())))}:{success:true,data:i.value}},bb=fc(Kr),lc=e=>async(t,r,o)=>{let n=o?Object.assign(o,{async:true}):{async:true},i=t._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:false,error:new e(i.issues.map(s=>gn(s,n,wt())))}:{success:true,data:i.value}},xb=lc(Kr),jp=e=>(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return cc(e)(t,r,n)},kN=jp(Kr),Fp=e=>(t,r,o)=>cc(e)(t,r,o),RN=Fp(Kr),Hp=e=>async(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return uc(e)(t,r,n)},TN=Hp(Kr),Vp=e=>async(t,r,o)=>uc(e)(t,r,o),$N=Vp(Kr),Zp=e=>(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return fc(e)(t,r,n)},ON=Zp(Kr),Gp=e=>(t,r,o)=>fc(e)(t,r,o),NN=Gp(Kr),qp=e=>async(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return lc(e)(t,r,n)},PN=qp(Kr),Wp=e=>async(t,r,o)=>lc(e)(t,r,o),BN=Wp(Kr);var An={};Er(An,{base64:()=>Bb,base64url:()=>Kp,bigint:()=>jb,boolean:()=>Vb,browserEmail:()=>FN,cidrv4:()=>Nb,cidrv6:()=>Pb,cuid:()=>vb,cuid2:()=>wb,date:()=>Lb,datetime:()=>Mb,domain:()=>VN,duration:()=>Ab,e164:()=>zb,email:()=>Rb,emoji:()=>Tb,extendedDuration:()=>CN,guid:()=>kb,hex:()=>ZN,hostname:()=>Cb,html5Email:()=>MN,idnEmail:()=>jN,integer:()=>Fb,ipv4:()=>$b,ipv6:()=>Ob,ksuid:()=>Sb,lowercase:()=>qb,md5_base64:()=>qN,md5_base64url:()=>WN,md5_hex:()=>GN,nanoid:()=>Ib,null:()=>Zb,number:()=>Hb,rfc5322Email:()=>DN,sha1_base64:()=>JN,sha1_base64url:()=>YN,sha1_hex:()=>KN,sha256_base64:()=>QN,sha256_base64url:()=>eP,sha256_hex:()=>XN,sha384_base64:()=>rP,sha384_base64url:()=>nP,sha384_hex:()=>tP,sha512_base64:()=>iP,sha512_base64url:()=>sP,sha512_hex:()=>oP,string:()=>Db,time:()=>Ub,ulid:()=>_b,undefined:()=>Gb,unicodeEmail:()=>qE,uppercase:()=>Wb,uuid:()=>js,uuid4:()=>zN,uuid6:()=>LN,uuid7:()=>UN,xid:()=>Eb});var vb=/^[cC][^\s-]{8,}$/,wb=/^[0-9a-z]+$/,_b=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Eb=/^[0-9a-vA-V]{20}$/,Sb=/^[A-Za-z0-9]{27}$/,Ib=/^[a-zA-Z0-9_-]{21}$/,Ab=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,CN=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,kb=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,js=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,zN=js(4),LN=js(6),UN=js(7),Rb=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,MN=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,DN=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,qE=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,jN=qE,FN=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,HN="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Tb(){return new RegExp(HN,"u")}var $b=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ob=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Nb=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Pb=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Bb=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Kp=/^[A-Za-z0-9_-]*$/,Cb=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,VN=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,zb=/^\+(?:[0-9]){6,14}[0-9]$/,WE="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Lb=new RegExp(`^${WE}$`);function KE(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Ub(e){return new RegExp(`^${KE(e)}$`)}function Mb(e){let t=KE({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${r.join("|")})`;return new RegExp(`^${WE}T(?:${o})$`)}var Db=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},jb=/^-?\d+n?$/,Fb=/^-?\d+$/,Hb=/^-?\d+(?:\.\d+)?/,Vb=/^(?:true|false)$/i,Zb=/^null$/i;var Gb=/^undefined$/i;var qb=/^[^A-Z]*$/,Wb=/^[^a-z]*$/,ZN=/^[0-9a-fA-F]*$/;function Zf(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Gf(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var GN=/^[0-9a-fA-F]{32}$/,qN=Zf(22,"=="),WN=Gf(22),KN=/^[0-9a-fA-F]{40}$/,JN=Zf(27,"="),YN=Gf(27),XN=/^[0-9a-fA-F]{64}$/,QN=Zf(43,"="),eP=Gf(43),tP=/^[0-9a-fA-F]{96}$/,rP=Zf(64,""),nP=Gf(64),oP=/^[0-9a-fA-F]{128}$/,iP=Zf(86,"=="),sP=Gf(86);var ot=B("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[]);}),YE={number:"number",bigint:"bigint",object:"date"},Jp=B("$ZodCheckLessThan",(e,t)=>{ot.init(e,t);let r=YE[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value);}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:r,code:"too_big",maximum:t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort});};}),Yp=B("$ZodCheckGreaterThan",(e,t)=>{ot.init(e,t);let r=YE[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value);}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:r,code:"too_small",minimum:t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort});};}),Kb=B("$ZodCheckMultipleOf",(e,t)=>{ot.init(e,t),e._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=t.value);}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):ub(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort});};}),Jb=B("$ZodCheckNumberFormat",(e,t)=>{ot.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,i]=mb[t.format];e._zod.onattach.push(s=>{let a=s._zod.bag;a.format=t.format,a.minimum=n,a.maximum=i,r&&(a.pattern=Fb);}),e._zod.check=s=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:o,format:t.format,code:"invalid_type",continue:false,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!t.abort});return}}a<n&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:n,inclusive:true,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inst:e});};}),Yb=B("$ZodCheckBigIntFormat",(e,t)=>{ot.init(e,t);let[r,o]=hb[t.format];e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o;}),e._zod.check=n=>{let i=n.value;i<r&&n.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:true,inst:e,continue:!t.abort}),i>o&&n.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inst:e});};}),Xb=B("$ZodCheckMaxSize",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Mi(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum);}),e._zod.check=o=>{let n=o.value;n.size<=t.maximum||o.issues.push({origin:Df(n),code:"too_big",maximum:t.maximum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),Qb=B("$ZodCheckMinSize",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Mi(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum);}),e._zod.check=o=>{let n=o.value;n.size>=t.minimum||o.issues.push({origin:Df(n),code:"too_small",minimum:t.minimum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),ex=B("$ZodCheckSizeEquals",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Mi(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size;}),e._zod.check=o=>{let n=o.value,i=n.size;if(i===t.size)return;let s=i>t.size;o.issues.push({origin:Df(n),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:true,exact:true,input:o.value,inst:e,continue:!t.abort});};}),tx=B("$ZodCheckMaxLength",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Mi(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum);}),e._zod.check=o=>{let n=o.value;if(n.length<=t.maximum)return;let s=jf(n);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),rx=B("$ZodCheckMinLength",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Mi(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum);}),e._zod.check=o=>{let n=o.value;if(n.length>=t.minimum)return;let s=jf(n);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),nx=B("$ZodCheckLengthEquals",(e,t)=>{var r;ot.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return !Mi(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length;}),e._zod.check=o=>{let n=o.value,i=n.length;if(i===t.length)return;let s=jf(n),a=i>t.length;o.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:true,exact:true,input:o.value,inst:e,continue:!t.abort});};}),dc=B("$ZodCheckStringFormat",(e,t)=>{var r,o;ot.init(e,t),e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern));}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort});}):(o=e._zod).check??(o.check=()=>{});}),ox=B("$ZodCheckRegex",(e,t)=>{dc.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort});};}),ix=B("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=qb),dc.init(e,t);}),sx=B("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Wb),dc.init(e,t);}),ax=B("$ZodCheckIncludes",(e,t)=>{ot.init(e,t);let r=xo(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o);}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort});};}),cx=B("$ZodCheckStartsWith",(e,t)=>{ot.init(e,t);let r=new RegExp(`^${xo(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r);}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort});};}),ux=B("$ZodCheckEndsWith",(e,t)=>{ot.init(e,t);let r=new RegExp(`.*${xo(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r);}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort});};});function JE(e,t,r){e.issues.length&&t.issues.push(...hn(r,e.issues));}var fx=B("$ZodCheckProperty",(e,t)=>{ot.init(e,t),e._zod.check=r=>{let o=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(n=>JE(n,r,t.property));JE(o,r,t.property);};}),lx=B("$ZodCheckMimeType",(e,t)=>{ot.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime;}),e._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort});};}),dx=B("$ZodCheckOverwrite",(e,t)=>{ot.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value);};});var qf=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t);}indented(t){this.indent+=1,t(this),this.indent-=1;}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(`
|
|
50
42
|
`).filter(s=>s),n=Math.min(...o.map(s=>s.length-s.trimStart().length)),i=o.map(s=>s.slice(n)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s);}compile(){let t=Function,r=this?.args,n=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...r,n.join(`
|
|
51
|
-
`))}};var tw={major:4,minor:1,patch:12};var ve=B("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=tw;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let n of o)for(let i of n._zod.onattach)i(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse;});else {let n=(s,a,c)=>{let u=$s(s),l;for(let d of a){if(d._zod.def.when){if(!d._zod.def.when(s))continue}else if(u)continue;let g=s.issues.length,h=d._zod.check(s);if(h instanceof Promise&&c?.async===false)throw new po;if(l||h instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await h,s.issues.length!==g&&(u||(u=$s(s,g)));});else {if(s.issues.length===g)continue;u||(u=$s(s,g));}}return l?l.then(()=>s):s},i=(s,a,c)=>{if($s(s))return s.aborted=true,s;let u=n(a,o,c);if(u instanceof Promise){if(c.async===false)throw new po;return u.then(l=>e._zod.parse(l,c))}return e._zod.parse(u,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){let u=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:true});return u instanceof Promise?u.then(l=>i(l,s,a)):i(u,s,a)}let c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===false)throw new po;return c.then(u=>n(u,o,a))}return n(c,o,a)};}e["~standard"]={validate:n=>{try{let i=s_(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return a_(e,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1};}),Va=B("$ZodString",(e,t)=>{ve.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??R_(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value);}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r};}),Je=B("$ZodStringFormat",(e,t)=>{ff.init(e,t),Va.init(e,t);}),nw=B("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=h_),Je.init(e,t);}),ow=B("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ha(o));}else t.pattern??(t.pattern=Ha());Je.init(e,t);}),iw=B("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=g_),Je.init(e,t);}),sw=B("$ZodURL",(e,t)=>{Je.init(e,t),e._zod.check=r=>{try{let o=r.value.trim(),n=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:E_.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});}};}),aw=B("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=y_()),Je.init(e,t);}),cw=B("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=p_),Je.init(e,t);}),uw=B("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=c_),Je.init(e,t);}),fw=B("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=u_),Je.init(e,t);}),lw=B("$ZodULID",(e,t)=>{t.pattern??(t.pattern=f_),Je.init(e,t);}),dw=B("$ZodXID",(e,t)=>{t.pattern??(t.pattern=l_),Je.init(e,t);}),pw=B("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=d_),Je.init(e,t);}),mw=B("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=k_(t)),Je.init(e,t);}),hw=B("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=I_),Je.init(e,t);}),gw=B("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=A_(t)),Je.init(e,t);}),yw=B("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=m_),Je.init(e,t);}),bw=B("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=b_),Je.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format="ipv4";});}),xw=B("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=x_),Je.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format="ipv6";}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`);}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort});}};}),vw=B("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=v_),Je.init(e,t);}),_w=B("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=__),Je.init(e,t),e._zod.check=r=>{let o=r.value.split("/");try{if(o.length!==2)throw new Error;let[n,i]=o;if(!i)throw new Error;let s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`);}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort});}};});function ww(e){if(e==="")return true;if(e.length%4!==0)return false;try{return atob(e),!0}catch{return false}}var Ew=B("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=w_),Je.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64";}),e._zod.check=r=>{ww(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort});};});function o8(e){if(!kg.test(e))return false;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return ww(r)}var Sw=B("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=kg),Je.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url";}),e._zod.check=r=>{o8(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort});};}),Iw=B("$ZodE164",(e,t)=>{t.pattern??(t.pattern=S_),Je.init(e,t);});function i8(e,t=null){try{let r=e.split(".");if(r.length!==3)return !1;let[o]=r;if(!o)return !1;let n=JSON.parse(atob(o));return !("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return false}}var Aw=B("$ZodJWT",(e,t)=>{Je.init(e,t),e._zod.check=r=>{i8(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort});};}),kw=B("$ZodCustomStringFormat",(e,t)=>{Je.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort});};}),Cg=B("$ZodNumber",(e,t)=>{ve.init(e,t),e._zod.pattern=e._zod.bag.pattern??O_,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value);}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let i=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...i?{received:i}:{}}),r};}),Rw=B("$ZodNumber",(e,t)=>{U_.init(e,t),Cg.init(e,t);}),Hd=B("$ZodBoolean",(e,t)=>{ve.init(e,t),e._zod.pattern=N_,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=!!r.value;}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r};}),zg=B("$ZodBigInt",(e,t)=>{ve.init(e,t),e._zod.pattern=T_,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=BigInt(r.value);}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r};}),Tw=B("$ZodBigInt",(e,t)=>{M_.init(e,t),zg.init(e,t);}),$w=B("$ZodSymbol",(e,t)=>{ve.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r};}),Ow=B("$ZodUndefined",(e,t)=>{ve.init(e,t),e._zod.pattern=B_,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r};}),Nw=B("$ZodNull",(e,t)=>{ve.init(e,t),e._zod.pattern=P_,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r};}),Pw=B("$ZodAny",(e,t)=>{ve.init(e,t),e._zod.parse=r=>r;}),Bw=B("$ZodUnknown",(e,t)=>{ve.init(e,t),e._zod.parse=r=>r;}),Cw=B("$ZodNever",(e,t)=>{ve.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r);}),zw=B("$ZodVoid",(e,t)=>{ve.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r};}),Lw=B("$ZodDate",(e,t)=>{ve.init(e,t),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=new Date(r.value);}catch{}let n=r.value,i=n instanceof Date;return i&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...i?{received:"Invalid Date"}:{},inst:e}),r};});function W4(e,t,r){e.issues.length&&t.issues.push(...wn(r,e.issues)),t.value[r]=e.value;}var Uw=B("$ZodArray",(e,t)=>{ve.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let i=[];for(let s=0;s<n.length;s++){let a=n[s],c=t.element._zod.run({value:a,issues:[]},o);c instanceof Promise?i.push(c.then(u=>W4(u,r,s))):W4(c,r,s);}return i.length?Promise.all(i).then(()=>r):r};});function Bg(e,t,r,o){e.issues.length&&t.issues.push(...wn(r,e.issues)),e.value===void 0?r in o&&(t.value[r]=void 0):t.value[r]=e.value;}function s8(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let r=t_(e.shape);return {...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function a8(e,t,r,o,n,i){let s=[],a=n.keySet,c=n.catchall._zod,u=c.def.type;for(let l of Object.keys(t)){if(a.has(l))continue;if(u==="never"){s.push(l);continue}let d=c.run({value:t[l],issues:[]},o);d instanceof Promise?e.push(d.then(g=>Bg(g,r,l,t))):Bg(d,r,l,t);}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}var c8=B("$ZodObject",(e,t)=>{if(ve.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let a=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...a};return Object.defineProperty(t,"shape",{value:c}),c}});}let o=nf(()=>s8(t));Ne(e._zod,"propValues",()=>{let a=t.shape,c={};for(let u in a){let l=a[u]._zod;if(l.values){c[u]??(c[u]=new Set);for(let d of l.values)c[u].add(d);}}return c});let n=Fa,i=t.catchall,s;e._zod.parse=(a,c)=>{s??(s=o.value);let u=a.value;if(!n(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),a;a.value={};let l=[],d=s.shape;for(let g of s.keys){let v=d[g]._zod.run({value:u[g],issues:[]},c);v instanceof Promise?l.push(v.then(E=>Bg(E,a,g,u))):Bg(v,a,g,u);}return i?a8(l,u,a,c,o.value,e):l.length?Promise.all(l).then(()=>a):a};}),Mw=B("$ZodObjectJIT",(e,t)=>{c8.init(e,t);let r=e._zod.parse,o=nf(()=>s8(t)),n=g=>{let h=new Fd(["shape","payload","ctx"]),v=o.value,E=O=>{let I=hg(O);return `shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`};h.write("const input = payload.value;");let R=Object.create(null),$=0;for(let O of v.keys)R[O]=`key_${$++}`;h.write("const newResult = {};");for(let O of v.keys){let I=R[O],N=hg(O);h.write(`const ${I} = ${E(O)};`),h.write(`
|
|
43
|
+
`))}};var px={major:4,minor:1,patch:12};var we=B("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=px;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let n of o)for(let i of n._zod.onattach)i(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse;});else {let n=(s,a,c)=>{let u=Hi(s),f;for(let d of a){if(d._zod.def.when){if(!d._zod.def.when(s))continue}else if(u)continue;let g=s.issues.length,h=d._zod.check(s);if(h instanceof Promise&&c?.async===false)throw new Kn;if(f||h instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await h,s.issues.length!==g&&(u||(u=Hi(s,g)));});else {if(s.issues.length===g)continue;u||(u=Hi(s,g));}}return f?f.then(()=>s):s},i=(s,a,c)=>{if(Hi(s))return s.aborted=true,s;let u=n(a,o,c);if(u instanceof Promise){if(c.async===false)throw new Kn;return u.then(f=>e._zod.parse(f,c))}return e._zod.parse(u,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){let u=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:true});return u instanceof Promise?u.then(f=>i(f,s,a)):i(u,s,a)}let c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===false)throw new Kn;return c.then(u=>n(u,o,a))}return n(c,o,a)};}e["~standard"]={validate:n=>{try{let i=bb(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return xb(e,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1};}),Fs=B("$ZodString",(e,t)=>{we.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Db(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value);}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r};}),Ye=B("$ZodStringFormat",(e,t)=>{dc.init(e,t),Fs.init(e,t);}),hx=B("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=kb),Ye.init(e,t);}),gx=B("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=js(o));}else t.pattern??(t.pattern=js());Ye.init(e,t);}),yx=B("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Rb),Ye.init(e,t);}),bx=B("$ZodURL",(e,t)=>{Ye.init(e,t),e._zod.check=r=>{try{let o=r.value.trim(),n=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Cb.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});}};}),xx=B("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Tb()),Ye.init(e,t);}),vx=B("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Ib),Ye.init(e,t);}),wx=B("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=vb),Ye.init(e,t);}),_x=B("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=wb),Ye.init(e,t);}),Ex=B("$ZodULID",(e,t)=>{t.pattern??(t.pattern=_b),Ye.init(e,t);}),Sx=B("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Eb),Ye.init(e,t);}),Ix=B("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Sb),Ye.init(e,t);}),Ax=B("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Mb(t)),Ye.init(e,t);}),kx=B("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Lb),Ye.init(e,t);}),Rx=B("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Ub(t)),Ye.init(e,t);}),Tx=B("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Ab),Ye.init(e,t);}),$x=B("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=$b),Ye.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format="ipv4";});}),Ox=B("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Ob),Ye.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format="ipv6";}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`);}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort});}};}),Nx=B("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Nb),Ye.init(e,t);}),Px=B("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Pb),Ye.init(e,t),e._zod.check=r=>{let o=r.value.split("/");try{if(o.length!==2)throw new Error;let[n,i]=o;if(!i)throw new Error;let s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`);}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort});}};});function Bx(e){if(e==="")return true;if(e.length%4!==0)return false;try{return atob(e),!0}catch{return false}}var Cx=B("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Bb),Ye.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64";}),e._zod.check=r=>{Bx(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort});};});function uS(e){if(!Kp.test(e))return false;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Bx(r)}var zx=B("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Kp),Ye.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url";}),e._zod.check=r=>{uS(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort});};}),Lx=B("$ZodE164",(e,t)=>{t.pattern??(t.pattern=zb),Ye.init(e,t);});function fS(e,t=null){try{let r=e.split(".");if(r.length!==3)return !1;let[o]=r;if(!o)return !1;let n=JSON.parse(atob(o));return !("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return false}}var Ux=B("$ZodJWT",(e,t)=>{Ye.init(e,t),e._zod.check=r=>{fS(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort});};}),Mx=B("$ZodCustomStringFormat",(e,t)=>{Ye.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort});};}),nm=B("$ZodNumber",(e,t)=>{we.init(e,t),e._zod.pattern=e._zod.bag.pattern??Hb,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value);}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let i=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...i?{received:i}:{}}),r};}),Dx=B("$ZodNumber",(e,t)=>{Jb.init(e,t),nm.init(e,t);}),Wf=B("$ZodBoolean",(e,t)=>{we.init(e,t),e._zod.pattern=Vb,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=!!r.value;}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r};}),om=B("$ZodBigInt",(e,t)=>{we.init(e,t),e._zod.pattern=jb,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=BigInt(r.value);}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r};}),jx=B("$ZodBigInt",(e,t)=>{Yb.init(e,t),om.init(e,t);}),Fx=B("$ZodSymbol",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r};}),Hx=B("$ZodUndefined",(e,t)=>{we.init(e,t),e._zod.pattern=Gb,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r};}),Vx=B("$ZodNull",(e,t)=>{we.init(e,t),e._zod.pattern=Zb,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r};}),Zx=B("$ZodAny",(e,t)=>{we.init(e,t),e._zod.parse=r=>r;}),Gx=B("$ZodUnknown",(e,t)=>{we.init(e,t),e._zod.parse=r=>r;}),qx=B("$ZodNever",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r);}),Wx=B("$ZodVoid",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r};}),Kx=B("$ZodDate",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=new Date(r.value);}catch{}let n=r.value,i=n instanceof Date;return i&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...i?{received:"Invalid Date"}:{},inst:e}),r};});function QE(e,t,r){e.issues.length&&t.issues.push(...hn(r,e.issues)),t.value[r]=e.value;}var Jx=B("$ZodArray",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let i=[];for(let s=0;s<n.length;s++){let a=n[s],c=t.element._zod.run({value:a,issues:[]},o);c instanceof Promise?i.push(c.then(u=>QE(u,r,s))):QE(c,r,s);}return i.length?Promise.all(i).then(()=>r):r};});function rm(e,t,r,o){e.issues.length&&t.issues.push(...hn(r,e.issues)),e.value===void 0?r in o&&(t.value[r]=void 0):t.value[r]=e.value;}function lS(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let r=pb(e.shape);return {...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function dS(e,t,r,o,n,i){let s=[],a=n.keySet,c=n.catchall._zod,u=c.def.type;for(let f of Object.keys(t)){if(a.has(f))continue;if(u==="never"){s.push(f);continue}let d=c.run({value:t[f],issues:[]},o);d instanceof Promise?e.push(d.then(g=>rm(g,r,f,t))):rm(d,r,f,t);}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}var pS=B("$ZodObject",(e,t)=>{if(we.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let a=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...a};return Object.defineProperty(t,"shape",{value:c}),c}});}let o=sc(()=>lS(t));Oe(e._zod,"propValues",()=>{let a=t.shape,c={};for(let u in a){let f=a[u]._zod;if(f.values){c[u]??(c[u]=new Set);for(let d of f.values)c[u].add(d);}}return c});let n=Ds,i=t.catchall,s;e._zod.parse=(a,c)=>{s??(s=o.value);let u=a.value;if(!n(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),a;a.value={};let f=[],d=s.shape;for(let g of s.keys){let v=d[g]._zod.run({value:u[g],issues:[]},c);v instanceof Promise?f.push(v.then(E=>rm(E,a,g,u))):rm(v,a,g,u);}return i?dS(f,u,a,c,o.value,e):f.length?Promise.all(f).then(()=>a):a};}),Yx=B("$ZodObjectJIT",(e,t)=>{pS.init(e,t);let r=e._zod.parse,o=sc(()=>lS(t)),n=g=>{let h=new qf(["shape","payload","ctx"]),v=o.value,E=O=>{let I=Lp(O);return `shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`};h.write("const input = payload.value;");let R=Object.create(null),$=0;for(let O of v.keys)R[O]=`key_${$++}`;h.write("const newResult = {};");for(let O of v.keys){let I=R[O],P=Lp(O);h.write(`const ${I} = ${E(O)};`),h.write(`
|
|
52
44
|
if (${I}.issues.length) {
|
|
53
45
|
payload.issues = payload.issues.concat(${I}.issues.map(iss => ({
|
|
54
46
|
...iss,
|
|
55
|
-
path: iss.path ? [${
|
|
47
|
+
path: iss.path ? [${P}, ...iss.path] : [${P}]
|
|
56
48
|
})));
|
|
57
49
|
}
|
|
58
50
|
|
|
59
51
|
|
|
60
52
|
if (${I}.value === undefined) {
|
|
61
|
-
if (${
|
|
62
|
-
newResult[${
|
|
53
|
+
if (${P} in input) {
|
|
54
|
+
newResult[${P}] = undefined;
|
|
63
55
|
}
|
|
64
56
|
} else {
|
|
65
|
-
newResult[${
|
|
57
|
+
newResult[${P}] = ${I}.value;
|
|
66
58
|
}
|
|
67
59
|
|
|
68
|
-
`);}h.write("payload.value = newResult;"),h.write("return payload;");let P=h.compile();return (O,I)=>P(g,O,I)},i,s=Fa,a=!$d.jitless,u=a&&Xv.value,l=t.catchall,d;e._zod.parse=(g,h)=>{d??(d=o.value);let v=g.value;return s(v)?a&&u&&h?.async===false&&h.jitless!==true?(i||(i=n(t.shape)),g=i(g,h),l?a8([],v,g,h,d,e):g):r(g,h):(g.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),g)};});function K4(e,t,r,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let n=e.filter(i=>!$s(i));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>En(s,o,wt())))}),t)}var Lg=B("$ZodUnion",(e,t)=>{ve.init(e,t),Ne(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Ne(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Ne(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Ne(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){let n=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${n.map(i=>Pd(i.source)).join("|")})$`)}});let r=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(n,i)=>{if(r)return o(n,i);let s=false,a=[];for(let c of t.options){let u=c._zod.run({value:n.value,issues:[]},i);if(u instanceof Promise)a.push(u),s=true;else {if(u.issues.length===0)return u;a.push(u);}}return s?Promise.all(a).then(c=>K4(c,n,e,i)):K4(a,n,e,i)};}),Dw=B("$ZodDiscriminatedUnion",(e,t)=>{Lg.init(e,t);let r=e._zod.parse;Ne(e._zod,"propValues",()=>{let n={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[a,c]of Object.entries(s)){n[a]||(n[a]=new Set);for(let u of c)n[a].add(u);}}return n});let o=nf(()=>{let n=t.options,i=new Map;for(let s of n){let a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let c of a){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,s);}}return i});e._zod.parse=(n,i)=>{let s=n.value;if(!Fa(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),n;let a=o.value.get(s?.[t.discriminator]);return a?a._zod.run(n,i):t.unionFallback?r(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),n)};}),jw=B("$ZodIntersection",(e,t)=>{ve.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),s=t.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,u])=>J4(r,c,u)):J4(r,i,s)};});function rw(e,t){if(e===t)return {valid:true,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return {valid:true,data:e};if(Ts(e)&&Ts(t)){let r=Object.keys(t),o=Object.keys(e).filter(i=>r.indexOf(i)!==-1),n={...e,...t};for(let i of o){let s=rw(e[i],t[i]);if(!s.valid)return {valid:false,mergeErrorPath:[i,...s.mergeErrorPath]};n[i]=s.data;}return {valid:true,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return {valid:false,mergeErrorPath:[]};let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o],s=rw(n,i);if(!s.valid)return {valid:false,mergeErrorPath:[o,...s.mergeErrorPath]};r.push(s.data);}return {valid:true,data:r}}return {valid:false,mergeErrorPath:[]}}function J4(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),$s(e))return e;let o=rw(t.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var Ug=B("$ZodTuple",(e,t)=>{ve.init(e,t);let r=t.items,o=r.length-[...r].reverse().findIndex(n=>n._zod.optin!=="optional");e._zod.parse=(n,i)=>{let s=n.value;if(!Array.isArray(s))return n.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=[];let a=[];if(!t.rest){let u=s.length>r.length,l=s.length<o-1;if(u||l)return n.issues.push({...u?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},input:s,inst:e,origin:"array"}),n}let c=-1;for(let u of r){if(c++,c>=s.length&&c>=o)continue;let l=u._zod.run({value:s[c],issues:[]},i);l instanceof Promise?a.push(l.then(d=>$g(d,n,c))):$g(l,n,c);}if(t.rest){let u=s.slice(r.length);for(let l of u){c++;let d=t.rest._zod.run({value:l,issues:[]},i);d instanceof Promise?a.push(d.then(g=>$g(g,n,c))):$g(d,n,c);}}return a.length?Promise.all(a).then(()=>n):n};});function $g(e,t,r){e.issues.length&&t.issues.push(...wn(r,e.issues)),t.value[r]=e.value;}var Fw=B("$ZodRecord",(e,t)=>{ve.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Ts(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let i=[];if(t.keyType._zod.values){let s=t.keyType._zod.values;r.value={};for(let c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let u=t.valueType._zod.run({value:n[c],issues:[]},o);u instanceof Promise?i.push(u.then(l=>{l.issues.length&&r.issues.push(...wn(c,l.issues)),r.value[c]=l.value;})):(u.issues.length&&r.issues.push(...wn(c,u.issues)),r.value[c]=u.value);}let a;for(let c in n)s.has(c)||(a=a??[],a.push(c));a&&a.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:a});}else {r.value={};for(let s of Reflect.ownKeys(n)){if(s==="__proto__")continue;let a=t.keyType._zod.run({value:s,issues:[]},o);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(u=>En(u,o,wt())),input:s,path:[s],inst:e}),r.value[a.value]=a.value;continue}let c=t.valueType._zod.run({value:n[s],issues:[]},o);c instanceof Promise?i.push(c.then(u=>{u.issues.length&&r.issues.push(...wn(s,u.issues)),r.value[a.value]=u.value;})):(c.issues.length&&r.issues.push(...wn(s,c.issues)),r.value[a.value]=c.value);}}return i.length?Promise.all(i).then(()=>r):r};}),Hw=B("$ZodMap",(e,t)=>{ve.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;let i=[];r.value=new Map;for(let[s,a]of n){let c=t.keyType._zod.run({value:s,issues:[]},o),u=t.valueType._zod.run({value:a,issues:[]},o);c instanceof Promise||u instanceof Promise?i.push(Promise.all([c,u]).then(([l,d])=>{Y4(l,d,r,s,n,e,o);})):Y4(c,u,r,s,n,e,o);}return i.length?Promise.all(i).then(()=>r):r};});function Y4(e,t,r,o,n,i,s){e.issues.length&&(Bd.has(typeof o)?r.issues.push(...wn(o,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:i,issues:e.issues.map(a=>En(a,s,wt()))})),t.issues.length&&(Bd.has(typeof o)?r.issues.push(...wn(o,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:t.issues.map(a=>En(a,s,wt()))})),r.value.set(e.value,t.value);}var Vw=B("$ZodSet",(e,t)=>{ve.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;let i=[];r.value=new Set;for(let s of n){let a=t.valueType._zod.run({value:s,issues:[]},o);a instanceof Promise?i.push(a.then(c=>X4(c,r))):X4(a,r);}return i.length?Promise.all(i).then(()=>r):r};});function X4(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value);}var Zw=B("$ZodEnum",(e,t)=>{ve.init(e,t);let r=Nd(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(n=>Bd.has(typeof n)).map(n=>typeof n=="string"?jo(n):n.toString()).join("|")})$`),e._zod.parse=(n,i)=>{let s=n.value;return o.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:e}),n};}),Gw=B("$ZodLiteral",(e,t)=>{if(ve.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?jo(r):r?jo(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,o)=>{let n=r.value;return e._zod.values.has(n)||r.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),r};}),qw=B("$ZodFile",(e,t)=>{ve.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r};}),Ww=B("$ZodTransform",(e,t)=>{ve.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Is(e.constructor.name);let n=t.transform(r.value,r);if(o.async)return (n instanceof Promise?n:Promise.resolve(n)).then(s=>(r.value=s,r));if(n instanceof Promise)throw new po;return r.value=n,r};});function Q4(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var Kw=B("$ZodOptional",(e,t)=>{ve.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ne(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ne(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Pd(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin==="optional"){let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>Q4(i,r.value)):Q4(n,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,o)};}),Jw=B("$ZodNullable",(e,t)=>{ve.init(e,t),Ne(e._zod,"optin",()=>t.innerType._zod.optin),Ne(e._zod,"optout",()=>t.innerType._zod.optout),Ne(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Pd(r.source)}|null)$`):void 0}),Ne(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:t.innerType._zod.run(r,o);}),Yw=B("$ZodDefault",(e,t)=>{ve.init(e,t),e._zod.optin="optional",Ne(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>e8(i,t)):e8(n,t)};});function e8(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Xw=B("$ZodPrefault",(e,t)=>{ve.init(e,t),e._zod.optin="optional",Ne(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,o));}),Qw=B("$ZodNonOptional",(e,t)=>{ve.init(e,t),Ne(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>t8(i,e)):t8(n,e)};});function t8(e,t){return !e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var e6=B("$ZodSuccess",(e,t)=>{ve.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Is("ZodSuccess");let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.issues.length===0,r)):(r.value=n.issues.length===0,r)};}),t6=B("$ZodCatch",(e,t)=>{ve.init(e,t),Ne(e._zod,"optin",()=>t.innerType._zod.optin),Ne(e._zod,"optout",()=>t.innerType._zod.optout),Ne(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>En(s,o,wt()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(i=>En(i,o,wt()))},input:r.value}),r.issues=[]),r)};}),r6=B("$ZodNaN",(e,t)=>{ve.init(e,t),e._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r);}),n6=B("$ZodPipe",(e,t)=>{ve.init(e,t),Ne(e._zod,"values",()=>t.in._zod.values),Ne(e._zod,"optin",()=>t.in._zod.optin),Ne(e._zod,"optout",()=>t.out._zod.optout),Ne(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>Og(s,t.in,o)):Og(i,t.in,o)}let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>Og(i,t.out,o)):Og(n,t.out,o)};});function Og(e,t,r){return e.issues.length?(e.aborted=true,e):t._zod.run({value:e.value,issues:e.issues},r)}var Vd=B("$ZodCodec",(e,t)=>{ve.init(e,t),Ne(e._zod,"values",()=>t.in._zod.values),Ne(e._zod,"optin",()=>t.in._zod.optin),Ne(e._zod,"optout",()=>t.out._zod.optout),Ne(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(r,o);return i instanceof Promise?i.then(s=>Ng(s,t,o)):Ng(i,t,o)}else {let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>Ng(s,t,o)):Ng(i,t,o)}};});function Ng(e,t,r){if(e.issues.length)return e.aborted=true,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);return n instanceof Promise?n.then(i=>Pg(e,i,t.out,r)):Pg(e,n,t.out,r)}else {let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(i=>Pg(e,i,t.in,r)):Pg(e,n,t.in,r)}}function Pg(e,t,r,o){return e.issues.length?(e.aborted=true,e):r._zod.run({value:t,issues:e.issues},o)}var o6=B("$ZodReadonly",(e,t)=>{ve.init(e,t),Ne(e._zod,"propValues",()=>t.innerType._zod.propValues),Ne(e._zod,"values",()=>t.innerType._zod.values),Ne(e._zod,"optin",()=>t.innerType._zod.optin),Ne(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(r8):r8(n)};});function r8(e){return e.value=Object.freeze(e.value),e}var i6=B("$ZodTemplateLiteral",(e,t)=>{ve.init(e,t);let r=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let n=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=n.startsWith("^")?1:0,s=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(i,s));}else if(o===null||e_.has(typeof o))r.push(jo(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(o,n)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"template_literal",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o);}),s6=B("$ZodFunction",(e,t)=>(ve.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...o){let n=e._def.input?yg(e._def.input,o):o,i=Reflect.apply(r,this,n);return e._def.output?yg(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let n=e._def.input?await bg(e._def.input,o):o,i=await Reflect.apply(r,this,n);return e._def.output?await bg(e._def.output,i):i}},e._zod.parse=(r,o)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let o=e.constructor;return Array.isArray(r[0])?new o({type:"function",input:new Ug({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new o({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:r})},e)),a6=B("$ZodPromise",(e,t)=>{ve.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o));}),c6=B("$ZodLazy",(e,t)=>{ve.init(e,t),Ne(e._zod,"innerType",()=>t.getter()),Ne(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),Ne(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),Ne(e._zod,"optin",()=>e._zod.innerType._zod.optin??void 0),Ne(e._zod,"optout",()=>e._zod.innerType._zod.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o);}),u6=B("$ZodCustom",(e,t)=>{ot.init(e,t),ve.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=r=>{let o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then(i=>n8(i,r,o,e));n8(n,r,o,e);};});function n8(e,t,r,o){if(!e){let n={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(n.params=o._zod.def.params),t.issues.push(of(n));}}var qd={};Ir(qd,{ar:()=>u8,az:()=>f8,be:()=>d8,bg:()=>p8,ca:()=>m8,cs:()=>h8,da:()=>g8,de:()=>y8,en:()=>Mg,eo:()=>b8,es:()=>x8,fa:()=>v8,fi:()=>_8,fr:()=>w8,frCA:()=>E8,he:()=>S8,hu:()=>I8,id:()=>A8,is:()=>k8,it:()=>R8,ja:()=>T8,ka:()=>$8,kh:()=>O8,km:()=>Dg,ko:()=>N8,lt:()=>B8,mk:()=>C8,ms:()=>z8,nl:()=>L8,no:()=>U8,ota:()=>M8,pl:()=>j8,ps:()=>D8,pt:()=>F8,ru:()=>V8,sl:()=>Z8,sv:()=>G8,ta:()=>q8,th:()=>W8,tr:()=>K8,ua:()=>J8,uk:()=>jg,ur:()=>Y8,vi:()=>X8,yo:()=>t$,zhCN:()=>Q8,zhTW:()=>e$});var RF=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"};return n=>{switch(n.code){case "invalid_type":return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${X(n.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${o[i.format]??n.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case "not_multiple_of":return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${n.divisor}`;case "unrecognized_keys":return `\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${D(n.keys,"\u060C ")}`;case "invalid_key":return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;case "invalid_union":return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case "invalid_element":return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;default:return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function u8(){return {localeError:RF()}}var TF=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case "invalid_type":return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${n.expected}, daxil olan ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${X(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${o[i.format]??n.format}`}case "not_multiple_of":return `Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case "unrecognized_keys":return `Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${D(n.keys,", ")}`;case "invalid_key":return `${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case "invalid_union":return "Yanl\u0131\u015F d\u0259y\u0259r";case "invalid_element":return `${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return "Yanl\u0131\u015F d\u0259y\u0259r"}}};function f8(){return {localeError:TF()}}function l8(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var $F=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u043B\u0456\u043A";case "object":{if(Array.isArray(n))return "\u043C\u0430\u0441\u0456\u045E";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"};return n=>{switch(n.code){case "invalid_type":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${X(n.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),c=l8(a,s.unit.one,s.unit.few,s.unit.many);return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${n.maximum.toString()} ${c}`}return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),c=l8(a,s.unit.one,s.unit.few,s.unit.many);return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${n.minimum.toString()} ${c}`}return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${o[i.format]??n.format}`}case "not_multiple_of":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${D(n.keys,", ")}`;case "invalid_key":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case "invalid_union":return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case "invalid_element":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${n.origin}`;default:return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function d8(){return {localeError:$F()}}var OF=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case "object":{if(Array.isArray(e))return "\u043C\u0430\u0441\u0438\u0432";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},NF=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(o){return e[o]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"};return o=>{switch(o.code){case "invalid_type":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${OF(o.input)}`;case "invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${X(o.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${D(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${o.maximum.toString()} ${i.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${o.minimum.toString()} ${i.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;if(n.format==="starts_with")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${n.prefix}"`;if(n.format==="ends_with")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${n.suffix}"`;if(n.format==="includes")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${n.includes}"`;if(n.format==="regex")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${n.pattern}`;let i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return n.format==="emoji"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="datetime"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="date"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),n.format==="time"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="duration"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${i} ${r[n.format]??o.format}`}case "not_multiple_of":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${o.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${o.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u043E\u0432\u0435":""}: ${D(o.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case "invalid_union":return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case "invalid_element":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${o.origin}`;default:return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function p8(){return {localeError:NF()}}var PF=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case "invalid_type":return `Tipus inv\xE0lid: s'esperava ${n.expected}, s'ha rebut ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${X(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${D(n.values," o ")}`;case "too_big":{let i=n.inclusive?"com a m\xE0xim":"menys de",s=t(n.origin);return s?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${i} ${n.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${i} ${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(n.origin);return s?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${i} ${n.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${i} ${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${o[i.format]??n.format}`}case "not_multiple_of":return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case "unrecognized_keys":return `Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${D(n.keys,", ")}`;case "invalid_key":return `Clau inv\xE0lida a ${n.origin}`;case "invalid_union":return "Entrada inv\xE0lida";case "invalid_element":return `Element inv\xE0lid a ${n.origin}`;default:return "Entrada inv\xE0lida"}}};function m8(){return {localeError:PF()}}var BF=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u010D\xEDslo";case "string":return "\u0159et\u011Bzec";case "boolean":return "boolean";case "bigint":return "bigint";case "function":return "funkce";case "symbol":return "symbol";case "undefined":return "undefined";case "object":{if(Array.isArray(n))return "pole";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"};return n=>{switch(n.code){case "invalid_type":return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${n.expected}, obdr\u017Eeno ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${X(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${o[i.format]??n.format}`}case "not_multiple_of":return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case "unrecognized_keys":return `Nezn\xE1m\xE9 kl\xED\u010De: ${D(n.keys,", ")}`;case "invalid_key":return `Neplatn\xFD kl\xED\u010D v ${n.origin}`;case "invalid_union":return "Neplatn\xFD vstup";case "invalid_element":return `Neplatn\xE1 hodnota v ${n.origin}`;default:return "Neplatn\xFD vstup"}}};function h8(){return {localeError:BF()}}var CF=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},t={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};function r(s){return e[s]??null}function o(s){return t[s]??s}let n=s=>{let a=typeof s;switch(a){case "number":return Number.isNaN(s)?"NaN":"tal";case "object":return Array.isArray(s)?"liste":s===null?"null":Object.getPrototypeOf(s)!==Object.prototype&&s.constructor?s.constructor.name:"objekt"}return a},i={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return s=>{switch(s.code){case "invalid_type":return `Ugyldigt input: forventede ${o(s.expected)}, fik ${o(n(s.input))}`;case "invalid_value":return s.values.length===1?`Ugyldig v\xE6rdi: forventede ${X(s.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${D(s.values,"|")}`;case "too_big":{let a=s.inclusive?"<=":"<",c=r(s.origin),u=o(s.origin);return c?`For stor: forventede ${u??"value"} ${c.verb} ${a} ${s.maximum.toString()} ${c.unit??"elementer"}`:`For stor: forventede ${u??"value"} havde ${a} ${s.maximum.toString()}`}case "too_small":{let a=s.inclusive?">=":">",c=r(s.origin),u=o(s.origin);return c?`For lille: forventede ${u} ${c.verb} ${a} ${s.minimum.toString()} ${c.unit}`:`For lille: forventede ${u} havde ${a} ${s.minimum.toString()}`}case "invalid_format":{let a=s;return a.format==="starts_with"?`Ugyldig streng: skal starte med "${a.prefix}"`:a.format==="ends_with"?`Ugyldig streng: skal ende med "${a.suffix}"`:a.format==="includes"?`Ugyldig streng: skal indeholde "${a.includes}"`:a.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${a.pattern}`:`Ugyldig ${i[a.format]??s.format}`}case "not_multiple_of":return `Ugyldigt tal: skal v\xE6re deleligt med ${s.divisor}`;case "unrecognized_keys":return `${s.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${D(s.keys,", ")}`;case "invalid_key":return `Ugyldig n\xF8gle i ${s.origin}`;case "invalid_union":return "Ugyldigt input: matcher ingen af de tilladte typer";case "invalid_element":return `Ugyldig v\xE6rdi i ${s.origin}`;default:return "Ugyldigt input"}}};function g8(){return {localeError:CF()}}var zF=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"Zahl";case "object":{if(Array.isArray(n))return "Array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return n=>{switch(n.code){case "invalid_type":return `Ung\xFCltige Eingabe: erwartet ${n.expected}, erhalten ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${X(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ist`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ist`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${o[i.format]??n.format}`}case "not_multiple_of":return `Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case "unrecognized_keys":return `${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${D(n.keys,", ")}`;case "invalid_key":return `Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case "invalid_union":return "Ung\xFCltige Eingabe";case "invalid_element":return `Ung\xFCltiger Wert in ${n.origin}`;default:return "Ung\xFCltige Eingabe"}}};function y8(){return {localeError:zF()}}var LF=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"number";case "object":{if(Array.isArray(e))return "array";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},UF=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(o){return e[o]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return o=>{switch(o.code){case "invalid_type":return `Invalid input: expected ${o.expected}, received ${LF(o.input)}`;case "invalid_value":return o.values.length===1?`Invalid input: expected ${X(o.values[0])}`:`Invalid option: expected one of ${D(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Too big: expected ${o.origin??"value"} to have ${n}${o.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`Too small: expected ${o.origin} to have ${n}${o.minimum.toString()} ${i.unit}`:`Too small: expected ${o.origin} to be ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`Invalid string: must start with "${n.prefix}"`:n.format==="ends_with"?`Invalid string: must end with "${n.suffix}"`:n.format==="includes"?`Invalid string: must include "${n.includes}"`:n.format==="regex"?`Invalid string: must match pattern ${n.pattern}`:`Invalid ${r[n.format]??o.format}`}case "not_multiple_of":return `Invalid number: must be a multiple of ${o.divisor}`;case "unrecognized_keys":return `Unrecognized key${o.keys.length>1?"s":""}: ${D(o.keys,", ")}`;case "invalid_key":return `Invalid key in ${o.origin}`;case "invalid_union":return "Invalid input";case "invalid_element":return `Invalid value in ${o.origin}`;default:return "Invalid input"}}};function Mg(){return {localeError:UF()}}var MF=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"nombro";case "object":{if(Array.isArray(e))return "tabelo";if(e===null)return "senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},DF=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(o){return e[o]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return o=>{switch(o.code){case "invalid_type":return `Nevalida enigo: atendi\u011Dis ${o.expected}, ricevi\u011Dis ${MF(o.input)}`;case "invalid_value":return o.values.length===1?`Nevalida enigo: atendi\u011Dis ${X(o.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${D(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${n}${o.maximum.toString()} ${i.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`Tro malgranda: atendi\u011Dis ke ${o.origin} havu ${n}${o.minimum.toString()} ${i.unit}`:`Tro malgranda: atendi\u011Dis ke ${o.origin} estu ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${n.prefix}"`:n.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${n.suffix}"`:n.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${n.includes}"`:n.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${n.pattern}`:`Nevalida ${r[n.format]??o.format}`}case "not_multiple_of":return `Nevalida nombro: devas esti oblo de ${o.divisor}`;case "unrecognized_keys":return `Nekonata${o.keys.length>1?"j":""} \u015Dlosilo${o.keys.length>1?"j":""}: ${D(o.keys,", ")}`;case "invalid_key":return `Nevalida \u015Dlosilo en ${o.origin}`;case "invalid_union":return "Nevalida enigo";case "invalid_element":return `Nevalida valoro en ${o.origin}`;default:return "Nevalida enigo"}}};function b8(){return {localeError:DF()}}var jF=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},t={string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};function r(s){return e[s]??null}function o(s){return t[s]??s}let n=s=>{let a=typeof s;switch(a){case "number":return Number.isNaN(s)?"NaN":"number";case "object":return Array.isArray(s)?"array":s===null?"null":Object.getPrototypeOf(s)!==Object.prototype?s.constructor.name:"object"}return a},i={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return s=>{switch(s.code){case "invalid_type":return `Entrada inv\xE1lida: se esperaba ${o(s.expected)}, recibido ${o(n(s.input))}`;case "invalid_value":return s.values.length===1?`Entrada inv\xE1lida: se esperaba ${X(s.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${D(s.values,"|")}`;case "too_big":{let a=s.inclusive?"<=":"<",c=r(s.origin),u=o(s.origin);return c?`Demasiado grande: se esperaba que ${u??"valor"} tuviera ${a}${s.maximum.toString()} ${c.unit??"elementos"}`:`Demasiado grande: se esperaba que ${u??"valor"} fuera ${a}${s.maximum.toString()}`}case "too_small":{let a=s.inclusive?">=":">",c=r(s.origin),u=o(s.origin);return c?`Demasiado peque\xF1o: se esperaba que ${u} tuviera ${a}${s.minimum.toString()} ${c.unit}`:`Demasiado peque\xF1o: se esperaba que ${u} fuera ${a}${s.minimum.toString()}`}case "invalid_format":{let a=s;return a.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${a.prefix}"`:a.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${a.suffix}"`:a.format==="includes"?`Cadena inv\xE1lida: debe incluir "${a.includes}"`:a.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${a.pattern}`:`Inv\xE1lido ${i[a.format]??s.format}`}case "not_multiple_of":return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${s.divisor}`;case "unrecognized_keys":return `Llave${s.keys.length>1?"s":""} desconocida${s.keys.length>1?"s":""}: ${D(s.keys,", ")}`;case "invalid_key":return `Llave inv\xE1lida en ${o(s.origin)}`;case "invalid_union":return "Entrada inv\xE1lida";case "invalid_element":return `Valor inv\xE1lido en ${o(s.origin)}`;default:return "Entrada inv\xE1lida"}}};function x8(){return {localeError:jF()}}var FF=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0639\u062F\u062F";case "object":{if(Array.isArray(n))return "\u0622\u0631\u0627\u06CC\u0647";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"};return n=>{switch(n.code){case "invalid_type":return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${r(n.input)} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;case "invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${X(n.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${D(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${o[i.format]??n.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case "not_multiple_of":return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${n.divisor} \u0628\u0627\u0634\u062F`;case "unrecognized_keys":return `\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${D(n.keys,", ")}`;case "invalid_key":return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.origin}`;case "invalid_union":return "\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case "invalid_element":return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${n.origin}`;default:return "\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function v8(){return {localeError:FF()}}var HF=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return n=>{switch(n.code){case "invalid_type":return `Virheellinen tyyppi: odotettiin ${n.expected}, oli ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${X(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${n.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${n.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${o[i.format]??n.format}`}case "not_multiple_of":return `Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case "unrecognized_keys":return `${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${D(n.keys,", ")}`;case "invalid_key":return "Virheellinen avain tietueessa";case "invalid_union":return "Virheellinen unioni";case "invalid_element":return "Virheellinen arvo joukossa";default:return "Virheellinen sy\xF6te"}}};function _8(){return {localeError:HF()}}var VF=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"nombre";case "object":{if(Array.isArray(n))return "tableau";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return n=>{switch(n.code){case "invalid_type":return `Entr\xE9e invalide : ${n.expected} attendu, ${r(n.input)} re\xE7u`;case "invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${X(n.values[0])} attendu`:`Option invalide : une valeur parmi ${D(n.values,"|")} attendue`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Trop grand : ${n.origin??"valeur"} doit ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n.origin??"valeur"} doit \xEAtre ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Trop petit : ${n.origin} doit ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : ${n.origin} doit \xEAtre ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${o[i.format]??n.format} invalide`}case "not_multiple_of":return `Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case "unrecognized_keys":return `Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${D(n.keys,", ")}`;case "invalid_key":return `Cl\xE9 invalide dans ${n.origin}`;case "invalid_union":return "Entr\xE9e invalide";case "invalid_element":return `Valeur invalide dans ${n.origin}`;default:return "Entr\xE9e invalide"}}};function w8(){return {localeError:VF()}}var ZF=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return n=>{switch(n.code){case "invalid_type":return `Entr\xE9e invalide : attendu ${n.expected}, re\xE7u ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${X(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"\u2264":"<",s=t(n.origin);return s?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${i}${n.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?"\u2265":">",s=t(n.origin);return s?`Trop petit : attendu que ${n.origin} ait ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${n.origin} soit ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${o[i.format]??n.format} invalide`}case "not_multiple_of":return `Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case "unrecognized_keys":return `Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${D(n.keys,", ")}`;case "invalid_key":return `Cl\xE9 invalide dans ${n.origin}`;case "invalid_union":return "Entr\xE9e invalide";case "invalid_element":return `Valeur invalide dans ${n.origin}`;default:return "Entr\xE9e invalide"}}};function E8(){return {localeError:ZF()}}var GF=()=>{let e={string:{unit:"\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u05E7\u05DC\u05D8",email:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",url:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",emoji:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",date:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",time:"\u05D6\u05DE\u05DF ISO",duration:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",ipv4:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",ipv6:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",cidrv4:"\u05D8\u05D5\u05D5\u05D7 IPv4",cidrv6:"\u05D8\u05D5\u05D5\u05D7 IPv6",base64:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",base64url:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",json_string:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",e164:"\u05DE\u05E1\u05E4\u05E8 E.164",jwt:"JWT",template_literal:"\u05E7\u05DC\u05D8"};return n=>{switch(n.code){case "invalid_type":return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${n.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${X(n.values[0])}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${n.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.maximum.toString()} ${s.unit??"elements"}`:`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${n.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${n.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.minimum.toString()} ${s.unit}`:`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${n.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1"${i.prefix}"`:i.format==="ends_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${i.suffix}"`:i.format==="includes"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${i.includes}"`:i.format==="regex"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${i.pattern}`:`${o[i.format]??n.format} \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`}case "not_multiple_of":return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${n.divisor}`;case "unrecognized_keys":return `\u05DE\u05E4\u05EA\u05D7${n.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${n.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${D(n.keys,", ")}`;case "invalid_key":return `\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n.origin}`;case "invalid_union":return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case "invalid_element":return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n.origin}`;default:return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function S8(){return {localeError:GF()}}var qF=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"sz\xE1m";case "object":{if(Array.isArray(n))return "t\xF6mb";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"};return n=>{switch(n.code){case "invalid_type":return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${n.expected}, a kapott \xE9rt\xE9k ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${X(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${n.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${i}${n.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${o[i.format]??n.format}`}case "not_multiple_of":return `\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case "unrecognized_keys":return `Ismeretlen kulcs${n.keys.length>1?"s":""}: ${D(n.keys,", ")}`;case "invalid_key":return `\xC9rv\xE9nytelen kulcs ${n.origin}`;case "invalid_union":return "\xC9rv\xE9nytelen bemenet";case "invalid_element":return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return "\xC9rv\xE9nytelen bemenet"}}};function I8(){return {localeError:qF()}}var WF=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case "invalid_type":return `Input tidak valid: diharapkan ${n.expected}, diterima ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${X(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: diharapkan ${n.origin} memiliki ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${o[i.format]??n.format} tidak valid`}case "not_multiple_of":return `Angka tidak valid: harus kelipatan dari ${n.divisor}`;case "unrecognized_keys":return `Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${D(n.keys,", ")}`;case "invalid_key":return `Kunci tidak valid di ${n.origin}`;case "invalid_union":return "Input tidak valid";case "invalid_element":return `Nilai tidak valid di ${n.origin}`;default:return "Input tidak valid"}}};function A8(){return {localeError:WF()}}var KF=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"n\xFAmer";case "object":{if(Array.isArray(e))return "fylki";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},JF=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(o){return e[o]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"};return o=>{switch(o.code){case "invalid_type":return `Rangt gildi: \xDE\xFA sl\xF3st inn ${KF(o.input)} \xFEar sem \xE1 a\xF0 vera ${o.expected}`;case "invalid_value":return o.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${X(o.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${D(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} hafi ${n}${o.maximum.toString()} ${i.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} s\xE9 ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} hafi ${n}${o.minimum.toString()} ${i.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} s\xE9 ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${n.prefix}"`:n.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${n.suffix}"`:n.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${n.includes}"`:n.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${n.pattern}`:`Rangt ${r[n.format]??o.format}`}case "not_multiple_of":return `R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${o.divisor}`;case "unrecognized_keys":return `\xD3\xFEekkt ${o.keys.length>1?"ir lyklar":"ur lykill"}: ${D(o.keys,", ")}`;case "invalid_key":return `Rangur lykill \xED ${o.origin}`;case "invalid_union":return "Rangt gildi";case "invalid_element":return `Rangt gildi \xED ${o.origin}`;default:return "Rangt gildi"}}};function k8(){return {localeError:JF()}}var YF=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"numero";case "object":{if(Array.isArray(n))return "vettore";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case "invalid_type":return `Input non valido: atteso ${n.expected}, ricevuto ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Input non valido: atteso ${X(n.values[0])}`:`Opzione non valida: atteso uno tra ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Troppo grande: ${n.origin??"valore"} deve avere ${i}${n.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Troppo piccolo: ${n.origin} deve avere ${i}${n.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${n.origin} deve essere ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Invalid ${o[i.format]??n.format}`}case "not_multiple_of":return `Numero non valido: deve essere un multiplo di ${n.divisor}`;case "unrecognized_keys":return `Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${D(n.keys,", ")}`;case "invalid_key":return `Chiave non valida in ${n.origin}`;case "invalid_union":return "Input non valido";case "invalid_element":return `Valore non valido in ${n.origin}`;default:return "Input non valido"}}};function R8(){return {localeError:YF()}}var XF=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u6570\u5024";case "object":{if(Array.isArray(n))return "\u914D\u5217";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"};return n=>{switch(n.code){case "invalid_type":return `\u7121\u52B9\u306A\u5165\u529B: ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${r(n.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;case "invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${X(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${D(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case "too_big":{let i=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(n.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${s.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case "too_small":{let i=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(n.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${s.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${o[i.format]??n.format}`}case "not_multiple_of":return `\u7121\u52B9\u306A\u6570\u5024: ${n.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case "unrecognized_keys":return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${n.keys.length>1?"\u7FA4":""}: ${D(n.keys,"\u3001")}`;case "invalid_key":return `${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case "invalid_union":return "\u7121\u52B9\u306A\u5165\u529B";case "invalid_element":return `${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return "\u7121\u52B9\u306A\u5165\u529B"}}};function T8(){return {localeError:XF()}}var QF=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8";case "object":{if(Array.isArray(e))return "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return {string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0"}[t]??t},eH=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(o){return e[o]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"};return o=>{switch(o.code){case "invalid_type":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${QF(o.input)}`;case "invalid_value":return o.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${X(o.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${D(o.values,"|")}-\u10D3\u10D0\u10DC`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${i.verb} ${n}${o.maximum.toString()} ${i.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} ${i.verb} ${n}${o.minimum.toString()} ${i.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} \u10D8\u10E7\u10DD\u10E1 ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.prefix}"-\u10D8\u10D7`:n.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.suffix}"-\u10D8\u10D7`:n.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${n.includes}"-\u10E1`:n.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${n.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[n.format]??o.format}`}case "not_multiple_of":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${o.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case "unrecognized_keys":return `\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${o.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${D(o.keys,", ")}`;case "invalid_key":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${o.origin}-\u10E8\u10D8`;case "invalid_union":return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case "invalid_element":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${o.origin}-\u10E8\u10D8`;default:return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function $8(){return {localeError:eH()}}var tH=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"\u1798\u17B7\u1793\u1798\u17C2\u1793\u1787\u17B6\u179B\u17C1\u1781 (NaN)":"\u179B\u17C1\u1781";case "object":{if(Array.isArray(n))return "\u17A2\u17B6\u179A\u17C1 (Array)";if(n===null)return "\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"};return n=>{switch(n.code){case "invalid_type":return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${X(n.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${n.divisor}`;case "unrecognized_keys":return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${D(n.keys,", ")}`;case "invalid_key":return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;case "invalid_union":return "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case "invalid_element":return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;default:return "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function Dg(){return {localeError:tH()}}function O8(){return Dg()}var rH=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"};return n=>{switch(n.code){case "invalid_type":return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${r(n.input)}\uC785\uB2C8\uB2E4`;case "invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${X(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${D(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case "too_big":{let i=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(n.origin),c=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${c} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${i}${s}`}case "too_small":{let i=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(n.origin),c=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${c} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${i}${s}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${o[i.format]??n.format}`}case "not_multiple_of":return `\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case "unrecognized_keys":return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${D(n.keys,", ")}`;case "invalid_key":return `\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case "invalid_union":return "\uC798\uBABB\uB41C \uC785\uB825";case "invalid_element":return `\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return "\uC798\uBABB\uB41C \uC785\uB825"}}};function N8(){return {localeError:rH()}}var nH=e=>Gd(typeof e,e),Gd=(e,t=void 0)=>{switch(e){case "number":return Number.isNaN(t)?"NaN":"skai\u010Dius";case "bigint":return "sveikasis skai\u010Dius";case "string":return "eilut\u0117";case "boolean":return "login\u0117 reik\u0161m\u0117";case "undefined":case "void":return "neapibr\u0117\u017Eta reik\u0161m\u0117";case "function":return "funkcija";case "symbol":return "simbolis";case "object":return t===void 0?"ne\u017Einomas objektas":t===null?"nulin\u0117 reik\u0161m\u0117":Array.isArray(t)?"masyvas":Object.getPrototypeOf(t)!==Object.prototype&&t.constructor?t.constructor.name:"objektas";case "null":return "nulin\u0117 reik\u0161m\u0117"}return e},Zd=e=>e.charAt(0).toUpperCase()+e.slice(1);function P8(e){let t=Math.abs(e),r=t%10,o=t%100;return o>=11&&o<=19||r===0?"many":r===1?"one":"few"}var oH=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(o,n,i,s){let a=e[o]??null;return a===null?a:{unit:a.unit[n],verb:a.verb[s][i?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"};return o=>{switch(o.code){case "invalid_type":return `Gautas tipas ${nH(o.input)}, o tik\u0117tasi - ${Gd(o.expected)}`;case "invalid_value":return o.values.length===1?`Privalo b\u016Bti ${X(o.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${D(o.values,"|")} pasirinkim\u0173`;case "too_big":{let n=Gd(o.origin),i=t(o.origin,P8(Number(o.maximum)),o.inclusive??false,"smaller");if(i?.verb)return `${Zd(n??o.origin??"reik\u0161m\u0117")} ${i.verb} ${o.maximum.toString()} ${i.unit??"element\u0173"}`;let s=o.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return `${Zd(n??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${o.maximum.toString()} ${i?.unit}`}case "too_small":{let n=Gd(o.origin),i=t(o.origin,P8(Number(o.minimum)),o.inclusive??false,"bigger");if(i?.verb)return `${Zd(n??o.origin??"reik\u0161m\u0117")} ${i.verb} ${o.minimum.toString()} ${i.unit??"element\u0173"}`;let s=o.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return `${Zd(n??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${o.minimum.toString()} ${i?.unit}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${n.prefix}"`:n.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${n.suffix}"`:n.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${n.includes}"`:n.format==="regex"?`Eilut\u0117 privalo atitikti ${n.pattern}`:`Neteisingas ${r[n.format]??o.format}`}case "not_multiple_of":return `Skai\u010Dius privalo b\u016Bti ${o.divisor} kartotinis.`;case "unrecognized_keys":return `Neatpa\u017Eint${o.keys.length>1?"i":"as"} rakt${o.keys.length>1?"ai":"as"}: ${D(o.keys,", ")}`;case "invalid_key":return "Rastas klaidingas raktas";case "invalid_union":return "Klaidinga \u012Fvestis";case "invalid_element":{let n=Gd(o.origin);return `${Zd(n??o.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return "Klaidinga \u012Fvestis"}}};function B8(){return {localeError:oH()}}var iH=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0431\u0440\u043E\u0458";case "object":{if(Array.isArray(n))return "\u043D\u0438\u0437\u0430";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"};return n=>{switch(n.code){case "invalid_type":return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Invalid input: expected ${X(n.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${o[i.format]??n.format}`}case "not_multiple_of":return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${n.divisor}`;case "unrecognized_keys":return `${n.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${D(n.keys,", ")}`;case "invalid_key":return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.origin}`;case "invalid_union":return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case "invalid_element":return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${n.origin}`;default:return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function C8(){return {localeError:iH()}}var sH=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"nombor";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case "invalid_type":return `Input tidak sah: dijangka ${n.expected}, diterima ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${X(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${o[i.format]??n.format} tidak sah`}case "not_multiple_of":return `Nombor tidak sah: perlu gandaan ${n.divisor}`;case "unrecognized_keys":return `Kunci tidak dikenali: ${D(n.keys,", ")}`;case "invalid_key":return `Kunci tidak sah dalam ${n.origin}`;case "invalid_union":return "Input tidak sah";case "invalid_element":return `Nilai tidak sah dalam ${n.origin}`;default:return "Input tidak sah"}}};function z8(){return {localeError:sH()}}var aH=()=>{let e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"getal";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return n=>{switch(n.code){case "invalid_type":return `Ongeldige invoer: verwacht ${n.expected}, ontving ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${X(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Te lang: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} ${s.unit??"elementen"} bevat`:`Te lang: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} is`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Te kort: verwacht dat ${n.origin} ${i}${n.minimum.toString()} ${s.unit} bevat`:`Te kort: verwacht dat ${n.origin} ${i}${n.minimum.toString()} is`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${o[i.format]??n.format}`}case "not_multiple_of":return `Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case "unrecognized_keys":return `Onbekende key${n.keys.length>1?"s":""}: ${D(n.keys,", ")}`;case "invalid_key":return `Ongeldige key in ${n.origin}`;case "invalid_union":return "Ongeldige invoer";case "invalid_element":return `Ongeldige waarde in ${n.origin}`;default:return "Ongeldige invoer"}}};function L8(){return {localeError:aH()}}var cH=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"tall";case "object":{if(Array.isArray(n))return "liste";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case "invalid_type":return `Ugyldig input: forventet ${n.expected}, fikk ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${X(n.values[0])}`:`Ugyldig valg: forventet en av ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${o[i.format]??n.format}`}case "not_multiple_of":return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case "unrecognized_keys":return `${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${D(n.keys,", ")}`;case "invalid_key":return `Ugyldig n\xF8kkel i ${n.origin}`;case "invalid_union":return "Ugyldig input";case "invalid_element":return `Ugyldig verdi i ${n.origin}`;default:return "Ugyldig input"}}};function U8(){return {localeError:cH()}}var uH=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"numara";case "object":{if(Array.isArray(n))return "saf";if(n===null)return "gayb";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"};return n=>{switch(n.code){case "invalid_type":return `F\xE2sit giren: umulan ${n.expected}, al\u0131nan ${r(n.input)}`;case "invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${X(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} olmal\u0131yd\u0131.`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} olmal\u0131yd\u0131.`}case "invalid_format":{let i=n;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${o[i.format]??n.format}`}case "not_multiple_of":return `F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case "unrecognized_keys":return `Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${D(n.keys,", ")}`;case "invalid_key":return `${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case "invalid_union":return "Giren tan\u0131namad\u0131.";case "invalid_element":return `${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return "K\u0131ymet tan\u0131namad\u0131."}}};function M8(){return {localeError:uH()}}var fH=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0639\u062F\u062F";case "object":{if(Array.isArray(n))return "\u0627\u0631\u06D0";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"};return n=>{switch(n.code){case "invalid_type":return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${r(n.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;case "invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${X(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${D(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0648\u064A`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0648\u064A`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${o[i.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case "not_multiple_of":return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case "unrecognized_keys":return `\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${D(n.keys,", ")}`;case "invalid_key":return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.origin} \u06A9\u06D0`;case "invalid_union":return "\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case "invalid_element":return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${n.origin} \u06A9\u06D0`;default:return "\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function D8(){return {localeError:fH()}}var lH=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"liczba";case "object":{if(Array.isArray(n))return "tablica";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"};return n=>{switch(n.code){case "invalid_type":return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${n.expected}, otrzymano ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${X(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${o[i.format]??n.format}`}case "not_multiple_of":return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case "unrecognized_keys":return `Nierozpoznane klucze${n.keys.length>1?"s":""}: ${D(n.keys,", ")}`;case "invalid_key":return `Nieprawid\u0142owy klucz w ${n.origin}`;case "invalid_union":return "Nieprawid\u0142owe dane wej\u015Bciowe";case "invalid_element":return `Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return "Nieprawid\u0142owe dane wej\u015Bciowe"}}};function j8(){return {localeError:lH()}}var dH=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"n\xFAmero";case "object":{if(Array.isArray(n))return "array";if(n===null)return "nulo";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case "invalid_type":return `Tipo inv\xE1lido: esperado ${n.expected}, recebido ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${X(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${i}${n.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Muito pequeno: esperado que ${n.origin} tivesse ${i}${n.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${o[i.format]??n.format} inv\xE1lido`}case "not_multiple_of":return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case "unrecognized_keys":return `Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${D(n.keys,", ")}`;case "invalid_key":return `Chave inv\xE1lida em ${n.origin}`;case "invalid_union":return "Entrada inv\xE1lida";case "invalid_element":return `Valor inv\xE1lido em ${n.origin}`;default:return "Campo inv\xE1lido"}}};function F8(){return {localeError:dH()}}function H8(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var pH=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case "object":{if(Array.isArray(n))return "\u043C\u0430\u0441\u0441\u0438\u0432";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"};return n=>{switch(n.code){case "invalid_type":return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${X(n.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),c=H8(a,s.unit.one,s.unit.few,s.unit.many);return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.maximum.toString()} ${c}`}return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),c=H8(a,s.unit.one,s.unit.few,s.unit.many);return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.minimum.toString()} ${c}`}return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${D(n.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case "invalid_union":return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case "invalid_element":return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${n.origin}`;default:return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function V8(){return {localeError:pH()}}var mH=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0161tevilo";case "object":{if(Array.isArray(n))return "tabela";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"};return n=>{switch(n.code){case "invalid_type":return `Neveljaven vnos: pri\u010Dakovano ${n.expected}, prejeto ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${X(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${i}${n.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${i}${n.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${o[i.format]??n.format}`}case "not_multiple_of":return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case "unrecognized_keys":return `Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${D(n.keys,", ")}`;case "invalid_key":return `Neveljaven klju\u010D v ${n.origin}`;case "invalid_union":return "Neveljaven vnos";case "invalid_element":return `Neveljavna vrednost v ${n.origin}`;default:return "Neveljaven vnos"}}};function Z8(){return {localeError:mH()}}var hH=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"antal";case "object":{if(Array.isArray(n))return "lista";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return n=>{switch(n.code){case "invalid_type":return `Ogiltig inmatning: f\xF6rv\xE4ntat ${n.expected}, fick ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${X(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${o[i.format]??n.format}`}case "not_multiple_of":return `Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case "unrecognized_keys":return `${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${D(n.keys,", ")}`;case "invalid_key":return `Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case "invalid_union":return "Ogiltig input";case "invalid_element":return `Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return "Ogiltig input"}}};function G8(){return {localeError:hH()}}var gH=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"\u0B8E\u0BA3\u0BCD \u0B85\u0BB2\u0BCD\u0BB2\u0BBE\u0BA4\u0BA4\u0BC1":"\u0B8E\u0BA3\u0BCD";case "object":{if(Array.isArray(n))return "\u0B85\u0BA3\u0BBF";if(n===null)return "\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case "invalid_type":return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${X(n.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${D(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case "unrecognized_keys":return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${D(n.keys,", ")}`;case "invalid_key":return `${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case "invalid_union":return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case "invalid_element":return `${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function q8(){return {localeError:gH()}}var yH=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 (NaN)":"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02";case "object":{if(Array.isArray(n))return "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)";if(n===null)return "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"};return n=>{switch(n.code){case "invalid_type":return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${X(n.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${o[i.format]??n.format}`}case "not_multiple_of":return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${n.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case "unrecognized_keys":return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${D(n.keys,", ")}`;case "invalid_key":return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;case "invalid_union":return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case "invalid_element":return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;default:return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function W8(){return {localeError:yH()}}var bH=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"number";case "object":{if(Array.isArray(e))return "array";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},xH=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(o){return e[o]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"};return o=>{switch(o.code){case "invalid_type":return `Ge\xE7ersiz de\u011Fer: beklenen ${o.expected}, al\u0131nan ${bH(o.input)}`;case "invalid_value":return o.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${X(o.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${D(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${n}${o.maximum.toString()} ${i.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${n}${o.minimum.toString()} ${i.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`Ge\xE7ersiz metin: "${n.prefix}" ile ba\u015Flamal\u0131`:n.format==="ends_with"?`Ge\xE7ersiz metin: "${n.suffix}" ile bitmeli`:n.format==="includes"?`Ge\xE7ersiz metin: "${n.includes}" i\xE7ermeli`:n.format==="regex"?`Ge\xE7ersiz metin: ${n.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[n.format]??o.format}`}case "not_multiple_of":return `Ge\xE7ersiz say\u0131: ${o.divisor} ile tam b\xF6l\xFCnebilmeli`;case "unrecognized_keys":return `Tan\u0131nmayan anahtar${o.keys.length>1?"lar":""}: ${D(o.keys,", ")}`;case "invalid_key":return `${o.origin} i\xE7inde ge\xE7ersiz anahtar`;case "invalid_union":return "Ge\xE7ersiz de\u011Fer";case "invalid_element":return `${o.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return "Ge\xE7ersiz de\u011Fer"}}};function K8(){return {localeError:xH()}}var vH=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case "object":{if(Array.isArray(n))return "\u043C\u0430\u0441\u0438\u0432";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"};return n=>{switch(n.code){case "invalid_type":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${X(n.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} \u0431\u0443\u0434\u0435 ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${n.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${D(n.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case "invalid_union":return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case "invalid_element":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${n.origin}`;default:return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function jg(){return {localeError:vH()}}function J8(){return jg()}var _H=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0646\u0645\u0628\u0631";case "object":{if(Array.isArray(n))return "\u0622\u0631\u06D2";if(n===null)return "\u0646\u0644";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"};return n=>{switch(n.code){case "invalid_type":return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${r(n.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;case "invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${X(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${D(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${i}${n.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${i}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case "unrecognized_keys":return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${n.keys.length>1?"\u0632":""}: ${D(n.keys,"\u060C ")}`;case "invalid_key":return `${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case "invalid_union":return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case "invalid_element":return `${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function Y8(){return {localeError:_H()}}var wH=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"s\u1ED1";case "object":{if(Array.isArray(n))return "m\u1EA3ng";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"};return n=>{switch(n.code){case "invalid_type":return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${X(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${o[i.format]??n.format} kh\xF4ng h\u1EE3p l\u1EC7`}case "not_multiple_of":return `S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${n.divisor}`;case "unrecognized_keys":return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${D(n.keys,", ")}`;case "invalid_key":return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;case "invalid_union":return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case "invalid_element":return `Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;default:return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function X8(){return {localeError:wH()}}var EH=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"\u975E\u6570\u5B57(NaN)":"\u6570\u5B57";case "object":{if(Array.isArray(n))return "\u6570\u7EC4";if(n===null)return "\u7A7A\u503C(null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"};return n=>{switch(n.code){case "invalid_type":return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${X(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${o[i.format]??n.format}`}case "not_multiple_of":return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case "unrecognized_keys":return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${D(n.keys,", ")}`;case "invalid_key":return `${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case "invalid_union":return "\u65E0\u6548\u8F93\u5165";case "invalid_element":return `${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return "\u65E0\u6548\u8F93\u5165"}}};function Q8(){return {localeError:EH()}}var SH=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"};return n=>{switch(n.code){case "invalid_type":return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${n.expected}\uFF0C\u4F46\u6536\u5230 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${X(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case "unrecognized_keys":return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${D(n.keys,"\u3001")}`;case "invalid_key":return `${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case "invalid_union":return "\u7121\u6548\u7684\u8F38\u5165\u503C";case "invalid_element":return `${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return "\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function e$(){return {localeError:SH()}}var IH=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"n\u1ECD\u0301mb\xE0";case "object":{if(Array.isArray(n))return "akop\u1ECD";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"};return n=>{switch(n.code){case "invalid_type":return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${n.expected}, \xE0m\u1ECD\u0300 a r\xED ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${X(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${D(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${s.verb} ${i}${n.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.maximum}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${s.verb} ${i}${n.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.minimum}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${o[i.format]??n.format}`}case "not_multiple_of":return `N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${n.divisor}`;case "unrecognized_keys":return `B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${D(n.keys,", ")}`;case "invalid_key":return `B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;case "invalid_union":return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case "invalid_element":return `Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;default:return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function t$(){return {localeError:IH()}}var f6=Symbol("ZodOutput"),l6=Symbol("ZodInput"),lf=class{constructor(){this._map=new WeakMap,this._idmap=new Map;}add(t,...r){let o=r[0];if(this._map.set(t,o),o&&typeof o=="object"&&"id"in o){if(this._idmap.has(o.id))throw new Error(`ID ${o.id} already exists in the registry`);this._idmap.set(o.id,t);}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let o={...this.get(r)??{}};delete o.id;let n={...o,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Fg(){return new lf}var Fo=Fg();function d6(e,t){return new e({type:"string",...Q(t)})}function p6(e,t){return new e({type:"string",coerce:true,...Q(t)})}function Hg(e,t){return new e({type:"string",format:"email",check:"string_format",abort:false,...Q(t)})}function Wd(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:false,...Q(t)})}function Vg(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,...Q(t)})}function Zg(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v4",...Q(t)})}function Gg(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v6",...Q(t)})}function qg(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v7",...Q(t)})}function Kd(e,t){return new e({type:"string",format:"url",check:"string_format",abort:false,...Q(t)})}function Wg(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:false,...Q(t)})}function Kg(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:false,...Q(t)})}function Jg(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:false,...Q(t)})}function Yg(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:false,...Q(t)})}function Xg(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:false,...Q(t)})}function Qg(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:false,...Q(t)})}function ey(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:false,...Q(t)})}function ty(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:false,...Q(t)})}function ry(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:false,...Q(t)})}function ny(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:false,...Q(t)})}function oy(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:false,...Q(t)})}function iy(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:false,...Q(t)})}function sy(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:false,...Q(t)})}function ay(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:false,...Q(t)})}function cy(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:false,...Q(t)})}var m6={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function h6(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:false,local:false,precision:null,...Q(t)})}function g6(e,t){return new e({type:"string",format:"date",check:"string_format",...Q(t)})}function y6(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Q(t)})}function b6(e,t){return new e({type:"string",format:"duration",check:"string_format",...Q(t)})}function x6(e,t){return new e({type:"number",checks:[],...Q(t)})}function v6(e,t){return new e({type:"number",coerce:true,checks:[],...Q(t)})}function _6(e,t){return new e({type:"number",check:"number_format",abort:false,format:"safeint",...Q(t)})}function w6(e,t){return new e({type:"number",check:"number_format",abort:false,format:"float32",...Q(t)})}function E6(e,t){return new e({type:"number",check:"number_format",abort:false,format:"float64",...Q(t)})}function S6(e,t){return new e({type:"number",check:"number_format",abort:false,format:"int32",...Q(t)})}function I6(e,t){return new e({type:"number",check:"number_format",abort:false,format:"uint32",...Q(t)})}function A6(e,t){return new e({type:"boolean",...Q(t)})}function k6(e,t){return new e({type:"boolean",coerce:true,...Q(t)})}function R6(e,t){return new e({type:"bigint",...Q(t)})}function T6(e,t){return new e({type:"bigint",coerce:true,...Q(t)})}function $6(e,t){return new e({type:"bigint",check:"bigint_format",abort:false,format:"int64",...Q(t)})}function O6(e,t){return new e({type:"bigint",check:"bigint_format",abort:false,format:"uint64",...Q(t)})}function N6(e,t){return new e({type:"symbol",...Q(t)})}function P6(e,t){return new e({type:"undefined",...Q(t)})}function B6(e,t){return new e({type:"null",...Q(t)})}function C6(e){return new e({type:"any"})}function z6(e){return new e({type:"unknown"})}function L6(e,t){return new e({type:"never",...Q(t)})}function U6(e,t){return new e({type:"void",...Q(t)})}function M6(e,t){return new e({type:"date",...Q(t)})}function D6(e,t){return new e({type:"date",coerce:true,...Q(t)})}function j6(e,t){return new e({type:"nan",...Q(t)})}function Si(e,t){return new Rg({check:"less_than",...Q(t),value:e,inclusive:false})}function Gn(e,t){return new Rg({check:"less_than",...Q(t),value:e,inclusive:true})}function Ii(e,t){return new Tg({check:"greater_than",...Q(t),value:e,inclusive:false})}function fn(e,t){return new Tg({check:"greater_than",...Q(t),value:e,inclusive:true})}function F6(e){return Ii(0,e)}function H6(e){return Si(0,e)}function V6(e){return Gn(0,e)}function Z6(e){return fn(0,e)}function Za(e,t){return new L_({check:"multiple_of",...Q(t),value:e})}function df(e,t){return new D_({check:"max_size",...Q(t),maximum:e})}function Ga(e,t){return new j_({check:"min_size",...Q(t),minimum:e})}function Jd(e,t){return new F_({check:"size_equals",...Q(t),size:e})}function pf(e,t){return new H_({check:"max_length",...Q(t),maximum:e})}function Os(e,t){return new V_({check:"min_length",...Q(t),minimum:e})}function mf(e,t){return new Z_({check:"length_equals",...Q(t),length:e})}function Yd(e,t){return new G_({check:"string_format",format:"regex",...Q(t),pattern:e})}function Xd(e){return new q_({check:"string_format",format:"lowercase",...Q(e)})}function Qd(e){return new W_({check:"string_format",format:"uppercase",...Q(e)})}function ep(e,t){return new K_({check:"string_format",format:"includes",...Q(t),includes:e})}function tp(e,t){return new J_({check:"string_format",format:"starts_with",...Q(t),prefix:e})}function rp(e,t){return new Y_({check:"string_format",format:"ends_with",...Q(t),suffix:e})}function G6(e,t,r){return new X_({check:"property",property:e,schema:t,...Q(r)})}function np(e,t){return new Q_({check:"mime_type",mime:e,...Q(t)})}function Ai(e){return new ew({check:"overwrite",tx:e})}function op(e){return Ai(t=>t.normalize(e))}function ip(){return Ai(e=>e.trim())}function sp(){return Ai(e=>e.toLowerCase())}function ap(){return Ai(e=>e.toUpperCase())}function q6(e,t,r){return new e({type:"array",element:t,...Q(r)})}function AH(e,t,r){return new e({type:"union",options:t,...Q(r)})}function kH(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...Q(o)})}function RH(e,t,r){return new e({type:"intersection",left:t,right:r})}function TH(e,t,r,o){let n=r instanceof ve,i=n?o:r,s=n?r:null;return new e({type:"tuple",items:t,rest:s,...Q(i)})}function $H(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...Q(o)})}function OH(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...Q(o)})}function NH(e,t,r){return new e({type:"set",valueType:t,...Q(r)})}function PH(e,t,r){let o=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:o,...Q(r)})}function BH(e,t,r){return new e({type:"enum",entries:t,...Q(r)})}function CH(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...Q(r)})}function W6(e,t){return new e({type:"file",...Q(t)})}function zH(e,t){return new e({type:"transform",transform:t})}function LH(e,t){return new e({type:"optional",innerType:t})}function UH(e,t){return new e({type:"nullable",innerType:t})}function MH(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Qv(r)}})}function DH(e,t,r){return new e({type:"nonoptional",innerType:t,...Q(r)})}function jH(e,t){return new e({type:"success",innerType:t})}function FH(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function HH(e,t,r){return new e({type:"pipe",in:t,out:r})}function VH(e,t){return new e({type:"readonly",innerType:t})}function ZH(e,t,r){return new e({type:"template_literal",parts:t,...Q(r)})}function GH(e,t){return new e({type:"lazy",getter:t})}function qH(e,t){return new e({type:"promise",innerType:t})}function K6(e,t,r){let o=Q(r);return o.abort??(o.abort=true),new e({type:"custom",check:"custom",fn:t,...o})}function J6(e,t,r){return new e({type:"custom",check:"custom",fn:t,...Q(r)})}function Y6(e){let t=r$(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(of(o,r.value,t._zod.def));else {let n=o;n.fatal&&(n.continue=false),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=t),n.continue??(n.continue=!t._zod.def.abort),r.issues.push(of(n));}},e(r.value,r)));return t}function r$(e,t){let r=new ot({check:"custom",...Q(t)});return r._zod.check=e,r}function X6(e,t){let r=Q(t),o=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(o=o.map(h=>typeof h=="string"?h.toLowerCase():h),n=n.map(h=>typeof h=="string"?h.toLowerCase():h));let i=new Set(o),s=new Set(n),a=e.Codec??Vd,c=e.Boolean??Hd,u=e.String??Va,l=new u({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),g=new a({type:"pipe",in:l,out:d,transform:((h,v)=>{let E=h;return r.case!=="sensitive"&&(E=E.toLowerCase()),i.has(E)?true:s.has(E)?false:(v.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:v.value,inst:g,continue:false}),{})}),reverseTransform:((h,v)=>h===true?o[0]||"true":n[0]||"false"),error:r.error});return g}function hf(e,t,r,o={}){let n=Q(o),i={...Q(o),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:a=>r.test(a),...n};return r instanceof RegExp&&(i.pattern=r),new e(i)}var cp=class{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??Fo,this.target=t?.target??"draft-2020-12",this.unrepresentable=t?.unrepresentable??"throw",this.override=t?.override??(()=>{}),this.io=t?.io??"output",this.seen=new Map;}process(t,r={path:[],schemaPath:[]}){var o;let n=t._zod.def,i={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(t);if(s)return s.count++,r.schemaPath.includes(t)&&(s.cycle=r.path),s.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(t,a);let c=t._zod.toJSONSchema?.();if(c)a.schema=c;else {let d={...r,schemaPath:[...r.schemaPath,t],path:r.path},g=t._zod.parent;if(g)a.ref=g,this.process(g,d),this.seen.get(g).isParent=true;else {let h=a.schema;switch(n.type){case "string":{let v=h;v.type="string";let{minimum:E,maximum:R,format:$,patterns:P,contentEncoding:O}=t._zod.bag;if(typeof E=="number"&&(v.minLength=E),typeof R=="number"&&(v.maxLength=R),$&&(v.format=i[$]??$,v.format===""&&delete v.format),O&&(v.contentEncoding=O),P&&P.size>0){let I=[...P];I.length===1?v.pattern=I[0].source:I.length>1&&(a.schema.allOf=[...I.map(N=>({...this.target==="draft-7"||this.target==="draft-4"||this.target==="openapi-3.0"?{type:"string"}:{},pattern:N.source}))]);}break}case "number":{let v=h,{minimum:E,maximum:R,format:$,multipleOf:P,exclusiveMaximum:O,exclusiveMinimum:I}=t._zod.bag;typeof $=="string"&&$.includes("int")?v.type="integer":v.type="number",typeof I=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(v.minimum=I,v.exclusiveMinimum=true):v.exclusiveMinimum=I),typeof E=="number"&&(v.minimum=E,typeof I=="number"&&this.target!=="draft-4"&&(I>=E?delete v.minimum:delete v.exclusiveMinimum)),typeof O=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(v.maximum=O,v.exclusiveMaximum=true):v.exclusiveMaximum=O),typeof R=="number"&&(v.maximum=R,typeof O=="number"&&this.target!=="draft-4"&&(O<=R?delete v.maximum:delete v.exclusiveMaximum)),typeof P=="number"&&(v.multipleOf=P);break}case "boolean":{let v=h;v.type="boolean";break}case "bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case "symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case "null":{this.target==="openapi-3.0"?(h.type="string",h.nullable=true,h.enum=[null]):h.type="null";break}case "any":break;case "unknown":break;case "undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case "void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case "never":{h.not={};break}case "date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case "array":{let v=h,{minimum:E,maximum:R}=t._zod.bag;typeof E=="number"&&(v.minItems=E),typeof R=="number"&&(v.maxItems=R),v.type="array",v.items=this.process(n.element,{...d,path:[...d.path,"items"]});break}case "object":{let v=h;v.type="object",v.properties={};let E=n.shape;for(let P in E)v.properties[P]=this.process(E[P],{...d,path:[...d.path,"properties",P]});let R=new Set(Object.keys(E)),$=new Set([...R].filter(P=>{let O=n.shape[P]._zod;return this.io==="input"?O.optin===void 0:O.optout===void 0}));$.size>0&&(v.required=Array.from($)),n.catchall?._zod.def.type==="never"?v.additionalProperties=false:n.catchall?n.catchall&&(v.additionalProperties=this.process(n.catchall,{...d,path:[...d.path,"additionalProperties"]})):this.io==="output"&&(v.additionalProperties=false);break}case "union":{let v=h,E=n.options.map((R,$)=>this.process(R,{...d,path:[...d.path,"anyOf",$]}));v.anyOf=E;break}case "intersection":{let v=h,E=this.process(n.left,{...d,path:[...d.path,"allOf",0]}),R=this.process(n.right,{...d,path:[...d.path,"allOf",1]}),$=O=>"allOf"in O&&Object.keys(O).length===1,P=[...$(E)?E.allOf:[E],...$(R)?R.allOf:[R]];v.allOf=P;break}case "tuple":{let v=h;v.type="array";let E=this.target==="draft-2020-12"?"prefixItems":"items",R=this.target==="draft-2020-12"||this.target==="openapi-3.0"?"items":"additionalItems",$=n.items.map((N,C)=>this.process(N,{...d,path:[...d.path,E,C]})),P=n.rest?this.process(n.rest,{...d,path:[...d.path,R,...this.target==="openapi-3.0"?[n.items.length]:[]]}):null;this.target==="draft-2020-12"?(v.prefixItems=$,P&&(v.items=P)):this.target==="openapi-3.0"?(v.items={anyOf:$},P&&v.items.anyOf.push(P),v.minItems=$.length,P||(v.maxItems=$.length)):(v.items=$,P&&(v.additionalItems=P));let{minimum:O,maximum:I}=t._zod.bag;typeof O=="number"&&(v.minItems=O),typeof I=="number"&&(v.maxItems=I);break}case "record":{let v=h;v.type="object",(this.target==="draft-7"||this.target==="draft-2020-12")&&(v.propertyNames=this.process(n.keyType,{...d,path:[...d.path,"propertyNames"]})),v.additionalProperties=this.process(n.valueType,{...d,path:[...d.path,"additionalProperties"]});break}case "map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case "set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case "enum":{let v=h,E=Nd(n.entries);E.every(R=>typeof R=="number")&&(v.type="number"),E.every(R=>typeof R=="string")&&(v.type="string"),v.enum=E;break}case "literal":{let v=h,E=[];for(let R of n.values)if(R===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof R=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");E.push(Number(R));}else E.push(R);if(E.length!==0)if(E.length===1){let R=E[0];v.type=R===null?"null":typeof R,this.target==="draft-4"||this.target==="openapi-3.0"?v.enum=[R]:v.const=R;}else E.every(R=>typeof R=="number")&&(v.type="number"),E.every(R=>typeof R=="string")&&(v.type="string"),E.every(R=>typeof R=="boolean")&&(v.type="string"),E.every(R=>R===null)&&(v.type="null"),v.enum=E;break}case "file":{let v=h,E={type:"string",format:"binary",contentEncoding:"binary"},{minimum:R,maximum:$,mime:P}=t._zod.bag;R!==void 0&&(E.minLength=R),$!==void 0&&(E.maxLength=$),P?P.length===1?(E.contentMediaType=P[0],Object.assign(v,E)):v.anyOf=P.map(O=>({...E,contentMediaType:O})):Object.assign(v,E);break}case "transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case "nullable":{let v=this.process(n.innerType,d);this.target==="openapi-3.0"?(a.ref=n.innerType,h.nullable=true):h.anyOf=[v,{type:"null"}];break}case "nonoptional":{this.process(n.innerType,d),a.ref=n.innerType;break}case "success":{let v=h;v.type="boolean";break}case "default":{this.process(n.innerType,d),a.ref=n.innerType,h.default=JSON.parse(JSON.stringify(n.defaultValue));break}case "prefault":{this.process(n.innerType,d),a.ref=n.innerType,this.io==="input"&&(h._prefault=JSON.parse(JSON.stringify(n.defaultValue)));break}case "catch":{this.process(n.innerType,d),a.ref=n.innerType;let v;try{v=n.catchValue(void 0);}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}h.default=v;break}case "nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case "template_literal":{let v=h,E=t._zod.pattern;if(!E)throw new Error("Pattern not found in template literal");v.type="string",v.pattern=E.source;break}case "pipe":{let v=this.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;this.process(v,d),a.ref=v;break}case "readonly":{this.process(n.innerType,d),a.ref=n.innerType,h.readOnly=true;break}case "promise":{this.process(n.innerType,d),a.ref=n.innerType;break}case "optional":{this.process(n.innerType,d),a.ref=n.innerType;break}case "lazy":{let v=t._zod.innerType;this.process(v,d),a.ref=v;break}case "custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}case "function":{if(this.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema");break}}}}let u=this.metadataRegistry.get(t);return u&&Object.assign(a.schema,u),this.io==="input"&&rr(t)&&(delete a.schema.examples,delete a.schema.default),this.io==="input"&&a.schema._prefault&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault,this.seen.get(t).schema}emit(t,r){let o={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},n=this.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=l=>{let d=this.target==="draft-2020-12"?"$defs":"definitions";if(o.external){let E=o.external.registry.get(l[0])?.id,R=o.external.uri??(P=>P);if(E)return {ref:R(E)};let $=l[1].defId??l[1].schema.id??`schema${this.counter++}`;return l[1].defId=$,{defId:$,ref:`${R("__shared")}#/${d}/${$}`}}if(l[1]===n)return {ref:"#"};let h=`#/${d}/`,v=l[1].schema.id??`__schema${this.counter++}`;return {defId:v,ref:h+v}},s=l=>{if(l[1].schema.$ref)return;let d=l[1],{ref:g,defId:h}=i(l);d.def={...d.schema},h&&(d.defId=h);let v=d.schema;for(let E in v)delete v[E];v.$ref=g;};if(o.cycles==="throw")for(let l of this.seen.entries()){let d=l[1];if(d.cycle)throw new Error(`Cycle detected: #/${d.cycle?.join("/")}/<root>
|
|
60
|
+
`);}h.write("payload.value = newResult;"),h.write("return payload;");let N=h.compile();return (O,I)=>N(g,O,I)},i,s=Ds,a=!Cf.jitless,u=a&&fb.value,f=t.catchall,d;e._zod.parse=(g,h)=>{d??(d=o.value);let v=g.value;return s(v)?a&&u&&h?.async===false&&h.jitless!==true?(i||(i=n(t.shape)),g=i(g,h),f?dS([],v,g,h,d,e):g):r(g,h):(g.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),g)};});function eS(e,t,r,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let n=e.filter(i=>!Hi(i));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>gn(s,o,wt())))}),t)}var im=B("$ZodUnion",(e,t)=>{we.init(e,t),Oe(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Oe(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Oe(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Oe(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){let n=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${n.map(i=>Uf(i.source)).join("|")})$`)}});let r=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(n,i)=>{if(r)return o(n,i);let s=false,a=[];for(let c of t.options){let u=c._zod.run({value:n.value,issues:[]},i);if(u instanceof Promise)a.push(u),s=true;else {if(u.issues.length===0)return u;a.push(u);}}return s?Promise.all(a).then(c=>eS(c,n,e,i)):eS(a,n,e,i)};}),Xx=B("$ZodDiscriminatedUnion",(e,t)=>{im.init(e,t);let r=e._zod.parse;Oe(e._zod,"propValues",()=>{let n={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[a,c]of Object.entries(s)){n[a]||(n[a]=new Set);for(let u of c)n[a].add(u);}}return n});let o=sc(()=>{let n=t.options,i=new Map;for(let s of n){let a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let c of a){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,s);}}return i});e._zod.parse=(n,i)=>{let s=n.value;if(!Ds(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),n;let a=o.value.get(s?.[t.discriminator]);return a?a._zod.run(n,i):t.unionFallback?r(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),n)};}),Qx=B("$ZodIntersection",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),s=t.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,u])=>tS(r,c,u)):tS(r,i,s)};});function mx(e,t){if(e===t)return {valid:true,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return {valid:true,data:e};if(Fi(e)&&Fi(t)){let r=Object.keys(t),o=Object.keys(e).filter(i=>r.indexOf(i)!==-1),n={...e,...t};for(let i of o){let s=mx(e[i],t[i]);if(!s.valid)return {valid:false,mergeErrorPath:[i,...s.mergeErrorPath]};n[i]=s.data;}return {valid:true,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return {valid:false,mergeErrorPath:[]};let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o],s=mx(n,i);if(!s.valid)return {valid:false,mergeErrorPath:[o,...s.mergeErrorPath]};r.push(s.data);}return {valid:true,data:r}}return {valid:false,mergeErrorPath:[]}}function tS(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),Hi(e))return e;let o=mx(t.value,r.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var sm=B("$ZodTuple",(e,t)=>{we.init(e,t);let r=t.items,o=r.length-[...r].reverse().findIndex(n=>n._zod.optin!=="optional");e._zod.parse=(n,i)=>{let s=n.value;if(!Array.isArray(s))return n.issues.push({input:s,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=[];let a=[];if(!t.rest){let u=s.length>r.length,f=s.length<o-1;if(u||f)return n.issues.push({...u?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},input:s,inst:e,origin:"array"}),n}let c=-1;for(let u of r){if(c++,c>=s.length&&c>=o)continue;let f=u._zod.run({value:s[c],issues:[]},i);f instanceof Promise?a.push(f.then(d=>Xp(d,n,c))):Xp(f,n,c);}if(t.rest){let u=s.slice(r.length);for(let f of u){c++;let d=t.rest._zod.run({value:f,issues:[]},i);d instanceof Promise?a.push(d.then(g=>Xp(g,n,c))):Xp(d,n,c);}}return a.length?Promise.all(a).then(()=>n):n};});function Xp(e,t,r){e.issues.length&&t.issues.push(...hn(r,e.issues)),t.value[r]=e.value;}var e1=B("$ZodRecord",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Fi(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let i=[];if(t.keyType._zod.values){let s=t.keyType._zod.values;r.value={};for(let c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let u=t.valueType._zod.run({value:n[c],issues:[]},o);u instanceof Promise?i.push(u.then(f=>{f.issues.length&&r.issues.push(...hn(c,f.issues)),r.value[c]=f.value;})):(u.issues.length&&r.issues.push(...hn(c,u.issues)),r.value[c]=u.value);}let a;for(let c in n)s.has(c)||(a=a??[],a.push(c));a&&a.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:a});}else {r.value={};for(let s of Reflect.ownKeys(n)){if(s==="__proto__")continue;let a=t.keyType._zod.run({value:s,issues:[]},o);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(u=>gn(u,o,wt())),input:s,path:[s],inst:e}),r.value[a.value]=a.value;continue}let c=t.valueType._zod.run({value:n[s],issues:[]},o);c instanceof Promise?i.push(c.then(u=>{u.issues.length&&r.issues.push(...hn(s,u.issues)),r.value[a.value]=u.value;})):(c.issues.length&&r.issues.push(...hn(s,c.issues)),r.value[a.value]=c.value);}}return i.length?Promise.all(i).then(()=>r):r};}),t1=B("$ZodMap",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;let i=[];r.value=new Map;for(let[s,a]of n){let c=t.keyType._zod.run({value:s,issues:[]},o),u=t.valueType._zod.run({value:a,issues:[]},o);c instanceof Promise||u instanceof Promise?i.push(Promise.all([c,u]).then(([f,d])=>{rS(f,d,r,s,n,e,o);})):rS(c,u,r,s,n,e,o);}return i.length?Promise.all(i).then(()=>r):r};});function rS(e,t,r,o,n,i,s){e.issues.length&&(Mf.has(typeof o)?r.issues.push(...hn(o,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:i,issues:e.issues.map(a=>gn(a,s,wt()))})),t.issues.length&&(Mf.has(typeof o)?r.issues.push(...hn(o,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:t.issues.map(a=>gn(a,s,wt()))})),r.value.set(e.value,t.value);}var r1=B("$ZodSet",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;let i=[];r.value=new Set;for(let s of n){let a=t.valueType._zod.run({value:s,issues:[]},o);a instanceof Promise?i.push(a.then(c=>nS(c,r))):nS(a,r);}return i.length?Promise.all(i).then(()=>r):r};});function nS(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value);}var n1=B("$ZodEnum",(e,t)=>{we.init(e,t);let r=Lf(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(n=>Mf.has(typeof n)).map(n=>typeof n=="string"?xo(n):n.toString()).join("|")})$`),e._zod.parse=(n,i)=>{let s=n.value;return o.has(s)||n.issues.push({code:"invalid_value",values:r,input:s,inst:e}),n};}),o1=B("$ZodLiteral",(e,t)=>{if(we.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?xo(r):r?xo(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,o)=>{let n=r.value;return e._zod.values.has(n)||r.issues.push({code:"invalid_value",values:t.values,input:n,inst:e}),r};}),i1=B("$ZodFile",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r};}),s1=B("$ZodTransform",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Ui(e.constructor.name);let n=t.transform(r.value,r);if(o.async)return (n instanceof Promise?n:Promise.resolve(n)).then(s=>(r.value=s,r));if(n instanceof Promise)throw new Kn;return r.value=n,r};});function oS(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var a1=B("$ZodOptional",(e,t)=>{we.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Oe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Oe(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Uf(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin==="optional"){let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>oS(i,r.value)):oS(n,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,o)};}),c1=B("$ZodNullable",(e,t)=>{we.init(e,t),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),Oe(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Uf(r.source)}|null)$`):void 0}),Oe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:t.innerType._zod.run(r,o);}),u1=B("$ZodDefault",(e,t)=>{we.init(e,t),e._zod.optin="optional",Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>iS(i,t)):iS(n,t)};});function iS(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var f1=B("$ZodPrefault",(e,t)=>{we.init(e,t),e._zod.optin="optional",Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,o));}),l1=B("$ZodNonOptional",(e,t)=>{we.init(e,t),Oe(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>sS(i,e)):sS(n,e)};});function sS(e,t){return !e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var d1=B("$ZodSuccess",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Ui("ZodSuccess");let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.issues.length===0,r)):(r.value=n.issues.length===0,r)};}),p1=B("$ZodCatch",(e,t)=>{we.init(e,t),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>gn(s,o,wt()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(i=>gn(i,o,wt()))},input:r.value}),r.issues=[]),r)};}),m1=B("$ZodNaN",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r);}),h1=B("$ZodPipe",(e,t)=>{we.init(e,t),Oe(e._zod,"values",()=>t.in._zod.values),Oe(e._zod,"optin",()=>t.in._zod.optin),Oe(e._zod,"optout",()=>t.out._zod.optout),Oe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>Qp(s,t.in,o)):Qp(i,t.in,o)}let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>Qp(i,t.out,o)):Qp(n,t.out,o)};});function Qp(e,t,r){return e.issues.length?(e.aborted=true,e):t._zod.run({value:e.value,issues:e.issues},r)}var Kf=B("$ZodCodec",(e,t)=>{we.init(e,t),Oe(e._zod,"values",()=>t.in._zod.values),Oe(e._zod,"optin",()=>t.in._zod.optin),Oe(e._zod,"optout",()=>t.out._zod.optout),Oe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(r,o);return i instanceof Promise?i.then(s=>em(s,t,o)):em(i,t,o)}else {let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(s=>em(s,t,o)):em(i,t,o)}};});function em(e,t,r){if(e.issues.length)return e.aborted=true,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);return n instanceof Promise?n.then(i=>tm(e,i,t.out,r)):tm(e,n,t.out,r)}else {let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(i=>tm(e,i,t.in,r)):tm(e,n,t.in,r)}}function tm(e,t,r,o){return e.issues.length?(e.aborted=true,e):r._zod.run({value:t,issues:e.issues},o)}var g1=B("$ZodReadonly",(e,t)=>{we.init(e,t),Oe(e._zod,"propValues",()=>t.innerType._zod.propValues),Oe(e._zod,"values",()=>t.innerType._zod.values),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(aS):aS(n)};});function aS(e){return e.value=Object.freeze(e.value),e}var y1=B("$ZodTemplateLiteral",(e,t)=>{we.init(e,t);let r=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let n=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=n.startsWith("^")?1:0,s=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(i,s));}else if(o===null||db.has(typeof o))r.push(xo(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(o,n)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"template_literal",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o);}),b1=B("$ZodFunction",(e,t)=>(we.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...o){let n=e._def.input?Mp(e._def.input,o):o,i=Reflect.apply(r,this,n);return e._def.output?Mp(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let n=e._def.input?await Dp(e._def.input,o):o,i=await Reflect.apply(r,this,n);return e._def.output?await Dp(e._def.output,i):i}},e._zod.parse=(r,o)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let o=e.constructor;return Array.isArray(r[0])?new o({type:"function",input:new sm({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new o({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:r})},e)),x1=B("$ZodPromise",(e,t)=>{we.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o));}),v1=B("$ZodLazy",(e,t)=>{we.init(e,t),Oe(e._zod,"innerType",()=>t.getter()),Oe(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),Oe(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),Oe(e._zod,"optin",()=>e._zod.innerType._zod.optin??void 0),Oe(e._zod,"optout",()=>e._zod.innerType._zod.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o);}),w1=B("$ZodCustom",(e,t)=>{ot.init(e,t),we.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=r=>{let o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then(i=>cS(i,r,o,e));cS(n,r,o,e);};});function cS(e,t,r,o){if(!e){let n={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(n.params=o._zod.def.params),t.issues.push(ac(n));}}var Xf={};Er(Xf,{ar:()=>mS,az:()=>hS,be:()=>yS,bg:()=>bS,ca:()=>xS,cs:()=>vS,da:()=>wS,de:()=>_S,en:()=>am,eo:()=>ES,es:()=>SS,fa:()=>IS,fi:()=>AS,fr:()=>kS,frCA:()=>RS,he:()=>TS,hu:()=>$S,id:()=>OS,is:()=>NS,it:()=>PS,ja:()=>BS,ka:()=>CS,kh:()=>zS,km:()=>cm,ko:()=>LS,lt:()=>MS,mk:()=>DS,ms:()=>jS,nl:()=>FS,no:()=>HS,ota:()=>VS,pl:()=>GS,ps:()=>ZS,pt:()=>qS,ru:()=>KS,sl:()=>JS,sv:()=>YS,ta:()=>XS,th:()=>QS,tr:()=>e5,ua:()=>t5,uk:()=>um,ur:()=>r5,vi:()=>n5,yo:()=>s5,zhCN:()=>o5,zhTW:()=>i5});var cP=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"};return n=>{switch(n.code){case "invalid_type":return `\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${X(n.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${o[i.format]??n.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case "not_multiple_of":return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${n.divisor}`;case "unrecognized_keys":return `\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${j(n.keys,"\u060C ")}`;case "invalid_key":return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;case "invalid_union":return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case "invalid_element":return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;default:return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function mS(){return {localeError:cP()}}var uP=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case "invalid_type":return `Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${n.expected}, daxil olan ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${X(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${o[i.format]??n.format}`}case "not_multiple_of":return `Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case "unrecognized_keys":return `Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${j(n.keys,", ")}`;case "invalid_key":return `${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case "invalid_union":return "Yanl\u0131\u015F d\u0259y\u0259r";case "invalid_element":return `${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return "Yanl\u0131\u015F d\u0259y\u0259r"}}};function hS(){return {localeError:uP()}}function gS(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var fP=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u043B\u0456\u043A";case "object":{if(Array.isArray(n))return "\u043C\u0430\u0441\u0456\u045E";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"};return n=>{switch(n.code){case "invalid_type":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${X(n.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),c=gS(a,s.unit.one,s.unit.few,s.unit.many);return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${n.maximum.toString()} ${c}`}return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),c=gS(a,s.unit.one,s.unit.few,s.unit.many);return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${n.minimum.toString()} ${c}`}return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${o[i.format]??n.format}`}case "not_multiple_of":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${j(n.keys,", ")}`;case "invalid_key":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case "invalid_union":return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case "invalid_element":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${n.origin}`;default:return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function yS(){return {localeError:fP()}}var lP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case "object":{if(Array.isArray(e))return "\u043C\u0430\u0441\u0438\u0432";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},dP=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(o){return e[o]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"};return o=>{switch(o.code){case "invalid_type":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${lP(o.input)}`;case "invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${X(o.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${j(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${o.maximum.toString()} ${i.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${o.minimum.toString()} ${i.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;if(n.format==="starts_with")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${n.prefix}"`;if(n.format==="ends_with")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${n.suffix}"`;if(n.format==="includes")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${n.includes}"`;if(n.format==="regex")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${n.pattern}`;let i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return n.format==="emoji"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="datetime"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="date"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),n.format==="time"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="duration"&&(i="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${i} ${r[n.format]??o.format}`}case "not_multiple_of":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${o.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${o.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u043E\u0432\u0435":""}: ${j(o.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case "invalid_union":return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case "invalid_element":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${o.origin}`;default:return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function bS(){return {localeError:dP()}}var pP=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case "invalid_type":return `Tipus inv\xE0lid: s'esperava ${n.expected}, s'ha rebut ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${X(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${j(n.values," o ")}`;case "too_big":{let i=n.inclusive?"com a m\xE0xim":"menys de",s=t(n.origin);return s?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${i} ${n.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${i} ${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(n.origin);return s?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${i} ${n.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${i} ${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${o[i.format]??n.format}`}case "not_multiple_of":return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case "unrecognized_keys":return `Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `Clau inv\xE0lida a ${n.origin}`;case "invalid_union":return "Entrada inv\xE0lida";case "invalid_element":return `Element inv\xE0lid a ${n.origin}`;default:return "Entrada inv\xE0lida"}}};function xS(){return {localeError:pP()}}var mP=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u010D\xEDslo";case "string":return "\u0159et\u011Bzec";case "boolean":return "boolean";case "bigint":return "bigint";case "function":return "funkce";case "symbol":return "symbol";case "undefined":return "undefined";case "object":{if(Array.isArray(n))return "pole";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"};return n=>{switch(n.code){case "invalid_type":return `Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${n.expected}, obdr\u017Eeno ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${X(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${o[i.format]??n.format}`}case "not_multiple_of":return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case "unrecognized_keys":return `Nezn\xE1m\xE9 kl\xED\u010De: ${j(n.keys,", ")}`;case "invalid_key":return `Neplatn\xFD kl\xED\u010D v ${n.origin}`;case "invalid_union":return "Neplatn\xFD vstup";case "invalid_element":return `Neplatn\xE1 hodnota v ${n.origin}`;default:return "Neplatn\xFD vstup"}}};function vS(){return {localeError:mP()}}var hP=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},t={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};function r(s){return e[s]??null}function o(s){return t[s]??s}let n=s=>{let a=typeof s;switch(a){case "number":return Number.isNaN(s)?"NaN":"tal";case "object":return Array.isArray(s)?"liste":s===null?"null":Object.getPrototypeOf(s)!==Object.prototype&&s.constructor?s.constructor.name:"objekt"}return a},i={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return s=>{switch(s.code){case "invalid_type":return `Ugyldigt input: forventede ${o(s.expected)}, fik ${o(n(s.input))}`;case "invalid_value":return s.values.length===1?`Ugyldig v\xE6rdi: forventede ${X(s.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${j(s.values,"|")}`;case "too_big":{let a=s.inclusive?"<=":"<",c=r(s.origin),u=o(s.origin);return c?`For stor: forventede ${u??"value"} ${c.verb} ${a} ${s.maximum.toString()} ${c.unit??"elementer"}`:`For stor: forventede ${u??"value"} havde ${a} ${s.maximum.toString()}`}case "too_small":{let a=s.inclusive?">=":">",c=r(s.origin),u=o(s.origin);return c?`For lille: forventede ${u} ${c.verb} ${a} ${s.minimum.toString()} ${c.unit}`:`For lille: forventede ${u} havde ${a} ${s.minimum.toString()}`}case "invalid_format":{let a=s;return a.format==="starts_with"?`Ugyldig streng: skal starte med "${a.prefix}"`:a.format==="ends_with"?`Ugyldig streng: skal ende med "${a.suffix}"`:a.format==="includes"?`Ugyldig streng: skal indeholde "${a.includes}"`:a.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${a.pattern}`:`Ugyldig ${i[a.format]??s.format}`}case "not_multiple_of":return `Ugyldigt tal: skal v\xE6re deleligt med ${s.divisor}`;case "unrecognized_keys":return `${s.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${j(s.keys,", ")}`;case "invalid_key":return `Ugyldig n\xF8gle i ${s.origin}`;case "invalid_union":return "Ugyldigt input: matcher ingen af de tilladte typer";case "invalid_element":return `Ugyldig v\xE6rdi i ${s.origin}`;default:return "Ugyldigt input"}}};function wS(){return {localeError:hP()}}var gP=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"Zahl";case "object":{if(Array.isArray(n))return "Array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return n=>{switch(n.code){case "invalid_type":return `Ung\xFCltige Eingabe: erwartet ${n.expected}, erhalten ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${X(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ist`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ist`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${o[i.format]??n.format}`}case "not_multiple_of":return `Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case "unrecognized_keys":return `${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${j(n.keys,", ")}`;case "invalid_key":return `Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case "invalid_union":return "Ung\xFCltige Eingabe";case "invalid_element":return `Ung\xFCltiger Wert in ${n.origin}`;default:return "Ung\xFCltige Eingabe"}}};function _S(){return {localeError:gP()}}var yP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"number";case "object":{if(Array.isArray(e))return "array";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},bP=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(o){return e[o]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return o=>{switch(o.code){case "invalid_type":return `Invalid input: expected ${o.expected}, received ${yP(o.input)}`;case "invalid_value":return o.values.length===1?`Invalid input: expected ${X(o.values[0])}`:`Invalid option: expected one of ${j(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Too big: expected ${o.origin??"value"} to have ${n}${o.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`Too small: expected ${o.origin} to have ${n}${o.minimum.toString()} ${i.unit}`:`Too small: expected ${o.origin} to be ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`Invalid string: must start with "${n.prefix}"`:n.format==="ends_with"?`Invalid string: must end with "${n.suffix}"`:n.format==="includes"?`Invalid string: must include "${n.includes}"`:n.format==="regex"?`Invalid string: must match pattern ${n.pattern}`:`Invalid ${r[n.format]??o.format}`}case "not_multiple_of":return `Invalid number: must be a multiple of ${o.divisor}`;case "unrecognized_keys":return `Unrecognized key${o.keys.length>1?"s":""}: ${j(o.keys,", ")}`;case "invalid_key":return `Invalid key in ${o.origin}`;case "invalid_union":return "Invalid input";case "invalid_element":return `Invalid value in ${o.origin}`;default:return "Invalid input"}}};function am(){return {localeError:bP()}}var xP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"nombro";case "object":{if(Array.isArray(e))return "tabelo";if(e===null)return "senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},vP=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(o){return e[o]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return o=>{switch(o.code){case "invalid_type":return `Nevalida enigo: atendi\u011Dis ${o.expected}, ricevi\u011Dis ${xP(o.input)}`;case "invalid_value":return o.values.length===1?`Nevalida enigo: atendi\u011Dis ${X(o.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${j(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${n}${o.maximum.toString()} ${i.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`Tro malgranda: atendi\u011Dis ke ${o.origin} havu ${n}${o.minimum.toString()} ${i.unit}`:`Tro malgranda: atendi\u011Dis ke ${o.origin} estu ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${n.prefix}"`:n.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${n.suffix}"`:n.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${n.includes}"`:n.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${n.pattern}`:`Nevalida ${r[n.format]??o.format}`}case "not_multiple_of":return `Nevalida nombro: devas esti oblo de ${o.divisor}`;case "unrecognized_keys":return `Nekonata${o.keys.length>1?"j":""} \u015Dlosilo${o.keys.length>1?"j":""}: ${j(o.keys,", ")}`;case "invalid_key":return `Nevalida \u015Dlosilo en ${o.origin}`;case "invalid_union":return "Nevalida enigo";case "invalid_element":return `Nevalida valoro en ${o.origin}`;default:return "Nevalida enigo"}}};function ES(){return {localeError:vP()}}var wP=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},t={string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};function r(s){return e[s]??null}function o(s){return t[s]??s}let n=s=>{let a=typeof s;switch(a){case "number":return Number.isNaN(s)?"NaN":"number";case "object":return Array.isArray(s)?"array":s===null?"null":Object.getPrototypeOf(s)!==Object.prototype?s.constructor.name:"object"}return a},i={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return s=>{switch(s.code){case "invalid_type":return `Entrada inv\xE1lida: se esperaba ${o(s.expected)}, recibido ${o(n(s.input))}`;case "invalid_value":return s.values.length===1?`Entrada inv\xE1lida: se esperaba ${X(s.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${j(s.values,"|")}`;case "too_big":{let a=s.inclusive?"<=":"<",c=r(s.origin),u=o(s.origin);return c?`Demasiado grande: se esperaba que ${u??"valor"} tuviera ${a}${s.maximum.toString()} ${c.unit??"elementos"}`:`Demasiado grande: se esperaba que ${u??"valor"} fuera ${a}${s.maximum.toString()}`}case "too_small":{let a=s.inclusive?">=":">",c=r(s.origin),u=o(s.origin);return c?`Demasiado peque\xF1o: se esperaba que ${u} tuviera ${a}${s.minimum.toString()} ${c.unit}`:`Demasiado peque\xF1o: se esperaba que ${u} fuera ${a}${s.minimum.toString()}`}case "invalid_format":{let a=s;return a.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${a.prefix}"`:a.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${a.suffix}"`:a.format==="includes"?`Cadena inv\xE1lida: debe incluir "${a.includes}"`:a.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${a.pattern}`:`Inv\xE1lido ${i[a.format]??s.format}`}case "not_multiple_of":return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${s.divisor}`;case "unrecognized_keys":return `Llave${s.keys.length>1?"s":""} desconocida${s.keys.length>1?"s":""}: ${j(s.keys,", ")}`;case "invalid_key":return `Llave inv\xE1lida en ${o(s.origin)}`;case "invalid_union":return "Entrada inv\xE1lida";case "invalid_element":return `Valor inv\xE1lido en ${o(s.origin)}`;default:return "Entrada inv\xE1lida"}}};function SS(){return {localeError:wP()}}var _P=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0639\u062F\u062F";case "object":{if(Array.isArray(n))return "\u0622\u0631\u0627\u06CC\u0647";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"};return n=>{switch(n.code){case "invalid_type":return `\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${r(n.input)} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;case "invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${X(n.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${j(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${o[i.format]??n.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case "not_multiple_of":return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${n.divisor} \u0628\u0627\u0634\u062F`;case "unrecognized_keys":return `\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${j(n.keys,", ")}`;case "invalid_key":return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.origin}`;case "invalid_union":return "\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case "invalid_element":return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${n.origin}`;default:return "\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function IS(){return {localeError:_P()}}var EP=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return n=>{switch(n.code){case "invalid_type":return `Virheellinen tyyppi: odotettiin ${n.expected}, oli ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${X(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${n.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${n.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${o[i.format]??n.format}`}case "not_multiple_of":return `Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case "unrecognized_keys":return `${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${j(n.keys,", ")}`;case "invalid_key":return "Virheellinen avain tietueessa";case "invalid_union":return "Virheellinen unioni";case "invalid_element":return "Virheellinen arvo joukossa";default:return "Virheellinen sy\xF6te"}}};function AS(){return {localeError:EP()}}var SP=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"nombre";case "object":{if(Array.isArray(n))return "tableau";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return n=>{switch(n.code){case "invalid_type":return `Entr\xE9e invalide : ${n.expected} attendu, ${r(n.input)} re\xE7u`;case "invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${X(n.values[0])} attendu`:`Option invalide : une valeur parmi ${j(n.values,"|")} attendue`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Trop grand : ${n.origin??"valeur"} doit ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n.origin??"valeur"} doit \xEAtre ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Trop petit : ${n.origin} doit ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : ${n.origin} doit \xEAtre ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${o[i.format]??n.format} invalide`}case "not_multiple_of":return `Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case "unrecognized_keys":return `Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${j(n.keys,", ")}`;case "invalid_key":return `Cl\xE9 invalide dans ${n.origin}`;case "invalid_union":return "Entr\xE9e invalide";case "invalid_element":return `Valeur invalide dans ${n.origin}`;default:return "Entr\xE9e invalide"}}};function kS(){return {localeError:SP()}}var IP=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return n=>{switch(n.code){case "invalid_type":return `Entr\xE9e invalide : attendu ${n.expected}, re\xE7u ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${X(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"\u2264":"<",s=t(n.origin);return s?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${i}${n.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?"\u2265":">",s=t(n.origin);return s?`Trop petit : attendu que ${n.origin} ait ${i}${n.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${n.origin} soit ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${o[i.format]??n.format} invalide`}case "not_multiple_of":return `Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case "unrecognized_keys":return `Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${j(n.keys,", ")}`;case "invalid_key":return `Cl\xE9 invalide dans ${n.origin}`;case "invalid_union":return "Entr\xE9e invalide";case "invalid_element":return `Valeur invalide dans ${n.origin}`;default:return "Entr\xE9e invalide"}}};function RS(){return {localeError:IP()}}var AP=()=>{let e={string:{unit:"\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u05E7\u05DC\u05D8",email:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",url:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",emoji:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",date:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",time:"\u05D6\u05DE\u05DF ISO",duration:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",ipv4:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",ipv6:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",cidrv4:"\u05D8\u05D5\u05D5\u05D7 IPv4",cidrv6:"\u05D8\u05D5\u05D5\u05D7 IPv6",base64:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",base64url:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",json_string:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",e164:"\u05DE\u05E1\u05E4\u05E8 E.164",jwt:"JWT",template_literal:"\u05E7\u05DC\u05D8"};return n=>{switch(n.code){case "invalid_type":return `\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${n.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${X(n.values[0])}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${n.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.maximum.toString()} ${s.unit??"elements"}`:`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${n.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${n.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.minimum.toString()} ${s.unit}`:`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${n.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1"${i.prefix}"`:i.format==="ends_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${i.suffix}"`:i.format==="includes"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${i.includes}"`:i.format==="regex"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${i.pattern}`:`${o[i.format]??n.format} \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`}case "not_multiple_of":return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${n.divisor}`;case "unrecognized_keys":return `\u05DE\u05E4\u05EA\u05D7${n.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${n.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${j(n.keys,", ")}`;case "invalid_key":return `\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n.origin}`;case "invalid_union":return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case "invalid_element":return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n.origin}`;default:return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function TS(){return {localeError:AP()}}var kP=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"sz\xE1m";case "object":{if(Array.isArray(n))return "t\xF6mb";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"};return n=>{switch(n.code){case "invalid_type":return `\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${n.expected}, a kapott \xE9rt\xE9k ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${X(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${n.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${i}${n.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${o[i.format]??n.format}`}case "not_multiple_of":return `\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case "unrecognized_keys":return `Ismeretlen kulcs${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `\xC9rv\xE9nytelen kulcs ${n.origin}`;case "invalid_union":return "\xC9rv\xE9nytelen bemenet";case "invalid_element":return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return "\xC9rv\xE9nytelen bemenet"}}};function $S(){return {localeError:kP()}}var RP=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case "invalid_type":return `Input tidak valid: diharapkan ${n.expected}, diterima ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${X(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: diharapkan ${n.origin} memiliki ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${o[i.format]??n.format} tidak valid`}case "not_multiple_of":return `Angka tidak valid: harus kelipatan dari ${n.divisor}`;case "unrecognized_keys":return `Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `Kunci tidak valid di ${n.origin}`;case "invalid_union":return "Input tidak valid";case "invalid_element":return `Nilai tidak valid di ${n.origin}`;default:return "Input tidak valid"}}};function OS(){return {localeError:RP()}}var TP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"n\xFAmer";case "object":{if(Array.isArray(e))return "fylki";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},$P=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(o){return e[o]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"};return o=>{switch(o.code){case "invalid_type":return `Rangt gildi: \xDE\xFA sl\xF3st inn ${TP(o.input)} \xFEar sem \xE1 a\xF0 vera ${o.expected}`;case "invalid_value":return o.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${X(o.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${j(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} hafi ${n}${o.maximum.toString()} ${i.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} s\xE9 ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} hafi ${n}${o.minimum.toString()} ${i.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} s\xE9 ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${n.prefix}"`:n.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${n.suffix}"`:n.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${n.includes}"`:n.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${n.pattern}`:`Rangt ${r[n.format]??o.format}`}case "not_multiple_of":return `R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${o.divisor}`;case "unrecognized_keys":return `\xD3\xFEekkt ${o.keys.length>1?"ir lyklar":"ur lykill"}: ${j(o.keys,", ")}`;case "invalid_key":return `Rangur lykill \xED ${o.origin}`;case "invalid_union":return "Rangt gildi";case "invalid_element":return `Rangt gildi \xED ${o.origin}`;default:return "Rangt gildi"}}};function NS(){return {localeError:$P()}}var OP=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"numero";case "object":{if(Array.isArray(n))return "vettore";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case "invalid_type":return `Input non valido: atteso ${n.expected}, ricevuto ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Input non valido: atteso ${X(n.values[0])}`:`Opzione non valida: atteso uno tra ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Troppo grande: ${n.origin??"valore"} deve avere ${i}${n.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Troppo piccolo: ${n.origin} deve avere ${i}${n.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${n.origin} deve essere ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Invalid ${o[i.format]??n.format}`}case "not_multiple_of":return `Numero non valido: deve essere un multiplo di ${n.divisor}`;case "unrecognized_keys":return `Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${j(n.keys,", ")}`;case "invalid_key":return `Chiave non valida in ${n.origin}`;case "invalid_union":return "Input non valido";case "invalid_element":return `Valore non valido in ${n.origin}`;default:return "Input non valido"}}};function PS(){return {localeError:OP()}}var NP=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u6570\u5024";case "object":{if(Array.isArray(n))return "\u914D\u5217";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"};return n=>{switch(n.code){case "invalid_type":return `\u7121\u52B9\u306A\u5165\u529B: ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${r(n.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;case "invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${X(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${j(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case "too_big":{let i=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(n.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${s.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case "too_small":{let i=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(n.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${s.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${o[i.format]??n.format}`}case "not_multiple_of":return `\u7121\u52B9\u306A\u6570\u5024: ${n.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case "unrecognized_keys":return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${n.keys.length>1?"\u7FA4":""}: ${j(n.keys,"\u3001")}`;case "invalid_key":return `${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case "invalid_union":return "\u7121\u52B9\u306A\u5165\u529B";case "invalid_element":return `${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return "\u7121\u52B9\u306A\u5165\u529B"}}};function BS(){return {localeError:NP()}}var PP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8";case "object":{if(Array.isArray(e))return "\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return {string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0"}[t]??t},BP=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(o){return e[o]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"};return o=>{switch(o.code){case "invalid_type":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${PP(o.input)}`;case "invalid_value":return o.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${X(o.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${j(o.values,"|")}-\u10D3\u10D0\u10DC`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${i.verb} ${n}${o.maximum.toString()} ${i.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} ${i.verb} ${n}${o.minimum.toString()} ${i.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} \u10D8\u10E7\u10DD\u10E1 ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.prefix}"-\u10D8\u10D7`:n.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.suffix}"-\u10D8\u10D7`:n.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${n.includes}"-\u10E1`:n.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${n.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[n.format]??o.format}`}case "not_multiple_of":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${o.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case "unrecognized_keys":return `\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${o.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${j(o.keys,", ")}`;case "invalid_key":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${o.origin}-\u10E8\u10D8`;case "invalid_union":return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case "invalid_element":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${o.origin}-\u10E8\u10D8`;default:return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function CS(){return {localeError:BP()}}var CP=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"\u1798\u17B7\u1793\u1798\u17C2\u1793\u1787\u17B6\u179B\u17C1\u1781 (NaN)":"\u179B\u17C1\u1781";case "object":{if(Array.isArray(n))return "\u17A2\u17B6\u179A\u17C1 (Array)";if(n===null)return "\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"};return n=>{switch(n.code){case "invalid_type":return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${X(n.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${n.divisor}`;case "unrecognized_keys":return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${j(n.keys,", ")}`;case "invalid_key":return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;case "invalid_union":return "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case "invalid_element":return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;default:return "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function cm(){return {localeError:CP()}}function zS(){return cm()}var zP=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"};return n=>{switch(n.code){case "invalid_type":return `\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${r(n.input)}\uC785\uB2C8\uB2E4`;case "invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${X(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${j(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case "too_big":{let i=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(n.origin),c=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${c} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${i}${s}`}case "too_small":{let i=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(n.origin),c=a?.unit??"\uC694\uC18C";return a?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${c} ${i}${s}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${i}${s}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${o[i.format]??n.format}`}case "not_multiple_of":return `\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case "unrecognized_keys":return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${j(n.keys,", ")}`;case "invalid_key":return `\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case "invalid_union":return "\uC798\uBABB\uB41C \uC785\uB825";case "invalid_element":return `\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return "\uC798\uBABB\uB41C \uC785\uB825"}}};function LS(){return {localeError:zP()}}var LP=e=>Yf(typeof e,e),Yf=(e,t=void 0)=>{switch(e){case "number":return Number.isNaN(t)?"NaN":"skai\u010Dius";case "bigint":return "sveikasis skai\u010Dius";case "string":return "eilut\u0117";case "boolean":return "login\u0117 reik\u0161m\u0117";case "undefined":case "void":return "neapibr\u0117\u017Eta reik\u0161m\u0117";case "function":return "funkcija";case "symbol":return "simbolis";case "object":return t===void 0?"ne\u017Einomas objektas":t===null?"nulin\u0117 reik\u0161m\u0117":Array.isArray(t)?"masyvas":Object.getPrototypeOf(t)!==Object.prototype&&t.constructor?t.constructor.name:"objektas";case "null":return "nulin\u0117 reik\u0161m\u0117"}return e},Jf=e=>e.charAt(0).toUpperCase()+e.slice(1);function US(e){let t=Math.abs(e),r=t%10,o=t%100;return o>=11&&o<=19||r===0?"many":r===1?"one":"few"}var UP=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(o,n,i,s){let a=e[o]??null;return a===null?a:{unit:a.unit[n],verb:a.verb[s][i?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"};return o=>{switch(o.code){case "invalid_type":return `Gautas tipas ${LP(o.input)}, o tik\u0117tasi - ${Yf(o.expected)}`;case "invalid_value":return o.values.length===1?`Privalo b\u016Bti ${X(o.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${j(o.values,"|")} pasirinkim\u0173`;case "too_big":{let n=Yf(o.origin),i=t(o.origin,US(Number(o.maximum)),o.inclusive??false,"smaller");if(i?.verb)return `${Jf(n??o.origin??"reik\u0161m\u0117")} ${i.verb} ${o.maximum.toString()} ${i.unit??"element\u0173"}`;let s=o.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return `${Jf(n??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${o.maximum.toString()} ${i?.unit}`}case "too_small":{let n=Yf(o.origin),i=t(o.origin,US(Number(o.minimum)),o.inclusive??false,"bigger");if(i?.verb)return `${Jf(n??o.origin??"reik\u0161m\u0117")} ${i.verb} ${o.minimum.toString()} ${i.unit??"element\u0173"}`;let s=o.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return `${Jf(n??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${o.minimum.toString()} ${i?.unit}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${n.prefix}"`:n.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${n.suffix}"`:n.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${n.includes}"`:n.format==="regex"?`Eilut\u0117 privalo atitikti ${n.pattern}`:`Neteisingas ${r[n.format]??o.format}`}case "not_multiple_of":return `Skai\u010Dius privalo b\u016Bti ${o.divisor} kartotinis.`;case "unrecognized_keys":return `Neatpa\u017Eint${o.keys.length>1?"i":"as"} rakt${o.keys.length>1?"ai":"as"}: ${j(o.keys,", ")}`;case "invalid_key":return "Rastas klaidingas raktas";case "invalid_union":return "Klaidinga \u012Fvestis";case "invalid_element":{let n=Yf(o.origin);return `${Jf(n??o.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return "Klaidinga \u012Fvestis"}}};function MS(){return {localeError:UP()}}var MP=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0431\u0440\u043E\u0458";case "object":{if(Array.isArray(n))return "\u043D\u0438\u0437\u0430";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"};return n=>{switch(n.code){case "invalid_type":return `\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Invalid input: expected ${X(n.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${o[i.format]??n.format}`}case "not_multiple_of":return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${n.divisor}`;case "unrecognized_keys":return `${n.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${j(n.keys,", ")}`;case "invalid_key":return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.origin}`;case "invalid_union":return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case "invalid_element":return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${n.origin}`;default:return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function DS(){return {localeError:MP()}}var DP=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"nombor";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case "invalid_type":return `Input tidak sah: dijangka ${n.expected}, diterima ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${X(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${o[i.format]??n.format} tidak sah`}case "not_multiple_of":return `Nombor tidak sah: perlu gandaan ${n.divisor}`;case "unrecognized_keys":return `Kunci tidak dikenali: ${j(n.keys,", ")}`;case "invalid_key":return `Kunci tidak sah dalam ${n.origin}`;case "invalid_union":return "Input tidak sah";case "invalid_element":return `Nilai tidak sah dalam ${n.origin}`;default:return "Input tidak sah"}}};function jS(){return {localeError:DP()}}var jP=()=>{let e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"getal";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return n=>{switch(n.code){case "invalid_type":return `Ongeldige invoer: verwacht ${n.expected}, ontving ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${X(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Te lang: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} ${s.unit??"elementen"} bevat`:`Te lang: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} is`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Te kort: verwacht dat ${n.origin} ${i}${n.minimum.toString()} ${s.unit} bevat`:`Te kort: verwacht dat ${n.origin} ${i}${n.minimum.toString()} is`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${o[i.format]??n.format}`}case "not_multiple_of":return `Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case "unrecognized_keys":return `Onbekende key${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `Ongeldige key in ${n.origin}`;case "invalid_union":return "Ongeldige invoer";case "invalid_element":return `Ongeldige waarde in ${n.origin}`;default:return "Ongeldige invoer"}}};function FS(){return {localeError:jP()}}var FP=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"tall";case "object":{if(Array.isArray(n))return "liste";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case "invalid_type":return `Ugyldig input: forventet ${n.expected}, fikk ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${X(n.values[0])}`:`Ugyldig valg: forventet en av ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${o[i.format]??n.format}`}case "not_multiple_of":return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case "unrecognized_keys":return `${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${j(n.keys,", ")}`;case "invalid_key":return `Ugyldig n\xF8kkel i ${n.origin}`;case "invalid_union":return "Ugyldig input";case "invalid_element":return `Ugyldig verdi i ${n.origin}`;default:return "Ugyldig input"}}};function HS(){return {localeError:FP()}}var HP=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"numara";case "object":{if(Array.isArray(n))return "saf";if(n===null)return "gayb";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"};return n=>{switch(n.code){case "invalid_type":return `F\xE2sit giren: umulan ${n.expected}, al\u0131nan ${r(n.input)}`;case "invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${X(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} olmal\u0131yd\u0131.`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} olmal\u0131yd\u0131.`}case "invalid_format":{let i=n;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${o[i.format]??n.format}`}case "not_multiple_of":return `F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case "unrecognized_keys":return `Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case "invalid_union":return "Giren tan\u0131namad\u0131.";case "invalid_element":return `${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return "K\u0131ymet tan\u0131namad\u0131."}}};function VS(){return {localeError:HP()}}var VP=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0639\u062F\u062F";case "object":{if(Array.isArray(n))return "\u0627\u0631\u06D0";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"};return n=>{switch(n.code){case "invalid_type":return `\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${r(n.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;case "invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${X(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${j(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0648\u064A`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0648\u064A`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${o[i.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case "not_multiple_of":return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case "unrecognized_keys":return `\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${j(n.keys,", ")}`;case "invalid_key":return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.origin} \u06A9\u06D0`;case "invalid_union":return "\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case "invalid_element":return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${n.origin} \u06A9\u06D0`;default:return "\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function ZS(){return {localeError:VP()}}var ZP=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"liczba";case "object":{if(Array.isArray(n))return "tablica";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"};return n=>{switch(n.code){case "invalid_type":return `Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${n.expected}, otrzymano ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${X(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${o[i.format]??n.format}`}case "not_multiple_of":return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case "unrecognized_keys":return `Nierozpoznane klucze${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `Nieprawid\u0142owy klucz w ${n.origin}`;case "invalid_union":return "Nieprawid\u0142owe dane wej\u015Bciowe";case "invalid_element":return `Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return "Nieprawid\u0142owe dane wej\u015Bciowe"}}};function GS(){return {localeError:ZP()}}var GP=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"n\xFAmero";case "object":{if(Array.isArray(n))return "array";if(n===null)return "nulo";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case "invalid_type":return `Tipo inv\xE1lido: esperado ${n.expected}, recebido ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${X(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${i}${n.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Muito pequeno: esperado que ${n.origin} tivesse ${i}${n.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${o[i.format]??n.format} inv\xE1lido`}case "not_multiple_of":return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case "unrecognized_keys":return `Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${j(n.keys,", ")}`;case "invalid_key":return `Chave inv\xE1lida em ${n.origin}`;case "invalid_union":return "Entrada inv\xE1lida";case "invalid_element":return `Valor inv\xE1lido em ${n.origin}`;default:return "Campo inv\xE1lido"}}};function qS(){return {localeError:GP()}}function WS(e,t,r,o){let n=Math.abs(e),i=n%10,s=n%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?r:o}var qP=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case "object":{if(Array.isArray(n))return "\u043C\u0430\u0441\u0441\u0438\u0432";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"};return n=>{switch(n.code){case "invalid_type":return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${X(n.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);if(s){let a=Number(n.maximum),c=WS(a,s.unit.one,s.unit.few,s.unit.many);return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.maximum.toString()} ${c}`}return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);if(s){let a=Number(n.minimum),c=WS(a,s.unit.one,s.unit.few,s.unit.many);return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.minimum.toString()} ${c}`}return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${j(n.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case "invalid_union":return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case "invalid_element":return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${n.origin}`;default:return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function KS(){return {localeError:qP()}}var WP=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0161tevilo";case "object":{if(Array.isArray(n))return "tabela";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"};return n=>{switch(n.code){case "invalid_type":return `Neveljaven vnos: pri\u010Dakovano ${n.expected}, prejeto ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${X(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${i}${n.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${i}${n.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${o[i.format]??n.format}`}case "not_multiple_of":return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case "unrecognized_keys":return `Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${j(n.keys,", ")}`;case "invalid_key":return `Neveljaven klju\u010D v ${n.origin}`;case "invalid_union":return "Neveljaven vnos";case "invalid_element":return `Neveljavna vrednost v ${n.origin}`;default:return "Neveljaven vnos"}}};function JS(){return {localeError:WP()}}var KP=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"antal";case "object":{if(Array.isArray(n))return "lista";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return n=>{switch(n.code){case "invalid_type":return `Ogiltig inmatning: f\xF6rv\xE4ntat ${n.expected}, fick ${r(n.input)}`;case "invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${X(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${o[i.format]??n.format}`}case "not_multiple_of":return `Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case "unrecognized_keys":return `${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${j(n.keys,", ")}`;case "invalid_key":return `Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case "invalid_union":return "Ogiltig input";case "invalid_element":return `Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return "Ogiltig input"}}};function YS(){return {localeError:KP()}}var JP=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"\u0B8E\u0BA3\u0BCD \u0B85\u0BB2\u0BCD\u0BB2\u0BBE\u0BA4\u0BA4\u0BC1":"\u0B8E\u0BA3\u0BCD";case "object":{if(Array.isArray(n))return "\u0B85\u0BA3\u0BBF";if(n===null)return "\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case "invalid_type":return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${X(n.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${j(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${i}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case "unrecognized_keys":return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${j(n.keys,", ")}`;case "invalid_key":return `${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case "invalid_union":return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case "invalid_element":return `${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function XS(){return {localeError:JP()}}var YP=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 (NaN)":"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02";case "object":{if(Array.isArray(n))return "\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)";if(n===null)return "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"};return n=>{switch(n.code){case "invalid_type":return `\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${X(n.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(n.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${o[i.format]??n.format}`}case "not_multiple_of":return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${n.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case "unrecognized_keys":return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${j(n.keys,", ")}`;case "invalid_key":return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;case "invalid_union":return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case "invalid_element":return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;default:return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function QS(){return {localeError:YP()}}var XP=e=>{let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"NaN":"number";case "object":{if(Array.isArray(e))return "array";if(e===null)return "null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},QP=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(o){return e[o]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"};return o=>{switch(o.code){case "invalid_type":return `Ge\xE7ersiz de\u011Fer: beklenen ${o.expected}, al\u0131nan ${XP(o.input)}`;case "invalid_value":return o.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${X(o.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${j(o.values,"|")}`;case "too_big":{let n=o.inclusive?"<=":"<",i=t(o.origin);return i?`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${n}${o.maximum.toString()} ${i.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${n}${o.maximum.toString()}`}case "too_small":{let n=o.inclusive?">=":">",i=t(o.origin);return i?`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${n}${o.minimum.toString()} ${i.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${n}${o.minimum.toString()}`}case "invalid_format":{let n=o;return n.format==="starts_with"?`Ge\xE7ersiz metin: "${n.prefix}" ile ba\u015Flamal\u0131`:n.format==="ends_with"?`Ge\xE7ersiz metin: "${n.suffix}" ile bitmeli`:n.format==="includes"?`Ge\xE7ersiz metin: "${n.includes}" i\xE7ermeli`:n.format==="regex"?`Ge\xE7ersiz metin: ${n.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[n.format]??o.format}`}case "not_multiple_of":return `Ge\xE7ersiz say\u0131: ${o.divisor} ile tam b\xF6l\xFCnebilmeli`;case "unrecognized_keys":return `Tan\u0131nmayan anahtar${o.keys.length>1?"lar":""}: ${j(o.keys,", ")}`;case "invalid_key":return `${o.origin} i\xE7inde ge\xE7ersiz anahtar`;case "invalid_union":return "Ge\xE7ersiz de\u011Fer";case "invalid_element":return `${o.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return "Ge\xE7ersiz de\u011Fer"}}};function e5(){return {localeError:QP()}}var e3=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case "object":{if(Array.isArray(n))return "\u043C\u0430\u0441\u0438\u0432";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"};return n=>{switch(n.code){case "invalid_type":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${X(n.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} \u0431\u0443\u0434\u0435 ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${n.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${j(n.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case "invalid_union":return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case "invalid_element":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${n.origin}`;default:return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function um(){return {localeError:e3()}}function t5(){return um()}var t3=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"\u0646\u0645\u0628\u0631";case "object":{if(Array.isArray(n))return "\u0622\u0631\u06D2";if(n===null)return "\u0646\u0644";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"};return n=>{switch(n.code){case "invalid_type":return `\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${r(n.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;case "invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${X(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${j(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${n.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${i}${n.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${i}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case "unrecognized_keys":return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${n.keys.length>1?"\u0632":""}: ${j(n.keys,"\u060C ")}`;case "invalid_key":return `${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case "invalid_union":return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case "invalid_element":return `${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function r5(){return {localeError:t3()}}var r3=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"s\u1ED1";case "object":{if(Array.isArray(n))return "m\u1EA3ng";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"};return n=>{switch(n.code){case "invalid_type":return `\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${X(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${n.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${s.verb} ${i}${n.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${o[i.format]??n.format} kh\xF4ng h\u1EE3p l\u1EC7`}case "not_multiple_of":return `S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${n.divisor}`;case "unrecognized_keys":return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${j(n.keys,", ")}`;case "invalid_key":return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;case "invalid_union":return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case "invalid_element":return `Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;default:return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function n5(){return {localeError:r3()}}var n3=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"\u975E\u6570\u5B57(NaN)":"\u6570\u5B57";case "object":{if(Array.isArray(n))return "\u6570\u7EC4";if(n===null)return "\u7A7A\u503C(null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"};return n=>{switch(n.code){case "invalid_type":return `\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${X(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${o[i.format]??n.format}`}case "not_multiple_of":return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case "unrecognized_keys":return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${j(n.keys,", ")}`;case "invalid_key":return `${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case "invalid_union":return "\u65E0\u6548\u8F93\u5165";case "invalid_element":return `${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return "\u65E0\u6548\u8F93\u5165"}}};function o5(){return {localeError:n3()}}var o3=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"number";case "object":{if(Array.isArray(n))return "array";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"};return n=>{switch(n.code){case "invalid_type":return `\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${n.expected}\uFF0C\u4F46\u6536\u5230 ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${X(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${o[i.format]??n.format}`}case "not_multiple_of":return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case "unrecognized_keys":return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${j(n.keys,"\u3001")}`;case "invalid_key":return `${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case "invalid_union":return "\u7121\u6548\u7684\u8F38\u5165\u503C";case "invalid_element":return `${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return "\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function i5(){return {localeError:o3()}}var i3=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(n){return e[n]??null}let r=n=>{let i=typeof n;switch(i){case "number":return Number.isNaN(n)?"NaN":"n\u1ECD\u0301mb\xE0";case "object":{if(Array.isArray(n))return "akop\u1ECD";if(n===null)return "null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return i},o={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"};return n=>{switch(n.code){case "invalid_type":return `\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${n.expected}, \xE0m\u1ECD\u0300 a r\xED ${r(n.input)}`;case "invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${X(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${j(n.values,"|")}`;case "too_big":{let i=n.inclusive?"<=":"<",s=t(n.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${s.verb} ${i}${n.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.maximum}`}case "too_small":{let i=n.inclusive?">=":">",s=t(n.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${s.verb} ${i}${n.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.minimum}`}case "invalid_format":{let i=n;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${o[i.format]??n.format}`}case "not_multiple_of":return `N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${n.divisor}`;case "unrecognized_keys":return `B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${j(n.keys,", ")}`;case "invalid_key":return `B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;case "invalid_union":return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case "invalid_element":return `Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;default:return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function s5(){return {localeError:i3()}}var _1=Symbol("ZodOutput"),E1=Symbol("ZodInput"),pc=class{constructor(){this._map=new WeakMap,this._idmap=new Map;}add(t,...r){let o=r[0];if(this._map.set(t,o),o&&typeof o=="object"&&"id"in o){if(this._idmap.has(o.id))throw new Error(`ID ${o.id} already exists in the registry`);this._idmap.set(o.id,t);}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let o={...this.get(r)??{}};delete o.id;let n={...o,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function fm(){return new pc}var vo=fm();function S1(e,t){return new e({type:"string",...ee(t)})}function I1(e,t){return new e({type:"string",coerce:true,...ee(t)})}function lm(e,t){return new e({type:"string",format:"email",check:"string_format",abort:false,...ee(t)})}function Qf(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:false,...ee(t)})}function dm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,...ee(t)})}function pm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v4",...ee(t)})}function mm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v6",...ee(t)})}function hm(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v7",...ee(t)})}function el(e,t){return new e({type:"string",format:"url",check:"string_format",abort:false,...ee(t)})}function gm(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:false,...ee(t)})}function ym(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:false,...ee(t)})}function bm(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:false,...ee(t)})}function xm(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:false,...ee(t)})}function vm(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:false,...ee(t)})}function wm(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:false,...ee(t)})}function _m(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:false,...ee(t)})}function Em(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:false,...ee(t)})}function Sm(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:false,...ee(t)})}function Im(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:false,...ee(t)})}function Am(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:false,...ee(t)})}function km(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:false,...ee(t)})}function Rm(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:false,...ee(t)})}function Tm(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:false,...ee(t)})}function $m(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:false,...ee(t)})}var A1={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function k1(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:false,local:false,precision:null,...ee(t)})}function R1(e,t){return new e({type:"string",format:"date",check:"string_format",...ee(t)})}function T1(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ee(t)})}function $1(e,t){return new e({type:"string",format:"duration",check:"string_format",...ee(t)})}function O1(e,t){return new e({type:"number",checks:[],...ee(t)})}function N1(e,t){return new e({type:"number",coerce:true,checks:[],...ee(t)})}function P1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"safeint",...ee(t)})}function B1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"float32",...ee(t)})}function C1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"float64",...ee(t)})}function z1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"int32",...ee(t)})}function L1(e,t){return new e({type:"number",check:"number_format",abort:false,format:"uint32",...ee(t)})}function U1(e,t){return new e({type:"boolean",...ee(t)})}function M1(e,t){return new e({type:"boolean",coerce:true,...ee(t)})}function D1(e,t){return new e({type:"bigint",...ee(t)})}function j1(e,t){return new e({type:"bigint",coerce:true,...ee(t)})}function F1(e,t){return new e({type:"bigint",check:"bigint_format",abort:false,format:"int64",...ee(t)})}function H1(e,t){return new e({type:"bigint",check:"bigint_format",abort:false,format:"uint64",...ee(t)})}function V1(e,t){return new e({type:"symbol",...ee(t)})}function Z1(e,t){return new e({type:"undefined",...ee(t)})}function G1(e,t){return new e({type:"null",...ee(t)})}function q1(e){return new e({type:"any"})}function W1(e){return new e({type:"unknown"})}function K1(e,t){return new e({type:"never",...ee(t)})}function J1(e,t){return new e({type:"void",...ee(t)})}function Y1(e,t){return new e({type:"date",...ee(t)})}function X1(e,t){return new e({type:"date",coerce:true,...ee(t)})}function Q1(e,t){return new e({type:"nan",...ee(t)})}function Jo(e,t){return new Jp({check:"less_than",...ee(t),value:e,inclusive:false})}function kn(e,t){return new Jp({check:"less_than",...ee(t),value:e,inclusive:true})}function Yo(e,t){return new Yp({check:"greater_than",...ee(t),value:e,inclusive:false})}function Jr(e,t){return new Yp({check:"greater_than",...ee(t),value:e,inclusive:true})}function ev(e){return Yo(0,e)}function tv(e){return Jo(0,e)}function rv(e){return kn(0,e)}function nv(e){return Jr(0,e)}function Hs(e,t){return new Kb({check:"multiple_of",...ee(t),value:e})}function mc(e,t){return new Xb({check:"max_size",...ee(t),maximum:e})}function Vs(e,t){return new Qb({check:"min_size",...ee(t),minimum:e})}function tl(e,t){return new ex({check:"size_equals",...ee(t),size:e})}function hc(e,t){return new tx({check:"max_length",...ee(t),maximum:e})}function Vi(e,t){return new rx({check:"min_length",...ee(t),minimum:e})}function gc(e,t){return new nx({check:"length_equals",...ee(t),length:e})}function rl(e,t){return new ox({check:"string_format",format:"regex",...ee(t),pattern:e})}function nl(e){return new ix({check:"string_format",format:"lowercase",...ee(e)})}function ol(e){return new sx({check:"string_format",format:"uppercase",...ee(e)})}function il(e,t){return new ax({check:"string_format",format:"includes",...ee(t),includes:e})}function sl(e,t){return new cx({check:"string_format",format:"starts_with",...ee(t),prefix:e})}function al(e,t){return new ux({check:"string_format",format:"ends_with",...ee(t),suffix:e})}function ov(e,t,r){return new fx({check:"property",property:e,schema:t,...ee(r)})}function cl(e,t){return new lx({check:"mime_type",mime:e,...ee(t)})}function Xo(e){return new dx({check:"overwrite",tx:e})}function ul(e){return Xo(t=>t.normalize(e))}function fl(){return Xo(e=>e.trim())}function ll(){return Xo(e=>e.toLowerCase())}function dl(){return Xo(e=>e.toUpperCase())}function iv(e,t,r){return new e({type:"array",element:t,...ee(r)})}function s3(e,t,r){return new e({type:"union",options:t,...ee(r)})}function a3(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...ee(o)})}function c3(e,t,r){return new e({type:"intersection",left:t,right:r})}function u3(e,t,r,o){let n=r instanceof we,i=n?o:r,s=n?r:null;return new e({type:"tuple",items:t,rest:s,...ee(i)})}function f3(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...ee(o)})}function l3(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...ee(o)})}function d3(e,t,r){return new e({type:"set",valueType:t,...ee(r)})}function p3(e,t,r){let o=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:o,...ee(r)})}function m3(e,t,r){return new e({type:"enum",entries:t,...ee(r)})}function h3(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...ee(r)})}function sv(e,t){return new e({type:"file",...ee(t)})}function g3(e,t){return new e({type:"transform",transform:t})}function y3(e,t){return new e({type:"optional",innerType:t})}function b3(e,t){return new e({type:"nullable",innerType:t})}function x3(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():lb(r)}})}function v3(e,t,r){return new e({type:"nonoptional",innerType:t,...ee(r)})}function w3(e,t){return new e({type:"success",innerType:t})}function _3(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function E3(e,t,r){return new e({type:"pipe",in:t,out:r})}function S3(e,t){return new e({type:"readonly",innerType:t})}function I3(e,t,r){return new e({type:"template_literal",parts:t,...ee(r)})}function A3(e,t){return new e({type:"lazy",getter:t})}function k3(e,t){return new e({type:"promise",innerType:t})}function av(e,t,r){let o=ee(r);return o.abort??(o.abort=true),new e({type:"custom",check:"custom",fn:t,...o})}function cv(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ee(r)})}function uv(e){let t=a5(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(ac(o,r.value,t._zod.def));else {let n=o;n.fatal&&(n.continue=false),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=t),n.continue??(n.continue=!t._zod.def.abort),r.issues.push(ac(n));}},e(r.value,r)));return t}function a5(e,t){let r=new ot({check:"custom",...ee(t)});return r._zod.check=e,r}function fv(e,t){let r=ee(t),o=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(o=o.map(h=>typeof h=="string"?h.toLowerCase():h),n=n.map(h=>typeof h=="string"?h.toLowerCase():h));let i=new Set(o),s=new Set(n),a=e.Codec??Kf,c=e.Boolean??Wf,u=e.String??Fs,f=new u({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),g=new a({type:"pipe",in:f,out:d,transform:((h,v)=>{let E=h;return r.case!=="sensitive"&&(E=E.toLowerCase()),i.has(E)?true:s.has(E)?false:(v.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:v.value,inst:g,continue:false}),{})}),reverseTransform:((h,v)=>h===true?o[0]||"true":n[0]||"false"),error:r.error});return g}function yc(e,t,r,o={}){let n=ee(o),i={...ee(o),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:a=>r.test(a),...n};return r instanceof RegExp&&(i.pattern=r),new e(i)}var pl=class{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??vo,this.target=t?.target??"draft-2020-12",this.unrepresentable=t?.unrepresentable??"throw",this.override=t?.override??(()=>{}),this.io=t?.io??"output",this.seen=new Map;}process(t,r={path:[],schemaPath:[]}){var o;let n=t._zod.def,i={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(t);if(s)return s.count++,r.schemaPath.includes(t)&&(s.cycle=r.path),s.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(t,a);let c=t._zod.toJSONSchema?.();if(c)a.schema=c;else {let d={...r,schemaPath:[...r.schemaPath,t],path:r.path},g=t._zod.parent;if(g)a.ref=g,this.process(g,d),this.seen.get(g).isParent=true;else {let h=a.schema;switch(n.type){case "string":{let v=h;v.type="string";let{minimum:E,maximum:R,format:$,patterns:N,contentEncoding:O}=t._zod.bag;if(typeof E=="number"&&(v.minLength=E),typeof R=="number"&&(v.maxLength=R),$&&(v.format=i[$]??$,v.format===""&&delete v.format),O&&(v.contentEncoding=O),N&&N.size>0){let I=[...N];I.length===1?v.pattern=I[0].source:I.length>1&&(a.schema.allOf=[...I.map(P=>({...this.target==="draft-7"||this.target==="draft-4"||this.target==="openapi-3.0"?{type:"string"}:{},pattern:P.source}))]);}break}case "number":{let v=h,{minimum:E,maximum:R,format:$,multipleOf:N,exclusiveMaximum:O,exclusiveMinimum:I}=t._zod.bag;typeof $=="string"&&$.includes("int")?v.type="integer":v.type="number",typeof I=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(v.minimum=I,v.exclusiveMinimum=true):v.exclusiveMinimum=I),typeof E=="number"&&(v.minimum=E,typeof I=="number"&&this.target!=="draft-4"&&(I>=E?delete v.minimum:delete v.exclusiveMinimum)),typeof O=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(v.maximum=O,v.exclusiveMaximum=true):v.exclusiveMaximum=O),typeof R=="number"&&(v.maximum=R,typeof O=="number"&&this.target!=="draft-4"&&(O<=R?delete v.maximum:delete v.exclusiveMaximum)),typeof N=="number"&&(v.multipleOf=N);break}case "boolean":{let v=h;v.type="boolean";break}case "bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case "symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case "null":{this.target==="openapi-3.0"?(h.type="string",h.nullable=true,h.enum=[null]):h.type="null";break}case "any":break;case "unknown":break;case "undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case "void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case "never":{h.not={};break}case "date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case "array":{let v=h,{minimum:E,maximum:R}=t._zod.bag;typeof E=="number"&&(v.minItems=E),typeof R=="number"&&(v.maxItems=R),v.type="array",v.items=this.process(n.element,{...d,path:[...d.path,"items"]});break}case "object":{let v=h;v.type="object",v.properties={};let E=n.shape;for(let N in E)v.properties[N]=this.process(E[N],{...d,path:[...d.path,"properties",N]});let R=new Set(Object.keys(E)),$=new Set([...R].filter(N=>{let O=n.shape[N]._zod;return this.io==="input"?O.optin===void 0:O.optout===void 0}));$.size>0&&(v.required=Array.from($)),n.catchall?._zod.def.type==="never"?v.additionalProperties=false:n.catchall?n.catchall&&(v.additionalProperties=this.process(n.catchall,{...d,path:[...d.path,"additionalProperties"]})):this.io==="output"&&(v.additionalProperties=false);break}case "union":{let v=h,E=n.options.map((R,$)=>this.process(R,{...d,path:[...d.path,"anyOf",$]}));v.anyOf=E;break}case "intersection":{let v=h,E=this.process(n.left,{...d,path:[...d.path,"allOf",0]}),R=this.process(n.right,{...d,path:[...d.path,"allOf",1]}),$=O=>"allOf"in O&&Object.keys(O).length===1,N=[...$(E)?E.allOf:[E],...$(R)?R.allOf:[R]];v.allOf=N;break}case "tuple":{let v=h;v.type="array";let E=this.target==="draft-2020-12"?"prefixItems":"items",R=this.target==="draft-2020-12"||this.target==="openapi-3.0"?"items":"additionalItems",$=n.items.map((P,L)=>this.process(P,{...d,path:[...d.path,E,L]})),N=n.rest?this.process(n.rest,{...d,path:[...d.path,R,...this.target==="openapi-3.0"?[n.items.length]:[]]}):null;this.target==="draft-2020-12"?(v.prefixItems=$,N&&(v.items=N)):this.target==="openapi-3.0"?(v.items={anyOf:$},N&&v.items.anyOf.push(N),v.minItems=$.length,N||(v.maxItems=$.length)):(v.items=$,N&&(v.additionalItems=N));let{minimum:O,maximum:I}=t._zod.bag;typeof O=="number"&&(v.minItems=O),typeof I=="number"&&(v.maxItems=I);break}case "record":{let v=h;v.type="object",(this.target==="draft-7"||this.target==="draft-2020-12")&&(v.propertyNames=this.process(n.keyType,{...d,path:[...d.path,"propertyNames"]})),v.additionalProperties=this.process(n.valueType,{...d,path:[...d.path,"additionalProperties"]});break}case "map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case "set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case "enum":{let v=h,E=Lf(n.entries);E.every(R=>typeof R=="number")&&(v.type="number"),E.every(R=>typeof R=="string")&&(v.type="string"),v.enum=E;break}case "literal":{let v=h,E=[];for(let R of n.values)if(R===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof R=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");E.push(Number(R));}else E.push(R);if(E.length!==0)if(E.length===1){let R=E[0];v.type=R===null?"null":typeof R,this.target==="draft-4"||this.target==="openapi-3.0"?v.enum=[R]:v.const=R;}else E.every(R=>typeof R=="number")&&(v.type="number"),E.every(R=>typeof R=="string")&&(v.type="string"),E.every(R=>typeof R=="boolean")&&(v.type="string"),E.every(R=>R===null)&&(v.type="null"),v.enum=E;break}case "file":{let v=h,E={type:"string",format:"binary",contentEncoding:"binary"},{minimum:R,maximum:$,mime:N}=t._zod.bag;R!==void 0&&(E.minLength=R),$!==void 0&&(E.maxLength=$),N?N.length===1?(E.contentMediaType=N[0],Object.assign(v,E)):v.anyOf=N.map(O=>({...E,contentMediaType:O})):Object.assign(v,E);break}case "transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case "nullable":{let v=this.process(n.innerType,d);this.target==="openapi-3.0"?(a.ref=n.innerType,h.nullable=true):h.anyOf=[v,{type:"null"}];break}case "nonoptional":{this.process(n.innerType,d),a.ref=n.innerType;break}case "success":{let v=h;v.type="boolean";break}case "default":{this.process(n.innerType,d),a.ref=n.innerType,h.default=JSON.parse(JSON.stringify(n.defaultValue));break}case "prefault":{this.process(n.innerType,d),a.ref=n.innerType,this.io==="input"&&(h._prefault=JSON.parse(JSON.stringify(n.defaultValue)));break}case "catch":{this.process(n.innerType,d),a.ref=n.innerType;let v;try{v=n.catchValue(void 0);}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}h.default=v;break}case "nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case "template_literal":{let v=h,E=t._zod.pattern;if(!E)throw new Error("Pattern not found in template literal");v.type="string",v.pattern=E.source;break}case "pipe":{let v=this.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;this.process(v,d),a.ref=v;break}case "readonly":{this.process(n.innerType,d),a.ref=n.innerType,h.readOnly=true;break}case "promise":{this.process(n.innerType,d),a.ref=n.innerType;break}case "optional":{this.process(n.innerType,d),a.ref=n.innerType;break}case "lazy":{let v=t._zod.innerType;this.process(v,d),a.ref=v;break}case "custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}case "function":{if(this.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema");break}}}}let u=this.metadataRegistry.get(t);return u&&Object.assign(a.schema,u),this.io==="input"&&rr(t)&&(delete a.schema.examples,delete a.schema.default),this.io==="input"&&a.schema._prefault&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault,this.seen.get(t).schema}emit(t,r){let o={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},n=this.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=f=>{let d=this.target==="draft-2020-12"?"$defs":"definitions";if(o.external){let E=o.external.registry.get(f[0])?.id,R=o.external.uri??(N=>N);if(E)return {ref:R(E)};let $=f[1].defId??f[1].schema.id??`schema${this.counter++}`;return f[1].defId=$,{defId:$,ref:`${R("__shared")}#/${d}/${$}`}}if(f[1]===n)return {ref:"#"};let h=`#/${d}/`,v=f[1].schema.id??`__schema${this.counter++}`;return {defId:v,ref:h+v}},s=f=>{if(f[1].schema.$ref)return;let d=f[1],{ref:g,defId:h}=i(f);d.def={...d.schema},h&&(d.defId=h);let v=d.schema;for(let E in v)delete v[E];v.$ref=g;};if(o.cycles==="throw")for(let f of this.seen.entries()){let d=f[1];if(d.cycle)throw new Error(`Cycle detected: #/${d.cycle?.join("/")}/<root>
|
|
69
61
|
|
|
70
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let l of this.seen.entries()){let d=l[1];if(t===l[0]){s(l);continue}if(o.external){let h=o.external.registry.get(l[0])?.id;if(t!==l[0]&&h){s(l);continue}}if(this.metadataRegistry.get(l[0])?.id){s(l);continue}if(d.cycle){s(l);continue}if(d.count>1&&o.reused==="ref"){s(l);continue}}let a=(l,d)=>{let g=this.seen.get(l),h=g.def??g.schema,v={...h};if(g.ref===null)return;let E=g.ref;if(g.ref=null,E){a(E,d);let R=this.seen.get(E).schema;R.$ref&&(d.target==="draft-7"||d.target==="draft-4"||d.target==="openapi-3.0")?(h.allOf=h.allOf??[],h.allOf.push(R)):(Object.assign(h,R),Object.assign(h,v));}g.isParent||this.override({zodSchema:l,jsonSchema:h,path:g.path??[]});};for(let l of [...this.seen.entries()].reverse())a(l[0],{target:this.target});let c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?c.$schema="http://json-schema.org/draft-04/schema#":this.target==="openapi-3.0"||console.warn(`Invalid target: ${this.target}`),o.external?.uri){let l=o.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");c.$id=o.external.uri(l);}Object.assign(c,n.def);let u=o.external?.defs??{};for(let l of this.seen.entries()){let d=l[1];d.def&&d.defId&&(u[d.defId]=d.def);}o.external||Object.keys(u).length>0&&(this.target==="draft-2020-12"?c.$defs=u:c.definitions=u);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}};function Q6(e,t){if(e instanceof lf){let o=new cp(t),n={};for(let a of e._idmap.entries()){let[c,u]=a;o.process(u);}let i={},s={registry:e,uri:t?.uri,defs:n};for(let a of e._idmap.entries()){let[c,u]=a;i[c]=o.emit(u,{...t,external:s});}if(Object.keys(n).length>0){let a=o.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[a]:n};}return {schemas:i}}let r=new cp(t);return r.process(e),r.emit(e,t)}function rr(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return false;r.seen.add(e);let n=e._zod.def;switch(n.type){case "string":case "number":case "bigint":case "boolean":case "date":case "symbol":case "undefined":case "null":case "any":case "unknown":case "never":case "void":case "literal":case "enum":case "nan":case "file":case "template_literal":return false;case "array":return rr(n.element,r);case "object":{for(let i in n.shape)if(rr(n.shape[i],r))return true;return false}case "union":{for(let i of n.options)if(rr(i,r))return true;return false}case "intersection":return rr(n.left,r)||rr(n.right,r);case "tuple":{for(let i of n.items)if(rr(i,r))return true;return !!(n.rest&&rr(n.rest,r))}case "record":return rr(n.keyType,r)||rr(n.valueType,r);case "map":return rr(n.keyType,r)||rr(n.valueType,r);case "set":return rr(n.valueType,r);case "promise":case "optional":case "nonoptional":case "nullable":case "readonly":return rr(n.innerType,r);case "lazy":return rr(n.getter(),r);case "default":return rr(n.innerType,r);case "prefault":return rr(n.innerType,r);case "custom":return false;case "transform":return true;case "pipe":return rr(n.in,r)||rr(n.out,r);case "success":return false;case "catch":return false;case "function":return false;}throw new Error(`Unknown schema type: ${n.type}`)}var n$={};var py={};Ir(py,{ZodISODate:()=>fy,ZodISODateTime:()=>uy,ZodISODuration:()=>dy,ZodISOTime:()=>ly,date:()=>t2,datetime:()=>e2,duration:()=>n2,time:()=>r2});var uy=B("ZodISODateTime",(e,t)=>{mw.init(e,t),tt.init(e,t);});function e2(e){return h6(uy,e)}var fy=B("ZodISODate",(e,t)=>{hw.init(e,t),tt.init(e,t);});function t2(e){return g6(fy,e)}var ly=B("ZodISOTime",(e,t)=>{gw.init(e,t),tt.init(e,t);});function r2(e){return y6(ly,e)}var dy=B("ZodISODuration",(e,t)=>{yw.init(e,t),tt.init(e,t);});function n2(e){return b6(dy,e)}var i$=(e,t)=>{Ld.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Md(e,r)},flatten:{value:r=>Ud(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,rf,2);}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,rf,2);}},isEmpty:{get(){return e.issues.length===0}}});},KH=B("ZodError",i$),ln=B("ZodError",i$,{Parent:Error});var o2=sf(ln),i2=af(ln),s2=cf(ln),a2=uf(ln),c2=xg(ln),u2=vg(ln),f2=_g(ln),l2=wg(ln),d2=Eg(ln),p2=Sg(ln),m2=Ig(ln),h2=Ag(ln);var ke=B("ZodType",(e,t)=>(ve.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(ee.mergeDefs(t,{checks:[...t.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]})),e.clone=(r,o)=>Zr(e,r,o),e.brand=()=>e,e.register=((r,o)=>(r.add(e,o),e)),e.parse=(r,o)=>o2(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>s2(e,r,o),e.parseAsync=async(r,o)=>i2(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>a2(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>c2(e,r,o),e.decode=(r,o)=>u2(e,r,o),e.encodeAsync=async(r,o)=>f2(e,r,o),e.decodeAsync=async(r,o)=>l2(e,r,o),e.safeEncode=(r,o)=>d2(e,r,o),e.safeDecode=(r,o)=>p2(e,r,o),e.safeEncodeAsync=async(r,o)=>m2(e,r,o),e.safeDecodeAsync=async(r,o)=>h2(e,r,o),e.refine=(r,o)=>e.check(Z$(r,o)),e.superRefine=r=>e.check(G$(r)),e.overwrite=r=>e.check(Ai(r)),e.optional=()=>hy(e),e.nullable=()=>gy(e),e.nullish=()=>hy(gy(e)),e.nonoptional=r=>P$(e,r),e.array=()=>vy(e),e.or=r=>U2([e,r]),e.and=r=>x$(e,r),e.transform=r=>yy(e,j2(r)),e.default=r=>$$(e,r),e.prefault=r=>N$(e,r),e.catch=r=>z$(e,r),e.pipe=r=>yy(e,r),e.readonly=()=>M$(e),e.describe=r=>{let o=e.clone();return Fo.add(o,{description:r}),o},Object.defineProperty(e,"description",{get(){return Fo.get(e)?.description},configurable:true}),e.meta=(...r)=>{if(r.length===0)return Fo.get(e);let o=e.clone();return Fo.add(o,r[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),b2=B("_ZodString",(e,t)=>{Va.init(e,t),ke.init(e,t);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...o)=>e.check(Yd(...o)),e.includes=(...o)=>e.check(ep(...o)),e.startsWith=(...o)=>e.check(tp(...o)),e.endsWith=(...o)=>e.check(rp(...o)),e.min=(...o)=>e.check(Os(...o)),e.max=(...o)=>e.check(pf(...o)),e.length=(...o)=>e.check(mf(...o)),e.nonempty=(...o)=>e.check(Os(1,...o)),e.lowercase=o=>e.check(Xd(o)),e.uppercase=o=>e.check(Qd(o)),e.trim=()=>e.check(ip()),e.normalize=(...o)=>e.check(op(...o)),e.toLowerCase=()=>e.check(sp()),e.toUpperCase=()=>e.check(ap());}),fp=B("ZodString",(e,t)=>{Va.init(e,t),b2.init(e,t),e.email=r=>e.check(Hg(x2,r)),e.url=r=>e.check(Kd(by,r)),e.jwt=r=>e.check(cy(B2,r)),e.emoji=r=>e.check(Wg(v2,r)),e.guid=r=>e.check(Wd(my,r)),e.uuid=r=>e.check(Vg(Ri,r)),e.uuidv4=r=>e.check(Zg(Ri,r)),e.uuidv6=r=>e.check(Gg(Ri,r)),e.uuidv7=r=>e.check(qg(Ri,r)),e.nanoid=r=>e.check(Kg(_2,r)),e.guid=r=>e.check(Wd(my,r)),e.cuid=r=>e.check(Jg(w2,r)),e.cuid2=r=>e.check(Yg(E2,r)),e.ulid=r=>e.check(Xg(S2,r)),e.base64=r=>e.check(iy(O2,r)),e.base64url=r=>e.check(sy(N2,r)),e.xid=r=>e.check(Qg(I2,r)),e.ksuid=r=>e.check(ey(A2,r)),e.ipv4=r=>e.check(ty(k2,r)),e.ipv6=r=>e.check(ry(R2,r)),e.cidrv4=r=>e.check(ny(T2,r)),e.cidrv6=r=>e.check(oy($2,r)),e.e164=r=>e.check(ay(P2,r)),e.datetime=r=>e.check(e2(r)),e.date=r=>e.check(t2(r)),e.time=r=>e.check(r2(r)),e.duration=r=>e.check(n2(r));});function g2(e){return d6(fp,e)}var tt=B("ZodStringFormat",(e,t)=>{Je.init(e,t),b2.init(e,t);}),x2=B("ZodEmail",(e,t)=>{iw.init(e,t),tt.init(e,t);});function YH(e){return Hg(x2,e)}var my=B("ZodGUID",(e,t)=>{nw.init(e,t),tt.init(e,t);});function XH(e){return Wd(my,e)}var Ri=B("ZodUUID",(e,t)=>{ow.init(e,t),tt.init(e,t);});function QH(e){return Vg(Ri,e)}function eV(e){return Zg(Ri,e)}function tV(e){return Gg(Ri,e)}function rV(e){return qg(Ri,e)}var by=B("ZodURL",(e,t)=>{sw.init(e,t),tt.init(e,t);});function nV(e){return Kd(by,e)}function oV(e){return Kd(by,{protocol:/^https?$/,hostname:Zn.domain,...ee.normalizeParams(e)})}var v2=B("ZodEmoji",(e,t)=>{aw.init(e,t),tt.init(e,t);});function iV(e){return Wg(v2,e)}var _2=B("ZodNanoID",(e,t)=>{cw.init(e,t),tt.init(e,t);});function sV(e){return Kg(_2,e)}var w2=B("ZodCUID",(e,t)=>{uw.init(e,t),tt.init(e,t);});function aV(e){return Jg(w2,e)}var E2=B("ZodCUID2",(e,t)=>{fw.init(e,t),tt.init(e,t);});function cV(e){return Yg(E2,e)}var S2=B("ZodULID",(e,t)=>{lw.init(e,t),tt.init(e,t);});function uV(e){return Xg(S2,e)}var I2=B("ZodXID",(e,t)=>{dw.init(e,t),tt.init(e,t);});function fV(e){return Qg(I2,e)}var A2=B("ZodKSUID",(e,t)=>{pw.init(e,t),tt.init(e,t);});function lV(e){return ey(A2,e)}var k2=B("ZodIPv4",(e,t)=>{bw.init(e,t),tt.init(e,t);});function dV(e){return ty(k2,e)}var R2=B("ZodIPv6",(e,t)=>{xw.init(e,t),tt.init(e,t);});function pV(e){return ry(R2,e)}var T2=B("ZodCIDRv4",(e,t)=>{vw.init(e,t),tt.init(e,t);});function mV(e){return ny(T2,e)}var $2=B("ZodCIDRv6",(e,t)=>{_w.init(e,t),tt.init(e,t);});function hV(e){return oy($2,e)}var O2=B("ZodBase64",(e,t)=>{Ew.init(e,t),tt.init(e,t);});function gV(e){return iy(O2,e)}var N2=B("ZodBase64URL",(e,t)=>{Sw.init(e,t),tt.init(e,t);});function yV(e){return sy(N2,e)}var P2=B("ZodE164",(e,t)=>{Iw.init(e,t),tt.init(e,t);});function bV(e){return ay(P2,e)}var B2=B("ZodJWT",(e,t)=>{Aw.init(e,t),tt.init(e,t);});function xV(e){return cy(B2,e)}var lp=B("ZodCustomStringFormat",(e,t)=>{kw.init(e,t),tt.init(e,t);});function vV(e,t,r={}){return hf(lp,e,t,r)}function _V(e){return hf(lp,"hostname",Zn.hostname,e)}function wV(e){return hf(lp,"hex",Zn.hex,e)}function EV(e,t){let r=t?.enc??"hex",o=`${e}_${r}`,n=Zn[o];if(!n)throw new Error(`Unrecognized hash format: ${o}`);return hf(lp,o,n,t)}var dp=B("ZodNumber",(e,t)=>{Cg.init(e,t),ke.init(e,t),e.gt=(o,n)=>e.check(Ii(o,n)),e.gte=(o,n)=>e.check(fn(o,n)),e.min=(o,n)=>e.check(fn(o,n)),e.lt=(o,n)=>e.check(Si(o,n)),e.lte=(o,n)=>e.check(Gn(o,n)),e.max=(o,n)=>e.check(Gn(o,n)),e.int=o=>e.check(y2(o)),e.safe=o=>e.check(y2(o)),e.positive=o=>e.check(Ii(0,o)),e.nonnegative=o=>e.check(fn(0,o)),e.negative=o=>e.check(Si(0,o)),e.nonpositive=o=>e.check(Gn(0,o)),e.multipleOf=(o,n)=>e.check(Za(o,n)),e.step=(o,n)=>e.check(Za(o,n)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=true,e.format=r.format??null;});function s$(e){return x6(dp,e)}var yf=B("ZodNumberFormat",(e,t)=>{Rw.init(e,t),dp.init(e,t);});function y2(e){return _6(yf,e)}function SV(e){return w6(yf,e)}function IV(e){return E6(yf,e)}function AV(e){return S6(yf,e)}function kV(e){return I6(yf,e)}var pp=B("ZodBoolean",(e,t)=>{Hd.init(e,t),ke.init(e,t);});function a$(e){return A6(pp,e)}var mp=B("ZodBigInt",(e,t)=>{zg.init(e,t),ke.init(e,t),e.gte=(o,n)=>e.check(fn(o,n)),e.min=(o,n)=>e.check(fn(o,n)),e.gt=(o,n)=>e.check(Ii(o,n)),e.gte=(o,n)=>e.check(fn(o,n)),e.min=(o,n)=>e.check(fn(o,n)),e.lt=(o,n)=>e.check(Si(o,n)),e.lte=(o,n)=>e.check(Gn(o,n)),e.max=(o,n)=>e.check(Gn(o,n)),e.positive=o=>e.check(Ii(BigInt(0),o)),e.negative=o=>e.check(Si(BigInt(0),o)),e.nonpositive=o=>e.check(Gn(BigInt(0),o)),e.nonnegative=o=>e.check(fn(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(Za(o,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null;});function RV(e){return R6(mp,e)}var C2=B("ZodBigIntFormat",(e,t)=>{Tw.init(e,t),mp.init(e,t);});function TV(e){return $6(C2,e)}function $V(e){return O6(C2,e)}var c$=B("ZodSymbol",(e,t)=>{$w.init(e,t),ke.init(e,t);});function OV(e){return N6(c$,e)}var u$=B("ZodUndefined",(e,t)=>{Ow.init(e,t),ke.init(e,t);});function NV(e){return P6(u$,e)}var f$=B("ZodNull",(e,t)=>{Nw.init(e,t),ke.init(e,t);});function l$(e){return B6(f$,e)}var d$=B("ZodAny",(e,t)=>{Pw.init(e,t),ke.init(e,t);});function PV(){return C6(d$)}var p$=B("ZodUnknown",(e,t)=>{Bw.init(e,t),ke.init(e,t);});function gf(){return z6(p$)}var m$=B("ZodNever",(e,t)=>{Cw.init(e,t),ke.init(e,t);});function z2(e){return L6(m$,e)}var h$=B("ZodVoid",(e,t)=>{zw.init(e,t),ke.init(e,t);});function BV(e){return U6(h$,e)}var xy=B("ZodDate",(e,t)=>{Lw.init(e,t),ke.init(e,t),e.min=(o,n)=>e.check(fn(o,n)),e.max=(o,n)=>e.check(Gn(o,n));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null;});function CV(e){return M6(xy,e)}var g$=B("ZodArray",(e,t)=>{Uw.init(e,t),ke.init(e,t),e.element=t.element,e.min=(r,o)=>e.check(Os(r,o)),e.nonempty=r=>e.check(Os(1,r)),e.max=(r,o)=>e.check(pf(r,o)),e.length=(r,o)=>e.check(mf(r,o)),e.unwrap=()=>e.element;});function vy(e,t){return q6(g$,e,t)}function zV(e){let t=e._zod.def.shape;return D2(Object.keys(t))}var _y=B("ZodObject",(e,t)=>{Mw.init(e,t),ke.init(e,t),ee.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>D2(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:gf()}),e.loose=()=>e.clone({...e._zod.def,catchall:gf()}),e.strict=()=>e.clone({...e._zod.def,catchall:z2()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>ee.extend(e,r),e.safeExtend=r=>ee.safeExtend(e,r),e.merge=r=>ee.merge(e,r),e.pick=r=>ee.pick(e,r),e.omit=r=>ee.omit(e,r),e.partial=(...r)=>ee.partial(F2,e,r[0]),e.required=(...r)=>ee.required(H2,e,r[0]);});function LV(e,t){let r={type:"object",shape:e??{},...ee.normalizeParams(t)};return new _y(r)}function UV(e,t){return new _y({type:"object",shape:e,catchall:z2(),...ee.normalizeParams(t)})}function MV(e,t){return new _y({type:"object",shape:e,catchall:gf(),...ee.normalizeParams(t)})}var L2=B("ZodUnion",(e,t)=>{Lg.init(e,t),ke.init(e,t),e.options=t.options;});function U2(e,t){return new L2({type:"union",options:e,...ee.normalizeParams(t)})}var y$=B("ZodDiscriminatedUnion",(e,t)=>{L2.init(e,t),Dw.init(e,t);});function DV(e,t,r){return new y$({type:"union",options:t,discriminator:e,...ee.normalizeParams(r)})}var b$=B("ZodIntersection",(e,t)=>{jw.init(e,t),ke.init(e,t);});function x$(e,t){return new b$({type:"intersection",left:e,right:t})}var v$=B("ZodTuple",(e,t)=>{Ug.init(e,t),ke.init(e,t),e.rest=r=>e.clone({...e._zod.def,rest:r});});function _$(e,t,r){let o=t instanceof ve,n=o?r:t,i=o?t:null;return new v$({type:"tuple",items:e,rest:i,...ee.normalizeParams(n)})}var M2=B("ZodRecord",(e,t)=>{Fw.init(e,t),ke.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType;});function w$(e,t,r){return new M2({type:"record",keyType:e,valueType:t,...ee.normalizeParams(r)})}function jV(e,t,r){let o=Zr(e);return o._zod.values=void 0,new M2({type:"record",keyType:o,valueType:t,...ee.normalizeParams(r)})}var E$=B("ZodMap",(e,t)=>{Hw.init(e,t),ke.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType;});function FV(e,t,r){return new E$({type:"map",keyType:e,valueType:t,...ee.normalizeParams(r)})}var S$=B("ZodSet",(e,t)=>{Vw.init(e,t),ke.init(e,t),e.min=(...r)=>e.check(Ga(...r)),e.nonempty=r=>e.check(Ga(1,r)),e.max=(...r)=>e.check(df(...r)),e.size=(...r)=>e.check(Jd(...r));});function HV(e,t){return new S$({type:"set",valueType:e,...ee.normalizeParams(t)})}var up=B("ZodEnum",(e,t)=>{Zw.init(e,t),ke.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{let i={};for(let s of o)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new up({...t,checks:[],...ee.normalizeParams(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let s of o)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new up({...t,checks:[],...ee.normalizeParams(n),entries:i})};});function D2(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new up({type:"enum",entries:r,...ee.normalizeParams(t)})}function VV(e,t){return new up({type:"enum",entries:e,...ee.normalizeParams(t)})}var I$=B("ZodLiteral",(e,t)=>{Gw.init(e,t),ke.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}});});function ZV(e,t){return new I$({type:"literal",values:Array.isArray(e)?e:[e],...ee.normalizeParams(t)})}var A$=B("ZodFile",(e,t)=>{qw.init(e,t),ke.init(e,t),e.min=(r,o)=>e.check(Ga(r,o)),e.max=(r,o)=>e.check(df(r,o)),e.mime=(r,o)=>e.check(np(Array.isArray(r)?r:[r],o));});function GV(e){return W6(A$,e)}var k$=B("ZodTransform",(e,t)=>{Ww.init(e,t),ke.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Is(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(ee.issue(i,r.value,t));else {let s=i;s.fatal&&(s.continue=false),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(ee.issue(s));}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r)):(r.value=n,r)};});function j2(e){return new k$({type:"transform",transform:e})}var F2=B("ZodOptional",(e,t)=>{Kw.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function hy(e){return new F2({type:"optional",innerType:e})}var R$=B("ZodNullable",(e,t)=>{Jw.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function gy(e){return new R$({type:"nullable",innerType:e})}function qV(e){return hy(gy(e))}var T$=B("ZodDefault",(e,t)=>{Yw.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap;});function $$(e,t){return new T$({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():ee.shallowClone(t)}})}var O$=B("ZodPrefault",(e,t)=>{Xw.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function N$(e,t){return new O$({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():ee.shallowClone(t)}})}var H2=B("ZodNonOptional",(e,t)=>{Qw.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function P$(e,t){return new H2({type:"nonoptional",innerType:e,...ee.normalizeParams(t)})}var B$=B("ZodSuccess",(e,t)=>{e6.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function WV(e){return new B$({type:"success",innerType:e})}var C$=B("ZodCatch",(e,t)=>{t6.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap;});function z$(e,t){return new C$({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var L$=B("ZodNaN",(e,t)=>{r6.init(e,t),ke.init(e,t);});function KV(e){return j6(L$,e)}var V2=B("ZodPipe",(e,t)=>{n6.init(e,t),ke.init(e,t),e.in=t.in,e.out=t.out;});function yy(e,t){return new V2({type:"pipe",in:e,out:t})}var Z2=B("ZodCodec",(e,t)=>{V2.init(e,t),Vd.init(e,t);});function JV(e,t,r){return new Z2({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}var U$=B("ZodReadonly",(e,t)=>{o6.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function M$(e){return new U$({type:"readonly",innerType:e})}var D$=B("ZodTemplateLiteral",(e,t)=>{i6.init(e,t),ke.init(e,t);});function YV(e,t){return new D$({type:"template_literal",parts:e,...ee.normalizeParams(t)})}var j$=B("ZodLazy",(e,t)=>{c6.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.getter();});function F$(e){return new j$({type:"lazy",getter:e})}var H$=B("ZodPromise",(e,t)=>{a6.init(e,t),ke.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function XV(e){return new H$({type:"promise",innerType:e})}var V$=B("ZodFunction",(e,t)=>{s6.init(e,t),ke.init(e,t);});function QV(e){return new V$({type:"function",input:Array.isArray(e?.input)?_$(e?.input):e?.input??vy(gf()),output:e?.output??gf()})}var wy=B("ZodCustom",(e,t)=>{u6.init(e,t),ke.init(e,t);});function eZ(e){let t=new ot({check:"custom"});return t._zod.check=e,t}function tZ(e,t){return K6(wy,e??(()=>true),t)}function Z$(e,t={}){return J6(wy,e,t)}function G$(e){return Y6(e)}function rZ(e,t={error:`Input not instance of ${e.name}`}){let r=new wy({type:"custom",check:"custom",fn:o=>o instanceof e,abort:true,...ee.normalizeParams(t)});return r._zod.bag.Class=e,r}var nZ=(...e)=>X6({Codec:Z2,Boolean:pp,String:fp},...e);function oZ(e){let t=F$(()=>U2([g2(e),s$(),a$(),l$(),vy(t),w$(g2(),t)]));return t}function iZ(e,t){return yy(j2(e),t)}var sZ={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function aZ(e){wt({customError:e});}function cZ(){return wt().customError}var G2;G2||(G2={});var q2={};Ir(q2,{bigint:()=>dZ,boolean:()=>lZ,date:()=>pZ,number:()=>fZ,string:()=>uZ});function uZ(e){return p6(fp,e)}function fZ(e){return v6(dp,e)}function lZ(e){return k6(pp,e)}function dZ(e){return T6(mp,e)}function pZ(e){return D6(xy,e)}wt(Mg());var mZ="https://api.adland.space",hZ="http://localhost:3069";function gZ(e,t){return e?e.replace(/\/$/,""):t==="development"?hZ:mZ}var q$=typeof process<"u"&&process.env?process.env:{},W2=gZ(q$.NEXT_PUBLIC_ADLAND_API_URL,q$.NODE_ENV);function yZ(e,t){return Object.assign(e,{choices:t})}function gp(e){return {...e,process:t=>bZ(e,t),safeProcess:t=>xZ(e,t)}}async function bZ(e,t){console.log("processAd:input",t);let r=e.data.parse(t);console.log("processAd:data",r),e.verify&&await e.verify(t);let o=e.getMetadata&&e.metadata?await e.getMetadata(r):void 0;return {data:r,metadata:o,type:e.type}}async function xZ(e,t){let r=e.data.safeParse(t);if(!r.success)return {success:false,error:r.error};let o=r.data;if(e.verify)try{await e.verify(o);}catch(i){return {success:false,error:i instanceof Error?i.message:"Verification failed"}}let n=e.getMetadata&&e.metadata?await e.getMetadata(o):void 0;return {success:true,data:o,metadata:n}}var Ti=`${W2}/adland`;async function Ey(e,t){return fetch(e,{method:"POST",body:JSON.stringify(t)}).then(r=>r.json())}async function hp(e){return fetch(e).then(t=>t.json())}var $i={verify:{cast({hash:e}){return Ey(`${Ti}/verify/cast`,{hash:e})},miniapp({domain:e}){return Ey(`${Ti}/verify/miniapp`,{domain:e})},profile({fid:e}){return Ey(`${Ti}/verify/profile`,{fid:e})},token({address:e,chainId:t}){return Ey(`${Ti}/verify/token`,{address:e,chainId:t})}},metadata:{cast({hash:e}){return hp(`${Ti}/metadata/cast?hash=${encodeURIComponent(e)}`)},miniapp({url:e}){return hp(`${Ti}/metadata/miniapp?url=${encodeURIComponent(e)}`)},link({url:e}){return hp(`${Ti}/metadata/link?url=${encodeURIComponent(e)}`)},profile({fid:e}){return hp(`${Ti}/metadata/profile?fid=${encodeURIComponent(e)}`)},token({address:e,chainId:t}){return hp(`${Ti}/metadata/token?address=${encodeURIComponent(e)}&chainId=${t}`)}}};gp({type:"cast",data:Ee.object({hash:Ee.string().nonempty("Hash is required")}),metadata:Ee.object({username:Ee.string().optional(),pfpUrl:Ee.string().optional(),text:Ee.string(),timestamp:Ee.string()}),async verify({hash:e}){if(!/^0x[0-9a-fA-F]{40}$/.test(e))throw new Error("Invalid Farcaster cast hash");if(!(await $i.verify.cast({hash:e})).verified)throw new Error("Cast hash verification failed")},async getMetadata({hash:e}){let{cast:t}=await $i.metadata.cast({hash:e});return {username:t.author.username,pfpUrl:t.author.pfp_url,text:t.text,timestamp:t.timestamp}}});gp({type:"link",data:Ee.object({url:Ee.string().nonempty("URL is required")}),metadata:Ee.object({title:Ee.string().optional(),description:Ee.string().optional(),image:Ee.string().optional(),icon:Ee.string().optional()}),async verify({url:e}){if(!e.startsWith("http"))throw new Error("Invalid link")},async getMetadata({url:e}){let t=await $i.metadata.link({url:e});return {title:t.title,description:t.description,image:t.image,icon:t.icon}}});gp({type:"miniapp",data:Ee.object({url:Ee.string().nonempty("URL is required")}),metadata:Ee.object({icon:Ee.string().optional(),title:Ee.string().optional(),description:Ee.string().optional(),imageUrl:Ee.string().optional()}),async verify({url:e}){let t="Miniapp domain verification failed",r=e.split("//")[1];if(console.log("verifyMiniapp:domain",r),!r)throw new Error(t);let o=await $i.verify.miniapp({domain:r});if(console.log("verifyMiniapp:res",o),!o.verified)throw new Error(t)},async getMetadata({url:e}){let t=await $i.metadata.miniapp({url:e});return console.log("getMetadata:res",t),{icon:t.icon,title:t.title,description:t.description,imageUrl:t.imageUrl}}});gp({type:"farcasterProfile",data:Ee.object({fid:Ee.string().nonempty("Fid is required")}),metadata:Ee.object({pfpUrl:Ee.string().optional(),bio:Ee.string().optional(),username:Ee.string().optional(),displayName:Ee.string().optional(),followers:Ee.number().optional(),following:Ee.number().optional(),pro:Ee.boolean().optional()}),async verify({fid:e}){if(!(await $i.verify.profile({fid:e})).verified)throw new Error("Farcaster profile verification failed")},async getMetadata({fid:e}){let t=await $i.metadata.profile({fid:e});return {pfpUrl:t.pfpUrl,bio:t.bio,username:t.username,displayName:t.displayName,followers:t.followers,following:t.following,pro:t.pro}}});gp({type:"token",data:Ee.object({address:Ee.string().nonempty("Address is required"),chainId:yZ(Ee.number().int().positive("Chain ID is required").refine(e=>[8453].includes(e),"Invalid chain ID"),[{label:"Base (8453)",value:8453}])}),metadata:Ee.object({name:Ee.string().optional(),symbol:Ee.string().optional(),decimals:Ee.number().optional(),logoURI:Ee.string().optional()}),async verify({address:e,chainId:t}){if(!(await $i.verify.token({address:e,chainId:t})).verified)throw new Error("Token verification failed")},async getMetadata({address:e,chainId:t}){let r=await $i.metadata.token({address:e,chainId:t});return {name:r.name,symbol:r.symbol,decimals:r.decimals,logoURI:r.logoURI}}});var vZ=ts(["function module() view returns (address)"]),_Z=ts(["function tokenURI(address slot) view returns (string)"]),wZ="0x0000000000000000000000000000000000000000",EZ="https://ipfs-gateway.econome.studio";function SZ(e,t){return `${(t??EZ).replace(/\/$/,"")}/ipfs/${e}`}var IZ={[kd.id]:kd,[Td.id]:Td};function K$(e,t,r=IZ){let o=r[e];if(!o)throw new Error(`Unsupported chain: ${e}`);return Gv({chain:o,transport:qv(t)})}function AZ(e){return e.startsWith("ipfs://")?e.slice(7):e.startsWith("Qm")||e.startsWith("bafy")?e:null}var J$=async(e,t)=>{if(!e)throw new Error("NO_AD");let r=AZ(e),o=r?SZ(r,t):e,n=await fetch(o,{method:"GET",headers:{Accept:"application/json"}});if(!n.ok)throw n.status===404?new Error("NO_AD"):new Error("ERROR");let i=await n.json();if(i.error)throw new Error(i.error);return {data:i,cid:r}},Y$=async(e,t)=>{let r;try{r=await e.readContract({address:t,abi:vZ,functionName:"module"});}catch(o){throw new Error(`[@adland/react] No slot found at ${t} on chain ${e.chain?.id??"unknown"}. Check the \`chainId\` prop, and any \`rpcUrl\` override \u2014 a custom RPC queries whatever chain it serves, whatever \`chainId\` says.`,{cause:o})}return !r||r===wZ?"":e.readContract({address:r,abi:_Z,functionName:"tokenURI",args:[t]})},kZ=["image","icon","pfpUrl","logoURI","imageUrl"],RZ=["title","displayName","username","name","symbol"],TZ=["description","bio","text","name"];function K2(e){return {...e.data,...e.metadata??{}}}function X$(e){if(!e)return null;let t=K2(e);for(let r of kZ){let o=t[r];if(typeof o=="string"&&o)return o}return null}function J2(e){if(!e)return null;let t=K2(e);for(let r of RZ){let o=t[r];if(typeof o=="string"&&o)return o}return null}function Q$(e){if(!e)return null;let t=K2(e),r=J2(e);for(let o of TZ){let n=t[o];if(typeof n=="string"&&n&&n!==r)return n}return null}function eO(e){return e?e.type:null}var qa=new Set,W$=1e3;function $Z(e){return e==="view"?"view":"click"}function Y2(e){return e.endpoint??W2}function tO(e,t,r){t.onEvent?.({type:e,slot:t.slot,chainId:t.chainId,cid:t.cid??null,placement:t.placement,empty:t.empty??false,auth:t.auth??"none",...r===void 0?{}:{verified:r}});}async function rO(e,t){let r=t.auth??"none",o=null;r==="farcaster"&&t.getAuthToken&&(o=await t.getAuthToken());try{fetch(`${Y2(t)}/track`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:$Z(e),slot:t.slot,cid:t.cid??null,domain:window.location.hostname,auth:r,...o?{token:o}:{}}),keepalive:!0}).catch(()=>{});}catch{}}async function nO(e,t){typeof window>"u"||(tO(e,t),(t.consent??"granted")==="granted"&&await rO(e,t));}async function OZ(e,t,r){try{return (await fetch(`${Y2(e)}/v1/event`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({nonce:t,type:"view",slot:e.slot,cid:e.cid??null,placement:e.placement,viewable_ms:r,chainId:e.chainId}),keepalive:!0})).ok}catch{return false}}async function NZ(e,t,r){let o=false;return (e.consent??"granted")==="granted"&&(o=t?await OZ(e,t,r):false,o||await rO("view",e)),tO("view",e,o),o}function oO(e,t){if(!e||typeof window>"u")return;let r=`impression:${t.slot}:${window.location.href}`;if(qa.has(r))return;let o=new IntersectionObserver(n=>{for(let i of n)i.isIntersecting&&!qa.has(r)&&(qa.add(r),nO("view",t),o.disconnect());},{threshold:.5});return o.observe(e),()=>o.disconnect()}function iO(e,t){if(!e||typeof window>"u")return;let r=`impression:${t.slot}:${window.location.href}`;if(qa.has(r))return;let o=fetch(`${Y2(t)}/v1/serve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({slot:t.slot})}).then(s=>s.ok?s.json():null).then(s=>s?.nonce??null).catch(()=>null),n,i=new IntersectionObserver(s=>{for(let a of s)if(a.isIntersecting){if(qa.has(r)||n)continue;n=setTimeout(async()=>{if(qa.has(r))return;qa.add(r),i.disconnect();let c=await o;await NZ(t,c,W$);},W$);}else n&&(clearTimeout(n),n=void 0);},{threshold:.5});return i.observe(e),()=>{i.disconnect(),n&&clearTimeout(n);}}function X2(e,t){return nO(e,t)}var PZ={link:"Link",cast:"Cast",miniapp:"Mini App",token:"Token",farcasterProfile:"Profile"};function Q2(e){return e.replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t])}function eE(e){return e.replace(/"/g,""").replace(/</g,"<")}var tE=`
|
|
62
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let f of this.seen.entries()){let d=f[1];if(t===f[0]){s(f);continue}if(o.external){let h=o.external.registry.get(f[0])?.id;if(t!==f[0]&&h){s(f);continue}}if(this.metadataRegistry.get(f[0])?.id){s(f);continue}if(d.cycle){s(f);continue}if(d.count>1&&o.reused==="ref"){s(f);continue}}let a=(f,d)=>{let g=this.seen.get(f),h=g.def??g.schema,v={...h};if(g.ref===null)return;let E=g.ref;if(g.ref=null,E){a(E,d);let R=this.seen.get(E).schema;R.$ref&&(d.target==="draft-7"||d.target==="draft-4"||d.target==="openapi-3.0")?(h.allOf=h.allOf??[],h.allOf.push(R)):(Object.assign(h,R),Object.assign(h,v));}g.isParent||this.override({zodSchema:f,jsonSchema:h,path:g.path??[]});};for(let f of [...this.seen.entries()].reverse())a(f[0],{target:this.target});let c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?c.$schema="http://json-schema.org/draft-04/schema#":this.target==="openapi-3.0"||console.warn(`Invalid target: ${this.target}`),o.external?.uri){let f=o.external.registry.get(t)?.id;if(!f)throw new Error("Schema is missing an `id` property");c.$id=o.external.uri(f);}Object.assign(c,n.def);let u=o.external?.defs??{};for(let f of this.seen.entries()){let d=f[1];d.def&&d.defId&&(u[d.defId]=d.def);}o.external||Object.keys(u).length>0&&(this.target==="draft-2020-12"?c.$defs=u:c.definitions=u);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}};function lv(e,t){if(e instanceof pc){let o=new pl(t),n={};for(let a of e._idmap.entries()){let[c,u]=a;o.process(u);}let i={},s={registry:e,uri:t?.uri,defs:n};for(let a of e._idmap.entries()){let[c,u]=a;i[c]=o.emit(u,{...t,external:s});}if(Object.keys(n).length>0){let a=o.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[a]:n};}return {schemas:i}}let r=new pl(t);return r.process(e),r.emit(e,t)}function rr(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return false;r.seen.add(e);let n=e._zod.def;switch(n.type){case "string":case "number":case "bigint":case "boolean":case "date":case "symbol":case "undefined":case "null":case "any":case "unknown":case "never":case "void":case "literal":case "enum":case "nan":case "file":case "template_literal":return false;case "array":return rr(n.element,r);case "object":{for(let i in n.shape)if(rr(n.shape[i],r))return true;return false}case "union":{for(let i of n.options)if(rr(i,r))return true;return false}case "intersection":return rr(n.left,r)||rr(n.right,r);case "tuple":{for(let i of n.items)if(rr(i,r))return true;return !!(n.rest&&rr(n.rest,r))}case "record":return rr(n.keyType,r)||rr(n.valueType,r);case "map":return rr(n.keyType,r)||rr(n.valueType,r);case "set":return rr(n.valueType,r);case "promise":case "optional":case "nonoptional":case "nullable":case "readonly":return rr(n.innerType,r);case "lazy":return rr(n.getter(),r);case "default":return rr(n.innerType,r);case "prefault":return rr(n.innerType,r);case "custom":return false;case "transform":return true;case "pipe":return rr(n.in,r)||rr(n.out,r);case "success":return false;case "catch":return false;case "function":return false;}throw new Error(`Unknown schema type: ${n.type}`)}var c5={};var Cm={};Er(Cm,{ZodISODate:()=>Nm,ZodISODateTime:()=>Om,ZodISODuration:()=>Bm,ZodISOTime:()=>Pm,date:()=>pv,datetime:()=>dv,duration:()=>hv,time:()=>mv});var Om=B("ZodISODateTime",(e,t)=>{Ax.init(e,t),et.init(e,t);});function dv(e){return k1(Om,e)}var Nm=B("ZodISODate",(e,t)=>{kx.init(e,t),et.init(e,t);});function pv(e){return R1(Nm,e)}var Pm=B("ZodISOTime",(e,t)=>{Rx.init(e,t),et.init(e,t);});function mv(e){return T1(Pm,e)}var Bm=B("ZodISODuration",(e,t)=>{Tx.init(e,t),et.init(e,t);});function hv(e){return $1(Bm,e)}var f5=(e,t)=>{Ff.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Vf(e,r)},flatten:{value:r=>Hf(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,ic,2);}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,ic,2);}},isEmpty:{get(){return e.issues.length===0}}});},T3=B("ZodError",f5),Yr=B("ZodError",f5,{Parent:Error});var gv=cc(Yr),yv=uc(Yr),bv=fc(Yr),xv=lc(Yr),vv=jp(Yr),wv=Fp(Yr),_v=Hp(Yr),Ev=Vp(Yr),Sv=Zp(Yr),Iv=Gp(Yr),Av=qp(Yr),kv=Wp(Yr);var Ae=B("ZodType",(e,t)=>(we.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(te.mergeDefs(t,{checks:[...t.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]})),e.clone=(r,o)=>Mr(e,r,o),e.brand=()=>e,e.register=((r,o)=>(r.add(e,o),e)),e.parse=(r,o)=>gv(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>bv(e,r,o),e.parseAsync=async(r,o)=>yv(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>xv(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>vv(e,r,o),e.decode=(r,o)=>wv(e,r,o),e.encodeAsync=async(r,o)=>_v(e,r,o),e.decodeAsync=async(r,o)=>Ev(e,r,o),e.safeEncode=(r,o)=>Sv(e,r,o),e.safeDecode=(r,o)=>Iv(e,r,o),e.safeEncodeAsync=async(r,o)=>Av(e,r,o),e.safeDecodeAsync=async(r,o)=>kv(e,r,o),e.refine=(r,o)=>e.check(J5(r,o)),e.superRefine=r=>e.check(Y5(r)),e.overwrite=r=>e.check(Xo(r)),e.optional=()=>Lm(e),e.nullable=()=>Um(e),e.nullish=()=>Lm(Um(e)),e.nonoptional=r=>U5(e,r),e.array=()=>Fm(e),e.or=r=>Jv([e,r]),e.and=r=>S5(e,r),e.transform=r=>Mm(e,Qv(r)),e.default=r=>C5(e,r),e.prefault=r=>L5(e,r),e.catch=r=>j5(e,r),e.pipe=r=>Mm(e,r),e.readonly=()=>V5(e),e.describe=r=>{let o=e.clone();return vo.add(o,{description:r}),o},Object.defineProperty(e,"description",{get(){return vo.get(e)?.description},configurable:true}),e.meta=(...r)=>{if(r.length===0)return vo.get(e);let o=e.clone();return vo.add(o,r[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),$v=B("_ZodString",(e,t)=>{Fs.init(e,t),Ae.init(e,t);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...o)=>e.check(rl(...o)),e.includes=(...o)=>e.check(il(...o)),e.startsWith=(...o)=>e.check(sl(...o)),e.endsWith=(...o)=>e.check(al(...o)),e.min=(...o)=>e.check(Vi(...o)),e.max=(...o)=>e.check(hc(...o)),e.length=(...o)=>e.check(gc(...o)),e.nonempty=(...o)=>e.check(Vi(1,...o)),e.lowercase=o=>e.check(nl(o)),e.uppercase=o=>e.check(ol(o)),e.trim=()=>e.check(fl()),e.normalize=(...o)=>e.check(ul(...o)),e.toLowerCase=()=>e.check(ll()),e.toUpperCase=()=>e.check(dl());}),hl=B("ZodString",(e,t)=>{Fs.init(e,t),$v.init(e,t),e.email=r=>e.check(lm(Ov,r)),e.url=r=>e.check(el(Dm,r)),e.jwt=r=>e.check($m(Gv,r)),e.emoji=r=>e.check(gm(Nv,r)),e.guid=r=>e.check(Qf(zm,r)),e.uuid=r=>e.check(dm(ei,r)),e.uuidv4=r=>e.check(pm(ei,r)),e.uuidv6=r=>e.check(mm(ei,r)),e.uuidv7=r=>e.check(hm(ei,r)),e.nanoid=r=>e.check(ym(Pv,r)),e.guid=r=>e.check(Qf(zm,r)),e.cuid=r=>e.check(bm(Bv,r)),e.cuid2=r=>e.check(xm(Cv,r)),e.ulid=r=>e.check(vm(zv,r)),e.base64=r=>e.check(km(Hv,r)),e.base64url=r=>e.check(Rm(Vv,r)),e.xid=r=>e.check(wm(Lv,r)),e.ksuid=r=>e.check(_m(Uv,r)),e.ipv4=r=>e.check(Em(Mv,r)),e.ipv6=r=>e.check(Sm(Dv,r)),e.cidrv4=r=>e.check(Im(jv,r)),e.cidrv6=r=>e.check(Am(Fv,r)),e.e164=r=>e.check(Tm(Zv,r)),e.datetime=r=>e.check(dv(r)),e.date=r=>e.check(pv(r)),e.time=r=>e.check(mv(r)),e.duration=r=>e.check(hv(r));});function Rv(e){return S1(hl,e)}var et=B("ZodStringFormat",(e,t)=>{Ye.init(e,t),$v.init(e,t);}),Ov=B("ZodEmail",(e,t)=>{yx.init(e,t),et.init(e,t);});function O3(e){return lm(Ov,e)}var zm=B("ZodGUID",(e,t)=>{hx.init(e,t),et.init(e,t);});function N3(e){return Qf(zm,e)}var ei=B("ZodUUID",(e,t)=>{gx.init(e,t),et.init(e,t);});function P3(e){return dm(ei,e)}function B3(e){return pm(ei,e)}function C3(e){return mm(ei,e)}function z3(e){return hm(ei,e)}var Dm=B("ZodURL",(e,t)=>{bx.init(e,t),et.init(e,t);});function L3(e){return el(Dm,e)}function U3(e){return el(Dm,{protocol:/^https?$/,hostname:An.domain,...te.normalizeParams(e)})}var Nv=B("ZodEmoji",(e,t)=>{xx.init(e,t),et.init(e,t);});function M3(e){return gm(Nv,e)}var Pv=B("ZodNanoID",(e,t)=>{vx.init(e,t),et.init(e,t);});function D3(e){return ym(Pv,e)}var Bv=B("ZodCUID",(e,t)=>{wx.init(e,t),et.init(e,t);});function j3(e){return bm(Bv,e)}var Cv=B("ZodCUID2",(e,t)=>{_x.init(e,t),et.init(e,t);});function F3(e){return xm(Cv,e)}var zv=B("ZodULID",(e,t)=>{Ex.init(e,t),et.init(e,t);});function H3(e){return vm(zv,e)}var Lv=B("ZodXID",(e,t)=>{Sx.init(e,t),et.init(e,t);});function V3(e){return wm(Lv,e)}var Uv=B("ZodKSUID",(e,t)=>{Ix.init(e,t),et.init(e,t);});function Z3(e){return _m(Uv,e)}var Mv=B("ZodIPv4",(e,t)=>{$x.init(e,t),et.init(e,t);});function G3(e){return Em(Mv,e)}var Dv=B("ZodIPv6",(e,t)=>{Ox.init(e,t),et.init(e,t);});function q3(e){return Sm(Dv,e)}var jv=B("ZodCIDRv4",(e,t)=>{Nx.init(e,t),et.init(e,t);});function W3(e){return Im(jv,e)}var Fv=B("ZodCIDRv6",(e,t)=>{Px.init(e,t),et.init(e,t);});function K3(e){return Am(Fv,e)}var Hv=B("ZodBase64",(e,t)=>{Cx.init(e,t),et.init(e,t);});function J3(e){return km(Hv,e)}var Vv=B("ZodBase64URL",(e,t)=>{zx.init(e,t),et.init(e,t);});function Y3(e){return Rm(Vv,e)}var Zv=B("ZodE164",(e,t)=>{Lx.init(e,t),et.init(e,t);});function X3(e){return Tm(Zv,e)}var Gv=B("ZodJWT",(e,t)=>{Ux.init(e,t),et.init(e,t);});function Q3(e){return $m(Gv,e)}var gl=B("ZodCustomStringFormat",(e,t)=>{Mx.init(e,t),et.init(e,t);});function eB(e,t,r={}){return yc(gl,e,t,r)}function tB(e){return yc(gl,"hostname",An.hostname,e)}function rB(e){return yc(gl,"hex",An.hex,e)}function nB(e,t){let r=t?.enc??"hex",o=`${e}_${r}`,n=An[o];if(!n)throw new Error(`Unrecognized hash format: ${o}`);return yc(gl,o,n,t)}var yl=B("ZodNumber",(e,t)=>{nm.init(e,t),Ae.init(e,t),e.gt=(o,n)=>e.check(Yo(o,n)),e.gte=(o,n)=>e.check(Jr(o,n)),e.min=(o,n)=>e.check(Jr(o,n)),e.lt=(o,n)=>e.check(Jo(o,n)),e.lte=(o,n)=>e.check(kn(o,n)),e.max=(o,n)=>e.check(kn(o,n)),e.int=o=>e.check(Tv(o)),e.safe=o=>e.check(Tv(o)),e.positive=o=>e.check(Yo(0,o)),e.nonnegative=o=>e.check(Jr(0,o)),e.negative=o=>e.check(Jo(0,o)),e.nonpositive=o=>e.check(kn(0,o)),e.multipleOf=(o,n)=>e.check(Hs(o,n)),e.step=(o,n)=>e.check(Hs(o,n)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=true,e.format=r.format??null;});function l5(e){return O1(yl,e)}var xc=B("ZodNumberFormat",(e,t)=>{Dx.init(e,t),yl.init(e,t);});function Tv(e){return P1(xc,e)}function oB(e){return B1(xc,e)}function iB(e){return C1(xc,e)}function sB(e){return z1(xc,e)}function aB(e){return L1(xc,e)}var bl=B("ZodBoolean",(e,t)=>{Wf.init(e,t),Ae.init(e,t);});function d5(e){return U1(bl,e)}var xl=B("ZodBigInt",(e,t)=>{om.init(e,t),Ae.init(e,t),e.gte=(o,n)=>e.check(Jr(o,n)),e.min=(o,n)=>e.check(Jr(o,n)),e.gt=(o,n)=>e.check(Yo(o,n)),e.gte=(o,n)=>e.check(Jr(o,n)),e.min=(o,n)=>e.check(Jr(o,n)),e.lt=(o,n)=>e.check(Jo(o,n)),e.lte=(o,n)=>e.check(kn(o,n)),e.max=(o,n)=>e.check(kn(o,n)),e.positive=o=>e.check(Yo(BigInt(0),o)),e.negative=o=>e.check(Jo(BigInt(0),o)),e.nonpositive=o=>e.check(kn(BigInt(0),o)),e.nonnegative=o=>e.check(Jr(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(Hs(o,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null;});function cB(e){return D1(xl,e)}var qv=B("ZodBigIntFormat",(e,t)=>{jx.init(e,t),xl.init(e,t);});function uB(e){return F1(qv,e)}function fB(e){return H1(qv,e)}var p5=B("ZodSymbol",(e,t)=>{Fx.init(e,t),Ae.init(e,t);});function lB(e){return V1(p5,e)}var m5=B("ZodUndefined",(e,t)=>{Hx.init(e,t),Ae.init(e,t);});function dB(e){return Z1(m5,e)}var h5=B("ZodNull",(e,t)=>{Vx.init(e,t),Ae.init(e,t);});function g5(e){return G1(h5,e)}var y5=B("ZodAny",(e,t)=>{Zx.init(e,t),Ae.init(e,t);});function pB(){return q1(y5)}var b5=B("ZodUnknown",(e,t)=>{Gx.init(e,t),Ae.init(e,t);});function bc(){return W1(b5)}var x5=B("ZodNever",(e,t)=>{qx.init(e,t),Ae.init(e,t);});function Wv(e){return K1(x5,e)}var v5=B("ZodVoid",(e,t)=>{Wx.init(e,t),Ae.init(e,t);});function mB(e){return J1(v5,e)}var jm=B("ZodDate",(e,t)=>{Kx.init(e,t),Ae.init(e,t),e.min=(o,n)=>e.check(Jr(o,n)),e.max=(o,n)=>e.check(kn(o,n));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null;});function hB(e){return Y1(jm,e)}var w5=B("ZodArray",(e,t)=>{Jx.init(e,t),Ae.init(e,t),e.element=t.element,e.min=(r,o)=>e.check(Vi(r,o)),e.nonempty=r=>e.check(Vi(1,r)),e.max=(r,o)=>e.check(hc(r,o)),e.length=(r,o)=>e.check(gc(r,o)),e.unwrap=()=>e.element;});function Fm(e,t){return iv(w5,e,t)}function gB(e){let t=e._zod.def.shape;return Xv(Object.keys(t))}var Hm=B("ZodObject",(e,t)=>{Yx.init(e,t),Ae.init(e,t),te.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>Xv(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:bc()}),e.loose=()=>e.clone({...e._zod.def,catchall:bc()}),e.strict=()=>e.clone({...e._zod.def,catchall:Wv()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>te.extend(e,r),e.safeExtend=r=>te.safeExtend(e,r),e.merge=r=>te.merge(e,r),e.pick=r=>te.pick(e,r),e.omit=r=>te.omit(e,r),e.partial=(...r)=>te.partial(ew,e,r[0]),e.required=(...r)=>te.required(tw,e,r[0]);});function yB(e,t){let r={type:"object",shape:e??{},...te.normalizeParams(t)};return new Hm(r)}function bB(e,t){return new Hm({type:"object",shape:e,catchall:Wv(),...te.normalizeParams(t)})}function xB(e,t){return new Hm({type:"object",shape:e,catchall:bc(),...te.normalizeParams(t)})}var Kv=B("ZodUnion",(e,t)=>{im.init(e,t),Ae.init(e,t),e.options=t.options;});function Jv(e,t){return new Kv({type:"union",options:e,...te.normalizeParams(t)})}var _5=B("ZodDiscriminatedUnion",(e,t)=>{Kv.init(e,t),Xx.init(e,t);});function vB(e,t,r){return new _5({type:"union",options:t,discriminator:e,...te.normalizeParams(r)})}var E5=B("ZodIntersection",(e,t)=>{Qx.init(e,t),Ae.init(e,t);});function S5(e,t){return new E5({type:"intersection",left:e,right:t})}var I5=B("ZodTuple",(e,t)=>{sm.init(e,t),Ae.init(e,t),e.rest=r=>e.clone({...e._zod.def,rest:r});});function A5(e,t,r){let o=t instanceof we,n=o?r:t,i=o?t:null;return new I5({type:"tuple",items:e,rest:i,...te.normalizeParams(n)})}var Yv=B("ZodRecord",(e,t)=>{e1.init(e,t),Ae.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType;});function k5(e,t,r){return new Yv({type:"record",keyType:e,valueType:t,...te.normalizeParams(r)})}function wB(e,t,r){let o=Mr(e);return o._zod.values=void 0,new Yv({type:"record",keyType:o,valueType:t,...te.normalizeParams(r)})}var R5=B("ZodMap",(e,t)=>{t1.init(e,t),Ae.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType;});function _B(e,t,r){return new R5({type:"map",keyType:e,valueType:t,...te.normalizeParams(r)})}var T5=B("ZodSet",(e,t)=>{r1.init(e,t),Ae.init(e,t),e.min=(...r)=>e.check(Vs(...r)),e.nonempty=r=>e.check(Vs(1,r)),e.max=(...r)=>e.check(mc(...r)),e.size=(...r)=>e.check(tl(...r));});function EB(e,t){return new T5({type:"set",valueType:e,...te.normalizeParams(t)})}var ml=B("ZodEnum",(e,t)=>{n1.init(e,t),Ae.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{let i={};for(let s of o)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new ml({...t,checks:[],...te.normalizeParams(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let s of o)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new ml({...t,checks:[],...te.normalizeParams(n),entries:i})};});function Xv(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new ml({type:"enum",entries:r,...te.normalizeParams(t)})}function SB(e,t){return new ml({type:"enum",entries:e,...te.normalizeParams(t)})}var $5=B("ZodLiteral",(e,t)=>{o1.init(e,t),Ae.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}});});function IB(e,t){return new $5({type:"literal",values:Array.isArray(e)?e:[e],...te.normalizeParams(t)})}var O5=B("ZodFile",(e,t)=>{i1.init(e,t),Ae.init(e,t),e.min=(r,o)=>e.check(Vs(r,o)),e.max=(r,o)=>e.check(mc(r,o)),e.mime=(r,o)=>e.check(cl(Array.isArray(r)?r:[r],o));});function AB(e){return sv(O5,e)}var N5=B("ZodTransform",(e,t)=>{s1.init(e,t),Ae.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Ui(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(te.issue(i,r.value,t));else {let s=i;s.fatal&&(s.continue=false),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(te.issue(s));}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r)):(r.value=n,r)};});function Qv(e){return new N5({type:"transform",transform:e})}var ew=B("ZodOptional",(e,t)=>{a1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function Lm(e){return new ew({type:"optional",innerType:e})}var P5=B("ZodNullable",(e,t)=>{c1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function Um(e){return new P5({type:"nullable",innerType:e})}function kB(e){return Lm(Um(e))}var B5=B("ZodDefault",(e,t)=>{u1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap;});function C5(e,t){return new B5({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():te.shallowClone(t)}})}var z5=B("ZodPrefault",(e,t)=>{f1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function L5(e,t){return new z5({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():te.shallowClone(t)}})}var tw=B("ZodNonOptional",(e,t)=>{l1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function U5(e,t){return new tw({type:"nonoptional",innerType:e,...te.normalizeParams(t)})}var M5=B("ZodSuccess",(e,t)=>{d1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function RB(e){return new M5({type:"success",innerType:e})}var D5=B("ZodCatch",(e,t)=>{p1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap;});function j5(e,t){return new D5({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var F5=B("ZodNaN",(e,t)=>{m1.init(e,t),Ae.init(e,t);});function TB(e){return Q1(F5,e)}var rw=B("ZodPipe",(e,t)=>{h1.init(e,t),Ae.init(e,t),e.in=t.in,e.out=t.out;});function Mm(e,t){return new rw({type:"pipe",in:e,out:t})}var nw=B("ZodCodec",(e,t)=>{rw.init(e,t),Kf.init(e,t);});function $B(e,t,r){return new nw({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}var H5=B("ZodReadonly",(e,t)=>{g1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function V5(e){return new H5({type:"readonly",innerType:e})}var Z5=B("ZodTemplateLiteral",(e,t)=>{y1.init(e,t),Ae.init(e,t);});function OB(e,t){return new Z5({type:"template_literal",parts:e,...te.normalizeParams(t)})}var G5=B("ZodLazy",(e,t)=>{v1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.getter();});function q5(e){return new G5({type:"lazy",getter:e})}var W5=B("ZodPromise",(e,t)=>{x1.init(e,t),Ae.init(e,t),e.unwrap=()=>e._zod.def.innerType;});function NB(e){return new W5({type:"promise",innerType:e})}var K5=B("ZodFunction",(e,t)=>{b1.init(e,t),Ae.init(e,t);});function PB(e){return new K5({type:"function",input:Array.isArray(e?.input)?A5(e?.input):e?.input??Fm(bc()),output:e?.output??bc()})}var Vm=B("ZodCustom",(e,t)=>{w1.init(e,t),Ae.init(e,t);});function BB(e){let t=new ot({check:"custom"});return t._zod.check=e,t}function CB(e,t){return av(Vm,e??(()=>true),t)}function J5(e,t={}){return cv(Vm,e,t)}function Y5(e){return uv(e)}function zB(e,t={error:`Input not instance of ${e.name}`}){let r=new Vm({type:"custom",check:"custom",fn:o=>o instanceof e,abort:true,...te.normalizeParams(t)});return r._zod.bag.Class=e,r}var LB=(...e)=>fv({Codec:nw,Boolean:bl,String:hl},...e);function UB(e){let t=q5(()=>Jv([Rv(e),l5(),d5(),g5(),Fm(t),k5(Rv(),t)]));return t}function MB(e,t){return Mm(Qv(e),t)}var DB={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function jB(e){wt({customError:e});}function FB(){return wt().customError}var ow;ow||(ow={});var iw={};Er(iw,{bigint:()=>GB,boolean:()=>ZB,date:()=>qB,number:()=>VB,string:()=>HB});function HB(e){return I1(hl,e)}function VB(e){return N1(yl,e)}function ZB(e){return M1(bl,e)}function GB(e){return j1(xl,e)}function qB(e){return X1(jm,e)}wt(am());var WB="https://api.adland.space",KB="http://localhost:3069";function JB(e,t){return e?e.replace(/\/$/,""):t==="development"?KB:WB}function YB(){return typeof process>"u"||!process.env?{}:{override:process.env.NEXT_PUBLIC_ADLAND_API_URL,nodeEnv:"production"}}var{override:XB,nodeEnv:QB}=YB(),sw=JB(XB,QB);function eC(e,t){return Object.assign(e,{choices:t})}function wc(e){return {...e,process:t=>tC(e,t),safeProcess:t=>rC(e,t)}}async function tC(e,t){console.log("processAd:input",t);let r=e.data.parse(t);console.log("processAd:data",r),e.verify&&await e.verify(t);let o=e.getMetadata&&e.metadata?await e.getMetadata(r):void 0;return {data:r,metadata:o,type:e.type}}async function rC(e,t){let r=e.data.safeParse(t);if(!r.success)return {success:false,error:r.error};let o=r.data;if(e.verify)try{await e.verify(o);}catch(i){return {success:false,error:i instanceof Error?i.message:"Verification failed"}}let n=e.getMetadata&&e.metadata?await e.getMetadata(o):void 0;return {success:true,data:o,metadata:n}}var Jn=`${sw}/adland`;async function vl(e,t){return fetch(e,{method:"POST",body:JSON.stringify(t)}).then(r=>r.json())}async function vc(e){return fetch(e).then(t=>t.json())}var Yn={verify:{cast({hash:e}){return vl(`${Jn}/verify/cast`,{hash:e})},miniapp({domain:e}){return vl(`${Jn}/verify/miniapp`,{domain:e})},profile({fid:e}){return vl(`${Jn}/verify/profile`,{fid:e})},token({address:e,chainId:t}){return vl(`${Jn}/verify/token`,{address:e,chainId:t})},tweet({url:e}){return vl(`${Jn}/verify/tweet`,{url:e})}},metadata:{cast({hash:e}){return vc(`${Jn}/metadata/cast?hash=${encodeURIComponent(e)}`)},miniapp({url:e}){return vc(`${Jn}/metadata/miniapp?url=${encodeURIComponent(e)}`)},link({url:e}){return vc(`${Jn}/metadata/link?url=${encodeURIComponent(e)}`)},profile({fid:e}){return vc(`${Jn}/metadata/profile?fid=${encodeURIComponent(e)}`)},token({address:e,chainId:t}){return vc(`${Jn}/metadata/token?address=${encodeURIComponent(e)}&chainId=${t}`)},tweet({url:e}){return vc(`${Jn}/metadata/tweet?url=${encodeURIComponent(e)}`)}}};wc({type:"cast",data:pe.object({hash:pe.string().nonempty("Hash is required")}),metadata:pe.object({displayName:pe.string().optional(),username:pe.string().optional(),pfpUrl:pe.string().optional(),text:pe.string(),timestamp:pe.string()}),async verify({hash:e}){if(!/^0x[0-9a-fA-F]{40}$/.test(e))throw new Error("Invalid Farcaster cast hash");if(!(await Yn.verify.cast({hash:e})).verified)throw new Error("Cast hash verification failed")},async getMetadata({hash:e}){let{cast:t}=await Yn.metadata.cast({hash:e});return {displayName:t.author.displayName,username:t.author.username,pfpUrl:t.author.pfp?.url,text:t.text,timestamp:String(t.timestamp)}}});wc({type:"link",data:pe.object({url:pe.string().nonempty("URL is required")}),metadata:pe.object({title:pe.string().optional(),description:pe.string().optional(),image:pe.string().optional(),icon:pe.string().optional()}),async verify({url:e}){if(!e.startsWith("http"))throw new Error("Invalid link")},async getMetadata({url:e}){let t=await Yn.metadata.link({url:e});return {title:t.title,description:t.description,image:t.image,icon:t.icon}}});wc({type:"miniapp",data:pe.object({url:pe.string().nonempty("URL is required")}),metadata:pe.object({icon:pe.string().optional(),title:pe.string().optional(),description:pe.string().optional(),imageUrl:pe.string().optional(),creator:pe.object({fid:pe.number(),username:pe.string().nullable().optional(),displayName:pe.string().nullable().optional(),pfpUrl:pe.string().nullable().optional()}).nullable().optional()}),async verify({url:e}){let t="Miniapp domain verification failed",r=e.split("//")[1];if(console.log("verifyMiniapp:domain",r),!r)throw new Error(t);let o=await Yn.verify.miniapp({domain:r});if(console.log("verifyMiniapp:res",o),!o.verified)throw new Error(t)},async getMetadata({url:e}){let t=await Yn.metadata.miniapp({url:e});return console.log("getMetadata:res",t),{icon:t.icon,title:t.title,description:t.description,imageUrl:t.imageUrl,creator:t.creator}}});wc({type:"farcasterProfile",data:pe.object({fid:pe.string().nonempty("Fid is required")}),metadata:pe.object({pfpUrl:pe.string().optional(),bio:pe.string().optional(),username:pe.string().optional(),displayName:pe.string().optional(),followers:pe.number().optional(),following:pe.number().optional(),pro:pe.boolean().optional()}),async verify({fid:e}){if(!(await Yn.verify.profile({fid:e})).verified)throw new Error("Farcaster profile verification failed")},async getMetadata({fid:e}){let t=await Yn.metadata.profile({fid:e});return {pfpUrl:t.pfpUrl,bio:t.bio,username:t.username,displayName:t.displayName,followers:t.followers,following:t.following,pro:t.pro}}});var nC="eip155",X5=[{chainId:1,label:"Ethereum",coingeckoPlatform:"ethereum"},{chainId:8453,label:"Base",coingeckoPlatform:"base"},{chainId:42161,label:"Arbitrum",coingeckoPlatform:"arbitrum-one"},{chainId:4663,label:"Robinhood",coingeckoPlatform:null}],oC=X5.map(e=>e.chainId);function iC(e){return oC.includes(e)}function Q5(e,t){return `${nC}:${e}/erc20:${t}`}wc({type:"token",data:pe.object({address:pe.string().nonempty("Address is required"),chainId:eC(pe.number().int().positive("Chain ID is required").refine(iC,"Token ads are only supported on Ethereum, Base, Arbitrum and Robinhood"),X5.map(e=>({label:`${e.label} (${e.chainId})`,value:e.chainId})))}),metadata:pe.object({name:pe.string().optional(),symbol:pe.string().optional(),decimals:pe.number().optional(),logoURI:pe.string().optional()}),async verify({address:e,chainId:t}){if(!(await Yn.verify.token({address:e,chainId:t})).verified)throw new Error("Token verification failed")},async getMetadata({address:e,chainId:t}){let r=await Yn.metadata.token({address:e,chainId:t});return {name:r.name,symbol:r.symbol,decimals:r.decimals,logoURI:r.logoURI}}});var sC=/(?:twitter\.com|x\.com)\/\w+\/status\/\d+/;wc({type:"tweet",data:pe.object({url:pe.string().nonempty("URL is required")}),metadata:pe.object({displayName:pe.string().optional(),username:pe.string().optional(),pfpUrl:pe.string().optional(),text:pe.string(),timestamp:pe.string(),image:pe.string().optional()}),async verify({url:e}){if(!sC.test(e))throw new Error("Not an X post link \u2014 expected https://x.com/user/status/123");if(!(await Yn.verify.tweet({url:e})).verified)throw new Error("That post could not be read \u2014 it may be deleted, or from a protected account")},async getMetadata({url:e}){let t=await Yn.metadata.tweet({url:e});return {displayName:t.author.name,username:t.author.username,pfpUrl:t.author.pfpUrl,text:t.text,timestamp:String(Date.parse(t.createdAt)),image:t.image??void 0}}});var wl={};Er(wl,{InvalidDomainManifest:()=>aw,RejectedByUser:()=>cw});var Xn=class extends Error{name="BaseError";cause;constructor(t,r={}){super(t,r.cause?{cause:r.cause}:void 0),this.cause=r.cause;}};var aw=class extends Xn{name="AddMiniApp.InvalidDomainManifest";constructor(){super("Invalid domain manifest");}},cw=class extends Xn{name="AddMiniApp.RejectedByUser";constructor(){super("Add miniapp rejected by user");}};var _c={};Er(_c,{RejectedByUser:()=>uw});var uw=class extends Xn{name="SignIn.RejectedByUser";constructor(){super("Sign in rejected by user");}};var Ec={};Er(Ec,{GenericError:()=>dw,InvalidDomain:()=>lw,RejectedByUser:()=>fw});var fw=class extends Xn{name="SignManifest.RejectedByUser";constructor(){super("Sign manifest rejected by user");}},lw=class extends Xn{name="SignManifest.InvalidDomain";constructor(){super("Invalid domain provided");}},dw=class extends Xn{name="SignManifest.GenericError";constructor(t="Manifest signing failed"){super(t);}};var ie={};Er(ie,{BRAND:()=>CC,DIRTY:()=>Zs,EMPTY_PATH:()=>pC,INVALID:()=>ge,NEVER:()=>xz,OK:()=>Sr,ParseStatus:()=>dr,Schema:()=>ke,ZodAny:()=>qi,ZodArray:()=>oi,ZodBigInt:()=>qs,ZodBoolean:()=>Ws,ZodBranded:()=>El,ZodCatch:()=>ia,ZodDate:()=>Ks,ZodDefault:()=>oa,ZodDiscriminatedUnion:()=>Wm,ZodEffects:()=>$n,ZodEnum:()=>ra,ZodError:()=>Xr,ZodFirstPartyTypeKind:()=>be,ZodFunction:()=>Jm,ZodIntersection:()=>Qs,ZodIssueCode:()=>Y,ZodLazy:()=>ea,ZodLiteral:()=>ta,ZodMap:()=>Tc,ZodNaN:()=>Oc,ZodNativeEnum:()=>na,ZodNever:()=>Qn,ZodNull:()=>Ys,ZodNullable:()=>Eo,ZodNumber:()=>Gs,ZodObject:()=>Qr,ZodOptional:()=>Rn,ZodParsedType:()=>ce,ZodPipeline:()=>Sl,ZodPromise:()=>Wi,ZodReadonly:()=>sa,ZodRecord:()=>Km,ZodSchema:()=>ke,ZodSet:()=>$c,ZodString:()=>Gi,ZodSymbol:()=>kc,ZodTransformer:()=>$n,ZodTuple:()=>_o,ZodType:()=>ke,ZodUndefined:()=>Js,ZodUnion:()=>Xs,ZodUnknown:()=>ni,ZodVoid:()=>Rc,addIssueToContext:()=>se,any:()=>VC,array:()=>WC,bigint:()=>MC,boolean:()=>fI,coerce:()=>bz,custom:()=>aI,date:()=>DC,datetimeRegex:()=>iI,defaultErrorMap:()=>ti,discriminatedUnion:()=>XC,effect:()=>fz,enum:()=>az,function:()=>oz,getErrorMap:()=>Sc,getParsedType:()=>wo,instanceof:()=>LC,intersection:()=>QC,isAborted:()=>Gm,isAsync:()=>Ic,isDirty:()=>qm,isValid:()=>Zi,late:()=>zC,lazy:()=>iz,literal:()=>sz,makeIssue:()=>_l,map:()=>rz,nan:()=>UC,nativeEnum:()=>cz,never:()=>GC,null:()=>HC,nullable:()=>dz,number:()=>uI,object:()=>KC,objectUtil:()=>pw,oboolean:()=>yz,onumber:()=>gz,optional:()=>lz,ostring:()=>hz,pipeline:()=>mz,preprocess:()=>pz,promise:()=>uz,quotelessJson:()=>fC,record:()=>tz,set:()=>nz,setErrorMap:()=>dC,strictObject:()=>JC,string:()=>cI,symbol:()=>jC,transformer:()=>fz,tuple:()=>ez,undefined:()=>FC,union:()=>YC,unknown:()=>ZC,util:()=>Ne,void:()=>qC});var Ne;(function(e){e.assertEqual=n=>{};function t(n){}e.assertIs=t;function r(n){throw new Error}e.assertNever=r,e.arrayToEnum=n=>{let i={};for(let s of n)i[s]=s;return i},e.getValidEnumValues=n=>{let i=e.objectKeys(n).filter(a=>typeof n[n[a]]!="number"),s={};for(let a of i)s[a]=n[a];return e.objectValues(s)},e.objectValues=n=>e.objectKeys(n).map(function(i){return n[i]}),e.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let i=[];for(let s in n)Object.prototype.hasOwnProperty.call(n,s)&&i.push(s);return i},e.find=(n,i)=>{for(let s of n)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function o(n,i=" | "){return n.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=o,e.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i;})(Ne||(Ne={}));var pw;(function(e){e.mergeShapes=(t,r)=>({...t,...r});})(pw||(pw={}));var ce=Ne.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),wo=e=>{switch(typeof e){case "undefined":return ce.undefined;case "string":return ce.string;case "number":return Number.isNaN(e)?ce.nan:ce.number;case "boolean":return ce.boolean;case "function":return ce.function;case "bigint":return ce.bigint;case "symbol":return ce.symbol;case "object":return Array.isArray(e)?ce.array:e===null?ce.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ce.promise:typeof Map<"u"&&e instanceof Map?ce.map:typeof Set<"u"&&e instanceof Set?ce.set:typeof Date<"u"&&e instanceof Date?ce.date:ce.object;default:return ce.unknown}};var Y=Ne.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),fC=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Xr=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o];},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o];};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t;}format(t){let r=t||function(i){return i.message},o={_errors:[]},n=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)o._errors.push(r(s));else {let a=o,c=0;for(;c<s.path.length;){let u=s.path[c];c===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(s))):a[u]=a[u]||{_errors:[]},a=a[u],c++;}}};return n(this),o}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ne.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},o=[];for(let n of this.issues)if(n.path.length>0){let i=n.path[0];r[i]=r[i]||[],r[i].push(t(n));}else o.push(t(n));return {formErrors:o,fieldErrors:r}}get formErrors(){return this.flatten()}};Xr.create=e=>new Xr(e);var lC=(e,t)=>{let r;switch(e.code){case Y.invalid_type:e.received===ce.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Y.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Ne.jsonStringifyReplacer)}`;break;case Y.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ne.joinValues(e.keys,", ")}`;break;case Y.invalid_union:r="Invalid input";break;case Y.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ne.joinValues(e.options)}`;break;case Y.invalid_enum_value:r=`Invalid enum value. Expected ${Ne.joinValues(e.options)}, received '${e.received}'`;break;case Y.invalid_arguments:r="Invalid function arguments";break;case Y.invalid_return_type:r="Invalid function return type";break;case Y.invalid_date:r="Invalid date";break;case Y.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Ne.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Y.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Y.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Y.custom:r="Invalid input";break;case Y.invalid_intersection_types:r="Intersection results could not be merged";break;case Y.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Y.not_finite:r="Number must be finite";break;default:r=t.defaultError,Ne.assertNever(e);}return {message:r}},ti=lC;var eI=ti;function dC(e){eI=e;}function Sc(){return eI}var _l=e=>{let{data:t,path:r,errorMaps:o,issueData:n}=e,i=[...r,...n.path||[]],s={...n,path:i};if(n.message!==void 0)return {...n,path:i,message:n.message};let a="",c=o.filter(u=>!!u).slice().reverse();for(let u of c)a=u(s,{data:t,defaultError:a}).message;return {...n,path:i,message:a}},pC=[];function se(e,t){let r=Sc(),o=_l({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===ti?void 0:ti].filter(n=>!!n)});e.common.issues.push(o);}var dr=class e{constructor(){this.value="valid";}dirty(){this.value==="valid"&&(this.value="dirty");}abort(){this.value!=="aborted"&&(this.value="aborted");}static mergeArray(t,r){let o=[];for(let n of r){if(n.status==="aborted")return ge;n.status==="dirty"&&t.dirty(),o.push(n.value);}return {status:t.value,value:o}}static async mergeObjectAsync(t,r){let o=[];for(let n of r){let i=await n.key,s=await n.value;o.push({key:i,value:s});}return e.mergeObjectSync(t,o)}static mergeObjectSync(t,r){let o={};for(let n of r){let{key:i,value:s}=n;if(i.status==="aborted"||s.status==="aborted")return ge;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||n.alwaysSet)&&(o[i.value]=s.value);}return {status:t.value,value:o}}},ge=Object.freeze({status:"aborted"}),Zs=e=>({status:"dirty",value:e}),Sr=e=>({status:"valid",value:e}),Gm=e=>e.status==="aborted",qm=e=>e.status==="dirty",Zi=e=>e.status==="valid",Ic=e=>typeof Promise<"u"&&e instanceof Promise;var le;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message;})(le||(le={}));var Tn=class{constructor(t,r,o,n){this._cachedPath=[],this.parent=t,this.data=r,this._path=o,this._key=n;}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},tI=(e,t)=>{if(Zi(t))return {success:true,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return {success:false,get error(){if(this._error)return this._error;let r=new Xr(e.common.issues);return this._error=r,this._error}}};function Ee(e){if(!e)return {};let{errorMap:t,invalid_type_error:r,required_error:o,description:n}=e;if(t&&(r||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:n}:{errorMap:(s,a)=>{let{message:c}=e;return s.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??o??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:n}}var ke=class{get description(){return this._def.description}_getType(t){return wo(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:wo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return {status:new dr,ctx:{common:t.parent.common,data:t.data,parsedType:wo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(Ic(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let o=this.safeParse(t,r);if(o.success)return o.data;throw o.error}safeParse(t,r){let o={common:{issues:[],async:r?.async??false,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:wo(t)},n=this._parseSync({data:t,path:o.path,parent:o});return tI(o,n)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:wo(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:r});return Zi(o)?{value:o.value}:{issues:r.common.issues}}catch(o){o?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=true),r.common={issues:[],async:true};}return this._parseAsync({data:t,path:[],parent:r}).then(o=>Zi(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(t,r){let o=await this.safeParseAsync(t,r);if(o.success)return o.data;throw o.error}async safeParseAsync(t,r){let o={common:{issues:[],contextualErrorMap:r?.errorMap,async:true},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:wo(t)},n=this._parse({data:t,path:o.path,parent:o}),i=await(Ic(n)?n:Promise.resolve(n));return tI(o,i)}refine(t,r){let o=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,i)=>{let s=t(n),a=()=>i.addIssue({code:Y.custom,...o(n)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?true:(a(),false)):s?true:(a(),false)})}refinement(t,r){return this._refinement((o,n)=>t(o)?true:(n.addIssue(typeof r=="function"?r(o,n):r),false))}_refinement(t){return new $n({schema:this,typeName:be.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)};}optional(){return Rn.create(this,this._def)}nullable(){return Eo.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return oi.create(this)}promise(){return Wi.create(this,this._def)}or(t){return Xs.create([this,t],this._def)}and(t){return Qs.create(this,t,this._def)}transform(t){return new $n({...Ee(this._def),schema:this,typeName:be.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new oa({...Ee(this._def),innerType:this,defaultValue:r,typeName:be.ZodDefault})}brand(){return new El({typeName:be.ZodBranded,type:this,...Ee(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new ia({...Ee(this._def),innerType:this,catchValue:r,typeName:be.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Sl.create(this,t)}readonly(){return sa.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},mC=/^c[^\s-]{8,}$/i,hC=/^[0-9a-z]+$/,gC=/^[0-9A-HJKMNP-TV-Z]{26}$/i,yC=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,bC=/^[a-z0-9_-]{21}$/i,xC=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,vC=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,wC=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_C="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",mw,EC=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,SC=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,IC=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,AC=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,kC=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,RC=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nI="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",TC=new RegExp(`^${nI}$`);function oI(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return `([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function $C(e){return new RegExp(`^${oI(e)}$`)}function iI(e){let t=`${nI}T${oI(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function OC(e,t){return !!((t==="v4"||!t)&&EC.test(e)||(t==="v6"||!t)&&IC.test(e))}function NC(e,t){if(!xC.test(e))return false;try{let[r]=e.split(".");if(!r)return !1;let o=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(o));return !(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||t&&n.alg!==t)}catch{return false}}function PC(e,t){return !!((t==="v4"||!t)&&SC.test(e)||(t==="v6"||!t)&&AC.test(e))}var Gi=class e extends ke{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ce.string){let i=this._getOrReturnCtx(t);return se(i,{code:Y.invalid_type,expected:ce.string,received:i.parsedType}),ge}let o=new dr,n;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:Y.too_small,minimum:i.value,type:"string",inclusive:true,exact:false,message:i.message}),o.dirty());else if(i.kind==="max")t.data.length>i.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:Y.too_big,maximum:i.value,type:"string",inclusive:true,exact:false,message:i.message}),o.dirty());else if(i.kind==="length"){let s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(n=this._getOrReturnCtx(t,n),s?se(n,{code:Y.too_big,maximum:i.value,type:"string",inclusive:true,exact:true,message:i.message}):a&&se(n,{code:Y.too_small,minimum:i.value,type:"string",inclusive:true,exact:true,message:i.message}),o.dirty());}else if(i.kind==="email")wC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"email",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="emoji")mw||(mw=new RegExp(_C,"u")),mw.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"emoji",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="uuid")yC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"uuid",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="nanoid")bC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"nanoid",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid")mC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"cuid",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid2")hC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"cuid2",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="ulid")gC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"ulid",code:Y.invalid_string,message:i.message}),o.dirty());else if(i.kind==="url")try{new URL(t.data);}catch{n=this._getOrReturnCtx(t,n),se(n,{validation:"url",code:Y.invalid_string,message:i.message}),o.dirty();}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"regex",code:Y.invalid_string,message:i.message}),o.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),o.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:{startsWith:i.value},message:i.message}),o.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:{endsWith:i.value},message:i.message}),o.dirty()):i.kind==="datetime"?iI(i).test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:"datetime",message:i.message}),o.dirty()):i.kind==="date"?TC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:"date",message:i.message}),o.dirty()):i.kind==="time"?$C(i).test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{code:Y.invalid_string,validation:"time",message:i.message}),o.dirty()):i.kind==="duration"?vC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"duration",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="ip"?OC(t.data,i.version)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"ip",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="jwt"?NC(t.data,i.alg)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"jwt",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="cidr"?PC(t.data,i.version)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"cidr",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="base64"?kC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"base64",code:Y.invalid_string,message:i.message}),o.dirty()):i.kind==="base64url"?RC.test(t.data)||(n=this._getOrReturnCtx(t,n),se(n,{validation:"base64url",code:Y.invalid_string,message:i.message}),o.dirty()):Ne.assertNever(i);return {status:o.value,value:t.data}}_regex(t,r,o){return this.refinement(n=>t.test(n),{validation:r,code:Y.invalid_string,...le.errToObj(o)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...le.errToObj(t)})}url(t){return this._addCheck({kind:"url",...le.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...le.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...le.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...le.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...le.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...le.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...le.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...le.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...le.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...le.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...le.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...le.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:false,local:false,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??false,local:t?.local??false,...le.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...le.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...le.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...le.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...le.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...le.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...le.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...le.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...le.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...le.errToObj(r)})}nonempty(t){return this.min(1,le.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return !!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return !!this._def.checks.find(t=>t.kind==="date")}get isTime(){return !!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return !!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return !!this._def.checks.find(t=>t.kind==="email")}get isURL(){return !!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return !!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return !!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return !!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return !!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return !!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return !!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return !!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return !!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return !!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return !!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Gi.create=e=>new Gi({checks:[],typeName:be.ZodString,coerce:e?.coerce??false,...Ee(e)});function BC(e,t){let r=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,n=r>o?r:o,i=Number.parseInt(e.toFixed(n).replace(".","")),s=Number.parseInt(t.toFixed(n).replace(".",""));return i%s/10**n}var Gs=class e extends ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf;}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ce.number){let i=this._getOrReturnCtx(t);return se(i,{code:Y.invalid_type,expected:ce.number,received:i.parsedType}),ge}let o,n=new dr;for(let i of this._def.checks)i.kind==="int"?Ne.isInteger(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{code:Y.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:false,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:false,message:i.message}),n.dirty()):i.kind==="multipleOf"?BC(t.data,i.value)!==0&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(o=this._getOrReturnCtx(t,o),se(o,{code:Y.not_finite,message:i.message}),n.dirty()):Ne.assertNever(i);return {status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,true,le.toString(r))}gt(t,r){return this.setLimit("min",t,false,le.toString(r))}lte(t,r){return this.setLimit("max",t,true,le.toString(r))}lt(t,r){return this.setLimit("max",t,false,le.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:le.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:le.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:false,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:false,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:true,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:true,message:le.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:le.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:true,value:Number.MIN_SAFE_INTEGER,message:le.toString(t)})._addCheck({kind:"max",inclusive:true,value:Number.MAX_SAFE_INTEGER,message:le.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return !!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Ne.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return true;o.kind==="min"?(r===null||o.value>r)&&(r=o.value):o.kind==="max"&&(t===null||o.value<t)&&(t=o.value);}return Number.isFinite(r)&&Number.isFinite(t)}};Gs.create=e=>new Gs({checks:[],typeName:be.ZodNumber,coerce:e?.coerce||false,...Ee(e)});var qs=class e extends ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte;}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data);}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ce.bigint)return this._getInvalidInput(t);let o,n=new dr;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(o=this._getOrReturnCtx(t,o),se(o,{code:Y.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):Ne.assertNever(i);return {status:n.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return se(r,{code:Y.invalid_type,expected:ce.bigint,received:r.parsedType}),ge}gte(t,r){return this.setLimit("min",t,true,le.toString(r))}gt(t,r){return this.setLimit("min",t,false,le.toString(r))}lte(t,r){return this.setLimit("max",t,true,le.toString(r))}lt(t,r){return this.setLimit("max",t,false,le.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:le.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:false,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:false,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:true,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:true,message:le.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};qs.create=e=>new qs({checks:[],typeName:be.ZodBigInt,coerce:e?.coerce??false,...Ee(e)});var Ws=class extends ke{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ce.boolean){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.boolean,received:o.parsedType}),ge}return Sr(t.data)}};Ws.create=e=>new Ws({typeName:be.ZodBoolean,coerce:e?.coerce||false,...Ee(e)});var Ks=class e extends ke{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ce.date){let i=this._getOrReturnCtx(t);return se(i,{code:Y.invalid_type,expected:ce.date,received:i.parsedType}),ge}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return se(i,{code:Y.invalid_date}),ge}let o=new dr,n;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:Y.too_small,message:i.message,inclusive:true,exact:false,minimum:i.value,type:"date"}),o.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(n=this._getOrReturnCtx(t,n),se(n,{code:Y.too_big,message:i.message,inclusive:true,exact:false,maximum:i.value,type:"date"}),o.dirty()):Ne.assertNever(i);return {status:o.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:le.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:le.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};Ks.create=e=>new Ks({checks:[],coerce:e?.coerce||false,typeName:be.ZodDate,...Ee(e)});var kc=class extends ke{_parse(t){if(this._getType(t)!==ce.symbol){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.symbol,received:o.parsedType}),ge}return Sr(t.data)}};kc.create=e=>new kc({typeName:be.ZodSymbol,...Ee(e)});var Js=class extends ke{_parse(t){if(this._getType(t)!==ce.undefined){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.undefined,received:o.parsedType}),ge}return Sr(t.data)}};Js.create=e=>new Js({typeName:be.ZodUndefined,...Ee(e)});var Ys=class extends ke{_parse(t){if(this._getType(t)!==ce.null){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.null,received:o.parsedType}),ge}return Sr(t.data)}};Ys.create=e=>new Ys({typeName:be.ZodNull,...Ee(e)});var qi=class extends ke{constructor(){super(...arguments),this._any=true;}_parse(t){return Sr(t.data)}};qi.create=e=>new qi({typeName:be.ZodAny,...Ee(e)});var ni=class extends ke{constructor(){super(...arguments),this._unknown=true;}_parse(t){return Sr(t.data)}};ni.create=e=>new ni({typeName:be.ZodUnknown,...Ee(e)});var Qn=class extends ke{_parse(t){let r=this._getOrReturnCtx(t);return se(r,{code:Y.invalid_type,expected:ce.never,received:r.parsedType}),ge}};Qn.create=e=>new Qn({typeName:be.ZodNever,...Ee(e)});var Rc=class extends ke{_parse(t){if(this._getType(t)!==ce.undefined){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.void,received:o.parsedType}),ge}return Sr(t.data)}};Rc.create=e=>new Rc({typeName:be.ZodVoid,...Ee(e)});var oi=class e extends ke{_parse(t){let{ctx:r,status:o}=this._processInputParams(t),n=this._def;if(r.parsedType!==ce.array)return se(r,{code:Y.invalid_type,expected:ce.array,received:r.parsedType}),ge;if(n.exactLength!==null){let s=r.data.length>n.exactLength.value,a=r.data.length<n.exactLength.value;(s||a)&&(se(r,{code:s?Y.too_big:Y.too_small,minimum:a?n.exactLength.value:void 0,maximum:s?n.exactLength.value:void 0,type:"array",inclusive:true,exact:true,message:n.exactLength.message}),o.dirty());}if(n.minLength!==null&&r.data.length<n.minLength.value&&(se(r,{code:Y.too_small,minimum:n.minLength.value,type:"array",inclusive:true,exact:false,message:n.minLength.message}),o.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(se(r,{code:Y.too_big,maximum:n.maxLength.value,type:"array",inclusive:true,exact:false,message:n.maxLength.message}),o.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>n.type._parseAsync(new Tn(r,s,r.path,a)))).then(s=>dr.mergeArray(o,s));let i=[...r.data].map((s,a)=>n.type._parseSync(new Tn(r,s,r.path,a)));return dr.mergeArray(o,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:le.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:le.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:le.toString(r)}})}nonempty(t){return this.min(1,t)}};oi.create=(e,t)=>new oi({type:e,minLength:null,maxLength:null,exactLength:null,typeName:be.ZodArray,...Ee(t)});function Ac(e){if(e instanceof Qr){let t={};for(let r in e.shape){let o=e.shape[r];t[r]=Rn.create(Ac(o));}return new Qr({...e._def,shape:()=>t})}else return e instanceof oi?new oi({...e._def,type:Ac(e.element)}):e instanceof Rn?Rn.create(Ac(e.unwrap())):e instanceof Eo?Eo.create(Ac(e.unwrap())):e instanceof _o?_o.create(e.items.map(t=>Ac(t))):e}var Qr=class e extends ke{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend;}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=Ne.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==ce.object){let u=this._getOrReturnCtx(t);return se(u,{code:Y.invalid_type,expected:ce.object,received:u.parsedType}),ge}let{status:o,ctx:n}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Qn&&this._def.unknownKeys==="strip"))for(let u in n.data)s.includes(u)||a.push(u);let c=[];for(let u of s){let f=i[u],d=n.data[u];c.push({key:{status:"valid",value:u},value:f._parse(new Tn(n,d,n.path,u)),alwaysSet:u in n.data});}if(this._def.catchall instanceof Qn){let u=this._def.unknownKeys;if(u==="passthrough")for(let f of a)c.push({key:{status:"valid",value:f},value:{status:"valid",value:n.data[f]}});else if(u==="strict")a.length>0&&(se(n,{code:Y.unrecognized_keys,keys:a}),o.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else {let u=this._def.catchall;for(let f of a){let d=n.data[f];c.push({key:{status:"valid",value:f},value:u._parse(new Tn(n,d,n.path,f)),alwaysSet:f in n.data});}}return n.common.async?Promise.resolve().then(async()=>{let u=[];for(let f of c){let d=await f.key,g=await f.value;u.push({key:d,value:g,alwaysSet:f.alwaysSet});}return u}).then(u=>dr.mergeObjectSync(o,u)):dr.mergeObjectSync(o,c)}get shape(){return this._def.shape()}strict(t){return le.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,o)=>{let n=this._def.errorMap?.(r,o).message??o.defaultError;return r.code==="unrecognized_keys"?{message:le.errToObj(t).message??n}:{message:n}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:be.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let o of Ne.objectKeys(t))t[o]&&this.shape[o]&&(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let o of Ne.objectKeys(this.shape))t[o]||(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}deepPartial(){return Ac(this)}partial(t){let r={};for(let o of Ne.objectKeys(this.shape)){let n=this.shape[o];t&&!t[o]?r[o]=n:r[o]=n.optional();}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let o of Ne.objectKeys(this.shape))if(t&&!t[o])r[o]=this.shape[o];else {let i=this.shape[o];for(;i instanceof Rn;)i=i._def.innerType;r[o]=i;}return new e({...this._def,shape:()=>r})}keyof(){return sI(Ne.objectKeys(this.shape))}};Qr.create=(e,t)=>new Qr({shape:()=>e,unknownKeys:"strip",catchall:Qn.create(),typeName:be.ZodObject,...Ee(t)});Qr.strictCreate=(e,t)=>new Qr({shape:()=>e,unknownKeys:"strict",catchall:Qn.create(),typeName:be.ZodObject,...Ee(t)});Qr.lazycreate=(e,t)=>new Qr({shape:e,unknownKeys:"strip",catchall:Qn.create(),typeName:be.ZodObject,...Ee(t)});var Xs=class extends ke{_parse(t){let{ctx:r}=this._processInputParams(t),o=this._def.options;function n(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(a=>new Xr(a.ctx.common.issues));return se(r,{code:Y.invalid_union,unionErrors:s}),ge}if(r.common.async)return Promise.all(o.map(async i=>{let s={...r,common:{...r.common,issues:[]},parent:null};return {result:await i._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(n);{let i,s=[];for(let c of o){let u={...r,common:{...r.common,issues:[]},parent:null},f=c._parseSync({data:r.data,path:r.path,parent:u});if(f.status==="valid")return f;f.status==="dirty"&&!i&&(i={result:f,ctx:u}),u.common.issues.length&&s.push(u.common.issues);}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let a=s.map(c=>new Xr(c));return se(r,{code:Y.invalid_union,unionErrors:a}),ge}}get options(){return this._def.options}};Xs.create=(e,t)=>new Xs({options:e,typeName:be.ZodUnion,...Ee(t)});var ri=e=>e instanceof ea?ri(e.schema):e instanceof $n?ri(e.innerType()):e instanceof ta?[e.value]:e instanceof ra?e.options:e instanceof na?Ne.objectValues(e.enum):e instanceof oa?ri(e._def.innerType):e instanceof Js?[void 0]:e instanceof Ys?[null]:e instanceof Rn?[void 0,...ri(e.unwrap())]:e instanceof Eo?[null,...ri(e.unwrap())]:e instanceof El||e instanceof sa?ri(e.unwrap()):e instanceof ia?ri(e._def.innerType):[],Wm=class e extends ke{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ce.object)return se(r,{code:Y.invalid_type,expected:ce.object,received:r.parsedType}),ge;let o=this.discriminator,n=r.data[o],i=this.optionsMap.get(n);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(se(r,{code:Y.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),ge)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,o){let n=new Map;for(let i of r){let s=ri(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of s){if(n.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);n.set(a,i);}}return new e({typeName:be.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:n,...Ee(o)})}};function hw(e,t){let r=wo(e),o=wo(t);if(e===t)return {valid:true,data:e};if(r===ce.object&&o===ce.object){let n=Ne.objectKeys(t),i=Ne.objectKeys(e).filter(a=>n.indexOf(a)!==-1),s={...e,...t};for(let a of i){let c=hw(e[a],t[a]);if(!c.valid)return {valid:false};s[a]=c.data;}return {valid:true,data:s}}else if(r===ce.array&&o===ce.array){if(e.length!==t.length)return {valid:false};let n=[];for(let i=0;i<e.length;i++){let s=e[i],a=t[i],c=hw(s,a);if(!c.valid)return {valid:false};n.push(c.data);}return {valid:true,data:n}}else return r===ce.date&&o===ce.date&&+e==+t?{valid:true,data:e}:{valid:false}}var Qs=class extends ke{_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=(i,s)=>{if(Gm(i)||Gm(s))return ge;let a=hw(i.value,s.value);return a.valid?((qm(i)||qm(s))&&r.dirty(),{status:r.value,value:a.data}):(se(o,{code:Y.invalid_intersection_types}),ge)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([i,s])=>n(i,s)):n(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}};Qs.create=(e,t,r)=>new Qs({left:e,right:t,typeName:be.ZodIntersection,...Ee(r)});var _o=class e extends ke{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.array)return se(o,{code:Y.invalid_type,expected:ce.array,received:o.parsedType}),ge;if(o.data.length<this._def.items.length)return se(o,{code:Y.too_small,minimum:this._def.items.length,inclusive:true,exact:false,type:"array"}),ge;!this._def.rest&&o.data.length>this._def.items.length&&(se(o,{code:Y.too_big,maximum:this._def.items.length,inclusive:true,exact:false,type:"array"}),r.dirty());let i=[...o.data].map((s,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new Tn(o,s,o.path,a)):null}).filter(s=>!!s);return o.common.async?Promise.all(i).then(s=>dr.mergeArray(r,s)):dr.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};_o.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new _o({items:e,typeName:be.ZodTuple,rest:null,...Ee(t)})};var Km=class e extends ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.object)return se(o,{code:Y.invalid_type,expected:ce.object,received:o.parsedType}),ge;let n=[],i=this._def.keyType,s=this._def.valueType;for(let a in o.data)n.push({key:i._parse(new Tn(o,a,o.path,a)),value:s._parse(new Tn(o,o.data[a],o.path,a)),alwaysSet:a in o.data});return o.common.async?dr.mergeObjectAsync(r,n):dr.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(t,r,o){return r instanceof ke?new e({keyType:t,valueType:r,typeName:be.ZodRecord,...Ee(o)}):new e({keyType:Gi.create(),valueType:t,typeName:be.ZodRecord,...Ee(r)})}},Tc=class extends ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.map)return se(o,{code:Y.invalid_type,expected:ce.map,received:o.parsedType}),ge;let n=this._def.keyType,i=this._def.valueType,s=[...o.data.entries()].map(([a,c],u)=>({key:n._parse(new Tn(o,a,o.path,[u,"key"])),value:i._parse(new Tn(o,c,o.path,[u,"value"]))}));if(o.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of s){let u=await c.key,f=await c.value;if(u.status==="aborted"||f.status==="aborted")return ge;(u.status==="dirty"||f.status==="dirty")&&r.dirty(),a.set(u.value,f.value);}return {status:r.value,value:a}})}else {let a=new Map;for(let c of s){let u=c.key,f=c.value;if(u.status==="aborted"||f.status==="aborted")return ge;(u.status==="dirty"||f.status==="dirty")&&r.dirty(),a.set(u.value,f.value);}return {status:r.value,value:a}}}};Tc.create=(e,t,r)=>new Tc({valueType:t,keyType:e,typeName:be.ZodMap,...Ee(r)});var $c=class e extends ke{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==ce.set)return se(o,{code:Y.invalid_type,expected:ce.set,received:o.parsedType}),ge;let n=this._def;n.minSize!==null&&o.data.size<n.minSize.value&&(se(o,{code:Y.too_small,minimum:n.minSize.value,type:"set",inclusive:true,exact:false,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&o.data.size>n.maxSize.value&&(se(o,{code:Y.too_big,maximum:n.maxSize.value,type:"set",inclusive:true,exact:false,message:n.maxSize.message}),r.dirty());let i=this._def.valueType;function s(c){let u=new Set;for(let f of c){if(f.status==="aborted")return ge;f.status==="dirty"&&r.dirty(),u.add(f.value);}return {status:r.value,value:u}}let a=[...o.data.values()].map((c,u)=>i._parse(new Tn(o,c,o.path,u)));return o.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:le.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:le.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};$c.create=(e,t)=>new $c({valueType:e,minSize:null,maxSize:null,typeName:be.ZodSet,...Ee(t)});var Jm=class e extends ke{constructor(){super(...arguments),this.validate=this.implement;}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ce.function)return se(r,{code:Y.invalid_type,expected:ce.function,received:r.parsedType}),ge;function o(a,c){return _l({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Sc(),ti].filter(u=>!!u),issueData:{code:Y.invalid_arguments,argumentsError:c}})}function n(a,c){return _l({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Sc(),ti].filter(u=>!!u),issueData:{code:Y.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof Wi){let a=this;return Sr(async function(...c){let u=new Xr([]),f=await a._def.args.parseAsync(c,i).catch(h=>{throw u.addIssue(o(c,h)),u}),d=await Reflect.apply(s,this,f);return await a._def.returns._def.type.parseAsync(d,i).catch(h=>{throw u.addIssue(n(d,h)),u})})}else {let a=this;return Sr(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new Xr([o(c,u.error)]);let f=Reflect.apply(s,this,u.data),d=a._def.returns.safeParse(f,i);if(!d.success)throw new Xr([n(f,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:_o.create(t).rest(ni.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,o){return new e({args:t||_o.create([]).rest(ni.create()),returns:r||ni.create(),typeName:be.ZodFunction,...Ee(o)})}},ea=class extends ke{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};ea.create=(e,t)=>new ea({getter:e,typeName:be.ZodLazy,...Ee(t)});var ta=class extends ke{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return se(r,{received:r.data,code:Y.invalid_literal,expected:this._def.value}),ge}return {status:"valid",value:t.data}}get value(){return this._def.value}};ta.create=(e,t)=>new ta({value:e,typeName:be.ZodLiteral,...Ee(t)});function sI(e,t){return new ra({values:e,typeName:be.ZodEnum,...Ee(t)})}var ra=class e extends ke{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),o=this._def.values;return se(r,{expected:Ne.joinValues(o),received:r.parsedType,code:Y.invalid_type}),ge}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),o=this._def.values;return se(r,{received:r.data,code:Y.invalid_enum_value,options:o}),ge}return Sr(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(o=>!t.includes(o)),{...this._def,...r})}};ra.create=sI;var na=class extends ke{_parse(t){let r=Ne.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==ce.string&&o.parsedType!==ce.number){let n=Ne.objectValues(r);return se(o,{expected:Ne.joinValues(n),received:o.parsedType,code:Y.invalid_type}),ge}if(this._cache||(this._cache=new Set(Ne.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let n=Ne.objectValues(r);return se(o,{received:o.data,code:Y.invalid_enum_value,options:n}),ge}return Sr(t.data)}get enum(){return this._def.values}};na.create=(e,t)=>new na({values:e,typeName:be.ZodNativeEnum,...Ee(t)});var Wi=class extends ke{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ce.promise&&r.common.async===false)return se(r,{code:Y.invalid_type,expected:ce.promise,received:r.parsedType}),ge;let o=r.parsedType===ce.promise?r.data:Promise.resolve(r.data);return Sr(o.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Wi.create=(e,t)=>new Wi({type:e,typeName:be.ZodPromise,...Ee(t)});var $n=class extends ke{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===be.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=this._def.effect||null,i={addIssue:s=>{se(o,s),s.fatal?r.abort():r.dirty();},get path(){return o.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){let s=n.transform(o.data,i);if(o.common.async)return Promise.resolve(s).then(async a=>{if(r.value==="aborted")return ge;let c=await this._def.schema._parseAsync({data:a,path:o.path,parent:o});return c.status==="aborted"?ge:c.status==="dirty"?Zs(c.value):r.value==="dirty"?Zs(c.value):c});{if(r.value==="aborted")return ge;let a=this._def.schema._parseSync({data:s,path:o.path,parent:o});return a.status==="aborted"?ge:a.status==="dirty"?Zs(a.value):r.value==="dirty"?Zs(a.value):a}}if(n.type==="refinement"){let s=a=>{let c=n.refinement(a,i);if(o.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(o.common.async===false){let a=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return a.status==="aborted"?ge:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(a=>a.status==="aborted"?ge:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(n.type==="transform")if(o.common.async===false){let s=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!Zi(s))return ge;let a=n.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return {status:r.value,value:a}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=>Zi(s)?Promise.resolve(n.transform(s.value,i)).then(a=>({status:r.value,value:a})):ge);Ne.assertNever(n);}};$n.create=(e,t,r)=>new $n({schema:e,typeName:be.ZodEffects,effect:t,...Ee(r)});$n.createWithPreprocess=(e,t,r)=>new $n({schema:t,effect:{type:"preprocess",transform:e},typeName:be.ZodEffects,...Ee(r)});var Rn=class extends ke{_parse(t){return this._getType(t)===ce.undefined?Sr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Rn.create=(e,t)=>new Rn({innerType:e,typeName:be.ZodOptional,...Ee(t)});var Eo=class extends ke{_parse(t){return this._getType(t)===ce.null?Sr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Eo.create=(e,t)=>new Eo({innerType:e,typeName:be.ZodNullable,...Ee(t)});var oa=class extends ke{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return r.parsedType===ce.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};oa.create=(e,t)=>new oa({innerType:e,typeName:be.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ee(t)});var ia=class extends ke{_parse(t){let{ctx:r}=this._processInputParams(t),o={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return Ic(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Xr(o.common.issues)},input:o.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Xr(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}};ia.create=(e,t)=>new ia({innerType:e,typeName:be.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ee(t)});var Oc=class extends ke{_parse(t){if(this._getType(t)!==ce.nan){let o=this._getOrReturnCtx(t);return se(o,{code:Y.invalid_type,expected:ce.nan,received:o.parsedType}),ge}return {status:"valid",value:t.data}}};Oc.create=e=>new Oc({typeName:be.ZodNaN,...Ee(e)});var CC=Symbol("zod_brand"),El=class extends ke{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return this._def.type._parse({data:o,path:r.path,parent:r})}unwrap(){return this._def.type}},Sl=class e extends ke{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.common.async)return (async()=>{let i=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?ge:i.status==="dirty"?(r.dirty(),Zs(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{let n=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return n.status==="aborted"?ge:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:o.path,parent:o})}}static create(t,r){return new e({in:t,out:r,typeName:be.ZodPipeline})}},sa=class extends ke{_parse(t){let r=this._def.innerType._parse(t),o=n=>(Zi(n)&&(n.value=Object.freeze(n.value)),n);return Ic(r)?r.then(n=>o(n)):o(r)}unwrap(){return this._def.innerType}};sa.create=(e,t)=>new sa({innerType:e,typeName:be.ZodReadonly,...Ee(t)});function rI(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function aI(e,t={},r){return e?qi.create().superRefine((o,n)=>{let i=e(o);if(i instanceof Promise)return i.then(s=>{if(!s){let a=rI(t,o),c=a.fatal??r??true;n.addIssue({code:"custom",...a,fatal:c});}});if(!i){let s=rI(t,o),a=s.fatal??r??true;n.addIssue({code:"custom",...s,fatal:a});}}):qi.create()}var zC={object:Qr.lazycreate},be;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly";})(be||(be={}));var LC=(e,t={message:`Input not instance of ${e.name}`})=>aI(r=>r instanceof e,t),cI=Gi.create,uI=Gs.create,UC=Oc.create,MC=qs.create,fI=Ws.create,DC=Ks.create,jC=kc.create,FC=Js.create,HC=Ys.create,VC=qi.create,ZC=ni.create,GC=Qn.create,qC=Rc.create,WC=oi.create,KC=Qr.create,JC=Qr.strictCreate,YC=Xs.create,XC=Wm.create,QC=Qs.create,ez=_o.create,tz=Km.create,rz=Tc.create,nz=$c.create,oz=Jm.create,iz=ea.create,sz=ta.create,az=ra.create,cz=na.create,uz=Wi.create,fz=$n.create,lz=Rn.create,dz=Eo.create,pz=$n.createWithPreprocess,mz=Sl.create,hz=()=>cI().optional(),gz=()=>uI().optional(),yz=()=>fI().optional(),bz={string:(e=>Gi.create({...e,coerce:true})),number:(e=>Gs.create({...e,coerce:true})),boolean:(e=>Ws.create({...e,coerce:true})),bigint:(e=>qs.create({...e,coerce:true})),date:(e=>Ks.create({...e,coerce:true}))};var xz=ge;var vz=/[@#$%^&*+=/\\|~«»]/,wz=/(!{2,}|\?{2,}|-{2,})/,_z=/[\u{1F300}-\u{1F9FF}]|[\u{2702}-\u{27B0}]|[\u{2600}-\u{26FF}]|[\u{2B00}-\u{2BFF}]/u,aa=({max:e,noSpaces:t}={})=>(t?ie.string().max(e??Number.POSITIVE_INFINITY).regex(/^\S*$/,"Spaces are not allowed"):ie.string().max(e??Number.POSITIVE_INFINITY)).refine(o=>!_z.test(o),{message:"Emojis and symbols are not allowed"}).refine(o=>!vz.test(o),{message:"Special characters (@, #, $, %, ^, &, *, +, =, /, \\, |, ~, \xAB, \xBB) are not allowed"}).refine(o=>!wz.test(o),{message:"Repeated punctuations (!!, ??, --) are not allowed"}),ir=ie.string().url().startsWith("https://",{message:"Must be an https url"}).max(1024).refine(e=>!e.includes(" "),{message:"URL must not contain spaces"}).refine(e=>{try{let t=new URL(e).hostname;return !(t==="localhost"||t.endsWith(".localhost")||/^(\d{1,3}\.){3}\d{1,3}$/.test(t)||t.startsWith("[")&&t.endsWith("]"))}catch{return false}},{message:"URL must not use IP addresses or localhost"}),Il=ie.string().max(32),Ym=ie.string().max(32),Ez=/^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,32}\/(?:[-a-z0-9]{3,8}:[-.%a-zA-Z0-9]{1,128}(?:\/[-.%a-zA-Z0-9]{1,78})?|native)$/,lI=ie.string().regex(Ez,{message:"Invalid CAIP-19 asset ID"}),Al=ie.string().regex(/^#([0-9A-F]{3}|[0-9A-F]{6})$/i,{message:"Invalid hex color code. It should be in the format #RRGGBB or #RGB."}),Sz=/^(?!.*\.\.)([a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,dI=ie.string().max(1024).regex(Sz,{message:"Must be a valid domain name (e.g., example.com, sub.example.com)"}).refine(e=>!e.includes("://"),{message:"Domain must not include protocol (http://, https://, etc.)"}).refine(e=>!e.includes("/"),{message:"Domain must not include path separators"}).refine(e=>!e.includes("@"),{message:"Domain must not include @ symbol"}).refine(e=>!e.includes(":"),{message:"Domain must not include port numbers"}),pI=ie.union([ie.literal("1:1"),ie.literal("3:2")]),mI=ie.object({header:ie.string(),payload:ie.string(),signature:ie.string()});ie.object({fid:ie.number(),type:ie.literal("app_key"),key:ie.string().startsWith("0x")});var Iz=ie.object({type:ie.literal("launch_frame"),name:Il,url:ir.optional(),splashImageUrl:ir.optional(),splashBackgroundColor:Al.optional()}),Az=ie.object({type:ie.literal("launch_miniapp"),name:Il,url:ir.optional(),splashImageUrl:ir.optional(),splashBackgroundColor:Al.optional()}),kz=ie.object({type:ie.literal("view_token"),token:lI}),Rz=ie.discriminatedUnion("type",[Az,kz,Iz]),Tz=ie.object({title:Ym,action:Rz});ie.object({version:ie.union([ie.string(),ie.number()]).transform(e=>String(e)).pipe(ie.union([ie.literal("next"),ie.literal("1")])),imageUrl:ir,aspectRatio:pI.optional(),button:Tz});var gw=ie.object({url:ie.string(),token:ie.string()});ie.object({notificationId:ie.string().max(128),title:ie.string().max(32),body:ie.string().max(128),targetUrl:ir,tokens:ie.string().array().max(100)});ie.object({result:ie.object({successfulTokens:ie.array(ie.string()),invalidTokens:ie.array(ie.string()),rateLimitedTokens:ie.array(ie.string())})});var $z=ie.object({event:ie.literal("miniapp_added"),notificationDetails:gw.optional()}),Oz=ie.object({event:ie.literal("miniapp_removed")}),Nz=ie.object({event:ie.literal("notifications_enabled"),notificationDetails:gw.required()}),Pz=ie.object({event:ie.literal("notifications_disabled")});ie.discriminatedUnion("event",[$z,Oz,Nz,Pz]);var hI=["wallet.getEthereumProvider","wallet.getSolanaProvider","actions.ready","actions.openUrl","actions.close","actions.setPrimaryButton","actions.addMiniApp","actions.signIn","actions.viewCast","actions.viewProfile","actions.composeCast","actions.viewToken","actions.sendToken","actions.swapToken","actions.openMiniApp","actions.requestCameraAndMicrophoneAccess","experimental.signManifest","haptics.impactOccurred","haptics.notificationOccurred","haptics.selectionChanged","back"];var Bz=["games","social","finance","utility","productivity","health-fitness","news-media","music","shopping","education","developer-tools","entertainment","art-creativity"],Cz=ie.enum(Bz),zz=ie.union([ie.literal("0.0.0"),ie.literal("0.0.1"),ie.literal("1"),ie.literal("next")]),Lz=aa({max:30}),Uz=aa({max:170}),Mz=ie.array(ir).max(3),Dz=ie.array(aa({max:20,noSpaces:true})).max(5),jz=aa({max:30}),Fz=aa({max:30}),Hz=aa({max:100}),Vz=ie.boolean(),Zz=["eip155:1","eip155:8453","eip155:42161","eip155:421614","eip155:84532","eip155:666666666","eip155:100","eip155:10","eip155:11155420","eip155:137","eip155:11155111","eip155:7777777","eip155:130","eip155:10143","eip155:42220","eip155:999","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"];function yI(e){let t=new Set(e);return Array.from(t)}var Gz=ie.array(ie.enum(Zz)).transform(yI),qz=ie.array(ie.enum(hI)).transform(yI),gI=ie.object({version:zz,name:Il,iconUrl:ir,homeUrl:ir,imageUrl:ir.optional(),buttonTitle:Ym.optional(),splashImageUrl:ir.optional(),splashBackgroundColor:Al.optional(),webhookUrl:ir.optional(),subtitle:Lz.optional(),description:Uz.optional(),screenshotUrls:Mz.optional(),primaryCategory:Cz.optional(),tags:Dz.optional(),heroImageUrl:ir.optional(),tagline:jz.optional(),ogTitle:Fz.optional(),ogDescription:Hz.optional(),ogImageUrl:ir.optional(),noindex:Vz.optional(),requiredChains:Gz.optional(),requiredCapabilities:qz.optional(),castShareUrl:ir.optional(),canonicalDomain:dI.optional()}).refine(e=>{if(e.castShareUrl===void 0)return true;try{let t=new URL(e.homeUrl).hostname,r=new URL(e.castShareUrl).hostname;return t===r}catch{return false}},{message:"castShareUrl must have the same domain as homeUrl",path:["castShareUrl"]});ie.object({accountAssociation:mI,miniapp:gI.optional(),frame:gI.optional()}).refine(e=>e.frame&&e.miniapp?JSON.stringify(e.frame)===JSON.stringify(e.miniapp):true,{message:'If both "frame" and "miniapp" are provided, they must be identical',path:["frame","miniapp"]}).transform(e=>({...e,frame:e.frame??e.miniapp}));var xe=Ko(Rl());sh();ai();Vw();wa();xa();var $o=BigInt(0),Fr=BigInt(1),_A=BigInt(2),GL=BigInt(8),qL={zip215:true};function WL(e){let t=Cl(e);return to(e,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...t})}function EA(e){let t=WL(e),{Fp:r,n:o,prehash:n,hash:i,randomBytes:s,nByteLength:a,h:c}=t,u=_A<<BigInt(a*8)-Fr,f=r.create,d=di(t.n,t.nBitLength);function g(x,_){let k=r.sqr(x),w=r.sqr(_),p=r.add(r.mul(t.a,k),w),A=r.add(r.ONE,r.mul(t.d,r.mul(k,w)));return r.eql(p,A)}if(!g(t.Gx,t.Gy))throw new Error("bad curve params: generator point");let h=t.uvRatio||((x,_)=>{try{return {isValid:!0,value:r.sqrt(x*r.inv(_))}}catch{return {isValid:false,value:$o}}}),v=t.adjustScalarBytes||(x=>x),E=t.domain||((x,_,k)=>{if(Ro("phflag",k),_.length||k)throw new Error("Contexts/pre-hash are not supported");return x});function R(x,_,k=false){let w=k?Fr:$o;Dr("coordinate "+x,_,w,u);}function $(x){if(!(x instanceof I))throw new Error("ExtendedPoint expected")}let N=Mc((x,_)=>{let{ex:k,ey:w,ez:p}=x,A=x.is0();_==null&&(_=A?GL:r.inv(p));let G=f(k*_),K=f(w*_),Q=f(p*_);if(A)return {x:$o,y:Fr};if(Q!==Fr)throw new Error("invZ was invalid");return {x:G,y:K}}),O=Mc(x=>{let{a:_,d:k}=t;if(x.is0())throw new Error("bad point: ZERO");let{ex:w,ey:p,ez:A,et:G}=x,K=f(w*w),Q=f(p*p),ae=f(A*A),he=f(ae*ae),ye=f(K*_),We=f(ae*f(ye+Q)),Se=f(he+f(k*f(K*Q)));if(We!==Se)throw new Error("bad point: equation left != right (1)");let _e=f(w*p),tr=f(A*G);if(_e!==tr)throw new Error("bad point: equation left != right (2)");return true});class I{constructor(_,k,w,p){R("x",_),R("y",k),R("z",w,true),R("t",p),this.ex=_,this.ey=k,this.ez=w,this.et=p,Object.freeze(this);}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(_){if(_ instanceof I)throw new Error("extended point not allowed");let{x:k,y:w}=_||{};return R("x",k),R("y",w),new I(k,w,Fr,f(k*w))}static normalizeZ(_){let k=li(r,_.map(w=>w.ez));return _.map((w,p)=>w.toAffine(k[p])).map(I.fromAffine)}static msm(_,k){return lh(I,d,_,k)}_setWindowSize(_){C.setWindowSize(this,_);}assertValidity(){O(this);}equals(_){$(_);let{ex:k,ey:w,ez:p}=this,{ex:A,ey:G,ez:K}=_,Q=f(k*K),ae=f(A*p),he=f(w*K),ye=f(G*p);return Q===ae&&he===ye}is0(){return this.equals(I.ZERO)}negate(){return new I(f(-this.ex),this.ey,this.ez,f(-this.et))}double(){let{a:_}=t,{ex:k,ey:w,ez:p}=this,A=f(k*k),G=f(w*w),K=f(_A*f(p*p)),Q=f(_*A),ae=k+w,he=f(f(ae*ae)-A-G),ye=Q+G,We=ye-K,Se=Q-G,_e=f(he*We),tr=f(ye*Se),Ce=f(he*Se),je=f(We*ye);return new I(_e,tr,je,Ce)}add(_){$(_);let{a:k,d:w}=t,{ex:p,ey:A,ez:G,et:K}=this,{ex:Q,ey:ae,ez:he,et:ye}=_,We=f(p*Q),Se=f(A*ae),_e=f(K*w*ye),tr=f(G*he),Ce=f((p+A)*(Q+ae)-We-Se),je=tr-_e,Li=tr+_e,pt=f(Se-k*We),gt=f(Ce*je),Bp=f(Li*pt),yt=f(Ce*pt),bt=f(je*Li);return new I(gt,Bp,bt,yt)}subtract(_){return this.add(_.negate())}wNAF(_){return C.wNAFCached(this,_,I.normalizeZ)}multiply(_){let k=_;Dr("scalar",k,Fr,o);let{p:w,f:p}=this.wNAF(k);return I.normalizeZ([w,p])[0]}multiplyUnsafe(_,k=I.ZERO){let w=_;return Dr("scalar",w,$o,o),w===$o?L:this.is0()||w===Fr?this:C.wNAFCachedUnsafe(this,w,I.normalizeZ,k)}isSmallOrder(){return this.multiplyUnsafe(c).is0()}isTorsionFree(){return C.unsafeLadder(this,o).is0()}toAffine(_){return N(this,_)}clearCofactor(){let{h:_}=t;return _===Fr?this:this.multiplyUnsafe(_)}static fromHex(_,k=false){let{d:w,a:p}=t,A=r.BYTES;_=Ge("pointHex",_,A),Ro("zip215",k);let G=_.slice(),K=_[A-1];G[A-1]=K&-129;let Q=ga(G),ae=k?u:r.ORDER;Dr("pointHex.y",Q,$o,ae);let he=f(Q*Q),ye=f(he-Fr),We=f(w*he-p),{isValid:Se,value:_e}=h(ye,We);if(!Se)throw new Error("Point.fromHex: invalid y coordinate");let tr=(_e&Fr)===Fr,Ce=(K&128)!==0;if(!k&&_e===$o&&Ce)throw new Error("Point.fromHex: x=0 and x_0=1");return Ce!==tr&&(_e=f(-_e)),I.fromAffine({x:_e,y:Q})}static fromPrivateKey(_){let{scalar:k}=H(_);return P.multiply(k)}toRawBytes(){let{x:_,y:k}=this.toAffine(),w=Uc(k,r.BYTES);return w[w.length-1]|=_&Fr?128:0,w}toHex(){return es(this.toRawBytes())}}I.BASE=new I(t.Gx,t.Gy,Fr,f(t.Gx*t.Gy)),I.ZERO=new I($o,Fr,Fr,$o);let{BASE:P,ZERO:L}=I,C=fh(I,a*8);function D(x){return Le(x,o)}function q(x){return D(ga(x))}function H(x){let _=r.BYTES;x=Ge("private key",x,_);let k=Ge("hashed private key",i(x),2*_),w=v(k.slice(0,_)),p=k.slice(_,2*_),A=q(w);return {head:w,prefix:p,scalar:A}}function Z(x){let{head:_,prefix:k,scalar:w}=H(x),p=P.multiply(w),A=p.toRawBytes();return {head:_,prefix:k,scalar:w,point:p,pointBytes:A}}function re(x){return Z(x).pointBytes}function S(x=Uint8Array.of(),..._){let k=ar(..._);return q(i(E(k,Ge("context",x),!!n)))}function l(x,_,k={}){x=Ge("message",x),n&&(x=n(x));let{prefix:w,scalar:p,pointBytes:A}=Z(_),G=S(k.context,w,x),K=P.multiply(G).toRawBytes(),Q=S(k.context,K,A,x),ae=D(G+Q*p);Dr("signature.s",ae,$o,o);let he=ar(K,Uc(ae,r.BYTES));return Ge("result",he,r.BYTES*2)}let m=qL;function y(x,_,k,w=m){let{context:p,zip215:A}=w,G=r.BYTES;x=Ge("signature",x,2*G),_=Ge("message",_),k=Ge("publicKey",k,G),A!==void 0&&Ro("zip215",A),n&&(_=n(_));let K=ga(x.slice(G,2*G)),Q,ae,he;try{Q=I.fromHex(k,A),ae=I.fromHex(x.slice(0,G),A),he=P.multiplyUnsafe(K);}catch{return false}if(!A&&Q.isSmallOrder())return false;let ye=S(p,ae.toRawBytes(),Q.toRawBytes(),_);return ae.add(Q.multiplyUnsafe(ye)).subtract(he).clearCofactor().equals(I.ZERO)}return P._setWindowSize(8),{CURVE:t,getPublicKey:re,sign:l,verify:y,ExtendedPoint:I,utils:{getExtendedPublicKey:Z,randomPrivateKey:()=>s(r.BYTES),precompute(x=8,_=I.BASE){return _._setWindowSize(x),_.multiply(BigInt(3)),_}}}}wa();var Zw=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),RA=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");BigInt(0);var QL=BigInt(1),TA=BigInt(2);BigInt(3);var eU=BigInt(5),tU=BigInt(8);function rU(e){let t=BigInt(10),r=BigInt(20),o=BigInt(40),n=BigInt(80),i=Zw,a=e*e%i*e%i,c=at(a,TA,i)*a%i,u=at(c,QL,i)*e%i,f=at(u,eU,i)*u%i,d=at(f,t,i)*f%i,g=at(d,r,i)*d%i,h=at(g,o,i)*g%i,v=at(h,n,i)*h%i,E=at(v,n,i)*h%i,R=at(E,t,i)*f%i;return {pow_p_5_8:at(R,TA,i)*e%i,b2:a}}function nU(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}function oU(e,t){let r=Zw,o=Le(t*t*t,r),n=Le(o*o*t,r),i=rU(e*n).pow_p_5_8,s=Le(e*o*i,r),a=Le(t*s*s,r),c=s,u=Le(s*RA,r),f=a===e,d=a===Le(-e,r),g=a===Le(-e*RA,r);return f&&(s=c),(d||g)&&(s=u),hA(s,r)&&(s=Le(-s,r)),{isValid:f||d,value:s}}var $A=di(Zw,void 0,true),iU={a:$A.create(BigInt(-1)),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:$A,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:tU,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:nA,randomBytes:zc,adjustScalarBytes:nU,uvRatio:oU},_a=EA(iU);var F_=Ko(qw()),Nr=Ko(Kw());sh();var Ll=ha;var Yc=Ko(VA()),T=Ko(o_()),pR=Ko(o_());var i_=8078e3,s_=8078001,a_=8078004,c_=8078005,u_=8078006,f_=8078011;function YA(e){return Array.isArray(e)?"%5B"+e.map(YA).join("%2C%20")+"%5D":typeof e=="bigint"?`${e}n`:encodeURIComponent(String(e!=null&&Object.getPrototypeOf(e)===null?{...e}:e))}function Sj([e,t]){return `${e}=${YA(t)}`}function Ij(e){let t=Object.entries(e).map(Sj).join("&");return btoa(t)}function Aj(e,t={}){{let r=`Solana error #${e}; Decode this error by running \`npx @solana/errors decode -- ${e}`;return Object.keys(t).length&&(r+=` '${Ij(t)}'`),`${r}\``}}var os=class extends Error{cause=this.cause;context;constructor(...[e,t]){let r,o;if(t){let{cause:i,...s}=t;i&&(o={cause:i}),Object.keys(s).length>0&&(r=s);}let n=Aj(e,r);super(n,o),this.context={__code:e,...r},this.name="SolanaError";}};function kj(e,t){return "fixedSize"in t?t.fixedSize:t.getSizeFromValue(e)}function XA(e){return Object.freeze({...e,encode:t=>{let r=new Uint8Array(kj(t,e));return e.write(t,r,0),r}})}function QA(e){return Object.freeze({...e,decode:(t,r=0)=>e.read(t,r)[0]})}function Vc(e){return "fixedSize"in e&&typeof e.fixedSize=="number"}function ek(e,t){if(Vc(e)!==Vc(t))throw new os(a_);if(Vc(e)&&Vc(t)&&e.fixedSize!==t.fixedSize)throw new os(c_,{decoderFixedSize:t.fixedSize,encoderFixedSize:e.fixedSize});if(!Vc(e)&&!Vc(t)&&e.maxSize!==t.maxSize)throw new os(u_,{decoderMaxSize:t.maxSize,encoderMaxSize:e.maxSize});return {...t,...e,decode:t.decode,encode:e.encode,read:t.read,write:e.write}}function tk(e,t,r=0){if(t.length-r<=0)throw new os(i_,{codecDescription:e})}function rk(e,t,r,o=0){let n=r.length-o;if(n<t)throw new os(s_,{bytesLength:n,codecDescription:e,expected:t})}function Rj(e,t,r,o){if(o<t||o>r)throw new os(f_,{codecDescription:e,max:r,min:t,value:o})}function nk(e){return e?.endian!==1}function Tj(e){return XA({fixedSize:e.size,write(t,r,o){e.range&&Rj(e.name,e.range[0],e.range[1],t);let n=new ArrayBuffer(e.size);return e.set(new DataView(n),t,nk(e.config)),r.set(new Uint8Array(n),o),o+e.size}})}function $j(e){return QA({fixedSize:e.size,read(t,r=0){tk(e.name,t,r),rk(e.name,e.size,t,r);let o=new DataView(Oj(t,r,e.size));return [e.get(o,nk(e.config)),r+e.size]}})}function Oj(e,t,r){let o=e.byteOffset+(t??0),n=r??e.byteLength;return e.buffer.slice(o,o+n)}var l_=(e={})=>Tj({config:e,name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(t,r,o)=>t.setBigUint64(0,BigInt(r),o),size:8}),Nj=(e={})=>$j({config:e,get:(t,r)=>t.getBigUint64(0,r),name:"u64",size:8}),ok=(e={})=>ek(l_(e),Nj(e));var d_=class extends TypeError{constructor(t,r){let o,{message:n,explanation:i,...s}=t,{path:a}=t,c=a.length===0?n:`At path: ${a.join(".")} -- ${n}`;super(i??c),i!=null&&(this.cause=c),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>o??(o=[t,...r()]);}};function Pj(e){return Hl(e)&&typeof e[Symbol.iterator]=="function"}function Hl(e){return typeof e=="object"&&e!=null}function Mh(e){return Hl(e)&&!Array.isArray(e)}function ro(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function Bj(e){let{done:t,value:r}=e.next();return t?void 0:r}function Cj(e,t,r,o){if(e===true)return;e===false?e={}:typeof e=="string"&&(e={message:e});let{path:n,branch:i}=t,{type:s}=r,{refinement:a,message:c=`Expected a value of type \`${s}\`${a?` with refinement \`${a}\``:""}, but received: \`${ro(o)}\``}=e;return {value:o,type:s,refinement:a,key:n[n.length-1],path:n,branch:i,...e,message:c}}function*ik(e,t,r,o){Pj(e)||(e=[e]);for(let n of e){let i=Cj(n,t,r,o);i&&(yield i);}}function*p_(e,t,r={}){let{path:o=[],branch:n=[e],coerce:i=false,mask:s=false}=r,a={path:o,branch:n,mask:s};i&&(e=t.coercer(e,a));let c="valid";for(let u of t.validator(e,a))u.explanation=r.message,c="not_valid",yield [u,void 0];for(let[u,f,d]of t.entries(e,a)){let g=p_(f,d,{path:u===void 0?o:[...o,u],branch:u===void 0?n:[...n,f],coerce:i,mask:s,message:r.message});for(let h of g)h[0]?(c=h[0].refinement!=null?"not_refined":"not_valid",yield [h[0],void 0]):i&&(f=h[1],u===void 0?e=f:e instanceof Map?e.set(u,f):e instanceof Set?e.add(f):Hl(e)&&(f!==void 0||u in e)&&(e[u]=f));}if(c!=="not_valid")for(let u of t.refiner(e,a))u.explanation=r.message,c="not_refined",yield [u,void 0];c==="valid"&&(yield [void 0,e]);}var Pn=class{constructor(t){let{type:r,schema:o,validator:n,refiner:i,coercer:s=c=>c,entries:a=function*(){}}=t;this.type=r,this.schema=o,this.entries=a,this.coercer=s,n?this.validator=(c,u)=>{let f=n(c,u);return ik(f,u,this,c)}:this.validator=()=>[],i?this.refiner=(c,u)=>{let f=i(c,u);return ik(f,u,this,c)}:this.refiner=()=>[];}assert(t,r){return sk(t,this,r)}create(t,r){return Zc(t,this,r)}is(t){return ak(t,this)}mask(t,r){return zj(t,this,r)}validate(t,r={}){return Vl(t,this,r)}};function sk(e,t,r){let o=Vl(e,t,{message:r});if(o[0])throw o[0]}function Zc(e,t,r){let o=Vl(e,t,{coerce:true,message:r});if(o[0])throw o[0];return o[1]}function zj(e,t,r){let o=Vl(e,t,{coerce:true,mask:true,message:r});if(o[0])throw o[0];return o[1]}function ak(e,t){return !Vl(e,t)[0]}function Vl(e,t,r={}){let o=p_(e,t,r),n=Bj(o);return n[0]?[new d_(n[0],function*(){for(let s of o)s[0]&&(yield s[0]);}),void 0]:[void 0,n[1]]}function Aa(e,t){return new Pn({type:e,schema:null,validator:t})}function ck(){return Aa("any",()=>true)}function ue(e){return new Pn({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(let[r,o]of t.entries())yield [r,o,e];},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${ro(t)}`}})}function no(){return Aa("boolean",e=>typeof e=="boolean")}function Dh(e){return Aa("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${ro(t)}`)}function ct(e){let t=ro(e),r=typeof e;return new Pn({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(o){return o===e||`Expected the literal \`${t}\`, but received: ${ro(o)}`}})}function Lj(){return Aa("never",()=>false)}function fe(e){return new Pn({...e,validator:(t,r)=>t===null||e.validator(t,r),refiner:(t,r)=>t===null||e.refiner(t,r)})}function U(){return Aa("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${ro(e)}`)}function me(e){return new Pn({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function m_(e,t){return new Pn({type:"record",schema:null,*entries(r){if(Hl(r))for(let o in r){let n=r[o];yield [o,o,e],yield [o,n,t];}},validator(r){return Mh(r)||`Expected an object, but received: ${ro(r)}`},coercer(r){return Mh(r)?{...r}:r}})}function ne(){return Aa("string",e=>typeof e=="string"||`Expected a string, but received: ${ro(e)}`)}function jh(e){let t=Lj();return new Pn({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){let o=Math.max(e.length,r.length);for(let n=0;n<o;n++)yield [n,r[n],e[n]||t];}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${ro(r)}`},coercer(r){return Array.isArray(r)?r.slice():r}})}function W(e){let t=Object.keys(e);return new Pn({type:"type",schema:e,*entries(r){if(Hl(r))for(let o of t)yield [o,r[o],e[o]];},validator(r){return Mh(r)||`Expected an object, but received: ${ro(r)}`},coercer(r){return Mh(r)?{...r}:r}})}function Ar(e){let t=e.map(r=>r.type).join(" | ");return new Pn({type:"union",schema:null,coercer(r,o){for(let n of e){let[i,s]=n.validate(r,{coerce:true,mask:o.mask});if(!i)return s}return r},validator(r,o){let n=[];for(let i of e){let[...s]=p_(r,i,o),[a]=s;if(a[0])for(let[c]of s)c&&n.push(c);else return []}return [`Expected the value to satisfy a union of \`${t}\`, but received: ${ro(r)}`,...n]}})}function ka(){return Aa("unknown",()=>true)}function Gc(e,t,r){return new Pn({...e,coercer:(o,n)=>ak(o,t)?e.coercer(r(o,n),n):e.coercer(o,n)})}Ko(Nk());Ko(Rl(),1);var Jl=Ko(Bk(),1);var Ck=Jl.default;Wh();rd();function rR(e){try{return _a.ExtendedPoint.fromHex(e),!0}catch{return false}}var n6=(e,t)=>_a.sign(e,t.slice(0,32)),P7=_a.verify,He=e=>xe.Buffer.isBuffer(e)?e:e instanceof Uint8Array?xe.Buffer.from(e.buffer,e.byteOffset,e.byteLength):xe.Buffer.from(e),V_=class{constructor(t){Object.assign(this,t);}encode(){return xe.Buffer.from((0, Yc.serialize)(e0,this))}static decode(t){return (0, Yc.deserialize)(e0,this,t)}static decodeUnchecked(t){return (0, Yc.deserializeUnchecked)(e0,this,t)}};var e0=new Map,mR,B7=32,ls=32;function C7(e){return e._bn!==void 0}var nR=1,Ie=class e extends V_{constructor(t){if(super({}),this._bn=void 0,C7(t))this._bn=t._bn;else {if(typeof t=="string"){let r=Nr.default.decode(t);if(r.length!=ls)throw new Error("Invalid public key input");this._bn=new F_.default(r);}else this._bn=new F_.default(t);if(this._bn.byteLength()>ls)throw new Error("Invalid public key input")}}static unique(){let t=new e(nR);return nR+=1,new e(t.toBuffer())}equals(t){return this._bn.eq(t._bn)}toBase58(){return Nr.default.encode(this.toBytes())}toJSON(){return this.toBase58()}toBytes(){let t=this.toBuffer();return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}toBuffer(){let t=this._bn.toArrayLike(xe.Buffer);if(t.length===ls)return t;let r=xe.Buffer.alloc(32);return t.copy(r,32-t.length),r}get[Symbol.toStringTag](){return `PublicKey(${this.toString()})`}toString(){return this.toBase58()}static async createWithSeed(t,r,o){let n=xe.Buffer.concat([t.toBuffer(),xe.Buffer.from(r),o.toBuffer()]),i=Ll(n);return new e(i)}static createProgramAddressSync(t,r){let o=xe.Buffer.alloc(0);t.forEach(function(i){if(i.length>B7)throw new TypeError("Max seed length exceeded");o=xe.Buffer.concat([o,He(i)]);}),o=xe.Buffer.concat([o,r.toBuffer(),xe.Buffer.from("ProgramDerivedAddress")]);let n=Ll(o);if(rR(n))throw new Error("Invalid seeds, address must fall off the curve");return new e(n)}static async createProgramAddress(t,r){return this.createProgramAddressSync(t,r)}static findProgramAddressSync(t,r){let o=255,n;for(;o!=0;){try{let i=t.concat(xe.Buffer.from([o]));n=this.createProgramAddressSync(i,r);}catch(i){if(i instanceof TypeError)throw i;o--;continue}return [n,o]}throw new Error("Unable to find a viable program address nonce")}static async findProgramAddress(t,r){return this.findProgramAddressSync(t,r)}static isOnCurve(t){let r=new e(t);return rR(r.toBytes())}};mR=Ie;Ie.default=new mR("11111111111111111111111111111111");e0.set(Ie,{kind:"struct",fields:[["_bn","u256"]]});new Ie("BPFLoader1111111111111111111111111111111111");var Ta=1232,o6=127,t0=64;var Kc=class{constructor(t,r){this.staticAccountKeys=void 0,this.accountKeysFromLookups=void 0,this.staticAccountKeys=t,this.accountKeysFromLookups=r;}keySegments(){let t=[this.staticAccountKeys];return this.accountKeysFromLookups&&(t.push(this.accountKeysFromLookups.writable),t.push(this.accountKeysFromLookups.readonly)),t}get(t){for(let r of this.keySegments()){if(t<r.length)return r[t];t-=r.length;}}get length(){return this.keySegments().flat().length}compileInstructions(t){if(this.length>256)throw new Error("Account index overflow encountered during compilation");let o=new Map;this.keySegments().flat().forEach((i,s)=>{o.set(i.toBase58(),s);});let n=i=>{let s=o.get(i.toBase58());if(s===void 0)throw new Error("Encountered an unknown instruction account key during compilation");return s};return t.map(i=>({programIdIndex:n(i.programId),accountKeyIndexes:i.keys.map(s=>n(s.pubkey)),data:i.data}))}},Pe=(e="publicKey")=>T.blob(32,e),z7=(e="signature")=>T.blob(64,e),Wc=(e="string")=>{let t=T.struct([T.u32("length"),T.u32("lengthPadding"),T.blob(T.offset(T.u32(),-8),"chars")],e),r=t.decode.bind(t),o=t.encode.bind(t),n=t;return n.decode=(i,s)=>r(i,s).chars.toString(),n.encode=(i,s,a)=>{let c={chars:xe.Buffer.from(i,"utf8")};return o(c,s,a)},n.alloc=i=>T.u32().span+T.u32().span+xe.Buffer.from(i,"utf8").length,n},L7=(e="authorized")=>T.struct([Pe("staker"),Pe("withdrawer")],e),U7=(e="lockup")=>T.struct([T.ns64("unixTimestamp"),T.ns64("epoch"),Pe("custodian")],e),M7=(e="voteInit")=>T.struct([Pe("nodePubkey"),Pe("authorizedVoter"),Pe("authorizedWithdrawer"),T.u8("commission")],e),D7=(e="voteAuthorizeWithSeedArgs")=>T.struct([T.u32("voteAuthorizationType"),Pe("currentAuthorityDerivedKeyOwnerPubkey"),Wc("currentAuthorityDerivedKeySeed"),Pe("newAuthorized")],e);function xn(e){let t=0,r=0;for(;;){let o=e.shift();if(t|=(o&127)<<r*7,r+=1,(o&128)===0)break}return t}function vn(e,t){let r=t;for(;;){let o=r&127;if(r>>=7,r==0){e.push(o);break}else o|=128,e.push(o);}}function it(e,t){if(!e)throw new Error(t||"Assertion failed")}var r0=class e{constructor(t,r){this.payer=void 0,this.keyMetaMap=void 0,this.payer=t,this.keyMetaMap=r;}static compile(t,r){let o=new Map,n=s=>{let a=s.toBase58(),c=o.get(a);return c===void 0&&(c={isSigner:false,isWritable:false,isInvoked:false},o.set(a,c)),c},i=n(r);i.isSigner=true,i.isWritable=true;for(let s of t){n(s.programId).isInvoked=true;for(let a of s.keys){let c=n(a.pubkey);c.isSigner||=a.isSigner,c.isWritable||=a.isWritable;}}return new e(r,o)}getMessageComponents(){let t=[...this.keyMetaMap.entries()];it(t.length<=256,"Max static account keys length exceeded");let r=t.filter(([,c])=>c.isSigner&&c.isWritable),o=t.filter(([,c])=>c.isSigner&&!c.isWritable),n=t.filter(([,c])=>!c.isSigner&&c.isWritable),i=t.filter(([,c])=>!c.isSigner&&!c.isWritable),s={numRequiredSignatures:r.length+o.length,numReadonlySignedAccounts:o.length,numReadonlyUnsignedAccounts:i.length};{it(r.length>0,"Expected at least one writable signer key");let[c]=r[0];it(c===this.payer.toBase58(),"Expected first writable signer key to be the fee payer");}let a=[...r.map(([c])=>new Ie(c)),...o.map(([c])=>new Ie(c)),...n.map(([c])=>new Ie(c)),...i.map(([c])=>new Ie(c))];return [s,a]}extractTableLookup(t){let[r,o]=this.drainKeysFoundInLookupTable(t.state.addresses,s=>!s.isSigner&&!s.isInvoked&&s.isWritable),[n,i]=this.drainKeysFoundInLookupTable(t.state.addresses,s=>!s.isSigner&&!s.isInvoked&&!s.isWritable);if(!(r.length===0&&n.length===0))return [{accountKey:t.key,writableIndexes:r,readonlyIndexes:n},{writable:o,readonly:i}]}drainKeysFoundInLookupTable(t,r){let o=new Array,n=new Array;for(let[i,s]of this.keyMetaMap.entries())if(r(s)){let a=new Ie(i),c=t.findIndex(u=>u.equals(a));c>=0&&(it(c<256,"Max lookup table index exceeded"),o.push(c),n.push(a),this.keyMetaMap.delete(i));}return [o,n]}},gR="Reached end of buffer unexpectedly";function yi(e){if(e.length===0)throw new Error(gR);return e.shift()}function wn(e,...t){let[r]=t;if(t.length===2?r+(t[1]??0)>e.length:r>=e.length)throw new Error(gR);return e.splice(...t)}var id=class e{constructor(t){this.header=void 0,this.accountKeys=void 0,this.recentBlockhash=void 0,this.instructions=void 0,this.indexToProgramIds=new Map,this.header=t.header,this.accountKeys=t.accountKeys.map(r=>new Ie(r)),this.recentBlockhash=t.recentBlockhash,this.instructions=t.instructions,this.instructions.forEach(r=>this.indexToProgramIds.set(r.programIdIndex,this.accountKeys[r.programIdIndex]));}get version(){return "legacy"}get staticAccountKeys(){return this.accountKeys}get compiledInstructions(){return this.instructions.map(t=>({programIdIndex:t.programIdIndex,accountKeyIndexes:t.accounts,data:Nr.default.decode(t.data)}))}get addressTableLookups(){return []}getAccountKeys(){return new Kc(this.staticAccountKeys)}static compile(t){let r=r0.compile(t.instructions,t.payerKey),[o,n]=r.getMessageComponents(),s=new Kc(n).compileInstructions(t.instructions).map(a=>({programIdIndex:a.programIdIndex,accounts:a.accountKeyIndexes,data:Nr.default.encode(a.data)}));return new e({header:o,accountKeys:n,recentBlockhash:t.recentBlockhash,instructions:s})}isAccountSigner(t){return t<this.header.numRequiredSignatures}isAccountWritable(t){let r=this.header.numRequiredSignatures;if(t>=this.header.numRequiredSignatures){let o=t-r,i=this.accountKeys.length-r-this.header.numReadonlyUnsignedAccounts;return o<i}else {let o=r-this.header.numReadonlySignedAccounts;return t<o}}isProgramId(t){return this.indexToProgramIds.has(t)}programIds(){return [...this.indexToProgramIds.values()]}nonProgramIds(){return this.accountKeys.filter((t,r)=>!this.isProgramId(r))}serialize(){let t=this.accountKeys.length,r=[];vn(r,t);let o=this.instructions.map(d=>{let{accounts:g,programIdIndex:h}=d,v=Array.from(Nr.default.decode(d.data)),E=[];vn(E,g.length);let R=[];return vn(R,v.length),{programIdIndex:h,keyIndicesCount:xe.Buffer.from(E),keyIndices:g,dataLength:xe.Buffer.from(R),data:v}}),n=[];vn(n,o.length);let i=xe.Buffer.alloc(Ta);xe.Buffer.from(n).copy(i);let s=n.length;o.forEach(d=>{let h=T.struct([T.u8("programIdIndex"),T.blob(d.keyIndicesCount.length,"keyIndicesCount"),T.seq(T.u8("keyIndex"),d.keyIndices.length,"keyIndices"),T.blob(d.dataLength.length,"dataLength"),T.seq(T.u8("userdatum"),d.data.length,"data")]).encode(d,i,s);s+=h;}),i=i.slice(0,s);let a=T.struct([T.blob(1,"numRequiredSignatures"),T.blob(1,"numReadonlySignedAccounts"),T.blob(1,"numReadonlyUnsignedAccounts"),T.blob(r.length,"keyCount"),T.seq(Pe("key"),t,"keys"),Pe("recentBlockhash")]),c={numRequiredSignatures:xe.Buffer.from([this.header.numRequiredSignatures]),numReadonlySignedAccounts:xe.Buffer.from([this.header.numReadonlySignedAccounts]),numReadonlyUnsignedAccounts:xe.Buffer.from([this.header.numReadonlyUnsignedAccounts]),keyCount:xe.Buffer.from(r),keys:this.accountKeys.map(d=>He(d.toBytes())),recentBlockhash:Nr.default.decode(this.recentBlockhash)},u=xe.Buffer.alloc(2048),f=a.encode(c,u);return i.copy(u,f),u.slice(0,f+i.length)}static from(t){let r=[...t],o=yi(r);if(o!==(o&o6))throw new Error("Versioned messages must be deserialized with VersionedMessage.deserialize()");let n=yi(r),i=yi(r),s=xn(r),a=[];for(let g=0;g<s;g++){let h=wn(r,0,ls);a.push(new Ie(xe.Buffer.from(h)));}let c=wn(r,0,ls),u=xn(r),f=[];for(let g=0;g<u;g++){let h=yi(r),v=xn(r),E=wn(r,0,v),R=xn(r),$=wn(r,0,R),N=Nr.default.encode(xe.Buffer.from($));f.push({programIdIndex:h,accounts:E,data:N});}let d={header:{numRequiredSignatures:o,numReadonlySignedAccounts:n,numReadonlyUnsignedAccounts:i},recentBlockhash:Nr.default.encode(xe.Buffer.from(c)),accountKeys:a,instructions:f};return new e(d)}},W_=class e{constructor(t){this.header=void 0,this.staticAccountKeys=void 0,this.recentBlockhash=void 0,this.compiledInstructions=void 0,this.addressTableLookups=void 0,this.header=t.header,this.staticAccountKeys=t.staticAccountKeys,this.recentBlockhash=t.recentBlockhash,this.compiledInstructions=t.compiledInstructions,this.addressTableLookups=t.addressTableLookups;}get version(){return 0}get numAccountKeysFromLookups(){let t=0;for(let r of this.addressTableLookups)t+=r.readonlyIndexes.length+r.writableIndexes.length;return t}getAccountKeys(t){let r;if(t&&"accountKeysFromLookups"in t&&t.accountKeysFromLookups){if(this.numAccountKeysFromLookups!=t.accountKeysFromLookups.writable.length+t.accountKeysFromLookups.readonly.length)throw new Error("Failed to get account keys because of a mismatch in the number of account keys from lookups");r=t.accountKeysFromLookups;}else if(t&&"addressLookupTableAccounts"in t&&t.addressLookupTableAccounts)r=this.resolveAddressTableLookups(t.addressLookupTableAccounts);else if(this.addressTableLookups.length>0)throw new Error("Failed to get account keys because address table lookups were not resolved");return new Kc(this.staticAccountKeys,r)}isAccountSigner(t){return t<this.header.numRequiredSignatures}isAccountWritable(t){let r=this.header.numRequiredSignatures,o=this.staticAccountKeys.length;if(t>=o){let n=t-o,i=this.addressTableLookups.reduce((s,a)=>s+a.writableIndexes.length,0);return n<i}else if(t>=this.header.numRequiredSignatures){let n=t-r,s=o-r-this.header.numReadonlyUnsignedAccounts;return n<s}else {let n=r-this.header.numReadonlySignedAccounts;return t<n}}resolveAddressTableLookups(t){let r={writable:[],readonly:[]};for(let o of this.addressTableLookups){let n=t.find(i=>i.key.equals(o.accountKey));if(!n)throw new Error(`Failed to find address lookup table account for table key ${o.accountKey.toBase58()}`);for(let i of o.writableIndexes)if(i<n.state.addresses.length)r.writable.push(n.state.addresses[i]);else throw new Error(`Failed to find address for index ${i} in address lookup table ${o.accountKey.toBase58()}`);for(let i of o.readonlyIndexes)if(i<n.state.addresses.length)r.readonly.push(n.state.addresses[i]);else throw new Error(`Failed to find address for index ${i} in address lookup table ${o.accountKey.toBase58()}`)}return r}static compile(t){let r=r0.compile(t.instructions,t.payerKey),o=new Array,n={writable:new Array,readonly:new Array},i=t.addressLookupTableAccounts||[];for(let f of i){let d=r.extractTableLookup(f);if(d!==void 0){let[g,{writable:h,readonly:v}]=d;o.push(g),n.writable.push(...h),n.readonly.push(...v);}}let[s,a]=r.getMessageComponents(),u=new Kc(a,n).compileInstructions(t.instructions);return new e({header:s,staticAccountKeys:a,recentBlockhash:t.recentBlockhash,compiledInstructions:u,addressTableLookups:o})}serialize(){let t=Array();vn(t,this.staticAccountKeys.length);let r=this.serializeInstructions(),o=Array();vn(o,this.compiledInstructions.length);let n=this.serializeAddressTableLookups(),i=Array();vn(i,this.addressTableLookups.length);let s=T.struct([T.u8("prefix"),T.struct([T.u8("numRequiredSignatures"),T.u8("numReadonlySignedAccounts"),T.u8("numReadonlyUnsignedAccounts")],"header"),T.blob(t.length,"staticAccountKeysLength"),T.seq(Pe(),this.staticAccountKeys.length,"staticAccountKeys"),Pe("recentBlockhash"),T.blob(o.length,"instructionsLength"),T.blob(r.length,"serializedInstructions"),T.blob(i.length,"addressTableLookupsLength"),T.blob(n.length,"serializedAddressTableLookups")]),a=new Uint8Array(Ta),u=s.encode({prefix:128,header:this.header,staticAccountKeysLength:new Uint8Array(t),staticAccountKeys:this.staticAccountKeys.map(f=>f.toBytes()),recentBlockhash:Nr.default.decode(this.recentBlockhash),instructionsLength:new Uint8Array(o),serializedInstructions:r,addressTableLookupsLength:new Uint8Array(i),serializedAddressTableLookups:n},a);return a.slice(0,u)}serializeInstructions(){let t=0,r=new Uint8Array(Ta);for(let o of this.compiledInstructions){let n=Array();vn(n,o.accountKeyIndexes.length);let i=Array();vn(i,o.data.length);let s=T.struct([T.u8("programIdIndex"),T.blob(n.length,"encodedAccountKeyIndexesLength"),T.seq(T.u8(),o.accountKeyIndexes.length,"accountKeyIndexes"),T.blob(i.length,"encodedDataLength"),T.blob(o.data.length,"data")]);t+=s.encode({programIdIndex:o.programIdIndex,encodedAccountKeyIndexesLength:new Uint8Array(n),accountKeyIndexes:o.accountKeyIndexes,encodedDataLength:new Uint8Array(i),data:o.data},r,t);}return r.slice(0,t)}serializeAddressTableLookups(){let t=0,r=new Uint8Array(Ta);for(let o of this.addressTableLookups){let n=Array();vn(n,o.writableIndexes.length);let i=Array();vn(i,o.readonlyIndexes.length);let s=T.struct([Pe("accountKey"),T.blob(n.length,"encodedWritableIndexesLength"),T.seq(T.u8(),o.writableIndexes.length,"writableIndexes"),T.blob(i.length,"encodedReadonlyIndexesLength"),T.seq(T.u8(),o.readonlyIndexes.length,"readonlyIndexes")]);t+=s.encode({accountKey:o.accountKey.toBytes(),encodedWritableIndexesLength:new Uint8Array(n),writableIndexes:o.writableIndexes,encodedReadonlyIndexesLength:new Uint8Array(i),readonlyIndexes:o.readonlyIndexes},r,t);}return r.slice(0,t)}static deserialize(t){let r=[...t],o=yi(r),n=o&o6;it(o!==n,"Expected versioned message but received legacy message");let i=n;it(i===0,`Expected versioned message with version 0 but found version ${i}`);let s={numRequiredSignatures:yi(r),numReadonlySignedAccounts:yi(r),numReadonlyUnsignedAccounts:yi(r)},a=[],c=xn(r);for(let v=0;v<c;v++)a.push(new Ie(wn(r,0,ls)));let u=Nr.default.encode(wn(r,0,ls)),f=xn(r),d=[];for(let v=0;v<f;v++){let E=yi(r),R=xn(r),$=wn(r,0,R),N=xn(r),O=new Uint8Array(wn(r,0,N));d.push({programIdIndex:E,accountKeyIndexes:$,data:O});}let g=xn(r),h=[];for(let v=0;v<g;v++){let E=new Ie(wn(r,0,ls)),R=xn(r),$=wn(r,0,R),N=xn(r),O=wn(r,0,N);h.push({accountKey:E,writableIndexes:$,readonlyIndexes:O});}return new e({header:s,staticAccountKeys:a,recentBlockhash:u,compiledInstructions:d,addressTableLookups:h})}},a0={deserializeMessageVersion(e){let t=e[0],r=t&o6;return r===t?"legacy":r},deserialize:e=>{let t=a0.deserializeMessageVersion(e);if(t==="legacy")return id.from(e);if(t===0)return W_.deserialize(e);throw new Error(`Transaction message version ${t} deserialization is not supported`)}};var j7=xe.Buffer.alloc(t0).fill(0),Xe=class{constructor(t){this.keys=void 0,this.programId=void 0,this.data=xe.Buffer.alloc(0),this.programId=t.programId,this.keys=t.keys,t.data&&(this.data=t.data);}toJSON(){return {keys:this.keys.map(({pubkey:t,isSigner:r,isWritable:o})=>({pubkey:t.toJSON(),isSigner:r,isWritable:o})),programId:this.programId.toJSON(),data:[...this.data]}}},tt=class e{get signature(){return this.signatures.length>0?this.signatures[0].signature:null}constructor(t){if(this.signatures=[],this.feePayer=void 0,this.instructions=[],this.recentBlockhash=void 0,this.lastValidBlockHeight=void 0,this.nonceInfo=void 0,this.minNonceContextSlot=void 0,this._message=void 0,this._json=void 0,!!t)if(t.feePayer&&(this.feePayer=t.feePayer),t.signatures&&(this.signatures=t.signatures),Object.prototype.hasOwnProperty.call(t,"nonceInfo")){let{minContextSlot:r,nonceInfo:o}=t;this.minNonceContextSlot=r,this.nonceInfo=o;}else if(Object.prototype.hasOwnProperty.call(t,"lastValidBlockHeight")){let{blockhash:r,lastValidBlockHeight:o}=t;this.recentBlockhash=r,this.lastValidBlockHeight=o;}else {let{recentBlockhash:r,nonceInfo:o}=t;o&&(this.nonceInfo=o),this.recentBlockhash=r;}}toJSON(){return {recentBlockhash:this.recentBlockhash||null,feePayer:this.feePayer?this.feePayer.toJSON():null,nonceInfo:this.nonceInfo?{nonce:this.nonceInfo.nonce,nonceInstruction:this.nonceInfo.nonceInstruction.toJSON()}:null,instructions:this.instructions.map(t=>t.toJSON()),signers:this.signatures.map(({publicKey:t})=>t.toJSON())}}add(...t){if(t.length===0)throw new Error("No instructions");return t.forEach(r=>{"instructions"in r?this.instructions=this.instructions.concat(r.instructions):"data"in r&&"programId"in r&&"keys"in r?this.instructions.push(r):this.instructions.push(new Xe(r));}),this}compileMessage(){if(this._message&&JSON.stringify(this.toJSON())===JSON.stringify(this._json))return this._message;let t,r;if(this.nonceInfo?(t=this.nonceInfo.nonce,this.instructions[0]!=this.nonceInfo.nonceInstruction?r=[this.nonceInfo.nonceInstruction,...this.instructions]:r=this.instructions):(t=this.recentBlockhash,r=this.instructions),!t)throw new Error("Transaction recentBlockhash required");r.length<1&&console.warn("No instructions provided");let o;if(this.feePayer)o=this.feePayer;else if(this.signatures.length>0&&this.signatures[0].publicKey)o=this.signatures[0].publicKey;else throw new Error("Transaction fee payer required");for(let E=0;E<r.length;E++)if(r[E].programId===void 0)throw new Error(`Transaction instruction index ${E} has undefined program id`);let n=[],i=[];r.forEach(E=>{E.keys.forEach($=>{i.push({...$});});let R=E.programId.toString();n.includes(R)||n.push(R);}),n.forEach(E=>{i.push({pubkey:new Ie(E),isSigner:false,isWritable:false});});let s=[];i.forEach(E=>{let R=E.pubkey.toString(),$=s.findIndex(N=>N.pubkey.toString()===R);$>-1?(s[$].isWritable=s[$].isWritable||E.isWritable,s[$].isSigner=s[$].isSigner||E.isSigner):s.push(E);}),s.sort(function(E,R){if(E.isSigner!==R.isSigner)return E.isSigner?-1:1;if(E.isWritable!==R.isWritable)return E.isWritable?-1:1;let $={localeMatcher:"best fit",usage:"sort",sensitivity:"variant",ignorePunctuation:false,numeric:false,caseFirst:"lower"};return E.pubkey.toBase58().localeCompare(R.pubkey.toBase58(),"en",$)});let a=s.findIndex(E=>E.pubkey.equals(o));if(a>-1){let[E]=s.splice(a,1);E.isSigner=true,E.isWritable=true,s.unshift(E);}else s.unshift({pubkey:o,isSigner:true,isWritable:true});for(let E of this.signatures){let R=s.findIndex($=>$.pubkey.equals(E.publicKey));if(R>-1)s[R].isSigner||(s[R].isSigner=true,console.warn("Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release."));else throw new Error(`unknown signer: ${E.publicKey.toString()}`)}let c=0,u=0,f=0,d=[],g=[];s.forEach(({pubkey:E,isSigner:R,isWritable:$})=>{R?(d.push(E.toString()),c+=1,$||(u+=1)):(g.push(E.toString()),$||(f+=1));});let h=d.concat(g),v=r.map(E=>{let{data:R,programId:$}=E;return {programIdIndex:h.indexOf($.toString()),accounts:E.keys.map(N=>h.indexOf(N.pubkey.toString())),data:Nr.default.encode(R)}});return v.forEach(E=>{it(E.programIdIndex>=0),E.accounts.forEach(R=>it(R>=0));}),new id({header:{numRequiredSignatures:c,numReadonlySignedAccounts:u,numReadonlyUnsignedAccounts:f},accountKeys:h,recentBlockhash:t,instructions:v})}_compile(){let t=this.compileMessage(),r=t.accountKeys.slice(0,t.header.numRequiredSignatures);return this.signatures.length===r.length&&this.signatures.every((n,i)=>r[i].equals(n.publicKey))||(this.signatures=r.map(o=>({signature:null,publicKey:o}))),t}serializeMessage(){return this._compile().serialize()}async getEstimatedFee(t){return (await t.getFeeForMessage(this.compileMessage())).value}setSigners(...t){if(t.length===0)throw new Error("No signers");let r=new Set;this.signatures=t.filter(o=>{let n=o.toString();return r.has(n)?false:(r.add(n),true)}).map(o=>({signature:null,publicKey:o}));}sign(...t){if(t.length===0)throw new Error("No signers");let r=new Set,o=[];for(let i of t){let s=i.publicKey.toString();r.has(s)||(r.add(s),o.push(i));}this.signatures=o.map(i=>({signature:null,publicKey:i.publicKey}));let n=this._compile();this._partialSign(n,...o);}partialSign(...t){if(t.length===0)throw new Error("No signers");let r=new Set,o=[];for(let i of t){let s=i.publicKey.toString();r.has(s)||(r.add(s),o.push(i));}let n=this._compile();this._partialSign(n,...o);}_partialSign(t,...r){let o=t.serialize();r.forEach(n=>{let i=n6(o,n.secretKey);this._addSignature(n.publicKey,He(i));});}addSignature(t,r){this._compile(),this._addSignature(t,r);}_addSignature(t,r){it(r.length===64);let o=this.signatures.findIndex(n=>t.equals(n.publicKey));if(o<0)throw new Error(`unknown signer: ${t.toString()}`);this.signatures[o].signature=xe.Buffer.from(r);}verifySignatures(t=true){return !this._getMessageSignednessErrors(this.serializeMessage(),t)}_getMessageSignednessErrors(t,r){let o={};for(let{signature:n,publicKey:i}of this.signatures)n===null?r&&(o.missing||=[]).push(i):P7(n,t,i.toBytes())||(o.invalid||=[]).push(i);return o.invalid||o.missing?o:void 0}serialize(t){let{requireAllSignatures:r,verifySignatures:o}=Object.assign({requireAllSignatures:true,verifySignatures:true},t),n=this.serializeMessage();if(o){let i=this._getMessageSignednessErrors(n,r);if(i){let s="Signature verification failed.";throw i.invalid&&(s+=`
|
|
63
|
+
Invalid signature for public key${i.invalid.length===1?"":"(s)"} [\`${i.invalid.map(a=>a.toBase58()).join("`, `")}\`].`),i.missing&&(s+=`
|
|
64
|
+
Missing signature for public key${i.missing.length===1?"":"(s)"} [\`${i.missing.map(a=>a.toBase58()).join("`, `")}\`].`),new Error(s)}}return this._serialize(n)}_serialize(t){let{signatures:r}=this,o=[];vn(o,r.length);let n=o.length+r.length*64+t.length,i=xe.Buffer.alloc(n);return it(r.length<256),xe.Buffer.from(o).copy(i,0),r.forEach(({signature:s},a)=>{s!==null&&(it(s.length===64,"signature has invalid length"),xe.Buffer.from(s).copy(i,o.length+a*64));}),t.copy(i,o.length+r.length*64),it(i.length<=Ta,`Transaction too large: ${i.length} > ${Ta}`),i}get keys(){return it(this.instructions.length===1),this.instructions[0].keys.map(t=>t.pubkey)}get programId(){return it(this.instructions.length===1),this.instructions[0].programId}get data(){return it(this.instructions.length===1),this.instructions[0].data}static from(t){let r=[...t],o=xn(r),n=[];for(let i=0;i<o;i++){let s=wn(r,0,t0);n.push(Nr.default.encode(xe.Buffer.from(s)));}return e.populate(id.from(r),n)}static populate(t,r=[]){let o=new e;return o.recentBlockhash=t.recentBlockhash,t.header.numRequiredSignatures>0&&(o.feePayer=t.accountKeys[0]),r.forEach((n,i)=>{let s={signature:n==Nr.default.encode(j7)?null:Nr.default.decode(n),publicKey:t.accountKeys[i]};o.signatures.push(s);}),t.instructions.forEach(n=>{let i=n.accounts.map(s=>{let a=t.accountKeys[s];return {pubkey:a,isSigner:o.signatures.some(c=>c.publicKey.toString()===a.toString())||t.isAccountSigner(s),isWritable:t.isAccountWritable(s)}});o.instructions.push(new Xe({keys:i,programId:t.accountKeys[n.programIdIndex],data:Nr.default.decode(n.data)}));}),o._message=t,o._json=o.toJSON(),o}};var n0=class e{get version(){return this.message.version}constructor(t,r){if(this.signatures=void 0,this.message=void 0,r!==void 0)it(r.length===t.header.numRequiredSignatures,"Expected signatures length to be equal to the number of required signatures"),this.signatures=r;else {let o=[];for(let n=0;n<t.header.numRequiredSignatures;n++)o.push(new Uint8Array(t0));this.signatures=o;}this.message=t;}serialize(){let t=this.message.serialize(),r=Array();vn(r,this.signatures.length);let o=T.struct([T.blob(r.length,"encodedSignaturesLength"),T.seq(z7(),this.signatures.length,"signatures"),T.blob(t.length,"serializedMessage")]),n=new Uint8Array(2048),i=o.encode({encodedSignaturesLength:new Uint8Array(r),signatures:this.signatures,serializedMessage:t},n);return n.slice(0,i)}static deserialize(t){let r=[...t],o=[],n=xn(r);for(let s=0;s<n;s++)o.push(new Uint8Array(wn(r,0,t0)));let i=a0.deserialize(new Uint8Array(r));return new e(i,o)}sign(t){let r=this.message.serialize(),o=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures);for(let n of t){let i=o.findIndex(s=>s.equals(n.publicKey));it(i>=0,`Cannot sign with non signer key ${n.publicKey.toBase58()}`),this.signatures[i]=n6(r,n.secretKey);}}addSignature(t,r){it(r.byteLength===64,"Signature must be 64 bytes long");let n=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures).findIndex(i=>i.equals(t));it(n>=0,`Can not add signature; \`${t.toBase58()}\` is not required to sign this transaction`),this.signatures[n]=r;}};new Ie("SysvarC1ock11111111111111111111111111111111");new Ie("SysvarEpochSchedu1e111111111111111111111111");new Ie("Sysvar1nstructions1111111111111111111111111");new Ie("SysvarRecentB1ockHashes11111111111111111111");new Ie("SysvarRent111111111111111111111111111111111");new Ie("SysvarRewards111111111111111111111111111111");new Ie("SysvarS1otHashes111111111111111111111111111");new Ie("SysvarS1otHistory11111111111111111111111111");new Ie("SysvarStakeHistory1111111111111111111111111");var q7=T.nu64("lamportsPerSignature"),W7=T.struct([T.u32("version"),T.u32("state"),Pe("authorizedPubkey"),Pe("nonce"),T.struct([q7],"feeCalculator")]);W7.span;function Jc(e){let t=(0, pR.blob)(8,e),r=t.decode.bind(t),o=t.encode.bind(t),n=t,i=ok();return n.decode=(s,a)=>{let c=r(s,a);return i.decode(c)},n.encode=(s,a,c)=>{let u=i.encode(s);return o(u,a,c)},n}Object.freeze({Create:{index:0,layout:T.struct([T.u32("instruction"),T.ns64("lamports"),T.ns64("space"),Pe("programId")])},Assign:{index:1,layout:T.struct([T.u32("instruction"),Pe("programId")])},Transfer:{index:2,layout:T.struct([T.u32("instruction"),Jc("lamports")])},CreateWithSeed:{index:3,layout:T.struct([T.u32("instruction"),Pe("base"),Wc("seed"),T.ns64("lamports"),T.ns64("space"),Pe("programId")])},AdvanceNonceAccount:{index:4,layout:T.struct([T.u32("instruction")])},WithdrawNonceAccount:{index:5,layout:T.struct([T.u32("instruction"),T.ns64("lamports")])},InitializeNonceAccount:{index:6,layout:T.struct([T.u32("instruction"),Pe("authorized")])},AuthorizeNonceAccount:{index:7,layout:T.struct([T.u32("instruction"),Pe("authorized")])},Allocate:{index:8,layout:T.struct([T.u32("instruction"),T.ns64("space")])},AllocateWithSeed:{index:9,layout:T.struct([T.u32("instruction"),Pe("base"),Wc("seed"),T.ns64("space"),Pe("programId")])},AssignWithSeed:{index:10,layout:T.struct([T.u32("instruction"),Pe("base"),Wc("seed"),Pe("programId")])},TransferWithSeed:{index:11,layout:T.struct([T.u32("instruction"),Jc("lamports"),Wc("seed"),Pe("programId")])},UpgradeNonceAccount:{index:12,layout:T.struct([T.u32("instruction")])}});new Ie("11111111111111111111111111111111");new Ie("BPFLoader2111111111111111111111111111111111");({layout:T.struct([T.u32("typeIndex"),Jc("deactivationSlot"),T.nu64("lastExtendedSlot"),T.u8("lastExtendedStartIndex"),T.u8(),T.seq(Pe(),T.offset(T.u8(),-1),"authority")])});var xt=Gc(Dh(Ie),ne(),e=>new Ie(e)),yR=jh([ne(),ct("base64")]),i6=Gc(Dh(xe.Buffer),yR,e=>xe.Buffer.from(e[0],"base64"));function bR(e){return Ar([W({jsonrpc:ct("2.0"),id:ne(),result:e}),W({jsonrpc:ct("2.0"),id:ne(),error:W({code:ka(),message:ne(),data:me(ck())})})])}var J7=bR(ka());function rt(e){return Gc(bR(e),J7,t=>"error"in t?t:{...t,result:Zc(t.result,e)})}function io(e){return rt(W({context:W({slot:U()}),value:e}))}function c0(e){return W({context:W({slot:U()}),value:e})}var Y7=W({foundation:U(),foundationTerm:U(),initial:U(),taper:U(),terminal:U()});rt(ue(fe(W({epoch:U(),effectiveSlot:U(),amount:U(),postBalance:U(),commission:me(fe(U()))}))));var X7=ue(W({slot:U(),prioritizationFee:U()})),Q7=W({total:U(),validator:U(),foundation:U(),epoch:U()}),eF=W({epoch:U(),slotIndex:U(),slotsInEpoch:U(),absoluteSlot:U(),blockHeight:me(U()),transactionCount:me(U())}),tF=W({slotsPerEpoch:U(),leaderScheduleSlotOffset:U(),warmup:no(),firstNormalEpoch:U(),firstNormalSlot:U()}),rF=m_(ne(),ue(U())),$a=fe(Ar([W({}),ne()])),nF=W({err:$a}),oF=ct("receivedSignature");W({"solana-core":ne(),"feature-set":me(U())});var iF=W({program:ne(),programId:xt,parsed:ka()}),sF=W({programId:xt,accounts:ue(xt),data:ne()});io(W({err:fe(Ar([W({}),ne()])),logs:fe(ue(ne())),accounts:me(fe(ue(fe(W({executable:no(),owner:ne(),lamports:U(),data:ue(ne()),rentEpoch:me(U())}))))),unitsConsumed:me(U()),returnData:me(fe(W({programId:ne(),data:jh([ne(),ct("base64")])}))),innerInstructions:me(fe(ue(W({index:U(),instructions:ue(Ar([iF,sF]))}))))}));io(W({byIdentity:m_(ne(),ue(U())),range:W({firstSlot:U(),lastSlot:U()})}));rt(Y7);rt(Q7);rt(X7);rt(eF);rt(tF);rt(rF);rt(U());io(W({total:U(),circulating:U(),nonCirculating:U(),nonCirculatingAccounts:ue(xt)}));var aF=W({amount:ne(),uiAmount:fe(U()),decimals:U(),uiAmountString:me(ne())});io(ue(W({address:xt,amount:ne(),uiAmount:fe(U()),decimals:U(),uiAmountString:me(ne())})));io(ue(W({pubkey:xt,account:W({executable:no(),owner:xt,lamports:U(),data:i6,rentEpoch:U()})})));var Y_=W({program:ne(),parsed:ka(),space:U()});io(ue(W({pubkey:xt,account:W({executable:no(),owner:xt,lamports:U(),data:Y_,rentEpoch:U()})})));io(ue(W({lamports:U(),address:xt})));var s6=W({executable:no(),owner:xt,lamports:U(),data:i6,rentEpoch:U()});W({pubkey:xt,account:s6});var cF=Gc(Ar([Dh(xe.Buffer),Y_]),Ar([yR,Y_]),e=>Array.isArray(e)?Zc(e,i6):e),uF=W({executable:no(),owner:xt,lamports:U(),data:cF,rentEpoch:U()});W({pubkey:xt,account:uF});W({state:Ar([ct("active"),ct("inactive"),ct("activating"),ct("deactivating")]),active:U(),inactive:U()});rt(ue(W({signature:ne(),slot:U(),err:$a,memo:fe(ne()),blockTime:me(fe(U()))})));rt(ue(W({signature:ne(),slot:U(),err:$a,memo:fe(ne()),blockTime:me(fe(U()))})));W({subscription:U(),result:c0(s6)});var fF=W({pubkey:xt,account:s6});W({subscription:U(),result:c0(fF)});var lF=W({parent:U(),slot:U(),root:U()});W({subscription:U(),result:lF});var dF=Ar([W({type:Ar([ct("firstShredReceived"),ct("completed"),ct("optimisticConfirmation"),ct("root")]),slot:U(),timestamp:U()}),W({type:ct("createdBank"),parent:U(),slot:U(),timestamp:U()}),W({type:ct("frozen"),slot:U(),timestamp:U(),stats:W({numTransactionEntries:U(),numSuccessfulTransactions:U(),numFailedTransactions:U(),maxTransactionsPerEntry:U()})}),W({type:ct("dead"),slot:U(),timestamp:U(),err:ne()})]);W({subscription:U(),result:dF});W({subscription:U(),result:c0(Ar([nF,oF]))});W({subscription:U(),result:U()});W({pubkey:ne(),gossip:fe(ne()),tpu:fe(ne()),rpc:fe(ne()),version:fe(ne())});var sR=W({votePubkey:ne(),nodePubkey:ne(),activatedStake:U(),epochVoteAccount:no(),epochCredits:ue(jh([U(),U(),U()])),commission:U(),lastVote:U(),rootSlot:fe(U())});rt(W({current:ue(sR),delinquent:ue(sR)}));var pF=Ar([ct("processed"),ct("confirmed"),ct("finalized")]),mF=W({slot:U(),confirmations:fe(U()),err:$a,confirmationStatus:me(pF)});io(ue(fe(mF)));rt(U());var xR=W({accountKey:xt,writableIndexes:ue(U()),readonlyIndexes:ue(U())}),a6=W({signatures:ue(ne()),message:W({accountKeys:ue(ne()),header:W({numRequiredSignatures:U(),numReadonlySignedAccounts:U(),numReadonlyUnsignedAccounts:U()}),instructions:ue(W({accounts:ue(U()),data:ne(),programIdIndex:U()})),recentBlockhash:ne(),addressTableLookups:me(ue(xR))})}),vR=W({pubkey:xt,signer:no(),writable:no(),source:me(Ar([ct("transaction"),ct("lookupTable")]))}),wR=W({accountKeys:ue(vR),signatures:ue(ne())}),_R=W({parsed:ka(),program:ne(),programId:xt}),ER=W({accounts:ue(xt),data:ne(),programId:xt}),hF=Ar([ER,_R]),gF=Ar([W({parsed:ka(),program:ne(),programId:ne()}),W({accounts:ue(ne()),data:ne(),programId:ne()})]),SR=Gc(hF,gF,e=>"accounts"in e?Zc(e,ER):Zc(e,_R)),IR=W({signatures:ue(ne()),message:W({accountKeys:ue(vR),instructions:ue(SR),recentBlockhash:ne(),addressTableLookups:me(fe(ue(xR)))})}),o0=W({accountIndex:U(),mint:ne(),owner:me(ne()),programId:me(ne()),uiTokenAmount:aF}),AR=W({writable:ue(xt),readonly:ue(xt)}),u0=W({err:$a,fee:U(),innerInstructions:me(fe(ue(W({index:U(),instructions:ue(W({accounts:ue(U()),data:ne(),programIdIndex:U()}))})))),preBalances:ue(U()),postBalances:ue(U()),logMessages:me(fe(ue(ne()))),preTokenBalances:me(fe(ue(o0))),postTokenBalances:me(fe(ue(o0))),loadedAddresses:me(AR),computeUnitsConsumed:me(U()),costUnits:me(U())}),c6=W({err:$a,fee:U(),innerInstructions:me(fe(ue(W({index:U(),instructions:ue(SR)})))),preBalances:ue(U()),postBalances:ue(U()),logMessages:me(fe(ue(ne()))),preTokenBalances:me(fe(ue(o0))),postTokenBalances:me(fe(ue(o0))),loadedAddresses:me(AR),computeUnitsConsumed:me(U()),costUnits:me(U())}),Xc=Ar([ct(0),ct("legacy")]),Oa=W({pubkey:ne(),lamports:U(),postBalance:fe(U()),rewardType:fe(ne()),commission:me(fe(U()))});rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:a6,meta:fe(u0),version:me(Xc)})),rewards:me(ue(Oa)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),rewards:me(ue(Oa)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:wR,meta:fe(u0),version:me(Xc)})),rewards:me(ue(Oa)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:IR,meta:fe(c6),version:me(Xc)})),rewards:me(ue(Oa)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:wR,meta:fe(c6),version:me(Xc)})),rewards:me(ue(Oa)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),rewards:me(ue(Oa)),blockTime:fe(U()),blockHeight:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),transactions:ue(W({transaction:a6,meta:fe(u0)})),rewards:me(ue(Oa)),blockTime:fe(U())})));rt(fe(W({blockhash:ne(),previousBlockhash:ne(),parentSlot:U(),signatures:ue(ne()),blockTime:fe(U())})));rt(fe(W({slot:U(),meta:fe(u0),blockTime:me(fe(U())),transaction:a6,version:me(Xc)})));rt(fe(W({slot:U(),transaction:IR,meta:fe(c6),blockTime:me(fe(U())),version:me(Xc)})));io(W({blockhash:ne(),lastValidBlockHeight:U()}));io(no());var yF=W({slot:U(),numTransactions:U(),numSlots:U(),samplePeriodSecs:U()});rt(ue(yF));io(fe(W({feeCalculator:W({lamportsPerSignature:U()})})));rt(ne());rt(ne());var bF=W({err:$a,logs:ue(ne()),signature:ne()});W({result:c0(bF),subscription:U()});Object.freeze({CreateLookupTable:{index:0,layout:T.struct([T.u32("instruction"),Jc("recentSlot"),T.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:T.struct([T.u32("instruction")])},ExtendLookupTable:{index:2,layout:T.struct([T.u32("instruction"),Jc(),T.seq(Pe(),T.offset(T.u32(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:T.struct([T.u32("instruction")])},CloseLookupTable:{index:4,layout:T.struct([T.u32("instruction")])}});new Ie("AddressLookupTab1e1111111111111111111111111");Object.freeze({RequestUnits:{index:0,layout:T.struct([T.u8("instruction"),T.u32("units"),T.u32("additionalFee")])},RequestHeapFrame:{index:1,layout:T.struct([T.u8("instruction"),T.u32("bytes")])},SetComputeUnitLimit:{index:2,layout:T.struct([T.u8("instruction"),T.u32("units")])},SetComputeUnitPrice:{index:3,layout:T.struct([T.u8("instruction"),Jc("microLamports")])}});new Ie("ComputeBudget111111111111111111111111111111");T.struct([T.u8("numSignatures"),T.u8("padding"),T.u16("signatureOffset"),T.u16("signatureInstructionIndex"),T.u16("publicKeyOffset"),T.u16("publicKeyInstructionIndex"),T.u16("messageDataOffset"),T.u16("messageDataSize"),T.u16("messageInstructionIndex")]);new Ie("Ed25519SigVerify111111111111111111111111111");bn.utils.isValidPrivateKey;bn.getPublicKey;T.struct([T.u8("numSignatures"),T.u16("signatureOffset"),T.u8("signatureInstructionIndex"),T.u16("ethAddressOffset"),T.u8("ethAddressInstructionIndex"),T.u16("messageDataOffset"),T.u16("messageDataSize"),T.u8("messageInstructionIndex"),T.blob(20,"ethAddress"),T.blob(64,"signature"),T.u8("recoveryId")]);new Ie("KeccakSecp256k11111111111111111111111111111");var kR;new Ie("StakeConfig11111111111111111111111111111111");var ad=class{constructor(t,r,o){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=t,this.epoch=r,this.custodian=o;}};kR=ad;ad.default=new kR(0,0,Ie.default);Object.freeze({Initialize:{index:0,layout:T.struct([T.u32("instruction"),L7(),U7()])},Authorize:{index:1,layout:T.struct([T.u32("instruction"),Pe("newAuthorized"),T.u32("stakeAuthorizationType")])},Delegate:{index:2,layout:T.struct([T.u32("instruction")])},Split:{index:3,layout:T.struct([T.u32("instruction"),T.ns64("lamports")])},Withdraw:{index:4,layout:T.struct([T.u32("instruction"),T.ns64("lamports")])},Deactivate:{index:5,layout:T.struct([T.u32("instruction")])},Merge:{index:7,layout:T.struct([T.u32("instruction")])},AuthorizeWithSeed:{index:8,layout:T.struct([T.u32("instruction"),Pe("newAuthorized"),T.u32("stakeAuthorizationType"),Wc("authoritySeed"),Pe("authorityOwner")])}});new Ie("Stake11111111111111111111111111111111111111");Object.freeze({InitializeAccount:{index:0,layout:T.struct([T.u32("instruction"),M7()])},Authorize:{index:1,layout:T.struct([T.u32("instruction"),Pe("newAuthorized"),T.u32("voteAuthorizationType")])},Withdraw:{index:3,layout:T.struct([T.u32("instruction"),T.ns64("lamports")])},UpdateValidatorIdentity:{index:4,layout:T.struct([T.u32("instruction")])},AuthorizeWithSeed:{index:10,layout:T.struct([T.u32("instruction"),D7()])}});new Ie("Vote111111111111111111111111111111111111111");new Ie("Va1idator1nfo111111111111111111111111111111");W({name:ne(),website:me(ne()),details:me(ne()),iconUrl:me(ne()),keybaseUsername:me(ne())});new Ie("Vote111111111111111111111111111111111111111");T.struct([Pe("nodePubkey"),Pe("authorizedWithdrawer"),T.u8("commission"),T.nu64(),T.seq(T.struct([T.nu64("slot"),T.u32("confirmationCount")]),T.offset(T.u32(),-8),"votes"),T.u8("rootSlotValid"),T.nu64("rootSlot"),T.nu64(),T.seq(T.struct([T.nu64("epoch"),Pe("authorizedVoter")]),T.offset(T.u32(),-8),"authorizedVoters"),T.struct([T.seq(T.struct([Pe("authorizedPubkey"),T.nu64("epochOfLastAuthorizedSwitch"),T.nu64("targetEpoch")]),32,"buf"),T.nu64("idx"),T.u8("isEmpty")],"priorVoters"),T.nu64(),T.seq(T.struct([T.nu64("epoch"),T.nu64("credits"),T.nu64("prevCredits")]),T.offset(T.u32(),-8),"epochCredits"),T.struct([T.nu64("slot"),T.nu64("timestamp")],"lastTimestamp")]);var RR=e=>({request:e,signMessage:t=>e({method:"signMessage",params:{message:t}}),signTransaction:t=>e({method:"signTransaction",params:{transaction:t}}),signAndSendTransaction:t=>e({method:"signAndSendTransaction",params:t})});function TR(e){return Buffer.from(e.serialize({verifySignatures:false})).toString("base64")}function EF(e){let t=Buffer.from(e,"base64");return a0.deserializeMessageVersion(t)==="legacy"?n0.deserialize(t):tt.from(t)}function $R(e){return async r=>{if(r.method==="connect")return await e(r);if(r.method==="signMessage")return await e(r);if(r.method==="signAndSendTransaction"){let{transaction:o}=r.params,n={transaction:TR(o)};return await e({method:"signAndSendTransaction",params:n})}if(r.method==="signTransaction"){let{transaction:o}=r.params,n={transaction:TR(o)},{signedTransaction:i}=await e({method:"signTransaction",params:n});return {signedTransaction:EF(i)}}}}var OR=({miniAppHost:e,emitter:t})=>{let r,o=null;return {visible:false,get onback(){return o},set onback(n){o&&t.removeListener("backNavigationTriggered",o),o=n,n&&t.addListener("backNavigationTriggered",n);},async show(){await e.updateBackState({visible:true}),this.visible=true;},async hide(){await e.updateBackState({visible:false}),this.visible=false;},async enableWebNavigation(){r=SF({back:this,emitter:t});},async disableWebNavigation(){r?.(),r=void 0;}}};function SF({emitter:e,back:t}){let r=IF();if(r)return AF({emitter:e,back:t,navigation:r});if(typeof window<"u")return kF({emitter:e,back:t,window})}function IF(){if(typeof window<"u"&&window.navigation!==void 0)return window.navigation}function AF({emitter:e,back:t,navigation:r}){function o(){r.canGoBack?t.show():t.hide();}function n(){t.visible&&r.canGoBack&&r.back();}return r.addEventListener("navigatesuccess",o),e.addListener("backNavigationTriggered",n),()=>{r.removeEventListener("navigatesuccess",o),e.removeListener("backNavigationTriggered",n);}}function kF({emitter:e,back:t,window:r}){t.show();function o(){t.visible&&r.history.back();}return e.addListener("backNavigationTriggered",o),()=>{e.removeListener("backNavigationTriggered",o);}}var NR="0.1.1";function PR(){return NR}var f0=class e extends Error{constructor(t,r={}){let o=(()=>{if(r.cause instanceof e){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause?.message?r.cause.message:r.details})(),n=r.cause instanceof e&&r.cause.docsPath||r.docsPath,s=`https://oxlib.sh${n??""}`,a=[t||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...o||n?["",o?`Details: ${o}`:void 0,n?`See: ${s}`:void 0]:[]].filter(c=>typeof c=="string").join(`
|
|
65
|
+
`);super(a,r.cause?{cause:r.cause}:void 0),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docs",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:true,configurable:true,writable:true,value:`ox@${PR()}`}),this.cause=r.cause,this.details=o,this.docs=s,this.docsPath=n,this.shortMessage=t;}walk(t){return BR(this,t)}};function BR(e,t){return t?.(e)?e:e&&typeof e=="object"&&"cause"in e&&e.cause?BR(e.cause,t):t?null:e}function l0(e,t={}){let{raw:r=false}=t,o=e;if(r)return e;if(o.error){let{code:n}=o.error,i=n===Na.code?Na:n===cd.code?cd:n===yd.code?yd:n===hd.code?hd:n===pd.code?pd:n===gd.code?gd:n===dd.code?dd:n===bd.code?bd:n===ud.code?ud:n===fd.code?fd:n===ld.code?ld:n===md.code?md:gr;throw new i(o.error)}return o.result}var gr=class extends Error{constructor(t){let{code:r,message:o,data:n}=t;super(o),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.BaseError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),this.code=r,this.data=n;}},cd=class e extends gr{constructor(t={}){super({message:"Missing or invalid parameters.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32e3}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.InvalidInputError"});}};Object.defineProperty(cd,"code",{enumerable:true,configurable:true,writable:true,value:-32e3});var ud=class e extends gr{constructor(t={}){super({message:"Requested resource not found.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32001}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.ResourceNotFoundError"});}};Object.defineProperty(ud,"code",{enumerable:true,configurable:true,writable:true,value:-32001});var fd=class e extends gr{constructor(t={}){super({message:"Requested resource not available.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32002}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.ResourceUnavailableError"});}};Object.defineProperty(fd,"code",{enumerable:true,configurable:true,writable:true,value:-32002});var ld=class e extends gr{constructor(t={}){super({message:"Transaction creation failed.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32003}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.TransactionRejectedError"});}};Object.defineProperty(ld,"code",{enumerable:true,configurable:true,writable:true,value:-32003});var dd=class e extends gr{constructor(t={}){super({message:"Method is not implemented.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32004}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.MethodNotSupportedError"});}};Object.defineProperty(dd,"code",{enumerable:true,configurable:true,writable:true,value:-32004});var pd=class e extends gr{constructor(t={}){super({message:"Rate limit exceeded.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32005}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.LimitExceededError"});}};Object.defineProperty(pd,"code",{enumerable:true,configurable:true,writable:true,value:-32005});var md=class e extends gr{constructor(t={}){super({message:"JSON-RPC version not supported.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32006}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.VersionNotSupportedError"});}};Object.defineProperty(md,"code",{enumerable:true,configurable:true,writable:true,value:-32006});var hd=class e extends gr{constructor(t={}){super({message:"Input is not a valid JSON-RPC request.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32600}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.InvalidRequestError"});}};Object.defineProperty(hd,"code",{enumerable:true,configurable:true,writable:true,value:-32600});var gd=class e extends gr{constructor(t={}){super({message:"Method does not exist.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32601}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.MethodNotFoundError"});}};Object.defineProperty(gd,"code",{enumerable:true,configurable:true,writable:true,value:-32601});var yd=class e extends gr{constructor(t={}){super({message:"Invalid method parameters.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32602}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.InvalidParamsError"});}};Object.defineProperty(yd,"code",{enumerable:true,configurable:true,writable:true,value:-32602});var Na=class e extends gr{constructor(t={}){super({message:"Internal JSON-RPC error.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32603}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.InternalErrorError"});}};Object.defineProperty(Na,"code",{enumerable:true,configurable:true,writable:true,value:-32603});var bd=class e extends gr{constructor(t={}){super({message:"Failed to parse JSON-RPC response.",...t,code:e.code}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:-32700}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"RpcResponse.ParseError"});}};Object.defineProperty(bd,"code",{enumerable:true,configurable:true,writable:true,value:-32700});var Bo=class extends Error{constructor(t,r){super(r),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"ProviderRpcError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"details",{enumerable:true,configurable:true,writable:true,value:void 0}),this.code=t,this.details=r;}},xd=class extends Bo{constructor({message:t="The user rejected the request."}={}){super(4001,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.UserRejectedRequestError"});}};Object.defineProperty(xd,"code",{enumerable:true,configurable:true,writable:true,value:4001});var vd=class extends Bo{constructor({message:t="The requested method and/or account has not been authorized by the user."}={}){super(4100,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.UnauthorizedError"});}};Object.defineProperty(vd,"code",{enumerable:true,configurable:true,writable:true,value:4100});var wd=class extends Bo{constructor({message:t="The provider does not support the requested method."}={}){super(4200,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.UnsupportedMethodError"});}};Object.defineProperty(wd,"code",{enumerable:true,configurable:true,writable:true,value:4200});var _d=class extends Bo{constructor({message:t="The provider is disconnected from all chains."}={}){super(4900,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.DisconnectedError"});}};Object.defineProperty(_d,"code",{enumerable:true,configurable:true,writable:true,value:4900});var Ed=class extends Bo{constructor({message:t="The provider is not connected to the requested chain."}={}){super(4901,t),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.ChainDisconnectedError"});}};Object.defineProperty(Ed,"code",{enumerable:true,configurable:true,writable:true,value:4901});function zR(){let e=new Jl.default;return {get eventNames(){return e.eventNames.bind(e)},get listenerCount(){return e.listenerCount.bind(e)},get listeners(){return e.listeners.bind(e)},addListener:e.addListener.bind(e),emit:e.emit.bind(e),off:e.off.bind(e),on:e.on.bind(e),once:e.once.bind(e),removeAllListeners:e.removeAllListeners.bind(e),removeListener:e.removeListener.bind(e)}}function LR(e,t={}){let{includeEvents:r=true}=t;if(!e)throw new u6;return {...r?{on:e.on?.bind(e),removeListener:e.removeListener?.bind(e)}:{},async request(o){let n=await e.request(o);return n&&typeof n=="object"&&"jsonrpc"in n?l0(n):n}}}var u6=class extends f0{constructor(){super("`provider` is undefined."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Provider.IsUndefinedError"});}};function UR(e={}){let t=e.id??0;return {prepare(r){return $F({id:t++,...r})},get id(){return t}}}function $F(e){return {...e,jsonrpc:"2.0"}}var DR=Symbol("Comlink.proxy"),NF=Symbol("Comlink.endpoint"),PF=Symbol("Comlink.releaseProxy"),f6=Symbol("Comlink.finalizer"),p0=Symbol("Comlink.thrown"),jR=e=>typeof e=="object"&&e!==null||typeof e=="function",BF={canHandle:e=>jR(e)&&e[DR],serialize(e){let{port1:t,port2:r}=new MessageChannel;return HR(e,t),[r,[r]]},deserialize(e){return e.start(),d6(e)}},CF={canHandle:e=>jR(e)&&p0 in e,serialize({value:e}){let t;return e instanceof Error?t={isError:true,value:{message:e.message,name:e.name,stack:e.stack}}:t={isError:false,value:e},[t,[]]},deserialize(e){throw e.isError?Object.assign(new Error(e.value.message),e.value):e.value}},FR=new Map([["proxy",BF],["throw",CF]]);function zF(e,t){for(let r of e)if(t===r||r==="*"||r instanceof RegExp&&r.test(t))return true;return false}function HR(e,t=globalThis,r=["*"]){t.addEventListener("message",function o(n){if(!n||!n.data)return;if(!zF(r,n.origin)){console.warn(`Invalid origin '${n.origin}' for comlink proxy`);return}let{id:i,type:s,path:a}=Object.assign({path:[]},n.data),c=(n.data.argumentList||[]).map(Pa),u;try{let f=a.slice(0,-1).reduce((g,h)=>g[h],e),d=a.reduce((g,h)=>g[h],e);switch(s){case "GET":u=d;break;case "SET":f[a.slice(-1)[0]]=Pa(n.data.value),u=!0;break;case "APPLY":u=d.apply(f,c);break;case "CONSTRUCT":{let g=new d(...c);u=FF(g);}break;case "ENDPOINT":{let{port1:g,port2:h}=new MessageChannel;HR(e,h),u=jF(g,[g]);}break;case "RELEASE":u=void 0;break;default:return}}catch(f){u={value:f,[p0]:0};}Promise.resolve(u).catch(f=>({value:f,[p0]:0})).then(f=>{let[d,g]=g0(f);t.postMessage(Object.assign(Object.assign({},d),{id:i}),g),s==="RELEASE"&&(t.removeEventListener("message",o),VR(t),f6 in e&&typeof e[f6]=="function"&&e[f6]());}).catch(f=>{let[d,g]=g0({value:new TypeError("Unserializable return value"),[p0]:0});t.postMessage(Object.assign(Object.assign({},d),{id:i}),g);});}),t.start&&t.start();}function LF(e){return e.constructor.name==="MessagePort"}function VR(e){LF(e)&&e.close();}function d6(e,t){let r=new Map;return e.addEventListener("message",function(n){let{data:i}=n;if(!i||!i.id)return;let s=r.get(i.id);if(s)try{s(i);}finally{r.delete(i.id);}}),l6(e,r,[],t)}function d0(e){if(e)throw new Error("Proxy has been released and is not useable")}function ZR(e){return Qc(e,new Map,{type:"RELEASE"}).then(()=>{VR(e);})}var m0=new WeakMap,h0="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{let t=(m0.get(e)||0)-1;m0.set(e,t),t===0&&ZR(e);});function UF(e,t){let r=(m0.get(t)||0)+1;m0.set(t,r),h0&&h0.register(e,t,e);}function MF(e){h0&&h0.unregister(e);}function l6(e,t,r=[],o=function(){}){let n=false,i=new Proxy(o,{get(s,a){if(d0(n),a===PF)return ()=>{MF(i),ZR(e),t.clear(),n=true;};if(a==="then"){if(r.length===0)return {then:()=>i};let c=Qc(e,t,{type:"GET",path:r.map(u=>u.toString())}).then(Pa);return c.then.bind(c)}return l6(e,t,[...r,a])},set(s,a,c){d0(n);let[u,f]=g0(c);return Qc(e,t,{type:"SET",path:[...r,a].map(d=>d.toString()),value:u},f).then(Pa)},apply(s,a,c){d0(n);let u=r[r.length-1];if(u===NF)return Qc(e,t,{type:"ENDPOINT"}).then(Pa);if(u==="bind")return l6(e,t,r.slice(0,-1));let[f,d]=MR(c);return Qc(e,t,{type:"APPLY",path:r.map(g=>g.toString()),argumentList:f},d).then(Pa)},construct(s,a){d0(n);let[c,u]=MR(a);return Qc(e,t,{type:"CONSTRUCT",path:r.map(f=>f.toString()),argumentList:c},u).then(Pa)}});return UF(i,e),i}function DF(e){return Array.prototype.concat.apply([],e)}function MR(e){let t=e.map(g0);return [t.map(r=>r[0]),DF(t.map(r=>r[1]))]}var GR=new WeakMap;function jF(e,t){return GR.set(e,t),e}function FF(e){return Object.assign(e,{[DR]:true})}function qR(e,t=globalThis,r="*"){return {postMessage:(o,n)=>e.postMessage(o,r,n),addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}function g0(e){for(let[t,r]of FR)if(r.canHandle(e)){let[o,n]=r.serialize(e);return [{type:"HANDLER",name:t,value:o},n]}return [{type:"RAW",value:e},GR.get(e)||[]]}function Pa(e){switch(e.type){case "HANDLER":return FR.get(e.name).deserialize(e.value);case "RAW":return e.value}}function Qc(e,t,r,o){return new Promise(n=>{let i=HF();t.set(i,n),e.start&&e.start(),e.postMessage(Object.assign({id:i},r),o);})}function HF(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var VF={postMessage(){},addEventListener:()=>{},removeEventListener:()=>{}},ZF={postMessage:e=>{window.ReactNativeWebView.postMessage(JSON.stringify(e));},addEventListener:(e,t,...r)=>{document.addEventListener("FarcasterFrameCallback",t,...r);},removeEventListener:(e,t)=>{document.removeEventListener("FarcasterFrameCallback",t);}},WR=typeof window>"u"?VF:window?.ReactNativeWebView?ZF:qR(window?.parent??window);var ve=d6(WR);var p6=zR(),GF=UR();function qF({code:e,details:t}){switch(e){case 4001:return new xd;case 4100:return new vd;case 4200:return new wd;case 4900:return new _d;case 4901:return new Ed;default:return new Bo(e,t??"Unknown provider RPC error")}}var eu=LR({...p6,async request(e){let t=GF.prepare(e);try{let r=await ve.ethProviderRequestV2(t).then(o=>l0(o,{request:t,raw:!0}));if(r.error)throw qF(r.error);return r.result}catch(r){if(r instanceof Error&&r.message.match(/cannot read property 'apply'/i))return await ve.ethProviderRequest(t);throw r instanceof Bo||r instanceof gr?r:new Na({message:r instanceof Error?r.message:void 0})}}});async function KR(){try{let e=await ve.getCapabilities();return !e.includes("wallet.getEthereumProvider")&&!e.includes("wallet.getEvmProvider")?void 0:eu}catch{return eu}}function JR(e){let t=new CustomEvent("eip6963:announceProvider",{detail:Object.freeze(e)});window.dispatchEvent(t);let r=()=>window.dispatchEvent(t);return window.addEventListener("eip6963:requestProvider",r),()=>window.removeEventListener("eip6963:requestProvider",r)}typeof document<"u"&&(document.addEventListener("eip6963:requestProvider",()=>{ve.eip6963RequestProvider();}),document.addEventListener("FarcasterFrameEthProviderEvent",e=>{if(e instanceof MessageEvent){let t=e.data;p6.emit(t.event,...t.params);}}),document.addEventListener("FarcasterFrameEvent",e=>{if(e instanceof MessageEvent){let t=e.data;t.event==="eip6963:announceProvider"&&JR({info:t.info,provider:eu});}}));typeof window<"u"&&(window.addEventListener("eip6963:requestProvider",()=>{ve.eip6963RequestProvider();}),window.addEventListener("message",e=>{if(e instanceof MessageEvent&&e.data.type==="frameEthProviderEvent"){let t=e.data;p6.emit(t.event,...t.params);}}),window.addEventListener("message",e=>{if(e instanceof MessageEvent&&e.data.type==="frameEvent"){let t=e.data.event;t.event==="eip6963:announceProvider"&&JR({info:t.info,provider:eu});}}));new TextEncoder;var y0=new TextDecoder;var KF=e=>{let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r},YR=e=>{let t=e;t instanceof Uint8Array&&(t=y0.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return KF(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}};var XR=YR;function YF(e){return typeof e=="object"&&e!==null}function m6(e){if(!YF(e)||Object.prototype.toString.call(e)!=="[object Object]")return false;if(Object.getPrototypeOf(e)===null)return true;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}var yr=class extends Error{constructor(t,r){super(t,r),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor);}};yr.code="ERR_JOSE_GENERIC";var h6=class extends yr{constructor(t,r,o="unspecified",n="unspecified"){super(t,{cause:{claim:o,reason:n,payload:r}}),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=o,this.reason=n,this.payload=r;}};h6.code="ERR_JWT_CLAIM_VALIDATION_FAILED";var g6=class extends yr{constructor(t,r,o="unspecified",n="unspecified"){super(t,{cause:{claim:o,reason:n,payload:r}}),this.code="ERR_JWT_EXPIRED",this.claim=o,this.reason=n,this.payload=r;}};g6.code="ERR_JWT_EXPIRED";var y6=class extends yr{constructor(){super(...arguments),this.code="ERR_JOSE_ALG_NOT_ALLOWED";}};y6.code="ERR_JOSE_ALG_NOT_ALLOWED";var b6=class extends yr{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED";}};b6.code="ERR_JOSE_NOT_SUPPORTED";var x6=class extends yr{constructor(t="decryption operation failed",r){super(t,r),this.code="ERR_JWE_DECRYPTION_FAILED";}};x6.code="ERR_JWE_DECRYPTION_FAILED";var v6=class extends yr{constructor(){super(...arguments),this.code="ERR_JWE_INVALID";}};v6.code="ERR_JWE_INVALID";var w6=class extends yr{constructor(){super(...arguments),this.code="ERR_JWS_INVALID";}};w6.code="ERR_JWS_INVALID";var so=class extends yr{constructor(){super(...arguments),this.code="ERR_JWT_INVALID";}};so.code="ERR_JWT_INVALID";var _6=class extends yr{constructor(){super(...arguments),this.code="ERR_JWK_INVALID";}};_6.code="ERR_JWK_INVALID";var E6=class extends yr{constructor(){super(...arguments),this.code="ERR_JWKS_INVALID";}};E6.code="ERR_JWKS_INVALID";var S6=class extends yr{constructor(t="no applicable key found in the JSON Web Key Set",r){super(t,r),this.code="ERR_JWKS_NO_MATCHING_KEY";}};S6.code="ERR_JWKS_NO_MATCHING_KEY";var I6=class extends yr{constructor(t="multiple matching keys found in the JSON Web Key Set",r){super(t,r),this.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";}};I6.code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";var A6=class extends yr{constructor(t="request timed out",r){super(t,r),this.code="ERR_JWKS_TIMEOUT";}};A6.code="ERR_JWKS_TIMEOUT";var k6=class extends yr{constructor(t="signature verification failed",r){super(t,r),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";}};k6.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";function QR(e){if(typeof e!="string")throw new so("JWTs must use Compact JWS serialization, JWT must be a string");let{1:t,length:r}=e.split(".");if(r===5)throw new so("Only JWTs using Compact JWS serialization can be decoded");if(r!==3)throw new so("Invalid JWT");if(!t)throw new so("JWTs must contain a payload");let o;try{o=XR(t);}catch{throw new so("Failed to base64url decode the payload")}let n;try{n=JSON.parse(y0.decode(o));}catch{throw new so("Failed to parse the decoded payload as JSON")}if(!m6(n))throw new so("Invalid JWT Claims Set");return n}function eT(e){return QR(e)}var b0=class e extends Error{constructor(t,r={}){let o=(()=>{if(r.cause instanceof e){if(r.cause.details)return r.cause.details;if(r.cause.shortMessage)return r.cause.shortMessage}return r.cause&&"details"in r.cause&&typeof r.cause.details=="string"?r.cause.details:r.cause?.message?r.cause.message:r.details})(),n=[t||"An error occurred.",...r.metaMessages?["",...r.metaMessages]:[],...o?["",o?`Details: ${o}`:void 0]:[]].filter(i=>typeof i=="string").join(`
|
|
66
|
+
`);super(n,r.cause?{cause:r.cause}:void 0),this.name="BaseError",this.cause=r.cause,this.details=o,this.shortMessage=t;}},tu=class extends b0{constructor({status:t}){super(`Request failed with status ${t}`),this.name="RequestFailedError";}},x0=class extends b0{constructor(t){super(t),this.name="InvalidToken";}};async function tT({origin:e}){let t=await fetch(`${e}/nonce`,{method:"POST"});if(!t.ok)throw new tu({status:t.status});return await t.json()}async function rT({origin:e},t){let r=await fetch(`${e}/verify-siwf`,{method:"POST",headers:new Headers({"Content-Type":"application/json"}),body:JSON.stringify(t)});if(!r.ok)throw new tu({status:r.status});let o=await r.json();if(o.valid===false)throw new x0(o.message??"unknown");return {token:o.token}}function nT(e={}){return {origin:e.origin??"https://auth.farcaster.xyz"}}function oT(e={}){let t=nT(e);return {generateNonce:()=>tT(t),verifySiwf:r=>rT(t,r)}}var XF=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,QF=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;function iT(e){let{scheme:t,statement:r,...o}=e.match(XF)?.groups??{},{chainId:n,expirationTime:i,issuedAt:s,notBefore:a,requestId:c,...u}=e.match(QF)?.groups??{},f=e.split("Resources:")[1]?.split(`
|
|
67
|
+
- `).slice(1);return {...o,...u,...n?{chainId:Number(n)}:{},...i?{expirationTime:new Date(i)}:{},...s?{issuedAt:new Date(s)}:{},...a?{notBefore:new Date(a)}:{},...c?{requestId:c}:{},...f?{resources:f}:{},...t?{scheme:t}:{},...r?{statement:r}:{}}}var v0=(()=>{let e,t;async function r(o){let n=oT({origin:o.quickAuthServerOrigin}),{nonce:i}=await n.generateNonce(),s=await ve.signIn({nonce:i,acceptAuthAddress:true});if(s.result){let a=iT(s.result.message);if(!a.domain)throw new Error("Missing domain on SIWE message");let c=await n.verifySiwf({domain:a.domain,message:s.result.message,signature:s.result.signature});return e={token:c.token,payload:eT(c.token)},c}throw s.error.type==="rejected_by_user"?new _c.RejectedByUser:new Error("Unreachable")}return {get token(){if(e&&new Date(e.payload.exp*1e3)>new Date(Date.now()+15e3))return e.token},async getToken(o={}){let n=o.force??false;return e&&!n&&new Date(e.payload.exp*1e3)>new Date(Date.now()+15e3)?{token:e.token}:(t||(t=r(o)),t.finally(()=>{t=void 0;}),t)},async fetch(o,n){let{token:i}=await this.getToken(),s=new Headers(n?.headers);return s.set("Authorization",`Bearer ${i}`),fetch(o,{...n,headers:s})}}})();function rH(){let e=new Ck;return {get eventNames(){return e.eventNames.bind(e)},get listenerCount(){return e.listenerCount.bind(e)},get listeners(){return e.listeners.bind(e)},addListener:e.addListener.bind(e),emit:e.emit.bind(e),off:e.off.bind(e),on:e.on.bind(e),once:e.once.bind(e),removeAllListeners:e.removeAllListeners.bind(e),removeListener:e.removeListener.bind(e)}}var br=rH();var{solanaProviderRequest:sT}=ve,aT;sT&&(aT=RR($R(sT)));async function R6(){let e;try{e=await ve.getCapabilities();}catch{}if(e?.includes("wallet.getSolanaProvider"))return aT}var cT=null;async function nH(e=1e3){if(cT===true)return true;if(typeof window>"u"||!window.ReactNativeWebView&&window===window.parent)return false;let t=await Promise.race([ve.context.then(r=>!!r),new Promise(r=>{setTimeout(()=>r(false),e);})]).catch(()=>false);return t&&(cT=true),t}var uT=async()=>{let e=await ve.addFrame();if(e.result)return e.result;throw e.error.type==="invalid_domain_manifest"?new wl.InvalidDomainManifest:e.error.type==="rejected_by_user"?new wl.RejectedByUser:new Error("Unreachable")},fT={...br,getCapabilities:ve.getCapabilities,getChains:ve.getChains,isInMiniApp:nH,context:ve.context,back:OR({miniAppHost:ve,emitter:br}),quickAuth:v0,actions:{setPrimaryButton:ve.setPrimaryButton.bind(ve),ready:async(e={})=>await ve.ready(e),close:ve.close.bind(ve),viewCast:ve.viewCast.bind(ve),viewProfile:ve.viewProfile.bind(ve),openMiniApp:ve.openMiniApp.bind(ve),signIn:async e=>{let t=await ve.signIn({...e,acceptAuthAddress:e.acceptAuthAddress??true});if(t.result)return t.result;throw t.error.type==="rejected_by_user"?new _c.RejectedByUser:new Error("Unreachable")},openUrl:e=>{let t=typeof e=="string"?e:e.url;return ve.openUrl(t.trim())},addFrame:uT,addMiniApp:uT,composeCast(e={}){return ve.composeCast(e)},viewToken:ve.viewToken.bind(ve),sendToken:ve.sendToken.bind(ve),swapToken:ve.swapToken.bind(ve),requestCameraAndMicrophoneAccess:ve.requestCameraAndMicrophoneAccess.bind(ve)},experimental:{getSolanaProvider:R6,signManifest:async e=>{let t=await ve.signManifest(e);if(t.result)return t.result;throw t.error.type==="rejected_by_user"?new Ec.RejectedByUser:t.error.type==="invalid_domain"?new Ec.InvalidDomain:t.error.type==="generic_error"?new Ec.GenericError(t.error.message):new Error("Unreachable")},quickAuth(e){return v0.getToken(e)}},wallet:{ethProvider:eu,getEthereumProvider:KR,getSolanaProvider:R6},haptics:{impactOccurred:ve.impactOccurred.bind(ve),notificationOccurred:ve.notificationOccurred.bind(ve),selectionChanged:ve.selectionChanged.bind(ve)}};typeof document<"u"&&document.addEventListener("FarcasterFrameEvent",e=>{if(e instanceof MessageEvent){let t=e.data;t.event==="primary_button_clicked"?br.emit("primaryButtonClicked"):t.event==="miniapp_added"?br.emit("miniAppAdded",{notificationDetails:t.notificationDetails}):t.event==="miniapp_add_rejected"?br.emit("miniAppAddRejected",{reason:t.reason}):t.event==="miniapp_removed"?br.emit("miniAppRemoved"):t.event==="notifications_enabled"?br.emit("notificationsEnabled",{notificationDetails:t.notificationDetails}):t.event==="notifications_disabled"?br.emit("notificationsDisabled"):t.event==="back_navigation_triggered"&&br.emit("backNavigationTriggered");}});typeof window<"u"&&window.addEventListener("message",e=>{if(e instanceof MessageEvent&&e.data.type==="frameEvent"){let t=e.data.event;t.event==="primary_button_clicked"?br.emit("primaryButtonClicked"):t.event==="miniapp_added"?br.emit("miniAppAdded",{notificationDetails:t.notificationDetails}):t.event==="miniapp_add_rejected"?br.emit("miniAppAddRejected",{reason:t.reason}):t.event==="miniapp_removed"?br.emit("miniAppRemoved"):t.event==="notifications_enabled"?br.emit("notificationsEnabled",{notificationDetails:t.notificationDetails}):t.event==="notifications_disabled"?br.emit("notificationsDisabled"):t.event==="back_navigation_triggered"&&br.emit("backNavigationTriggered");}});var Co=fT;su();function oe(e,t,r){let o=e[t.name];if(typeof o=="function")return o;let n=e[r];return typeof n=="function"?n:i=>t(e,i)}Et();Te();var F0=class extends z{constructor(t){super(`Filter type "${t}" is not supported.`,{name:"FilterTypeNotSupportedError"});}};vr();po();Jd();Si();xi();xs();var n4="/docs/contract/encodeEventTopics";function jo(e){let{abi:t,eventName:r,args:o}=e,n=t[0];if(r){let c=un({abi:t,name:r});if(!c)throw new Hd(r,{docsPath:n4});n=c;}if(n.type!=="event")throw new Hd(void 0,{docsPath:n4});let i=[];if(o&&"inputs"in n){let c=n.inputs?.filter(f=>"indexed"in f&&f.indexed),u=Array.isArray(o)?o:Object.values(o).length>0?c?.map(f=>o[f.name])??[]:[];u.length>0&&(i=c?.map((f,d)=>Array.isArray(u[d])?u[d].map((g,h)=>o4({param:f,value:u[d][h]})):typeof u[d]<"u"&&u[d]!==null?o4({param:f,value:u[d]}):null)??[]);}if(n.anonymous)return i;let s=nr(n);return [gs(s),...i]}function o4({param:e,value:t}){if(e.type==="string"||e.type==="bytes")return Qe(zn(t));if(e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/))throw new F0(e.type);return qr([e],[t])}Re();function vs(e,{method:t}){let r={};return e.transport.type==="fallback"&&e.transport.onResponse?.(({method:o,response:n,status:i,transport:s})=>{i==="success"&&t===o&&(r[n]=s.request);}),(o=>r[o]||e.request)}async function K0(e,t){let{address:r,abi:o,args:n,eventName:i,fromBlock:s,strict:a,toBlock:c}=t,u=vs(e,{method:"eth_newFilter"}),f=i?jo({abi:o,args:n,eventName:i}):void 0,d=await e.request({method:"eth_newFilter",params:[{address:r,fromBlock:typeof s=="bigint"?J(s):s,toBlock:typeof c=="bigint"?J(c):c,topics:f}]});return {abi:o,args:n,eventName:i,id:d,request:u(d),strict:!!a,type:"event"}}fn();Un();Et();Te();Ai();Ma();np();var ZH=3;function ho(e,{abi:t,address:r,args:o,docsPath:n,functionName:i,sender:s}){let a=e instanceof Ho?e:e instanceof z?e.walk(v=>"data"in v)||e.walk():{},{code:c,data:u,details:f,message:d,shortMessage:g}=a,h=e instanceof Cn?new pg({functionName:i,cause:e}):[ZH,ki.code].includes(c)&&(u||f||d||g)||c===jn.code&&f==="execution reverted"&&u?new La({abi:t,data:typeof u=="object"?u.data:u,functionName:i,message:a instanceof Es?f:g??d,cause:e}):e;return new xu(h,{abi:t,args:o,contractAddress:r,docsPath:n,functionName:i,sender:s})}fn();Te();Ei();po();function w4(e){let t=Qe(`0x${e.substring(4)}`).substring(26);return ys(`0x${t}`)}uo();on();ur();Re();async function E4({hash:e,signature:t}){let r=St(e)?e:mt(e),{secp256k1:o}=await Promise.resolve().then(()=>(rd(),eR));return `0x${(()=>{if(typeof t=="object"&&"r"in t&&"s"in t){let{r:u,s:f,v:d,yParity:g}=t,h=Number(g??d),v=_4(h);return new o.Signature(ut(u),ut(f)).addRecoveryBit(v)}let s=St(t)?t:mt(t);if($e(s)!==65)throw new Error("invalid signature length");let a=vt(`0x${s.slice(130)}`),c=_4(a);return o.Signature.fromCompact(s.substring(2,130)).addRecoveryBit(c)})().recoverPublicKey(r.substring(2)).toHex(false)}`}function _4(e){if(e===0||e===1)return e;if(e===27)return 0;if(e===28)return 1;throw new Error("Invalid yParityOrV value")}async function op({hash:e,signature:t}){return w4(await E4({hash:e,signature:t}))}an();vr();Re();Te();Q0();vr();Re();function go(e,t="hex"){let r=S4(e),o=mu(new Uint8Array(r.length));return r.encode(o),t==="hex"?Ue(o.bytes):o.bytes}function S4(e){return Array.isArray(e)?GH(e.map(t=>S4(t))):qH(e)}function GH(e){let t=e.reduce((n,i)=>n+i.length,0),r=I4(t);return {length:t<=55?1+t:1+r+t,encode(n){t<=55?n.pushByte(192+t):(n.pushByte(247+r),r===1?n.pushUint8(t):r===2?n.pushUint16(t):r===3?n.pushUint24(t):n.pushUint32(t));for(let{encode:i}of e)i(n);}}}function qH(e){let t=typeof e=="string"?xr(e):e,r=I4(t.length);return {length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(n){t.length===1&&t[0]<128?n.pushBytes(t):t.length<=55?(n.pushByte(128+t.length),n.pushBytes(t)):(n.pushByte(183+r),r===1?n.pushUint8(t.length):r===2?n.pushUint16(t.length):r===3?n.pushUint24(t.length):n.pushUint32(t.length),n.pushBytes(t));}}}function I4(e){if(e<2**8)return 1;if(e<2**16)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new z("Length is too large.")}po();function A4(e){let{chainId:t,nonce:r,to:o}=e,n=e.contractAddress??e.address,i=Qe(st(["0x05",go([t?J(t):"0x",n,r?J(r):"0x"])]));return o==="bytes"?xr(i):i}async function gg(e){let{authorization:t,signature:r}=e;return op({hash:A4(t),signature:r??t})}Re();og();yu();Te();Mn();var yg=class extends z{constructor(t,{account:r,docsPath:o,chain:n,data:i,gas:s,gasPrice:a,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:f,to:d,value:g}){let h=Ca({from:r?.address,to:d,value:typeof g<"u"&&`${gu(g)} ${n?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:s,gasPrice:typeof a<"u"&&`${or(a)} gwei`,maxFeePerGas:typeof c<"u"&&`${or(c)} gwei`,maxPriorityFeePerGas:typeof u<"u"&&`${or(u)} gwei`,nonce:f});super(t.shortMessage,{cause:t,docsPath:o,metaMessages:[...t.metaMessages?[...t.metaMessages," "]:[],"Estimate Gas Arguments:",h].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:true,configurable:true,writable:true,value:void 0}),this.cause=t;}};Ri();ip();function k4(e,{docsPath:t,...r}){let o=(()=>{let n=Is(e,r);return n instanceof Hn?e:n})();return new yg(o,{docsPath:t,...r})}sp();Ju();xg();Fa();fn();yu();Te();var Qu=class extends z{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"});}},ks=class extends z{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"});}},vg=class extends z{constructor({maxPriorityFeePerGas:t}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${or(t)} gwei).`,{name:"MaxFeePerGasTooLowError"});}};ur();Te();var Rs=class extends z{constructor({blockHash:t,blockNumber:r}){let o="Block";t&&(o=`Block at hash "${t}"`),r&&(o=`Block at number "${r}"`),super(`${o} could not be found.`,{name:"BlockNotFoundError"});}};Re();bg();ur();bg();var r2={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function Ti(e,t){let r={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,...e.blockTimestamp!=null&&{blockTimestamp:BigInt(e.blockTimestamp)},chainId:e.chainId?vt(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?vt(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?r2[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(r.authorizationList=YH(e.authorizationList)),r.yParity=(()=>{if(e.yParity)return Number(e.yParity);if(typeof r.v=="bigint"){if(r.v===0n||r.v===27n)return 0;if(r.v===1n||r.v===28n)return 1;if(r.v>=35n)return r.v%2n===0n?1:0}})(),r.type==="legacy"&&(delete r.accessList,delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas,delete r.yParity),r.type==="eip2930"&&(delete r.maxFeePerBlobGas,delete r.maxFeePerGas,delete r.maxPriorityFeePerGas),r.type==="eip1559"&&delete r.maxFeePerBlobGas,r}var T4=Ku("transaction",Ti);function YH(e){return e.map(t=>({address:t.address,chainId:Number(t.chainId),nonce:Number(t.nonce),r:t.r,s:t.s,yParity:Number(t.yParity)}))}function Ha(e,t){let r=(e.transactions??[]).map(o=>typeof o=="string"?o:Ti(o));return {...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:r,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}var $4=Ku("block",Ha);async function er(e,{blockHash:t,blockNumber:r,blockTag:o=e.experimental_blockTag??"latest",includeTransactions:n}={}){let i=n??false,s=r!==void 0?J(r):void 0,a=null;if(t?a=await e.request({method:"eth_getBlockByHash",params:[t,i]},{dedupe:true}):a=await e.request({method:"eth_getBlockByNumber",params:[s||o,i]},{dedupe:!!s}),!a)throw new Rs({blockHash:t,blockNumber:r});return (e.chain?.formatters?.block?.format||Ha)(a,"getBlock")}async function ef(e){let t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function O4(e,t){return n2(e,t)}async function n2(e,t){let{block:r,chain:o=e.chain,request:n}=t||{};try{let i=o?.fees?.maxPriorityFeePerGas??o?.fees?.defaultPriorityFee;if(typeof i=="function"){let a=r||await oe(e,er,"getBlock")({}),c=await i({block:a,client:e,request:n});if(c===null)throw new Error;return c}if(typeof i<"u")return i;let s=await e.request({method:"eth_maxPriorityFeePerGas"});return ut(s)}catch{let[i,s]=await Promise.all([r?Promise.resolve(r):oe(e,er,"getBlock")({}),oe(e,ef,"getGasPrice")({})]);if(typeof i.baseFeePerGas!="bigint")throw new ks;let a=s-i.baseFeePerGas;return a<0n?0n:a}}async function N4(e,t){return wg(e,t)}async function wg(e,t){let{block:r,chain:o=e.chain,request:n,type:i="eip1559"}=t||{},s=await(async()=>typeof o?.fees?.baseFeeMultiplier=="function"?o.fees.baseFeeMultiplier({block:r,client:e,request:n}):o?.fees?.baseFeeMultiplier??1.2)();if(s<1)throw new Qu;let c=10**(s.toString().split(".")[1]?.length??0),u=g=>g*BigInt(Math.round(s*c))/BigInt(c),f=r||await oe(e,er,"getBlock")({});if(typeof o?.fees?.estimateFeesPerGas=="function"){let g=await o.fees.estimateFeesPerGas({block:r,client:e,multiply:u,request:n,type:i});if(g!==null)return g}if(i==="eip1559"){if(typeof f.baseFeePerGas!="bigint")throw new ks;let g=typeof n?.maxPriorityFeePerGas=="bigint"?n.maxPriorityFeePerGas:await n2(e,{block:f,chain:o,request:n}),h=u(f.baseFeePerGas);return {maxFeePerGas:n?.maxFeePerGas??h+g,maxPriorityFeePerGas:g}}return {gasPrice:n?.gasPrice??u(await oe(e,ef,"getGasPrice")({}))}}Va();ur();async function _g(e,{address:t,blockHash:r,blockNumber:o,blockTag:n="latest",requireCanonical:i}){let s=Sn({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i}),a=await e.request({method:"eth_getTransactionCount",params:[t,s]},{dedupe:typeof o=="bigint"||r!==void 0});return vt(a)}vr();Re();function tf(e){let{kzg:t}=e,r=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),o=typeof e.blobs[0]=="string"?e.blobs.map(i=>xr(i)):e.blobs,n=[];for(let i of o)n.push(Uint8Array.from(t.blobToKzgCommitment(i)));return r==="bytes"?n:n.map(i=>Ue(i))}vr();Re();function rf(e){let{kzg:t}=e,r=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),o=typeof e.blobs[0]=="string"?e.blobs.map(s=>xr(s)):e.blobs,n=typeof e.commitments[0]=="string"?e.commitments.map(s=>xr(s)):e.commitments,i=[];for(let s=0;s<o.length;s++){let a=o[s],c=n[s];i.push(Uint8Array.from(t.computeBlobKzgProof(a,c)));}return r==="bytes"?i:i.map(s=>Ue(s))}Re();uo();vr();Re();function P4(e,t){let r=t,o=Ll(St(e,{strict:false})?zn(e):e);return r==="bytes"?o:mt(o)}function B4(e){let{commitment:t,version:r=1}=e,o=e.to??(typeof t=="string"?"hex":"bytes"),n=P4(t,"bytes");return n.set([r],0),o==="bytes"?n:Ue(n)}function Eg(e){let{commitments:t,version:r}=e,o=e.to??(typeof t[0]=="string"?"hex":"bytes"),n=[];for(let i of t)n.push(B4({commitment:i,to:o,version:r}));return n}Te();var Sg=class extends z{constructor({maxSize:t,size:r}){super("Blob size is too large.",{metaMessages:[`Max: ${t} bytes`,`Given: ${r} bytes`],name:"BlobSizeTooLargeError"});}},nf=class extends z{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"});}},Ig=class extends z{constructor({hash:t,size:r}){super(`Versioned hash "${t}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${r}`],name:"InvalidVersionedHashSizeError"});}},Ag=class extends z{constructor({hash:t,version:r}){super(`Versioned hash "${t}" version is invalid.`,{metaMessages:[`Expected: ${1}`,`Received: ${r}`],name:"InvalidVersionedHashVersionError"});}};Q0();on();vr();Re();function C4(e){let t=e.to??(typeof e.data=="string"?"hex":"bytes"),r=typeof e.data=="string"?xr(e.data):e.data,o=$e(r);if(!o)throw new nf;if(o>761855)throw new Sg({maxSize:761855,size:o});let n=[],i=true,s=0;for(;i;){let a=mu(new Uint8Array(131072)),c=0;for(;c<4096;){let u=r.slice(s,s+31);if(a.pushByte(0),a.pushBytes(u),u.length<31){a.pushByte(128),i=false;break}c++,s+=31;}n.push(a);}return t==="bytes"?n.map(a=>a.bytes):n.map(a=>Ue(a.bytes))}function kg(e){let{data:t,kzg:r,to:o}=e,n=e.blobs??C4({data:t,to:o}),i=e.commitments??tf({blobs:n,kzg:r,to:o}),s=e.proofs??rf({blobs:n,commitments:i,kzg:r,to:o}),a=[];for(let c=0;c<n.length;c++)a.push({blob:n[c],commitment:i[c],proof:s[c]});return a}Yd();Fa();Mn();function Rg(e){if(e.type)return e.type;if(typeof e.authorizationList<"u")return "eip7702";if(typeof e.blobs<"u"||typeof e.blobVersionedHashes<"u"||typeof e.maxFeePerBlobGas<"u"||typeof e.sidecars<"u")return "eip4844";if(typeof e.maxFeePerGas<"u"||typeof e.maxPriorityFeePerGas<"u")return "eip1559";if(typeof e.gasPrice<"u")return typeof e.accessList<"u"?"eip2930":"legacy";throw new cg({transaction:e})}fn();Ri();Mn();ip();function z4(e,{docsPath:t,...r}){let o=(()=>{let n=Is(e,r);return n instanceof Hn?e:n})();return new fg(o,{docsPath:t,...r})}sp();Ju();Fa();ur();async function of(e){let t=await e.request({method:"eth_chainId"},{dedupe:true});return vt(t)}async function Tg(e,t){let{account:r=e.account,accessList:o,authorizationList:n,chain:i=e.chain,blobVersionedHashes:s,blobs:a,data:c,gas:u,gasPrice:f,maxFeePerBlobGas:d,maxFeePerGas:g,maxPriorityFeePerGas:h,nonce:v,nonceManager:E,to:R,type:$,value:N,...O}=t,I=await(async()=>{if(!r||!E||typeof v<"u")return v;let D=qe(r),q=i?i.id:await oe(e,of,"getChainId")({});return await E.consume({address:D.address,chainId:q,client:e})})();Vn(t);let P=i?.formatters?.transactionRequest?.format,C=(P||Zo)({...As(O,{format:P}),account:r?qe(r):void 0,accessList:o,authorizationList:n,blobs:a,blobVersionedHashes:s,data:c,gas:u,gasPrice:f,maxFeePerBlobGas:d,maxFeePerGas:g,maxPriorityFeePerGas:h,nonce:I,to:R,type:$,value:N},"fillTransaction");try{let D=await e.request({method:"eth_fillTransaction",params:[C]}),H=(i?.formatters?.transaction?.format||Ti)(D.tx);delete H.blockHash,delete H.blockNumber,delete H.r,delete H.s,delete H.transactionIndex,delete H.v,delete H.yParity,H.data=H.input,H.gas&&(H.gas=t.gas??H.gas),H.gasPrice&&(H.gasPrice=t.gasPrice??H.gasPrice),H.maxFeePerBlobGas&&(H.maxFeePerBlobGas=t.maxFeePerBlobGas??H.maxFeePerBlobGas),H.maxFeePerGas&&(H.maxFeePerGas=t.maxFeePerGas??H.maxFeePerGas),H.maxPriorityFeePerGas&&(H.maxPriorityFeePerGas=t.maxPriorityFeePerGas??H.maxPriorityFeePerGas),typeof H.nonce<"u"&&(H.nonce=t.nonce??H.nonce);let Z=await(async()=>{if(typeof i?.fees?.baseFeeMultiplier=="function"){let m=await oe(e,er,"getBlock")({});return i.fees.baseFeeMultiplier({block:m,client:e,request:t})}return i?.fees?.baseFeeMultiplier??1.2})();if(Z<1)throw new Qu;let S=10**(Z.toString().split(".")[1]?.length??0),l=m=>m*BigInt(Math.round(Z*S))/BigInt(S);return H.feePayerSignature||(H.maxFeePerGas&&!t.maxFeePerGas&&(H.maxFeePerGas=l(H.maxFeePerGas)),H.gasPrice&&!t.gasPrice&&(H.gasPrice=l(H.gasPrice))),{raw:D.raw,transaction:{from:C.from,...H},...D.capabilities?{capabilities:D.capabilities}:{}}}catch(D){throw z4(D,{...t,chain:e.chain})}}var eV=["blobVersionedHashes","chainId","fees","gas","nonce","type"],L4=new Map,o2=new Uo(128);async function $g(e,t){let r=t;r.account??=e.account,r.parameters??=eV;let{account:o,chain:n=e.chain,nonceManager:i,parameters:s}=r,a=(()=>{if(typeof n?.prepareTransactionRequest=="function")return {fn:n.prepareTransactionRequest,runAt:["beforeFillTransaction"]};if(Array.isArray(n?.prepareTransactionRequest))return {fn:n.prepareTransactionRequest[0],runAt:n.prepareTransactionRequest[1].runAt}})(),c;async function u(){return c||(typeof r.chainId<"u"?r.chainId:n?n.id:(c=await oe(e,of,"getChainId")({}),c))}let f=o&&qe(o),d=r.nonce;if(a?.fn&&a.runAt?.includes("beforeFillTransaction")){r=await a.fn({...r,chain:n},{client:e,phase:"beforeFillTransaction"}),d??=r.nonce;let I=r.account??r.from;f=I?qe(I):void 0;}if(s.includes("nonce")&&typeof d>"u"&&f&&i){let I=await u();d=await i.consume({address:f.address,chainId:I,client:e});}let h=((s.includes("blobVersionedHashes")||s.includes("sidecars"))&&r.kzg&&r.blobs?false:s.length>0&&"feePayer"in r&&r.feePayer&&!("feePayerSignature"in r&&r.feePayerSignature)?true:o2.get(e.uid)===false||!["fees","gas"].some(P=>s.includes(P))?false:!!(s.includes("chainId")&&typeof r.chainId!="number"||s.includes("nonce")&&typeof d!="number"||s.includes("fees")&&typeof r.gasPrice!="bigint"&&(typeof r.maxFeePerGas!="bigint"||typeof r.maxPriorityFeePerGas!="bigint")||s.includes("gas")&&typeof r.gas!="bigint"))?await oe(e,Tg,"fillTransaction")({...r,nonce:d}).then(I=>{let{chainId:P,from:L,gas:C,gasPrice:D,nonce:q,maxFeePerBlobGas:H,maxFeePerGas:Z,maxPriorityFeePerGas:re,type:S,...l}=I.transaction,m="feeToken"in l?l.feeToken:void 0,y="feePayerSignature"in l&&l.feePayerSignature!==null&&typeof l.feePayerSignature<"u",b=typeof m<"u"&&m!==null&&(!("feeToken"in r)||y);return o2.set(e.uid,true),{...r,...L?{from:L}:{},...S&&!r.type?{type:S}:{},...typeof P<"u"?{chainId:P}:{},...typeof C<"u"?{gas:C}:{},...typeof D<"u"?{gasPrice:D}:{},...typeof q<"u"?{nonce:q}:{},...typeof H<"u"&&r.type!=="legacy"&&r.type!=="eip2930"?{maxFeePerBlobGas:H}:{},...typeof Z<"u"&&r.type!=="legacy"&&r.type!=="eip2930"?{maxFeePerGas:Z}:{},...typeof re<"u"&&r.type!=="legacy"&&r.type!=="eip2930"?{maxPriorityFeePerGas:re}:{},..."nonceKey"in l&&typeof l.nonceKey<"u"?{nonceKey:l.nonceKey}:{},..."keyAuthorization"in l&&typeof l.keyAuthorization<"u"&&l.keyAuthorization!==null&&!("keyAuthorization"in r)?{keyAuthorization:l.keyAuthorization}:{},..."feePayerSignature"in l&&typeof l.feePayerSignature<"u"&&l.feePayerSignature!==null?{feePayerSignature:l.feePayerSignature}:{},...b?{feeToken:m}:{},...I.capabilities?{_capabilities:I.capabilities}:{}}}).catch(I=>{let P=I;if(P.name!=="TransactionExecutionError")return r;if(P.walk?.(D=>D.name==="ExecutionRevertedError"))throw I;return P.walk?.(D=>{let q=D;return q.name==="MethodNotFoundRpcError"||q.name==="MethodNotSupportedRpcError"||q.message?.includes("eth_fillTransaction is not available")})&&o2.set(e.uid,false),r}):r;d??=h.nonce,r={...h,...f?{from:f?.address}:{},...typeof d<"u"?{nonce:d}:{}};let{blobs:v,gas:E,kzg:R,type:$}=r;a?.fn&&a.runAt?.includes("beforeFillParameters")&&(r=await a.fn({...r,chain:n},{client:e,phase:"beforeFillParameters"}));let N;async function O(){return N||(N=await oe(e,er,"getBlock")({blockTag:"latest"}),N)}if(s.includes("nonce")&&typeof d>"u"&&f&&!i&&(r.nonce=await oe(e,_g,"getTransactionCount")({address:f.address,blockTag:"pending"})),(s.includes("blobVersionedHashes")||s.includes("sidecars"))&&v&&R){let I=tf({blobs:v,kzg:R});if(s.includes("blobVersionedHashes")){let P=Eg({commitments:I,to:"hex"});r.blobVersionedHashes=P;}if(s.includes("sidecars")){let P=rf({blobs:v,commitments:I,kzg:R}),L=kg({blobs:v,commitments:I,proofs:P,to:"hex"});r.sidecars=L;}}if(s.includes("chainId")&&(r.chainId=await u()),(s.includes("fees")||s.includes("type"))&&typeof $>"u")try{r.type=Rg(r);}catch{let I=L4.get(e.uid);typeof I>"u"&&(I=typeof(await O())?.baseFeePerGas=="bigint",L4.set(e.uid,I)),r.type=I?"eip1559":"legacy";}if(s.includes("fees"))if(r.type!=="legacy"&&r.type!=="eip2930"){if(typeof r.maxFeePerGas>"u"||typeof r.maxPriorityFeePerGas>"u"){let I=await O(),{maxFeePerGas:P,maxPriorityFeePerGas:L}=await wg(e,{block:I,chain:n,request:r});if(typeof r.maxPriorityFeePerGas>"u"&&r.maxFeePerGas&&r.maxFeePerGas<L)throw new vg({maxPriorityFeePerGas:L});r.maxPriorityFeePerGas=L,r.maxFeePerGas=P;}}else {if(typeof r.maxFeePerGas<"u"||typeof r.maxPriorityFeePerGas<"u")throw new ks;if(typeof r.gasPrice>"u"){let I=await O(),{gasPrice:P}=await wg(e,{block:I,chain:n,request:r,type:"legacy"});r.gasPrice=P;}}return s.includes("gas")&&typeof E>"u"&&(r.gas=await oe(e,sf,"estimateGas")({...r,account:f,prepare:f?.type==="local"?[]:["blobVersionedHashes"]})),a?.fn&&a.runAt?.includes("afterFillParameters")&&(r=await a.fn({...r,chain:n},{client:e,phase:"afterFillParameters"})),Vn(r),delete r.parameters,r}async function sf(e,t){let{account:r=e.account,prepare:o=true}=t,n=r?qe(r):void 0,i=(()=>{if(Array.isArray(o))return o;if(n?.type!=="local")return ["blobVersionedHashes"]})();try{let s=await(async()=>{if(t.to)return t.to;if(t.authorizationList&&t.authorizationList.length>0)return await gg({authorization:t.authorizationList[0]}).catch(()=>{throw new z("`to` is required. Could not infer from `authorizationList`")})})(),{accessList:a,authorizationList:c,blobs:u,blobVersionedHashes:f,blockNumber:d,blockTag:g,data:h,gas:v,gasPrice:E,maxFeePerBlobGas:R,maxFeePerGas:$,maxPriorityFeePerGas:N,nonce:O,value:I,stateOverride:P,...L}=o?await $g(e,{...t,parameters:i,to:s}):t;if(v&&t.gas!==v)return v;let D=(typeof d=="bigint"?J(d):void 0)||g,q=Yu(P);Vn(t);let H=e.chain?.formatters?.transactionRequest?.format,re=(H||Zo)({...As(L,{format:H}),account:n,accessList:a,authorizationList:c,blobs:u,blobVersionedHashes:f,data:h,gasPrice:E,maxFeePerBlobGas:R,maxFeePerGas:$,maxPriorityFeePerGas:N,nonce:O,to:s,value:I},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:q?[re,D??e.experimental_blockTag??"latest",q]:D?[re,D]:[re]}))}catch(s){throw k4(s,{...t,account:n,chain:e.chain})}}async function U4(e,t){let{abi:r,address:o,args:n,functionName:i,dataSuffix:s=typeof e.dataSuffix=="string"?e.dataSuffix:e.dataSuffix?.value,...a}=t,c=ft({abi:r,args:n,functionName:i});try{return await oe(e,sf,"estimateGas")({data:`${c}${s?s.replace("0x",""):""}`,to:o,...a})}catch(u){let f=a.account?qe(a.account):void 0;throw ho(u,{abi:r,address:o,args:n,docsPath:"/docs/contract/estimateContractGas",functionName:i,sender:f?.address})}}xs();Ts();vr();function fr(e,{args:t,eventName:r}={}){return {...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...r?{args:t,eventName:r}:{}}}po();Jd();Et();W6();on();Jd();tp();xi();var M4="/docs/contract/decodeEventLog";function Za(e){let{abi:t,data:r,strict:o,topics:n}=e,i=o??true,[s,...a]=n;if(!s)throw new C0({docsPath:M4});let c=t.find($=>$.type==="event"&&s===gs(nr($)));if(!(c&&"name"in c)||c.type!=="event")throw new z0(s,{docsPath:M4});let{name:u,inputs:f}=c,d=f?.some($=>!("name"in $&&$.name)),g=d?[]:{},h=f.map(($,N)=>[$,N]).filter(([$])=>"indexed"in $&&$.indexed),v=[];for(let $=0;$<h.length;$++){let[N,O]=h[$],I=a[$];if(!I){if(i)throw new ms({abiItem:c,param:N});v.push([N,O]);continue}g[d?O:N.name||O]=tV({param:N,value:I});}let E=f.filter($=>!("indexed"in $&&$.indexed)),R=i?E:[...v.map(([$])=>$),...E];if(R.length>0){if(r&&r!=="0x")try{let $=Ii(R,r);if($){let N=0;if(!i)for(let[O,I]of v)g[d?I:O.name||I]=$[N++];if(d)for(let O=0;O<f.length;O++)g[O]===void 0&&N<$.length&&(g[O]=$[N++]);else for(let O=0;O<E.length;O++)g[E[O].name]=$[N++];}}catch($){if(i)throw $ instanceof au||$ instanceof pu?new vi({abiItem:c,data:r,params:R,size:$e(r)}):$}else if(i)throw new vi({abiItem:c,data:"0x",params:R,size:0})}return {eventName:u,args:Object.values(g).length>0?g:void 0}}function tV({param:e,value:t}){return e.type==="string"||e.type==="bytes"||e.type==="tuple"||e.type.match(/^(.*)\[(\d+)?\]$/)?t:(Ii([e],t)||[])[0]}function af(e){let{abi:t,args:r,logs:o,strict:n=true}=e,i=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})(),s=t.filter(a=>a.type==="event").map(a=>({abi:a,selector:gs(a)}));return o.map(a=>{let c=typeof a.blockNumber=="string"?fr(a):a,u=s.filter(g=>c.topics[0]===g.selector);if(u.length===0)return null;let f,d;for(let g of u)try{f=Za({...c,abi:[g.abi],strict:!0}),d=g;break}catch{}if(!f&&!n){d=u[0];try{f=Za({data:c.data,topics:c.topics,abi:[d.abi],strict:!1});}catch{let g=d.abi.inputs?.some(h=>!("name"in h&&h.name));return {...c,args:g?[]:{},eventName:d.abi.name}}}return !f||!d||i&&!i.includes(f.eventName)||!rV({args:f.args,inputs:d.abi.inputs,matchArgs:r})?null:{...f,...c}}).filter(Boolean)}function rV(e){let{args:t,inputs:r,matchArgs:o}=e;if(!o)return true;if(!t)return false;function n(i,s,a){try{return i.type==="address"?zr(s,a):i.type==="string"||i.type==="bytes"?Qe(zn(s))===a:s===a}catch{return false}}return Array.isArray(t)&&Array.isArray(o)?o.every((i,s)=>{if(i==null)return true;let a=r[s];return a?(Array.isArray(i)?i:[i]).some(u=>n(a,u,t[s])):false}):typeof t=="object"&&!Array.isArray(t)&&typeof o=="object"&&!Array.isArray(o)?Object.entries(o).every(([i,s])=>{if(s==null)return true;let a=r.find(u=>u.name===i);return a?(Array.isArray(s)?s:[s]).some(u=>n(a,u,t[i])):false}):false}Re();async function cf(e,{address:t,blockHash:r,fromBlock:o,toBlock:n,event:i,events:s,args:a,strict:c}={}){let u=c??false,f=s??(i?[i]:void 0),d=[];f&&(d=[f.flatMap(E=>jo({abi:[E],eventName:E.name,args:s?void 0:a}))],i&&(d=d[0]));let g;r?g=await e.request({method:"eth_getLogs",params:[{address:t,topics:d,blockHash:r}]}):g=await e.request({method:"eth_getLogs",params:[{address:t,topics:d,fromBlock:typeof o=="bigint"?J(o):o,toBlock:typeof n=="bigint"?J(n):n}]});let h=g.map(v=>fr(v));return f?af({abi:f,args:a,logs:h,strict:u}):h}async function Og(e,t){let{abi:r,address:o,args:n,blockHash:i,eventName:s,fromBlock:a,toBlock:c,strict:u}=t,f=s?un({abi:r,name:s}):void 0,d=f?void 0:r.filter(g=>g.type==="event");return oe(e,cf,"getLogs")({address:o,args:n,blockHash:i,event:f,events:d,fromBlock:a,toBlock:c,strict:u})}$i();Un();Ns();async function De(e,t){let{abi:r,address:o,args:n,functionName:i,...s}=t,a=ft({abi:r,args:n,functionName:i});try{let{data:c}=await oe(e,mn,"call")({...s,data:a,to:o});return Lr({abi:r,args:n,functionName:i,data:c||"0x"})}catch(c){throw ho(c,{abi:r,address:o,args:n,docsPath:"/docs/contract/readContract",functionName:i})}}fn();$i();Un();Ns();async function R$(e,t){let{abi:r,address:o,args:n,functionName:i,dataSuffix:s=typeof e.dataSuffix=="string"?e.dataSuffix:e.dataSuffix?.value,...a}=t,c=a.account?qe(a.account):e.account,u=ft({abi:r,args:n,functionName:i});try{let{data:f}=await oe(e,mn,"call")({batch:!1,data:`${u}${s?s.replace("0x",""):""}`,to:o,...a,account:c}),d=Lr({abi:r,args:n,functionName:i,data:f||"0x"}),g=r.filter(h=>"name"in h&&h.name===t.functionName);return {result:d,request:{abi:g,address:o,args:n,dataSuffix:s,functionName:i,...a,account:c}}}catch(f){throw ho(f,{abi:r,address:o,args:n,docsPath:"/docs/contract/simulateContract",functionName:i,sender:c?.address})}}Et();np();var Xg=new Map,R2=new Map,IV=0;function Ur(e,t,r){let o=++IV,n=()=>Xg.get(e)||[],i=()=>{let d=n().filter(g=>g.id!==o);if(d.length===0){Xg.delete(e),R2.delete(e);return}Xg.set(e,d);},s=()=>{let f=n();if(!f.some(g=>g.id===o))return;let d=R2.get(e);if(f.length===1&&d){let g=d();g instanceof Promise&&g.catch(()=>{});}i();},a=n();if(Xg.set(e,[...a,{id:o,fns:t}]),a&&a.length>0)return s;let c={};for(let f in t)c[f]=((...d)=>{let g=n();if(g.length!==0)for(let h of g)h.fns[f]?.(...d);});let u=r(c);return typeof u=="function"&&R2.set(e,u),s}mo();async function gp(e,{signal:t}={}){return new Promise((r,o)=>{if(t?.aborted){o(wr(t));return}let n=()=>t?.removeEventListener("abort",s),i=setTimeout(()=>{n(),r();},e),s=()=>{clearTimeout(i),n(),o(wr(t));};t?.addEventListener("abort",s,{once:true});})}function Wo(e,{emitOnBegin:t,initialWaitTime:r,interval:o}){let n=true,i=()=>n=false;return (async()=>{let a;t&&(a=await e({unpoll:i}));let c=await r?.(a)??o;await gp(c);let u=async()=>{n&&(await e({unpoll:i}),await gp(o),u());};u();})(),i}Pr();var AV=new Map,kV=new Map;function T$(e){let t=(n,i)=>({clear:()=>i.delete(n),get:()=>i.get(n),set:s=>i.set(n,s)}),r=t(e,AV),o=t(e,kV);return {clear:()=>{r.clear(),o.clear();},promise:r,response:o}}async function $$(e,{cacheKey:t,cacheTime:r=Number.POSITIVE_INFINITY}){let o=T$(t),n=o.response.get();if(n&&r>0&&Date.now()-n.created.getTime()<r)return n.data;let i=o.promise.get();i||(i=e(),o.promise.set(i));try{let s=await i;return o.response.set({created:new Date,data:s}),s}finally{o.promise.clear();}}var RV=e=>`blockNumber.${e}`;async function Wn(e,{cacheTime:t=e.cacheTime}={}){let r=await $$(()=>e.request({method:"eth_blockNumber"}),{cacheKey:RV(e.uid),cacheTime:t});return BigInt(r)}async function Ps(e,{filter:t}){let r="strict"in t&&t.strict,o=await t.request({method:"eth_getFilterChanges",params:[t.id]});if(typeof o[0]=="string")return o;let n=o.map(i=>fr(i));return !("abi"in t)||!t.abi?n:af({abi:t.abi,logs:n,strict:r})}async function Bs(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}function O$(e,t){let{abi:r,address:o,args:n,batch:i=true,eventName:s,fromBlock:a,onError:c,onLogs:u,poll:f,pollingInterval:d=e.pollingInterval,strict:g}=t;return (typeof f<"u"?f:typeof a=="bigint"?true:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")))?(()=>{let R=g??false,$=Be(["watchContractEvent",o,n,i,e.uid,s,d,R,a]);return Ur($,{onLogs:u,onError:c},N=>{let O;a!==void 0&&(O=a-1n);let I,P=false,L=Wo(async()=>{if(!P){try{I=await oe(e,K0,"createContractEventFilter")({abi:r,address:o,args:n,eventName:s,strict:R,fromBlock:a});}catch{}P=true;return}try{let C;if(I)C=await oe(e,Ps,"getFilterChanges")({filter:I});else {let D=await oe(e,Wn,"getBlockNumber")({});O&&O<D?C=await oe(e,Og,"getContractEvents")({abi:r,address:o,args:n,eventName:s,fromBlock:O+1n,toBlock:D,strict:R}):C=[],O=D;}if(C.length===0)return;if(i)N.onLogs(C);else for(let D of C)N.onLogs([D]);}catch(C){I&&C instanceof jn&&(P=false),N.onError?.(C);}},{emitOnBegin:true,interval:d});return async()=>{I&&await oe(e,Bs,"uninstallFilter")({filter:I}),L();}})})():(()=>{let R=g??false,$=Be(["watchContractEvent",o,n,i,e.uid,s,d,R]),N=true,O=()=>N=false;return Ur($,{onLogs:u,onError:c},I=>((async()=>{try{let P=(()=>{if(e.transport.type==="fallback"){let D=e.transport.transports.find(q=>q.config.type==="webSocket"||q.config.type==="ipc");return D?D.value:e.transport}return e.transport})(),L=s?jo({abi:r,eventName:s,args:n}):[],{unsubscribe:C}=await P.subscribe({params:["logs",{address:o,topics:L}],onData(D){if(!N)return;let q=D.result;try{let{eventName:H,args:Z}=Za({abi:r,data:q.data,topics:q.topics,strict:g}),re=fr(q,{args:Z,eventName:H});I.onLogs([re]);}catch(H){let Z,re;if(H instanceof vi||H instanceof ms){if(g)return;Z=H.abiItem.name,re=H.abiItem.inputs?.some(l=>!("name"in l&&l.name));}let S=fr(q,{args:re?[]:{},eventName:Z});I.onLogs([S]);}},onError(D){I.onError?.(D);}});O=C,N||O();}catch(P){c?.(P);}})(),()=>O()))})()}Te();var yp=class extends z{constructor({docsPath:t}={}){super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join(`
|
|
68
|
+
`),{docsPath:t,docsSlug:"account",name:"AccountNotFoundError"});}};async function N$(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}mo();function bp(e,{delay:t=100,retryCount:r=2,shouldRetry:o=()=>true,signal:n}={}){return new Promise((i,s)=>{let a=async({count:c=0}={})=>{if(n?.aborted){s(wr(n));return}let u=async({error:f})=>{let d=typeof t=="function"?t({count:c,error:f}):t;if(d)try{await gp(d,{signal:n});}catch(g){s(g);return}return a({count:c+1})};try{let f=await e();i(f);}catch(f){if(n?.aborted){s(wr(n));return}if(ln(f)){s(f);return}if(c<r&&await o({count:c,error:f}))return u({error:f});s(f);}};a().catch(s);})}ur();bg();var TV={"0x0":"reverted","0x1":"success"};function Ya(e,t){let r={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(o=>fr(o)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?vt(e.transactionIndex):null,status:e.status?TV[e.status]:null,type:e.type?r2[e.type]||e.type:null};return e.blobGasPrice&&(r.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(r.blobGasUsed=BigInt(e.blobGasUsed)),r}var P$=Ku("transactionReceipt",Ya);fn();var Qg=256,ey;function ty(e=11){if(!ey||Qg+e>256*2){ey="",Qg=0;for(let t=0;t<256;t++)ey+=(256+Math.random()*256|0).toString(16).substring(1);}return ey.substring(Qg,Qg+++e)}function C$(e){let{batch:t,chain:r,ccipRead:o,dataSuffix:n,key:i="base",name:s="Base Client",tokens:a,type:c="base"}=e,u=e.experimental_blockTag??(typeof r?.experimental_preconfirmationTime=="number"?"pending":void 0),f=r?.blockTime??12e3,d=Math.min(Math.max(Math.floor(f/2),500),4e3),g=e.pollingInterval??d,h=e.cacheTime??g,v=e.account?qe(e.account):void 0,{config:E,request:R,value:$}=e.transport({account:v,chain:r,pollingInterval:g}),N={...E,...$},O={account:v,batch:t,cacheTime:h,ccipRead:o,chain:r,dataSuffix:n,key:i,name:s,pollingInterval:g,request:R,tokens:a,transport:N,type:c,uid:ty(),...u?{experimental_blockTag:u}:{}};function I(P){return L=>{let C=L(P);for(let q in O)delete C[q];let D={...P,...C};for(let q in C){let H=P[q],Z=C[q];B$(H)&&B$(Z)&&(D[q]={...H,...Z});}return Object.assign(D,{extend:I(D)})}}return Object.assign(O,{extend:I(O)})}function B$(e){if(typeof e!="object"||e===null)return false;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function xp(e,t){let r=(o={})=>t(e,o);for(let o of ["call","calls","callWithPeriod","estimateGas","prepare","prepareRecipient","predict","simulate"])if(Object.hasOwn(t,o)){let n=t[o];r[o]=(i={})=>n.length===1?n(i):n(e,i);}for(let o of ["extractEvent","extractEvents"])Object.hasOwn(t,o)&&(r[o]=t[o]);return r}pn();$i();Un();Ei();Ja();on();Kd();Re();Te();Ai();function gf(e){if(!(e instanceof z))return false;let t=e.walk(r=>r instanceof La);return t instanceof La?t.data?.errorName==="HttpError"||t.data?.errorName==="ResolverError"||t.data?.errorName==="ResolverNotContract"||t.data?.errorName==="ResolverNotFound"||t.data?.errorName==="ReverseAddressMismatch"||t.data?.errorName==="UnsupportedResolverProfile":false}hp();an();vr();Re();po();uo();function ry(e){if(e.length!==66||e.indexOf("[")!==0||e.indexOf("]")!==65)return null;let t=`0x${e.slice(1,65)}`;return St(t)?t:null}function vp(e){let t=new Uint8Array(32).fill(0);if(!e)return Ue(t);let r=e.split(".");for(let o=r.length-1;o>=0;o-=1){let n=ry(r[o]),i=n?zn(n):Qe(lo(r[o]),"bytes");t=Qe(Mo([t,i]),"bytes");}return Ue(t)}vr();function z$(e){return `[${e.slice(2)}]`}vr();Re();po();function L$(e){let t=new Uint8Array(32).fill(0);return e?ry(e)||Qe(lo(e)):Ue(t)}function yf(e){let t=e.replace(/^\.|\.$/gm,"");if(t.length===0)return new Uint8Array(1);let r=new Uint8Array(lo(t).byteLength+2),o=0,n=t.split(".");for(let i=0;i<n.length;i++){let s=lo(n[i]);s.byteLength>255&&(s=lo(z$(L$(n[i])))),r[o]=s.length,r.set(s,o+1),o+=s.length+1;}return r.byteLength!==o+1?r.slice(0,o+1):r}async function U$(e,t){let{blockNumber:r,blockTag:o,coinType:n,name:i,gatewayUrls:s,strict:a}=t,{chain:c}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return qn({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),f=c?.ensTlds;if(f&&!f.some(g=>i.endsWith(g)))return null;let d=n!=null?[vp(i),BigInt(n)]:[vp(i)];try{let g=ft({abi:g2,functionName:"addr",args:d}),h={address:u,abi:Hg,functionName:"resolveWithGateways",args:[mt(yf(i)),g,s??[Pi]],blockNumber:r,blockTag:o},E=await oe(e,De,"readContract")(h);if(E[0]==="0x")return null;let R=$V({coinType:n,data:E[0],args:d});return R==="0x"||Gr(R)==="0x00"?null:R}catch(g){if(a)throw g;if(gf(g))return null;throw g}}function $V({coinType:e,data:t,args:r}){try{return Lr({abi:g2,args:r,functionName:"addr",data:t})}catch(o){if(e==null)throw o;let n=Gr(t);if($e(n)===20)return Ln(n);throw o}}Te();var ny=class extends z{constructor({data:t}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(t)}`],name:"EnsAvatarInvalidMetadataError"});}},Cs=class extends z{constructor({reason:t}){super(`ENS NFT avatar URI is invalid. ${t}`,{name:"EnsAvatarInvalidNftUriError"});}},bf=class extends z{constructor({uri:t}){super(`Unable to resolve ENS avatar URI "${t}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"});}},oy=class extends z{constructor({namespace:t}){super(`ENS NFT avatar namespace "${t}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"});}};var OV=/(?<protocol>https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?<root>\/)?(?<subpath>ipfs\/|ipns\/)?(?<target>[\w\-.]+)(?<subtarget>\/.*)?/,NV=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?<target>[\w\-.]+))?(?<subtarget>\/.*)?$/,PV=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,BV=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function CV(e){try{let t=await fetch(e,{method:"HEAD"});return t.status===200?t.headers.get("content-type")?.startsWith("image/"):!1}catch(t){return typeof t=="object"&&typeof t.response<"u"||!Object.hasOwn(globalThis,"Image")?false:new Promise(r=>{let o=new Image;o.onload=()=>{r(true);},o.onerror=()=>{r(false);},o.src=e;})}}function M$(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function T2({uri:e,gatewayUrls:t}){let r=PV.test(e);if(r)return {uri:e,isOnChain:true,isEncoded:r};let o=M$(t?.ipfs,"https://ipfs.io"),n=M$(t?.arweave,"https://arweave.net"),i=e.match(OV),{protocol:s,subpath:a,target:c,subtarget:u=""}=i?.groups||{},f=s==="ipns:/"||a==="ipns/",d=s==="ipfs:/"||a==="ipfs/"||NV.test(e);if(e.startsWith("http")&&!f&&!d){let h=e;return t?.arweave&&(h=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:h,isOnChain:false,isEncoded:false}}if((f||d)&&c)return {uri:`${o}/${f?"ipns":"ipfs"}/${c}${u}`,isOnChain:false,isEncoded:false};if(s==="ar:/"&&c)return {uri:`${n}/${c}${u||""}`,isOnChain:false,isEncoded:false};let g=e.replace(BV,"");if(g.startsWith("<svg")&&(g=`data:image/svg+xml;base64,${btoa(g)}`),g.startsWith("data:")||g.startsWith("{"))return {uri:g,isOnChain:true,isEncoded:false};throw new bf({uri:e})}function $2(e){if(typeof e!="object"||!("image"in e)&&!("image_url"in e)&&!("image_data"in e))throw new ny({data:e});return e.image||e.image_url||e.image_data}async function D$({gatewayUrls:e,uri:t}){try{let r=await fetch(t).then(n=>n.json());return await iy({gatewayUrls:e,uri:$2(r)})}catch{throw new bf({uri:t})}}async function iy({gatewayUrls:e,uri:t}){let{uri:r,isOnChain:o}=T2({uri:t,gatewayUrls:e});if(o||await CV(r))return r;throw new bf({uri:t})}function j$(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));let[r,o,n]=t.split("/"),[i,s]=r.split(":"),[a,c]=o.split(":");if(!i||i.toLowerCase()!=="eip155")throw new Cs({reason:"Only EIP-155 supported"});if(!s)throw new Cs({reason:"Chain ID not found"});if(!c)throw new Cs({reason:"Contract address not found"});if(!n)throw new Cs({reason:"Token ID not found"});if(!a)throw new Cs({reason:"ERC namespace not found"});return {chainID:Number.parseInt(s,10),namespace:a.toLowerCase(),contractAddress:c,tokenID:n}}async function F$(e,{nft:t}){if(t.namespace==="erc721")return De(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if(t.namespace==="erc1155")return De(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new oy({namespace:t.namespace})}async function H$(e,{gatewayUrls:t,record:r}){return /eip155:/i.test(r)?zV(e,{gatewayUrls:t,record:r}):iy({uri:r,gatewayUrls:t})}async function zV(e,{gatewayUrls:t,record:r}){let o=j$(r),n=await F$(e,{nft:o}),{uri:i,isOnChain:s,isEncoded:a}=T2({uri:n,gatewayUrls:t});if(s&&(i.includes("data:application/json;base64,")||i.startsWith("{"))){let u=a?atob(i.replace("data:application/json;base64,","")):i,f=JSON.parse(u);return iy({uri:$2(f),gatewayUrls:t})}let c=o.tokenID;return o.namespace==="erc1155"&&(c=c.replace("0x","").padStart(64,"0")),D$({gatewayUrls:t,uri:i.replace(/(?:0x)?{id}/,c)})}pn();$i();Un();Ja();Re();hp();async function sy(e,t){let{blockNumber:r,blockTag:o,key:n,name:i,gatewayUrls:s,strict:a}=t,{chain:c}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return qn({blockNumber:r,chain:c,contract:"ensUniversalResolver"})})(),f=c?.ensTlds;if(f&&!f.some(d=>i.endsWith(d)))return null;try{let d={address:u,abi:Hg,args:[mt(yf(i)),ft({abi:h2,functionName:"text",args:[vp(i),n]}),s??[Pi]],functionName:"resolveWithGateways",blockNumber:r,blockTag:o},h=await oe(e,De,"readContract")(d);if(h[0]==="0x")return null;let v=Lr({abi:h2,functionName:"text",data:h[0]});return v===""?null:v}catch(d){if(a)throw d;if(gf(d))return null;throw d}}async function V$(e,{blockNumber:t,blockTag:r,assetGatewayUrls:o,name:n,gatewayUrls:i,strict:s,universalResolverAddress:a}){let c=await oe(e,sy,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:n,universalResolverAddress:a,gatewayUrls:i,strict:s});if(!c)return null;try{return await H$(e,{record:c,gatewayUrls:o})}catch{return null}}pn();Ja();hp();async function Z$(e,t){let{address:r,blockNumber:o,blockTag:n,coinType:i=60n,gatewayUrls:s,strict:a}=t,{chain:c}=e,u=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!c)throw new Error("client chain not configured. universalResolverAddress is required.");return qn({blockNumber:o,chain:c,contract:"ensUniversalResolver"})})();try{let f={address:u,abi:f$,args:[r,i,s??[Pi]],functionName:"reverseWithGateways",blockNumber:o,blockTag:n},d=oe(e,De,"readContract"),[g]=await d(f);return g||null}catch(f){if(a)throw f;if(gf(f))return null;throw f}}Ja();Re();async function G$(e,t){let{blockNumber:r,blockTag:o,name:n}=t,{chain:i}=e,s=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!i)throw new Error("client chain not configured. universalResolverAddress is required.");return qn({blockNumber:r,chain:i,contract:"ensUniversalResolver"})})(),a=i?.ensTlds;if(a&&!a.some(u=>n.endsWith(u)))throw new Error(`${n} is not a valid ENS TLD (${a?.join(", ")}) for chain "${i.name}" (id: ${i.id}).`);let[c]=await oe(e,De,"readContract")({address:s,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[mt(yf(n))],blockNumber:r,blockTag:o});return c}Ns();fn();Te();Re();w2();sp();Ju();Fa();async function q$(e,t){let{account:r=e.account,blockNumber:o,blockTag:n="latest",blobs:i,data:s,gas:a,gasPrice:c,maxFeePerBlobGas:u,maxFeePerGas:f,maxPriorityFeePerGas:d,to:g,value:h,...v}=t,E=r?qe(r):void 0;try{Vn(t);let $=(typeof o=="bigint"?J(o):void 0)||n,N=e.chain?.formatters?.transactionRequest?.format,I=(N||Zo)({...As(v,{format:N}),account:E,blobs:i,data:s,gas:a,gasPrice:c,maxFeePerBlobGas:u,maxFeePerGas:f,maxPriorityFeePerGas:d,to:g,value:h},"createAccessList"),P=await e.request({method:"eth_createAccessList",params:[I,$]});if(P.error)throw new z(P.error,{details:P.error});return {accessList:P.accessList,gasUsed:BigInt(P.gasUsed)}}catch(R){throw Gg(R,{...t,account:E,chain:e.chain})}}async function W$(e){let t=vs(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return {id:r,request:t(r),type:"block"}}Re();async function ay(e,{address:t,args:r,event:o,events:n,fromBlock:i,strict:s,toBlock:a}={}){let c=n??(o?[o]:void 0),u=vs(e,{method:"eth_newFilter"}),f=[];c&&(f=[c.flatMap(h=>jo({abi:[h],eventName:h.name,args:r}))],o&&(f=f[0]));let d=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:typeof i=="bigint"?J(i):i,toBlock:typeof a=="bigint"?J(a):a,...f.length?{topics:f}:{}}]});return {abi:c,args:r,eventName:o?o.name:void 0,fromBlock:i,id:d,request:u(d),strict:!!s,toBlock:a,type:"event"}}async function cy(e){let t=vs(e,{method:"eth_newPendingTransactionFilter"}),r=await e.request({method:"eth_newPendingTransactionFilter"});return {id:r,request:t(r),type:"transaction"}}pn();$i();Un();Va();Ns();async function K$(e,{address:t,blockHash:r,blockNumber:o,blockTag:n=e.experimental_blockTag??"latest",requireCanonical:i}){let s=Sn({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i});if(e.batch?.multicall&&e.chain?.contracts?.multicall3){let c=e.chain.contracts.multicall3.address,u=ft({abi:bo,functionName:"getEthBalance",args:[t]}),{data:f}=await oe(e,mn,"call")({to:c,data:u,blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i});return Lr({abi:bo,functionName:"getEthBalance",args:[t],data:f||"0x"})}let a=await e.request({method:"eth_getBalance",params:[t,s]});return BigInt(a)}async function J$(e){let t=await e.request({method:"eth_blobBaseFee"});return BigInt(t)}Re();async function Y$(e,{blockHash:t,blockNumber:r,blockTag:o=e.experimental_blockTag??"latest"}={}){let n=r!==void 0?J(r):void 0,i=await e.request({method:"eth_getBlockReceipts",params:[t||n||o]},{dedupe:!!(t||n)});if(!i)throw new Rs({blockHash:t,blockNumber:r});let s=e.chain?.formatters?.transactionReceipt?.format||Ya;return i.map(a=>s(a,"getBlockReceipts"))}ur();Re();async function X$(e,{blockHash:t,blockNumber:r,blockTag:o="latest"}={}){let n=r!==void 0?J(r):void 0,i;return t?i=await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:true}):i=await e.request({method:"eth_getBlockTransactionCountByNumber",params:[n||o]},{dedupe:!!n}),vt(i)}Va();async function Xa(e,{address:t,blockHash:r,blockNumber:o,blockTag:n="latest",requireCanonical:i}){let s=Sn({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i}),a=await e.request({method:"eth_getCode",params:[t,s]},{dedupe:typeof o=="bigint"||r!==void 0});if(a!=="0x")return a}Ei();on();bs();async function Q$(e,{address:t,blockNumber:r,blockTag:o="latest"}){let n=await Xa(e,{address:t,...r!==void 0?{blockNumber:r}:{blockTag:o}});if(n&&$e(n)===23&&n.startsWith("0xef0100"))return Ln(cn(n,3,23))}Te();var uy=class extends z{constructor({address:t}){super(`No EIP-712 domain found on contract "${t}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${t}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"});}};async function e8(e,t){let{address:r,factory:o,factoryData:n}=t;try{let[i,s,a,c,u,f,d]=await oe(e,De,"readContract")({abi:LV,address:r,functionName:"eip712Domain",factory:o,factoryData:n});return {domain:{name:s,version:a,chainId:Number(c),verifyingContract:u,salt:f},extensions:d,fields:i}}catch(i){let s=i;throw s.name==="ContractFunctionExecutionError"&&s.cause.name==="ContractFunctionZeroDataError"?new uy({address:r}):s}}var LV=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];Re();function t8(e){return {baseFeePerGas:e.baseFeePerGas.map(t=>BigInt(t)),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:e.reward?.map(t=>t.map(r=>BigInt(r)))}}async function r8(e,{blockCount:t,blockNumber:r,blockTag:o="latest",rewardPercentiles:n}){let i=typeof r=="bigint"?J(r):void 0,s=await e.request({method:"eth_feeHistory",params:[J(t),i||o,n]},{dedupe:!!i});return t8(s)}async function n8(e,{filter:t}){let r=t.strict??false,n=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(i=>fr(i));return t.abi?af({abi:t.abi,logs:n,strict:r}):n}Va();Un();Re();Mn();an();Kd();Re();t2();Lo();Te();Zg();Ri();En();on();bs();ur();function o8(e){let{authorizationList:t}=e;if(t)for(let r of t){let{chainId:o}=r,n=r.address;if(!Me(n))throw new nt({address:n});if(o<0)throw new Ka({chainId:o})}fy(e);}function i8(e){let{blobVersionedHashes:t}=e;if(t){if(t.length===0)throw new nf;for(let r of t){let o=$e(r),n=vt(cn(r,0,1));if(o!==32)throw new Ig({hash:r,size:o});if(n!==1)throw new Ag({hash:r,version:n})}}fy(e);}function fy(e){let{chainId:t,maxPriorityFeePerGas:r,maxFeePerGas:o,to:n}=e;if(t<=0)throw new Ka({chainId:t});if(n&&!Me(n))throw new nt({address:n});if(o&&o>Xu)throw new Fn({maxFeePerGas:o});if(r&&o&&r>o)throw new Vo({maxFeePerGas:o,maxPriorityFeePerGas:r})}function s8(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:o,maxFeePerGas:n,to:i}=e;if(t<=0)throw new Ka({chainId:t});if(i&&!Me(i))throw new nt({address:i});if(r||n)throw new z("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(o&&o>Xu)throw new Fn({maxFeePerGas:o})}function a8(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:o,maxFeePerGas:n,to:i}=e;if(i&&!Me(i))throw new nt({address:i});if(typeof t<"u"&&t<=0)throw new Ka({chainId:t});if(r||n)throw new z("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(o&&o>Xu)throw new Fn({maxFeePerGas:o})}Lo();Mn();En();function wp(e){if(!e||e.length===0)return [];let t=[];for(let r=0;r<e.length;r++){let{address:o,storageKeys:n}=e[r];for(let i=0;i<n.length;i++)if(n[i].length-2!==64)throw new ug({storageKey:n[i]});if(!Me(o,{strict:false}))throw new nt({address:o});t.push([o,n]);}return t}function c8(e,t){let r=Rg(e);return r==="eip1559"?DV(e,t):r==="eip2930"?jV(e,t):r==="eip4844"?MV(e,t):r==="eip7702"?UV(e,t):FV(e,t)}function UV(e,t){let{authorizationList:r,chainId:o,gas:n,nonce:i,to:s,value:a,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:f,data:d}=e;o8(e);let g=wp(f),h=u8(r);return st(["0x04",go([J(o),i?J(i):"0x",u?J(u):"0x",c?J(c):"0x",n?J(n):"0x",s??"0x",a?J(a):"0x",d??"0x",g,h,...xf(e,t)])])}function MV(e,t){let{chainId:r,gas:o,nonce:n,to:i,value:s,maxFeePerBlobGas:a,maxFeePerGas:c,maxPriorityFeePerGas:u,accessList:f,data:d}=e;i8(e);let g=e.blobVersionedHashes,h=e.sidecars;if(e.blobs&&(typeof g>"u"||typeof h>"u")){let O=typeof e.blobs[0]=="string"?e.blobs:e.blobs.map(L=>Ue(L)),I=e.kzg,P=tf({blobs:O,kzg:I});if(typeof g>"u"&&(g=Eg({commitments:P})),typeof h>"u"){let L=rf({blobs:O,commitments:P,kzg:I});h=kg({blobs:O,commitments:P,proofs:L});}}let v=wp(f),E=[J(r),n?J(n):"0x",u?J(u):"0x",c?J(c):"0x",o?J(o):"0x",i??"0x",s?J(s):"0x",d??"0x",v,a?J(a):"0x",g??[],...xf(e,t)],R=[],$=[],N=[];if(h)for(let O=0;O<h.length;O++){let{blob:I,commitment:P,proof:L}=h[O];R.push(I),$.push(P),N.push(L);}return st(["0x03",h?go([E,R,$,N]):go(E)])}function DV(e,t){let{chainId:r,gas:o,nonce:n,to:i,value:s,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:u,data:f}=e;fy(e);let d=wp(u),g=[J(r),n?J(n):"0x",c?J(c):"0x",a?J(a):"0x",o?J(o):"0x",i??"0x",s?J(s):"0x",f??"0x",d,...xf(e,t)];return st(["0x02",go(g)])}function jV(e,t){let{chainId:r,gas:o,data:n,nonce:i,to:s,value:a,accessList:c,gasPrice:u}=e;s8(e);let f=wp(c),d=[J(r),i?J(i):"0x",u?J(u):"0x",o?J(o):"0x",s??"0x",a?J(a):"0x",n??"0x",f,...xf(e,t)];return st(["0x01",go(d)])}function FV(e,t){let{chainId:r=0,gas:o,data:n,nonce:i,to:s,value:a,gasPrice:c}=e;a8(e);let u=[i?J(i):"0x",c?J(c):"0x",o?J(o):"0x",s??"0x",a?J(a):"0x",n??"0x"];if(t){let f=(()=>{if(t.v>=35n)return (t.v-35n)/2n>0?t.v:27n+(t.v===35n?0n:1n);if(r>0)return BigInt(r*2)+BigInt(35n+t.v-27n);let h=27n+(t.v===27n?0n:1n);if(t.v!==h)throw new ag({v:t.v});return h})(),d=Gr(t.r),g=Gr(t.s);u=[...u,J(f),d==="0x00"?"0x":d,g==="0x00"?"0x":g];}else r>0&&(u=[...u,J(r),"0x","0x"]);return go(u)}function xf(e,t){let r=t??e,{v:o,yParity:n}=r;if(typeof r.r>"u")return [];if(typeof r.s>"u")return [];if(typeof o>"u"&&typeof n>"u")return [];let i=Gr(r.r),s=Gr(r.s);return [typeof n=="number"?n?J(1):"0x":o===0n?"0x":o===1n?J(1):o===27n?"0x":J(1),i==="0x00"?"0x":i,s==="0x00"?"0x":s]}function u8(e){if(!e||e.length===0)return [];let t=[];for(let r of e){let{chainId:o,nonce:n,...i}=r,s=r.address;t.push([o?mt(o):"0x",s,n?mt(n):"0x",...xf({},i)]);}return t}Ei();Ts();async function f8({address:e,authorization:t,signature:r}){return zr(Ln(e),await gg({authorization:t,signature:r}))}Te();Ma();np();mo();Yd();var ly=new Uo(8192);function l8(e,{enabled:t=true,id:r}){if(!t||!r)return e();if(ly.get(r))return ly.get(r);let o=e().finally(()=>ly.delete(r));return ly.set(r,o),o}Pr();function d8(e,t={}){return async(r,o={})=>{let{dedupe:n=false,methods:i,retryDelay:s=150,retryCount:a=3,signal:c,uid:u}={...t,...o},{method:f}=r;if(i?.exclude?.includes(f))throw new Ss(new Error("method not supported"),{method:f});if(i?.include&&!i.include.includes(f))throw new Ss(new Error("method not supported"),{method:f});if(c?.aborted)throw wr(c);let d=n?VV(`${u}.${Be(r)}`):void 0;return l8(()=>bp(async()=>{try{return await e(r,c?{signal:c}:void 0)}catch(g){if(c?.aborted)throw wr(c);if(ln(g))throw g;let h=g;switch(h.code){case vu.code:throw new vu(h);case wu.code:throw new wu(h);case _u.code:throw new _u(h,{method:r.method});case Eu.code:throw new Eu(h);case ki.code:throw new ki(h);case jn.code:throw new jn(h);case Su.code:throw new Su(h);case Iu.code:throw new Iu(h);case Au.code:throw new Au(h);case Ss.code:throw new Ss(h,{method:r.method});case Da.code:throw new Da(h);case ku.code:throw new ku(h);case ja.code:throw new ja(h);case Ru.code:throw new Ru(h);case Tu.code:throw new Tu(h);case $u.code:throw new $u(h);case Ou.code:throw new Ou(h);case Nu.code:throw new Nu(h);case Pu.code:throw new Pu(h);case Bu.code:throw new Bu(h);case Cu.code:throw new Cu(h);case zu.code:throw new zu(h);case Lu.code:throw new Lu(h);case Uu.code:throw new Uu(h);case Mu.code:throw new Mu(h);case 5e3:throw new ja(h);case Du.code:throw new Du(h);default:throw g instanceof z?g:new hg(h)}}},{delay:({count:g,error:h})=>{if(h&&h instanceof Dn){let v=h?.headers?.get("Retry-After");if(v?.match(/\d/))return Number.parseInt(v,10)*1e3}return ~~(1<<g)*s},retryCount:a,signal:c,shouldRetry:({error:g})=>HV(g)}),{enabled:n,id:d})}}function HV(e){return ln(e)?false:"code"in e&&typeof e.code=="number"?e.code===-1||e.code===Da.code||e.code===ki.code||e.code===429:e instanceof Dn&&e.status?e.status===403||e.status===408||e.status===413||e.status===429||e.status===500||e.status===502||e.status===503||e.status===504:true}function VV(e,t=0){let r=3735928559^t,o=1103547991^t;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);r=Math.imul(r^i,2654435761),o=Math.imul(o^i,1597334677);}return r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(o^o>>>16,3266489909),o=Math.imul(o^o>>>16,2246822507),o^=Math.imul(r^r>>>16,3266489909),(4294967296*(2097151&o)+(r>>>0)).toString(36)}function vf(e){let t={formatters:void 0,fees:void 0,serializers:void 0,...e};function r(o){return n=>{let i=typeof n=="function"?n(o):n,s={...o,...i};return Object.assign(s,{extend:r(s)})}}return Object.assign(t,{extend:r(t)})}ur();Ma();mo();mo();function p8(e,{errorInstance:t=new Error("timed out"),timeout:r,signal:o}){return new Promise((n,i)=>{(async()=>{let s,a=new AbortController;try{r>0&&(s=setTimeout(()=>{o?a.abort():i(t);},r)),n(await e({signal:a?.signal||null}));}catch(c){if(a?.signal.aborted&&ln(c)){i(t);return}i(c);}finally{clearTimeout(s);}})();})}Pr();function ZV(){return {current:0,take(){return this.current++},reset(){this.current=0;}}}var O2=ZV();var GV=10485760;function m8(e,t={}){let{url:r,headers:o}=WV(e);return {async request(n){let{body:i,fetchFn:s=t.fetchFn??fetch,maxResponseBodySize:a=t.maxResponseBodySize??GV,onRequest:c=t.onRequest,onResponse:u=t.onResponse,timeout:f=t.timeout??1e4}=n,d={...t.fetchOptions??{},...n.fetchOptions??{}},{headers:g,method:h,signal:v}=d;try{let E=await p8(async({signal:N})=>{let O={...d,body:Array.isArray(i)?Be(i.map(C=>({jsonrpc:"2.0",id:C.id??O2.take(),...C}))):Be({jsonrpc:"2.0",id:i.id??O2.take(),...i}),headers:{...o,"Content-Type":"application/json",...g},method:h||"POST",signal:v||(f>0?N:null)},I=new Request(r,O),P=await c?.(I,O)??{...O,url:r};return await s(P.url??r,P)},{errorInstance:new rp({body:i,url:r}),timeout:f,signal:!0});u&&await u(E);let R,$=await qV(E,{maxResponseBodySize:a});if(E.headers.get("Content-Type")?.startsWith("application/json"))R=JSON.parse($);else {R=$;try{R=JSON.parse(R||"{}");}catch(N){if(E.ok)throw N;R={error:R};}}if(!E.ok){if(typeof R.error?.code=="number"&&typeof R.error?.message=="string")return R;throw new Dn({body:i,details:Be(R.error)||E.statusText,headers:E.headers,status:E.status,url:r})}return R}catch(E){throw v?.aborted?wr(v):ln(E)||E instanceof Dn||E instanceof Ua||E instanceof rp?E:new Dn({body:i,cause:E,url:r})}}}}async function qV(e,{maxResponseBodySize:t}){if(t===false)return e.text();let r=e.headers.get("Content-Length");if(r){let a=Number(r);if(a>t)throw new Ua({maxSize:t,size:a})}if(!e.body){let a=await e.text(),c=new TextEncoder().encode(a).length;if(c>t)throw new Ua({maxSize:t,size:c});return a}let o=e.body.getReader(),n=new TextDecoder,i="",s=0;try{for(;;){let{done:a,value:c}=await o.read();if(a)break;if(s+=c.byteLength,s>t)throw await o.cancel(),new Ua({maxSize:t,size:s});i+=n.decode(c,{stream:!0});}return i+=n.decode(),i}finally{o.releaseLock();}}function WV(e){try{let t=new URL(e),r=(()=>{if(t.username){let o=`${decodeURIComponent(t.username)}:${decodeURIComponent(t.password)}`;return t.username="",t.password="",{url:t.toString(),headers:{Authorization:`Basic ${btoa(o)}`}}}})();return {url:t.toString(),...r}}catch{return {url:e}}}po();var h8=`Ethereum Signed Message:
|
|
69
|
+
`;an();on();Re();function g8(e){let t=typeof e=="string"?lu(e):typeof e.raw=="string"?e.raw:Ue(e.raw),r=lu(`${h8}${$e(t)}`);return Mo([r,t])}function dy(e,t){return Qe(g8(e),t)}Si();an();Re();po();Et();Lo();Pr();Te();var py=class extends z{constructor({domain:t}){super(`Invalid domain "${Be(t)}".`,{metaMessages:["Must be a valid EIP-712 domain."]});}},my=class extends z{constructor({primaryType:t,types:r}){super(`Invalid primary type \`${t}\` must be one of \`${JSON.stringify(Object.keys(r))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]});}},hy=class extends z{constructor({type:t}){super(`Struct type "${t}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"});}},gy=class extends z{constructor({type:t}){let r=t.replace(/^(u?int)/,"$&256");super(`Type "${t}" is not a valid EIP-712 type.`,{metaMessages:[`Use "${r}" instead.`],name:"InvalidTypedDataTypeError"});}};En();on();Re();H6();function y8(e){let{domain:t,message:r,primaryType:o,types:n}=e,i=(s,a)=>{for(let c of s){let{name:u,type:f}=c,d=a[u],g=f.replace(/(\[[0-9]*\])+$/,"");if(g==="int"||g==="uint")throw new gy({type:f});let h=f.match(W0);if(h&&(typeof d=="number"||typeof d=="bigint")){let[R,$,N]=h;J(d,{signed:$==="int",size:Number.parseInt(N,10)/8});}if(f==="address"&&typeof d=="string"&&!Me(d))throw new nt({address:d});let v=f.match(t4);if(v){let[R,$]=v;if($&&$e(d)!==Number.parseInt($,10))throw new M0({expectedSize:Number.parseInt($,10),givenSize:$e(d)})}let E=n[f];E&&(KV(f),i(E,d));}};if(n.EIP712Domain&&t){if(typeof t!="object")throw new py({domain:t});i(n.EIP712Domain,t);}if(o!=="EIP712Domain")if(n[o])i(n[o],r);else throw new my({primaryType:o,types:n})}function b8({domain:e}){return [typeof e?.name=="string"&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},(typeof e?.chainId=="number"||typeof e?.chainId=="bigint")&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}function KV(e){if(e==="address"||e==="bool"||e==="string"||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new hy({type:e})}function x8(e){let{domain:t={},message:r,primaryType:o}=e,n={EIP712Domain:b8({domain:t}),...e.types};y8({domain:t,message:r,primaryType:o,types:n});let i=["0x1901"];return t&&i.push(JV({domain:t,types:n})),o!=="EIP712Domain"&&i.push(v8({data:r,primaryType:o,types:n})),Qe(Mo(i))}function JV({domain:e,types:t}){return v8({data:e,primaryType:"EIP712Domain",types:t})}function v8({data:e,primaryType:t,types:r}){let o=w8({data:e,primaryType:t,types:r});return Qe(o)}function w8({data:e,primaryType:t,types:r}){let o=[{type:"bytes32"}],n=[YV({primaryType:t,types:r})];for(let i of r[t]){let[s,a]=E8({types:r,name:i.name,type:i.type,value:e[i.name]});o.push(s),n.push(a);}return qr(o,n)}function YV({primaryType:e,types:t}){let r=mt(XV({primaryType:e,types:t}));return Qe(r)}function XV({primaryType:e,types:t}){let r="",o=_8({primaryType:e,types:t});o.delete(e);let n=[e,...Array.from(o).sort()];for(let i of n)r+=`${i}(${t[i].map(({name:s,type:a})=>`${a} ${s}`).join(",")})`;return r}function _8({primaryType:e,types:t},r=new Set){let n=e.match(/^\w*/u)?.[0];if(r.has(n)||t[n]===void 0)return r;r.add(n);for(let i of t[n])_8({primaryType:i.type,types:t},r);return r}function E8({types:e,name:t,type:r,value:o}){if(e[r]!==void 0)return [{type:"bytes32"},Qe(w8({data:o,primaryType:r,types:e}))];if(r==="bytes")return [{type:"bytes32"},Qe(o)];if(r==="string")return [{type:"bytes32"},Qe(mt(o))];if(r.lastIndexOf("]")===r.length-1){let n=r.slice(0,r.lastIndexOf("[")),i=o.map(s=>E8({name:t,type:n,types:e,value:s}));return [{type:"bytes32"},Qe(qr(i.map(([s])=>s),i.map(([,s])=>s)))]}return [{type:r},o]}var kp={};Er(kp,{InvalidWrappedSignatureError:()=>Oy,assert:()=>Ny,from:()=>PZ,magicBytes:()=>nE,suffixParameters:()=>oE,unwrap:()=>V8,validate:()=>CZ,wrap:()=>BZ});su();$s();var yy=class extends Map{constructor(t){super(),Object.defineProperty(this,"maxSize",{enumerable:true,configurable:true,writable:true,value:void 0}),this.maxSize=t;}get(t){let r=super.get(t);return super.has(t)&&r!==void 0&&(this.delete(t),super.set(t,r)),r}set(t,r){if(super.set(t,r),this.maxSize&&this.size>this.maxSize){let o=this.keys().next().value;o&&this.delete(o);}return this}};var QV={checksum:new yy(8192)},by=QV.checksum;dn();Wh();$s();lr();function Qa(e,t={}){let{as:r=typeof e=="string"?"Hex":"Bytes"}=t,o=Ra(Q4(e));return r==="Bytes"?o:It(o)}$s();dn();lr();up();function S8(e,t={}){let{compressed:r}=t,{prefix:o,x:n,y:i}=e;if(r===false||typeof n=="bigint"&&typeof i=="bigint"){if(o!==4)throw new xy({prefix:o,cause:new C2});return}if(r===true||typeof n=="bigint"&&typeof i>"u"){if(o!==3&&o!==2)throw new xy({prefix:o,cause:new B2});return}throw new P2({publicKey:e})}function I8(e){let t=(()=>{if(lp(e))return A8(e);if(i$(e))return tZ(e);let{prefix:r,x:o,y:n}=e;return typeof o=="bigint"&&typeof n=="bigint"?{prefix:r??4,x:o,y:n}:{prefix:r,x:o}})();return S8(t),t}function tZ(e){return A8(It(e))}function A8(e){if(e.length!==132&&e.length!==130&&e.length!==68)throw new z2({publicKey:e});if(e.length===130){let o=BigInt(dt(e,0,32)),n=BigInt(dt(e,32,64));return {prefix:4,x:o,y:n}}if(e.length===132){let o=Number(dt(e,0,1)),n=BigInt(dt(e,1,33)),i=BigInt(dt(e,33,65));return {prefix:o,x:n,y:i}}let t=Number(dt(e,0,1)),r=BigInt(dt(e,1,33));return {prefix:t,x:r}}function L2(e,t={}){S8(e);let{prefix:r,x:o,y:n}=e,{includePrefix:i=true}=t;return ht(i?Ve(r,{size:1}):"0x",Ve(o,{size:32}),typeof n=="bigint"?Ve(n,{size:32}):"0x")}var P2=class extends de{constructor({publicKey:t}){super(`Value \`${Os(t)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidError"});}},xy=class extends de{constructor({prefix:t,cause:r}){super(`Prefix "${t}" is invalid.`,{cause:r}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidPrefixError"});}},B2=class extends de{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidCompressedPrefixError"});}},C2=class extends de{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidUncompressedPrefixError"});}},z2=class extends de{constructor({publicKey:t}){super(`Value \`${t}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${lt(pf(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"PublicKey.InvalidSerializedSizeError"});}};var rZ=/^0x[a-fA-F0-9]{40}$/;function ec(e,t={}){let{strict:r=true}=t;if(!rZ.test(e))throw new vy({address:e,cause:new U2});if(r){if(e.toLowerCase()===e)return;if(wy(e)!==e)throw new vy({address:e,cause:new M2})}}function wy(e){if(by.has(e))return by.get(e);ec(e,{strict:false});let t=e.substring(2).toLowerCase(),r=Qa(e$(t),{as:"Bytes"}),o=t.split("");for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&o[i]&&(o[i]=o[i].toUpperCase()),(r[i>>1]&15)>=8&&o[i+1]&&(o[i+1]=o[i+1].toUpperCase());let n=`0x${o.join("")}`;return by.set(e,n),n}function nZ(e,t={}){let{checksum:r=false}=t;return ec(e),r?wy(e):e}function R8(e,t={}){let r=Qa(`0x${L2(e).slice(4)}`).substring(26);return nZ(`0x${r}`,t)}function _y(e,t={}){let{strict:r=true}=t??{};try{return ec(e,{strict:r}),!0}catch{return false}}var vy=class extends de{constructor({address:t,cause:r}){super(`Address "${t}" is invalid.`,{cause:r}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Address.InvalidAddressError"});}},U2=class extends de{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Address.InvalidInputError"});}},M2=class extends de{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Address.InvalidChecksumError"});}};$s();dn();lr();$s();dn();lr();var T8=/^(.*)\[([0-9]*)\]$/,$8=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Sy=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,D2=2n**256n-1n;function tc(e,t,r){let{checksumAddress:o,staticPosition:n}=r,i=H2(t.type);if(i){let[s,a]=i;return iZ(e,{...t,type:a},{checksumAddress:o,length:s,staticPosition:n})}if(t.type==="tuple")return uZ(e,t,{checksumAddress:o,staticPosition:n});if(t.type==="address")return oZ(e,{checksum:o});if(t.type==="bool")return sZ(e);if(t.type.startsWith("bytes"))return aZ(e,t,{staticPosition:n});if(t.type.startsWith("uint")||t.type.startsWith("int"))return cZ(e,t);if(t.type==="string")return fZ(e,{staticPosition:n});throw new _f(t.type)}var N8=32,j2=32;function oZ(e,t={}){let{checksum:r=false}=t,o=e.readBytes(32);return [(i=>r?wy(i):i)(It(t$(o,-20))),32]}function iZ(e,t,r){let{checksumAddress:o,length:n,staticPosition:i}=r;if(n===null){let c=Go(e.readBytes(j2)),u=i+c,f=u+N8;e.setPosition(u);let d=Go(e.readBytes(N8)),g=wf(t),h=0,v=[];for(let E=0;E<d;++E){e.setPosition(f+(g?E*32:h));let[R,$]=tc(e,t,{checksumAddress:o,staticPosition:f});h+=$,v.push(R),$===0&&(e.assertReadLimit(),e._touch());}return e.setPosition(i+32),[v,32]}if(wf(t)){let c=Go(e.readBytes(j2)),u=i+c,f=[];for(let d=0;d<n;++d){e.setPosition(u+d*32);let[g]=tc(e,t,{checksumAddress:o,staticPosition:u});f.push(g);}return e.setPosition(i+32),[f,32]}let s=0,a=[];for(let c=0;c<n;++c){let[u,f]=tc(e,t,{checksumAddress:o,staticPosition:i+s});s+=f,a.push(u),f===0&&(e.assertReadLimit(),e._touch());}return [a,s]}function sZ(e){return [n$(e.readBytes(32),{size:32}),32]}function aZ(e,t,{staticPosition:r}){let[o,n]=t.type.split("bytes");if(!n){let s=Go(e.readBytes(32));e.setPosition(r+s);let a=Go(e.readBytes(32));if(a===0)return e.setPosition(r+32),["0x",32];let c=e.readBytes(a);return e.setPosition(r+32),[It(c),32]}return [It(e.readBytes(Number.parseInt(n,10),32)),32]}function cZ(e,t){let r=t.type.startsWith("int"),o=Number.parseInt(t.type.split("int")[1]||"256",10),n=e.readBytes(32);return [o>48?r$(n,{signed:r}):Go(n,{signed:r}),32]}function uZ(e,t,r){let{checksumAddress:o,staticPosition:n}=r,i=t.components.length===0||t.components.some(({name:c})=>!c),s=i?[]:{},a=0;if(wf(t)){let c=Go(e.readBytes(j2)),u=n+c;for(let f=0;f<t.components.length;++f){let d=t.components[f];e.setPosition(u+a);let[g,h]=tc(e,d,{checksumAddress:o,staticPosition:u});a+=h,s[i?f:d?.name]=g;}return e.setPosition(n+32),[s,32]}for(let c=0;c<t.components.length;++c){let u=t.components[c],[f,d]=tc(e,u,{checksumAddress:o,staticPosition:n});s[i?c:u?.name]=f,a+=d;}return [s,a]}function fZ(e,{staticPosition:t}){let r=Go(e.readBytes(32)),o=t+r;e.setPosition(o);let n=Go(e.readBytes(32));if(n===0)return e.setPosition(t+32),["",32];let i=e.readBytes(n,32),s=o$(l2(i));return e.setPosition(t+32),[s,32]}function P8({checksumAddress:e,parameters:t,values:r}){let o=[];for(let n=0;n<t.length;n++)o.push(F2({checksumAddress:e,parameter:t[n],value:r[n]}));return o}function F2({checksumAddress:e=false,parameter:t,value:r}){let o=t,n=H2(o.type);if(n){let[i,s]=n;return dZ(r,{checksumAddress:e,length:i,parameter:{...o,type:s}})}if(o.type==="tuple")return yZ(r,{checksumAddress:e,parameter:o});if(o.type==="address")return lZ(r,{checksum:e});if(o.type==="bool")return mZ(r);if(o.type.startsWith("uint")||o.type.startsWith("int")){let i=o.type.startsWith("int"),[,,s="256"]=Sy.exec(o.type)??[];return hZ(r,{signed:i,size:Number(s)})}if(o.type.startsWith("bytes"))return pZ(r,{type:o.type});if(o.type==="string")return gZ(r);throw new _f(o.type)}function Iy(e){let t=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?t+=32:t+=lt(a);}let r=[],o=[],n=0;for(let i=0;i<e.length;i++){let{dynamic:s,encoded:a}=e[i];s?(r.push(Ve(t+n,{size:32})),o.push(a),n+=lt(a)):r.push(a);}return ht(...r,...o)}function lZ(e,t){let{checksum:r=false}=t;return ec(e,{strict:r}),{dynamic:false,encoded:Ni(e.toLowerCase())}}function dZ(e,t){let{checksumAddress:r,length:o,parameter:n}=t,i=o===null;if(!Array.isArray(e))throw new ky(e);if(!i&&e.length!==o)throw new Ay({expectedLength:o,givenLength:e.length,type:`${n.type}[${o}]`});let s=e.length===0&&wf(n),a=[];for(let c=0;c<e.length;c++){let u=F2({checksumAddress:r,parameter:n,value:e[c]});u.dynamic&&(s=true),a.push(u);}if(i||s){let c=Iy(a);if(i){let u=Ve(a.length,{size:32});return {dynamic:true,encoded:a.length>0?ht(u,c):u}}if(s)return {dynamic:true,encoded:c}}return {dynamic:false,encoded:ht(...a.map(({encoded:c})=>c))}}function pZ(e,{type:t}){let[,r]=t.split("bytes"),o=lt(e);if(!r){let n=e;return o%32!==0&&(n=qo(n,Math.ceil((e.length-2)/2/32)*32)),{dynamic:true,encoded:ht(Ni(Ve(o,{size:32})),n)}}if(o!==Number.parseInt(r,10))throw new _p({expectedSize:Number.parseInt(r,10),value:e});return {dynamic:false,encoded:qo(e)}}function mZ(e){if(typeof e!="boolean")throw new de(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return {dynamic:false,encoded:Ni(Dg(e))}}function hZ(e,{signed:t,size:r}){if(typeof r=="number"){let o=2n**(BigInt(r)-(t?1n:0n))-1n,n=t?-o-1n:0n;if(e>o||e<n)throw new fp({max:o.toString(),min:n.toString(),signed:t,size:r/8,value:e.toString()})}return {dynamic:false,encoded:Ve(e,{size:32,signed:t})}}function gZ(e){let t=mf(e),r=Math.ceil(lt(t)/32),o=[];for(let n=0;n<r;n++)o.push(qo(dt(t,n*32,(n+1)*32)));return {dynamic:true,encoded:ht(qo(Ve(lt(t),{size:32})),...o)}}function yZ(e,t){let{checksumAddress:r,parameter:o}=t,n=false,i=[];for(let s=0;s<o.components.length;s++){let a=o.components[s],c=Array.isArray(e)?s:a.name,u=F2({checksumAddress:r,parameter:a,value:e[c]});i.push(u),u.dynamic&&(n=true);}return {dynamic:n,encoded:n?Iy(i):ht(...i.map(({encoded:s})=>s))}}function H2(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function wf(e){let{type:t}=e;if(t==="string"||t==="bytes"||t.endsWith("[]"))return true;if(t==="tuple")return e.components?.some(wf);let r=H2(e.type);return !!(r&&wf({...e,type:r[1]}))}dn();var xZ={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new Z2({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new V2({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new Ry({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t;},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new Ry({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t;},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++;},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length;},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++;},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2;},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,e&255),this.position+=3;},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4;},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++;}};function Ty(e,{recursiveReadLimit:t=8192}={}){let r=Object.create(xZ);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}var Ry=class extends de{constructor({offset:t}){super(`Offset \`${t}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Cursor.NegativeOffsetError"});}},V2=class extends de{constructor({length:t,position:r}){super(`Position \`${r}\` is out of bounds (\`0 < position < ${t}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Cursor.PositionOutOfBoundsError"});}},Z2=class extends de{constructor({count:t,limit:r}){super(`Recursive read limit of \`${r}\` exceeded (recursive read count: \`${t}\`).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Cursor.RecursiveReadLimitExceededError"});}};function rc(e,t,r={}){let{as:o="Array",checksumAddress:n=false}=r,i=typeof t=="string"?df(t):t,s=Ty(i);if(Zn(i)===0&&e.length>0)throw new W2;if(Zn(i)&&Zn(i)<32)throw new q2({data:typeof t=="string"?t:It(t),parameters:e,size:Zn(i)});let a=0,c=o==="Array"?[]:{};for(let u=0;u<e.length;++u){let f=e[u];a<i.length&&s.setPosition(a);let[d,g]=tc(s,f,{checksumAddress:n,staticPosition:0});a+=g,o==="Array"?c.push(d):c[f.name??u]=d;}return c}function zs(e,t,r){let{checksumAddress:o=false}={};if(e.length!==t.length)throw new $y({expectedLength:e.length,givenLength:t.length});let n=P8({checksumAddress:o,parameters:e,values:t}),i=Iy(n);return i.length===0?"0x":i}function G2(e,t){if(e.length!==t.length)throw new $y({expectedLength:e.length,givenLength:t.length});let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o];r.push(G2.encode(n,i));}return ht(...r)}(function(e){function t(r,o,n=false){if(r==="address"){let c=o;return ec(c),Ni(c.toLowerCase(),n?32:0)}if(r==="string")return mf(o);if(r==="bytes")return o;if(r==="bool")return Ni(Dg(o),n?32:1);let i=r.match(Sy);if(i){let[c,u,f="256"]=i,d=Number.parseInt(f,10)/8;return Ve(o,{size:n?32:d,signed:u==="int"})}let s=r.match($8);if(s){let[c,u]=s;if(Number.parseInt(u,10)!==(o.length-2)/2)throw new _p({expectedSize:Number.parseInt(u,10),value:o});return qo(o,n?32:0)}let a=r.match(T8);if(a&&Array.isArray(o)){let[c,u]=a,f=[];for(let d=0;d<o.length;d++)f.push(t(u,o[d],true));return f.length===0?"0x":ht(...f)}throw new _f(r)}e.encode=t;})(G2||(G2={}));function Sp(e){return Array.isArray(e)&&typeof e[0]=="string"?Md(e):typeof e=="string"?Md(e):e}var q2=class extends de{constructor({data:t,parameters:r,size:o}){super(`Data size of ${o} bytes is too small for given parameters.`,{metaMessages:[`Params: (${bi(r)})`,`Data: ${t} (${o} bytes)`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.DataSizeTooSmallError"});}},W2=class extends de{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.'),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.ZeroDataError"});}},Ay=class extends de{constructor({expectedLength:t,givenLength:r,type:o}){super(`Array length mismatch for type \`${o}\`. Expected: \`${t}\`. Given: \`${r}\`.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.ArrayLengthMismatchError"});}},_p=class extends de{constructor({expectedSize:t,value:r}){super(`Size of bytes "${r}" (bytes${lt(r)}) does not match expected size (bytes${t}).`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.BytesSizeMismatchError"});}},$y=class extends de{constructor({expectedLength:t,givenLength:r}){super(["ABI encoding parameters/values length mismatch.",`Expected length (parameters): ${t}`,`Given length (values): ${r}`].join(`
|
|
70
|
+
`)),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.LengthMismatchError"});}},ky=class extends de{constructor(t){super(`Value \`${t}\` is not a valid array.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.InvalidArrayError"});}},_f=class extends de{constructor(t){super(`Type \`${t}\` is not a valid ABI Type.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiParameters.InvalidTypeError"});}};lr();$s();dn();lr();function vZ(e,t){let{as:r}=t,o=z8(e),n=Ty(new Uint8Array(o.length));return o.encode(n),r==="Hex"?It(n.bytes):n.bytes}function C8(e,t={}){let{as:r="Hex"}=t;return vZ(e,{as:r})}function z8(e){return Array.isArray(e)?wZ(e.map(t=>z8(t))):_Z(e)}function wZ(e){let t=e.reduce((n,i)=>n+i.length,0),r=L8(t);return {length:t<=55?1+t:1+r+t,encode(n){t<=55?n.pushByte(192+t):(n.pushByte(247+r),r===1?n.pushUint8(t):r===2?n.pushUint16(t):r===3?n.pushUint24(t):n.pushUint32(t));for(let{encode:i}of e)i(n);}}}function _Z(e){let t=typeof e=="string"?df(e):e,r=L8(t.length);return {length:t.length===1&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(n){t.length===1&&t[0]<128?n.pushBytes(t):t.length<=55?(n.pushByte(128+t.length),n.pushBytes(t)):(n.pushByte(183+r),r===1?n.pushUint8(t.length):r===2?n.pushUint16(t.length):r===3?n.pushUint24(t.length):n.pushUint32(t.length),n.pushBytes(t));}}}function L8(e){if(e<=255)return 1;if(e<=65535)return 2;if(e<=16777215)return 3;if(e<=4294967295)return 4;throw new de("Length is too large.")}dn();lr();up();function Q2(e,t={}){let{recovered:r}=t;if(typeof e.r>"u")throw new Ip({signature:e});if(typeof e.s>"u")throw new Ip({signature:e});if(r&&typeof e.yParity>"u")throw new Ip({signature:e});if(e.r<0n||e.r>D2)throw new J2({value:e.r});if(e.s<0n||e.s>D2)throw new Y2({value:e.s});if(typeof e.yParity=="number"&&e.yParity!==0&&e.yParity!==1)throw new Ap({value:e.yParity})}function SZ(e){return U8(It(e))}function U8(e){if(e.length!==130&&e.length!==132)throw new K2({signature:e});let t=BigInt(dt(e,0,32)),r=BigInt(dt(e,32,64)),o=(()=>{let n=+`0x${e.slice(130)}`;if(!Number.isNaN(n))try{return rE(n)}catch{throw new Ap({value:n})}})();return typeof o>"u"?{r:t,s:r}:{r:t,s:r,yParity:o}}function eE(e){if(!(typeof e.r>"u")&&!(typeof e.s>"u"))return tE(e)}function tE(e){let t=typeof e=="string"?U8(e):e instanceof Uint8Array?SZ(e):typeof e.r=="string"?AZ(e):e.v?IZ(e):{r:e.r,s:e.s,...typeof e.yParity<"u"?{yParity:e.yParity}:{}};return Q2(t),t}function IZ(e){return {r:e.r,s:e.s,yParity:rE(e.v)}}function AZ(e){let t=(()=>{let r=e.v?Number(e.v):void 0,o=e.yParity?Number(e.yParity):void 0;if(typeof r=="number"&&typeof o!="number"&&(o=rE(r)),typeof o!="number")throw new Ap({value:e.yParity});return o})();return {r:BigInt(e.r),s:BigInt(e.s),yParity:t}}function M8(e){let{r:t,s:r,yParity:o}=e;return [o?"0x01":"0x",t===0n?"0x":p2(Ve(t)),r===0n?"0x":p2(Ve(r))]}function rE(e){if(e===0||e===27)return 0;if(e===1||e===28)return 1;if(e>=35)return e%2===0?1:0;throw new X2({value:e})}var K2=class extends de{constructor({signature:t}){super(`Value \`${t}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${lt(pf(t))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidSerializedSizeError"});}},Ip=class extends de{constructor({signature:t}){super(`Signature \`${Os(t)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.MissingPropertiesError"});}},J2=class extends de{constructor({value:t}){super(`Value \`${t}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidRError"});}},Y2=class extends de{constructor({value:t}){super(`Value \`${t}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidSError"});}},Ap=class extends de{constructor({value:t}){super(`Value \`${t}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidYParityError"});}},X2=class extends de{constructor({value:t}){super(`Value \`${t}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"Signature.InvalidVError"});}};function j8(e,t={}){return typeof e.chainId=="string"?kZ(e):{...e,...t.signature}}function kZ(e){let{address:t,chainId:r,nonce:o}=e,n=eE(e);return {address:t,chainId:Number(r),nonce:BigInt(o),...n}}function F8(e){return RZ(e,{presign:true})}function RZ(e,t={}){let{presign:r}=t;return Qa(ht("0x05",C8(TZ(r?{address:e.address,chainId:e.chainId,nonce:e.nonce}:e))))}function TZ(e){let{address:t,chainId:r,nonce:o}=e,n=eE(e);return [r?Ve(r):"0x",t,o?Ve(o):"0x",...n?M8(n):[]]}dn();lr();rd();lr();function H8(e){return R8(OZ(e))}function OZ(e){let{payload:t,signature:r}=e,{r:o,s:n,yParity:i}=r,a=new bn.Signature(BigInt(o),BigInt(n)).addRecoveryBit(i).recoverPublicKey(pf(t).substring(2));return I8(a)}var nE="0x8010801080108010801080108010801080108010801080108010801080108010",oE=Sp("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function Ny(e){if(typeof e=="string"){if(dt(e,-32)!==nE)throw new Oy(e)}else Q2(e.authorization);}function PZ(e){return typeof e=="string"?V8(e):e}function V8(e){Ny(e);let t=Lg(dt(e,-64,-32)),r=dt(e,-t-64,-64),o=dt(e,0,-t-64),[n,i,s]=rc(oE,r);return {authorization:j8({address:n.delegation,chainId:Number(n.chainId),nonce:n.nonce,yParity:n.yParity,r:n.r,s:n.s}),signature:o,...s&&s!=="0x"?{data:s,to:i}:{}}}function BZ(e){let{data:t,signature:r}=e;Ny(e);let o=H8({payload:F8(e.authorization),signature:tE(e.authorization)}),n=zs(oE,[{...e.authorization,delegation:e.authorization.address,chainId:BigInt(e.authorization.chainId)},e.to??o,t??"0x"]),i=Ve(lt(n),{size:32});return ht(r,n,i,nE)}function CZ(e){try{return Ny(e),!0}catch{return false}}var Oy=class extends de{constructor(t){super(`Value \`${t}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"SignatureErc8010.InvalidWrappedSignatureError"});}};ng();function Z8(e,t){return rg(e,t)}function zZ(e){return e.map(t=>({...t,value:BigInt(t.value)}))}function G8(e){return {...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?vt(e.nonce):void 0,storageProof:e.storageProof?zZ(e.storageProof):void 0}}async function q8(e,{address:t,blockHash:r,blockNumber:o,blockTag:n="latest",requireCanonical:i,storageKeys:s}){let a=Sn({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i}),c=await e.request({method:"eth_getProof",params:[t,s,a]});return G8(c)}Mn();async function W8(e,{hash:t}){let r=await e.request({method:"eth_getRawTransactionByHash",params:[t]},{dedupe:true});if(!r)throw new ws({hash:t});return r}Va();async function K8(e,{address:t,blockHash:r,blockNumber:o,blockTag:n="latest",requireCanonical:i,slot:s}){let a=Sn({blockHash:r,blockNumber:o,blockTag:n,requireCanonical:i});return await e.request({method:"eth_getStorageAt",params:[t,s,a]})}Mn();Re();async function Ef(e,{blockHash:t,blockNumber:r,blockTag:o,hash:n,index:i,sender:s,nonce:a}){let c=o||"latest",u=r!==void 0?J(r):void 0,f=null;if(n?f=await e.request({method:"eth_getTransactionByHash",params:[n]},{dedupe:true}):t?f=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,J(i)]},{dedupe:true}):typeof i=="number"?f=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[u||c,J(i)]},{dedupe:!!u}):s&&typeof a=="number"&&(f=await e.request({method:"eth_getTransactionBySenderAndNonce",params:[s,J(a)]},{dedupe:true})),!f)throw new ws({blockHash:t,blockNumber:r,blockTag:c,hash:n,index:i});return (e.chain?.formatters?.transaction?.format||Ti)(f,"getTransaction")}async function J8(e,{hash:t,transactionReceipt:r}){let[o,n]=await Promise.all([oe(e,Wn,"getBlockNumber")({}),t?oe(e,Ef,"getTransaction")({hash:t}):void 0]),i=r?.blockNumber||n?.blockNumber;return i?o-i+1n:0n}Mn();async function Sf(e,{hash:t}){let r=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:true});if(!r)throw new bu({hash:t});return (e.chain?.formatters?.transactionReceipt?.format||Ya)(r,"getTransactionReceipt")}pn();dp();Et();Te();Ai();$i();Un();Ja();Wg();Pr();async function Y8(e,t){let{account:r,authorizationList:o,allowFailure:n=true,blockHash:i,blockNumber:s,blockOverrides:a,blockTag:c,requireCanonical:u,stateOverride:f}=t,d=t.contracts,g=typeof e.batch?.multicall=="object"?e.batch.multicall:{},h=t.batchSize??g.batchSize??1024,v=t.deployless??g.deployless??false,E=(()=>{if(t.multicallAddress)return t.multicallAddress;if(v)return null;if(e.chain)return qn({blockNumber:s,chain:e.chain,contract:"multicall3"});throw new Error("client chain not configured. multicallAddress is required.")})(),R=[[]],$=0,N=0;for(let C=0;C<d.length;C++){let{abi:D,address:q,args:H,functionName:Z}=d[C];try{let re=ft({abi:D,args:H,functionName:Z});N+=(re.length-2)/2,h>0&&N>h&&R[$].length>0&&($++,N=(re.length-2)/2,R[$]=[]),R[$]=[...R[$],{allowFailure:!0,callData:re,target:q}];}catch(re){let S=ho(re,{abi:D,address:q,args:H,docsPath:"/docs/contract/multicall",functionName:Z,sender:r});if(!n)throw S;R[$]=[...R[$],{allowFailure:true,callData:"0x",target:q}];}}let O=!!e.batch?.multicall,I=O?R.flatMap(C=>C.map(D=>[D])):R,P=await Promise.allSettled(I.map(C=>O?LZ(e,{account:r,authorizationList:o,batchSize:h,blockHash:i,blockNumber:s,blockOverrides:a,blockTag:c,call:C[0],multicallAddress:E,requireCanonical:u,stateOverride:f}).then(D=>[D]):oe(e,De,"readContract")({...E===null?{code:qa}:{address:E},abi:bo,account:r,args:[C],authorizationList:o,blockHash:i,blockNumber:s,blockOverrides:a,blockTag:c,functionName:"aggregate3",requireCanonical:u,stateOverride:f}))),L=[];for(let C=0;C<P.length;C++){let D=P[C];if(D.status==="rejected"){if(!n)throw D.reason;for(let H=0;H<I[C].length;H++)L.push({status:"failure",error:D.reason,result:void 0});continue}let q=D.value;for(let H=0;H<q.length;H++){let{returnData:Z,success:re}=q[H],{callData:S}=I[C][H],{abi:l,address:m,functionName:y,args:b}=d[L.length];try{if(S==="0x")throw new Cn;if(!re)throw new Ho({data:Z});let x=Lr({abi:l,args:b,data:Z,functionName:y});L.push(n?{result:x,status:"success"}:x);}catch(x){let _=ho(x,{abi:l,address:m,args:b,docsPath:"/docs/contract/multicall",functionName:y});if(!n)throw _;L.push({error:_,result:void 0,status:"failure"});}}}if(L.length!==d.length)throw new z("multicall results mismatch");return L}async function LZ(e,t){let{batchSize:r,call:o,multicallAddress:n,...i}=t,{wait:s=0}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},{schedule:a}=hf({id:Be(["multicall",e.uid,r,n,i]),wait:s,shouldSplitBatch(u){return r===0?false:u.reduce((d,{callData:g})=>d+(g.length-2)/2,0)>r},fn:u=>oe(e,De,"readContract")({...n===null?{code:qa}:{address:n},...i,abi:bo,args:[u],functionName:"aggregate3"})}),[c]=await a(o);return c}m2();fn();Et();Ai();Ri();$i();Un();an();Re();ip();Ju();xg();Fa();async function If(e,t){let{blockNumber:r,blockTag:o=e.experimental_blockTag??"latest",blocks:n,returnFullTransactions:i,traceTransfers:s,validation:a}=t;try{let c=[];for(let g of n){let h=g.blockOverrides?jg(g.blockOverrides):void 0,v=g.calls.map(R=>{let $=R,N=$.account?qe($.account):void 0,O=$.abi?ft($):$.data,I={...$,account:N,data:$.dataSuffix?Mo([O||"0x",$.dataSuffix]):O,from:$.from??N?.address};return Vn(I),Zo(I)}),E=g.stateOverrides?Yu(g.stateOverrides):void 0;c.push({blockOverrides:h,calls:v,stateOverrides:E});}let f=(typeof r=="bigint"?J(r):void 0)||o;return (await e.request({method:"eth_simulateV1",params:[{blockStateCalls:c,returnFullTransactions:i,traceTransfers:s,validation:a},f]})).map((g,h)=>({...Ha(g),calls:g.calls.map((v,E)=>{let{abi:R,args:$,functionName:N,to:O}=n[h].calls[E],I=v.error?.data??v.returnData,P=BigInt(v.gasUsed),L=v.logs?.map(H=>fr(H)),C=v.status==="0x1"?"success":"failure",D=R&&C==="success"&&I!=="0x"?Lr({abi:R,data:I,functionName:N}):null,q=(()=>{if(C==="success")return;let H;if(I==="0x"?H=new Cn:I&&(H=new Ho({data:I})),!!H)return ho(H,{abi:R??[],address:O??"0x",args:$,functionName:N??"<unknown>"})})();return {data:I,gasUsed:P,logs:L,status:C,...C==="success"?{result:D}:{error:q}}})}))}catch(c){let u=c,f=Is(u,{});throw f instanceof Hn?u:f}}su();dn();lr();dn();function By(e){let t=true,r="",o=0,n="",i=false;for(let s=0;s<e.length;s++){let a=e[s];if(["(",")",","].includes(a)&&(t=true),a==="("&&o++,a===")"&&o--,!!t){if(o===0){if(a===" "&&["event","function","error",""].includes(n))n="";else if(n+=a,a===")"){i=true;break}continue}if(a===" "){e[s-1]!==","&&r!==","&&r!==",("&&(r="",t=false);continue}n+=a,r+=a;}}if(!i)throw new de("Unable to normalize signature.");return n}function Py(e,t){let r=typeof e,o=t.type;switch(o){case "address":return _y(e,{strict:false});case "bool":return r==="boolean";case "function":return r==="string";case "string":return r==="string";default:return o==="tuple"&&"components"in t?Object.values(t.components).every((n,i)=>Py(Object.values(e)[i],n)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(o)?r==="number"||r==="bigint":/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(o)?r==="string"||e instanceof Uint8Array:/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(o)?Array.isArray(e)&&e.every(n=>Py(n,{...t,type:o.replace(/(\[[0-9]{0,}\])$/,"")})):false}}function iE(e,t,r){for(let o in e){let n=e[o],i=t[o];if(n.type==="tuple"&&i.type==="tuple"&&"components"in n&&"components"in i)return iE(n.components,i.components,r[o]);let s=[n.type,i.type];if(s.includes("address")&&s.includes("bytes20")?true:s.includes("address")&&s.includes("string")?_y(r[o],{strict:false}):s.includes("address")&&s.includes("bytes")?_y(r[o],{strict:false}):false)return s}}function Af(e,t={}){let{prepare:r=true}=t,o=Array.isArray(e)?Ud(e):typeof e=="string"?Ud(e):e;return {...o,...r?{hash:Ls(o)}:{}}}function kf(e,t,r){let{args:o=[],prepare:n=true}=r??{},i=lp(t,{strict:false}),s=e.filter(u=>i?u.type==="function"||u.type==="error"?aE(u)===dt(t,0,4):u.type==="event"?Ls(u)===t:false:"name"in u&&u.name===t);if(s.length===0)throw new Bi({name:t});if(s.length===1)return {...s[0],...n?{hash:Ls(s[0])}:{}};let a;for(let u of s){if(!("inputs"in u))continue;if(!o||o.length===0){if(!u.inputs||u.inputs.length===0)return {...u,...n?{hash:Ls(u)}:{}};continue}if(!u.inputs||u.inputs.length===0||u.inputs.length!==o.length)continue;if(o.every((d,g)=>{let h="inputs"in u&&u.inputs[g];return h?Py(d,h):false})){if(a&&"inputs"in a&&a.inputs){let d=iE(u.inputs,a.inputs,o);if(d)throw new sE({abiItem:u,type:d[0]},{abiItem:a,type:d[1]})}a=u;}}let c=(()=>{if(a)return a;let[u,...f]=s;return {...u,overloads:f}})();if(!c)throw new Bi({name:t});return {...c,...n?{hash:Ls(c)}:{}}}function aE(...e){let t=(()=>{if(Array.isArray(e[0])){let[r,o]=e;return kf(r,o)}return e[0]})();return dt(Ls(t),0,4)}function MZ(...e){let t=(()=>{if(Array.isArray(e[0])){let[o,n]=e;return kf(o,n)}return e[0]})(),r=typeof t=="string"?t:Ba(t);return By(r)}function Ls(...e){let t=(()=>{if(Array.isArray(e[0])){let[r,o]=e;return kf(r,o)}return e[0]})();return typeof t!="string"&&"hash"in t&&t.hash?t.hash:Qa(mf(MZ(t)))}var sE=class extends de{constructor(t,r){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${t.type}\` in \`${By(Ba(t.abiItem))}\`, and`,`\`${r.type}\` in \`${By(Ba(r.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiItem.AmbiguityError"});}},Bi=class extends de{constructor({name:t,data:r,type:o="item"}){let n=t?` with name "${t}"`:r?` with data "${r}"`:"";super(`ABI ${o}${n} not found.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"AbiItem.NotFoundError"});}};lr();function X8(...e){let[t,r]=(()=>{if(Array.isArray(e[0])){let[i,s]=e;return [DZ(i),s]}return e})(),{bytecode:o,args:n}=r;return ht(o,t.inputs?.length&&n?.length?zs(t.inputs,n):"0x")}function Q8(e){return Af(e)}function DZ(e){let t=e.find(r=>r.type==="constructor");if(!t)throw new Bi({name:"constructor"});return t}function eO(e,t={}){return Af(e,t)}function tO(e){return Ls(e)}lr();function rO(...e){let[t,r,o={}]=(()=>{if(Array.isArray(e[0])){let[i,s,a,c]=e;return [uE(i,s),a,c]}return e})(),n=rc(t.outputs,r,o);if(!(n&&Object.keys(n).length===0))return n&&Object.keys(n).length===1?Array.isArray(n)?n[0]:Object.values(n)[0]:n}function Us(...e){let[t,r=[]]=(()=>{if(Array.isArray(e[0])){let[u,f,d]=e;return [uE(u,f,{args:d}),d]}let[a,c]=e;return [a,c]})(),{overloads:o}=t,n=o?uE([t,...o],t.name,{args:r}):t,i=HZ(n),s=r.length>0?zs(n.inputs,r):void 0;return s?ht(i,s):i}function nc(e,t={}){return Af(e,t)}function uE(e,t,r){let o=kf(e,t,r);if(o.type!=="function")throw new Bi({name:t,type:"function"});return o}function HZ(e){return aE(e)}fn();var Cy="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",zy="0x0000000000000000000000000000000000000000";dp();Te();Ai();Ri();qd();ur();Ns();var ZZ="0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033",uO="0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063fd00430c1461002d575b5f5ffd5b6100476004803603810190610042919061012b565b610049565b005b80825f375f5f825f865afa610060573d5f5f3e3d5ffd5b3d5f5f3e3d5ff35b5f5ffd5b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61009982610070565b9050919050565b6100a98161008f565b81146100b3575f5ffd5b50565b5f813590506100c4816100a0565b92915050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f8401126100eb576100ea6100ca565b5b8235905067ffffffffffffffff811115610108576101076100ce565b5b602083019150836001820283011115610124576101236100d2565b5b9250929050565b5f5f5f6040848603121561014257610141610068565b5b5f61014f868287016100b6565b935050602084013567ffffffffffffffff8111156101705761016f61006c565b5b61017c868287016100d6565b9250925050925092509256fea2646970667358221220635ed99185cacf3f2acba6921f23687c969cec2bbaf5f9ad599f507e6e105e6964736f6c63430008230033",GZ=0x00000000000000000000000000000000deadbeefn,qZ=tO(eO("event Transfer(address indexed from, address indexed to, uint256 value)")),nO=nc("function balanceOf(address) returns (uint256)"),oO=nc("function decimals() returns (uint256)"),iO=nc("function tokenURI(uint256) returns (string)"),sO=nc("function symbol() returns (string)"),WZ=nc("function query(address target, bytes data)");async function fO(e,t){let{blockNumber:r,blockTag:o,calls:n,stateOverrides:i,traceAssetChanges:s,traceTransfers:a,validation:c}=t,u=t.account?qe(t.account):void 0;if(s&&!u)throw new z("`account` is required when `traceAssetChanges` is true");let f=u?X8(Q8("constructor(bytes, bytes)"),{bytecode:Vg,args:[ZZ,Us(nc("function getBalance(address)"),[u.address])]}):void 0,d=o??e.experimental_blockTag??"latest",g=r;if(s&&typeof g!="bigint"&&d!=="earliest"&&d!=="pending")if(d==="latest")g=await Wn(e,{cacheTime:0});else {let p=await er(e,{blockTag:d});if(typeof p.number!="bigint")throw new z(`Block tag \`${d}\` did not resolve to a number.`);g=p.number;}let h=typeof g=="bigint"?{blockNumber:g}:{blockTag:d},v=s?await If(e,{...h,blocks:[{calls:n.map(p=>({...p,from:u.address})),stateOverrides:i}],traceTransfers:a,validation:c}):void 0,E=v?[...new Set([...KZ(v[0].calls.flatMap(p=>p.logs??[]),u.address),...t.calls.map(p=>p.to?.toLowerCase())])].filter(p=>!!p&&p!==Cy&&p!==zy):[],R=JZ([...u?[u.address]:[],...E,...i?.map(({address:p})=>p)??[]]),$=[{address:R,code:uO}],[N,O]=await Promise.all([s?Promise.all([cO(e,{account:u.address,...h,data:f,stateOverride:i}),...E.map(p=>cO(e,{account:u.address,address:p,...h,data:Us(nO,[u.address]),staticCallAddress:R,stateOverride:i}))]):[],If(e,{...h,blocks:[{calls:[...n,{to:zy}].map(p=>({...p,from:u?.address})),stateOverrides:i},...s?[{calls:[{data:f}]},{calls:E.map(p=>({to:R,data:Rp(p,Us(nO,[u.address]))})),stateOverrides:$},{calls:E.map(p=>({to:R,data:Rp(p,Us(oO))})),stateOverrides:$},{calls:E.map(p=>({to:R,data:Rp(p,Us(iO,[0n]))})),stateOverrides:$},{calls:E.map(p=>({to:R,data:Rp(p,Us(sO))})),stateOverrides:$}]:[]],traceTransfers:a,validation:c})]),I=O[0],[P,L,C,D,q]=s?O.slice(1):[],{calls:H,...Z}=I,re=H.slice(0,-1),S=N.map(p=>aO(p)?ut(p.data):null),l=P?.calls??[],m=L?.calls??[],b=[...l,...m].map(p=>aO(p)?ut(p.data):null),x=(C?.calls??[]).map(p=>fE(p,oO)),_=(q?.calls??[]).map(p=>fE(p,sO)),k=(D?.calls??[]).map(p=>fE(p,iO)),w=[];for(let[p,A]of b.entries()){let G=S[p],K=N[p],Q=typeof G=="bigint"?G:p>0&&K?.status==="success"&&K.data==="0x"?0n:null;if(typeof A!="bigint"||typeof Q!="bigint")continue;let ae=x[p-1],he=_[p-1],ye=k[p-1],We=p===0?{address:Cy,decimals:18,symbol:"ETH"}:{address:E[p-1],decimals:ye||ae?Number(ae??1):void 0,symbol:he??void 0};w.push({token:We,value:{pre:Q,post:A,diff:A-Q}});}return {assetChanges:w,block:Z,results:re}}function Rp(e,t){return Us(WZ,[e,t])}function KZ(e,t){let r=zo(t.toLowerCase(),{size:32});return e.filter(o=>o.topics[0]?.toLowerCase()!==qZ||o.address.toLowerCase()===Cy?false:o.topics[1]?.toLowerCase()===r||o.topics[2]?.toLowerCase()===r).map(o=>o.address.toLowerCase())}function aO(e){return e.status==="success"&&/^0x[\da-f]{64}$/i.test(e.data)}function fE(e,t){if(e.status==="failure"||e.data==="0x")return null;try{return rO(t,e.data)}catch{return null}}async function cO(e,t){let{account:r,address:o,blockNumber:n,blockTag:i,data:s,staticCallAddress:a,stateOverride:c}=t;try{return {data:(await mn({...e,ccipRead:!1},{account:o?zy:r,data:o?Rp(o,s):s,stateOverride:o&&a?[...c??[],{address:a,code:uO}]:c,...o?{to:a}:{},...typeof n=="bigint"?{blockNumber:n}:{blockTag:i}})).data??"0x",status:"success"}}catch(u){if(!(u instanceof _s)||!(u.cause instanceof yo))throw u;return {data:"0x",status:"failure"}}}function JZ(e){let t=new Set(e.map(o=>o.toLowerCase())),r=GZ;for(;t.has(`0x${r.toString(16).padStart(40,"0")}`);)r++;return `0x${r.toString(16).padStart(40,"0")}`}var Tp={};Er(Tp,{InvalidWrappedSignatureError:()=>Ly,assert:()=>dE,from:()=>QZ,magicBytes:()=>lE,universalSignatureValidatorAbi:()=>XZ,universalSignatureValidatorBytecode:()=>YZ,unwrap:()=>lO,validate:()=>tG,wrap:()=>eG});dn();lr();var lE="0x6492649264926492649264926492649264926492649264926492649264926492",YZ="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",XZ=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}];function dE(e){if(dt(e,-32)!==lE)throw new Ly(e)}function QZ(e){return typeof e=="string"?lO(e):e}function lO(e){dE(e);let[t,r,o]=rc(Sp("address, bytes, bytes"),e);return {data:r,signature:o,to:t}}function eG(e){let{data:t,signature:r,to:o}=e;return ht(zs(Sp("address, bytes, bytes"),[o,t,r]),lE)}function tG(e){try{return dE(e),!0}catch{return false}}var Ly=class extends de{constructor(t){super(`Value \`${t}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"SignatureErc6492.InvalidWrappedSignatureError"});}};pn();dp();Ai();v2();Un();Ei();Ts();an();uo();ur();Re();rd();ur();vr();function dO({r:e,s:t,to:r="hex",v:o,yParity:n}){let i=(()=>{if(n===0||n===1)return n;if(o&&(o===27n||o===28n||o>=35n))return o%2n===0n?1:0;throw new Error("Invalid `v` or `yParity` value")})(),s=`0x${new bn.Signature(ut(e),ut(t)).toCompactHex()}${i===0?"1b":"1c"}`;return r==="hex"?s:xr(s)}Ns();async function Ms(e,t){let{address:r,chain:o=e.chain,hash:n,erc6492VerifierAddress:i=t.universalSignatureVerifierAddress??o?.contracts?.erc6492Verifier?.address,multicallAddress:s=t.multicallAddress??o?.contracts?.multicall3?.address,mode:a="auto"}=t;if(o?.verifyHash)return await o.verifyHash(e,t);let c=(()=>{let u=t.signature;return St(u)?u:typeof u=="object"&&"r"in u&&"s"in u?dO(u):Ue(u)})();try{if(a==="eoa")try{if(zr(Ln(r),await op({hash:n,signature:c})))return !0}catch{}return kp.validate(c)?await rG(e,{...t,multicallAddress:s,signature:c}):await nG(e,{...t,verifierAddress:i,signature:c})}catch(u){if(a!=="eoa")try{if(zr(Ln(r),await op({hash:n,signature:c})))return !0}catch{}if(u instanceof Ci)return false;throw u}}async function rG(e,t){let{address:r,blockHash:o,blockNumber:n,blockTag:i,hash:s,multicallAddress:a,requireCanonical:c}=t,{authorization:u,data:f,signature:d,to:g}=kp.unwrap(t.signature);if(await Xa(e,{address:r,blockHash:o,blockNumber:n,blockTag:i,requireCanonical:c})===st(["0xef0100",u.address]))return await oG(e,{...t,signature:d});let v={address:u.address,chainId:Number(u.chainId),nonce:Number(u.nonce),r:J(u.r,{size:32}),s:J(u.s,{size:32}),yParity:u.yParity};if(!await f8({address:r,authorization:v}))throw new Ci;let R=await oe(e,De,"readContract")({...a?{address:a}:{code:qa},authorizationList:[v],abi:bo,blockHash:o,blockNumber:n,blockTag:"pending",functionName:"aggregate3",requireCanonical:c,args:[[...f?[{allowFailure:true,target:g??r,callData:f}]:[],{allowFailure:true,target:r,callData:ft({abi:y2,functionName:"isValidSignature",args:[s,d]})}]]});if(R[R.length-1]?.returnData?.startsWith("0x1626ba7e"))return true;throw new Ci}async function nG(e,t){let{address:r,factory:o,factoryData:n,hash:i,signature:s,verifierAddress:a,...c}=t,u=await(async()=>!o&&!n||Tp.validate(s)?s:Tp.wrap({data:n,signature:s,to:o}))(),f=a?{to:a,data:ft({abi:b2,functionName:"isValidSig",args:[r,i,u]}),...c}:{data:mp({abi:b2,args:[r,i,u],bytecode:m$}),...c},{data:d}=await oe(e,mn,"call")(f).catch(g=>{throw g instanceof _s?new Ci:g});if(L6(d??"0x0"))return true;throw new Ci}async function oG(e,t){let{address:r,blockHash:o,blockNumber:n,blockTag:i,hash:s,requireCanonical:a,signature:c}=t;if((await oe(e,De,"readContract")({address:r,abi:y2,args:[s,c],blockHash:o,blockNumber:n,blockTag:i,functionName:"isValidSignature",requireCanonical:a}).catch(f=>{throw f instanceof xu?new Ci:f})).startsWith("0x1626ba7e"))return true;throw new Ci}var Ci=class extends Error{};async function pO(e,{address:t,message:r,factory:o,factoryData:n,signature:i,...s}){let a=dy(r);return oe(e,Ms,"verifyHash")({address:t,factory:o,factoryData:n,hash:a,signature:i,...s})}async function mO(e,t){let{address:r,factory:o,factoryData:n,signature:i,message:s,primaryType:a,types:c,domain:u,...f}=t,d=x8({message:s,primaryType:a,types:c,domain:u});return oe(e,Ms,"verifyHash")({address:r,factory:o,factoryData:n,hash:d,signature:i,...f})}Mn();_2();Pr();ur();Pr();function Uy(e,{emitOnBegin:t=false,emitMissed:r=false,onBlockNumber:o,onError:n,poll:i,pollingInterval:s=e.pollingInterval}){let a=typeof i<"u"?i:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),c;return a?(()=>{let d=Be(["watchBlockNumber",e.uid,t,r,s]);return Ur(d,{onBlockNumber:o,onError:n},g=>Wo(async()=>{try{let h=await oe(e,Wn,"getBlockNumber")({cacheTime:0});if(c!==void 0){if(h===c)return;if(h-c>1&&r)for(let v=c+1n;v<h;v++)g.onBlockNumber(v,c),c=v;}(c===void 0||h>c)&&(g.onBlockNumber(h,c),c=h);}catch(h){g.onError?.(h);}},{emitOnBegin:t,interval:s}))})():(()=>{let d=Be(["watchBlockNumber",e.uid,t,r]);return Ur(d,{onBlockNumber:o,onError:n},g=>{let h=true,v=()=>h=false;return (async()=>{try{let E=(()=>{if(e.transport.type==="fallback"){let $=e.transport.transports.find(N=>N.config.type==="webSocket"||N.config.type==="ipc");return $?$.value:e.transport}return e.transport})(),{unsubscribe:R}=await E.subscribe({params:["newHeads"],onData($){if(!h)return;let N=ut($.result?.number);g.onBlockNumber(N,c),c=N;},onError($){g.onError?.($);}});v=R,h||v();}catch(E){n?.(E);}})(),()=>v()})})()}async function hO(e,t){let{checkReplacement:r=e.chain?.supportsTransactionReplacementDetection??true,confirmations:o=1,hash:n,onReplaced:i,retryCount:s=6,retryDelay:a=({count:P})=>~~(1<<P)*200,timeout:c=18e4}=t,u=Be(["waitForTransactionReceipt",e.uid,n]),f=t.pollingInterval?t.pollingInterval:e.chain?.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval,d,g,h,v=false,E,R,{promise:$,resolve:N,reject:O}=qg(),I=c?setTimeout(()=>{R?.(),E?.(),O(new dg({hash:n}));},c):void 0;return E=Ur(u,{onReplaced:i,resolve:N,reject:O},async P=>{if(h=await oe(e,Sf,"getTransactionReceipt")({hash:n}).catch(()=>{}),h&&o<=1){clearTimeout(I),P.resolve(h),E?.();return}R=oe(e,Uy,"watchBlockNumber")({emitMissed:true,emitOnBegin:true,poll:true,pollingInterval:f,async onBlockNumber(L){let C=q=>{clearTimeout(I),R?.(),q(),E?.();},D=L;if(!v)try{if(h){if(o>1&&(!h.blockNumber||D-h.blockNumber+1n<o))return;C(()=>P.resolve(h));return}if(r&&!d&&(v=!0,await bp(async()=>{d=await oe(e,Ef,"getTransaction")({hash:n}),d.blockNumber&&(D=d.blockNumber);},{delay:a,retryCount:s}),v=!1),h=await oe(e,Sf,"getTransactionReceipt")({hash:n}),o>1&&(!h.blockNumber||D-h.blockNumber+1n<o))return;C(()=>P.resolve(h));}catch(q){if(q instanceof ws||q instanceof bu){if(!d){v=false;return}try{g=d,v=!0;let H=await bp(()=>oe(e,er,"getBlock")({blockNumber:D,includeTransactions:!0}),{delay:a,retryCount:s,shouldRetry:({error:S})=>S instanceof Rs});v=!1;let Z=H.transactions.find(({from:S,nonce:l})=>S===g.from&&l===g.nonce);if(!Z||(h=await oe(e,Sf,"getTransactionReceipt")({hash:Z.hash}),o>1&&(!h.blockNumber||D-h.blockNumber+1n<o)))return;let re="replaced";Z.to===g.to&&Z.value===g.value&&Z.input===g.input?re="repriced":Z.from===Z.to&&Z.value===0n&&(re="cancelled"),C(()=>{P.onReplaced?.({reason:re,replacedTransaction:g,transaction:Z,transactionReceipt:h}),P.resolve(h);});}catch(H){C(()=>P.reject(H));}}else C(()=>P.reject(q));}}});}),$}Pr();var iG=["size","totalDifficulty","transactions","uncles","withdrawals"];function gO(e,{onBlockHeader:t,onError:r}){let o,n=Be(["watchBlockHeaders",e.uid]);return Ur(n,{onBlockHeader:t,onError:r},i=>{let s=true,a=false,c=()=>s=false;return (async()=>{try{let u=(()=>{if(e.transport.type==="fallback"){let d=e.transport.transports.find(g=>g.config.type==="webSocket"||g.config.type==="ipc");return d?d.value:e.transport}return e.transport})(),{unsubscribe:f}=await u.subscribe({params:["newHeads"],onData(d){if(!s)return;let g=(e.chain?.formatters?.block?.format||Ha)(d.result,"watchBlockHeaders");for(let h of iG)delete g[h];i.onBlockHeader(g,o),o=g;},onError(d){a&&i.onError?.(d);}});a=!0,c=f,s||c();}catch(u){i.onError?.(u);}})(),()=>c()})}Pr();function yO(e,{blockTag:t=e.experimental_blockTag??"latest",emitMissed:r=false,emitOnBegin:o=false,onBlock:n,onError:i,includeTransactions:s,poll:a,pollingInterval:c=e.pollingInterval}){let u=typeof a<"u"?a:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),f=s??false,d;return u?(()=>{let v=Be(["watchBlocks",e.uid,t,r,o,f,c]);return Ur(v,{onBlock:n,onError:i},E=>Wo(async()=>{try{let R=await oe(e,er,"getBlock")({blockTag:t,includeTransactions:f});if(R.number!==null&&d?.number!=null){if(R.number===d.number)return;if(R.number-d.number>1&&r)for(let $=d?.number+1n;$<R.number;$++){let N=await oe(e,er,"getBlock")({blockNumber:$,includeTransactions:f});E.onBlock(N,d),d=N;}}(d?.number==null||t==="pending"&&R?.number==null||R.number!==null&&R.number>d.number)&&(E.onBlock(R,d),d=R);}catch(R){E.onError?.(R);}},{emitOnBegin:o,interval:c}))})():(()=>{let v=true,E=true,R=()=>v=false;return (async()=>{try{o&&oe(e,er,"getBlock")({blockTag:t,includeTransactions:f}).then(O=>{v&&E&&(n(O,void 0),E=!1);}).catch(i);let $=(()=>{if(e.transport.type==="fallback"){let O=e.transport.transports.find(I=>I.config.type==="webSocket"||I.config.type==="ipc");return O?O.value:e.transport}return e.transport})(),{unsubscribe:N}=await $.subscribe({params:["newHeads"],async onData(O){if(!v)return;let I=await oe(e,er,"getBlock")({blockNumber:O.result?.number,includeTransactions:f}).catch(()=>{});v&&(n(I,d),E=!1,d=I);},onError(O){i?.(O);}});R=N,v||R();}catch($){i?.($);}})(),()=>R()})()}Et();np();Pr();function bO(e,{address:t,args:r,batch:o=true,event:n,events:i,fromBlock:s,onError:a,onLogs:c,poll:u,pollingInterval:f=e.pollingInterval,strict:d}){let g=typeof u<"u"?u:typeof s=="bigint"?true:!(e.transport.type==="webSocket"||e.transport.type==="ipc"||e.transport.type==="fallback"&&(e.transport.transports[0].config.type==="webSocket"||e.transport.transports[0].config.type==="ipc")),h=d??false;return g?(()=>{let R=Be(["watchEvent",t,r,o,e.uid,n,f,s]);return Ur(R,{onLogs:c,onError:a},$=>{let N;s!==void 0&&(N=s-1n);let O,I=false,P=Wo(async()=>{if(!I){try{O=await oe(e,ay,"createEventFilter")({address:t,args:r,event:n,events:i,strict:h,fromBlock:s});}catch{}I=true;return}try{let L;if(O)L=await oe(e,Ps,"getFilterChanges")({filter:O});else {let C=await oe(e,Wn,"getBlockNumber")({});N&&N!==C?L=await oe(e,cf,"getLogs")({address:t,args:r,event:n,events:i,fromBlock:N+1n,toBlock:C}):L=[],N=C;}if(L.length===0)return;if(o)$.onLogs(L);else for(let C of L)$.onLogs([C]);}catch(L){O&&L instanceof jn&&(I=false),$.onError?.(L);}},{emitOnBegin:true,interval:f});return async()=>{O&&await oe(e,Bs,"uninstallFilter")({filter:O}),P();}})})():(()=>{let R=true,$=()=>R=false;return (async()=>{try{let N=(()=>{if(e.transport.type==="fallback"){let L=e.transport.transports.find(C=>C.config.type==="webSocket"||C.config.type==="ipc");return L?L.value:e.transport}return e.transport})(),O=i??(n?[n]:void 0),I=[];O&&(I=[O.flatMap(C=>jo({abi:[C],eventName:C.name,args:r}))],n&&(I=I[0]));let{unsubscribe:P}=await N.subscribe({params:["logs",{address:t,topics:I}],onData(L){if(!R)return;let C=L.result;try{let{eventName:D,args:q}=Za({abi:O??[],data:C.data,topics:C.topics,strict:h}),H=fr(C,{args:q,eventName:D});c([H]);}catch(D){let q,H;if(D instanceof vi||D instanceof ms){if(d)return;q=D.abiItem.name,H=D.abiItem.inputs?.some(re=>!("name"in re&&re.name));}let Z=fr(C,{args:H?[]:{},eventName:q});c([Z]);}},onError(L){a?.(L);}});$=P,R||$();}catch(N){a?.(N);}})(),()=>$()})()}Pr();function xO(e,{batch:t=true,onError:r,onTransactions:o,poll:n,pollingInterval:i=e.pollingInterval}){return (typeof n<"u"?n:e.transport.type!=="webSocket"&&e.transport.type!=="ipc")?(()=>{let u=Be(["watchPendingTransactions",e.uid,t,i]);return Ur(u,{onTransactions:o,onError:r},f=>{let d,g=Wo(async()=>{try{if(!d)try{d=await oe(e,cy,"createPendingTransactionFilter")({});return}catch(v){throw g(),v}let h=await oe(e,Ps,"getFilterChanges")({filter:d});if(h.length===0)return;if(t)f.onTransactions(h);else for(let v of h)f.onTransactions([v]);}catch(h){f.onError?.(h);}},{emitOnBegin:true,interval:i});return async()=>{d&&await oe(e,Bs,"uninstallFilter")({filter:d}),g();}})})():(()=>{let u=true,f=()=>u=false;return (async()=>{try{let{unsubscribe:d}=await e.transport.subscribe({params:["newPendingTransactions"],onData(g){if(!u)return;let h=g.result;o([h]);},onError(g){r?.(g);}});f=d,u||f();}catch(d){r?.(d);}})(),()=>f()})()}var sG=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})$/;function aG(e){return sG.test(e)?!Number.isNaN(new Date(e).getTime()):false}function pE(e){return aG(e)?new Date(e):new Date(Number.NaN)}function vO(e){let{scheme:t,statement:r,...o}=e.match(cG)?.groups??{},{chainId:n,expirationTime:i,issuedAt:s,notBefore:a,requestId:c,...u}=e.match(uG)?.groups??{},f=e.split("Resources:")[1]?.split(`
|
|
71
|
+
- `).slice(1);return {...o,...u,...n?{chainId:Number(n)}:{},...i?{expirationTime:pE(i)}:{},...s?{issuedAt:pE(s)}:{},...a?{notBefore:pE(a)}:{},...c?{requestId:c}:{},...f?{resources:f}:{},...t?{scheme:t}:{},...r?{statement:r}:{}}}var cG=/^(?:(?<scheme>[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?<domain>[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?<address>0x[a-fA-F0-9]{40})\n\n(?:(?<statement>.*)\n\n)?/,uG=/(?:URI: (?<uri>.+))\n(?:Version: (?<version>.+))\n(?:Chain ID: (?<chainId>\d+))\n(?:Nonce: (?<nonce>[a-zA-Z0-9]+))\n(?:Issued At: (?<issuedAt>.+))(?:\nExpiration Time: (?<expirationTime>.+))?(?:\nNot Before: (?<notBefore>.+))?(?:\nRequest ID: (?<requestId>.+))?/;En();Ts();function wO(e){let{address:t,domain:r,message:o,nonce:n,scheme:i,time:s=new Date}=e;if(r&&o.domain!==r||n&&o.nonce!==n||i&&o.scheme!==i||Number.isNaN(s.getTime())||o.expirationTime&&(Number.isNaN(o.expirationTime.getTime())||s>=o.expirationTime)||o.notBefore&&(Number.isNaN(o.notBefore.getTime())||s<o.notBefore))return false;try{if(!o.address||!Me(o.address,{strict:!1})||t&&!zr(o.address,t))return !1}catch{return false}return true}async function _O(e,t){let{address:r,domain:o,message:n,nonce:i,scheme:s,signature:a,time:c=new Date,...u}=t,f=vO(n);if(!f.address||!wO({address:r,domain:o,message:f,nonce:i,scheme:s,time:c}))return false;let g=dy(n);return Ms(e,{address:f.address,hash:g,signature:a,...u})}pn();En();Ts();function Rf(e,t){return {amount:e,decimals:t,formatted:Z8(e,t)}}function zi(e,t){let{decimals:r,token:o}=t,n=hE(e,o);if(n)return {address:n.address,decimals:r??n.decimals};if(Me(o,{strict:false}))return {address:o,decimals:r??lG(e,o)};throw new Error(`Token "${o}" is not a declared ERC-20 token on the client's \`tokens\` array (with an address for the client's chain), and is not a valid address.`)}function hE(e,t){let r=e.tokens,o=e.chain?.id;if(!r||o===void 0)return;let n=fG(r,t);if(n)return mE(n,o);if(Me(t,{strict:false}))for(let i of r){let s=mE(i,o);if(s&&zr(s.address,t))return s}}function mE(e,t){let r=e.addresses[t];if(r)return {address:r,currency:e.currency,decimals:e.decimals,name:e.name,popular:e.popular,symbol:e.symbol}}function fG(e,t){let r=t.toLowerCase();for(let o of e)if(o.symbol?.toLowerCase()===r)return o}function lG(e,t){let r=e.tokens,o=e.chain?.id;if(r&&o!==void 0)for(let n of r){let i=mE(n,o);if(i&&zr(i.address,t))return i.decimals}}async function Tf(e,t){let{address:r,decimals:o}=zi(e,t);return o!==void 0?{address:r,decimals:o}:{address:r,decimals:await De(e,{abi:Gn,address:r,functionName:"decimals"})}}function $f(e){return {...e,data:ft(e),to:e.address}}Mn();async function EO(e,{serializedTransaction:t,throwOnReceiptRevert:r,timeout:o}){let n=await e.request({method:"eth_sendRawTransactionSync",params:o?[t,o]:[t]},{retryCount:0}),s=(e.chain?.formatters?.transactionReceipt?.format||Ya)(n);if(s.status==="reverted"&&r)throw new lg({receipt:s});return s}pn();async function Of(e,t){let{account:r,decimals:o,spender:n,token:i,...s}=t,[a,{decimals:c}]=await Promise.all([De(e,{...s,...Of.call(e,{account:r,spender:n,token:i})}),Tf(e,{decimals:o,token:i})]);return Rf(a,c)}(function(e){function t(r,o){return $f({address:zi(r,o).address,abi:Gn,functionName:"allowance",args:[o.account,o.spender]})}e.call=t;})(Of||(Of={}));fn();pn();async function Nf(e,t){let{account:r=e.account,decimals:o,token:n,...i}=t;if(!r)throw new yp;let s=qe(r).address,[a,{decimals:c}]=await Promise.all([De(e,{...i,...Nf.call(e,{account:s,token:n})}),Tf(e,{decimals:o,token:n})]);return Rf(a,c)}(function(e){function t(r,o){let n=o.account??r.account;if(!n)throw new yp;let i=qe(n).address;return $f({address:zi(r,o).address,abi:Gn,functionName:"balanceOf",args:[i]})}e.call=t;})(Nf||(Nf={}));pn();async function gE(e,t){let{token:r,...o}=t,{address:n}=zi(e,{token:r}),i=hE(e,r),[s,a,c]=await Promise.all([i?.decimals??De(e,{...o,abi:Gn,address:n,functionName:"decimals"}),i?.name??De(e,{...o,abi:Gn,address:n,functionName:"name"}),i?.symbol??De(e,{...o,abi:Gn,address:n,functionName:"symbol"})]);return {decimals:s,name:a,symbol:c}}pn();async function Pf(e,t){let{decimals:r,token:o,...n}=t,[i,{decimals:s}]=await Promise.all([De(e,{...n,...Pf.call(e,{token:o})}),Tf(e,{decimals:r,token:o})]);return Rf(i,s)}(function(e){function t(r,o){return $f({address:zi(r,o).address,abi:Gn,args:[],functionName:"totalSupply"})}e.call=t;})(Pf||(Pf={}));function SO(e){return {call:t=>mn(e,t),createAccessList:t=>q$(e,t),createBlockFilter:()=>W$(e),createContractEventFilter:t=>K0(e,t),createEventFilter:t=>ay(e,t),createPendingTransactionFilter:()=>cy(e),estimateContractGas:t=>U4(e,t),estimateGas:t=>sf(e,t),getBalance:t=>K$(e,t),getBlobBaseFee:()=>J$(e),getBlock:t=>er(e,t),getBlockNumber:t=>Wn(e,t),getBlockReceipts:t=>Y$(e,t),getBlockTransactionCount:t=>X$(e,t),getBytecode:t=>Xa(e,t),getChainId:()=>of(e),getCode:t=>Xa(e,t),getContractEvents:t=>Og(e,t),getDelegation:t=>Q$(e,t),getEip712Domain:t=>e8(e,t),getEnsAddress:t=>U$(e,t),getEnsAvatar:t=>V$(e,t),getEnsName:t=>Z$(e,t),getEnsResolver:t=>G$(e,t),getEnsText:t=>sy(e,t),getFeeHistory:t=>r8(e,t),estimateFeesPerGas:t=>N4(e,t),getFilterChanges:t=>Ps(e,t),getFilterLogs:t=>n8(e,t),getGasPrice:()=>ef(e),getLogs:t=>cf(e,t),getProof:t=>q8(e,t),estimateMaxPriorityFeePerGas:t=>O4(e,t),fillTransaction:t=>Tg(e,t),getRawTransaction:t=>W8(e,t),getStorageAt:t=>K8(e,t),getTransaction:t=>Ef(e,t),getTransactionConfirmations:t=>J8(e,t),getTransactionCount:t=>_g(e,t),getTransactionReceipt:t=>Sf(e,t),multicall:t=>Y8(e,t),prepareTransactionRequest:t=>$g(e,t),readContract:t=>De(e,t),sendRawTransaction:t=>N$(e,t),sendRawTransactionSync:t=>EO(e,t),simulate:t=>If(e,t),simulateBlocks:t=>If(e,t),simulateCalls:t=>fO(e,t),simulateContract:t=>R$(e,t),verifyHash:t=>Ms(e,t),verifyMessage:t=>pO(e,t),verifySiweMessage:t=>_O(e,t),verifyTypedData:t=>mO(e,t),uninstallFilter:t=>Bs(e,t),waitForTransactionReceipt:t=>hO(e,t),watchBlockHeaders:t=>gO(e,t),watchBlocks:t=>yO(e,t),watchBlockNumber:t=>Uy(e,t),watchContractEvent:t=>O$(e,t),watchEvent:t=>bO(e,t),watchPendingTransactions:t=>xO(e,t),token:dG(e)}}function dG(e){return {getAllowance:xp(e,Of),getBalance:xp(e,Nf),getMetadata:xp(e,gE),getTotalSupply:xp(e,Pf)}}function yE(e){let{key:t="public",name:r="Public Client"}=e;return C$({...e,key:t,name:r,type:"publicClient"}).extend(SO)}function IO({key:e,methods:t,name:r,request:o,retryCount:n=3,retryDelay:i=150,timeout:s,type:a},c){let u=ty();return {config:{key:e,methods:t,name:r,request:o,retryCount:n,retryDelay:i,timeout:s,type:a},request:d8(o,{methods:t,retryCount:n,retryDelay:i,uid:u}),value:c}}Ma();Te();var My=class extends z{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"});}};Wg();var pG=0,AO=new WeakMap;function mG(e){if(!e)return "default";let t=AO.get(e);if(t!==void 0)return t;let r=pG++;return AO.set(e,r),r}function bE(e,t={}){let{batch:r,fetchFn:o,fetchOptions:n,key:i="http",maxResponseBodySize:s,methods:a,name:c="HTTP JSON-RPC",onFetchRequest:u,onFetchResponse:f,retryDelay:d,raw:g}=t;return ({chain:h,retryCount:v,timeout:E})=>{let{batchSize:R=1e3,wait:$=0}=typeof r=="object"?r:{},N=t.retryCount??v,O=E??t.timeout??1e4,I=e||h?.rpcUrls.default.http[0];if(!I)throw new My;let P=m8(I,{fetchFn:o,fetchOptions:n,maxResponseBodySize:s,onRequest:u,onResponse:f,timeout:O});return IO({key:i,methods:a,name:c,async request({method:L,params:C},D){let q={method:L,params:C},H=D?.signal?{signal:D.signal}:void 0,{schedule:Z}=hf({id:`${I}.${mG(D?.signal)}`,wait:$,shouldSplitBatch(m){return m.length>R},fn:m=>P.request({body:m,fetchOptions:H}),sort:(m,y)=>m.id-y.id}),re=async m=>r?Z(m):[await P.request({body:m,fetchOptions:H})],[{error:S,result:l}]=await re(q);if(g)return {error:S,result:l};if(S)throw new Es({body:q,error:S,url:I});return l},retryCount:N,retryDelay:d,timeout:O,type:"http"},{fetchOptions:n,url:I})}}Ei();var Dy=null,hG=Co.isInMiniApp().then(e=>(Dy=e,e)).catch(()=>(Dy=false,false));async function gG(){return Dy!==null?Dy:hG}async function yG(e,t){let r=Q5(e,Ln(t));try{await Co.actions.swapToken({buyToken:r});}catch{await Co.actions.viewToken({token:r});}}async function bG(e){try{switch(e.type){case "link":await Co.actions.openUrl(e.data.url);break;case "cast":await Co.actions.viewCast({hash:e.data.hash});break;case "tweet":await Co.actions.openUrl(e.data.url);break;case "miniapp":await Co.actions.openMiniApp({url:e.data.url});break;case "token":await yG(e.data.chainId,e.data.address);break;case "farcasterProfile":await Co.actions.viewProfile({fid:Number.parseInt(e.data.fid,10)});break}}catch(t){e.type==="link"||e.type==="miniapp"||e.type==="tweet"?window.open(e.data.url,"_blank","noopener,noreferrer"):console.error("[@adland/react] Failed to perform ad action:",t);}}async function xG(e,t,r){let o=`${r}/slots/${e}?chain=${t}`;await gG()?Co.actions.openMiniApp({url:o}):window.open(o,"_blank","noopener,noreferrer");}var kO={performAdAction:bG,performEmptyAdAction:xG};var RO={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}};ur();var TO={block:$4({format(e){return {transactions:e.transactions?.map(r=>{if(typeof r=="string")return r;let o=Ti(r);return o.typeHex==="0x7e"&&(o.isSystemTx=r.isSystemTx,o.mint=r.mint?ut(r.mint):void 0,o.sourceHash=r.sourceHash,o.type="deposit"),o}),stateRoot:e.stateRoot}}}),transaction:T4({format(e){let t={};return e.type==="0x7e"&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?ut(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:P$({format(e){return {...e.depositNonce?{depositNonce:ut(e.depositNonce)}:{},...e.depositReceiptVersion?{depositReceiptVersion:vt(e.depositReceiptVersion)}:{},l1GasPrice:e.l1GasPrice?ut(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?ut(e.l1GasUsed):null,l1Fee:e.l1Fee?ut(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null}}})};Lo();En();an();Re();function vG(e,t){return _G(e)?wG(e):c8(e,t)}var $O={transaction:vG};function wG(e){EG(e);let{sourceHash:t,data:r,from:o,gas:n,isSystemTx:i,mint:s,to:a,value:c}=e,u=[t,o,a??"0x",s?mt(s):"0x",c?mt(c):"0x",n?mt(n):"0x",i?"0x1":"0x",r??"0x"];return st(["0x7e",go(u)])}function _G(e){return e.type==="deposit"||typeof e.sourceHash<"u"}function EG(e){let{from:t,to:r}=e;if(t&&!Me(t))throw new nt({address:t});if(r&&!Me(r))throw new nt({address:r})}var Bf={blockTime:2e3,contracts:RO,formatters:TO,serializers:$O};var $p=1,Op=vf({...Bf,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...Bf.contracts,disputeGameFactory:{[$p]:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{[$p]:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{[$p]:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{[$p]:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:$p});vf({...Op,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://mainnet-preconf.base.org"]}}});var Np=11155111,Pp=vf({...Bf,id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://sepolia.basescan.org",apiUrl:"https://api-sepolia.basescan.org/api"}},contracts:{...Bf.contracts,disputeGameFactory:{[Np]:{address:"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"}},l2OutputOracle:{[Np]:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{[Np]:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{[Np]:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:true,sourceId:Np});vf({...Pp,experimental_preconfirmationTime:200,rpcUrls:{default:{http:["https://sepolia-preconf.base.org"]}}});var AG=ps(["function module() view returns (address)"]),kG=ps(["function tokenURI(address slot) view returns (string)"]),RG="0x0000000000000000000000000000000000000000",TG="https://ipfs-gateway.econome.studio";function $G(e,t){return `${(t??TG).replace(/\/$/,"")}/ipfs/${e}`}var OG={[Op.id]:Op,[Pp.id]:Pp};function NO(e,t,r=OG){let o=r[e];if(!o)throw new Error(`Unsupported chain: ${e}`);return yE({chain:o,transport:bE(t)})}function NG(e){return e.startsWith("ipfs://")?e.slice(7):e.startsWith("Qm")||e.startsWith("bafy")?e:null}var PO=async(e,t)=>{if(!e)throw new Error("NO_AD");let r=NG(e),o=r?$G(r,t):e,n=await fetch(o,{method:"GET",headers:{Accept:"application/json"}});if(!n.ok)throw n.status===404?new Error("NO_AD"):new Error("ERROR");let i=await n.json();if(i.error)throw new Error(i.error);return {data:i,cid:r}},BO=async(e,t)=>{let r;try{r=await e.readContract({address:t,abi:AG,functionName:"module"});}catch(o){throw new Error(`[@adland/react] No slot found at ${t} on chain ${e.chain?.id??"unknown"}. Check the \`chainId\` prop, and any \`rpcUrl\` override \u2014 a custom RPC queries whatever chain it serves, whatever \`chainId\` says.`,{cause:o})}return !r||r===RG?"":e.readContract({address:r,abi:kG,functionName:"tokenURI",args:[t]})};var CG={link:["image","icon"],miniapp:["imageUrl","icon"],token:["logoURI"],farcasterProfile:["pfpUrl"],cast:["image","pfpUrl"],tweet:["image","pfpUrl"]};var zG=["image","imageUrl","icon","pfpUrl","logoURI"];var LG=["title","displayName","username","name","symbol"],UG=["description","bio","text","name"];function xE(e){return {...e.data,...e.metadata??{}}}function CO(e){if(!e)return null;let t=xE(e);for(let r of CG[e.type]??zG){let o=t[r];if(typeof o=="string"&&o)return o}return null}function vE(e){if(!e)return null;let t=xE(e);for(let r of LG){let o=t[r];if(typeof o=="string"&&o)return o}return null}function zO(e){if(!e)return null;let t=xE(e),r=vE(e);for(let o of UG){let n=t[o];if(typeof n=="string"&&n&&n!==r)return n}return null}function LO(e){return e?e.type:null}var oc=new Set,OO=1e3;function MG(e){return e==="view"?"view":"click"}function wE(e){return e.endpoint??sw}function UO(e,t,r){t.onEvent?.({type:e,slot:t.slot,chainId:t.chainId,cid:t.cid??null,placement:t.placement,empty:t.empty??false,auth:t.auth??"none",...r===void 0?{}:{verified:r}});}async function MO(e,t){let r=t.auth??"none",o=null;r==="farcaster"&&t.getAuthToken&&(o=await t.getAuthToken());try{fetch(`${wE(t)}/track`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:MG(e),slot:t.slot,cid:t.cid??null,domain:window.location.hostname,auth:r,...o?{token:o}:{}}),keepalive:!0}).catch(()=>{});}catch{}}async function DO(e,t){typeof window>"u"||(UO(e,t),(t.consent??"granted")==="granted"&&await MO(e,t));}async function DG(e,t,r){try{return (await fetch(`${wE(e)}/v1/event`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({nonce:t,type:"view",slot:e.slot,cid:e.cid??null,placement:e.placement,viewable_ms:r,chainId:e.chainId}),keepalive:!0})).ok}catch{return false}}async function jG(e,t,r){let o=false;return (e.consent??"granted")==="granted"&&(o=t?await DG(e,t,r):false,o||await MO("view",e)),UO("view",e,o),o}function jO(e,t){if(!e||typeof window>"u")return;let r=`impression:${t.slot}:${window.location.href}`;if(oc.has(r))return;let o=new IntersectionObserver(n=>{for(let i of n)i.isIntersecting&&!oc.has(r)&&(oc.add(r),DO("view",t),o.disconnect());},{threshold:.5});return o.observe(e),()=>o.disconnect()}function FO(e,t){if(!e||typeof window>"u")return;let r=`impression:${t.slot}:${window.location.href}`;if(oc.has(r))return;let o=fetch(`${wE(t)}/v1/serve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({slot:t.slot})}).then(s=>s.ok?s.json():null).then(s=>s?.nonce??null).catch(()=>null),n,i=new IntersectionObserver(s=>{for(let a of s)if(a.isIntersecting){if(oc.has(r)||n)continue;n=setTimeout(async()=>{if(oc.has(r))return;oc.add(r),i.disconnect();let c=await o;await jG(t,c,OO);},OO);}else n&&(clearTimeout(n),n=void 0);},{threshold:.5});return i.observe(e),()=>{i.disconnect(),n&&clearTimeout(n);}}function _E(e,t){return DO(e,t)}var FG={link:"Link",cast:"Cast",miniapp:"Mini App",token:"Token",farcasterProfile:"Profile"};function EE(e){return e.replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t])}function SE(e){return e.replace(/"/g,""").replace(/</g,"<")}var IE=`
|
|
71
72
|
:host { display: block; }
|
|
72
73
|
* { box-sizing: border-box; }
|
|
73
74
|
.adland-card {
|
|
@@ -135,7 +136,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
135
136
|
color: var(--adland-label, #9ca3af);
|
|
136
137
|
}
|
|
137
138
|
.adland-empty { justify-content: center; color: var(--adland-muted, #6b7280); }
|
|
138
|
-
`;function
|
|
139
|
+
`;function HO(e){let t=CO(e),r=vE(e),o=zO(e),n=LO(e),i=n?FG[n]??n:"";return `<div part="card" class="adland-card">${t?`<img part="media" class="adland-media" src="${SE(t)}" alt="" loading="lazy" />`:""}<div part="body" class="adland-body">${r?`<p part="title" class="adland-title">${EE(r)}</p>`:""}${o?`<p part="description" class="adland-description">${EE(o)}</p>`:""}</div>${i?`<span part="badge" class="adland-badge">${EE(i)}</span>`:""}<span part="label" class="adland-label">Ad</span></div>`}function VO(){return '<div part="card" class="adland-card adland-empty"><span part="description" class="adland-description">Your ad here</span><span part="label" class="adland-label">Ad</span></div>'}function ZO(e){if(e.type==="link"||e.type==="miniapp"){let t=e.data.url;return typeof t=="string"?t:null}return null}var HG=["--adland-bg","--adland-fg","--adland-muted","--adland-label","--adland-border","--adland-border-hover","--adland-border-width","--adland-radius","--adland-padding","--adland-gap","--adland-font","--adland-shadow-hover","--adland-media-size","--adland-media-radius","--adland-media-bg","--adland-title-size","--adland-title-weight","--adland-description-size","--adland-badge-radius","--adland-accent-bg","--adland-accent-fg"];function GO(e){let t=getComputedStyle(e),r="";for(let o of HG){let n=t.getPropertyValue(o).trim();n&&(r+=`${o}:${n};`);}return r}var qO=8453,VG="https://0xslots.org/app",ZG="68px";function WO(e){return class extends HTMLElement{static observedAttributes=["slot","chain","placement","render-mode","gateway","endpoint","rpc-url","consent","verified","base-link-url","data-ad"];shadowInited=false;cleanupImpression;messageHandler;renderToken=0;connectedCallback(){this.render();}disconnectedCallback(){this.teardown();}attributeChangedCallback(){this.isConnected&&this.render();}attr(r){return this.getAttribute(r)??void 0}chainId(){return Number(this.attr("chain")??qO)||qO}teardown(){this.cleanupImpression?.(),this.cleanupImpression=void 0,this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=void 0);}async loadAd(){let r=this.attr("data-ad");if(r)try{return {data:JSON.parse(r),cid:null}}catch{return {data:null,cid:null}}let o=this.attr("slot");if(!o)return {data:null,cid:null};let n=NO(this.chainId(),this.attr("rpc-url")),i=await BO(n,o);return i?PO(i,this.attr("gateway")):{data:null,cid:null}}async render(){let r=++this.renderToken;this.teardown(),this.style.minHeight||(this.style.minHeight=ZG);let o;try{o=await this.loadAd();}catch{o={data:null,cid:null};}if(r!==this.renderToken||!this.isConnected)return;let n=o.data?HO(o.data):VO();(this.attr("render-mode")==="inline"?"inline":"isolated")==="inline"?this.renderInline(n,o.data):this.renderIsolated(n,o.data);let s=this.attr("slot");if(s){let a=this.attr("verified")!=null?FO:jO;this.cleanupImpression=a(this,{slot:s,chainId:this.chainId(),placement:this.attr("placement"),cid:o.cid,empty:!o.data,endpoint:this.attr("endpoint"),consent:this.attr("consent")});}}renderInline(r,o){let n=this.shadowRoot??(this.shadowInited?null:this.attachShadow({mode:"open"}));if(!n)return;this.shadowInited=true,n.innerHTML=`<style>${IE}</style>${r}`,n.querySelector(".adland-card")?.addEventListener("click",()=>this.handleClick(o,false));}renderIsolated(r,o){this.replaceChildren();let n=o?ZO(o):this.emptyUrl(),i=n?`<a href="${SE(n)}" target="_blank" rel="noopener noreferrer" style="display:block;text-decoration:none;color:inherit">${r}</a>`:r,s=GO(this),a=document.createElement("iframe");a.setAttribute("sandbox","allow-popups allow-popups-to-escape-sandbox allow-scripts"),a.setAttribute("title","Advertisement"),a.setAttribute("scrolling","no"),a.style.cssText="width:100%;border:0;display:block;height:100%",a.srcdoc=`<!doctype html><html><head><meta charset="utf-8"><style>:root{${s}}html,body{margin:0;padding:0}${IE}</style></head><body>${i}<script>(function(){function send(t,x){parent.postMessage(Object.assign({__adland:t},x||{}),'*')}addEventListener('click',function(){send('click')});function size(){send('size',{height:document.documentElement.scrollHeight})}new ResizeObserver(size).observe(document.documentElement);size()})()<\/script></body></html>`;let c=u=>{if(u.source!==a.contentWindow)return;let f=u.data;f?.__adland==="size"&&typeof f.height=="number"?(a.style.height=`${f.height}px`,this.style.minHeight=""):f?.__adland==="click"&&this.handleClick(o,true);};this.messageHandler=c,window.addEventListener("message",c),this.appendChild(a);}baseLink(){return this.attr("base-link-url")??VG}emptyUrl(){let r=this.attr("slot");return r?`${this.baseLink()}/slots/${r}?chain=${this.chainId()}`:null}handleClick(r,o){let n=this.attr("slot"),i={chainId:this.chainId(),placement:this.attr("placement"),endpoint:this.attr("endpoint"),consent:this.attr("consent")};r?(n&&_E("click",{slot:n,cid:null,...i}),o||e.performAdAction(r)):n&&(_E("click-empty",{slot:n,...i}),o||e.performEmptyAdAction(n,this.chainId(),this.baseLink()));}}}function KO(e,t="adland-slot"){typeof customElements>"u"||customElements.get(t)||customElements.define(t,WO(e));}KO(kO);
|
|
139
140
|
/*! Bundled license information:
|
|
140
141
|
|
|
141
142
|
ieee754/index.js:
|