1import{a7 as j,bP as L,bQ as D,aW as H,bR as V,aU as G,aV as E,bS as W,bT as q,bU as k,aA as g,bV as X,bW as w,bX as Z,ae as f,bY as z,bZ as J,aq as Q,aj as B,aG as Y,b_ as K,b$ as v,aC as T,c0 as m,ac as tt,c1 as nt,aO as F,c2 as I,c3 as rt,c4 as _,c5 as et,c6 as st,al as C,at as p,c7 as ot,ai as ct}from"./index-CkGpd7Bb.js";import{c8 as Xn,aI as Zn,c9 as zn,ca as Jn,cb as Qn,cc as Yn,cd as Kn,ce as vn,cf as tr,cg as nr,ch as rr,ci as er,cj as sr,ck as or,cl as cr,cm as ir,cn as ar,co as fr,cp as ur,cq as lr,cr as xr,cs as _r,ct as hr,cu as dr,cv as mr,cw as pr,cx as br,cy as gr,cz as wr,cA as Br,cB as yr,cC as Er,cD as Nr,cE as $r,cF as Ar,as as Tr,cG as Fr,cH as Ir,aY as Cr,cI as Ur,cJ as Sr,cK as Or,cL as Mr,cM as Rr,cN as Pr,cO as jr,cP as Lr,cQ as Dr,cR as Hr,cS as Vr,cT as Gr,cU as Wr,cV as qr,ap as kr,cW as Xr,cX as Zr,cY as zr,cZ as Jr,c_ as Qr,c$ as Yr,d0 as Kr}from"./index-CkGpd7Bb.js";import{p as it}from"./logger-DhMgEEVc.js";import{f as te,i as ne,l as re,a as ee,n as se,b as oe,u as ce}from"./logger-DhMgEEVc.js";const at={name:"@polkadot/x-textdecoder",path:import.meta&&import.meta.url?new URL(import.meta.url).pathname.substring(0,new URL(import.meta.url).pathname.lastIndexOf("/")+1):"auto",type:"esm",version:"14.0.3"},ft={name:"@polkadot/x-textencoder",path:import.meta&&import.meta.url?new URL(import.meta.url).pathname.substring(0,new URL(import.meta.url).pathname.lastIndexOf("/")+1):"auto",type:"esm",version:"14.0.3"};j(it,null,[at,ft]);function Pt(t,n){const e=Math.ceil(t.length/n);if(e===1)return[t];const r=Array(e);for(let s=0;s<e;s++){const o=s*n;r[s]=t.slice(o,o+n)}return r}function jt(t,n=!0){return t.filter(e=>e!==void 0&&(n||e!==null))}function Lt(t){const n=t.length;if(n===0)return[];if(n===1)return t[0];let e=0;for(let o=0;o<n;o++)e+=t[o].length;const r=new Array(e);let s=-1;for(let o=0;o<n;o++){const c=t[o];for(let d=0,P=c.length;d<P;d++)r[++s]=c[d]}return r}function Dt(t,n=0){if(t<=0)throw new Error("Expected non-zero, positive number as a range size");const e=new Array(t);for(let r=0;r<t;r++)e[r]=r+n;return e}function Ht(t){const n=t.slice();let e=n.length;if(e===1)return n;for(;e!==0;){const r=~~(Math.random()*e);e--,[n[e],n[r]]=[n[r],n[e]]}return n}function Vt(t){const n=t.length,e=new Array(n),r=new Array(n);for(let s=0;s<n;s++)[e[s],r[s]]=t[s];return[e,r]}function Gt(t,n){const e=t.length,r=new Array(e);for(let s=0;s<e;s++)r[s]=[t[s],n[s]];return r}function ut(t,n){if(!t)throw new Error(L(n)?n():n)}function Wt(t,n){return ut(t!=null,n),t}function qt(t){throw new Error(`This codepath should be unreachable. Unhandled input: ${t}`)}function h(t){return(...n)=>{const e=n.length;
1if(e===0)throw new Error("Must provide one or more arguments");let r=n[0];for(let s=1;s<e;s++)t(n[s],r)&&(r=n[s]);return r}}const kt=h((t,n)=>t>n),Xt=h((t,n)=>t<n);function Zt(t){const n=D(t);if(n<H)throw new Error("square root of negative numbers is not supported");if(n<=V)return G(~~Math.sqrt(Number(n)));let e=W;for(;;){const r=n/e+e>>E;if(e===r||e===r-E)return e;e=r}}function zt(t){return q?k.Buffer.from(t||[]):new Uint8Array(t||[])}function Jt(t,{bitLength:n=32,isLe:e=!0}={}){if(n!==32&&n!==64)throw new Error("Invalid bitLength provided, expected 32 or 64");if(t.length<n/8)throw new Error(`Invalid input buffer provided, expected at least ${n/8} bytes, found ${t.length}`);const r=new DataView(t.buffer,t.byteOffset);return n===32?r.getFloat32(0,e):r.getFloat64(0,e)}function Qt(t,{isLe:n=!0,isNegative:e=!1}={}){n||(t=t.slice().reverse());const r=t.length;if(e&&r&&t[r-1]&128)switch(r){case 0:return 0;case 1:return(t[0]^255)*-1-1;case 2:return(t[0]+(t[1]<<8)^65535)*-1-1;case 3:return(t[0]+(t[1]<<8)+(t[2]<<16)^16777215)*-1-1;case 4:return(t[0]+(t[1]<<8)+(t[2]<<16)+t[3]*16777216^4294967295)*-1-1;case 5:return((t[0]+(t[1]<<8)+(t[2]<<16)+t[3]*16777216^4294967295)+(t[4]^255)*4294967296)*-1-1;case 6:return((t[0]+(t[1]<<8)+(t[2]<<16)+t[3]*16777216^4294967295)+(t[4]+(t[5]<<8)^65535)*4294967296)*-1-1;default:throw new Error("Value more than 48-bits cannot be reliably converted")}switch(r){case 0:return 0;case 1:return t[0];case 2:return t[0]+(t[1]<<8);case 3:return t[0]+(t[1]<<8)+(t[2]<<16);case 4:return t[0]+(t[1]<<8)+(t[2]<<16)+t[3]*16777216;case 5:return t[0]+(t[1]<<8)+(t[2]<<16)+(t[3]+(t[4]<<8))*16777216;case 6:return t[0]+(t[1]<<8)+(t[2]<<16)+(t[3]+(t[4]<<8)+(t[5]<<16))*16777216;default:throw new Error("Value more than 48-bits cannot be reliably converted")}}function Yt(t,{bitLength:n=-1,isLe:e=!1,isNegative:r=!1}={}){return g(X(t||0,{bitLength:n,isLe:e,isNegative:r}))}const Kt=h((t,n)=>t.gt(n)),vt=h((t,n)=>t.lt(n));function tn(t){const n=w(t);if(n.isNeg())throw new Error("square root of negative numbers is not supported");if(n.lte(Z))return new f(~~Math.sqrt(n.toNumber()));let e=z.clone();for(;;){const r=n.div(e).iadd(e).ishrn(1);if(e.eq(r)||e.eq(r.sub(J)))return e;e=r}}function nn(t,{bitLength:n=-1,isLe:e=!1,isNegative:r=!1}={}){return g(Q(t,{bitLength:n,isLe:e,isNegative:r}))}function rn(t){return new Uint8Array(t||[])}function lt(t){const n=B(t);switch(n[0]&3){case 0:return[1,new f(n[0]>>>2)];case 1:return[2,new f(n[0]+(n[1]<<8)>>>2)];case 2:return[4,new f(n[0]+(n[1]<<8)+(n[2]<<16)+n[3]*16777216>>>2)];default:{const e=(n[0]>>>2)+5;switch(e){case 5:return[5,new f(n[1]+(n[2]<<8)+(n[3]<<16)+n[4]*16777216)];case 6:return[6,new f(n[1]+(n[2]<<8)+(n[3]<<16)+(n[4]+(n[5]<<8))*16777216)];case 7:return[7,new f(n[1]+(n[2]<<8)+(n[3]<<16)+(n[4]+(n[5]<<8)+(n[6]<<16))*16777216)];default:return[e,Y(n.subarray(1,e))]}}}}function en(t){switch(t[0]&3){case 0:return[1,t[0]>>>2];case 1:return[2,t[0]+(t[1]<<8)>>>2];case 2:return[4,t[0]+(t[1]<<8)+(t[2]<<16)+t[3]*16777216>>>2];default:switch((t[0]>>>2)+5){case 5:return[5,t[1]+(t[2]<<8)+(t[3]<<16)+t[4]*16777216];case 6:return[6,t[1]+(t[2]<<8)+(t[3]<<16)+(t[4]+(t[5]<<8))*16777216];case 7:return[7,t[1]+(t[2]<<8)+(t[3]<<16)+(t[4]+(t[5]<<8)+(t[6]<<16))*16777216];default:throw new Error("Compact input is > Number.MAX_SAFE_INTEGER")}}}function sn(t){const[n,e]=lt(t),r=n+e.toNumber();return[r,t.subarray(n,r)]}const U=60*1e3,S=U*60,xt=S*24,N={days:0,hours:0,milliseconds:0,minutes:0,seconds:0};function l(t,n){return{days:(t.days||0)+n.days,hours:(t.hours||0)+n.hours,milliseconds:(t.milliseconds||0)+n.milliseconds,minutes:(t.minutes||0)+n.minutes,seconds:(t.seconds||0)+n.seconds}}function _t(t){const n=t/1e3;if(n<60){const o=~~n;return l({seconds:o},x(t-o*1e3))}const e=n/60;if(e<60){const o=~~e;return l({minutes:o},x(t-o*U))}const r=e/60;if(r<24){const o=~~r;return l({hours:o},x(t-o*S))}const s=~~(r/24);return l({days:s},x(t-s*xt))}function x(t){return t?t<1e3?l({milliseconds:t},N):_t(t):N}function on(t=0,{bitLength:n=32,isLe:e=!0}={}){if(n!==32&&n!==64)throw new Error("Invalid bitLength provided, expected 32 or 64");
1const r=new Uint8Array(n/8),s=new DataView(r.buffer,r.byteOffset);return n===32?s.setFloat32(0,Number(t),e):s.setFloat64(0,Number(t),e),r}function ht(t){return t<15?`${t.toFixed(1)}s`:t<60?`${t|0}s`:t<3600?`${t/60|0}m`:`${t/3600|0}h`}function cn(t,n){const e=t?.getTime()||0,r=n instanceof Date?n.getTime():w(n).toNumber();return e&&r?ht(Math.max(Math.abs(e-r),0)/1e3):"0.0s"}function an(t,{locale:n="en"}={}){const{thousand:e}=v(n);return K(w(t).toString(),e)}function dt(t){return!!t&&T(t,-1)}function mt(t){return t&&dt(t)?t:`0x${t&&t.length%2===1?"0":""}${t||""}`}function pt(t,n=-1,e=!1){const r=Math.ceil(n/4),s=r+2;return mt(n===-1||t.length===s||!e&&t.length<s?m(t):t.length>s?m(t).slice(-1*r):`${"0".repeat(r)}${m(t)}`.slice(-1*r))}function fn(t){return t?tt(t).toNumber():NaN}function un(t){return nt(F(t))}function ln(t){return Array.isArray(t)}function bt(t){for(let n=0,e=t.length;n<e;n++){const r=t.charCodeAt(n);if(r<32||r>126)return!1}return!0}function $(t){for(let n=0,e=t.length;n<e;n++){const r=t[n]|0;if(r<32||r>126)return!1}return!0}function xn(t){return I(t)?T(t)?$(B(t)):bt(t):t?$(t):!1}const A=rt("isPrototypeOf","hasOwnProperty");function _n(t,n){return A(n)&&A(t)?t===n||t.isPrototypeOf(n):!1}const gt=_("toHex","toHuman","toU8a"),wt=_("get");function hn(t){return gt(t)&&wt(t.registry)}const dn=_("toBigInt","toBn","toNumber","unwrap");function mn(t){return(t&&t.constructor)===Error||t instanceof Error}function pn(t,n){return(t&&t.constructor)===n||t instanceof n}const a="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",i="[a-fA-F\\d]{1,4}",O=` 2(?: 3(?:${i}:){7}(?:${i}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8 4(?:${i}:){6}(?:${a}|:${i}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4 5(?:${i}:){5}(?::${a}|(?::${i}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4 6(?:${i}:){4}(?:(?::${i}){0,1}:${a}|(?::${i}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4 7(?:${i}:){3}(?:(?::${i}){0,2}:${a}|(?::${i}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4 8(?:${i}:){2}(?:(?::${i}){0,3}:${a}|(?::${i}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4 9(?:${i}:){1}(?:(?::${i}){0,4}:${a}|(?::${i}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4 10(?::(?:(?::${i}){0,5}:${a}|(?::${i}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4 11)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1 12`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),Bt=new RegExp(`(?:^${a}$)|(?:^${O}$)`),yt=new RegExp(`^${a}$`),Et=new RegExp(`^${O}$`);function bn(t,n){switch(n){case"v4":return yt.test(t);case"v6":return Et.test(t);default:return Bt.test(t)}}function Nt(t,n){return et(n)?n.toString():n}function b(t,n){return JSON.stringify(t,Nt,n)}function gn(t){const n=typeof t!="string"?b(t):t;try{const e=JSON.parse(n);return typeof e=="object"&&e!==null}catch{return!1}}function wn(t){return t===null}const Bn=st("next"),yn=_("catch","then"),$t=new Uint8Array([127,69,76,70]),At=new Uint8Array([80,86,77,0]);function En(t){if(C(t)){const n=t.subarray(0,4);return p(n,At)||p(n,$t)}return!1}const Tt=/(Development|Local Testnet)$/;function Nn(t){return t?!!Tt.test(t.toString()):!1}function $n(t){if(!t)return I(t);const n=B(t),e=n.length;let r=0;for(;r<e;)if(n[r]<=127)r+=1;else if(n[r]>=194&&n[r]<=223){if(r+1<e){if(n[r+1]<128||n[r+1]>191)return!1}else return!1;r+=2}else if(n[r]===224){if(r+2<e){if(n[r+1]<160||n[r+1]>191||n[r+2]<128||n[r+2]>191)return!1}else return!1;r+=3}else if(n[r]>=225&&n[r]<=236){if(r+2<e){if(n[r+1]<128||n[r+1]>191||n[r+2]<128||n[r+2]>191)return!1}else return!1;r+=3}else if(n[r]===237){if(r+2<e){if(n[r+1]<128||n[r+1]>159||n[r+2]<128||n[r+2]>191)return!1}else return!1;r+=3}else if(n[r]>=238&&n[r]<=239){if(r+2<e){if(n[r+1]<128||n[r+1]>191||n[r+2]<128||n[r+2]>191)return!1}else return!1;r+=3}else if(n[r]===240){if(r+3<e){if(n[r+1]<144||n[r+1]>191||n[r+2]<128||n[r+2]>191||n[r+3]<128||n[r+3]>191)return!1}else return!1;r+=4}else if(n[r]>=241&&n[r]<=243){if(r+3<e){if(n[r+1]<128||n[r+1]>191||n[r+2]<128||n[r+2]>191||n[r+3]<128||n[r+3]>191)return!1}else return!1;r+=4}else if(n[r]===244){if(r+3<e){if(n[r+1]<128||n[r+1]>143||n[r+2]<128||n[r+2]>191||n[r+3]<128||n[r+3]>191)return!1}else return!1;r+=4}else return!1;return!0}const Ft=new Uint8Array([0,97,115,109]);function An(t){return C(t)&&p(t.subarray(0,4),Ft)}function It(t,n,e,r,s=0){const o=r?r(n,s):n.toString();let c;Object.defineProperty(t,o,{configurable:!0,enumerable:!0,get:function(){if(c===void 0){c=e(n,s,this);try{Object.defineProperty(this,o,{value:c})}catch{}}return c}})}function Tn(t,n,e,r){for(let s=0,o=n.length;s<o;s++)It(t,n[s],e,r,s);return t}function Ct(){return"none"}function Fn(t,{getInstanceId:n=Ct}={}){const e={},r=(...s)=>{const o=b(s),c=n();return e[c]||(e[c]={}),e[c][o]===void 0&&(e[c][o]=t(...s)),e[c][o]};return r.unmemoize=(...s)=>{const o=b(s),c=n();e[c]?.[o]!==void 0&&delete e[c][o]},r}function In(t,n){setTimeout(()=>{Promise.resolve().then(()=>{t()}).catch(e=>{n?n(e):console.error(e)})},0)}function Ut(t,n=-1){const e=(!t||Number.isNaN(t)?0:t).toString(16);return pt(e.length%2?`0${e}`:e,n,!0)}function Cn(t,n=-1){return F(Ut(t,n))}function Un(t){const n=Object.keys(t);for(let e=0,r=n.length;e<r;e++)delete t[n[e]];return t}function Sn(t){return ot({},t)}function On(t){return Object.entries(t)}function Mn(t){return Object.keys(t)}function St(t,n,e,r,s=0){const o=r?r(n,s):n;o in t||Object.defineProperty(t,o,{enumerable:!0,get:function(){return e(n,s,this)}})}function Rn(t,n,e,r){for(let s=0,o=n.length;s<o;s++)St(t,n[s],e,r,s)}function Pn(t){return Object.values(t)}function jn(t,n,...e){return new Promise((r,s)=>{n.apply(t,e.concat((o,c)=>{o?s(o):r(c)}))})}const u=new Array(256),y=new Array(256);for(let t=0,n=u.length;t<n;t++)y[t]=String.fromCharCode(t).toLowerCase(),u[t]=String.fromCharCode(t).toUpperCase();function Ot(t){return t.slice(0,t.length-1).toLowerCase()+u[t.charCodeAt(t.length-1)]}function M(t){return n=>{const e=n.replace(/[-_., ]+/g," ").trim().split(" ");let r="";for(let s=0,o=e.length;s<o;s++){const c=e[s];r+=t(/^[\dA-Z]+$/.test(c)?c.toLowerCase():c.replace(/^[\dA-Z]{2,}[^a-z]/,Ot),s)}return r}}const Ln=M((t,n)=>(n?u[t.charCodeAt(0)]:y[t.charCodeAt(0)])+t.slice(1)),Dn=M(t=>u[t.charCodeAt(0)]+t.slice(1));function R(t){return n=>
12n?t[n.charCodeAt(0)]+n.slice(1):""}const Hn=R(y),Vn=R(u);function Gn(t,n=6){return t.length<=2+2*n?t.toString():`${t.substring(0,n)}â¦${t.slice(-n)}`}function Wn(t){return g(ct(t))}export{f as BN,Xn as BN_BILLION,Zn as BN_EIGHT,zn as BN_FIVE,Jn as BN_FOUR,Qn as BN_HUNDRED,Z as BN_MAX_INTEGER,Yn as BN_MILLION,Kn as BN_NINE,J as BN_ONE,vn as BN_QUINTILL,tr as BN_SEVEN,nr as BN_SIX,z as BN_SQRT_MAX_INTEGER,rr as BN_TEN,er as BN_THOUSAND,sr as BN_THREE,or as BN_TWO,cr as BN_ZERO,ir as POLKADOTJS_DISABLE_ESM_CJS_WARNING_FLAG,ar as U8A_WRAP_ETHEREUM,fr as U8A_WRAP_POSTFIX,ur as U8A_WRAP_PREFIX,H as _0n,lr as _1000n,xr as _100n,_r as _10n,hr as _1Bn,dr as _1Mn,mr as _1Qn,E as _1n,pr as _2n,V as _2pow53n,br as _3n,gr as _4n,wr as _5n,Br as _6n,yr as _7n,Er as _8n,Nr as _9n,W as _sqrt2pow53n,Pt as arrayChunk,jt as arrayFilter,Lt as arrayFlatten,Dt as arrayRange,Ht as arrayShuffle,Vt as arrayUnzip,Gt as arrayZip,ut as assert,Wt as assertReturn,qt as assertUnreachable,tt as bnFromHex,Kt as bnMax,vt as bnMin,tn as bnSqrt,w as bnToBn,nn as bnToHex,Q as bnToU8a,rn as bufferToU8a,$r as calcSi,Ar as compactAddLength,lt as compactFromU8a,en as compactFromU8aLim,sn as compactStripLength,Tr as compactToU8a,j as detectPackage,x as extractTime,Fr as findSi,on as floatToU8a,Ir as formatBalance,te as formatDate,K as formatDecimal,cn as formatElapsed,an as formatNumber,Cr as hasBigInt,q as hasBuffer,Ur as hasCjs,Sr as hasDirname,Or as hasEsm,Mr as hasProcess,Rr as hasWasm,mt as hexAddPrefix,pt as hexFixLength,dt as hexHasPrefix,m as hexStripPrefix,Pr as hexToBigInt,tt as hexToBn,fn as hexToNumber,un as hexToString,F as hexToU8a,ne as identity,ln as isArray,xn as isAscii,et as isBigInt,jr as isBn,Lr as isBoolean,Dr as isBuffer,_n as isChildClass,A as isClass,hn as isCodec,dn as isCompact,mn as isError,L as isFunction,T as isHex,pn as isInstanceOf,bn as isIp,gn as isJsonObject,wn as isNull,Hr as isNumber,Vr as isObject,Bn as isObservable,yn as isPromise,En as isRiscV,I as isString,Nn as isTestChain,Gr as isToBigInt,Wr as isToBn,C as isU8a,qr as isUndefined,$n as isUtf8,An as isWasm,It as lazyMethod,Tn as lazyMethods,re as logger,ee as loggerFormat,Fn as memoize,kt as nM
12ax,Xt as nMin,Zt as nSqrt,D as nToBigInt,Yt as nToHex,X as nToU8a,In as nextTick,se as noop,Ut as numberToHex,Cn as numberToU8a,Un as objectClear,Sn as objectCopy,On as objectEntries,Mn as objectKeys,Rn as objectProperties,St as objectProperty,ot as objectSpread,Pn as objectValues,it as packageInfo,jn as promisify,Ln as stringCamelCase,Hn as stringLowerFirst,Dn as stringPascalCase,Gn as stringShorten,Wn as stringToHex,ct as stringToU8a,Vn as stringUpperFirst,b as stringify,oe as u8aCmp,kr as u8aConcat,Xr as u8aConcatStrict,Zr as u8aEmpty,p as u8aEq,zr as u8aFixLength,Jr as u8aIsWrapped,ce as u8aSorted,Qr as u8aToBigInt,Y as u8aToBn,zt as u8aToBuffer,Jt as u8aToFloat,g as u8aToHex,Qt as u8aToNumber,nt as u8aToString,B as u8aToU8a,Yr as u8aUnwrapBytes,Kr as u8aWrapBytes};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.