wowok_agent 0.1.27 → 0.1.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/224.8c7bb16af6ae47714aa6.js +1 -0
- package/dist/336.4cb28633dc9218b49b85.js +1 -0
- package/dist/362.cdfb0b5c3d412961e0c0.js +1 -0
- package/dist/44.d4b76589f2a4654ef01b.js +1 -0
- package/dist/{876.6686711b89306b3504ac.js → 551.2402d9b3ed0665707ca8.js} +1 -1
- package/dist/575.b942536e501c82b2cda8.js +2 -0
- package/dist/575.b942536e501c82b2cda8.js.LICENSE.txt +1 -0
- package/dist/596.6c8ebd4c514cbdfa2a34.js +1 -0
- package/dist/640.3f4f1cf1d0c2aa400891.js +1 -0
- package/dist/647.be875595c33c3b69f28b.js +1 -0
- package/dist/754.08615c9ea559d8e0f3c1.js +1 -0
- package/dist/982.04b0b44954a391ce9dc8.js +1 -0
- package/dist/account.d.ts +37 -0
- package/dist/account.d.ts.map +1 -0
- package/dist/account.js +273 -0
- package/dist/account.js.map +1 -0
- package/dist/cache.d.ts +46 -0
- package/dist/cache.d.ts.map +1 -0
- package/dist/cache.js +61 -0
- package/dist/cache.js.map +1 -0
- package/dist/call/arbitration.d.ts +69 -0
- package/dist/call/arbitration.d.ts.map +1 -0
- package/dist/call/arbitration.js +186 -0
- package/dist/call/arbitration.js.map +1 -0
- package/dist/call/base.d.ts +32 -0
- package/dist/call/base.d.ts.map +1 -0
- package/dist/call/base.js +129 -0
- package/dist/call/base.js.map +1 -0
- package/dist/call/demand.d.ts +55 -0
- package/dist/call/demand.d.ts.map +1 -0
- package/dist/call/demand.js +135 -0
- package/dist/call/demand.js.map +1 -0
- package/dist/call/guard.d.ts +42 -0
- package/dist/call/guard.d.ts.map +1 -0
- package/dist/call/guard.js +253 -0
- package/dist/call/guard.js.map +1 -0
- package/dist/call/machine.d.ts +109 -0
- package/dist/call/machine.d.ts.map +1 -0
- package/dist/call/machine.js +213 -0
- package/dist/call/machine.js.map +1 -0
- package/dist/call/object_permission.d.ts +13 -0
- package/dist/call/object_permission.d.ts.map +1 -0
- package/dist/call/object_permission.js +49 -0
- package/dist/call/object_permission.js.map +1 -0
- package/dist/call/permission.d.ts +49 -0
- package/dist/call/permission.d.ts.map +1 -0
- package/dist/call/permission.js +98 -0
- package/dist/call/permission.js.map +1 -0
- package/dist/call/personal.d.ts +42 -0
- package/dist/call/personal.d.ts.map +1 -0
- package/dist/call/personal.js +60 -0
- package/dist/call/personal.js.map +1 -0
- package/dist/call/repository.d.ts +52 -0
- package/dist/call/repository.d.ts.map +1 -0
- package/dist/call/repository.js +125 -0
- package/dist/call/repository.js.map +1 -0
- package/dist/call/service.d.ts +134 -0
- package/dist/call/service.d.ts.map +1 -0
- package/dist/call/service.js +340 -0
- package/dist/call/service.js.map +1 -0
- package/dist/call/treasury.d.ts +53 -0
- package/dist/call/treasury.d.ts.map +1 -0
- package/dist/call/treasury.js +161 -0
- package/dist/call/treasury.js.map +1 -0
- package/dist/call.d.ts +86 -0
- package/dist/call.d.ts.map +1 -0
- package/dist/call.js +153 -0
- package/dist/call.js.map +1 -0
- package/dist/events.d.ts +63 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +78 -0
- package/dist/events.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/main-0711d318.4e221b93fc57efdd1b61.js +1 -0
- package/dist/main-1452f717.34be30a10e23702025f7.js +1 -0
- package/dist/main-15378d78.5f4ccc2dfd8d2791e9fa.js +1 -0
- package/dist/main-1b43c5c7.cce1d8be7a794cf60240.js +1 -0
- package/dist/main-2c18dc4b.f9b2329ac7ae04a1d6cf.js +1 -0
- package/dist/main-43dd7041.8a5063bbd73a527bcbdb.js +1 -0
- package/dist/main-939e5c9d.8300452a84a790771a4c.js +1 -0
- package/dist/main-9aa9c523.396748dc5e9a97671d27.js +1 -0
- package/dist/main-a6439106.ee206d583e017867e658.js +1 -0
- package/dist/main-ba7df65e.3144adf6db4d01021234.js +1 -0
- package/dist/main-e25e1b58.6b1d824c5efc6ffa50a8.js +1 -0
- package/dist/main-eaf887a5.daca2cbb896798678367.js +1 -0
- package/dist/node_modules/wowok/src/arbitration.d.ts +2 -2
- package/dist/node_modules/wowok/src/arbitration.d.ts.map +1 -1
- package/dist/node_modules/wowok/src/index.d.ts.map +1 -1
- package/dist/node_modules/wowok/src/passport.d.ts +3 -3
- package/dist/node_modules/wowok/src/passport.d.ts.map +1 -1
- package/dist/node_modules/wowok/src/progress.d.ts +2 -1
- package/dist/node_modules/wowok/src/progress.d.ts.map +1 -1
- package/dist/node_modules/wowok/src/service.d.ts +1 -1
- package/dist/node_modules/wowok/src/service.d.ts.map +1 -1
- package/dist/node_modules/wowok/src/treasury.d.ts +2 -2
- package/dist/node_modules/wowok/src/treasury.d.ts.map +1 -1
- package/dist/node_modules/wowok/src/utils.d.ts +0 -1
- package/dist/node_modules/wowok/src/utils.d.ts.map +1 -1
- package/dist/objects.d.ts +341 -0
- package/dist/objects.d.ts.map +1 -0
- package/dist/objects.js +446 -0
- package/dist/objects.js.map +1 -0
- package/dist/permission.d.ts +12 -0
- package/dist/permission.d.ts.map +1 -0
- package/dist/permission.js +41 -0
- package/dist/permission.js.map +1 -0
- package/dist/private_info.d.ts +26 -0
- package/dist/private_info.d.ts.map +1 -0
- package/dist/private_info.js +243 -0
- package/dist/private_info.js.map +1 -0
- package/dist/src/call/arbitration.d.ts +3 -3
- package/dist/src/call/arbitration.d.ts.map +1 -1
- package/dist/src/call/demand.d.ts +2 -2
- package/dist/src/call/demand.d.ts.map +1 -1
- package/dist/src/call/guard.d.ts +2 -2
- package/dist/src/call/guard.d.ts.map +1 -1
- package/dist/src/call/guard.js +2 -2
- package/dist/src/call/machine.d.ts +3 -3
- package/dist/src/call/machine.d.ts.map +1 -1
- package/dist/src/call/permission.d.ts +1 -1
- package/dist/src/call/permission.d.ts.map +1 -1
- package/dist/src/call/personal.d.ts +3 -3
- package/dist/src/call/personal.d.ts.map +1 -1
- package/dist/src/call/repository.d.ts +2 -2
- package/dist/src/call/repository.d.ts.map +1 -1
- package/dist/src/call/service.d.ts +4 -4
- package/dist/src/call/service.d.ts.map +1 -1
- package/dist/src/call/service.js +1 -1
- package/dist/src/call/treasury.d.ts +3 -3
- package/dist/src/call/treasury.d.ts.map +1 -1
- package/dist/src/events.d.ts +4 -2
- package/dist/src/events.d.ts.map +1 -1
- package/dist/src/events.js +74 -71
- package/dist/src/objects.d.ts +9 -46
- package/dist/src/objects.d.ts.map +1 -1
- package/dist/src/objects.js +21 -24
- package/package.json +4 -4
- package/src/call/arbitration.ts +4 -5
- package/src/call/base.ts +3 -3
- package/src/call/demand.ts +3 -3
- package/src/call/guard.ts +1 -1
- package/src/call/machine.ts +2 -2
- package/src/call/object_permission.ts +2 -2
- package/src/call/permission.ts +1 -1
- package/src/call/personal.ts +2 -3
- package/src/call/repository.ts +4 -5
- package/src/call/service.ts +3 -3
- package/src/call/treasury.ts +3 -3
- package/src/call.ts +11 -11
- package/src/index.ts +17 -17
- package/src/objects.ts +3 -8
- package/tsconfig.json +32 -114
- package/tsconfig.tsbuildinfo +1 -0
- package/webpack.config.cjs +1 -1
- package/dist/116.143ccb3963629d460167.js +0 -1
- package/dist/245.212d2f747275b2255780.js +0 -2
- package/dist/245.212d2f747275b2255780.js.LICENSE.txt +0 -1
- package/dist/253.7486a99ee6e1e35ac0e1.js +0 -1
- package/dist/305.894df2331b217081d9dc.js +0 -1
- package/dist/316.ec2e72ece285ad84ab7e.js +0 -1
- package/dist/319.919a5dbe6a398ed74294.js +0 -1
- package/dist/392.ca02be3e183af55f305f.js +0 -1
- package/dist/412.5d60fef2134594b1fa9b.js +0 -1
- package/dist/495.8e5bfa40adbde5bee4fe.js +0 -1
- package/dist/57.f28a91a8d8cd7f88eafb.js +0 -2
- package/dist/57.f28a91a8d8cd7f88eafb.js.LICENSE.txt +0 -1
- package/dist/606.ecbe2de3a45dcb73e156.js +0 -2
- package/dist/606.ecbe2de3a45dcb73e156.js.LICENSE.txt +0 -1
- package/dist/634.847e1587e6bfe2ab33c0.js +0 -1
- package/dist/701.a9a898661eb3725f5454.js +0 -1
- package/dist/875.9434acc7fd4f749ca311.js +0 -1
- package/dist/main-255474c8.27fa317a378d0e8d0bd1.js +0 -1
- package/dist/main-31743c5a.e9b6e44d9779af2fdbe5.js +0 -1
- package/dist/main-84781932.65e124c7a88d7814a577.js +0 -1
- package/dist/main-d91a9049.51cc65fa9965ca9d0e0a.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(this.webpackChunkwowok_agent=this.webpackChunkwowok_agent||[]).push([[224],{2330:(e,n,i)=>{"use strict";function t(e){return 9===e||32===e}i.d(n,{y:()=>I});const a=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function r(e){return o[e.charCodeAt(0)]}const o=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"];function l(e,n){if(!Boolean(e))throw new Error(n)}const u=10,s=2;function c(e,n){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,n){if(null===e)return"null";if(n.includes(e))return"[Circular]";const i=[...n,e];if(function(e){return"function"==typeof e.toJSON}(e)){const n=e.toJSON();if(n!==e)return"string"==typeof n?n:c(n,i)}else if(Array.isArray(e))return function(e,n){if(0===e.length)return"[]";if(n.length>s)return"[Array]";const i=Math.min(u,e.length),t=e.length-i,a=[];for(let t=0;t<i;++t)a.push(c(e[t],n));return 1===t?a.push("... 1 more item"):t>1&&a.push(`... ${t} more items`),"["+a.join(", ")+"]"}(e,i);return function(e,n){const i=Object.entries(e);if(0===i.length)return"{}";if(n.length>s)return"["+function(e){const n=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===n&&"function"==typeof e.constructor){const n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return n}(e)+"]";const t=i.map((([e,i])=>e+": "+c(i,n)));return"{ "+t.join(", ")+" }"}(e,i)}(e,n);default:return String(e)}}Symbol.toStringTag,Symbol.toStringTag;const f={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},d=new Set(Object.keys(f));function p(e){const n=null==e?void 0:e.kind;return"string"==typeof n&&d.has(n)}var v,E,T;!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(v||(v={})),(T=E||(E={})).NAME="Name",T.DOCUMENT="Document",T.OPERATION_DEFINITION="OperationDefinition",T.VARIABLE_DEFINITION="VariableDefinition",T.SELECTION_SET="SelectionSet",T.FIELD="Field",T.ARGUMENT="Argument",T.FRAGMENT_SPREAD="FragmentSpread",T.INLINE_FRAGMENT="InlineFragment",T.FRAGMENT_DEFINITION="FragmentDefinition",T.VARIABLE="Variable",T.INT="IntValue",T.FLOAT="FloatValue",T.STRING="StringValue",T.BOOLEAN="BooleanValue",T.NULL="NullValue",T.ENUM="EnumValue",T.LIST="ListValue",T.OBJECT="ObjectValue",T.OBJECT_FIELD="ObjectField",T.DIRECTIVE="Directive",T.NAMED_TYPE="NamedType",T.LIST_TYPE="ListType",T.NON_NULL_TYPE="NonNullType",T.SCHEMA_DEFINITION="SchemaDefinition",T.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",T.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",T.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",T.FIELD_DEFINITION="FieldDefinition",T.INPUT_VALUE_DEFINITION="InputValueDefinition",T.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",T.UNION_TYPE_DEFINITION="UnionTypeDefinition",T.ENUM_TYPE_DEFINITION="EnumTypeDefinition",T.ENUM_VALUE_DEFINITION="EnumValueDefinition",T.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",T.DIRECTIVE_DEFINITION="DirectiveDefinition",T.SCHEMA_EXTENSION="SchemaExtension",T.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",T.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",T.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",T.UNION_TYPE_EXTENSION="UnionTypeExtension",T.ENUM_TYPE_EXTENSION="EnumTypeExtension",T.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension";const m=Object.freeze({});function y(e,n){const i=e[n];return"object"==typeof i?i:"function"==typeof i?{enter:i,leave:void 0}:{enter:e.enter,leave:e.leave}}function I(e){return function(e,n,i=f){const t=new Map;for(const e of Object.values(E))t.set(e,y(n,e));let a,r,o,u=Array.isArray(e),s=[e],d=-1,v=[],T=e;const I=[],N=[];do{d++;const e=d===s.length,f=e&&0!==v.length;if(e){if(r=0===N.length?void 0:I[I.length-1],T=o,o=N.pop(),f)if(u){T=T.slice();let e=0;for(const[n,i]of v){const t=n-e;null===i?(T.splice(t,1),e++):T[t]=i}}else{T=Object.defineProperties({},Object.getOwnPropertyDescriptors(T));for(const[e,n]of v)T[e]=n}d=a.index,s=a.keys,v=a.edits,u=a.inArray,a=a.prev}else if(o){if(r=u?d:s[d],T=o[r],null==T)continue;I.push(r)}let E;if(!Array.isArray(T)){var D,O;p(T)||l(!1,`Invalid AST Node: ${g=T,c(g,[])}.`);const i=e?null===(D=t.get(T.kind))||void 0===D?void 0:D.leave:null===(O=t.get(T.kind))||void 0===O?void 0:O.enter;if(E=null==i?void 0:i.call(n,T,r,o,I,N),E===m)break;if(!1===E){if(!e){I.pop();continue}}else if(void 0!==E&&(v.push([r,E]),!e)){if(!p(E)){I.pop();continue}T=E}}var S;void 0===E&&f&&v.push([r,T]),e?I.pop():(a={inArray:u,index:d,keys:s,edits:v,prev:a},u=Array.isArray(T),s=u?T:null!==(S=i[T.kind])&&void 0!==S?S:[],d=-1,v=[],o&&N.push(o),o=T)}while(void 0!==a);var g;return 0!==v.length?v[v.length-1][1]:e}(e,N)}const N={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>D(e.definitions,"\n\n")},OperationDefinition:{leave(e){const n=S("(",D(e.variableDefinitions,", "),")"),i=D([e.operation,D([e.name,n]),D(e.directives," ")]," ");return("query"===i?"":i+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:n,defaultValue:i,directives:t})=>e+": "+n+S(" = ",i)+S(" ",D(t," "))},SelectionSet:{leave:({selections:e})=>O(e)},Field:{leave({alias:e,name:n,arguments:i,directives:t,selectionSet:a}){const r=S("",e,": ")+n;let o=r+S("(",D(i,", "),")");return o.length>80&&(o=r+S("(\n",g(D(i,"\n")),"\n)")),D([o,D(t," "),a]," ")}},Argument:{leave:({name:e,value:n})=>e+": "+n},FragmentSpread:{leave:({name:e,directives:n})=>"..."+e+S(" ",D(n," "))},InlineFragment:{leave:({typeCondition:e,directives:n,selectionSet:i})=>D(["...",S("on ",e),D(n," "),i]," ")},FragmentDefinition:{leave:({name:e,typeCondition:n,variableDefinitions:i,directives:t,selectionSet:a})=>`fragment ${e}${S("(",D(i,", "),")")} on ${n} ${S("",D(t," ")," ")}`+a},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:n})=>n?function(e){const n=e.replace(/"""/g,'\\"""'),i=n.split(/\r\n|[\n\r]/g),a=1===i.length,r=i.length>1&&i.slice(1).every((e=>0===e.length||t(e.charCodeAt(0)))),o=n.endsWith('\\"""'),l=e.endsWith('"')&&!o,u=e.endsWith("\\"),s=l||u,c=!a||e.length>70||s||r||o;let f="";const d=a&&t(e.charCodeAt(0));return(c&&!d||r)&&(f+="\n"),f+=n,(c||s)&&(f+="\n"),'"""'+f+'"""'}(e):`"${e.replace(a,r)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+D(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+D(e,", ")+"}"},ObjectField:{leave:({name:e,value:n})=>e+": "+n},Directive:{leave:({name:e,arguments:n})=>"@"+e+S("(",D(n,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:n,operationTypes:i})=>S("",e,"\n")+D(["schema",D(n," "),O(i)]," ")},OperationTypeDefinition:{leave:({operation:e,type:n})=>e+": "+n},ScalarTypeDefinition:{leave:({description:e,name:n,directives:i})=>S("",e,"\n")+D(["scalar",n,D(i," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:n,interfaces:i,directives:t,fields:a})=>S("",e,"\n")+D(["type",n,S("implements ",D(i," & ")),D(t," "),O(a)]," ")},FieldDefinition:{leave:({description:e,name:n,arguments:i,type:t,directives:a})=>S("",e,"\n")+n+(b(i)?S("(\n",g(D(i,"\n")),"\n)"):S("(",D(i,", "),")"))+": "+t+S(" ",D(a," "))},InputValueDefinition:{leave:({description:e,name:n,type:i,defaultValue:t,directives:a})=>S("",e,"\n")+D([n+": "+i,S("= ",t),D(a," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:n,interfaces:i,directives:t,fields:a})=>S("",e,"\n")+D(["interface",n,S("implements ",D(i," & ")),D(t," "),O(a)]," ")},UnionTypeDefinition:{leave:({description:e,name:n,directives:i,types:t})=>S("",e,"\n")+D(["union",n,D(i," "),S("= ",D(t," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:n,directives:i,values:t})=>S("",e,"\n")+D(["enum",n,D(i," "),O(t)]," ")},EnumValueDefinition:{leave:({description:e,name:n,directives:i})=>S("",e,"\n")+D([n,D(i," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:n,directives:i,fields:t})=>S("",e,"\n")+D(["input",n,D(i," "),O(t)]," ")},DirectiveDefinition:{leave:({description:e,name:n,arguments:i,repeatable:t,locations:a})=>S("",e,"\n")+"directive @"+n+(b(i)?S("(\n",g(D(i,"\n")),"\n)"):S("(",D(i,", "),")"))+(t?" repeatable":"")+" on "+D(a," | ")},SchemaExtension:{leave:({directives:e,operationTypes:n})=>D(["extend schema",D(e," "),O(n)]," ")},ScalarTypeExtension:{leave:({name:e,directives:n})=>D(["extend scalar",e,D(n," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:n,directives:i,fields:t})=>D(["extend type",e,S("implements ",D(n," & ")),D(i," "),O(t)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:n,directives:i,fields:t})=>D(["extend interface",e,S("implements ",D(n," & ")),D(i," "),O(t)]," ")},UnionTypeExtension:{leave:({name:e,directives:n,types:i})=>D(["extend union",e,D(n," "),S("= ",D(i," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:n,values:i})=>D(["extend enum",e,D(n," "),O(i)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:n,fields:i})=>D(["extend input",e,D(n," "),O(i)]," ")}};function D(e,n=""){var i;return null!==(i=null==e?void 0:e.filter((e=>e)).join(n))&&void 0!==i?i:""}function O(e){return S("{\n",g(D(e,"\n")),"\n}")}function S(e,n,i=""){return null!=n&&""!==n?e+n+i:""}function g(e){return S(" ",e.replace(/\n/g,"\n "))}function b(e){var n;return null!==(n=null==e?void 0:e.some((e=>e.includes("\n"))))&&void 0!==n&&n}},3447:(e,n,i)=>{"use strict";i.d(n,{Se:()=>o});var t=i(9297),a=0,r=new Set;function o(){function e(e,n){var i,o,l=(0,t.qg)(e).definitions,u=new Set;for(var s of n||[])for(var c of s.definitions)c.kind!==t.b8.FRAGMENT_DEFINITION||u.has(c)||(l.push(c),u.add(c));return(i=l[0].kind===t.b8.FRAGMENT_DEFINITION)&&l[0].directives&&(l[0].directives=l[0].directives.filter((e=>"_unmask"!==e.name.value))),{kind:t.b8.DOCUMENT,definitions:l,get loc(){if(!o&&i){var t=e+function(e){try{a++;var n="";for(var i of e)if(!r.has(i)){r.add(i);var{loc:t}=i;t&&(n+=t.source.body)}return n}finally{0==--a&&r.clear()}}(n||[]);return{start:0,end:t.length,source:{body:t,name:"GraphQLTada",locationOffset:{line:1,column:1}}}}return o},set loc(e){o=e}}}return e.scalar=function(e,n){return n},e.persisted=function(e,n){return{kind:t.b8.DOCUMENT,definitions:n?n.definitions:[],documentId:e}},e}o()},9725:(e,n,i)=>{const t=i(22);e.exports=t("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(this.webpackChunkwowok_agent=this.webpackChunkwowok_agent||[]).push([[336],{5089:(e,t,n)=>{n.d(t,{UG:()=>s});const s=(0,n(3447).Se)()},5260:(e,t,n)=>{n.d(t,{G:()=>i});var s=n(4480),r=n(3154);const i={Pure:function(e){return{$kind:"Pure",Pure:{bytes:e instanceof Uint8Array?(0,s.o)(e):e.toBase64()}}},ObjectRef:({objectId:e,digest:t,version:n})=>({$kind:"Object",Object:{$kind:"ImmOrOwnedObject",ImmOrOwnedObject:{digest:t,version:n,objectId:(0,r.t4)(e)}}}),SharedObjectRef:({objectId:e,mutable:t,initialSharedVersion:n})=>({$kind:"Object",Object:{$kind:"SharedObject",SharedObject:{mutable:t,initialSharedVersion:n,objectId:(0,r.t4)(e)}}}),ReceivingRef:({objectId:e,digest:t,version:n})=>({$kind:"Object",Object:{$kind:"Receiving",Receiving:{digest:t,version:n,objectId:(0,r.t4)(e)}}})}},5990:(e,t,n)=>{n.d(t,{Z:()=>z,b:()=>U});var s=n(4480),r=n(5501),i=n(6044),a=n(3154),o=n(1257);const c={MoveCall(e){const[t,n="",s=""]="target"in e?e.target.split("::"):[e.package,e.module,e.function];return{$kind:"MoveCall",MoveCall:{package:t,module:n,function:s,typeArguments:e.typeArguments??[],arguments:e.arguments??[]}}},TransferObjects:(e,t)=>({$kind:"TransferObjects",TransferObjects:{objects:e.map((e=>(0,i.qgA)(o.ef,e))),address:(0,i.qgA)(o.ef,t)}}),SplitCoins:(e,t)=>({$kind:"SplitCoins",SplitCoins:{coin:(0,i.qgA)(o.ef,e),amounts:t.map((e=>(0,i.qgA)(o.ef,e)))}}),MergeCoins:(e,t)=>({$kind:"MergeCoins",MergeCoins:{destination:(0,i.qgA)(o.ef,e),sources:t.map((e=>(0,i.qgA)(o.ef,e)))}}),Publish:({modules:e,dependencies:t})=>({$kind:"Publish",Publish:{modules:e.map((e=>"string"==typeof e?e:(0,s.o)(new Uint8Array(e)))),dependencies:t.map((e=>(0,a.fN)(e)))}}),Upgrade:({modules:e,dependencies:t,package:n,ticket:r})=>({$kind:"Upgrade",Upgrade:{modules:e.map((e=>"string"==typeof e?e:(0,s.o)(new Uint8Array(e)))),dependencies:t.map((e=>(0,a.fN)(e))),package:n,ticket:(0,i.qgA)(o.ef,r)}}),MakeMoveVec:({type:e,elements:t})=>({$kind:"MakeMoveVec",MakeMoveVec:{type:e??null,elements:t.map((e=>(0,i.qgA)(o.ef,e)))}}),Intent:({name:e,inputs:t={},data:n={}})=>({$kind:"$Intent",$Intent:{name:e,inputs:Object.fromEntries(Object.entries(t).map((([e,t])=>[e,Array.isArray(t)?t.map((e=>(0,i.qgA)(o.ef,e))):(0,i.qgA)(o.ef,t)]))),data:n}})};var d=n(3137),u=n(3496),h=n(5260),l=n(9684),p=n(7522),g=n(5195),f=n(7083),m=n(28),y=n(3593);function b(e){return(0,a.t4)(e).replace("0x","")}class w{constructor(e){this.version=2,this.sender=e?.sender??null,this.expiration=e?.expiration??null,this.inputs=e?.inputs??[],this.commands=e?.commands??[],this.gasData=e?.gasData??{budget:null,price:null,owner:null,payment:null}}static fromKindBytes(e){const t=m.jy.TransactionKind.parse(e).ProgrammableTransaction;if(!t)throw new Error("Unable to deserialize from bytes.");return w.restore({version:2,sender:null,expiration:null,gasData:{budget:null,owner:null,payment:null,price:null},inputs:t.inputs,commands:t.commands})}static fromBytes(e){const t=m.jy.TransactionData.parse(e),n=t?.V1,s=n.kind.ProgrammableTransaction;if(!n||!s)throw new Error("Unable to deserialize from bytes.");return w.restore({version:2,sender:n.sender,expiration:n.expiration,gasData:n.gasData,inputs:s.inputs,commands:s.commands})}static restore(e){return 2===e.version?new w((0,i.qgA)(o.pl,e)):new w((0,i.qgA)(o.pl,(0,d.ef)(e)))}static getDigestFromBytes(e){const t=(0,y.Z)("TransactionData",e);return(0,f.x)(t)}get gasConfig(){return this.gasData}set gasConfig(e){this.gasData=e}build({maxSizeBytes:e=1/0,overrides:t,onlyTransactionKind:n}={}){const s=this.inputs,r=this.commands,i={ProgrammableTransaction:{inputs:s,commands:r}};if(n)return m.jy.TransactionKind.serialize(i,{maxSize:e}).toBytes();const a=t?.expiration??this.expiration,o=t?.sender??this.sender,c={...this.gasData,...t?.gasConfig,...t?.gasData};if(!o)throw new Error("Missing transaction sender");if(!c.budget)throw new Error("Missing gas budget");if(!c.payment)throw new Error("Missing gas payment");if(!c.price)throw new Error("Missing gas price");const d={sender:b(o),expiration:a||{None:!0},gasData:{payment:c.payment,owner:b(this.gasData.owner??o),price:BigInt(c.price),budget:BigInt(c.budget)},kind:{ProgrammableTransaction:{inputs:s,commands:r}}};return m.jy.TransactionData.serialize({V1:d},{maxSize:e}).toBytes()}addInput(e,t){const n=this.inputs.length;return this.inputs.push(t),{Input:n,type:e,$kind:"Input"}}getInputUses(e,t){this.mapArguments(((n,s)=>("Input"===n.$kind&&n.Input===e&&t(n,s),n)))}mapArguments(e){for(const t of this.commands)switch(t.$kind){case"MoveCall":t.MoveCall.arguments=t.MoveCall.arguments.map((n=>e(n,t)));break;case"TransferObjects":t.TransferObjects.objects=t.TransferObjects.objects.map((n=>e(n,t))),t.TransferObjects.address=e(t.TransferObjects.address,t);break;case"SplitCoins":t.SplitCoins.coin=e(t.SplitCoins.coin,t),t.SplitCoins.amounts=t.SplitCoins.amounts.map((n=>e(n,t)));break;case"MergeCoins":t.MergeCoins.destination=e(t.MergeCoins.destination,t),t.MergeCoins.sources=t.MergeCoins.sources.map((n=>e(n,t)));break;case"MakeMoveVec":t.MakeMoveVec.elements=t.MakeMoveVec.elements.map((n=>e(n,t)));break;case"Upgrade":t.Upgrade.ticket=e(t.Upgrade.ticket,t);break;case"$Intent":const n=t.$Intent.inputs;t.$Intent.inputs={};for(const[s,r]of Object.entries(n))t.$Intent.inputs[s]=Array.isArray(r)?r.map((n=>e(n,t))):e(r,t);break;case"Publish":break;default:throw new Error(`Unexpected transaction kind: ${t.$kind}`)}}replaceCommand(e,t){if(!Array.isArray(t))return void(this.commands[e]=t);const n=t.length-1;this.commands.splice(e,1,...t),0!==n&&this.mapArguments((t=>{switch(t.$kind){case"Result":t.Result>e&&(t.Result+=n);break;case"NestedResult":t.NestedResult[0]>e&&(t.NestedResult[0]+=n)}return t}))}getDigest(){const e=this.build({onlyTransactionKind:!1});return w.getDigestFromBytes(e)}snapshot(){return(0,i.qgA)(o.pl,this)}}var k,j,v,S,O,C,$,M,A,I=n(4836),P=e=>{throw TypeError(e)},E=(e,t,n)=>t.has(e)||P("Cannot "+n),T=(e,t,n)=>(E(e,t,"read from private field"),n?n.call(e):t.get(e)),x=(e,t,n)=>t.has(e)?P("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),R=(e,t,n,s)=>(E(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n),q=(e,t,n)=>(E(e,t,"access private method"),n);const D=Symbol.for("@mysten/transaction");function U(e){return!!e&&"object"==typeof e&&!0===e[D]}const K={buildPlugins:[],serializationPlugins:[]},N=Symbol.for("@mysten/transaction/registry");function B(){try{const e=globalThis;return e[N]||(e[N]=K),e[N]}catch(e){return K}}k=new WeakMap,j=new WeakMap,v=new WeakMap,S=new WeakMap,O=new WeakSet,C=function(e){return(0,r.d_)(e)?this.pure(e):q(this,O,$).call(this,e)},$=function(e){return"function"==typeof e?(0,i.qgA)(o.ef,e(this)):(0,i.qgA)(o.ef,e)},M=async function(e){if(!e.onlyTransactionKind&&!T(this,S).sender)throw new Error("Missing transaction sender");await q(this,O,A).call(this,[...T(this,j),l.J],e)},A=async function(e,t){const n=s=>{if(s>=e.length)return()=>{};const r=e[s];return async()=>{const e=n(s+1);let i=!1,a=!1;if(await r(T(this,S),t,(async()=>{if(i)throw new Error(`next() was call multiple times in TransactionPlugin ${s}`);i=!0,await e(),a=!0})),!i)throw new Error(`next() was not called in TransactionPlugin ${s}`);if(!a)throw new Error(`next() was not awaited in TransactionPlugin ${s}`)}};await n(0)()};let z=class e{constructor(){x(this,O),x(this,k),x(this,j),x(this,v,new Map),x(this,S),this.object=(0,p.O)((e=>{if("function"==typeof e)return this.object(e(this));if("object"==typeof e&&(0,i.is)(o.ef,e))return e;const t=(0,I._t)(e),n=T(this,S).inputs.find((e=>t===(0,I._t)(e)));return n?.Object?.SharedObject&&"object"==typeof e&&e.Object?.SharedObject&&(n.Object.SharedObject.mutable=n.Object.SharedObject.mutable||e.Object.SharedObject.mutable),n?{$kind:"Input",Input:T(this,S).inputs.indexOf(n),type:"object"}:T(this,S).addInput("object","string"==typeof e?{$kind:"UnresolvedObject",UnresolvedObject:{objectId:(0,a.t4)(e)}}:e)}));const e=B();R(this,S,new w),R(this,j,[...e.buildPlugins]),R(this,k,[...e.serializationPlugins])}static fromKind(t){const n=new e;return R(n,S,w.fromKindBytes("string"==typeof t?(0,s.Z)(t):t)),n}static from(t){const n=new e;return U(t)?R(n,S,new w(t.getData())):"string"==typeof t&&t.startsWith("{")?R(n,S,w.restore(JSON.parse(t))):R(n,S,w.fromBytes("string"==typeof t?(0,s.Z)(t):t)),n}static registerGlobalSerializationPlugin(e){B().serializationPlugins.push(e)}static registerGlobalBuildPlugin(e){B().buildPlugins.push(e)}addSerializationPlugin(e){T(this,k).push(e)}addBuildPlugin(e){T(this,j).push(e)}addIntentResolver(e,t){if(T(this,v).has(e)&&T(this,v).get(e)!==t)throw new Error(`Intent resolver for ${e} already exists`);T(this,v).set(e,t)}setSender(e){T(this,S).sender=e}setSenderIfNotSet(e){T(this,S).sender||(T(this,S).sender=e)}setExpiration(e){T(this,S).expiration=e?(0,i.qgA)(o.ko,e):null}setGasPrice(e){T(this,S).gasConfig.price=String(e)}setGasBudget(e){T(this,S).gasConfig.budget=String(e)}setGasBudgetIfNotSet(e){null==T(this,S).gasData.budget&&(T(this,S).gasConfig.budget=String(e))}setGasOwner(e){T(this,S).gasConfig.owner=e}setGasPayment(e){T(this,S).gasConfig.payment=e.map((e=>(0,i.qgA)(o.xJ,e)))}get blockData(){return(0,d.Sm)(T(this,S).snapshot())}getData(){return T(this,S).snapshot()}get[D](){return!0}get pure(){return Object.defineProperty(this,"pure",{enumerable:!1,value:(0,g.N)((e=>(0,r.d_)(e)?T(this,S).addInput("pure",{$kind:"Pure",Pure:{bytes:e.toBase64()}}):T(this,S).addInput("pure",(0,i.is)(o.QR,e)?(0,i.qgA)(o.QR,e):e instanceof Uint8Array?h.G.Pure(e):{$kind:"UnresolvedPure",UnresolvedPure:{value:e}})))}),this.pure}get gas(){return{$kind:"GasCoin",GasCoin:!0}}objectRef(...e){return this.object(h.G.ObjectRef(...e))}receivingRef(...e){return this.object(h.G.ReceivingRef(...e))}sharedObjectRef(...e){return this.object(h.G.SharedObjectRef(...e))}add(e){return"function"==typeof e?e(this):function(e){const t=[],n=n=>t[n]??(t[n]={$kind:"NestedResult",NestedResult:[e,n]});return new Proxy({$kind:"Result",Result:e},{set(){throw new Error("The transaction result is a proxy, and does not support setting properties directly")},get(e,t){if(t in e)return Reflect.get(e,t);if(t===Symbol.iterator)return function*(){let e=0;for(;;)yield n(e),e++};if("symbol"==typeof t)return;const s=parseInt(t,10);return Number.isNaN(s)||s<0?void 0:n(s)}})}(T(this,S).commands.push(e)-1)}splitCoins(e,t){return this.add(c.SplitCoins("string"==typeof e?this.object(e):q(this,O,$).call(this,e),t.map((e=>"number"==typeof e||"bigint"==typeof e||"string"==typeof e?this.pure.u64(e):q(this,O,C).call(this,e)))))}mergeCoins(e,t){return this.add(c.MergeCoins(this.object(e),t.map((e=>this.object(e)))))}publish({modules:e,dependencies:t}){return this.add(c.Publish({modules:e,dependencies:t}))}upgrade({modules:e,dependencies:t,package:n,ticket:s}){return this.add(c.Upgrade({modules:e,dependencies:t,package:n,ticket:this.object(s)}))}moveCall({arguments:e,...t}){return this.add(c.MoveCall({...t,arguments:e?.map((e=>q(this,O,C).call(this,e)))}))}transferObjects(e,t){return this.add(c.TransferObjects(e.map((e=>this.object(e))),"string"==typeof t?this.pure.address(t):q(this,O,C).call(this,t)))}makeMoveVec({type:e,elements:t}){return this.add(c.MakeMoveVec({type:e,elements:t.map((e=>this.object(e)))}))}serialize(){return JSON.stringify((0,d.Sm)(T(this,S).snapshot()))}async toJSON(e={}){return await this.prepareForSerialization(e),JSON.stringify((0,i.qgA)(u.f,T(this,S).snapshot()),((e,t)=>"bigint"==typeof t?t.toString():t),2)}async sign(e){const{signer:t,...n}=e,s=await this.build(n);return t.signTransaction(s)}async build(e={}){return await this.prepareForSerialization(e),await q(this,O,M).call(this,e),T(this,S).build({onlyTransactionKind:e.onlyTransactionKind})}async getDigest(e={}){return await q(this,O,M).call(this,e),T(this,S).getDigest()}async prepareForSerialization(e){const t=new Set;for(const e of T(this,S).commands)e.$Intent&&t.add(e.$Intent.name);const n=[...T(this,k)];for(const s of t)if(!e.supportedIntents?.includes(s)){if(!T(this,v).has(s))throw new Error(`Missing intent resolver for ${s}`);n.push(T(this,v).get(s))}await q(this,O,A).call(this,n,e)}}},6731:(e,t,n)=>{n.d(t,{h:()=>b});var s=n(4601),r=n(1069),i=n(2563),a=n(2761),o=n(2894),c=n(6357);const d=new RegExp("^m(\\/[0-9]+')+$"),u=e=>e.replace("'",""),h=(e,t,n=2147483648)=>{if(!(e=>!!d.test(e)&&!e.split("/").slice(1).map(u).some(isNaN))(e))throw new Error("Invalid derivation path");const{key:s,chainCode:r}=(e=>{const t=o.w.create(c.Zf,"ed25519 seed").update((0,a.i)(e)).digest();return{key:t.slice(0,32),chainCode:t.slice(32)}})(t);return e.split("/").slice(1).map(u).map((e=>parseInt(e,10))).reduce(((e,t)=>(({key:e,chainCode:t},n)=>{const s=new ArrayBuffer(4);new DataView(s).setUint32(0,n);const r=new Uint8Array(1+e.length+s.byteLength);r.set(new Uint8Array(1).fill(0)),r.set(e,1),r.set(new Uint8Array(s,0,s.byteLength),e.length+1);const i=o.w.create(c.Zf,t).update(r).digest();return{key:i.slice(0,32),chainCode:i.slice(32)}})(e,t+n)),{key:s,chainCode:r})};var l=n(4480),p=n(8166),g=n(1470),f=n(3172);class m extends p.J{constructor(e){if(super(),"string"==typeof e?this.data=(0,l.Z)(e):e instanceof Uint8Array?this.data=e:this.data=Uint8Array.from(e),32!==this.data.length)throw new Error(`Invalid public key input. Expected 32 bytes, got ${this.data.length}`)}equals(e){return super.equals(e)}toRawBytes(){return this.data}flag(){return g.uD.ED25519}async verify(e,t){let n;if("string"==typeof t){const e=(0,f.Y)(t);if("ED25519"!==e.signatureScheme)throw new Error("Invalid signature scheme");if(!(0,p.O)(this.toRawBytes(),e.publicKey))throw new Error("Signature does not match public key");n=e.signature}else n=t;return s.sign.detached.verify(e,n,this.toRawBytes())}}m.SIZE=32;const y="m/44'/784'/0'/0'/0'";class b extends r.AX{constructor(e){super(),this.keypair=e||s.sign.keyPair()}getKeyScheme(){return"ED25519"}static generate(){return new b(s.sign.keyPair())}static fromSecretKey(e,t){const n=e.length;if(n!==r.uS)throw new Error(`Wrong secretKey size. Expected ${r.uS} bytes, got ${n}.`);const i=s.sign.keyPair.fromSeed(e);if(!t||!t.skipValidation){const e=(new TextEncoder).encode("sui validation"),t=s.sign.detached(e,i.secretKey);if(!s.sign.detached.verify(e,t,i.publicKey))throw new Error("provided secretKey is invalid")}return new b(i)}getPublicKey(){return new m(this.keypair.publicKey)}getSecretKey(){return(0,r.yk)(this.keypair.secretKey.slice(0,r.uS),this.getKeyScheme())}async sign(e){return s.sign.detached(e,this.keypair.secretKey)}static deriveKeypair(e,t){if(null==t&&(t=y),!(0,i.jh)(t))throw new Error("Invalid derivation path");const{key:n}=h(t,(0,i.SB)(e));return b.fromSecretKey(n)}static deriveKeypairFromSeed(e,t){if(null==t&&(t=y),!(0,i.jh)(t))throw new Error("Invalid derivation path");const{key:n}=h(t,e);return b.fromSecretKey(n)}}},7530:(e,t,n)=>{n.d(t,{A:()=>g});var s,r,i,a,o=n(2330),c=e=>{throw TypeError(e)},d=(e,t,n)=>t.has(e)||c("Cannot "+n),u=(e,t,n)=>(d(e,t,"read from private field"),n?n.call(e):t.get(e)),h=(e,t,n)=>t.has(e)?c("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),l=(e,t,n,s)=>(d(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n);class p extends Error{}class g{constructor({url:e,fetch:t=fetch,headers:n={},queries:o={}}){h(this,s),h(this,r),h(this,i),h(this,a),l(this,s,e),l(this,r,o),l(this,i,n),l(this,a,((...e)=>t(...e)))}async query(e){const t=await u(this,a).call(this,u(this,s),{method:"POST",headers:{"Content-Type":"application/json",...u(this,i)},body:JSON.stringify({query:"string"==typeof e.query?String(e.query):(0,o.y)(e.query),variables:e.variables,extensions:e.extensions,operationName:e.operationName})});if(!t.ok)throw new p(`GraphQL request failed: ${t.statusText} (${t.status})`);return await t.json()}async execute(e,t){return this.query({...t,query:u(this,r)[e]})}}s=new WeakMap,r=new WeakMap,i=new WeakMap,a=new WeakMap},8290:(e,t,n)=>{n.d(t,{RJ:()=>i,Yl:()=>a,lG:()=>o});class s extends Error{}async function r({host:e,path:t,body:n,headers:r,method:i}){const a=new URL(t,e).toString(),o=await fetch(a,{method:i,body:n?JSON.stringify(n):void 0,headers:{"Content-Type":"application/json",...r||{}}});if(429===o.status)throw new s("Too many requests from this client have been sent to the faucet. Please retry later");try{const e=await o.json();if(e.error)throw new Error(`Faucet returns error: ${e.error}`);return e}catch(e){throw new Error(`Encountered error when parsing response from faucet, error: ${e}, status ${o.status}, response ${o}`)}}async function i(e){return r({host:e.host,path:"/gas",body:{FixedAmountRequest:{recipient:e.recipient}},headers:e.headers,method:"POST"})}async function a(e){return r({host:e.host,path:"/v1/gas",body:{FixedAmountRequest:{recipient:e.recipient}},headers:e.headers,method:"POST"})}function o(e){switch(e){case"testnet":return"https://faucet.testnet.sui.io";case"devnet":return"https://faucet.devnet.sui.io";case"localnet":return"http://127.0.0.1:9123";default:throw new Error(`Unknown network: ${e}`)}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(this.webpackChunkwowok_agent=this.webpackChunkwowok_agent||[]).push([[362],{657:(e,t,r)=>{r.d(t,{g3:()=>g,oO:()=>h,yq:()=>p});var n=r(28),i=r(7388),s=r(3154);const o="object",a="ID",u="ascii",c="String",l="string",d="String",y="option",f="Option";function p(e){const t="object"==typeof e.body&&"datatype"in e.body?e.body.datatype:null;return!!t&&(0,s.t4)(t.package)===(0,s.t4)("0x2")&&"tx_context"===t.module&&"TxContext"===t.type}function g(e){if("string"==typeof e)switch(e){case"address":return n.jy.Address;case"bool":return n.jy.Bool;case"u8":return n.jy.U8;case"u16":return n.jy.U16;case"u32":return n.jy.U32;case"u64":return n.jy.U64;case"u128":return n.jy.U128;case"u256":return n.jy.U256;default:throw new Error(`Unknown type signature ${e}`)}if("vector"in e){if("u8"===e.vector)return n.jy.vector(n.jy.U8).transform({input:e=>"string"==typeof e?(new TextEncoder).encode(e):e,output:e=>e});const t=g(e.vector);return t?n.jy.vector(t):null}if("datatype"in e){const t=(0,s.t4)(e.datatype.package);if(t===(0,s.t4)(i.Yy)){if(e.datatype.module===u&&e.datatype.type===c)return n.jy.String;if(e.datatype.module===l&&e.datatype.type===d)return n.jy.String;if(e.datatype.module===y&&e.datatype.type===f){const t=g(e.datatype.typeParameters[0]);return t?n.jy.vector(t):null}}if(t===(0,s.t4)(i.C6)&&e.datatype.module===o&&e.datatype.type===a)return n.jy.Address}return null}function h(e){return"object"==typeof e&&"Reference"in e?{ref:"&",body:j(e.Reference)}:"object"==typeof e&&"MutableReference"in e?{ref:"&mut",body:j(e.MutableReference)}:{ref:null,body:j(e)}}function j(e){if("string"==typeof e)switch(e){case"Address":return"address";case"Bool":return"bool";case"U8":return"u8";case"U16":return"u16";case"U32":return"u32";case"U64":return"u64";case"U128":return"u128";case"U256":return"u256";default:throw new Error(`Unexpected type ${e}`)}if("Vector"in e)return{vector:j(e.Vector)};if("Struct"in e)return{datatype:{package:e.Struct.address,module:e.Struct.module,type:e.Struct.name,typeParameters:e.Struct.typeArguments.map(j)}};if("TypeParameter"in e)return{typeParameter:e.TypeParameter};throw new Error(`Unexpected type ${JSON.stringify(e)}`)}},947:(e,t,r)=>{r.d(t,{c:()=>i,i:()=>n});const n="1.7.0",i="1.32.0"},2577:(e,t,r)=>{r.d(t,{n:()=>s});const n=/^(?!.*(^(?!@)|[-.@])($|[-.@]))(?:[a-z0-9-]{0,63}(?:\.[a-z0-9-]{0,63})*)?@[a-z0-9-]{0,63}$/i,i=/^(?!.*(^|[-.])($|[-.]))(?:[a-z0-9-]{0,63}\.)+sui$/i;function s(e,t="at"){const r=e.toLowerCase();let s;if(r.includes("@")){if(!n.test(r))throw new Error(`Invalid SuiNS name ${e}`);const[t,i]=r.split("@");s=[...t?t.split("."):[],i]}else{if(!i.test(r))throw new Error(`Invalid SuiNS name ${e}`);s=r.split(".").slice(0,-1)}return"dot"===t?`${s.join(".")}.sui`:`${s.slice(0,-1).join(".")}@${s[s.length-1]}`}},3154:(e,t,r)=>{r.d(t,{AP:()=>a,fN:()=>l,n4:()=>s,qD:()=>u,t4:()=>c,wn:()=>o});var n=r(7083);const i=32;function s(e){try{return(0,n.Q)(e).length===i}catch(e){return!1}}const o=32;function a(e){return function(e){return/^(0x|0X)?[a-fA-F0-9]+$/.test(e)&&e.length%2==0}(e)&&function(e){return/^(0x|0X)/.test(e)?(e.length-2)/2:e.length/2}(e)===o}function u(e){return a(e)}function c(e,t=!1){let r=e.toLowerCase();return!t&&r.startsWith("0x")&&(r=r.slice(2)),`0x${r.padStart(2*o,"0")}`}function l(e,t=!1){return c(e,t)}},4836:(e,t,r)=>{r.d(t,{_t:()=>i});var n=r(3154);function i(e){return"string"==typeof e?(0,n.t4)(e):e.Object?e.Object.ImmOrOwnedObject?(0,n.t4)(e.Object.ImmOrOwnedObject.objectId):e.Object.Receiving?(0,n.t4)(e.Object.Receiving.objectId):(0,n.t4)(e.Object.SharedObject.objectId):e.UnresolvedObject?(0,n.t4)(e.UnresolvedObject.objectId):void 0}},5195:(e,t,r)=>{r.d(t,{N:()=>s});var n=r(5501),i=r(28);function s(e){function t(t,r){if("string"==typeof t)return e(o(t).serialize(r));if(t instanceof Uint8Array||(0,n.d_)(t))return e(t);throw new Error("tx.pure must be called either a bcs type name, or a serialized bcs value")}return t.u8=t=>e(i.jy.U8.serialize(t)),t.u16=t=>e(i.jy.U16.serialize(t)),t.u32=t=>e(i.jy.U32.serialize(t)),t.u64=t=>e(i.jy.U64.serialize(t)),t.u128=t=>e(i.jy.U128.serialize(t)),t.u256=t=>e(i.jy.U256.serialize(t)),t.bool=t=>e(i.jy.Bool.serialize(t)),t.string=t=>e(i.jy.String.serialize(t)),t.address=t=>e(i.jy.Address.serialize(t)),t.id=t.address,t.vector=(t,r)=>e(i.jy.vector(o(t)).serialize(r)),t.option=(t,r)=>e(i.jy.option(o(t)).serialize(r)),t}function o(e){switch(e){case"u8":return i.jy.u8();case"u16":return i.jy.u16();case"u32":return i.jy.u32();case"u64":return i.jy.u64();case"u128":return i.jy.u128();case"u256":return i.jy.u256();case"bool":return i.jy.bool();case"string":return i.jy.string();case"id":case"address":return i.jy.Address}const t=e.match(/^(vector|option)<(.+)>$/);if(t){const[e,r]=t.slice(1);return"vector"===e?i.jy.vector(o(r)):i.jy.option(o(r))}throw new Error(`Invalid Pure type name: ${e}`)}},7388:(e,t,r)=>{r.d(t,{Ac:()=>o,C6:()=>s,Yy:()=>i});var n=r(3154);BigInt(1e9);const i="0x1",s="0x2",o=((0,n.fN)("0x6"),`${s}::sui::SUI`);(0,n.fN)("0x5")},7522:(e,t,r)=>{function n(e){function t(t){return e(t)}return t.system=()=>t("0x5"),t.clock=()=>t("0x6"),t.random=()=>t("0x8"),t.denyList=()=>t("0x403"),t}r.d(t,{O:()=>n})},8428:(e,t,r)=>{r.d(t,{eu:()=>k});var n=r(4480),i=r(8166),s=r(1470),o=r(7530),a=r(5089);function u(e){if(1!==e.length)throw new Error("Invalid base64Url character: "+e);const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".indexOf(e);if(-1===t)throw new Error("Invalid base64Url character: "+e);const r=t.toString(2).padStart(6,"0");return Array.from(r).map(Number)}function c(e,t){const r=function(e,t){if(e.length<2)throw new Error(`Input (s = ${e}) is not tightly packed because s.length < 2`);let r=function(e){let t=[];for(let r=0;r<e.length;r++){const n=u(e.charAt(r));t=t.concat(n)}return t}(e);const n=t%4;if(0===n);else if(1===n)r=r.slice(2);else{if(2!==n)throw new Error(`Input (s = ${e}) is not tightly packed because i%4 = 3 (i = ${t}))`);r=r.slice(4)}const i=(t+e.length-1)%4;if(3===i);else if(2===i)r=r.slice(0,r.length-2);else{if(1!==i)throw new Error(`Input (s = ${e}) is not tightly packed because (i + s.length - 1)%4 = 0 (i = ${t}))`);r=r.slice(0,r.length-4)}if(r.length%8!=0)throw new Error("We should never reach here...");const s=new Uint8Array(Math.floor(r.length/8));let o=0;for(let e=0;e<r.length;e+=8){const t=r.slice(e,e+8),n=parseInt(t.join(""),2);s[o++]=n}return(new TextDecoder).decode(s)}(e.value,e.indexMod4),[n,i]=function(e){if("}"!==e.slice(-1)&&","!==e.slice(-1))throw new Error("Invalid claim");const t=JSON.parse("{"+e.slice(0,-1)+"}");if(1!==Object.keys(t).length)throw new Error("Invalid claim");const r=Object.keys(t)[0];return[r,t[r]]}(r);if(n!==t)throw new Error(`Invalid field name: found ${n} expected ${t}`);return i}var l=r(8596);const d=l.j.struct("ZkLoginSignature",{inputs:l.j.struct("ZkLoginSignatureInputs",{proofPoints:l.j.struct("ZkLoginSignatureInputsProofPoints",{a:l.j.vector(l.j.string()),b:l.j.vector(l.j.vector(l.j.string())),c:l.j.vector(l.j.string())}),issBase64Details:l.j.struct("ZkLoginSignatureInputsClaim",{value:l.j.string(),indexMod4:l.j.u8()}),headerBase64:l.j.string(),addressSeed:l.j.string()}),maxEpoch:l.j.u64(),userSignature:l.j.vector(l.j.u8())});var y=r(7520);var f,p,g=e=>{throw TypeError(e)},h=(e,t,r)=>t.has(e)||g("Cannot "+r),j=(e,t,r)=>(h(e,t,"read from private field"),r?r.call(e):t.get(e)),w=(e,t,r)=>t.has(e)?g("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),b=(e,t,r,n)=>(h(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);const S=class e extends i.J{constructor(e,{client:t}={}){super(),w(this,f),w(this,p),b(this,p,t),"string"==typeof e?b(this,f,(0,n.Z)(e)):e instanceof Uint8Array?b(this,f,e):b(this,f,Uint8Array.from(e))}equals(e){return super.equals(e)}toRawBytes(){return j(this,f)}flag(){return s.uD.ZkLogin}async verify(e,t){throw Error("does not support")}verifyPersonalMessage(t,r){const i=k(r);return U({address:new e(i.publicKey).toSuiAddress(),bytes:(0,n.o)(t),signature:i.serializedSignature,intentScope:"PERSONAL_MESSAGE",client:j(this,p)})}verifyTransaction(t,r){const i=k(r);return U({address:new e(i.publicKey).toSuiAddress(),bytes:(0,n.o)(t),signature:i.serializedSignature,intentScope:"TRANSACTION_DATA",client:j(this,p)})}};f=new WeakMap,p=new WeakMap;let v=S;const m=(0,a.UG)("\n\tquery Zklogin(\n\t\t$bytes: Base64!\n\t\t$signature: Base64!\n\t\t$intentScope: ZkLoginIntentScope!\n\t\t$author: SuiAddress!\n\t) {\n\t\tverifyZkloginSignature(\n\t\t\tbytes: $bytes\n\t\t\tsignature: $signature\n\t\t\tintentScope: $intentScope\n\t\t\tauthor: $author\n\t\t) {\n\t\t\tsuccess\n\t\t\terrors\n\t\t}\n\t}\n");async function U({address:e,bytes:t,signature:r,intentScope:n,client:i=new o.A({url:"https://sui-mainnet.mystenlabs.com/graphql"})}){const s=await i.query({query:m,variables:{bytes:t,signature:r,intentScope:n,author:e}});return!0===s.data?.verifyZkloginSignature.success&&0===s.data?.verifyZkloginSignature.errors.length}function k(e){const t="string"==typeof e?(0,n.Z)(e):e;if(t[0]!==s.uD.ZkLogin)throw new Error("Invalid signature scheme");const r=t.slice(1),{inputs:i,maxEpoch:o,userSignature:a}=function(e){return d.parse("string"==typeof e?(0,n.Z)(e):e)}(r),{issBase64Details:u,addressSeed:l}=i,f=c(u,"iss"),p=function(e,t){const r=function(e,t){const r=e.toString(16);return(0,y.aT)(r.padStart(2*t,"0").slice(2*-t))}(e,32),n=(new TextEncoder).encode(t),i=new Uint8Array(1+n.length+r.length);return i.set([n.length],0),i.set(n,1),i.set(r,1+n.length),new v(i,void 0)}(BigInt(l),f);return{serializedSignature:(0,n.o)(t),signatureScheme:"ZkLogin",zkLogin:{inputs:i,maxEpoch:o,userSignature:a,iss:f,addressSeed:BigInt(l)},signature:t,publicKey:p.toRawBytes()}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(this.webpackChunkwowok_agent=this.webpackChunkwowok_agent||[]).push([[44],{6044:(e,t,n)=>{var s,r,u,i;function a(e){const t=typeof e;return"string"===t?`"${e}"`:"number"===t||"bigint"===t||"boolean"===t?`${e}`:"object"===t||"function"===t?(e&&Object.getPrototypeOf(e)?.constructor?.name)??"null":t}function p(e,t,n,s,p){const o=p&&"input"in p?p.input:n.value,c=p?.expected??e.expects??null,l=p?.received??a(o),y={kind:e.kind,type:e.type,input:o,expected:c,received:l,message:`Invalid ${t}: ${c?`Expected ${c} but r`:"R"}eceived ${l}`,requirement:e.requirement,path:p?.path,issues:p?.issues,lang:s.lang,abortEarly:s.abortEarly,abortPipeEarly:s.abortPipeEarly},f="schema"===e.kind,d=p?.message??e.message??(h=e.reference,v=y.lang,i?.get(h)?.get(v))??(f?function(e){return u?.get(e)}(y.lang):null)??s.message??function(e){return r?.get(e)}(y.lang);var h,v;d&&(y.message="function"==typeof d?d(y):d),f&&(n.typed=!1),n.issues?n.issues.push(y):n.issues=[y]}function o(e,t){return Object.hasOwn(e,t)&&"__proto__"!==t&&"prototype"!==t&&"constructor"!==t}n.d(t,{FsL:()=>C,Ikc:()=>w,KCZ:()=>O,L5J:()=>z,PVZ:()=>q,RZV:()=>b,YOg:()=>v,YjP:()=>$,aig:()=>E,cl6:()=>x,euz:()=>k,g1P:()=>P,is:()=>h,lqM:()=>j,mee:()=>_,ndf:()=>y,oad:()=>g,pdi:()=>f,qgA:()=>Y,z6Y:()=>l,zMY:()=>m});var c=class extends Error{issues;constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}};function l(e,t){return{kind:"validation",type:"check",reference:l,async:!1,expects:null,requirement:e,message:t,_run(e,t){return e.typed&&!this.requirement(e.value)&&p(this,"input",e,t),e}}}function y(e){return{kind:"validation",type:"integer",reference:y,async:!1,expects:null,requirement:Number.isInteger,message:e,_run(e,t){return e.typed&&!this.requirement(e.value)&&p(this,"integer",e,t),e}}}function f(e){return{kind:"transformation",type:"transform",reference:f,async:!1,operation:e,_run(e){return e.value=this.operation(e.value),e}}}function d(e,t,n){return"function"==typeof e.default?e.default(t,n):e.default}function h(e,t){return!e._run({typed:!1,value:t},{abortEarly:!0}).issues}function v(e,t){return{kind:"schema",type:"array",reference:v,expects:"Array",async:!1,item:e,message:t,_run(e,t){const n=e.value;if(Array.isArray(n)){e.typed=!0,e.value=[];for(let s=0;s<n.length;s++){const r=n[s],u=this.item._run({typed:!1,value:r},t);if(u.issues){const i={type:"array",origin:"value",input:n,key:s,value:r};for(const t of u.issues)t.path?t.path.unshift(i):t.path=[i],e.issues?.push(t);if(e.issues||(e.issues=u.issues),t.abortEarly){e.typed=!1;break}}u.typed||(e.typed=!1),e.value.push(u.value)}}else p(this,"type",e,t);return e}}}function g(e){return{kind:"schema",type:"bigint",reference:g,expects:"bigint",async:!1,message:e,_run(e,t){return"bigint"==typeof e.value?e.typed=!0:p(this,"type",e,t),e}}}function m(e){return{kind:"schema",type:"boolean",reference:m,expects:"boolean",async:!1,message:e,_run(e,t){return"boolean"==typeof e.value?e.typed=!0:p(this,"type",e,t),e}}}function b(e){return{kind:"schema",type:"lazy",reference:b,expects:"unknown",async:!1,getter:e,_run(e,t){return this.getter(e.value)._run(e,t)}}}function k(e,t){return{kind:"schema",type:"literal",reference:k,expects:a(e),async:!1,literal:e,message:t,_run(e,t){return e.value===this.literal?e.typed=!0:p(this,"type",e,t),e}}}function _(e,...t){const n={kind:"schema",type:"nullable",reference:_,expects:`${e.expects} | null`,async:!1,wrapped:e,_run(e,t){return null===e.value&&("default"in this&&(e.value=d(this,e,t)),null===e.value)?(e.typed=!0,e):this.wrapped._run(e,t)}};return 0 in t&&(n.default=t[0]),n}function x(e,...t){const n={kind:"schema",type:"nullish",reference:x,expects:`${e.expects} | null | undefined`,async:!1,wrapped:e,_run(e,t){return null!==e.value&&void 0!==e.value||("default"in this&&(e.value=d(this,e,t)),null!==e.value&&void 0!==e.value)?this.wrapped._run(e,t):(e.typed=!0,e)}};return 0 in t&&(n.default=t[0]),n}function E(e){return{kind:"schema",type:"number",reference:E,expects:"number",async:!1,message:e,_run(e,t){return"number"!=typeof e.value||isNaN(e.value)?p(this,"type",e,t):e.typed=!0,e}}}function w(e,t){return{kind:"schema",type:"object",reference:w,expects:"Object",async:!1,entries:e,message:t,_run(e,t){const n=e.value;if(n&&"object"==typeof n){e.typed=!0,e.value={};for(const s in this.entries){const r=n[s],u=this.entries[s]._run({typed:!1,value:r},t);if(u.issues){const i={type:"object",origin:"value",input:n,key:s,value:r};for(const t of u.issues)t.path?t.path.unshift(i):t.path=[i],e.issues?.push(t);if(e.issues||(e.issues=u.issues),t.abortEarly){e.typed=!1;break}}u.typed||(e.typed=!1),(void 0!==u.value||s in n)&&(e.value[s]=u.value)}}else p(this,"type",e,t);return e}}}function j(e,...t){const n={kind:"schema",type:"optional",reference:j,expects:`${e.expects} | undefined`,async:!1,wrapped:e,_run(e,t){return void 0===e.value&&("default"in this&&(e.value=d(this,e,t)),void 0===e.value)?(e.typed=!0,e):this.wrapped._run(e,t)}};return 0 in t&&(n.default=t[0]),n}function P(e,t,n){return{kind:"schema",type:"record",reference:P,expects:"Object",async:!1,key:e,value:t,message:n,_run(e,t){const n=e.value;if(n&&"object"==typeof n){e.typed=!0,e.value={};for(const s in n)if(o(n,s)){const r=n[s],u=this.key._run({typed:!1,value:s},t);if(u.issues){const i={type:"object",origin:"key",input:n,key:s,value:r};for(const t of u.issues)t.path=[i],e.issues?.push(t);if(e.issues||(e.issues=u.issues),t.abortEarly){e.typed=!1;break}}const i=this.value._run({typed:!1,value:r},t);if(i.issues){const u={type:"object",origin:"value",input:n,key:s,value:r};for(const t of i.issues)t.path?t.path.unshift(u):t.path=[u],e.issues?.push(t);if(e.issues||(e.issues=i.issues),t.abortEarly){e.typed=!1;break}}u.typed&&i.typed||(e.typed=!1),u.typed&&(e.value[u.value]=i.value)}}else p(this,"type",e,t);return e}}}function $(e){return{kind:"schema",type:"string",reference:$,expects:"string",async:!1,message:e,_run(e,t){return"string"==typeof e.value?e.typed=!0:p(this,"type",e,t),e}}}function q(e,t){return{kind:"schema",type:"tuple",reference:q,expects:"Array",async:!1,items:e,message:t,_run(e,t){const n=e.value;if(Array.isArray(n)){e.typed=!0,e.value=[];for(let s=0;s<this.items.length;s++){const r=n[s],u=this.items[s]._run({typed:!1,value:r},t);if(u.issues){const i={type:"array",origin:"value",input:n,key:s,value:r};for(const t of u.issues)t.path?t.path.unshift(i):t.path=[i],e.issues?.push(t);if(e.issues||(e.issues=u.issues),t.abortEarly){e.typed=!1;break}}u.typed||(e.typed=!1),e.value.push(u.value)}}else p(this,"type",e,t);return e}}}function A(e){let t;if(e)for(const n of e)t?t.push(...n.issues):t=n.issues;return t}function O(e,t){return{kind:"schema",type:"union",reference:O,expects:[...new Set(e.map((e=>e.expects)))].join(" | ")||"never",async:!1,options:e,message:t,_run(e,t){let n,s,r;for(const u of this.options){const i=u._run({typed:!1,value:e.value},t);if(i.typed){if(!i.issues){n=i;break}s?s.push(i):s=[i]}else r?r.push(i):r=[i]}if(n)return n;if(s){if(1===s.length)return s[0];p(this,"type",e,t,{issues:A(s)}),e.typed=!0}else{if(1===r?.length)return r[0];p(this,"type",e,t,{issues:A(r)})}return e}}}function z(){return{kind:"schema",type:"unknown",reference:z,expects:"unknown",async:!1,_run:e=>(e.typed=!0,e)}}function Y(e,t,n){const r=e._run({typed:!1,value:t},function(e){return{lang:e?.lang??s?.lang,message:e?.message,abortEarly:e?.abortEarly??s?.abortEarly,abortPipeEarly:e?.abortPipeEarly??s?.abortPipeEarly}}(n));if(r.issues)throw new c(r.issues);return r.value}function C(...e){return{...e[0],pipe:e,_run(t,n){for(let s=0;s<e.length;s++){if(t.issues&&("schema"===e[s].kind||"transformation"===e[s].kind)){t.typed=!1;break}t.issues&&(n.abortEarly||n.abortPipeEarly)||(t=e[s]._run(t,n))}return t}}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(this.webpackChunkwowok_agent=this.webpackChunkwowok_agent||[]).push([[876],{5364:e=>{"use strict";e.exports=function(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 i=0;i<e.length;i++){var n=e.charAt(i),s=n.charCodeAt(0);if(255!==t[s])throw new TypeError(n+" is ambiguous");t[s]=i}var a=e.length,o=e.charAt(0),h=Math.log(a)/Math.log(256),c=Math.log(256)/Math.log(a);function u(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;for(var r=0,i=0,n=0;e[r]===o;)i++,r++;for(var s=(e.length-r)*h+1>>>0,c=new Uint8Array(s);e[r];){var u=e.charCodeAt(r);if(u>255)return;var f=t[u];if(255===f)return;for(var p=0,d=s-1;(0!==f||p<n)&&-1!==d;d--,p++)f+=a*c[d]>>>0,c[d]=f%256>>>0,f=f/256>>>0;if(0!==f)throw new Error("Non-zero carry");n=p,r++}for(var y=s-n;y!==s&&0===c[y];)y++;for(var l=new Uint8Array(i+(s-y)),w=i;y!==s;)l[w++]=c[y++];return l}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,i=0,n=0,s=t.length;n!==s&&0===t[n];)n++,r++;for(var h=(s-n)*c+1>>>0,u=new Uint8Array(h);n!==s;){for(var f=t[n],p=0,d=h-1;(0!==f||p<i)&&-1!==d;d--,p++)f+=256*u[d]>>>0,u[d]=f%a>>>0,f=f/a>>>0;if(0!==f)throw new Error("Non-zero carry");i=p,n++}for(var y=h-i;y!==h&&0===u[y];)y++;for(var l=o.repeat(r);y<h;++y)l+=e.charAt(u[y]);return l},decodeUnsafe:u,decode:function(e){var t=u(e);if(t)return t;throw new Error("Non-base"+a+" character")}}}},6763:(e,t,r)=>{const i=r(5364);e.exports=i("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},9627:(e,t,r)=>{"use strict";function i(e){const t=e.startsWith("0x")?e.slice(2):e,r=t.length%2==0?t:`0${t}}`,i=r.match(/.{2}/g)?.map((e=>parseInt(e,16)))??[];return Uint8Array.from(i)}function n(e){return e.reduce(((e,t)=>e+t.toString(16).padStart(2,"0")),"")}r.d(t,{J:()=>n,i:()=>i})},9876:(e,t,r)=>{"use strict";r.d(t,{r8:()=>$,PN:()=>I});var i=r(6763);const n=e=>i.encode(e),s=e=>i.decode(e);function a(e){return Uint8Array.from(atob(e),(e=>e.charCodeAt(0)))}const o=8192;function h(e){if(e.length<o)return btoa(String.fromCharCode(...e));let t="";for(var r=0;r<e.length;r+=o){const i=e.slice(r,r+o);t+=String.fromCharCode(...i)}return btoa(t)}var c=r(9627);class u{constructor(e){this.bytePosition=0,this.dataView=new DataView(e.buffer)}shift(e){return this.bytePosition+=e,this}read8(){let e=this.dataView.getUint8(this.bytePosition);return this.shift(1),e}read16(){let e=this.dataView.getUint16(this.bytePosition,!0);return this.shift(2),e}read32(){let e=this.dataView.getUint32(this.bytePosition,!0);return this.shift(4),e}read64(){let e=this.read32(),t=this.read32().toString(16)+e.toString(16).padStart(8,"0");return BigInt("0x"+t).toString(10)}read128(){let e=BigInt(this.read64()),t=BigInt(this.read64()).toString(16)+e.toString(16).padStart(16,"0");return BigInt("0x"+t).toString(10)}read256(){let e=BigInt(this.read128()),t=BigInt(this.read128()).toString(16)+e.toString(16).padStart(32,"0");return BigInt("0x"+t).toString(10)}readBytes(e){let t=this.bytePosition+this.dataView.byteOffset,r=new Uint8Array(this.dataView.buffer,t,e);return this.shift(e),r}readULEB(){let e=this.bytePosition+this.dataView.byteOffset,t=new Uint8Array(this.dataView.buffer,e),{value:r,length:i}=function(e){let t=0,r=0,i=0;for(;;){let n=e[i];if(i+=1,t|=(127&n)<<r,!(128&n))break;r+=7}return{value:t,length:i}}(t);return this.shift(i),r}readVec(e){let t=this.readULEB(),r=[];for(let i=0;i<t;i++)r.push(e(this,i,t));return r}}class f{constructor({size:e=1024,maxSize:t,allocateSize:r=1024}={}){this.bytePosition=0,this.size=e,this.maxSize=t||e,this.allocateSize=r,this.dataView=new DataView(new ArrayBuffer(e))}ensureSizeOrGrow(e){const t=this.bytePosition+e;if(t>this.size){const e=Math.min(this.maxSize,this.size+this.allocateSize);if(t>e)throw new Error(`Attempting to serialize to BCS, but buffer does not have enough size. Allocated size: ${this.size}, Max size: ${this.maxSize}, Required size: ${t}`);this.size=e;const r=new ArrayBuffer(this.size);new Uint8Array(r).set(new Uint8Array(this.dataView.buffer)),this.dataView=new DataView(r)}}shift(e){return this.bytePosition+=e,this}write8(e){return this.ensureSizeOrGrow(1),this.dataView.setUint8(this.bytePosition,Number(e)),this.shift(1)}write16(e){return this.ensureSizeOrGrow(2),this.dataView.setUint16(this.bytePosition,Number(e),!0),this.shift(2)}write32(e){return this.ensureSizeOrGrow(4),this.dataView.setUint32(this.bytePosition,Number(e),!0),this.shift(4)}write64(e){return p(BigInt(e),8).forEach((e=>this.write8(e))),this}write128(e){return p(BigInt(e),16).forEach((e=>this.write8(e))),this}write256(e){return p(BigInt(e),32).forEach((e=>this.write8(e))),this}writeULEB(e){return function(e){let t=[],r=0;if(0===e)return[0];for(;e>0;)t[r]=127&e,(e>>=7)&&(t[r]|=128),r+=1;return t}(e).forEach((e=>this.write8(e))),this}writeVec(e,t){return this.writeULEB(e.length),Array.from(e).forEach(((r,i)=>t(this,r,i,e.length))),this}*[Symbol.iterator](){for(let e=0;e<this.bytePosition;e++)yield this.dataView.getUint8(e);return this.toBytes()}toBytes(){return new Uint8Array(this.dataView.buffer.slice(0,this.bytePosition))}toString(e){return function(e,t){switch(t){case"base58":return n(e);case"base64":return h(e);case"hex":return(0,c.J)(e);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}(this.toBytes(),e)}}function p(e,t){let r=new Uint8Array(t),i=0;for(;e>0;)r[i]=Number(e%BigInt(256)),e/=BigInt(256),i+=1;return r}var d,y,l,w,g=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},m=(e,t,r)=>(g(e,t,"read from private field"),r?r.call(e):t.get(e)),b=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},T=(e,t,r,i)=>(g(e,t,"write to private field"),i?i.call(e,r):t.set(e,r),r);const E=class{constructor(e){b(this,d,void 0),b(this,y,void 0),this.name=e.name,this.read=e.read,this.serializedSize=e.serializedSize??(()=>null),T(this,d,e.write),T(this,y,e.serialize??((e,t)=>{const r=new f({size:this.serializedSize(e)??void 0,...t});return m(this,d).call(this,e,r),r.toBytes()})),this.validate=e.validate??(()=>{})}write(e,t){this.validate(e),m(this,d).call(this,e,t)}serialize(e,t){return this.validate(e),new A(this,m(this,y).call(this,e,t))}parse(e){const t=new u(e);return this.read(t)}transform({name:e,input:t,output:r}){return new E({name:e??this.name,read:e=>r(this.read(e)),write:(e,r)=>m(this,d).call(this,t(e),r),serializedSize:e=>this.serializedSize(t(e)),serialize:(e,r)=>m(this,y).call(this,t(e),r),validate:e=>this.validate(t(e))})}};let S=E;d=new WeakMap,y=new WeakMap;const v=Symbol.for("@mysten/serialized-bcs");class A{constructor(e,t){b(this,l,void 0),b(this,w,void 0),T(this,l,e),T(this,w,t)}get[v](){return!0}toBytes(){return m(this,w)}toHex(){return(0,c.J)(m(this,w))}toBase64(){return h(m(this,w))}toBase58(){return n(m(this,w))}parse(){return m(this,l).parse(m(this,w))}}l=new WeakMap,w=new WeakMap;const U=32,z=class{constructor(e){if(this.types=new Map,this.counter=0,e instanceof z)return this.schema=e.schema,void(this.types=new Map(e.types));if(this.schema=e,this.registerAddressType(z.ADDRESS,e.addressLength,e.addressEncoding),this.registerVectorType(e.vectorType),e.types&&e.types.structs)for(let t of Object.keys(e.types.structs))this.registerStructType(t,e.types.structs[t]);if(e.types&&e.types.enums)for(let t of Object.keys(e.types.enums))this.registerEnumType(t,e.types.enums[t]);if(e.types&&e.types.aliases)for(let t of Object.keys(e.types.aliases))this.registerAlias(t,e.types.aliases[t]);var t;!1!==e.withPrimitives&&((t=this).registerType($.U8,(function(e,t){return e.write8(t)}),(function(e){return e.read8()}),(e=>e<256)),t.registerType($.U16,(function(e,t){return e.write16(t)}),(function(e){return e.read16()}),(e=>e<65536)),t.registerType($.U32,(function(e,t){return e.write32(t)}),(function(e){return e.read32()}),(e=>e<=4294967296n)),t.registerType($.U64,(function(e,t){return e.write64(t)}),(function(e){return e.read64()})),t.registerType($.U128,(function(e,t){return e.write128(t)}),(function(e){return e.read128()})),t.registerType($.U256,(function(e,t){return e.write256(t)}),(function(e){return e.read256()})),t.registerType($.BOOL,(function(e,t){return e.write8(t)}),(function(e){return"1"===e.read8().toString(10)})),t.registerType($.STRING,(function(e,t){return e.writeVec(Array.from(t),((e,t)=>e.write8(t.charCodeAt(0))))}),(function(e){return e.readVec((e=>e.read8())).map((e=>String.fromCharCode(Number(e)))).join("")}),(e=>!0)),t.registerType($.HEX,(function(e,t){return e.writeVec(Array.from((0,c.i)(t)),((e,t)=>e.write8(t)))}),(function(e){let t=e.readVec((e=>e.read8()));return(0,c.J)(new Uint8Array(t))})),t.registerType($.BASE58,(function(e,t){return e.writeVec(Array.from(s(t)),((e,t)=>e.write8(t)))}),(function(e){let t=e.readVec((e=>e.read8()));return n(new Uint8Array(t))})),t.registerType($.BASE64,(function(e,t){return e.writeVec(Array.from(a(t)),((e,t)=>e.write8(t)))}),(function(e){let t=e.readVec((e=>e.read8()));return h(new Uint8Array(t))})))}tempKey(){return"bcs-struct-"+ ++this.counter}ser(e,t,r){if("string"==typeof e||Array.isArray(e)){const{name:i,params:n}=this.parseTypeName(e);return this.getTypeInterface(i).encode(this,t,r,n)}if("object"==typeof e){const i=this.tempKey();return new z(this).registerStructType(i,e).ser(i,t,r)}throw new Error(`Incorrect type passed into the '.ser()' function. \n${JSON.stringify(e)}`)}de(e,t,r){if("string"==typeof t){if(!r)throw new Error("To pass a string to `bcs.de`, specify encoding");t=function(e,t){switch(t){case"base58":return s(e);case"base64":return a(e);case"hex":return(0,c.i)(e);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}(t,r)}if("string"==typeof e||Array.isArray(e)){const{name:r,params:i}=this.parseTypeName(e);return this.getTypeInterface(r).decode(this,t,i)}if("object"==typeof e){const i=new z(this),n=this.tempKey();return i.registerStructType(n,e).de(n,t,r)}throw new Error(`Incorrect type passed into the '.de()' function. \n${JSON.stringify(e)}`)}hasType(e){return this.types.has(e)}registerAlias(e,t){return this.types.set(e,t),this}registerType(e,t,r,i=()=>!0){const{name:n,params:s}=this.parseTypeName(e);return this.types.set(n,{encode(e,t,r,i){const n=s.reduce(((e,t,r)=>Object.assign(e,{[t]:i[r]})),{});return this._encodeRaw.call(e,new f(r),t,i,n)},decode(e,t,r){const i=s.reduce(((e,t,i)=>Object.assign(e,{[t]:r[i]})),{});return this._decodeRaw.call(e,new u(t),r,i)},_encodeRaw(e,r,s,a){if(i(r))return t.call(this,e,r,s,a);throw new Error(`Validation failed for type ${n}, data: ${r}`)},_decodeRaw(e,t,i){return r.call(this,e,t,i)}}),this}registerBcsType(e,t){return this.registerType(e,((e,r,i)=>{const n=i.map((e=>new S({name:String(e),write:(t,r)=>{const{name:n,params:s}=this.parseTypeName(e),a=this.getTypeInterface(n),o=s.reduce(((e,t,r)=>Object.assign(e,{[t]:i[r]})),{});return a._encodeRaw.call(this,r,t,s,o)},read:()=>{throw new Error("Not implemented")}})));return t(...n).write(r,e),e}),((e,r)=>{const i=r.map((e=>new S({name:String(e),write:(e,t)=>{throw new Error("Not implemented")},read:t=>{const{name:i,params:n}=this.parseTypeName(e),s=this.getTypeInterface(i),a=n.reduce(((e,t,i)=>Object.assign(e,{[t]:r[i]})),{});return s._decodeRaw.call(this,t,n,a)}})));return t(...i).read(e)})),this}registerAddressType(e,t,r="hex"){switch(r){case"base64":return this.registerType(e,(function(e,t){return a(t).reduce(((e,t)=>e.write8(t)),e)}),(function(e){return h(e.readBytes(t))}));case"hex":return this.registerType(e,(function(e,t){return(0,c.i)(t).reduce(((e,t)=>e.write8(t)),e)}),(function(e){return(0,c.J)(e.readBytes(t))}));default:throw new Error("Unsupported encoding! Use either hex or base64")}}registerVectorType(e){let{name:t,params:r}=this.parseTypeName(e);if(r.length>1)throw new Error("Vector can have only one type parameter; got "+t);return this.registerType(e,(function(t,r,i,n){return t.writeVec(r,((t,r)=>{let s=i[0];if(!s)throw new Error(`Incorrect number of type parameters passed a to vector '${e}'`);let{name:a,params:o}=this.parseTypeName(s);if(this.hasType(a))return this.getTypeInterface(a)._encodeRaw.call(this,t,r,o,n);if(!(a in n))throw new Error(`Unable to find a matching type definition for ${a} in vector; make sure you passed a generic`);let{name:h,params:c}=this.parseTypeName(n[a]);return this.getTypeInterface(h)._encodeRaw.call(this,t,r,c,n)}))}),(function(t,r,i){return t.readVec((t=>{let n=r[0];if(!n)throw new Error(`Incorrect number of type parameters passed to a vector '${e}'`);let{name:s,params:a}=this.parseTypeName(n);if(this.hasType(s))return this.getTypeInterface(s)._decodeRaw.call(this,t,a,i);if(!(s in i))throw new Error(`Unable to find a matching type definition for ${s} in vector; make sure you passed a generic`);let{name:o,params:h}=this.parseTypeName(i[s]);return this.getTypeInterface(o)._decodeRaw.call(this,t,h,i)}))}))}registerStructType(e,t){for(let e in t){let r=this.tempKey(),i=t[e];Array.isArray(i)||"string"==typeof i||(t[e]=r,this.registerStructType(r,i))}let r=Object.freeze(t),i=Object.keys(r),{name:n,params:s}=this.parseTypeName(e);return this.registerType(e,(function(e,t,a,o){if(!t||t.constructor!==Object)throw new Error(`Expected ${n} to be an Object, got: ${t}`);if(a.length!==s.length)throw new Error(`Incorrect number of generic parameters passed; expected: ${s.length}, got: ${a.length}`);for(let h of i){if(!(h in t))throw new Error(`Struct ${n} requires field ${h}:${r[h]}`);const{name:i,params:c}=this.parseTypeName(r[h]);if(s.includes(i)){const r=s.indexOf(i);let{name:c,params:u}=this.parseTypeName(a[r]);if(this.hasType(c)){this.getTypeInterface(c)._encodeRaw.call(this,e,t[h],u,o);continue}if(!(c in o))throw new Error(`Unable to find a matching type definition for ${c} in ${n}; make sure you passed a generic`);let{name:f,params:p}=this.parseTypeName(o[c]);this.getTypeInterface(f)._encodeRaw.call(this,e,t[h],p,o)}else this.getTypeInterface(i)._encodeRaw.call(this,e,t[h],c,o)}return e}),(function(e,t,a){if(t.length!==s.length)throw new Error(`Incorrect number of generic parameters passed; expected: ${s.length}, got: ${t.length}`);let o={};for(let h of i){const{name:i,params:c}=this.parseTypeName(r[h]);if(s.includes(i)){const r=s.indexOf(i);let{name:c,params:u}=this.parseTypeName(t[r]);if(this.hasType(c)){o[h]=this.getTypeInterface(c)._decodeRaw.call(this,e,u,a);continue}if(!(c in a))throw new Error(`Unable to find a matching type definition for ${c} in ${n}; make sure you passed a generic`);let{name:f,params:p}=this.parseTypeName(a[c]);o[h]=this.getTypeInterface(f)._decodeRaw.call(this,e,p,a)}else o[h]=this.getTypeInterface(i)._decodeRaw.call(this,e,c,a)}return o}))}registerEnumType(e,t){for(let e in t){let r=this.tempKey(),i=t[e];null===i||Array.isArray(i)||"string"==typeof i||(t[e]=r,this.registerStructType(r,i))}let r=Object.freeze(t),i=Object.keys(r),{name:n,params:s}=this.parseTypeName(e);return this.registerType(e,(function(e,t,a,o){if(!t)throw new Error(`Unable to write enum "${n}", missing data.\nReceived: "${t}"`);if("object"!=typeof t)throw new Error(`Incorrect data passed into enum "${n}", expected object with properties: "${i.join(" | ")}".\nReceived: "${JSON.stringify(t)}"`);let h=Object.keys(t)[0];if(void 0===h)throw new Error(`Empty object passed as invariant of the enum "${n}"`);let c=i.indexOf(h);if(-1===c)throw new Error(`Unknown invariant of the enum "${n}", allowed values: "${i.join(" | ")}"; received "${h}"`);let u=i[c],f=r[u];if(e.write8(c),null===f)return e;let p=s.indexOf(f),d=-1===p?f:a[p];{let{name:r,params:i}=this.parseTypeName(d);return this.getTypeInterface(r)._encodeRaw.call(this,e,t[h],i,o)}}),(function(e,t,a){let o=e.readULEB(),h=i[o],c=r[h];if(-1===o)throw new Error(`Decoding type mismatch, expected enum "${n}" invariant index, received "${o}"`);if(null===c)return{[h]:!0};let u=s.indexOf(c),f=-1===u?c:t[u];{let{name:t,params:r}=this.parseTypeName(f);return{[h]:this.getTypeInterface(t)._decodeRaw.call(this,e,r,a)}}}))}getTypeInterface(e){let t=this.types.get(e);if("string"==typeof t){let e=[];for(;"string"==typeof t;){if(e.includes(t))throw new Error(`Recursive definition found: ${e.join(" -> ")} -> ${t}`);e.push(t),t=this.types.get(t)}}if(void 0===t)throw new Error(`Type ${e} is not registered`);return t}parseTypeName(e){if(Array.isArray(e)){let[t,...r]=e;return{name:t,params:r}}if("string"!=typeof e)throw new Error(`Illegal type passed as a name of the type: ${e}`);let[t,r]=this.schema.genericSeparators||["<",">"],i=e.indexOf(t),n=Array.from(e).reverse().indexOf(r);if(-1===i&&-1===n)return{name:e,params:[]};if(-1===i||-1===n)throw new Error(`Unclosed generic in name '${e}'`);let s=e.slice(0,i),a=function(e,t=["<",">"]){const[r,i]=t,n=[];let s="",a=0;for(let t=0;t<e.length;t++){const o=e[t];o===r&&a++,o===i&&a--,0!==a||","!==o?s+=o:(n.push(s.trim()),s="")}return n.push(s.trim()),n}(e.slice(i+1,e.length-n-1),this.schema.genericSeparators);return{name:s,params:a}}};let $=z;function I(){return{genericSeparators:["<",">"],vectorType:"vector",addressLength:U,addressEncoding:"hex"}}$.U8="u8",$.U16="u16",$.U32="u32",$.U64="u64",$.U128="u128",$.U256="u256",$.BOOL="bool",$.VECTOR="vector",$.ADDRESS="address",$.STRING="string",$.HEX="hex-string",$.BASE58="base58-string",$.BASE64="base64-string"}}]);
|
|
1
|
+
"use strict";(this.webpackChunkwowok_agent=this.webpackChunkwowok_agent||[]).push([[551],{43:(e,t,r)=>{function i(e){const t=e.startsWith("0x")?e.slice(2):e,r=t.length%2==0?t:`0${t}}`,i=r.match(/.{2}/g)?.map((e=>parseInt(e,16)))??[];return Uint8Array.from(i)}function n(e){return e.reduce(((e,t)=>e+t.toString(16).padStart(2,"0")),"")}r.d(t,{J:()=>n,i:()=>i})},8551:(e,t,r)=>{r.d(t,{r8:()=>z,PN:()=>I});var i=r(9725);const n=e=>i.encode(e),s=e=>i.decode(e);function a(e){return Uint8Array.from(atob(e),(e=>e.charCodeAt(0)))}const o=8192;function h(e){if(e.length<o)return btoa(String.fromCharCode(...e));let t="";for(var r=0;r<e.length;r+=o){const i=e.slice(r,r+o);t+=String.fromCharCode(...i)}return btoa(t)}var c=r(43);class u{constructor(e){this.bytePosition=0,this.dataView=new DataView(e.buffer)}shift(e){return this.bytePosition+=e,this}read8(){let e=this.dataView.getUint8(this.bytePosition);return this.shift(1),e}read16(){let e=this.dataView.getUint16(this.bytePosition,!0);return this.shift(2),e}read32(){let e=this.dataView.getUint32(this.bytePosition,!0);return this.shift(4),e}read64(){let e=this.read32(),t=this.read32().toString(16)+e.toString(16).padStart(8,"0");return BigInt("0x"+t).toString(10)}read128(){let e=BigInt(this.read64()),t=BigInt(this.read64()).toString(16)+e.toString(16).padStart(16,"0");return BigInt("0x"+t).toString(10)}read256(){let e=BigInt(this.read128()),t=BigInt(this.read128()).toString(16)+e.toString(16).padStart(32,"0");return BigInt("0x"+t).toString(10)}readBytes(e){let t=this.bytePosition+this.dataView.byteOffset,r=new Uint8Array(this.dataView.buffer,t,e);return this.shift(e),r}readULEB(){let e=this.bytePosition+this.dataView.byteOffset,t=new Uint8Array(this.dataView.buffer,e),{value:r,length:i}=function(e){let t=0,r=0,i=0;for(;;){let n=e[i];if(i+=1,t|=(127&n)<<r,!(128&n))break;r+=7}return{value:t,length:i}}(t);return this.shift(i),r}readVec(e){let t=this.readULEB(),r=[];for(let i=0;i<t;i++)r.push(e(this,i,t));return r}}class p{constructor({size:e=1024,maxSize:t,allocateSize:r=1024}={}){this.bytePosition=0,this.size=e,this.maxSize=t||e,this.allocateSize=r,this.dataView=new DataView(new ArrayBuffer(e))}ensureSizeOrGrow(e){const t=this.bytePosition+e;if(t>this.size){const e=Math.min(this.maxSize,this.size+this.allocateSize);if(t>e)throw new Error(`Attempting to serialize to BCS, but buffer does not have enough size. Allocated size: ${this.size}, Max size: ${this.maxSize}, Required size: ${t}`);this.size=e;const r=new ArrayBuffer(this.size);new Uint8Array(r).set(new Uint8Array(this.dataView.buffer)),this.dataView=new DataView(r)}}shift(e){return this.bytePosition+=e,this}write8(e){return this.ensureSizeOrGrow(1),this.dataView.setUint8(this.bytePosition,Number(e)),this.shift(1)}write16(e){return this.ensureSizeOrGrow(2),this.dataView.setUint16(this.bytePosition,Number(e),!0),this.shift(2)}write32(e){return this.ensureSizeOrGrow(4),this.dataView.setUint32(this.bytePosition,Number(e),!0),this.shift(4)}write64(e){return f(BigInt(e),8).forEach((e=>this.write8(e))),this}write128(e){return f(BigInt(e),16).forEach((e=>this.write8(e))),this}write256(e){return f(BigInt(e),32).forEach((e=>this.write8(e))),this}writeULEB(e){return function(e){let t=[],r=0;if(0===e)return[0];for(;e>0;)t[r]=127&e,(e>>=7)&&(t[r]|=128),r+=1;return t}(e).forEach((e=>this.write8(e))),this}writeVec(e,t){return this.writeULEB(e.length),Array.from(e).forEach(((r,i)=>t(this,r,i,e.length))),this}*[Symbol.iterator](){for(let e=0;e<this.bytePosition;e++)yield this.dataView.getUint8(e);return this.toBytes()}toBytes(){return new Uint8Array(this.dataView.buffer.slice(0,this.bytePosition))}toString(e){return function(e,t){switch(t){case"base58":return n(e);case"base64":return h(e);case"hex":return(0,c.J)(e);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}(this.toBytes(),e)}}function f(e,t){let r=new Uint8Array(t),i=0;for(;e>0;)r[i]=Number(e%BigInt(256)),e/=BigInt(256),i+=1;return r}var d,l,y,w,g=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},m=(e,t,r)=>(g(e,t,"read from private field"),r?r.call(e):t.get(e)),T=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},b=(e,t,r,i)=>(g(e,t,"write to private field"),i?i.call(e,r):t.set(e,r),r);const S=class{constructor(e){T(this,d,void 0),T(this,l,void 0),this.name=e.name,this.read=e.read,this.serializedSize=e.serializedSize??(()=>null),b(this,d,e.write),b(this,l,e.serialize??((e,t)=>{const r=new p({size:this.serializedSize(e)??void 0,...t});return m(this,d).call(this,e,r),r.toBytes()})),this.validate=e.validate??(()=>{})}write(e,t){this.validate(e),m(this,d).call(this,e,t)}serialize(e,t){return this.validate(e),new U(this,m(this,l).call(this,e,t))}parse(e){const t=new u(e);return this.read(t)}transform({name:e,input:t,output:r}){return new S({name:e??this.name,read:e=>r(this.read(e)),write:(e,r)=>m(this,d).call(this,t(e),r),serializedSize:e=>this.serializedSize(t(e)),serialize:(e,r)=>m(this,l).call(this,t(e),r),validate:e=>this.validate(t(e))})}};let E=S;d=new WeakMap,l=new WeakMap;const v=Symbol.for("@mysten/serialized-bcs");class U{constructor(e,t){T(this,y,void 0),T(this,w,void 0),b(this,y,e),b(this,w,t)}get[v](){return!0}toBytes(){return m(this,w)}toHex(){return(0,c.J)(m(this,w))}toBase64(){return h(m(this,w))}toBase58(){return n(m(this,w))}parse(){return m(this,y).parse(m(this,w))}}y=new WeakMap,w=new WeakMap;const A=32,$=class{constructor(e){if(this.types=new Map,this.counter=0,e instanceof $)return this.schema=e.schema,void(this.types=new Map(e.types));if(this.schema=e,this.registerAddressType($.ADDRESS,e.addressLength,e.addressEncoding),this.registerVectorType(e.vectorType),e.types&&e.types.structs)for(let t of Object.keys(e.types.structs))this.registerStructType(t,e.types.structs[t]);if(e.types&&e.types.enums)for(let t of Object.keys(e.types.enums))this.registerEnumType(t,e.types.enums[t]);if(e.types&&e.types.aliases)for(let t of Object.keys(e.types.aliases))this.registerAlias(t,e.types.aliases[t]);var t;!1!==e.withPrimitives&&((t=this).registerType(z.U8,(function(e,t){return e.write8(t)}),(function(e){return e.read8()}),(e=>e<256)),t.registerType(z.U16,(function(e,t){return e.write16(t)}),(function(e){return e.read16()}),(e=>e<65536)),t.registerType(z.U32,(function(e,t){return e.write32(t)}),(function(e){return e.read32()}),(e=>e<=4294967296n)),t.registerType(z.U64,(function(e,t){return e.write64(t)}),(function(e){return e.read64()})),t.registerType(z.U128,(function(e,t){return e.write128(t)}),(function(e){return e.read128()})),t.registerType(z.U256,(function(e,t){return e.write256(t)}),(function(e){return e.read256()})),t.registerType(z.BOOL,(function(e,t){return e.write8(t)}),(function(e){return"1"===e.read8().toString(10)})),t.registerType(z.STRING,(function(e,t){return e.writeVec(Array.from(t),((e,t)=>e.write8(t.charCodeAt(0))))}),(function(e){return e.readVec((e=>e.read8())).map((e=>String.fromCharCode(Number(e)))).join("")}),(e=>!0)),t.registerType(z.HEX,(function(e,t){return e.writeVec(Array.from((0,c.i)(t)),((e,t)=>e.write8(t)))}),(function(e){let t=e.readVec((e=>e.read8()));return(0,c.J)(new Uint8Array(t))})),t.registerType(z.BASE58,(function(e,t){return e.writeVec(Array.from(s(t)),((e,t)=>e.write8(t)))}),(function(e){let t=e.readVec((e=>e.read8()));return n(new Uint8Array(t))})),t.registerType(z.BASE64,(function(e,t){return e.writeVec(Array.from(a(t)),((e,t)=>e.write8(t)))}),(function(e){let t=e.readVec((e=>e.read8()));return h(new Uint8Array(t))})))}tempKey(){return"bcs-struct-"+ ++this.counter}ser(e,t,r){if("string"==typeof e||Array.isArray(e)){const{name:i,params:n}=this.parseTypeName(e);return this.getTypeInterface(i).encode(this,t,r,n)}if("object"==typeof e){const i=this.tempKey();return new $(this).registerStructType(i,e).ser(i,t,r)}throw new Error(`Incorrect type passed into the '.ser()' function. \n${JSON.stringify(e)}`)}de(e,t,r){if("string"==typeof t){if(!r)throw new Error("To pass a string to `bcs.de`, specify encoding");t=function(e,t){switch(t){case"base58":return s(e);case"base64":return a(e);case"hex":return(0,c.i)(e);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}(t,r)}if("string"==typeof e||Array.isArray(e)){const{name:r,params:i}=this.parseTypeName(e);return this.getTypeInterface(r).decode(this,t,i)}if("object"==typeof e){const i=new $(this),n=this.tempKey();return i.registerStructType(n,e).de(n,t,r)}throw new Error(`Incorrect type passed into the '.de()' function. \n${JSON.stringify(e)}`)}hasType(e){return this.types.has(e)}registerAlias(e,t){return this.types.set(e,t),this}registerType(e,t,r,i=()=>!0){const{name:n,params:s}=this.parseTypeName(e);return this.types.set(n,{encode(e,t,r,i){const n=s.reduce(((e,t,r)=>Object.assign(e,{[t]:i[r]})),{});return this._encodeRaw.call(e,new p(r),t,i,n)},decode(e,t,r){const i=s.reduce(((e,t,i)=>Object.assign(e,{[t]:r[i]})),{});return this._decodeRaw.call(e,new u(t),r,i)},_encodeRaw(e,r,s,a){if(i(r))return t.call(this,e,r,s,a);throw new Error(`Validation failed for type ${n}, data: ${r}`)},_decodeRaw(e,t,i){return r.call(this,e,t,i)}}),this}registerBcsType(e,t){return this.registerType(e,((e,r,i)=>{const n=i.map((e=>new E({name:String(e),write:(t,r)=>{const{name:n,params:s}=this.parseTypeName(e),a=this.getTypeInterface(n),o=s.reduce(((e,t,r)=>Object.assign(e,{[t]:i[r]})),{});return a._encodeRaw.call(this,r,t,s,o)},read:()=>{throw new Error("Not implemented")}})));return t(...n).write(r,e),e}),((e,r)=>{const i=r.map((e=>new E({name:String(e),write:(e,t)=>{throw new Error("Not implemented")},read:t=>{const{name:i,params:n}=this.parseTypeName(e),s=this.getTypeInterface(i),a=n.reduce(((e,t,i)=>Object.assign(e,{[t]:r[i]})),{});return s._decodeRaw.call(this,t,n,a)}})));return t(...i).read(e)})),this}registerAddressType(e,t,r="hex"){switch(r){case"base64":return this.registerType(e,(function(e,t){return a(t).reduce(((e,t)=>e.write8(t)),e)}),(function(e){return h(e.readBytes(t))}));case"hex":return this.registerType(e,(function(e,t){return(0,c.i)(t).reduce(((e,t)=>e.write8(t)),e)}),(function(e){return(0,c.J)(e.readBytes(t))}));default:throw new Error("Unsupported encoding! Use either hex or base64")}}registerVectorType(e){let{name:t,params:r}=this.parseTypeName(e);if(r.length>1)throw new Error("Vector can have only one type parameter; got "+t);return this.registerType(e,(function(t,r,i,n){return t.writeVec(r,((t,r)=>{let s=i[0];if(!s)throw new Error(`Incorrect number of type parameters passed a to vector '${e}'`);let{name:a,params:o}=this.parseTypeName(s);if(this.hasType(a))return this.getTypeInterface(a)._encodeRaw.call(this,t,r,o,n);if(!(a in n))throw new Error(`Unable to find a matching type definition for ${a} in vector; make sure you passed a generic`);let{name:h,params:c}=this.parseTypeName(n[a]);return this.getTypeInterface(h)._encodeRaw.call(this,t,r,c,n)}))}),(function(t,r,i){return t.readVec((t=>{let n=r[0];if(!n)throw new Error(`Incorrect number of type parameters passed to a vector '${e}'`);let{name:s,params:a}=this.parseTypeName(n);if(this.hasType(s))return this.getTypeInterface(s)._decodeRaw.call(this,t,a,i);if(!(s in i))throw new Error(`Unable to find a matching type definition for ${s} in vector; make sure you passed a generic`);let{name:o,params:h}=this.parseTypeName(i[s]);return this.getTypeInterface(o)._decodeRaw.call(this,t,h,i)}))}))}registerStructType(e,t){for(let e in t){let r=this.tempKey(),i=t[e];Array.isArray(i)||"string"==typeof i||(t[e]=r,this.registerStructType(r,i))}let r=Object.freeze(t),i=Object.keys(r),{name:n,params:s}=this.parseTypeName(e);return this.registerType(e,(function(e,t,a,o){if(!t||t.constructor!==Object)throw new Error(`Expected ${n} to be an Object, got: ${t}`);if(a.length!==s.length)throw new Error(`Incorrect number of generic parameters passed; expected: ${s.length}, got: ${a.length}`);for(let h of i){if(!(h in t))throw new Error(`Struct ${n} requires field ${h}:${r[h]}`);const{name:i,params:c}=this.parseTypeName(r[h]);if(s.includes(i)){const r=s.indexOf(i);let{name:c,params:u}=this.parseTypeName(a[r]);if(this.hasType(c)){this.getTypeInterface(c)._encodeRaw.call(this,e,t[h],u,o);continue}if(!(c in o))throw new Error(`Unable to find a matching type definition for ${c} in ${n}; make sure you passed a generic`);let{name:p,params:f}=this.parseTypeName(o[c]);this.getTypeInterface(p)._encodeRaw.call(this,e,t[h],f,o)}else this.getTypeInterface(i)._encodeRaw.call(this,e,t[h],c,o)}return e}),(function(e,t,a){if(t.length!==s.length)throw new Error(`Incorrect number of generic parameters passed; expected: ${s.length}, got: ${t.length}`);let o={};for(let h of i){const{name:i,params:c}=this.parseTypeName(r[h]);if(s.includes(i)){const r=s.indexOf(i);let{name:c,params:u}=this.parseTypeName(t[r]);if(this.hasType(c)){o[h]=this.getTypeInterface(c)._decodeRaw.call(this,e,u,a);continue}if(!(c in a))throw new Error(`Unable to find a matching type definition for ${c} in ${n}; make sure you passed a generic`);let{name:p,params:f}=this.parseTypeName(a[c]);o[h]=this.getTypeInterface(p)._decodeRaw.call(this,e,f,a)}else o[h]=this.getTypeInterface(i)._decodeRaw.call(this,e,c,a)}return o}))}registerEnumType(e,t){for(let e in t){let r=this.tempKey(),i=t[e];null===i||Array.isArray(i)||"string"==typeof i||(t[e]=r,this.registerStructType(r,i))}let r=Object.freeze(t),i=Object.keys(r),{name:n,params:s}=this.parseTypeName(e);return this.registerType(e,(function(e,t,a,o){if(!t)throw new Error(`Unable to write enum "${n}", missing data.\nReceived: "${t}"`);if("object"!=typeof t)throw new Error(`Incorrect data passed into enum "${n}", expected object with properties: "${i.join(" | ")}".\nReceived: "${JSON.stringify(t)}"`);let h=Object.keys(t)[0];if(void 0===h)throw new Error(`Empty object passed as invariant of the enum "${n}"`);let c=i.indexOf(h);if(-1===c)throw new Error(`Unknown invariant of the enum "${n}", allowed values: "${i.join(" | ")}"; received "${h}"`);let u=i[c],p=r[u];if(e.write8(c),null===p)return e;let f=s.indexOf(p),d=-1===f?p:a[f];{let{name:r,params:i}=this.parseTypeName(d);return this.getTypeInterface(r)._encodeRaw.call(this,e,t[h],i,o)}}),(function(e,t,a){let o=e.readULEB(),h=i[o],c=r[h];if(-1===o)throw new Error(`Decoding type mismatch, expected enum "${n}" invariant index, received "${o}"`);if(null===c)return{[h]:!0};let u=s.indexOf(c),p=-1===u?c:t[u];{let{name:t,params:r}=this.parseTypeName(p);return{[h]:this.getTypeInterface(t)._decodeRaw.call(this,e,r,a)}}}))}getTypeInterface(e){let t=this.types.get(e);if("string"==typeof t){let e=[];for(;"string"==typeof t;){if(e.includes(t))throw new Error(`Recursive definition found: ${e.join(" -> ")} -> ${t}`);e.push(t),t=this.types.get(t)}}if(void 0===t)throw new Error(`Type ${e} is not registered`);return t}parseTypeName(e){if(Array.isArray(e)){let[t,...r]=e;return{name:t,params:r}}if("string"!=typeof e)throw new Error(`Illegal type passed as a name of the type: ${e}`);let[t,r]=this.schema.genericSeparators||["<",">"],i=e.indexOf(t),n=Array.from(e).reverse().indexOf(r);if(-1===i&&-1===n)return{name:e,params:[]};if(-1===i||-1===n)throw new Error(`Unclosed generic in name '${e}'`);let s=e.slice(0,i),a=function(e,t=["<",">"]){const[r,i]=t,n=[];let s="",a=0;for(let t=0;t<e.length;t++){const o=e[t];o===r&&a++,o===i&&a--,0!==a||","!==o?s+=o:(n.push(s.trim()),s="")}return n.push(s.trim()),n}(e.slice(i+1,e.length-n-1),this.schema.genericSeparators);return{name:s,params:a}}};let z=$;function I(){return{genericSeparators:["<",">"],vectorType:"vector",addressLength:A,addressEncoding:"hex"}}z.U8="u8",z.U16="u16",z.U32="u32",z.U64="u64",z.U128="u128",z.U256="u256",z.BOOL="bool",z.VECTOR="vector",z.ADDRESS="address",z.STRING="string",z.HEX="hex-string",z.BASE58="base58-string",z.BASE64="base64-string"}}]);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 575.b942536e501c82b2cda8.js.LICENSE.txt */
|
|
2
|
+
"use strict";(this.webpackChunkwowok_agent=this.webpackChunkwowok_agent||[]).push([[575],{2894:(t,e,s)=>{s.d(e,{w:()=>r});var n=s(9286),i=s(7520);class h extends i.Vw{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,(0,n.sd)(t);const s=(0,i.ZJ)(e);if(this.iHash=t.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const h=this.blockLen,r=new Uint8Array(h);r.set(s.length>h?t.create().update(s).digest():s);for(let t=0;t<r.length;t++)r[t]^=54;this.iHash.update(r),this.oHash=t.create();for(let t=0;t<r.length;t++)r[t]^=106;this.oHash.update(r),r.fill(0)}update(t){return(0,n.CC)(this),this.iHash.update(t),this}digestInto(t){(0,n.CC)(this),(0,n.DO)(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:s,finished:n,destroyed:i,blockLen:h,outputLen:r}=this;return t.finished=n,t.destroyed=i,t.blockLen=h,t.outputLen=r,t.oHash=e._cloneInto(t.oHash),t.iHash=s._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const r=(t,e,s)=>new h(t,e).update(s).digest();r.create=(t,e)=>new h(t,e)},3712:(t,e,s)=>{s.d(e,{kw:()=>a});var n=s(9286),i=s(2894),h=s(7520);var r=s(6357);function o(t){if("string"!=typeof t)throw new TypeError("invalid mnemonic type: "+typeof t);return t.normalize("NFKD")}const c=t=>o("mnemonic"+t);function a(t,e=""){return function(t,e,s){const{c:r,dkLen:o,DK:c,PRF:a,PRFSalt:d}=function(t,e,s,r){(0,n.sd)(t);const o=(0,h.tY)({dkLen:32,asyncTick:10},r),{c,dkLen:a,asyncTick:d}=o;if((0,n.Fe)(c),(0,n.Fe)(a),(0,n.Fe)(d),c<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const l=(0,h.ZJ)(e),f=(0,h.ZJ)(s),u=new Uint8Array(a),b=i.w.create(t,l),y=b._cloneInto().update(f);return{c,dkLen:a,asyncTick:d,DK:u,PRF:b,PRFSalt:y}}(t,e,s,{c:2048,dkLen:64});let l;const f=new Uint8Array(4),u=(0,h.O8)(f),b=new Uint8Array(a.outputLen);for(let t=1,e=0;e<o;t++,e+=a.outputLen){const s=c.subarray(e,e+a.outputLen);u.setInt32(0,t,!1),(l=d._cloneInto(l)).update(f).digestInto(b),s.set(b.subarray(0,s.length));for(let t=1;t<r;t++){a._cloneInto(l).update(b).digestInto(b);for(let t=0;t<s.length;t++)s[t]^=b[t]}}return function(t,e,s,n,i){return t.destroy(),e.destroy(),n&&n.destroy(),i.fill(0),s}(a,d,c,l,b)}(r.Zf,function(t){const e=o(t),s=e.split(" ");if(![12,15,18,21,24].includes(s.length))throw new Error("Invalid mnemonic");return{nfkd:e,words:s}}(t).nfkd,c(e))}},5558:(t,e,s)=>{s.d(e,{S:()=>u});var n=s(9286),i=s(7520);const h=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9]);class r extends i.Vw{constructor(t,e,s={},h,r,o){if(super(),this.blockLen=t,this.outputLen=e,this.length=0,this.pos=0,this.finished=!1,this.destroyed=!1,(0,n.Fe)(t),(0,n.Fe)(e),(0,n.Fe)(h),e<0||e>h)throw new Error("outputLen bigger than keyLen");if(void 0!==s.key&&(s.key.length<1||s.key.length>h))throw new Error("key length must be undefined or 1.."+h);if(void 0!==s.salt&&s.salt.length!==r)throw new Error("salt must be undefined or "+r);if(void 0!==s.personalization&&s.personalization.length!==o)throw new Error("personalization must be undefined or "+o);this.buffer=new Uint8Array(t),this.buffer32=(0,i.DH)(this.buffer)}update(t){(0,n.CC)(this);const{blockLen:e,buffer:s,buffer32:h}=this,r=(t=(0,i.ZJ)(t)).length,o=t.byteOffset,c=t.buffer;for(let n=0;n<r;){this.pos===e&&(i.qv||(0,i.Fc)(h),this.compress(h,0,!1),i.qv||(0,i.Fc)(h),this.pos=0);const a=Math.min(e-this.pos,r-n),d=o+n;if(a!==e||d%4||!(n+a<r))s.set(t.subarray(n,n+a),this.pos),this.pos+=a,this.length+=a,n+=a;else{const t=new Uint32Array(c,d,Math.floor((r-n)/4));i.qv||(0,i.Fc)(t);for(let s=0;n+e<r;s+=h.length,n+=e)this.length+=e,this.compress(t,s,!1);i.qv||(0,i.Fc)(t)}}return this}digestInto(t){(0,n.CC)(this),(0,n.Ht)(t,this);const{pos:e,buffer32:s}=this;this.finished=!0,this.buffer.subarray(e).fill(0),i.qv||(0,i.Fc)(s),this.compress(s,0,!0),i.qv||(0,i.Fc)(s);const h=(0,i.DH)(t);this.get().forEach(((t,e)=>h[e]=(0,i.c)(t)))}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const s=t.slice(0,e);return this.destroy(),s}_cloneInto(t){const{buffer:e,length:s,finished:n,destroyed:i,outputLen:h,pos:r}=this;return t||(t=new this.constructor({dkLen:h})),t.set(...this.get()),t.length=s,t.finished=n,t.destroyed=i,t.outputLen=h,t.buffer.set(e),t.pos=r,t}}var o=s(6407);const c=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),a=new Uint32Array(32);function d(t,e,s,n,i,h){const r=i[h],c=i[h+1];let d=a[2*t],l=a[2*t+1],f=a[2*e],u=a[2*e+1],b=a[2*s],y=a[2*s+1],p=a[2*n],g=a[2*n+1],v=o.Ay.add3L(d,f,r);l=o.Ay.add3H(v,l,u,c),d=0|v,({Dh:g,Dl:p}={Dh:g^l,Dl:p^d}),({Dh:g,Dl:p}={Dh:o.Ay.rotr32H(g,p),Dl:o.Ay.rotr32L(g,p)}),({h:y,l:b}=o.Ay.add(y,b,g,p)),({Bh:u,Bl:f}={Bh:u^y,Bl:f^b}),({Bh:u,Bl:f}={Bh:o.Ay.rotrSH(u,f,24),Bl:o.Ay.rotrSL(u,f,24)}),a[2*t]=d,a[2*t+1]=l,a[2*e]=f,a[2*e+1]=u,a[2*s]=b,a[2*s+1]=y,a[2*n]=p,a[2*n+1]=g}function l(t,e,s,n,i,h){const r=i[h],c=i[h+1];let d=a[2*t],l=a[2*t+1],f=a[2*e],u=a[2*e+1],b=a[2*s],y=a[2*s+1],p=a[2*n],g=a[2*n+1],v=o.Ay.add3L(d,f,r);l=o.Ay.add3H(v,l,u,c),d=0|v,({Dh:g,Dl:p}={Dh:g^l,Dl:p^d}),({Dh:g,Dl:p}={Dh:o.Ay.rotrSH(g,p,16),Dl:o.Ay.rotrSL(g,p,16)}),({h:y,l:b}=o.Ay.add(y,b,g,p)),({Bh:u,Bl:f}={Bh:u^y,Bl:f^b}),({Bh:u,Bl:f}={Bh:o.Ay.rotrBH(u,f,63),Bl:o.Ay.rotrBL(u,f,63)}),a[2*t]=d,a[2*t+1]=l,a[2*e]=f,a[2*e+1]=u,a[2*s]=b,a[2*s+1]=y,a[2*n]=p,a[2*n+1]=g}class f extends r{constructor(t={}){super(128,void 0===t.dkLen?64:t.dkLen,t,64,16,16),this.v0l=0|c[0],this.v0h=0|c[1],this.v1l=0|c[2],this.v1h=0|c[3],this.v2l=0|c[4],this.v2h=0|c[5],this.v3l=0|c[6],this.v3h=0|c[7],this.v4l=0|c[8],this.v4h=0|c[9],this.v5l=0|c[10],this.v5h=0|c[11],this.v6l=0|c[12],this.v6h=0|c[13],this.v7l=0|c[14],this.v7h=0|c[15];const e=t.key?t.key.length:0;if(this.v0l^=this.outputLen|e<<8|65536|1<<24,t.salt){const e=(0,i.DH)((0,i.ZJ)(t.salt));this.v4l^=(0,i.c)(e[0]),this.v4h^=(0,i.c)(e[1]),this.v5l^=(0,i.c)(e[2]),this.v5h^=(0,i.c)(e[3])}if(t.personalization){const e=(0,i.DH)((0,i.ZJ)(t.personalization));this.v6l^=(0,i.c)(e[0]),this.v6h^=(0,i.c)(e[1]),this.v7l^=(0,i.c)(e[2]),this.v7h^=(0,i.c)(e[3])}if(t.key){const e=new Uint8Array(this.blockLen);e.set((0,i.ZJ)(t.key)),this.update(e)}}get(){let{v0l:t,v0h:e,v1l:s,v1h:n,v2l:i,v2h:h,v3l:r,v3h:o,v4l:c,v4h:a,v5l:d,v5h:l,v6l:f,v6h:u,v7l:b,v7h:y}=this;return[t,e,s,n,i,h,r,o,c,a,d,l,f,u,b,y]}set(t,e,s,n,i,h,r,o,c,a,d,l,f,u,b,y){this.v0l=0|t,this.v0h=0|e,this.v1l=0|s,this.v1h=0|n,this.v2l=0|i,this.v2h=0|h,this.v3l=0|r,this.v3h=0|o,this.v4l=0|c,this.v4h=0|a,this.v5l=0|d,this.v5h=0|l,this.v6l=0|f,this.v6h=0|u,this.v7l=0|b,this.v7h=0|y}compress(t,e,s){this.get().forEach(((t,e)=>a[e]=t)),a.set(c,16);let{h:n,l:i}=o.Ay.fromBig(BigInt(this.length));a[24]=c[8]^i,a[25]=c[9]^n,s&&(a[28]=~a[28],a[29]=~a[29]);let r=0;const f=h;for(let s=0;s<12;s++)d(0,4,8,12,t,e+2*f[r++]),l(0,4,8,12,t,e+2*f[r++]),d(1,5,9,13,t,e+2*f[r++]),l(1,5,9,13,t,e+2*f[r++]),d(2,6,10,14,t,e+2*f[r++]),l(2,6,10,14,t,e+2*f[r++]),d(3,7,11,15,t,e+2*f[r++]),l(3,7,11,15,t,e+2*f[r++]),d(0,5,10,15,t,e+2*f[r++]),l(0,5,10,15,t,e+2*f[r++]),d(1,6,11,12,t,e+2*f[r++]),l(1,6,11,12,t,e+2*f[r++]),d(2,7,8,13,t,e+2*f[r++]),l(2,7,8,13,t,e+2*f[r++]),d(3,4,9,14,t,e+2*f[r++]),l(3,4,9,14,t,e+2*f[r++]);this.v0l^=a[0]^a[16],this.v0h^=a[1]^a[17],this.v1l^=a[2]^a[18],this.v1h^=a[3]^a[19],this.v2l^=a[4]^a[20],this.v2h^=a[5]^a[21],this.v3l^=a[6]^a[22],this.v3h^=a[7]^a[23],this.v4l^=a[8]^a[24],this.v4h^=a[9]^a[25],this.v5l^=a[10]^a[26],this.v5h^=a[11]^a[27],this.v6l^=a[12]^a[28],this.v6h^=a[13]^a[29],this.v7l^=a[14]^a[30],this.v7h^=a[15]^a[31],a.fill(0)}destroy(){this.destroyed=!0,this.buffer32.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const u=(0,i.t6)((t=>new f(t)))},6357:(t,e,s)=>{s.d(e,{Zf:()=>f});var n=s(9286),i=s(7520);class h extends i.Vw{constructor(t,e,s,n){super(),this.blockLen=t,this.outputLen=e,this.padOffset=s,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,i.O8)(this.buffer)}update(t){(0,n.CC)(this);const{view:e,buffer:s,blockLen:h}=this,r=(t=(0,i.ZJ)(t)).length;for(let n=0;n<r;){const o=Math.min(h-this.pos,r-n);if(o!==h)s.set(t.subarray(n,n+o),this.pos),this.pos+=o,n+=o,this.pos===h&&(this.process(e,0),this.pos=0);else{const e=(0,i.O8)(t);for(;h<=r-n;n+=h)this.process(e,n)}}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,n.CC)(this),(0,n.Ht)(t,this),this.finished=!0;const{buffer:e,view:s,blockLen:h,isLE:r}=this;let{pos:o}=this;e[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>h-o&&(this.process(s,0),o=0);for(let t=o;t<h;t++)e[t]=0;!function(t,e,s,n){if("function"==typeof t.setBigUint64)return t.setBigUint64(e,s,n);const i=BigInt(32),h=BigInt(4294967295),r=Number(s>>i&h),o=Number(s&h),c=n?4:0,a=n?0:4;t.setUint32(e+c,r,n),t.setUint32(e+a,o,n)}(s,h-8,BigInt(8*this.length),r),this.process(s,0);const c=(0,i.O8)(t),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const d=a/4,l=this.get();if(d>l.length)throw new Error("_sha2: outputLen bigger than state");for(let t=0;t<d;t++)c.setUint32(4*t,l[t],r)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const s=t.slice(0,e);return this.destroy(),s}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:s,length:n,finished:i,destroyed:h,pos:r}=this;return t.length=n,t.pos=r,t.finished=i,t.destroyed=h,n%e&&t.buffer.set(s),t}}var r=s(6407);const[o,c]=(()=>r.Ay.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((t=>BigInt(t)))))(),a=new Uint32Array(80),d=new Uint32Array(80);class l extends h{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:t,Al:e,Bh:s,Bl:n,Ch:i,Cl:h,Dh:r,Dl:o,Eh:c,El:a,Fh:d,Fl:l,Gh:f,Gl:u,Hh:b,Hl:y}=this;return[t,e,s,n,i,h,r,o,c,a,d,l,f,u,b,y]}set(t,e,s,n,i,h,r,o,c,a,d,l,f,u,b,y){this.Ah=0|t,this.Al=0|e,this.Bh=0|s,this.Bl=0|n,this.Ch=0|i,this.Cl=0|h,this.Dh=0|r,this.Dl=0|o,this.Eh=0|c,this.El=0|a,this.Fh=0|d,this.Fl=0|l,this.Gh=0|f,this.Gl=0|u,this.Hh=0|b,this.Hl=0|y}process(t,e){for(let s=0;s<16;s++,e+=4)a[s]=t.getUint32(e),d[s]=t.getUint32(e+=4);for(let t=16;t<80;t++){const e=0|a[t-15],s=0|d[t-15],n=r.Ay.rotrSH(e,s,1)^r.Ay.rotrSH(e,s,8)^r.Ay.shrSH(e,s,7),i=r.Ay.rotrSL(e,s,1)^r.Ay.rotrSL(e,s,8)^r.Ay.shrSL(e,s,7),h=0|a[t-2],o=0|d[t-2],c=r.Ay.rotrSH(h,o,19)^r.Ay.rotrBH(h,o,61)^r.Ay.shrSH(h,o,6),l=r.Ay.rotrSL(h,o,19)^r.Ay.rotrBL(h,o,61)^r.Ay.shrSL(h,o,6),f=r.Ay.add4L(i,l,d[t-7],d[t-16]),u=r.Ay.add4H(f,n,c,a[t-7],a[t-16]);a[t]=0|u,d[t]=0|f}let{Ah:s,Al:n,Bh:i,Bl:h,Ch:l,Cl:f,Dh:u,Dl:b,Eh:y,El:p,Fh:g,Fl:v,Gh:x,Gl:A,Hh:w,Hl:L}=this;for(let t=0;t<80;t++){const e=r.Ay.rotrSH(y,p,14)^r.Ay.rotrSH(y,p,18)^r.Ay.rotrBH(y,p,41),H=r.Ay.rotrSL(y,p,14)^r.Ay.rotrSL(y,p,18)^r.Ay.rotrBL(y,p,41),B=y&g^~y&x,k=p&v^~p&A,D=r.Ay.add5L(L,H,k,c[t],d[t]),E=r.Ay.add5H(D,w,e,B,o[t],a[t]),S=0|D,F=r.Ay.rotrSH(s,n,28)^r.Ay.rotrBH(s,n,34)^r.Ay.rotrBH(s,n,39),I=r.Ay.rotrSL(s,n,28)^r.Ay.rotrBL(s,n,34)^r.Ay.rotrBL(s,n,39),U=s&i^s&l^i&l,C=n&h^n&f^h&f;w=0|x,L=0|A,x=0|g,A=0|v,g=0|y,v=0|p,({h:y,l:p}=r.Ay.add(0|u,0|b,0|E,0|S)),u=0|l,b=0|f,l=0|i,f=0|h,i=0|s,h=0|n;const m=r.Ay.add3L(S,I,C);s=r.Ay.add3H(m,E,F,U),n=0|m}({h:s,l:n}=r.Ay.add(0|this.Ah,0|this.Al,0|s,0|n)),({h:i,l:h}=r.Ay.add(0|this.Bh,0|this.Bl,0|i,0|h)),({h:l,l:f}=r.Ay.add(0|this.Ch,0|this.Cl,0|l,0|f)),({h:u,l:b}=r.Ay.add(0|this.Dh,0|this.Dl,0|u,0|b)),({h:y,l:p}=r.Ay.add(0|this.Eh,0|this.El,0|y,0|p)),({h:g,l:v}=r.Ay.add(0|this.Fh,0|this.Fl,0|g,0|v)),({h:x,l:A}=r.Ay.add(0|this.Gh,0|this.Gl,0|x,0|A)),({h:w,l:L}=r.Ay.add(0|this.Hh,0|this.Hl,0|w,0|L)),this.set(s,n,i,h,l,f,u,b,y,p,g,v,x,A,w,L)}roundClean(){a.fill(0),d.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const f=(0,i.ld)((()=>new l))},6407:(t,e,s)=>{s.d(e,{Ay:()=>r});const n=BigInt(2**32-1),i=BigInt(32);function h(t,e=!1){return e?{h:Number(t&n),l:Number(t>>i&n)}:{h:0|Number(t>>i&n),l:0|Number(t&n)}}const r={fromBig:h,split:function(t,e=!1){let s=new Uint32Array(t.length),n=new Uint32Array(t.length);for(let i=0;i<t.length;i++){const{h:r,l:o}=h(t[i],e);[s[i],n[i]]=[r,o]}return[s,n]},toBig:(t,e)=>BigInt(t>>>0)<<i|BigInt(e>>>0),shrSH:(t,e,s)=>t>>>s,shrSL:(t,e,s)=>t<<32-s|e>>>s,rotrSH:(t,e,s)=>t>>>s|e<<32-s,rotrSL:(t,e,s)=>t<<32-s|e>>>s,rotrBH:(t,e,s)=>t<<64-s|e>>>s-32,rotrBL:(t,e,s)=>t>>>s-32|e<<64-s,rotr32H:(t,e)=>e,rotr32L:(t,e)=>t,rotlSH:(t,e,s)=>t<<s|e>>>32-s,rotlSL:(t,e,s)=>e<<s|t>>>32-s,rotlBH:(t,e,s)=>e<<s-32|t>>>64-s,rotlBL:(t,e,s)=>t<<s-32|e>>>64-s,add:function(t,e,s,n){const i=(e>>>0)+(n>>>0);return{h:t+s+(i/2**32|0)|0,l:0|i}},add3L:(t,e,s)=>(t>>>0)+(e>>>0)+(s>>>0),add3H:(t,e,s,n)=>e+s+n+(t/2**32|0)|0,add4L:(t,e,s,n)=>(t>>>0)+(e>>>0)+(s>>>0)+(n>>>0),add4H:(t,e,s,n,i)=>e+s+n+i+(t/2**32|0)|0,add5H:(t,e,s,n,i,h)=>e+s+n+i+h+(t/2**32|0)|0,add5L:(t,e,s,n,i)=>(t>>>0)+(e>>>0)+(s>>>0)+(n>>>0)+(i>>>0)}},7520:(t,e,s)=>{s.d(e,{DH:()=>i,Fc:()=>a,My:()=>l,O8:()=>h,Vw:()=>p,ZJ:()=>y,aT:()=>b,c:()=>c,ld:()=>v,qv:()=>r,t6:()=>x,tY:()=>g});var n=s(9286);function i(t){return new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4))}function h(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}const r=(()=>68===new Uint8Array(new Uint32Array([287454020]).buffer)[0])();function o(t){return t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255}const c=r?t=>t:t=>o(t);function a(t){for(let e=0;e<t.length;e++)t[e]=o(t[e])}const d=Array.from({length:256},((t,e)=>e.toString(16).padStart(2,"0")));function l(t){(0,n.DO)(t);let e="";for(let s=0;s<t.length;s++)e+=d[t[s]];return e}const f={_0:48,_9:57,A:65,F:70,a:97,f:102};function u(t){return t>=f._0&&t<=f._9?t-f._0:t>=f.A&&t<=f.F?t-(f.A-10):t>=f.a&&t<=f.f?t-(f.a-10):void 0}function b(t){if("string"!=typeof t)throw new Error("hex string expected, got "+typeof t);const e=t.length,s=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);const n=new Uint8Array(s);for(let e=0,i=0;e<s;e++,i+=2){const s=u(t.charCodeAt(i)),h=u(t.charCodeAt(i+1));if(void 0===s||void 0===h){const e=t[i]+t[i+1];throw new Error('hex string expected, got non-hex character "'+e+'" at index '+i)}n[e]=16*s+h}return n}function y(t){return"string"==typeof t&&(t=function(t){if("string"!=typeof t)throw new Error("utf8ToBytes expected string, got "+typeof t);return new Uint8Array((new TextEncoder).encode(t))}(t)),(0,n.DO)(t),t}class p{clone(){return this._cloneInto()}}function g(t,e){if(void 0!==e&&"[object Object]"!=={}.toString.call(e))throw new Error("Options should be object or undefined");return Object.assign(t,e)}function v(t){const e=e=>t().update(y(e)).digest(),s=t();return e.outputLen=s.outputLen,e.blockLen=s.blockLen,e.create=()=>t(),e}function x(t){const e=(e,s)=>t(s).update(y(e)).digest(),s=t({});return e.outputLen=s.outputLen,e.blockLen=s.blockLen,e.create=e=>t(e),e}},9286:(t,e,s)=>{function n(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("positive integer expected, got "+t)}function i(t,...e){if(!((s=t)instanceof Uint8Array||ArrayBuffer.isView(s)&&"Uint8Array"===s.constructor.name))throw new Error("Uint8Array expected");var s;if(e.length>0&&!e.includes(t.length))throw new Error("Uint8Array expected of length "+e+", got length="+t.length)}function h(t){if("function"!=typeof t||"function"!=typeof t.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");n(t.outputLen),n(t.blockLen)}function r(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function o(t,e){i(t);const s=e.outputLen;if(t.length<s)throw new Error("digestInto() expects output buffer of length at least "+s)}s.d(e,{CC:()=>r,DO:()=>i,Fe:()=>n,Ht:()=>o,sd:()=>h})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(this.webpackChunkwowok_agent=this.webpackChunkwowok_agent||[]).push([[596],{2693:(e,t,r)=>{r.d(t,{U6:()=>o,sT:()=>s});var i=r(7083),n=r(4480),a=r(2761);function o(e,t){switch(t){case"base58":return(0,i.x)(e);case"base64":return(0,n.o)(e);case"hex":return(0,a.J)(e);default:throw new Error("Unsupported encoding, supported values are: base64, hex")}}function s(e,t=["<",">"]){const[r,i]=t,n=[];let a="",o=0;for(let t=0;t<e.length;t++){const s=e[t];s===r&&o++,s===i&&o--,0!==o||","!==s?a+=s:(n.push(a.trim()),a="")}return n.push(a.trim()),n}},2761:(e,t,r)=>{function i(e){const t=e.startsWith("0x")?e.slice(2):e,r=t.length%2==0?t:`0${t}}`,i=r.match(/.{2}/g)?.map((e=>parseInt(e,16)))??[];return Uint8Array.from(i)}function n(e){return e.reduce(((e,t)=>e+t.toString(16).padStart(2,"0")),"")}r.d(t,{J:()=>n,i:()=>i})},3492:(e,t,r)=>{function i(e){let t=[],r=0;if(0===e)return[0];for(;e>0;)t[r]=127&e,(e>>=7)&&(t[r]|=128),r+=1;return t}function n(e){let t=0,r=0,i=0;for(;;){let n=e[i];if(i+=1,t|=(127&n)<<r,!(128&n))break;r+=7}return{value:t,length:i}}r.d(t,{h:()=>i,j:()=>n})},4480:(e,t,r)=>{function i(e){return Uint8Array.from(atob(e),(e=>e.charCodeAt(0)))}r.d(t,{Z:()=>i,o:()=>a});const n=8192;function a(e){if(e.length<n)return btoa(String.fromCharCode(...e));let t="";for(var r=0;r<e.length;r+=n){const i=e.slice(r,r+n);t+=String.fromCharCode(...i)}return btoa(t)}},5501:(e,t,r)=>{r.d(t,{ju:()=>z,L2:()=>U,Jk:()=>A,u0:()=>B,d_:()=>v,HD:()=>V,$b:()=>$,jo:()=>x});var i=r(7083),n=r(4480),a=r(2761),o=r(3492);class s{constructor(e){this.bytePosition=0,this.dataView=new DataView(e.buffer)}shift(e){return this.bytePosition+=e,this}read8(){let e=this.dataView.getUint8(this.bytePosition);return this.shift(1),e}read16(){let e=this.dataView.getUint16(this.bytePosition,!0);return this.shift(2),e}read32(){let e=this.dataView.getUint32(this.bytePosition,!0);return this.shift(4),e}read64(){let e=this.read32(),t=this.read32().toString(16)+e.toString(16).padStart(8,"0");return BigInt("0x"+t).toString(10)}read128(){let e=BigInt(this.read64()),t=BigInt(this.read64()).toString(16)+e.toString(16).padStart(16,"0");return BigInt("0x"+t).toString(10)}read256(){let e=BigInt(this.read128()),t=BigInt(this.read128()).toString(16)+e.toString(16).padStart(32,"0");return BigInt("0x"+t).toString(10)}readBytes(e){let t=this.bytePosition+this.dataView.byteOffset,r=new Uint8Array(this.dataView.buffer,t,e);return this.shift(e),r}readULEB(){let e=this.bytePosition+this.dataView.byteOffset,t=new Uint8Array(this.dataView.buffer,e),{value:r,length:i}=(0,o.j)(t);return this.shift(i),r}readVec(e){let t=this.readULEB(),r=[];for(let i=0;i<t;i++)r.push(e(this,i,t));return r}}var h=r(2693);class l{constructor({initialSize:e=1024,maxSize:t=1/0,allocateSize:r=1024}={}){this.bytePosition=0,this.size=e,this.maxSize=t,this.allocateSize=r,this.dataView=new DataView(new ArrayBuffer(e))}ensureSizeOrGrow(e){const t=this.bytePosition+e;if(t>this.size){const e=Math.min(this.maxSize,this.size+this.allocateSize);if(t>e)throw new Error(`Attempting to serialize to BCS, but buffer does not have enough size. Allocated size: ${this.size}, Max size: ${this.maxSize}, Required size: ${t}`);this.size=e;const r=new ArrayBuffer(this.size);new Uint8Array(r).set(new Uint8Array(this.dataView.buffer)),this.dataView=new DataView(r)}}shift(e){return this.bytePosition+=e,this}write8(e){return this.ensureSizeOrGrow(1),this.dataView.setUint8(this.bytePosition,Number(e)),this.shift(1)}write16(e){return this.ensureSizeOrGrow(2),this.dataView.setUint16(this.bytePosition,Number(e),!0),this.shift(2)}write32(e){return this.ensureSizeOrGrow(4),this.dataView.setUint32(this.bytePosition,Number(e),!0),this.shift(4)}write64(e){return u(BigInt(e),8).forEach((e=>this.write8(e))),this}write128(e){return u(BigInt(e),16).forEach((e=>this.write8(e))),this}write256(e){return u(BigInt(e),32).forEach((e=>this.write8(e))),this}writeULEB(e){return(0,o.h)(e).forEach((e=>this.write8(e))),this}writeVec(e,t){return this.writeULEB(e.length),Array.from(e).forEach(((r,i)=>t(this,r,i,e.length))),this}*[Symbol.iterator](){for(let e=0;e<this.bytePosition;e++)yield this.dataView.getUint8(e);return this.toBytes()}toBytes(){return new Uint8Array(this.dataView.buffer.slice(0,this.bytePosition))}toString(e){return(0,h.U6)(this.toBytes(),e)}}function u(e,t){let r=new Uint8Array(t),i=0;for(;e>0;)r[i]=Number(e%BigInt(256)),e/=BigInt(256),i+=1;return r}var d,f,w,c,y=e=>{throw TypeError(e)},p=(e,t,r)=>t.has(e)||y("Cannot "+r),g=(e,t,r)=>(p(e,t,"read from private field"),r?r.call(e):t.get(e)),m=(e,t,r)=>t.has(e)?y("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),b=(e,t,r,i)=>(p(e,t,"write to private field"),i?i.call(e,r):t.set(e,r),r);d=new WeakMap,f=new WeakMap;let z=class e{constructor(e){m(this,d),m(this,f),this.name=e.name,this.read=e.read,this.serializedSize=e.serializedSize??(()=>null),b(this,d,e.write),b(this,f,e.serialize??((e,t)=>{const r=new l({initialSize:this.serializedSize(e)??void 0,...t});return g(this,d).call(this,e,r),r.toBytes()})),this.validate=e.validate??(()=>{})}write(e,t){this.validate(e),g(this,d).call(this,e,t)}serialize(e,t){return this.validate(e),new S(this,g(this,f).call(this,e,t))}parse(e){const t=new s(e);return this.read(t)}fromHex(e){return this.parse((0,a.i)(e))}fromBase58(e){return this.parse((0,i.Q)(e))}fromBase64(e){return this.parse((0,n.Z)(e))}transform({name:t,input:r,output:i,validate:n}){return new e({name:t??this.name,read:e=>i(this.read(e)),write:(e,t)=>g(this,d).call(this,r(e),t),serializedSize:e=>this.serializedSize(r(e)),serialize:(e,t)=>g(this,f).call(this,r(e),t),validate:e=>{n?.(e),this.validate(r(e))}})}};const E=Symbol.for("@mysten/serialized-bcs");function v(e){return!!e&&"object"==typeof e&&!0===e[E]}class S{constructor(e,t){m(this,w),m(this,c),b(this,w,e),b(this,c,t)}get[E](){return!0}toBytes(){return g(this,c)}toHex(){return(0,a.J)(g(this,c))}toBase64(){return(0,n.o)(g(this,c))}toBase58(){return(0,i.x)(g(this,c))}parse(){return g(this,w).parse(g(this,c))}}function B({size:e,...t}){return new z({...t,serializedSize:()=>e})}function x({readMethod:e,writeMethod:t,...r}){return B({...r,read:t=>t[e](),write:(e,r)=>r[t](e),validate:e=>{if(e<0||e>r.maxValue)throw new TypeError(`Invalid ${r.name} value: ${e}. Expected value in range 0-${r.maxValue}`);r.validate?.(e)}})}function U({readMethod:e,writeMethod:t,...r}){return B({...r,read:t=>t[e](),write:(e,r)=>r[t](BigInt(e)),validate:e=>{const t=BigInt(e);if(t<0||t>r.maxValue)throw new TypeError(`Invalid ${r.name} value: ${t}. Expected value in range 0-${r.maxValue}`);r.validate?.(t)}})}function A({serialize:e,...t}){const r=new z({...t,serialize:e,write:(e,t)=>{for(const i of r.serialize(e).toBytes())t.write8(i)}});return r}function $({toBytes:e,fromBytes:t,...r}){return new z({...r,read:e=>{const r=e.readULEB(),i=e.readBytes(r);return t(i)},write:(t,r)=>{const i=e(t);r.writeULEB(i.length);for(let e=0;e<i.length;e++)r.write8(i[e])},serialize:t=>{const r=e(t),i=(0,o.h)(r.length),n=new Uint8Array(i.length+r.length);return n.set(i,0),n.set(r,i.length),n},validate:e=>{if("string"!=typeof e)throw new TypeError(`Invalid ${r.name} value: ${e}. Expected string`);r.validate?.(e)}})}function V(e){let t=null;function r(){return t||(t=e()),t}return new z({name:"lazy",read:e=>r().read(e),serializedSize:e=>r().serializedSize(e),write:(e,t)=>r().write(e,t),serialize:(e,t)=>r().serialize(e,t).toBytes()})}w=new WeakMap,c=new WeakMap},7083:(e,t,r)=>{r.d(t,{Q:()=>a,x:()=>n});const i=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");const t=new Uint8Array(256);for(let e=0;e<t.length;e++)t[e]=255;for(let r=0;r<e.length;r++){const i=e.charAt(r),n=i.charCodeAt(0);if(255!==t[n])throw new TypeError(i+" is ambiguous");t[n]=r}const r=e.length,i=e.charAt(0),n=Math.log(r)/Math.log(256),a=Math.log(256)/Math.log(r);function o(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;let a=0,o=0,s=0;for(;e[a]===i;)o++,a++;const h=(e.length-a)*n+1>>>0,l=new Uint8Array(h);for(;e[a];){let i=t[e.charCodeAt(a)];if(255===i)return;let n=0;for(let e=h-1;(0!==i||n<s)&&-1!==e;e--,n++)i+=r*l[e]>>>0,l[e]=i%256>>>0,i=i/256>>>0;if(0!==i)throw new Error("Non-zero carry");s=n,a++}let u=h-s;for(;u!==h&&0===l[u];)u++;const d=new Uint8Array(o+(h-u));let f=o;for(;u!==h;)d[f++]=l[u++];return d}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===t.length)return"";let n=0,o=0,s=0;const h=t.length;for(;s!==h&&0===t[s];)s++,n++;const l=(h-s)*a+1>>>0,u=new Uint8Array(l);for(;s!==h;){let e=t[s],i=0;for(let t=l-1;(0!==e||i<o)&&-1!==t;t--,i++)e+=256*u[t]>>>0,u[t]=e%r>>>0,e=e/r>>>0;if(0!==e)throw new Error("Non-zero carry");o=i,s++}let d=l-o;for(;d!==l&&0===u[d];)d++;let f=i.repeat(n);for(;d<l;++d)f+=e.charAt(u[d]);return f},decodeUnsafe:o,decode:function(e){const t=o(e);if(t)return t;throw new Error("Non-base"+r+" character")}}}("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),n=e=>i.encode(e),a=e=>i.decode(e)},8596:(e,t,r)=>{r.d(t,{j:()=>a});var i=r(5501),n=r(3492);const a={u8:e=>(0,i.jo)({name:"u8",readMethod:"read8",writeMethod:"write8",size:1,maxValue:255,...e}),u16:e=>(0,i.jo)({name:"u16",readMethod:"read16",writeMethod:"write16",size:2,maxValue:65535,...e}),u32:e=>(0,i.jo)({name:"u32",readMethod:"read32",writeMethod:"write32",size:4,maxValue:2**32-1,...e}),u64:e=>(0,i.L2)({name:"u64",readMethod:"read64",writeMethod:"write64",size:8,maxValue:2n**64n-1n,...e}),u128:e=>(0,i.L2)({name:"u128",readMethod:"read128",writeMethod:"write128",size:16,maxValue:2n**128n-1n,...e}),u256:e=>(0,i.L2)({name:"u256",readMethod:"read256",writeMethod:"write256",size:32,maxValue:2n**256n-1n,...e}),bool:e=>(0,i.u0)({name:"bool",size:1,read:e=>1===e.read8(),write:(e,t)=>t.write8(e?1:0),...e,validate:t=>{if(e?.validate?.(t),"boolean"!=typeof t)throw new TypeError("Expected boolean, found "+typeof t)}}),uleb128:e=>(0,i.Jk)({name:"uleb128",read:e=>e.readULEB(),serialize:e=>Uint8Array.from((0,n.h)(e)),...e}),bytes:(e,t)=>(0,i.u0)({name:`bytes[${e}]`,size:e,read:t=>t.readBytes(e),write:(t,r)=>{for(let i=0;i<e;i++)r.write8(t[i]??0)},...t,validate:r=>{if(t?.validate?.(r),!r||"object"!=typeof r||!("length"in r))throw new TypeError("Expected array, found "+typeof r);if(r.length!==e)throw new TypeError(`Expected array of length ${e}, found ${r.length}`)}}),string:e=>(0,i.$b)({name:"string",toBytes:e=>(new TextEncoder).encode(e),fromBytes:e=>(new TextDecoder).decode(e),...e}),fixedArray:(e,t,r)=>new i.ju({name:`${t.name}[${e}]`,read:r=>{const i=new Array(e);for(let n=0;n<e;n++)i[n]=t.read(r);return i},write:(e,r)=>{for(const i of e)t.write(i,r)},...r,validate:t=>{if(r?.validate?.(t),!t||"object"!=typeof t||!("length"in t))throw new TypeError("Expected array, found "+typeof t);if(t.length!==e)throw new TypeError(`Expected array of length ${e}, found ${t.length}`)}}),option:e=>a.enum(`Option<${e.name}>`,{None:null,Some:e}).transform({input:e=>null==e?{None:!0}:{Some:e},output:e=>"Some"===e.$kind?e.Some:null}),vector:(e,t)=>new i.ju({name:`vector<${e.name}>`,read:t=>{const r=t.readULEB(),i=new Array(r);for(let n=0;n<r;n++)i[n]=e.read(t);return i},write:(t,r)=>{r.writeULEB(t.length);for(const i of t)e.write(i,r)},...t,validate:e=>{if(t?.validate?.(e),!e||"object"!=typeof e||!("length"in e))throw new TypeError("Expected array, found "+typeof e)}}),tuple:(e,t)=>new i.ju({name:`(${e.map((e=>e.name)).join(", ")})`,serializedSize:t=>{let r=0;for(let i=0;i<e.length;i++){const n=e[i].serializedSize(t[i]);if(null==n)return null;r+=n}return r},read:t=>{const r=[];for(const i of e)r.push(i.read(t));return r},write:(t,r)=>{for(let i=0;i<e.length;i++)e[i].write(t[i],r)},...t,validate:r=>{if(t?.validate?.(r),!Array.isArray(r))throw new TypeError("Expected array, found "+typeof r);if(r.length!==e.length)throw new TypeError(`Expected array of length ${e.length}, found ${r.length}`)}}),struct(e,t,r){const n=Object.entries(t);return new i.ju({name:e,serializedSize:e=>{let t=0;for(const[r,i]of n){const n=i.serializedSize(e[r]);if(null==n)return null;t+=n}return t},read:e=>{const t={};for(const[r,i]of n)t[r]=i.read(e);return t},write:(e,t)=>{for(const[r,i]of n)i.write(e[r],t)},...r,validate:e=>{if(r?.validate?.(e),"object"!=typeof e||null==e)throw new TypeError("Expected object, found "+typeof e)}})},enum(e,t,r){const n=Object.entries(t);return new i.ju({name:e,read:t=>{const r=t.readULEB(),i=n[r];if(!i)throw new TypeError(`Unknown value ${r} for enum ${e}`);const[a,o]=i;return{[a]:o?.read(t)??!0,$kind:a}},write:(e,r)=>{const[i,a]=Object.entries(e).filter((([e])=>Object.hasOwn(t,e)))[0];for(let e=0;e<n.length;e++){const[t,o]=n[e];if(t===i)return r.writeULEB(e),void o?.write(a,r)}},...r,validate:i=>{if(r?.validate?.(i),"object"!=typeof i||null==i)throw new TypeError("Expected object, found "+typeof i);const n=Object.keys(i).filter((e=>void 0!==i[e]&&Object.hasOwn(t,e)));if(1!==n.length)throw new TypeError(`Expected object with one key, but found ${n.length} for type ${e}}`);const[a]=n;if(!Object.hasOwn(t,a))throw new TypeError(`Invalid enum variant ${a}`)}})},map:(e,t)=>a.vector(a.tuple([e,t])).transform({name:`Map<${e.name}, ${t.name}>`,input:e=>[...e.entries()],output:e=>{const t=new Map;for(const[r,i]of e)t.set(r,i);return t}}),lazy:e=>(0,i.HD)(e)}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(this.webpackChunkwowok_agent=this.webpackChunkwowok_agent||[]).push([[640],{22:e=>{e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),t=0;t<r.length;t++)r[t]=255;for(var n=0;n<e.length;n++){var o=e.charAt(n),i=o.charCodeAt(0);if(255!==r[i])throw new TypeError(o+" is ambiguous");r[i]=n}var a=e.length,c=e.charAt(0),s=Math.log(a)/Math.log(256),d=Math.log(256)/Math.log(a);function u(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;for(var t=0,n=0,o=0;e[t]===c;)n++,t++;for(var i=(e.length-t)*s+1>>>0,d=new Uint8Array(i);e[t];){var u=r[e.charCodeAt(t)];if(255===u)return;for(var h=0,l=i-1;(0!==u||h<o)&&-1!==l;l--,h++)u+=a*d[l]>>>0,d[l]=u%256>>>0,u=u/256>>>0;if(0!==u)throw new Error("Non-zero carry");o=h,t++}for(var f=i-o;f!==i&&0===d[f];)f++;for(var A=new Uint8Array(n+(i-f)),v=n;f!==i;)A[v++]=d[f++];return A}return{encode:function(r){if(r instanceof Uint8Array||(ArrayBuffer.isView(r)?r=new Uint8Array(r.buffer,r.byteOffset,r.byteLength):Array.isArray(r)&&(r=Uint8Array.from(r))),!(r instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===r.length)return"";for(var t=0,n=0,o=0,i=r.length;o!==i&&0===r[o];)o++,t++;for(var s=(i-o)*d+1>>>0,u=new Uint8Array(s);o!==i;){for(var h=r[o],l=0,f=s-1;(0!==h||l<n)&&-1!==f;f--,l++)h+=256*u[f]>>>0,u[f]=h%a>>>0,h=h/a>>>0;if(0!==h)throw new Error("Non-zero carry");n=l,o++}for(var A=s-n;A!==s&&0===u[A];)A++;for(var v=c.repeat(t);A<s;++A)v+=e.charAt(u[A]);return v},decodeUnsafe:u,decode:function(e){var r=u(e);if(r)return r;throw new Error("Non-base"+a+" character")}}}},5333:(e,r)=>{r.I=void 0;const t="qpzry9x8gf2tvdw0s3jn54khce6mua7l",n={};for(let e=0;e<32;e++){const r=t.charAt(e);n[r]=e}function o(e){const r=e>>25;return(33554431&e)<<5^996825010&-(1&r)^642813549&-(r>>1&1)^513874426&-(r>>2&1)^1027748829&-(r>>3&1)^705979059&-(r>>4&1)}function i(e){let r=1;for(let t=0;t<e.length;++t){const n=e.charCodeAt(t);if(n<33||n>126)return"Invalid prefix ("+e+")";r=o(r)^n>>5}r=o(r);for(let t=0;t<e.length;++t){const n=e.charCodeAt(t);r=o(r)^31&n}return r}function a(e,r,t,n){let o=0,i=0;const a=(1<<t)-1,c=[];for(let n=0;n<e.length;++n)for(o=o<<r|e[n],i+=r;i>=t;)i-=t,c.push(o>>i&a);if(n)i>0&&c.push(o<<t-i&a);else{if(i>=r)return"Excess padding";if(o<<t-i&a)return"Non-zero padding"}return c}function c(e){return a(e,8,5,!0)}function s(e){const r=a(e,5,8,!1);if(Array.isArray(r))return r}function d(e){const r=a(e,5,8,!1);if(Array.isArray(r))return r;throw new Error(r)}function u(e){let r;function a(e,t){if(t=t||90,e.length<8)return e+" too short";if(e.length>t)return"Exceeds length limit";const a=e.toLowerCase(),c=e.toUpperCase();if(e!==a&&e!==c)return"Mixed-case string "+e;const s=(e=a).lastIndexOf("1");if(-1===s)return"No separator character for "+e;if(0===s)return"Missing prefix for "+e;const d=e.slice(0,s),u=e.slice(s+1);if(u.length<6)return"Data too short";let h=i(d);if("string"==typeof h)return h;const l=[];for(let e=0;e<u.length;++e){const r=u.charAt(e),t=n[r];if(void 0===t)return"Unknown character "+r;h=o(h)^t,e+6>=u.length||l.push(t)}return h!==r?"Invalid checksum for "+e:{prefix:d,words:l}}return r="bech32"===e?1:734539939,{decodeUnsafe:function(e,r){const t=a(e,r);if("object"==typeof t)return t},decode:function(e,r){const t=a(e,r);if("object"==typeof t)return t;throw new Error(t)},encode:function(e,n,a){if(a=a||90,e.length+7+n.length>a)throw new TypeError("Exceeds length limit");let c=i(e=e.toLowerCase());if("string"==typeof c)throw new Error(c);let s=e+"1";for(let e=0;e<n.length;++e){const r=n[e];if(r>>5)throw new Error("Non 5-bit word");c=o(c)^r,s+=t.charAt(r)}for(let e=0;e<6;++e)c=o(c);c^=r;for(let e=0;e<6;++e)s+=t.charAt(c>>5*(5-e)&31);return s},toWords:c,fromWordsUnsafe:s,fromWords:d}}r.I=u("bech32"),u("bech32m")},9297:(e,r,t)=>{t.d(r,{b8:()=>i,qg:()=>N});var n,o,i={NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType"};class a extends Error{constructor(e,r,t,n,o,i,a){super(e),this.name="GraphQLError",this.message=e,o&&(this.path=o),r&&(this.nodes=Array.isArray(r)?r:[r]),t&&(this.source=t),n&&(this.positions=n),i&&(this.originalError=i);var c=a;if(!c&&i){var s=i.extensions;s&&"object"==typeof s&&(c=s)}this.extensions=c||{}}toJSON(){return{...this,message:this.message}}toString(){return this.message}get[Symbol.toStringTag](){return"GraphQLError"}}function c(e){return new a(`Syntax Error: Unexpected token at ${o} in ${e}`)}function s(e){if(e.lastIndex=o,e.test(n))return n.slice(o,o=e.lastIndex)}var d=/ +(?=[^\s])/y;function u(e){for(var r=e.split("\n"),t="",n=0,o=0,i=r.length-1,a=0;a<r.length;a++)d.lastIndex=0,d.test(r[a])&&(a&&(!n||d.lastIndex<n)&&(n=d.lastIndex),o=o||a,i=a);for(var c=o;c<=i;c++)c!==o&&(t+="\n"),t+=r[c].slice(n).replace(/\\"""/g,'"""');return t}function h(){for(var e=0|n.charCodeAt(o++);9===e||10===e||13===e||32===e||35===e||44===e||65279===e;e=0|n.charCodeAt(o++))if(35===e)for(;10!==(e=n.charCodeAt(o++))&&13!==e;);o--}function l(){for(var e=o,r=0|n.charCodeAt(o++);r>=48&&r<=57||r>=65&&r<=90||95===r||r>=97&&r<=122;r=0|n.charCodeAt(o++));if(e===o-1)throw c("Name");var t=n.slice(e,--o);return h(),t}function f(){return{kind:"Name",value:l()}}var A=/(?:"""|(?:[\s\S]*?[^\\])""")/y,v=/(?:(?:\.\d+)?[eE][+-]?\d+|\.\d+)/y;function p(e){var r;switch(n.charCodeAt(o)){case 91:o++,h();for(var t=[];93!==n.charCodeAt(o);)t.push(p(e));return o++,h(),{kind:"ListValue",values:t};case 123:o++,h();for(var i=[];125!==n.charCodeAt(o);){var a=f();if(58!==n.charCodeAt(o++))throw c("ObjectField");h(),i.push({kind:"ObjectField",name:a,value:p(e)})}return o++,h(),{kind:"ObjectValue",fields:i};case 36:if(e)throw c("Variable");return o++,{kind:"Variable",name:f()};case 34:if(34===n.charCodeAt(o+1)&&34===n.charCodeAt(o+2)){if(o+=3,null==(r=s(A)))throw c("StringValue");return h(),{kind:"StringValue",value:u(r.slice(0,-3)),block:!0}}var d,g=o;o++;var C=!1;for(d=0|n.charCodeAt(o++);92===d&&(o++,C=!0)||10!==d&&13!==d&&34!==d&&d;d=0|n.charCodeAt(o++));if(34!==d)throw c("StringValue");return r=n.slice(g,o),h(),{kind:"StringValue",value:C?JSON.parse(r):r.slice(1,-1),block:!1};case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:for(var w,m=o++;(w=0|n.charCodeAt(o++))>=48&&w<=57;);var y=n.slice(m,--o);if(46===(w=n.charCodeAt(o))||69===w||101===w){if(null==(r=s(v)))throw c("FloatValue");return h(),{kind:"FloatValue",value:y+r}}return h(),{kind:"IntValue",value:y};case 110:if(117===n.charCodeAt(o+1)&&108===n.charCodeAt(o+2)&&108===n.charCodeAt(o+3))return o+=4,h(),{kind:"NullValue"};break;case 116:if(114===n.charCodeAt(o+1)&&117===n.charCodeAt(o+2)&&101===n.charCodeAt(o+3))return o+=4,h(),{kind:"BooleanValue",value:!0};break;case 102:if(97===n.charCodeAt(o+1)&&108===n.charCodeAt(o+2)&&115===n.charCodeAt(o+3)&&101===n.charCodeAt(o+4))return o+=5,h(),{kind:"BooleanValue",value:!1}}return{kind:"EnumValue",value:l()}}function g(e){if(40===n.charCodeAt(o)){var r=[];o++,h();do{var t=f();if(58!==n.charCodeAt(o++))throw c("Argument");h(),r.push({kind:"Argument",name:t,value:p(e)})}while(41!==n.charCodeAt(o));return o++,h(),r}}function C(e){if(64===n.charCodeAt(o)){var r=[];do{o++,r.push({kind:"Directive",name:f(),arguments:g(e)})}while(64===n.charCodeAt(o));return r}}function w(){for(var e=0;91===n.charCodeAt(o);)e++,o++,h();var r={kind:"NamedType",name:f()};do{if(33===n.charCodeAt(o)&&(o++,h(),r={kind:"NonNullType",type:r}),e){if(93!==n.charCodeAt(o++))throw c("NamedType");h(),r={kind:"ListType",type:r}}}while(e--);return r}function m(){if(123!==n.charCodeAt(o++))throw c("SelectionSet");return h(),y()}function y(){var e=[];do{if(46===n.charCodeAt(o)){if(46!==n.charCodeAt(++o)||46!==n.charCodeAt(++o))throw c("SelectionSet");switch(o++,h(),n.charCodeAt(o)){case 64:e.push({kind:"InlineFragment",typeCondition:void 0,directives:C(!1),selectionSet:m()});break;case 111:110===n.charCodeAt(o+1)?(o+=2,h(),e.push({kind:"InlineFragment",typeCondition:{kind:"NamedType",name:f()},directives:C(!1),selectionSet:m()})):e.push({kind:"FragmentSpread",name:f(),directives:C(!1)});break;case 123:o++,h(),e.push({kind:"InlineFragment",typeCondition:void 0,directives:void 0,selectionSet:y()});break;default:e.push({kind:"FragmentSpread",name:f(),directives:C(!1)})}}else{var r=f(),t=void 0;58===n.charCodeAt(o)&&(o++,h(),t=r,r=f());var i=g(!1),a=C(!1),s=void 0;123===n.charCodeAt(o)&&(o++,h(),s=y()),e.push({kind:"Field",alias:t,name:r,arguments:i,directives:a,selectionSet:s})}}while(125!==n.charCodeAt(o));return o++,h(),{kind:"SelectionSet",selections:e}}function k(){if(h(),40===n.charCodeAt(o)){var e=[];o++,h();do{if(36!==n.charCodeAt(o++))throw c("Variable");var r=f();if(58!==n.charCodeAt(o++))throw c("VariableDefinition");h();var t=w(),i=void 0;61===n.charCodeAt(o)&&(o++,h(),i=p(!0)),h(),e.push({kind:"VariableDefinition",variable:{kind:"Variable",name:r},type:t,defaultValue:i,directives:C(!0)})}while(41!==n.charCodeAt(o));return o++,h(),e}}function E(){var e=f();if(111!==n.charCodeAt(o++)||110!==n.charCodeAt(o++))throw c("FragmentDefinition");return h(),{kind:"FragmentDefinition",name:e,typeCondition:{kind:"NamedType",name:f()},directives:C(!1),selectionSet:m()}}function b(){var e=[];do{if(123===n.charCodeAt(o))o++,h(),e.push({kind:"OperationDefinition",operation:"query",name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:y()});else{var r=l();switch(r){case"fragment":e.push(E());break;case"query":case"mutation":case"subscription":var t,i=void 0;40!==(t=n.charCodeAt(o))&&64!==t&&123!==t&&(i=f()),e.push({kind:"OperationDefinition",operation:r,name:i,variableDefinitions:k(),directives:C(!1),selectionSet:m()});break;default:throw c("Document")}}}while(o<n.length);return e}function N(e,r){return n=e.body?e.body:e,o=0,h(),r&&r.noLocation?{kind:"Document",definitions:b()}:{kind:"Document",definitions:b(),loc:{start:0,end:n.length,startToken:void 0,endToken:void 0,source:{body:n,name:"graphql.web",locationOffset:{line:1,column:1}}}}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(this.webpackChunkwowok_agent=this.webpackChunkwowok_agent||[]).push([[647],{1257:(e,n,t)=>{t.d(n,{M5:()=>a,QR:()=>I,VH:()=>o,Yj:()=>d,ef:()=>l,ko:()=>v,mH:()=>c,pl:()=>y,py:()=>s,xJ:()=>u});var i=t(6044),r=t(3154);function s(e){const n=Object.entries(e).map((([e,n])=>(0,i.Ikc)({[e]:n})));return(0,i.FsL)((0,i.KCZ)(n),(0,i.pdi)((e=>({...e,$kind:Object.keys(e)[0]}))))}const a=(0,i.FsL)((0,i.YjP)(),(0,i.pdi)((e=>(0,r.t4)(e))),(0,i.z6Y)(r.AP)),o=a,c=(0,i.YjP)(),d=(0,i.FsL)((0,i.KCZ)([(0,i.YjP)(),(0,i.FsL)((0,i.aig)(),(0,i.ndf)())]),(0,i.z6Y)((e=>{try{return BigInt(e),BigInt(e)>=0&&BigInt(e)<=18446744073709551615n}catch{return!1}}),"Invalid u64")),u=(0,i.Ikc)({objectId:a,version:d,digest:(0,i.YjP)()}),l=(0,i.FsL)((0,i.KCZ)([(0,i.Ikc)({GasCoin:(0,i.euz)(!0)}),(0,i.Ikc)({Input:(0,i.FsL)((0,i.aig)(),(0,i.ndf)()),type:(0,i.lqM)((0,i.euz)("pure"))}),(0,i.Ikc)({Input:(0,i.FsL)((0,i.aig)(),(0,i.ndf)()),type:(0,i.lqM)((0,i.euz)("object"))}),(0,i.Ikc)({Result:(0,i.FsL)((0,i.aig)(),(0,i.ndf)())}),(0,i.Ikc)({NestedResult:(0,i.PVZ)([(0,i.FsL)((0,i.aig)(),(0,i.ndf)()),(0,i.FsL)((0,i.aig)(),(0,i.ndf)())])})]),(0,i.pdi)((e=>({...e,$kind:Object.keys(e)[0]})))),g=(0,i.Ikc)({budget:(0,i.mee)(d),price:(0,i.mee)(d),owner:(0,i.mee)(a),payment:(0,i.mee)((0,i.YOg)(u))}),p=((0,i.Ikc)({address:(0,i.YjP)(),module:(0,i.YjP)(),name:(0,i.YjP)(),typeParams:(0,i.YOg)((0,i.YjP)())}),(0,i.KCZ)([(0,i.euz)("address"),(0,i.euz)("bool"),(0,i.euz)("u8"),(0,i.euz)("u16"),(0,i.euz)("u32"),(0,i.euz)("u64"),(0,i.euz)("u128"),(0,i.euz)("u256"),(0,i.Ikc)({vector:(0,i.RZV)((()=>p))}),(0,i.Ikc)({datatype:(0,i.Ikc)({package:(0,i.YjP)(),module:(0,i.YjP)(),type:(0,i.YjP)(),typeParameters:(0,i.YOg)((0,i.RZV)((()=>p)))})}),(0,i.Ikc)({typeParameter:(0,i.FsL)((0,i.aig)(),(0,i.ndf)())})])),m=(0,i.Ikc)({ref:(0,i.mee)((0,i.KCZ)([(0,i.euz)("&"),(0,i.euz)("&mut")])),body:p}),b=(0,i.Ikc)({package:o,module:(0,i.YjP)(),function:(0,i.YjP)(),typeArguments:(0,i.YOg)((0,i.YjP)()),arguments:(0,i.YOg)(l),_argumentTypes:(0,i.lqM)((0,i.mee)((0,i.YOg)(m)))}),j=(0,i.Ikc)({name:(0,i.YjP)(),inputs:(0,i.g1P)((0,i.YjP)(),(0,i.KCZ)([l,(0,i.YOg)(l)])),data:(0,i.g1P)((0,i.YjP)(),(0,i.L5J)())}),f=s({MoveCall:b,TransferObjects:(0,i.Ikc)({objects:(0,i.YOg)(l),address:l}),SplitCoins:(0,i.Ikc)({coin:l,amounts:(0,i.YOg)(l)}),MergeCoins:(0,i.Ikc)({destination:l,sources:(0,i.YOg)(l)}),Publish:(0,i.Ikc)({modules:(0,i.YOg)(c),dependencies:(0,i.YOg)(o)}),MakeMoveVec:(0,i.Ikc)({type:(0,i.mee)((0,i.YjP)()),elements:(0,i.YOg)(l)}),Upgrade:(0,i.Ikc)({modules:(0,i.YOg)(c),dependencies:(0,i.YOg)(o),package:o,ticket:l}),$Intent:j}),O=s({ImmOrOwnedObject:u,SharedObject:(0,i.Ikc)({objectId:o,initialSharedVersion:d,mutable:(0,i.zMY)()}),Receiving:u}),k=s({Object:O,Pure:(0,i.Ikc)({bytes:c}),UnresolvedPure:(0,i.Ikc)({value:(0,i.L5J)()}),UnresolvedObject:(0,i.Ikc)({objectId:o,version:(0,i.lqM)((0,i.mee)(d)),digest:(0,i.lqM)((0,i.mee)((0,i.YjP)())),initialSharedVersion:(0,i.lqM)((0,i.mee)(d))})}),I=s({Object:O,Pure:(0,i.Ikc)({bytes:c})}),v=s({None:(0,i.euz)(!0),Epoch:d}),y=(0,i.Ikc)({version:(0,i.euz)(2),sender:(0,i.cl6)(a),expiration:(0,i.cl6)(v),gasData:g,inputs:(0,i.YOg)(k),commands:(0,i.YOg)(f)})},3137:(e,n,t)=>{t.d(n,{Sm:()=>C,ef:()=>M});var i=t(4480),r=t(6044),s=t(4012),a=t(1257);const o=(0,r.Ikc)({digest:(0,r.YjP)(),objectId:(0,r.YjP)(),version:(0,r.KCZ)([(0,r.FsL)((0,r.aig)(),(0,r.ndf)()),(0,r.YjP)(),(0,r.oad)()])}),c=(0,a.py)({ImmOrOwned:o,Shared:(0,r.Ikc)({objectId:a.VH,initialSharedVersion:a.Yj,mutable:(0,r.zMY)()}),Receiving:o}),d=(0,a.py)({Object:c,Pure:(0,r.YOg)((0,r.FsL)((0,r.aig)(),(0,r.ndf)()))}),u=(0,r.KCZ)([(0,r.Ikc)({kind:(0,r.euz)("Input"),index:(0,r.FsL)((0,r.aig)(),(0,r.ndf)()),value:(0,r.L5J)(),type:(0,r.lqM)((0,r.euz)("object"))}),(0,r.Ikc)({kind:(0,r.euz)("Input"),index:(0,r.FsL)((0,r.aig)(),(0,r.ndf)()),value:(0,r.L5J)(),type:(0,r.euz)("pure")})]),l=(0,r.KCZ)([(0,r.Ikc)({Epoch:(0,r.FsL)((0,r.aig)(),(0,r.ndf)())}),(0,r.Ikc)({None:(0,r.mee)((0,r.euz)(!0))})]),g=(0,r.FsL)((0,r.KCZ)([(0,r.aig)(),(0,r.YjP)(),(0,r.oad)()]),(0,r.z6Y)((e=>{if(!["string","number","bigint"].includes(typeof e))return!1;try{return BigInt(e),!0}catch{return!1}}))),p=(0,r.KCZ)([(0,r.Ikc)({bool:(0,r.mee)((0,r.euz)(!0))}),(0,r.Ikc)({u8:(0,r.mee)((0,r.euz)(!0))}),(0,r.Ikc)({u64:(0,r.mee)((0,r.euz)(!0))}),(0,r.Ikc)({u128:(0,r.mee)((0,r.euz)(!0))}),(0,r.Ikc)({address:(0,r.mee)((0,r.euz)(!0))}),(0,r.Ikc)({signer:(0,r.mee)((0,r.euz)(!0))}),(0,r.Ikc)({vector:(0,r.RZV)((()=>p))}),(0,r.Ikc)({struct:(0,r.RZV)((()=>m))}),(0,r.Ikc)({u16:(0,r.mee)((0,r.euz)(!0))}),(0,r.Ikc)({u32:(0,r.mee)((0,r.euz)(!0))}),(0,r.Ikc)({u256:(0,r.mee)((0,r.euz)(!0))})]),m=(0,r.Ikc)({address:(0,r.YjP)(),module:(0,r.YjP)(),name:(0,r.YjP)(),typeParams:(0,r.YOg)(p)}),b=(0,r.Ikc)({budget:(0,r.lqM)(g),price:(0,r.lqM)(g),payment:(0,r.lqM)((0,r.YOg)(o)),owner:(0,r.lqM)((0,r.YjP)())}),j=[u,(0,r.Ikc)({kind:(0,r.euz)("GasCoin")}),(0,r.Ikc)({kind:(0,r.euz)("Result"),index:(0,r.FsL)((0,r.aig)(),(0,r.ndf)())}),(0,r.Ikc)({kind:(0,r.euz)("NestedResult"),index:(0,r.FsL)((0,r.aig)(),(0,r.ndf)()),resultIndex:(0,r.FsL)((0,r.aig)(),(0,r.ndf)())})],f=(0,r.KCZ)([...j]),O=(0,r.Ikc)({kind:(0,r.euz)("MoveCall"),target:(0,r.FsL)((0,r.YjP)(),(0,r.z6Y)((e=>3===e.split("::").length))),typeArguments:(0,r.YOg)((0,r.YjP)()),arguments:(0,r.YOg)(f)}),k=(0,r.Ikc)({kind:(0,r.euz)("TransferObjects"),objects:(0,r.YOg)(f),address:f}),I=(0,r.Ikc)({kind:(0,r.euz)("SplitCoins"),coin:f,amounts:(0,r.YOg)(f)}),v=(0,r.Ikc)({kind:(0,r.euz)("MergeCoins"),destination:f,sources:(0,r.YOg)(f)}),y=(0,r.Ikc)({kind:(0,r.euz)("MakeMoveVec"),type:(0,r.KCZ)([(0,r.Ikc)({Some:p}),(0,r.Ikc)({None:(0,r.mee)((0,r.euz)(!0))})]),objects:(0,r.YOg)(f)}),Y=[O,k,I,v,(0,r.Ikc)({kind:(0,r.euz)("Publish"),modules:(0,r.YOg)((0,r.YOg)((0,r.FsL)((0,r.aig)(),(0,r.ndf)()))),dependencies:(0,r.YOg)((0,r.YjP)())}),(0,r.Ikc)({kind:(0,r.euz)("Upgrade"),modules:(0,r.YOg)((0,r.YOg)((0,r.FsL)((0,r.aig)(),(0,r.ndf)()))),dependencies:(0,r.YOg)((0,r.YjP)()),packageId:(0,r.YjP)(),ticket:f}),y],h=(0,r.KCZ)([...Y]);function C(e){const n=e.inputs.map(((e,n)=>{if(e.Object)return{kind:"Input",index:n,value:{Object:e.Object.ImmOrOwnedObject?{ImmOrOwned:e.Object.ImmOrOwnedObject}:e.Object.Receiving?{Receiving:{digest:e.Object.Receiving.digest,version:e.Object.Receiving.version,objectId:e.Object.Receiving.objectId}}:{Shared:{mutable:e.Object.SharedObject.mutable,initialSharedVersion:e.Object.SharedObject.initialSharedVersion,objectId:e.Object.SharedObject.objectId}}},type:"object"};if(e.Pure)return{kind:"Input",index:n,value:{Pure:Array.from((0,i.Z)(e.Pure.bytes))},type:"pure"};if(e.UnresolvedPure)return{kind:"Input",type:"pure",index:n,value:e.UnresolvedPure.value};if(e.UnresolvedObject)return{kind:"Input",type:"object",index:n,value:e.UnresolvedObject.objectId};throw new Error("Invalid input")}));return{version:1,sender:e.sender??void 0,expiration:"Epoch"===e.expiration?.$kind?{Epoch:Number(e.expiration.Epoch)}:e.expiration?{None:!0}:null,gasConfig:{owner:e.gasData.owner??void 0,budget:e.gasData.budget??void 0,price:e.gasData.price??void 0,payment:e.gasData.payment??void 0},inputs:n,transactions:e.commands.map((e=>{if(e.MakeMoveVec)return{kind:"MakeMoveVec",type:null===e.MakeMoveVec.type?{None:!0}:{Some:s.r.parseFromStr(e.MakeMoveVec.type)},objects:e.MakeMoveVec.elements.map((e=>P(e,n)))};if(e.MergeCoins)return{kind:"MergeCoins",destination:P(e.MergeCoins.destination,n),sources:e.MergeCoins.sources.map((e=>P(e,n)))};if(e.MoveCall)return{kind:"MoveCall",target:`${e.MoveCall.package}::${e.MoveCall.module}::${e.MoveCall.function}`,typeArguments:e.MoveCall.typeArguments,arguments:e.MoveCall.arguments.map((e=>P(e,n)))};if(e.Publish)return{kind:"Publish",modules:e.Publish.modules.map((e=>Array.from((0,i.Z)(e)))),dependencies:e.Publish.dependencies};if(e.SplitCoins)return{kind:"SplitCoins",coin:P(e.SplitCoins.coin,n),amounts:e.SplitCoins.amounts.map((e=>P(e,n)))};if(e.TransferObjects)return{kind:"TransferObjects",objects:e.TransferObjects.objects.map((e=>P(e,n))),address:P(e.TransferObjects.address,n)};if(e.Upgrade)return{kind:"Upgrade",modules:e.Upgrade.modules.map((e=>Array.from((0,i.Z)(e)))),dependencies:e.Upgrade.dependencies,packageId:e.Upgrade.package,ticket:P(e.Upgrade.ticket,n)};throw new Error(`Unknown transaction ${Object.keys(e)}`)}))}}function P(e,n){if("GasCoin"===e.$kind)return{kind:"GasCoin"};if("Result"===e.$kind)return{kind:"Result",index:e.Result};if("NestedResult"===e.$kind)return{kind:"NestedResult",index:e.NestedResult[0],resultIndex:e.NestedResult[1]};if("Input"===e.$kind)return n[e.Input];throw new Error(`Invalid argument ${Object.keys(e)}`)}function M(e){return(0,r.qgA)(a.pl,{version:2,sender:e.sender??null,expiration:e.expiration?"Epoch"in e.expiration?{Epoch:e.expiration.Epoch}:{None:!0}:null,gasData:{owner:e.gasConfig.owner??null,budget:e.gasConfig.budget?.toString()??null,price:e.gasConfig.price?.toString()??null,payment:e.gasConfig.payment?.map((e=>({digest:e.digest,objectId:e.objectId,version:e.version.toString()})))??null},inputs:e.inputs.map((e=>{if("Input"===e.kind){if((0,r.is)(d,e.value)){const n=(0,r.qgA)(d,e.value);if(n.Object){if(n.Object.ImmOrOwned)return{Object:{ImmOrOwnedObject:{objectId:n.Object.ImmOrOwned.objectId,version:String(n.Object.ImmOrOwned.version),digest:n.Object.ImmOrOwned.digest}}};if(n.Object.Shared)return{Object:{SharedObject:{mutable:n.Object.Shared.mutable??null,initialSharedVersion:n.Object.Shared.initialSharedVersion,objectId:n.Object.Shared.objectId}}};if(n.Object.Receiving)return{Object:{Receiving:{digest:n.Object.Receiving.digest,version:String(n.Object.Receiving.version),objectId:n.Object.Receiving.objectId}}};throw new Error("Invalid object input")}return{Pure:{bytes:(0,i.o)(new Uint8Array(n.Pure))}}}return"object"===e.type?{UnresolvedObject:{objectId:e.value}}:{UnresolvedPure:{value:e.value}}}throw new Error("Invalid input")})),commands:e.transactions.map((e=>{switch(e.kind){case"MakeMoveVec":return{MakeMoveVec:{type:"Some"in e.type?s.r.tagToString(e.type.Some):null,elements:e.objects.map((e=>w(e)))}};case"MergeCoins":return{MergeCoins:{destination:w(e.destination),sources:e.sources.map((e=>w(e)))}};case"MoveCall":{const[n,t,i]=e.target.split("::");return{MoveCall:{package:n,module:t,function:i,typeArguments:e.typeArguments,arguments:e.arguments.map((e=>w(e)))}}}case"Publish":return{Publish:{modules:e.modules.map((e=>(0,i.o)(Uint8Array.from(e)))),dependencies:e.dependencies}};case"SplitCoins":return{SplitCoins:{coin:w(e.coin),amounts:e.amounts.map((e=>w(e)))}};case"TransferObjects":return{TransferObjects:{objects:e.objects.map((e=>w(e))),address:w(e.address)}};case"Upgrade":return{Upgrade:{modules:e.modules.map((e=>(0,i.o)(Uint8Array.from(e)))),dependencies:e.dependencies,package:e.packageId,ticket:w(e.ticket)}}}throw new Error(`Unknown transaction ${Object.keys(e)}`)}))})}function w(e){switch(e.kind){case"GasCoin":return{GasCoin:!0};case"Result":return{Result:e.index};case"NestedResult":return{NestedResult:[e.index,e.resultIndex]};case"Input":return{Input:e.index}}}(0,r.Ikc)({version:(0,r.euz)(1),sender:(0,r.lqM)((0,r.YjP)()),expiration:(0,r.cl6)(l),gasConfig:b,inputs:(0,r.YOg)(u),transactions:(0,r.YOg)(h)})},3496:(e,n,t)=>{t.d(n,{f:()=>m});var i=t(6044),r=t(1257);function s(e){return(0,i.KCZ)(Object.entries(e).map((([e,n])=>(0,i.Ikc)({[e]:n}))))}const a=s({GasCoin:(0,i.euz)(!0),Input:(0,i.FsL)((0,i.aig)(),(0,i.ndf)()),Result:(0,i.FsL)((0,i.aig)(),(0,i.ndf)()),NestedResult:(0,i.PVZ)([(0,i.FsL)((0,i.aig)(),(0,i.ndf)()),(0,i.FsL)((0,i.aig)(),(0,i.ndf)())])}),o=(0,i.Ikc)({budget:(0,i.mee)(r.Yj),price:(0,i.mee)(r.Yj),owner:(0,i.mee)(r.M5),payment:(0,i.mee)((0,i.YOg)(r.xJ))}),c=(0,i.Ikc)({package:r.VH,module:(0,i.YjP)(),function:(0,i.YjP)(),typeArguments:(0,i.YOg)((0,i.YjP)()),arguments:(0,i.YOg)(a)}),d=(0,i.Ikc)({name:(0,i.YjP)(),inputs:(0,i.g1P)((0,i.YjP)(),(0,i.KCZ)([a,(0,i.YOg)(a)])),data:(0,i.g1P)((0,i.YjP)(),(0,i.L5J)())}),u=s({MoveCall:c,TransferObjects:(0,i.Ikc)({objects:(0,i.YOg)(a),address:a}),SplitCoins:(0,i.Ikc)({coin:a,amounts:(0,i.YOg)(a)}),MergeCoins:(0,i.Ikc)({destination:a,sources:(0,i.YOg)(a)}),Publish:(0,i.Ikc)({modules:(0,i.YOg)(r.mH),dependencies:(0,i.YOg)(r.VH)}),MakeMoveVec:(0,i.Ikc)({type:(0,i.mee)((0,i.YjP)()),elements:(0,i.YOg)(a)}),Upgrade:(0,i.Ikc)({modules:(0,i.YOg)(r.mH),dependencies:(0,i.YOg)(r.VH),package:r.VH,ticket:a}),$Intent:d}),l=s({ImmOrOwnedObject:r.xJ,SharedObject:(0,i.Ikc)({objectId:r.VH,initialSharedVersion:r.Yj,mutable:(0,i.zMY)()}),Receiving:r.xJ}),g=s({Object:l,Pure:(0,i.Ikc)({bytes:r.mH}),UnresolvedPure:(0,i.Ikc)({value:(0,i.L5J)()}),UnresolvedObject:(0,i.Ikc)({objectId:r.VH,version:(0,i.lqM)((0,i.mee)(r.Yj)),digest:(0,i.lqM)((0,i.mee)((0,i.YjP)())),initialSharedVersion:(0,i.lqM)((0,i.mee)(r.Yj))})}),p=s({None:(0,i.euz)(!0),Epoch:r.Yj}),m=(0,i.Ikc)({version:(0,i.euz)(2),sender:(0,i.cl6)(r.M5),expiration:(0,i.cl6)(p),gasData:o,inputs:(0,i.YOg)(g),commands:(0,i.YOg)(u)})},3593:(e,n,t)=>{t.d(n,{Z:()=>r});var i=t(5558);function r(e,n){const t=Array.from(`${e}::`).map((e=>e.charCodeAt(0))),r=new Uint8Array(t.length+n.length);return r.set(t),r.set(n,t.length),(0,i.S)(r,{dkLen:32})}},9684:(e,n,t)=>{t.d(n,{J:()=>p});var i=t(6044),r=t(28),s=t(7388),a=t(3154),o=t(1257),c=t(5260),d=t(657);const u=50,l=1000n,g=5e10;async function p(e,n,t){return await async function(e,n){const{inputs:t,commands:i}=e,s=[],a=new Set;i.forEach((n=>{if(n.MoveCall){if(n.MoveCall._argumentTypes)return;if(n.MoveCall.arguments.map((n=>"Input"===n.$kind?e.inputs[n.Input]:null)).some((e=>e?.UnresolvedPure||e?.UnresolvedObject))){const e=`${n.MoveCall.package}::${n.MoveCall.module}::${n.MoveCall.function}`;a.add(e),s.push(n.MoveCall)}}switch(n.$kind){case"SplitCoins":n.SplitCoins.amounts.forEach((n=>{m(n,r.jy.U64,e)}));break;case"TransferObjects":m(n.TransferObjects.address,r.jy.Address,e)}}));const o=new Map;if(a.size>0){const e=f(n);await Promise.all([...a].map((async n=>{const[t,i,r]=n.split("::"),s=await e.getNormalizedMoveFunction({package:t,module:i,function:r});o.set(n,s.parameters.map((e=>(0,d.oO)(e))))})))}s.length&&await Promise.all(s.map((async e=>{const n=o.get(`${e.package}::${e.module}::${e.function}`);if(!n)return;const t=n.length>0&&(0,d.yq)(n.at(-1))?n.slice(0,n.length-1):n;e._argumentTypes=t}))),i.forEach((e=>{if(!e.MoveCall)return;const n=e.MoveCall,i=`${n.package}::${n.module}::${n.function}`,r=n._argumentTypes;if(r){if(r.length!==e.MoveCall.arguments.length)throw new Error(`Incorrect number of arguments for ${i}`);r.forEach(((e,i)=>{const r=n.arguments[i];if("Input"!==r.$kind)return;const s=t[r.Input];if(!s.UnresolvedPure&&!s.UnresolvedObject)return;const a=s.UnresolvedPure?.value??s.UnresolvedObject?.objectId,o=(0,d.g3)(e.body);if(o)return r.type="pure",void(t[t.indexOf(s)]=c.G.Pure(o.serialize(a)));if("string"!=typeof a)throw new Error(`Expect the argument to be an object id string, got ${JSON.stringify(a,null,2)}`);r.type="object";const u=s.UnresolvedPure?{$kind:"UnresolvedObject",UnresolvedObject:{objectId:a}}:s;t[r.Input]=u}))}}))}(e,n),await async function(e,n){const t=e.inputs.filter((e=>e.UnresolvedObject&&!(e.UnresolvedObject.version||e.UnresolvedObject?.initialSharedVersion))),i=[...new Set(t.map((e=>(0,a.fN)(e.UnresolvedObject.objectId))))],r=i.length?(l=i,g=u,Array.from({length:Math.ceil(l.length/g)},((e,n)=>l.slice(n*g,n*g+g)))):[],s=(await Promise.all(r.map((e=>f(n).multiGetObjects({ids:e,options:{showOwner:!0}}))))).flat(),o=new Map(i.map(((e,n)=>[e,s[n]]))),d=Array.from(o).filter((([e,n])=>n.error)).map((([e,n])=>JSON.stringify(n.error)));var l,g;if(d.length)throw new Error(`The following input objects are invalid: ${d.join(", ")}`);const p=s.map((e=>{if(e.error||!e.data)throw new Error(`Failed to fetch object: ${e.error}`);const n=e.data.owner,t=n&&"object"==typeof n&&"Shared"in n?n.Shared.initial_shared_version:null;return{objectId:e.data.objectId,digest:e.data.digest,version:e.data.version,initialSharedVersion:t}})),m=new Map(i.map(((e,n)=>[e,p[n]])));for(const[n,t]of e.inputs.entries()){if(!t.UnresolvedObject)continue;let i;const r=(0,a.t4)(t.UnresolvedObject.objectId),s=m.get(r);t.UnresolvedObject.initialSharedVersion??s?.initialSharedVersion?i=c.G.SharedObjectRef({objectId:r,initialSharedVersion:t.UnresolvedObject.initialSharedVersion||s?.initialSharedVersion,mutable:b(e,n)}):j(e,n)&&(i=c.G.ReceivingRef({objectId:r,digest:t.UnresolvedObject.digest??s?.digest,version:t.UnresolvedObject.version??s?.version})),e.inputs[e.inputs.indexOf(t)]=i??c.G.ObjectRef({objectId:r,digest:t.UnresolvedObject.digest??s?.digest,version:t.UnresolvedObject.version??s?.version})}}(e,n),n.onlyTransactionKind||(await async function(e,n){e.gasConfig.price||(e.gasConfig.price=String(await f(n).getReferenceGasPrice()))}(e,n),await async function(e,n){if(e.gasConfig.budget)return;const t=await f(n).dryRunTransactionBlock({transactionBlock:e.build({overrides:{gasData:{budget:String(g),payment:[]}}})});if("success"!==t.effects.status.status)throw new Error(`Dry run failed, could not automatically determine a budget: ${t.effects.status.error}`,{cause:t});const i=l*BigInt(e.gasConfig.price||1n),r=BigInt(t.effects.gasUsed.computationCost)+i,s=r+BigInt(t.effects.gasUsed.storageCost)-BigInt(t.effects.gasUsed.storageRebate);e.gasConfig.budget=String(s>r?s:r)}(e,n),await async function(e,n){if(!e.gasConfig.payment){const t=(await f(n).getCoins({owner:e.gasConfig.owner||e.sender,coinType:s.Ac})).data.filter((n=>!e.inputs.find((e=>!!e.Object?.ImmOrOwnedObject&&n.coinObjectId===e.Object.ImmOrOwnedObject.objectId)))).map((e=>({objectId:e.coinObjectId,digest:e.digest,version:e.version})));if(!t.length)throw new Error("No valid gas coins found for the transaction.");e.gasConfig.payment=t.map((e=>(0,i.qgA)(o.xJ,e)))}}(e,n)),await function(e){e.inputs.forEach(((e,n)=>{if("Object"!==e.$kind&&"Pure"!==e.$kind)throw new Error(`Input at index ${n} has not been resolved. Expected a Pure or Object input, but found ${JSON.stringify(e)}`)}))}(e),await t()}function m(e,n,t){if("Input"!==e.$kind)return;const i=t.inputs[e.Input];"UnresolvedPure"===i.$kind&&(t.inputs[e.Input]=c.G.Pure(n.serialize(i.UnresolvedPure.value)))}function b(e,n){let t=!1;return e.getInputUses(n,((e,n)=>{if(n.MoveCall&&n.MoveCall._argumentTypes){const i=n.MoveCall.arguments.indexOf(e);t="&"!==n.MoveCall._argumentTypes[i].ref||t}"MakeMoveVec"!==n.$kind&&"MergeCoins"!==n.$kind&&"SplitCoins"!==n.$kind||(t=!0)})),t}function j(e,n){let t=!1;return e.getInputUses(n,((e,n)=>{if(n.MoveCall&&n.MoveCall._argumentTypes){const r=n.MoveCall.arguments.indexOf(e);i=n.MoveCall._argumentTypes[r],t="object"==typeof i.body&&"datatype"in i.body&&"0x2"===i.body.datatype.package&&"transfer"===i.body.datatype.module&&"Receiving"===i.body.datatype.type||t}var i})),t}function f(e){if(!e.client)throw new Error("No provider passed to Transaction#build, but transaction data was not sufficient to build offline.");return e.client}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(this.webpackChunkwowok_agent=this.webpackChunkwowok_agent||[]).push([[754],{28:(t,e,r)=>{r.d(e,{jy:()=>it});var s=r(8596),n=r(2761),i=r(7083),a=r(4480),o=r(3154),u=r(4012);const c=s.j.bytes(o.wn).transform({validate:t=>{const e="string"==typeof t?t:(0,n.J)(t);if(!e||!(0,o.AP)((0,o.t4)(e)))throw new Error(`Invalid Sui address ${e}`)},input:t=>"string"==typeof t?(0,n.i)((0,o.t4)(t)):t,output:t=>(0,o.t4)((0,n.J)(t))}),l=s.j.vector(s.j.u8()).transform({name:"ObjectDigest",input:t=>(0,i.Q)(t),output:t=>(0,i.x)(new Uint8Array(t)),validate:t=>{if(32!==(0,i.Q)(t).length)throw new Error("ObjectDigest must be 32 bytes")}}),d=s.j.struct("SuiObjectRef",{objectId:c,version:s.j.u64(),digest:l}),p=s.j.struct("SharedObjectRef",{objectId:c,initialSharedVersion:s.j.u64(),mutable:s.j.bool()}),h=s.j.enum("ObjectArg",{ImmOrOwnedObject:d,SharedObject:p,Receiving:d}),g=s.j.enum("CallArg",{Pure:s.j.struct("Pure",{bytes:s.j.vector(s.j.u8()).transform({input:t=>"string"==typeof t?(0,a.Z)(t):t,output:t=>(0,a.o)(new Uint8Array(t))})}),Object:h}),m=s.j.enum("TypeTag",{bool:null,u8:null,u64:null,u128:null,address:null,signer:null,vector:s.j.lazy((()=>m)),struct:s.j.lazy((()=>T)),u16:null,u32:null,u256:null}),j=m.transform({input:t=>"string"==typeof t?u.r.parseFromStr(t,!0):t,output:t=>u.r.tagToString(t)}),y=s.j.enum("Argument",{GasCoin:null,Input:s.j.u16(),Result:s.j.u16(),NestedResult:s.j.tuple([s.j.u16(),s.j.u16()])}),w=s.j.struct("ProgrammableMoveCall",{package:c,module:s.j.string(),function:s.j.string(),typeArguments:s.j.vector(j),arguments:s.j.vector(y)}),f=s.j.enum("Command",{MoveCall:w,TransferObjects:s.j.struct("TransferObjects",{objects:s.j.vector(y),address:y}),SplitCoins:s.j.struct("SplitCoins",{coin:y,amounts:s.j.vector(y)}),MergeCoins:s.j.struct("MergeCoins",{destination:y,sources:s.j.vector(y)}),Publish:s.j.struct("Publish",{modules:s.j.vector(s.j.vector(s.j.u8()).transform({input:t=>"string"==typeof t?(0,a.Z)(t):t,output:t=>(0,a.o)(new Uint8Array(t))})),dependencies:s.j.vector(c)}),MakeMoveVec:s.j.struct("MakeMoveVec",{type:(b=j,s.j.enum("Option",{None:null,Some:b})).transform({input:t=>null===t?{None:!0}:{Some:t},output:t=>t.Some??null}),elements:s.j.vector(y)}),Upgrade:s.j.struct("Upgrade",{modules:s.j.vector(s.j.vector(s.j.u8()).transform({input:t=>"string"==typeof t?(0,a.Z)(t):t,output:t=>(0,a.o)(new Uint8Array(t))})),dependencies:s.j.vector(c),package:c,ticket:y})});var b;const S=s.j.struct("ProgrammableTransaction",{inputs:s.j.vector(g),commands:s.j.vector(f)}),v=s.j.enum("TransactionKind",{ProgrammableTransaction:S,ChangeEpoch:null,Genesis:null,ConsensusCommitPrologue:null}),k=s.j.enum("TransactionExpiration",{None:null,Epoch:s.j.u64({name:"unsafe_u64"}).transform({input:t=>t,output:t=>Number(t)})});const T=s.j.struct("StructTag",{address:c,module:s.j.string(),name:s.j.string(),typeParams:s.j.vector(m)}),I=s.j.struct("GasData",{payment:s.j.vector(d),owner:c,price:s.j.u64(),budget:s.j.u64()}),E=s.j.struct("TransactionDataV1",{kind:v,sender:c,gasData:I,expiration:k}),M=s.j.enum("TransactionData",{V1:E}),x=s.j.enum("IntentScope",{TransactionData:null,TransactionEffects:null,CheckpointSummary:null,PersonalMessage:null}),O=s.j.enum("IntentVersion",{V0:null}),A=s.j.enum("AppId",{Sui:null}),C=s.j.struct("Intent",{scope:x,version:O,appId:A});function P(t){return s.j.struct(`IntentMessage<${t.name}>`,{intent:C,value:t})}const B=s.j.enum("CompressedSignature",{ED25519:s.j.fixedArray(64,s.j.u8()),Secp256k1:s.j.fixedArray(64,s.j.u8()),Secp256r1:s.j.fixedArray(64,s.j.u8()),ZkLogin:s.j.vector(s.j.u8())}),q=s.j.enum("PublicKey",{ED25519:s.j.fixedArray(32,s.j.u8()),Secp256k1:s.j.fixedArray(33,s.j.u8()),Secp256r1:s.j.fixedArray(33,s.j.u8()),ZkLogin:s.j.vector(s.j.u8())}),D=s.j.struct("MultiSigPkMap",{pubKey:q,weight:s.j.u8()}),_=s.j.struct("MultiSigPublicKey",{pk_map:s.j.vector(D),threshold:s.j.u16()}),N=s.j.struct("MultiSig",{sigs:s.j.vector(B),bitmap:s.j.u16(),multisig_pk:_}),U=s.j.vector(s.j.u8()).transform({input:t=>"string"==typeof t?(0,a.Z)(t):t,output:t=>(0,a.o)(new Uint8Array(t))}),R=s.j.struct("SenderSignedTransaction",{intentMessage:P(M),txSignatures:s.j.vector(U)}),W=s.j.vector(R,{name:"SenderSignedData"}),V=s.j.enum("PackageUpgradeError",{UnableToFetchPackage:s.j.struct("UnableToFetchPackage",{packageId:c}),NotAPackage:s.j.struct("NotAPackage",{objectId:c}),IncompatibleUpgrade:null,DigestDoesNotMatch:s.j.struct("DigestDoesNotMatch",{digest:s.j.vector(s.j.u8())}),UnknownUpgradePolicy:s.j.struct("UnknownUpgradePolicy",{policy:s.j.u8()}),PackageIDDoesNotMatch:s.j.struct("PackageIDDoesNotMatch",{packageId:c,ticketId:c})}),F=s.j.struct("ModuleId",{address:c,name:s.j.string()}),z=s.j.struct("MoveLocation",{module:F,function:s.j.u16(),instruction:s.j.u16(),functionName:s.j.option(s.j.string())}),L=s.j.enum("CommandArgumentError",{TypeMismatch:null,InvalidBCSBytes:null,InvalidUsageOfPureArg:null,InvalidArgumentToPrivateEntryFunction:null,IndexOutOfBounds:s.j.struct("IndexOutOfBounds",{idx:s.j.u16()}),SecondaryIndexOutOfBounds:s.j.struct("SecondaryIndexOutOfBounds",{resultIdx:s.j.u16(),secondaryIdx:s.j.u16()}),InvalidResultArity:s.j.struct("InvalidResultArity",{resultIdx:s.j.u16()}),InvalidGasCoinUsage:null,InvalidValueUsage:null,InvalidObjectByValue:null,InvalidObjectByMutRef:null,SharedObjectOperationNotAllowed:null}),$=s.j.enum("TypeArgumentError",{TypeNotFound:null,ConstraintNotSatisfied:null}),K=s.j.enum("ExecutionFailureStatus",{InsufficientGas:null,InvalidGasObject:null,InvariantViolation:null,FeatureNotYetSupported:null,MoveObjectTooBig:s.j.struct("MoveObjectTooBig",{objectSize:s.j.u64(),maxObjectSize:s.j.u64()}),MovePackageTooBig:s.j.struct("MovePackageTooBig",{objectSize:s.j.u64(),maxObjectSize:s.j.u64()}),CircularObjectOwnership:s.j.struct("CircularObjectOwnership",{object:c}),InsufficientCoinBalance:null,CoinBalanceOverflow:null,PublishErrorNonZeroAddress:null,SuiMoveVerificationError:null,MovePrimitiveRuntimeError:s.j.option(z),MoveAbort:s.j.tuple([z,s.j.u64()]),VMVerificationOrDeserializationError:null,VMInvariantViolation:null,FunctionNotFound:null,ArityMismatch:null,TypeArityMismatch:null,NonEntryFunctionInvoked:null,CommandArgumentError:s.j.struct("CommandArgumentError",{argIdx:s.j.u16(),kind:L}),TypeArgumentError:s.j.struct("TypeArgumentError",{argumentIdx:s.j.u16(),kind:$}),UnusedValueWithoutDrop:s.j.struct("UnusedValueWithoutDrop",{resultIdx:s.j.u16(),secondaryIdx:s.j.u16()}),InvalidPublicFunctionReturnType:s.j.struct("InvalidPublicFunctionReturnType",{idx:s.j.u16()}),InvalidTransferObject:null,EffectsTooLarge:s.j.struct("EffectsTooLarge",{currentSize:s.j.u64(),maxSize:s.j.u64()}),PublishUpgradeMissingDependency:null,PublishUpgradeDependencyDowngrade:null,PackageUpgradeError:s.j.struct("PackageUpgradeError",{upgradeError:V}),WrittenObjectsTooLarge:s.j.struct("WrittenObjectsTooLarge",{currentSize:s.j.u64(),maxSize:s.j.u64()}),CertificateDenied:null,SuiMoveVerificationTimedout:null,SharedObjectOperationNotAllowed:null,InputObjectDeleted:null}),G=s.j.enum("ExecutionStatus",{Success:null,Failed:s.j.struct("ExecutionFailed",{error:K,command:s.j.option(s.j.u64())})}),Z=s.j.struct("GasCostSummary",{computationCost:s.j.u64(),storageCost:s.j.u64(),storageRebate:s.j.u64(),nonRefundableStorageFee:s.j.u64()}),J=s.j.enum("Owner",{AddressOwner:c,ObjectOwner:c,Shared:s.j.struct("Shared",{initialSharedVersion:s.j.u64()}),Immutable:null}),Q=s.j.struct("TransactionEffectsV1",{status:G,executedEpoch:s.j.u64(),gasUsed:Z,modifiedAtVersions:s.j.vector(s.j.tuple([c,s.j.u64()])),sharedObjects:s.j.vector(d),transactionDigest:l,created:s.j.vector(s.j.tuple([d,J])),mutated:s.j.vector(s.j.tuple([d,J])),unwrapped:s.j.vector(s.j.tuple([d,J])),deleted:s.j.vector(d),unwrappedThenDeleted:s.j.vector(d),wrapped:s.j.vector(d),gasObject:s.j.tuple([d,J]),eventsDigest:s.j.option(l),dependencies:s.j.vector(l)}),H=s.j.tuple([s.j.u64(),l]),Y=s.j.enum("ObjectIn",{NotExist:null,Exist:s.j.tuple([H,J])}),X=s.j.enum("ObjectOut",{NotExist:null,ObjectWrite:s.j.tuple([l,J]),PackageWrite:H}),tt=s.j.enum("IDOperation",{None:null,Created:null,Deleted:null}),et=s.j.struct("EffectsObjectChange",{inputState:Y,outputState:X,idOperation:tt}),rt=s.j.enum("UnchangedSharedKind",{ReadOnlyRoot:H,MutateDeleted:s.j.u64(),ReadDeleted:s.j.u64(),Cancelled:s.j.u64(),PerEpochConfig:null}),st=s.j.struct("TransactionEffectsV2",{status:G,executedEpoch:s.j.u64(),gasUsed:Z,transactionDigest:l,gasObjectIndex:s.j.option(s.j.u32()),eventsDigest:s.j.option(l),dependencies:s.j.vector(l),lamportVersion:s.j.u64(),changedObjects:s.j.vector(s.j.tuple([c,et])),unchangedSharedObjects:s.j.vector(s.j.tuple([c,rt])),auxDataDigest:s.j.option(l)}),nt=s.j.enum("TransactionEffects",{V1:Q,V2:st}),it={...s.j,U8:s.j.u8(),U16:s.j.u16(),U32:s.j.u32(),U64:s.j.u64(),U128:s.j.u128(),U256:s.j.u256(),ULEB128:s.j.uleb128(),Bool:s.j.bool(),String:s.j.string(),Address:c,AppId:A,Argument:y,CallArg:g,CompressedSignature:B,GasData:I,Intent:C,IntentMessage:P,IntentScope:x,IntentVersion:O,MultiSig:N,MultiSigPkMap:D,MultiSigPublicKey:_,ObjectArg:h,ObjectDigest:l,ProgrammableMoveCall:w,ProgrammableTransaction:S,PublicKey:q,SenderSignedData:W,SenderSignedTransaction:R,SharedObjectRef:p,StructTag:T,SuiObjectRef:d,Command:f,TransactionData:M,TransactionDataV1:E,TransactionExpiration:k,TransactionKind:v,TypeTag:j,TransactionEffects:nt}},1069:(t,e,r)=>{r.d(e,{AX:()=>h,At:()=>g,uS:()=>l,yk:()=>m});var s=r(4480),n=r(8596),i=r(5558),a=r(5333),o=r(3138),u=r(1470),c=r(3172);const l=32,d="suiprivkey";class p{async signWithIntent(t,e){const r=(0,o.i)(e,t),n=(0,i.S)(r,{dkLen:32});return{signature:(0,c.C)({signature:await this.sign(n),signatureScheme:this.getKeyScheme(),publicKey:this.getPublicKey()}),bytes:(0,s.o)(t)}}async signTransaction(t){return this.signWithIntent(t,"TransactionData")}async signPersonalMessage(t){const{signature:e}=await this.signWithIntent(n.j.vector(n.j.u8()).serialize(t).toBytes(),"PersonalMessage");return{bytes:(0,s.o)(t),signature:e}}toSuiAddress(){return this.getPublicKey().toSuiAddress()}}class h extends p{}function g(t){const{prefix:e,words:r}=a.I.decode(t);if(e!==d)throw new Error("invalid private key prefix");const s=new Uint8Array(a.I.fromWords(r)),n=s.slice(1);return{schema:u.y3[s[0]],secretKey:n}}function m(t,e){if(t.length!==l)throw new Error("Invalid bytes length");const r=u.uD[e],s=new Uint8Array(t.length+1);return s.set([r]),s.set(t,1),a.I.encode(d,a.I.toWords(s))}},1470:(t,e,r)=>{r.d(e,{Pz:()=>n,uD:()=>s,y3:()=>i});const s={ED25519:0,Secp256k1:1,Secp256r1:2,MultiSig:3,ZkLogin:5},n={ED25519:32,Secp256k1:33,Secp256r1:33},i={0:"ED25519",1:"Secp256k1",2:"Secp256r1",3:"MultiSig",5:"ZkLogin"}},2563:(t,e,r)=>{r.d(e,{SB:()=>a,jh:()=>i});var s=r(2761),n=r(3712);function i(t){return!!new RegExp("^m\\/44'\\/784'\\/[0-9]+'\\/[0-9]+'\\/[0-9]+'+$").test(t)}function a(t){return(0,s.J)(function(t){return(0,n.kw)(t,"")}(t))}},3138:(t,e,r)=>{r.d(e,{i:()=>n});var s=r(28);function n(t,e){return s.jy.IntentMessage(s.jy.fixedArray(e.length,s.jy.u8())).serialize({intent:{scope:{[t]:!0},version:{V0:!0},appId:{Sui:!0}},value:e}).toBytes()}},3172:(t,e,r)=>{r.d(e,{C:()=>o,Y:()=>u});var s=r(4480),n=r(28),i=r(8428),a=r(1470);function o({signature:t,signatureScheme:e,publicKey:r}){if(!r)throw new Error("`publicKey` is required");const n=r.toRawBytes(),i=new Uint8Array(1+t.length+n.length);return i.set([a.uD[e]]),i.set(t,1),i.set(n,1+t.length),(0,s.o)(i)}function u(t){const e=(0,s.Z)(t),r=a.y3[e[0]];switch(r){case"MultiSig":return{serializedSignature:t,signatureScheme:r,multisig:n.jy.MultiSig.parse(e.slice(1)),bytes:e};case"ZkLogin":return(0,i.eu)(t);case"ED25519":case"Secp256k1":case"Secp256r1":const s=a.Pz[r],o=e.slice(1,e.length-s);return{serializedSignature:t,signatureScheme:r,signature:o,publicKey:e.slice(1+o.length),bytes:e};default:throw new Error("Unsupported signature scheme")}}},4012:(t,e,r)=>{r.d(e,{r:()=>o});var s=r(2693),n=r(3154);const i=/^vector<(.+)>$/,a=/^([^:]+)::([^:]+)::([^<]+)(<(.+)>)?/;class o{static parseFromStr(t,e=!1){if("address"===t)return{address:null};if("bool"===t)return{bool:null};if("u8"===t)return{u8:null};if("u16"===t)return{u16:null};if("u32"===t)return{u32:null};if("u64"===t)return{u64:null};if("u128"===t)return{u128:null};if("u256"===t)return{u256:null};if("signer"===t)return{signer:null};const r=t.match(i);if(r)return{vector:o.parseFromStr(r[1],e)};const s=t.match(a);if(s)return{struct:{address:e?(0,n.t4)(s[1]):s[1],module:s[2],name:s[3],typeParams:void 0===s[5]?[]:o.parseStructTypeArgs(s[5],e)}};throw new Error(`Encountered unexpected token when parsing type args for ${t}`)}static parseStructTypeArgs(t,e=!1){return(0,s.sT)(t).map((t=>o.parseFromStr(t,e)))}static tagToString(t){if("bool"in t)return"bool";if("u8"in t)return"u8";if("u16"in t)return"u16";if("u32"in t)return"u32";if("u64"in t)return"u64";if("u128"in t)return"u128";if("u256"in t)return"u256";if("address"in t)return"address";if("signer"in t)return"signer";if("vector"in t)return`vector<${o.tagToString(t.vector)}>`;if("struct"in t){const e=t.struct,r=e.typeParams.map(o.tagToString).join(", ");return`${e.address}::${e.module}::${e.name}${r?`<${r}>`:""}`}throw new Error("Invalid TypeTag")}}},5251:(t,e,r)=>{r.d(e,{x:()=>L});var s=r(4480),n=r(7083),i=r(2761),a=r(5990),o=r(3154),u=r(2577),c=r(947);const l={"-32700":"ParseError","-32701":"OversizedRequest","-32702":"OversizedResponse","-32600":"InvalidRequest","-32601":"MethodNotFound","-32602":"InvalidParams","-32603":"InternalError","-32604":"ServerBusy","-32000":"CallExecutionFailed","-32001":"UnknownError","-32003":"SubscriptionClosed","-32004":"SubscriptionClosedWithError","-32005":"BatchesNotSupported","-32006":"TooManySubscriptions","-32050":"TransientError","-32002":"TransactionExecutionClientError"};class d extends Error{}class p extends d{constructor(t,e){super(t),this.code=e,this.type=l[e]??"ServerError"}}class h extends d{constructor(t,e,r){super(t),this.status=e,this.statusText=r}}var g,m,j,y,w,f,b,S,v,k=t=>{throw TypeError(t)},T=(t,e,r)=>e.has(t)||k("Cannot "+r),I=(t,e,r)=>(T(t,e,"read from private field"),r?r.call(t):e.get(t)),E=(t,e,r)=>e.has(t)?k("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),M=(t,e,r,s)=>(T(t,e,"write to private field"),s?s.call(t,r):e.set(t,r),r),x=(t,e,r)=>(T(t,e,"access private method"),r);const O={WebSocketConstructor:"undefined"!=typeof WebSocket?WebSocket:void 0,callTimeout:3e4,reconnectTimeout:3e3,maxReconnects:5};class A{constructor(t,e={}){if(E(this,b),E(this,g,0),E(this,m,0),E(this,j,null),E(this,y,null),E(this,w,new Set),E(this,f,new Map),this.endpoint=t,this.options={...O,...e},!this.options.WebSocketConstructor)throw new Error("Missing WebSocket constructor");this.endpoint.startsWith("http")&&(this.endpoint=function(t){const e=new URL(t);return e.protocol=e.protocol.replace("http","ws"),e.toString()}(this.endpoint))}async makeRequest(t,e){const r=await x(this,b,S).call(this);return new Promise(((s,n)=>{M(this,g,I(this,g)+1),I(this,f).set(I(this,g),{resolve:s,reject:n,timeout:setTimeout((()=>{I(this,f).delete(I(this,g)),n(new Error(`Request timeout: ${t}`))}),this.options.callTimeout)}),r.send(JSON.stringify({jsonrpc:"2.0",id:I(this,g),method:t,params:e}))})).then((({error:t,result:e})=>{if(t)throw new p(t.message,t.code);return e}))}async subscribe(t){const e=new C(t);return I(this,w).add(e),await e.subscribe(this),()=>e.unsubscribe(this)}}g=new WeakMap,m=new WeakMap,j=new WeakMap,y=new WeakMap,w=new WeakMap,f=new WeakMap,b=new WeakSet,S=function(){return I(this,y)||M(this,y,new Promise((t=>{I(this,j)?.close(),M(this,j,new this.options.WebSocketConstructor(this.endpoint)),I(this,j).addEventListener("open",(()=>{M(this,m,0),t(I(this,j))})),I(this,j).addEventListener("close",(()=>{var t,e;(t=this,e=m,{set _(r){M(t,e,r,undefined)},get _(){return I(t,e,undefined)}})._++,I(this,m)<=this.options.maxReconnects&&setTimeout((()=>{x(this,b,v).call(this)}),this.options.reconnectTimeout)})),I(this,j).addEventListener("message",(({data:t})=>{let e;try{e=JSON.parse(t)}catch(e){return void console.error(new Error(`Failed to parse RPC message: ${t}`,{cause:e}))}if("id"in e&&null!=e.id&&I(this,f).has(e.id)){const{resolve:t,timeout:r}=I(this,f).get(e.id);clearTimeout(r),t(e)}else if("params"in e){const{params:t}=e;I(this,w).forEach((e=>{e.subscriptionId===t.subscription&&t.subscription===e.subscriptionId&&e.onMessage(t.result)}))}}))}))),I(this,y)},v=async function(){return I(this,j)?.close(),M(this,y,null),Promise.allSettled([...I(this,w)].map((t=>t.subscribe(this))))};class C{constructor(t){this.subscriptionId=null,this.subscribed=!1,this.input=t}onMessage(t){this.subscribed&&this.input.onMessage(t)}async unsubscribe(t){const{subscriptionId:e}=this;return this.subscribed=!1,null!=e&&(this.subscriptionId=null,t.makeRequest(this.input.unsubscribe,[e]))}async subscribe(t){this.subscriptionId=null,this.subscribed=!0;const e=await t.makeRequest(this.input.method,this.input.params);this.subscribed&&(this.subscriptionId=e)}}var P,B,q,D,_,N=t=>{throw TypeError(t)},U=(t,e,r)=>e.has(t)||N("Cannot "+r),R=(t,e,r)=>(U(t,e,"read from private field"),r?r.call(t):e.get(t)),W=(t,e,r)=>e.has(t)?N("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),V=(t,e,r,s)=>(U(t,e,"write to private field"),s?s.call(t,r):e.set(t,r),r);class F{constructor(t){W(this,D),W(this,P,0),W(this,B),W(this,q),V(this,B,t)}fetch(t,e){const r=R(this,B).fetch??fetch;if(!r)throw new Error("The current environment does not support fetch, you can provide a fetch implementation in the options for SuiHTTPTransport.");return r(t,e)}async request(t){V(this,P,R(this,P)+1);const e=await this.fetch(R(this,B).rpc?.url??R(this,B).url,{method:"POST",headers:{"Content-Type":"application/json","Client-Sdk-Type":"typescript","Client-Sdk-Version":c.i,"Client-Target-Api-Version":c.c,...R(this,B).rpc?.headers},body:JSON.stringify({jsonrpc:"2.0",id:R(this,P),method:t.method,params:t.params})});if(!e.ok)throw new h(`Unexpected status code: ${e.status}`,e.status,e.statusText);const r=await e.json();if("error"in r&&null!=r.error)throw new p(r.error.message,r.error.code);return r.result}async subscribe(t){const e=await(r=D,s=_,U(this,r,"access private method"),s).call(this).subscribe(t);var r,s;return async()=>!!await e()}}P=new WeakMap,B=new WeakMap,q=new WeakMap,D=new WeakSet,_=function(){if(!R(this,q)){const t=R(this,B).WebSocketConstructor??WebSocket;if(!t)throw new Error("The current environment does not support WebSocket, you can provide a WebSocketConstructor in the options for SuiHTTPTransport.");V(this,q,new A(R(this,B).websocket?.url??R(this,B).url,{WebSocketConstructor:t,...R(this,B).websocket}))}return R(this,q)};const z=Symbol.for("@mysten/SuiClient");class L{get[z](){return!0}constructor(t){this.transport=t.transport??new F({url:t.url})}async getRpcApiVersion(){return(await this.transport.request({method:"rpc.discover",params:[]})).info.version}async getCoins(t){if(!t.owner||!(0,o.AP)((0,o.t4)(t.owner)))throw new Error("Invalid Sui address");return await this.transport.request({method:"suix_getCoins",params:[t.owner,t.coinType,t.cursor,t.limit]})}async getAllCoins(t){if(!t.owner||!(0,o.AP)((0,o.t4)(t.owner)))throw new Error("Invalid Sui address");return await this.transport.request({method:"suix_getAllCoins",params:[t.owner,t.cursor,t.limit]})}async getBalance(t){if(!t.owner||!(0,o.AP)((0,o.t4)(t.owner)))throw new Error("Invalid Sui address");return await this.transport.request({method:"suix_getBalance",params:[t.owner,t.coinType]})}async getAllBalances(t){if(!t.owner||!(0,o.AP)((0,o.t4)(t.owner)))throw new Error("Invalid Sui address");return await this.transport.request({method:"suix_getAllBalances",params:[t.owner]})}async getCoinMetadata(t){return await this.transport.request({method:"suix_getCoinMetadata",params:[t.coinType]})}async getTotalSupply(t){return await this.transport.request({method:"suix_getTotalSupply",params:[t.coinType]})}async call(t,e){return await this.transport.request({method:t,params:e})}async getMoveFunctionArgTypes(t){return await this.transport.request({method:"sui_getMoveFunctionArgTypes",params:[t.package,t.module,t.function]})}async getNormalizedMoveModulesByPackage(t){return await this.transport.request({method:"sui_getNormalizedMoveModulesByPackage",params:[t.package]})}async getNormalizedMoveModule(t){return await this.transport.request({method:"sui_getNormalizedMoveModule",params:[t.package,t.module]})}async getNormalizedMoveFunction(t){return await this.transport.request({method:"sui_getNormalizedMoveFunction",params:[t.package,t.module,t.function]})}async getNormalizedMoveStruct(t){return await this.transport.request({method:"sui_getNormalizedMoveStruct",params:[t.package,t.module,t.struct]})}async getOwnedObjects(t){if(!t.owner||!(0,o.AP)((0,o.t4)(t.owner)))throw new Error("Invalid Sui address");return await this.transport.request({method:"suix_getOwnedObjects",params:[t.owner,{filter:t.filter,options:t.options},t.cursor,t.limit]})}async getObject(t){if(!t.id||!(0,o.qD)((0,o.fN)(t.id)))throw new Error("Invalid Sui Object id");return await this.transport.request({method:"sui_getObject",params:[t.id,t.options]})}async tryGetPastObject(t){return await this.transport.request({method:"sui_tryGetPastObject",params:[t.id,t.version,t.options]})}async multiGetObjects(t){if(t.ids.forEach((t=>{if(!t||!(0,o.qD)((0,o.fN)(t)))throw new Error(`Invalid Sui Object id ${t}`)})),t.ids.length!==new Set(t.ids).size)throw new Error(`Duplicate object ids in batch call ${t.ids}`);return await this.transport.request({method:"sui_multiGetObjects",params:[t.ids,t.options]})}async queryTransactionBlocks(t){return await this.transport.request({method:"suix_queryTransactionBlocks",params:[{filter:t.filter,options:t.options},t.cursor,t.limit,"descending"===(t.order||"descending")]})}async getTransactionBlock(t){if(!(0,o.n4)(t.digest))throw new Error("Invalid Transaction digest");return await this.transport.request({method:"sui_getTransactionBlock",params:[t.digest,t.options]})}async multiGetTransactionBlocks(t){if(t.digests.forEach((t=>{if(!(0,o.n4)(t))throw new Error(`Invalid Transaction digest ${t}`)})),t.digests.length!==new Set(t.digests).size)throw new Error(`Duplicate digests in batch call ${t.digests}`);return await this.transport.request({method:"sui_multiGetTransactionBlocks",params:[t.digests,t.options]})}async executeTransactionBlock({transactionBlock:t,signature:e,options:r,requestType:n}){const i=await this.transport.request({method:"sui_executeTransactionBlock",params:["string"==typeof t?t:(0,s.o)(t),Array.isArray(e)?e:[e],r]});if("WaitForLocalExecution"===n)try{await this.waitForTransaction({digest:i.digest})}catch(t){}return i}async signAndExecuteTransaction({transaction:t,signer:e,...r}){let s;t instanceof Uint8Array?s=t:(t.setSenderIfNotSet(e.toSuiAddress()),s=await t.build({client:this}));const{signature:n,bytes:i}=await e.signTransaction(s);return this.executeTransactionBlock({transactionBlock:i,signature:n,...r})}async getTotalTransactionBlocks(){const t=await this.transport.request({method:"sui_getTotalTransactionBlocks",params:[]});return BigInt(t)}async getReferenceGasPrice(){const t=await this.transport.request({method:"suix_getReferenceGasPrice",params:[]});return BigInt(t)}async getStakes(t){if(!t.owner||!(0,o.AP)((0,o.t4)(t.owner)))throw new Error("Invalid Sui address");return await this.transport.request({method:"suix_getStakes",params:[t.owner]})}async getStakesByIds(t){return t.stakedSuiIds.forEach((t=>{if(!t||!(0,o.qD)((0,o.fN)(t)))throw new Error(`Invalid Sui Stake id ${t}`)})),await this.transport.request({method:"suix_getStakesByIds",params:[t.stakedSuiIds]})}async getLatestSuiSystemState(){return await this.transport.request({method:"suix_getLatestSuiSystemState",params:[]})}async queryEvents(t){return await this.transport.request({method:"suix_queryEvents",params:[t.query,t.cursor,t.limit,"descending"===(t.order||"descending")]})}async subscribeEvent(t){return this.transport.subscribe({method:"suix_subscribeEvent",unsubscribe:"suix_unsubscribeEvent",params:[t.filter],onMessage:t.onMessage})}async subscribeTransaction(t){return this.transport.subscribe({method:"suix_subscribeTransaction",unsubscribe:"suix_unsubscribeTransaction",params:[t.filter],onMessage:t.onMessage})}async devInspectTransactionBlock(t){let e;if((0,a.b)(t.transactionBlock))t.transactionBlock.setSenderIfNotSet(t.sender),e=(0,s.o)(await t.transactionBlock.build({client:this,onlyTransactionKind:!0}));else if("string"==typeof t.transactionBlock)e=t.transactionBlock;else{if(!(t.transactionBlock instanceof Uint8Array))throw new Error("Unknown transaction block format.");e=(0,s.o)(t.transactionBlock)}return await this.transport.request({method:"sui_devInspectTransactionBlock",params:[t.sender,e,t.gasPrice?.toString(),t.epoch]})}async dryRunTransactionBlock(t){return await this.transport.request({method:"sui_dryRunTransactionBlock",params:["string"==typeof t.transactionBlock?t.transactionBlock:(0,s.o)(t.transactionBlock)]})}async getDynamicFields(t){if(!t.parentId||!(0,o.qD)((0,o.fN)(t.parentId)))throw new Error("Invalid Sui Object id");return await this.transport.request({method:"suix_getDynamicFields",params:[t.parentId,t.cursor,t.limit]})}async getDynamicFieldObject(t){return await this.transport.request({method:"suix_getDynamicFieldObject",params:[t.parentId,t.name]})}async getLatestCheckpointSequenceNumber(){const t=await this.transport.request({method:"sui_getLatestCheckpointSequenceNumber",params:[]});return String(t)}async getCheckpoint(t){return await this.transport.request({method:"sui_getCheckpoint",params:[t.id]})}async getCheckpoints(t){return await this.transport.request({method:"sui_getCheckpoints",params:[t.cursor,t?.limit,t.descendingOrder]})}async getCommitteeInfo(t){return await this.transport.request({method:"suix_getCommitteeInfo",params:[t?.epoch]})}async getNetworkMetrics(){return await this.transport.request({method:"suix_getNetworkMetrics",params:[]})}async getAddressMetrics(){return await this.transport.request({method:"suix_getLatestAddressMetrics",params:[]})}async getEpochMetrics(t){return await this.transport.request({method:"suix_getEpochMetrics",params:[t?.cursor,t?.limit,t?.descendingOrder]})}async getAllEpochAddressMetrics(t){return await this.transport.request({method:"suix_getAllEpochAddressMetrics",params:[t?.descendingOrder]})}async getEpochs(t){return await this.transport.request({method:"suix_getEpochs",params:[t?.cursor,t?.limit,t?.descendingOrder]})}async getMoveCallMetrics(){return await this.transport.request({method:"suix_getMoveCallMetrics",params:[]})}async getCurrentEpoch(){return await this.transport.request({method:"suix_getCurrentEpoch",params:[]})}async getValidatorsApy(){return await this.transport.request({method:"suix_getValidatorsApy",params:[]})}async getChainIdentifier(){const t=await this.getCheckpoint({id:"0"}),e=(0,n.Q)(t.digest);return(0,i.J)(e.slice(0,4))}async resolveNameServiceAddress(t){return await this.transport.request({method:"suix_resolveNameServiceAddress",params:[t.name]})}async resolveNameServiceNames({format:t="dot",...e}){const{nextCursor:r,hasNextPage:s,data:n}=await this.transport.request({method:"suix_resolveNameServiceNames",params:[e.address,e.cursor,e.limit]});return{hasNextPage:s,nextCursor:r,data:n.map((e=>(0,u.n)(e,t)))}}async getProtocolConfig(t){return await this.transport.request({method:"sui_getProtocolConfig",params:[t?.version]})}async waitForTransaction({signal:t,timeout:e=6e4,pollInterval:r=2e3,...s}){const n=AbortSignal.timeout(e),i=new Promise(((t,e)=>{n.addEventListener("abort",(()=>e(n.reason)))}));for(i.catch((()=>{}));!n.aborted;){t?.throwIfAborted();try{return await this.getTransactionBlock(s)}catch(t){await Promise.race([new Promise((t=>setTimeout(t,r))),i])}}throw n.throwIfAborted(),new Error("Unexpected error while waiting for transaction block.")}}},8166:(t,e,r)=>{r.d(e,{J:()=>l,O:()=>c});var s=r(4480),n=r(5558),i=r(7520),a=r(28),o=r(3154),u=r(3138);function c(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}class l{equals(t){return c(this.toRawBytes(),t.toRawBytes())}toBase64(){return(0,s.o)(this.toRawBytes())}toString(){throw new Error("`toString` is not implemented on public keys. Use `toBase64()` or `toRawBytes()` instead.")}toSuiPublicKey(){const t=this.toSuiBytes();return(0,s.o)(t)}verifyWithIntent(t,e,r){const s=(0,u.i)(r,t),i=(0,n.S)(s,{dkLen:32});return this.verify(i,e)}verifyPersonalMessage(t,e){return this.verifyWithIntent(a.jy.vector(a.jy.u8()).serialize(t).toBytes(),e,"PersonalMessage")}verifyTransaction(t,e){return this.verifyWithIntent(t,e,"TransactionData")}toSuiBytes(){const t=this.toRawBytes(),e=new Uint8Array(t.length+1);return e.set([this.flag()]),e.set(t,1),e}toSuiAddress(){return(0,o.t4)((0,i.My)((0,n.S)(this.toSuiBytes(),{dkLen:32})).slice(0,2*o.wn))}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(this.webpackChunkwowok_agent=this.webpackChunkwowok_agent||[]).push([[982],{4601:(r,t,n)=>{!function(r){"use strict";var t=function(r){var t,n=new Float64Array(16);if(r)for(t=0;t<r.length;t++)n[t]=r[t];return n},e=function(){throw new Error("no PRNG")},o=new Uint8Array(16),i=new Uint8Array(32);i[0]=9;var h=t(),a=t([1]),f=t([56129,1]),s=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),c=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),u=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),y=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),l=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function w(r,t,n,e){r[t]=n>>24&255,r[t+1]=n>>16&255,r[t+2]=n>>8&255,r[t+3]=255&n,r[t+4]=e>>24&255,r[t+5]=e>>16&255,r[t+6]=e>>8&255,r[t+7]=255&e}function v(r,t,n,e,o){var i,h=0;for(i=0;i<o;i++)h|=r[t+i]^n[e+i];return(1&h-1>>>8)-1}function p(r,t,n,e){return v(r,t,n,e,16)}function b(r,t,n,e){return v(r,t,n,e,32)}function g(r,t,n,e){!function(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,c=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,u=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,v=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,p=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,b=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,g=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,_=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,U=i,E=h,d=a,x=f,M=s,k=c,m=u,B=y,S=l,K=w,Y=v,L=p,T=b,z=g,R=_,P=A,C=0;C<20;C+=2)U^=(o=(T^=(o=(S^=(o=(M^=(o=U+T|0)<<7|o>>>25)+U|0)<<9|o>>>23)+M|0)<<13|o>>>19)+S|0)<<18|o>>>14,k^=(o=(E^=(o=(z^=(o=(K^=(o=k+E|0)<<7|o>>>25)+k|0)<<9|o>>>23)+K|0)<<13|o>>>19)+z|0)<<18|o>>>14,Y^=(o=(m^=(o=(d^=(o=(R^=(o=Y+m|0)<<7|o>>>25)+Y|0)<<9|o>>>23)+R|0)<<13|o>>>19)+d|0)<<18|o>>>14,P^=(o=(L^=(o=(B^=(o=(x^=(o=P+L|0)<<7|o>>>25)+P|0)<<9|o>>>23)+x|0)<<13|o>>>19)+B|0)<<18|o>>>14,U^=(o=(x^=(o=(d^=(o=(E^=(o=U+x|0)<<7|o>>>25)+U|0)<<9|o>>>23)+E|0)<<13|o>>>19)+d|0)<<18|o>>>14,k^=(o=(M^=(o=(B^=(o=(m^=(o=k+M|0)<<7|o>>>25)+k|0)<<9|o>>>23)+m|0)<<13|o>>>19)+B|0)<<18|o>>>14,Y^=(o=(K^=(o=(S^=(o=(L^=(o=Y+K|0)<<7|o>>>25)+Y|0)<<9|o>>>23)+L|0)<<13|o>>>19)+S|0)<<18|o>>>14,P^=(o=(R^=(o=(z^=(o=(T^=(o=P+R|0)<<7|o>>>25)+P|0)<<9|o>>>23)+T|0)<<13|o>>>19)+z|0)<<18|o>>>14;U=U+i|0,E=E+h|0,d=d+a|0,x=x+f|0,M=M+s|0,k=k+c|0,m=m+u|0,B=B+y|0,S=S+l|0,K=K+w|0,Y=Y+v|0,L=L+p|0,T=T+b|0,z=z+g|0,R=R+_|0,P=P+A|0,r[0]=U>>>0&255,r[1]=U>>>8&255,r[2]=U>>>16&255,r[3]=U>>>24&255,r[4]=E>>>0&255,r[5]=E>>>8&255,r[6]=E>>>16&255,r[7]=E>>>24&255,r[8]=d>>>0&255,r[9]=d>>>8&255,r[10]=d>>>16&255,r[11]=d>>>24&255,r[12]=x>>>0&255,r[13]=x>>>8&255,r[14]=x>>>16&255,r[15]=x>>>24&255,r[16]=M>>>0&255,r[17]=M>>>8&255,r[18]=M>>>16&255,r[19]=M>>>24&255,r[20]=k>>>0&255,r[21]=k>>>8&255,r[22]=k>>>16&255,r[23]=k>>>24&255,r[24]=m>>>0&255,r[25]=m>>>8&255,r[26]=m>>>16&255,r[27]=m>>>24&255,r[28]=B>>>0&255,r[29]=B>>>8&255,r[30]=B>>>16&255,r[31]=B>>>24&255,r[32]=S>>>0&255,r[33]=S>>>8&255,r[34]=S>>>16&255,r[35]=S>>>24&255,r[36]=K>>>0&255,r[37]=K>>>8&255,r[38]=K>>>16&255,r[39]=K>>>24&255,r[40]=Y>>>0&255,r[41]=Y>>>8&255,r[42]=Y>>>16&255,r[43]=Y>>>24&255,r[44]=L>>>0&255,r[45]=L>>>8&255,r[46]=L>>>16&255,r[47]=L>>>24&255,r[48]=T>>>0&255,r[49]=T>>>8&255,r[50]=T>>>16&255,r[51]=T>>>24&255,r[52]=z>>>0&255,r[53]=z>>>8&255,r[54]=z>>>16&255,r[55]=z>>>24&255,r[56]=R>>>0&255,r[57]=R>>>8&255,r[58]=R>>>16&255,r[59]=R>>>24&255,r[60]=P>>>0&255,r[61]=P>>>8&255,r[62]=P>>>16&255,r[63]=P>>>24&255}(r,t,n,e)}function _(r,t,n,e){!function(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,c=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,u=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,v=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,p=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,b=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,g=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,_=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,U=0;U<20;U+=2)i^=(o=(b^=(o=(l^=(o=(s^=(o=i+b|0)<<7|o>>>25)+i|0)<<9|o>>>23)+s|0)<<13|o>>>19)+l|0)<<18|o>>>14,c^=(o=(h^=(o=(g^=(o=(w^=(o=c+h|0)<<7|o>>>25)+c|0)<<9|o>>>23)+w|0)<<13|o>>>19)+g|0)<<18|o>>>14,v^=(o=(u^=(o=(a^=(o=(_^=(o=v+u|0)<<7|o>>>25)+v|0)<<9|o>>>23)+_|0)<<13|o>>>19)+a|0)<<18|o>>>14,A^=(o=(p^=(o=(y^=(o=(f^=(o=A+p|0)<<7|o>>>25)+A|0)<<9|o>>>23)+f|0)<<13|o>>>19)+y|0)<<18|o>>>14,i^=(o=(f^=(o=(a^=(o=(h^=(o=i+f|0)<<7|o>>>25)+i|0)<<9|o>>>23)+h|0)<<13|o>>>19)+a|0)<<18|o>>>14,c^=(o=(s^=(o=(y^=(o=(u^=(o=c+s|0)<<7|o>>>25)+c|0)<<9|o>>>23)+u|0)<<13|o>>>19)+y|0)<<18|o>>>14,v^=(o=(w^=(o=(l^=(o=(p^=(o=v+w|0)<<7|o>>>25)+v|0)<<9|o>>>23)+p|0)<<13|o>>>19)+l|0)<<18|o>>>14,A^=(o=(_^=(o=(g^=(o=(b^=(o=A+_|0)<<7|o>>>25)+A|0)<<9|o>>>23)+b|0)<<13|o>>>19)+g|0)<<18|o>>>14;r[0]=i>>>0&255,r[1]=i>>>8&255,r[2]=i>>>16&255,r[3]=i>>>24&255,r[4]=c>>>0&255,r[5]=c>>>8&255,r[6]=c>>>16&255,r[7]=c>>>24&255,r[8]=v>>>0&255,r[9]=v>>>8&255,r[10]=v>>>16&255,r[11]=v>>>24&255,r[12]=A>>>0&255,r[13]=A>>>8&255,r[14]=A>>>16&255,r[15]=A>>>24&255,r[16]=u>>>0&255,r[17]=u>>>8&255,r[18]=u>>>16&255,r[19]=u>>>24&255,r[20]=y>>>0&255,r[21]=y>>>8&255,r[22]=y>>>16&255,r[23]=y>>>24&255,r[24]=l>>>0&255,r[25]=l>>>8&255,r[26]=l>>>16&255,r[27]=l>>>24&255,r[28]=w>>>0&255,r[29]=w>>>8&255,r[30]=w>>>16&255,r[31]=w>>>24&255}(r,t,n,e)}var A=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function U(r,t,n,e,o,i,h){var a,f,s=new Uint8Array(16),c=new Uint8Array(64);for(f=0;f<16;f++)s[f]=0;for(f=0;f<8;f++)s[f]=i[f];for(;o>=64;){for(g(c,s,h,A),f=0;f<64;f++)r[t+f]=n[e+f]^c[f];for(a=1,f=8;f<16;f++)a=a+(255&s[f])|0,s[f]=255&a,a>>>=8;o-=64,t+=64,e+=64}if(o>0)for(g(c,s,h,A),f=0;f<o;f++)r[t+f]=n[e+f]^c[f];return 0}function E(r,t,n,e,o){var i,h,a=new Uint8Array(16),f=new Uint8Array(64);for(h=0;h<16;h++)a[h]=0;for(h=0;h<8;h++)a[h]=e[h];for(;n>=64;){for(g(f,a,o,A),h=0;h<64;h++)r[t+h]=f[h];for(i=1,h=8;h<16;h++)i=i+(255&a[h])|0,a[h]=255&i,i>>>=8;n-=64,t+=64}if(n>0)for(g(f,a,o,A),h=0;h<n;h++)r[t+h]=f[h];return 0}function d(r,t,n,e,o){var i=new Uint8Array(32);_(i,e,o,A);for(var h=new Uint8Array(8),a=0;a<8;a++)h[a]=e[a+16];return E(r,t,n,h,i)}function x(r,t,n,e,o,i,h){var a=new Uint8Array(32);_(a,i,h,A);for(var f=new Uint8Array(8),s=0;s<8;s++)f[s]=i[s+16];return U(r,t,n,e,o,f,a)}var M=function(r){var t,n,e,o,i,h,a,f;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&r[0]|(255&r[1])<<8,this.r[0]=8191&t,n=255&r[2]|(255&r[3])<<8,this.r[1]=8191&(t>>>13|n<<3),e=255&r[4]|(255&r[5])<<8,this.r[2]=7939&(n>>>10|e<<6),o=255&r[6]|(255&r[7])<<8,this.r[3]=8191&(e>>>7|o<<9),i=255&r[8]|(255&r[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,h=255&r[10]|(255&r[11])<<8,this.r[6]=8191&(i>>>14|h<<2),a=255&r[12]|(255&r[13])<<8,this.r[7]=8065&(h>>>11|a<<5),f=255&r[14]|(255&r[15])<<8,this.r[8]=8191&(a>>>8|f<<8),this.r[9]=f>>>5&127,this.pad[0]=255&r[16]|(255&r[17])<<8,this.pad[1]=255&r[18]|(255&r[19])<<8,this.pad[2]=255&r[20]|(255&r[21])<<8,this.pad[3]=255&r[22]|(255&r[23])<<8,this.pad[4]=255&r[24]|(255&r[25])<<8,this.pad[5]=255&r[26]|(255&r[27])<<8,this.pad[6]=255&r[28]|(255&r[29])<<8,this.pad[7]=255&r[30]|(255&r[31])<<8};function k(r,t,n,e,o,i){var h=new M(i);return h.update(n,e,o),h.finish(r,t),0}function m(r,t,n,e,o,i){var h=new Uint8Array(16);return k(h,0,n,e,o,i),p(r,t,h,0)}function B(r,t,n,e,o){var i;if(n<32)return-1;for(x(r,0,t,0,n,e,o),k(r,16,r,32,n-32,r),i=0;i<16;i++)r[i]=0;return 0}function S(r,t,n,e,o){var i,h=new Uint8Array(32);if(n<32)return-1;if(d(h,0,32,e,o),0!==m(t,16,t,32,n-32,h))return-1;for(x(r,0,t,0,n,e,o),i=0;i<32;i++)r[i]=0;return 0}function K(r,t){var n;for(n=0;n<16;n++)r[n]=0|t[n]}function Y(r){var t,n,e=1;for(t=0;t<16;t++)n=r[t]+e+65535,e=Math.floor(n/65536),r[t]=n-65536*e;r[0]+=e-1+37*(e-1)}function L(r,t,n){for(var e,o=~(n-1),i=0;i<16;i++)e=o&(r[i]^t[i]),r[i]^=e,t[i]^=e}function T(r,n){var e,o,i,h=t(),a=t();for(e=0;e<16;e++)a[e]=n[e];for(Y(a),Y(a),Y(a),o=0;o<2;o++){for(h[0]=a[0]-65517,e=1;e<15;e++)h[e]=a[e]-65535-(h[e-1]>>16&1),h[e-1]&=65535;h[15]=a[15]-32767-(h[14]>>16&1),i=h[15]>>16&1,h[14]&=65535,L(a,h,1-i)}for(e=0;e<16;e++)r[2*e]=255&a[e],r[2*e+1]=a[e]>>8}function z(r,t){var n=new Uint8Array(32),e=new Uint8Array(32);return T(n,r),T(e,t),b(n,0,e,0)}function R(r){var t=new Uint8Array(32);return T(t,r),1&t[0]}function P(r,t){var n;for(n=0;n<16;n++)r[n]=t[2*n]+(t[2*n+1]<<8);r[15]&=32767}function C(r,t,n){for(var e=0;e<16;e++)r[e]=t[e]+n[e]}function N(r,t,n){for(var e=0;e<16;e++)r[e]=t[e]-n[e]}function O(r,t,n){var e,o,i=0,h=0,a=0,f=0,s=0,c=0,u=0,y=0,l=0,w=0,v=0,p=0,b=0,g=0,_=0,A=0,U=0,E=0,d=0,x=0,M=0,k=0,m=0,B=0,S=0,K=0,Y=0,L=0,T=0,z=0,R=0,P=n[0],C=n[1],N=n[2],O=n[3],F=n[4],I=n[5],Z=n[6],G=n[7],D=n[8],V=n[9],X=n[10],j=n[11],q=n[12],H=n[13],J=n[14],Q=n[15];i+=(e=t[0])*P,h+=e*C,a+=e*N,f+=e*O,s+=e*F,c+=e*I,u+=e*Z,y+=e*G,l+=e*D,w+=e*V,v+=e*X,p+=e*j,b+=e*q,g+=e*H,_+=e*J,A+=e*Q,h+=(e=t[1])*P,a+=e*C,f+=e*N,s+=e*O,c+=e*F,u+=e*I,y+=e*Z,l+=e*G,w+=e*D,v+=e*V,p+=e*X,b+=e*j,g+=e*q,_+=e*H,A+=e*J,U+=e*Q,a+=(e=t[2])*P,f+=e*C,s+=e*N,c+=e*O,u+=e*F,y+=e*I,l+=e*Z,w+=e*G,v+=e*D,p+=e*V,b+=e*X,g+=e*j,_+=e*q,A+=e*H,U+=e*J,E+=e*Q,f+=(e=t[3])*P,s+=e*C,c+=e*N,u+=e*O,y+=e*F,l+=e*I,w+=e*Z,v+=e*G,p+=e*D,b+=e*V,g+=e*X,_+=e*j,A+=e*q,U+=e*H,E+=e*J,d+=e*Q,s+=(e=t[4])*P,c+=e*C,u+=e*N,y+=e*O,l+=e*F,w+=e*I,v+=e*Z,p+=e*G,b+=e*D,g+=e*V,_+=e*X,A+=e*j,U+=e*q,E+=e*H,d+=e*J,x+=e*Q,c+=(e=t[5])*P,u+=e*C,y+=e*N,l+=e*O,w+=e*F,v+=e*I,p+=e*Z,b+=e*G,g+=e*D,_+=e*V,A+=e*X,U+=e*j,E+=e*q,d+=e*H,x+=e*J,M+=e*Q,u+=(e=t[6])*P,y+=e*C,l+=e*N,w+=e*O,v+=e*F,p+=e*I,b+=e*Z,g+=e*G,_+=e*D,A+=e*V,U+=e*X,E+=e*j,d+=e*q,x+=e*H,M+=e*J,k+=e*Q,y+=(e=t[7])*P,l+=e*C,w+=e*N,v+=e*O,p+=e*F,b+=e*I,g+=e*Z,_+=e*G,A+=e*D,U+=e*V,E+=e*X,d+=e*j,x+=e*q,M+=e*H,k+=e*J,m+=e*Q,l+=(e=t[8])*P,w+=e*C,v+=e*N,p+=e*O,b+=e*F,g+=e*I,_+=e*Z,A+=e*G,U+=e*D,E+=e*V,d+=e*X,x+=e*j,M+=e*q,k+=e*H,m+=e*J,B+=e*Q,w+=(e=t[9])*P,v+=e*C,p+=e*N,b+=e*O,g+=e*F,_+=e*I,A+=e*Z,U+=e*G,E+=e*D,d+=e*V,x+=e*X,M+=e*j,k+=e*q,m+=e*H,B+=e*J,S+=e*Q,v+=(e=t[10])*P,p+=e*C,b+=e*N,g+=e*O,_+=e*F,A+=e*I,U+=e*Z,E+=e*G,d+=e*D,x+=e*V,M+=e*X,k+=e*j,m+=e*q,B+=e*H,S+=e*J,K+=e*Q,p+=(e=t[11])*P,b+=e*C,g+=e*N,_+=e*O,A+=e*F,U+=e*I,E+=e*Z,d+=e*G,x+=e*D,M+=e*V,k+=e*X,m+=e*j,B+=e*q,S+=e*H,K+=e*J,Y+=e*Q,b+=(e=t[12])*P,g+=e*C,_+=e*N,A+=e*O,U+=e*F,E+=e*I,d+=e*Z,x+=e*G,M+=e*D,k+=e*V,m+=e*X,B+=e*j,S+=e*q,K+=e*H,Y+=e*J,L+=e*Q,g+=(e=t[13])*P,_+=e*C,A+=e*N,U+=e*O,E+=e*F,d+=e*I,x+=e*Z,M+=e*G,k+=e*D,m+=e*V,B+=e*X,S+=e*j,K+=e*q,Y+=e*H,L+=e*J,T+=e*Q,_+=(e=t[14])*P,A+=e*C,U+=e*N,E+=e*O,d+=e*F,x+=e*I,M+=e*Z,k+=e*G,m+=e*D,B+=e*V,S+=e*X,K+=e*j,Y+=e*q,L+=e*H,T+=e*J,z+=e*Q,A+=(e=t[15])*P,h+=38*(E+=e*N),a+=38*(d+=e*O),f+=38*(x+=e*F),s+=38*(M+=e*I),c+=38*(k+=e*Z),u+=38*(m+=e*G),y+=38*(B+=e*D),l+=38*(S+=e*V),w+=38*(K+=e*X),v+=38*(Y+=e*j),p+=38*(L+=e*q),b+=38*(T+=e*H),g+=38*(z+=e*J),_+=38*(R+=e*Q),i=(e=(i+=38*(U+=e*C))+(o=1)+65535)-65536*(o=Math.floor(e/65536)),h=(e=h+o+65535)-65536*(o=Math.floor(e/65536)),a=(e=a+o+65535)-65536*(o=Math.floor(e/65536)),f=(e=f+o+65535)-65536*(o=Math.floor(e/65536)),s=(e=s+o+65535)-65536*(o=Math.floor(e/65536)),c=(e=c+o+65535)-65536*(o=Math.floor(e/65536)),u=(e=u+o+65535)-65536*(o=Math.floor(e/65536)),y=(e=y+o+65535)-65536*(o=Math.floor(e/65536)),l=(e=l+o+65535)-65536*(o=Math.floor(e/65536)),w=(e=w+o+65535)-65536*(o=Math.floor(e/65536)),v=(e=v+o+65535)-65536*(o=Math.floor(e/65536)),p=(e=p+o+65535)-65536*(o=Math.floor(e/65536)),b=(e=b+o+65535)-65536*(o=Math.floor(e/65536)),g=(e=g+o+65535)-65536*(o=Math.floor(e/65536)),_=(e=_+o+65535)-65536*(o=Math.floor(e/65536)),A=(e=A+o+65535)-65536*(o=Math.floor(e/65536)),i=(e=(i+=o-1+37*(o-1))+(o=1)+65535)-65536*(o=Math.floor(e/65536)),h=(e=h+o+65535)-65536*(o=Math.floor(e/65536)),a=(e=a+o+65535)-65536*(o=Math.floor(e/65536)),f=(e=f+o+65535)-65536*(o=Math.floor(e/65536)),s=(e=s+o+65535)-65536*(o=Math.floor(e/65536)),c=(e=c+o+65535)-65536*(o=Math.floor(e/65536)),u=(e=u+o+65535)-65536*(o=Math.floor(e/65536)),y=(e=y+o+65535)-65536*(o=Math.floor(e/65536)),l=(e=l+o+65535)-65536*(o=Math.floor(e/65536)),w=(e=w+o+65535)-65536*(o=Math.floor(e/65536)),v=(e=v+o+65535)-65536*(o=Math.floor(e/65536)),p=(e=p+o+65535)-65536*(o=Math.floor(e/65536)),b=(e=b+o+65535)-65536*(o=Math.floor(e/65536)),g=(e=g+o+65535)-65536*(o=Math.floor(e/65536)),_=(e=_+o+65535)-65536*(o=Math.floor(e/65536)),A=(e=A+o+65535)-65536*(o=Math.floor(e/65536)),i+=o-1+37*(o-1),r[0]=i,r[1]=h,r[2]=a,r[3]=f,r[4]=s,r[5]=c,r[6]=u,r[7]=y,r[8]=l,r[9]=w,r[10]=v,r[11]=p,r[12]=b,r[13]=g,r[14]=_,r[15]=A}function F(r,t){O(r,t,t)}function I(r,n){var e,o=t();for(e=0;e<16;e++)o[e]=n[e];for(e=253;e>=0;e--)F(o,o),2!==e&&4!==e&&O(o,o,n);for(e=0;e<16;e++)r[e]=o[e]}function Z(r,n){var e,o=t();for(e=0;e<16;e++)o[e]=n[e];for(e=250;e>=0;e--)F(o,o),1!==e&&O(o,o,n);for(e=0;e<16;e++)r[e]=o[e]}function G(r,n,e){var o,i,h=new Uint8Array(32),a=new Float64Array(80),s=t(),c=t(),u=t(),y=t(),l=t(),w=t();for(i=0;i<31;i++)h[i]=n[i];for(h[31]=127&n[31]|64,h[0]&=248,P(a,e),i=0;i<16;i++)c[i]=a[i],y[i]=s[i]=u[i]=0;for(s[0]=y[0]=1,i=254;i>=0;--i)L(s,c,o=h[i>>>3]>>>(7&i)&1),L(u,y,o),C(l,s,u),N(s,s,u),C(u,c,y),N(c,c,y),F(y,l),F(w,s),O(s,u,s),O(u,c,l),C(l,s,u),N(s,s,u),F(c,s),N(u,y,w),O(s,u,f),C(s,s,y),O(u,u,s),O(s,y,w),O(y,c,a),F(c,l),L(s,c,o),L(u,y,o);for(i=0;i<16;i++)a[i+16]=s[i],a[i+32]=u[i],a[i+48]=c[i],a[i+64]=y[i];var v=a.subarray(32),p=a.subarray(16);return I(v,v),O(p,p,v),T(r,p),0}function D(r,t){return G(r,t,i)}function V(r,t){return e(t,32),D(r,t)}function X(r,t,n){var e=new Uint8Array(32);return G(e,n,t),_(r,o,e,A)}M.prototype.blocks=function(r,t,n){for(var e,o,i,h,a,f,s,c,u,y,l,w,v,p,b,g,_,A,U,E=this.fin?0:2048,d=this.h[0],x=this.h[1],M=this.h[2],k=this.h[3],m=this.h[4],B=this.h[5],S=this.h[6],K=this.h[7],Y=this.h[8],L=this.h[9],T=this.r[0],z=this.r[1],R=this.r[2],P=this.r[3],C=this.r[4],N=this.r[5],O=this.r[6],F=this.r[7],I=this.r[8],Z=this.r[9];n>=16;)y=u=0,y+=(d+=8191&(e=255&r[t+0]|(255&r[t+1])<<8))*T,y+=(x+=8191&(e>>>13|(o=255&r[t+2]|(255&r[t+3])<<8)<<3))*(5*Z),y+=(M+=8191&(o>>>10|(i=255&r[t+4]|(255&r[t+5])<<8)<<6))*(5*I),y+=(k+=8191&(i>>>7|(h=255&r[t+6]|(255&r[t+7])<<8)<<9))*(5*F),u=(y+=(m+=8191&(h>>>4|(a=255&r[t+8]|(255&r[t+9])<<8)<<12))*(5*O))>>>13,y&=8191,y+=(B+=a>>>1&8191)*(5*N),y+=(S+=8191&(a>>>14|(f=255&r[t+10]|(255&r[t+11])<<8)<<2))*(5*C),y+=(K+=8191&(f>>>11|(s=255&r[t+12]|(255&r[t+13])<<8)<<5))*(5*P),y+=(Y+=8191&(s>>>8|(c=255&r[t+14]|(255&r[t+15])<<8)<<8))*(5*R),l=u+=(y+=(L+=c>>>5|E)*(5*z))>>>13,l+=d*z,l+=x*T,l+=M*(5*Z),l+=k*(5*I),u=(l+=m*(5*F))>>>13,l&=8191,l+=B*(5*O),l+=S*(5*N),l+=K*(5*C),l+=Y*(5*P),u+=(l+=L*(5*R))>>>13,l&=8191,w=u,w+=d*R,w+=x*z,w+=M*T,w+=k*(5*Z),u=(w+=m*(5*I))>>>13,w&=8191,w+=B*(5*F),w+=S*(5*O),w+=K*(5*N),w+=Y*(5*C),v=u+=(w+=L*(5*P))>>>13,v+=d*P,v+=x*R,v+=M*z,v+=k*T,u=(v+=m*(5*Z))>>>13,v&=8191,v+=B*(5*I),v+=S*(5*F),v+=K*(5*O),v+=Y*(5*N),p=u+=(v+=L*(5*C))>>>13,p+=d*C,p+=x*P,p+=M*R,p+=k*z,u=(p+=m*T)>>>13,p&=8191,p+=B*(5*Z),p+=S*(5*I),p+=K*(5*F),p+=Y*(5*O),b=u+=(p+=L*(5*N))>>>13,b+=d*N,b+=x*C,b+=M*P,b+=k*R,u=(b+=m*z)>>>13,b&=8191,b+=B*T,b+=S*(5*Z),b+=K*(5*I),b+=Y*(5*F),g=u+=(b+=L*(5*O))>>>13,g+=d*O,g+=x*N,g+=M*C,g+=k*P,u=(g+=m*R)>>>13,g&=8191,g+=B*z,g+=S*T,g+=K*(5*Z),g+=Y*(5*I),_=u+=(g+=L*(5*F))>>>13,_+=d*F,_+=x*O,_+=M*N,_+=k*C,u=(_+=m*P)>>>13,_&=8191,_+=B*R,_+=S*z,_+=K*T,_+=Y*(5*Z),A=u+=(_+=L*(5*I))>>>13,A+=d*I,A+=x*F,A+=M*O,A+=k*N,u=(A+=m*C)>>>13,A&=8191,A+=B*P,A+=S*R,A+=K*z,A+=Y*T,U=u+=(A+=L*(5*Z))>>>13,U+=d*Z,U+=x*I,U+=M*F,U+=k*O,u=(U+=m*N)>>>13,U&=8191,U+=B*C,U+=S*P,U+=K*R,U+=Y*z,d=y=8191&(u=(u=((u+=(U+=L*T)>>>13)<<2)+u|0)+(y&=8191)|0),x=l+=u>>>=13,M=w&=8191,k=v&=8191,m=p&=8191,B=b&=8191,S=g&=8191,K=_&=8191,Y=A&=8191,L=U&=8191,t+=16,n-=16;this.h[0]=d,this.h[1]=x,this.h[2]=M,this.h[3]=k,this.h[4]=m,this.h[5]=B,this.h[6]=S,this.h[7]=K,this.h[8]=Y,this.h[9]=L},M.prototype.finish=function(r,t){var n,e,o,i,h=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,h[0]=this.h[0]+5,n=h[0]>>>13,h[0]&=8191,i=1;i<10;i++)h[i]=this.h[i]+n,n=h[i]>>>13,h[i]&=8191;for(h[9]-=8192,e=(1^n)-1,i=0;i<10;i++)h[i]&=e;for(e=~e,i=0;i<10;i++)this.h[i]=this.h[i]&e|h[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;i<8;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;r[t+0]=this.h[0]>>>0&255,r[t+1]=this.h[0]>>>8&255,r[t+2]=this.h[1]>>>0&255,r[t+3]=this.h[1]>>>8&255,r[t+4]=this.h[2]>>>0&255,r[t+5]=this.h[2]>>>8&255,r[t+6]=this.h[3]>>>0&255,r[t+7]=this.h[3]>>>8&255,r[t+8]=this.h[4]>>>0&255,r[t+9]=this.h[4]>>>8&255,r[t+10]=this.h[5]>>>0&255,r[t+11]=this.h[5]>>>8&255,r[t+12]=this.h[6]>>>0&255,r[t+13]=this.h[6]>>>8&255,r[t+14]=this.h[7]>>>0&255,r[t+15]=this.h[7]>>>8&255},M.prototype.update=function(r,t,n){var e,o;if(this.leftover){for((o=16-this.leftover)>n&&(o=n),e=0;e<o;e++)this.buffer[this.leftover+e]=r[t+e];if(n-=o,t+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(o=n-n%16,this.blocks(r,t,o),t+=o,n-=o),n){for(e=0;e<n;e++)this.buffer[this.leftover+e]=r[t+e];this.leftover+=n}};var j=B,q=S,H=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function J(r,t,n,e){for(var o,i,h,a,f,s,c,u,y,l,w,v,p,b,g,_,A,U,E,d,x,M,k,m,B,S,K=new Int32Array(16),Y=new Int32Array(16),L=r[0],T=r[1],z=r[2],R=r[3],P=r[4],C=r[5],N=r[6],O=r[7],F=t[0],I=t[1],Z=t[2],G=t[3],D=t[4],V=t[5],X=t[6],j=t[7],q=0;e>=128;){for(E=0;E<16;E++)d=8*E+q,K[E]=n[d+0]<<24|n[d+1]<<16|n[d+2]<<8|n[d+3],Y[E]=n[d+4]<<24|n[d+5]<<16|n[d+6]<<8|n[d+7];for(E=0;E<80;E++)if(o=L,i=T,h=z,a=R,f=P,s=C,c=N,y=F,l=I,w=Z,v=G,p=D,b=V,g=X,k=65535&(M=j),m=M>>>16,B=65535&(x=O),S=x>>>16,k+=65535&(M=(D>>>14|P<<18)^(D>>>18|P<<14)^(P>>>9|D<<23)),m+=M>>>16,B+=65535&(x=(P>>>14|D<<18)^(P>>>18|D<<14)^(D>>>9|P<<23)),S+=x>>>16,k+=65535&(M=D&V^~D&X),m+=M>>>16,B+=65535&(x=P&C^~P&N),S+=x>>>16,k+=65535&(M=H[2*E+1]),m+=M>>>16,B+=65535&(x=H[2*E]),S+=x>>>16,x=K[E%16],m+=(M=Y[E%16])>>>16,B+=65535&x,S+=x>>>16,B+=(m+=(k+=65535&M)>>>16)>>>16,k=65535&(M=U=65535&k|m<<16),m=M>>>16,B=65535&(x=A=65535&B|(S+=B>>>16)<<16),S=x>>>16,k+=65535&(M=(F>>>28|L<<4)^(L>>>2|F<<30)^(L>>>7|F<<25)),m+=M>>>16,B+=65535&(x=(L>>>28|F<<4)^(F>>>2|L<<30)^(F>>>7|L<<25)),S+=x>>>16,m+=(M=F&I^F&Z^I&Z)>>>16,B+=65535&(x=L&T^L&z^T&z),S+=x>>>16,u=65535&(B+=(m+=(k+=65535&M)>>>16)>>>16)|(S+=B>>>16)<<16,_=65535&k|m<<16,k=65535&(M=v),m=M>>>16,B=65535&(x=a),S=x>>>16,m+=(M=U)>>>16,B+=65535&(x=A),S+=x>>>16,T=o,z=i,R=h,P=a=65535&(B+=(m+=(k+=65535&M)>>>16)>>>16)|(S+=B>>>16)<<16,C=f,N=s,O=c,L=u,I=y,Z=l,G=w,D=v=65535&k|m<<16,V=p,X=b,j=g,F=_,E%16==15)for(d=0;d<16;d++)x=K[d],k=65535&(M=Y[d]),m=M>>>16,B=65535&x,S=x>>>16,x=K[(d+9)%16],k+=65535&(M=Y[(d+9)%16]),m+=M>>>16,B+=65535&x,S+=x>>>16,A=K[(d+1)%16],k+=65535&(M=((U=Y[(d+1)%16])>>>1|A<<31)^(U>>>8|A<<24)^(U>>>7|A<<25)),m+=M>>>16,B+=65535&(x=(A>>>1|U<<31)^(A>>>8|U<<24)^A>>>7),S+=x>>>16,A=K[(d+14)%16],m+=(M=((U=Y[(d+14)%16])>>>19|A<<13)^(A>>>29|U<<3)^(U>>>6|A<<26))>>>16,B+=65535&(x=(A>>>19|U<<13)^(U>>>29|A<<3)^A>>>6),S+=x>>>16,S+=(B+=(m+=(k+=65535&M)>>>16)>>>16)>>>16,K[d]=65535&B|S<<16,Y[d]=65535&k|m<<16;k=65535&(M=F),m=M>>>16,B=65535&(x=L),S=x>>>16,x=r[0],m+=(M=t[0])>>>16,B+=65535&x,S+=x>>>16,S+=(B+=(m+=(k+=65535&M)>>>16)>>>16)>>>16,r[0]=L=65535&B|S<<16,t[0]=F=65535&k|m<<16,k=65535&(M=I),m=M>>>16,B=65535&(x=T),S=x>>>16,x=r[1],m+=(M=t[1])>>>16,B+=65535&x,S+=x>>>16,S+=(B+=(m+=(k+=65535&M)>>>16)>>>16)>>>16,r[1]=T=65535&B|S<<16,t[1]=I=65535&k|m<<16,k=65535&(M=Z),m=M>>>16,B=65535&(x=z),S=x>>>16,x=r[2],m+=(M=t[2])>>>16,B+=65535&x,S+=x>>>16,S+=(B+=(m+=(k+=65535&M)>>>16)>>>16)>>>16,r[2]=z=65535&B|S<<16,t[2]=Z=65535&k|m<<16,k=65535&(M=G),m=M>>>16,B=65535&(x=R),S=x>>>16,x=r[3],m+=(M=t[3])>>>16,B+=65535&x,S+=x>>>16,S+=(B+=(m+=(k+=65535&M)>>>16)>>>16)>>>16,r[3]=R=65535&B|S<<16,t[3]=G=65535&k|m<<16,k=65535&(M=D),m=M>>>16,B=65535&(x=P),S=x>>>16,x=r[4],m+=(M=t[4])>>>16,B+=65535&x,S+=x>>>16,S+=(B+=(m+=(k+=65535&M)>>>16)>>>16)>>>16,r[4]=P=65535&B|S<<16,t[4]=D=65535&k|m<<16,k=65535&(M=V),m=M>>>16,B=65535&(x=C),S=x>>>16,x=r[5],m+=(M=t[5])>>>16,B+=65535&x,S+=x>>>16,S+=(B+=(m+=(k+=65535&M)>>>16)>>>16)>>>16,r[5]=C=65535&B|S<<16,t[5]=V=65535&k|m<<16,k=65535&(M=X),m=M>>>16,B=65535&(x=N),S=x>>>16,x=r[6],m+=(M=t[6])>>>16,B+=65535&x,S+=x>>>16,S+=(B+=(m+=(k+=65535&M)>>>16)>>>16)>>>16,r[6]=N=65535&B|S<<16,t[6]=X=65535&k|m<<16,k=65535&(M=j),m=M>>>16,B=65535&(x=O),S=x>>>16,x=r[7],m+=(M=t[7])>>>16,B+=65535&x,S+=x>>>16,S+=(B+=(m+=(k+=65535&M)>>>16)>>>16)>>>16,r[7]=O=65535&B|S<<16,t[7]=j=65535&k|m<<16,q+=128,e-=128}return e}function Q(r,t,n){var e,o=new Int32Array(8),i=new Int32Array(8),h=new Uint8Array(256),a=n;for(o[0]=1779033703,o[1]=3144134277,o[2]=1013904242,o[3]=2773480762,o[4]=1359893119,o[5]=2600822924,o[6]=528734635,o[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,J(o,i,t,n),n%=128,e=0;e<n;e++)h[e]=t[a-n+e];for(h[n]=128,h[(n=256-128*(n<112?1:0))-9]=0,w(h,n-8,a/536870912|0,a<<3),J(o,i,h,n),e=0;e<8;e++)w(r,8*e,o[e],i[e]);return 0}function W(r,n){var e=t(),o=t(),i=t(),h=t(),a=t(),f=t(),s=t(),u=t(),y=t();N(e,r[1],r[0]),N(y,n[1],n[0]),O(e,e,y),C(o,r[0],r[1]),C(y,n[0],n[1]),O(o,o,y),O(i,r[3],n[3]),O(i,i,c),O(h,r[2],n[2]),C(h,h,h),N(a,o,e),N(f,h,i),C(s,h,i),C(u,o,e),O(r[0],a,f),O(r[1],u,s),O(r[2],s,f),O(r[3],a,u)}function $(r,t,n){var e;for(e=0;e<4;e++)L(r[e],t[e],n)}function rr(r,n){var e=t(),o=t(),i=t();I(i,n[2]),O(e,n[0],i),O(o,n[1],i),T(r,o),r[31]^=R(e)<<7}function tr(r,t,n){var e,o;for(K(r[0],h),K(r[1],a),K(r[2],a),K(r[3],h),o=255;o>=0;--o)$(r,t,e=n[o/8|0]>>(7&o)&1),W(t,r),W(r,r),$(r,t,e)}function nr(r,n){var e=[t(),t(),t(),t()];K(e[0],u),K(e[1],y),K(e[2],a),O(e[3],u,y),tr(r,e,n)}function er(r,n,o){var i,h=new Uint8Array(64),a=[t(),t(),t(),t()];for(o||e(n,32),Q(h,n,32),h[0]&=248,h[31]&=127,h[31]|=64,nr(a,h),rr(r,a),i=0;i<32;i++)n[i+32]=r[i];return 0}var or=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ir(r,t){var n,e,o,i;for(e=63;e>=32;--e){for(n=0,o=e-32,i=e-12;o<i;++o)t[o]+=n-16*t[e]*or[o-(e-32)],n=Math.floor((t[o]+128)/256),t[o]-=256*n;t[o]+=n,t[e]=0}for(n=0,o=0;o<32;o++)t[o]+=n-(t[31]>>4)*or[o],n=t[o]>>8,t[o]&=255;for(o=0;o<32;o++)t[o]-=n*or[o];for(e=0;e<32;e++)t[e+1]+=t[e]>>8,r[e]=255&t[e]}function hr(r){var t,n=new Float64Array(64);for(t=0;t<64;t++)n[t]=r[t];for(t=0;t<64;t++)r[t]=0;ir(r,n)}function ar(r,n,e,o){var i,h,a=new Uint8Array(64),f=new Uint8Array(64),s=new Uint8Array(64),c=new Float64Array(64),u=[t(),t(),t(),t()];Q(a,o,32),a[0]&=248,a[31]&=127,a[31]|=64;var y=e+64;for(i=0;i<e;i++)r[64+i]=n[i];for(i=0;i<32;i++)r[32+i]=a[32+i];for(Q(s,r.subarray(32),e+32),hr(s),nr(u,s),rr(r,u),i=32;i<64;i++)r[i]=o[i];for(Q(f,r,e+64),hr(f),i=0;i<64;i++)c[i]=0;for(i=0;i<32;i++)c[i]=s[i];for(i=0;i<32;i++)for(h=0;h<32;h++)c[i+h]+=f[i]*a[h];return ir(r.subarray(32),c),y}function fr(r,n,e,o){var i,f=new Uint8Array(32),c=new Uint8Array(64),u=[t(),t(),t(),t()],y=[t(),t(),t(),t()];if(e<64)return-1;if(function(r,n){var e=t(),o=t(),i=t(),f=t(),c=t(),u=t(),y=t();return K(r[2],a),P(r[1],n),F(i,r[1]),O(f,i,s),N(i,i,r[2]),C(f,r[2],f),F(c,f),F(u,c),O(y,u,c),O(e,y,i),O(e,e,f),Z(e,e),O(e,e,i),O(e,e,f),O(e,e,f),O(r[0],e,f),F(o,r[0]),O(o,o,f),z(o,i)&&O(r[0],r[0],l),F(o,r[0]),O(o,o,f),z(o,i)?-1:(R(r[0])===n[31]>>7&&N(r[0],h,r[0]),O(r[3],r[0],r[1]),0)}(y,o))return-1;for(i=0;i<e;i++)r[i]=n[i];for(i=0;i<32;i++)r[i+32]=o[i];if(Q(c,r,e),hr(c),tr(u,y,c),nr(y,n.subarray(32)),W(u,y),rr(f,u),e-=64,b(n,0,f,0)){for(i=0;i<e;i++)r[i]=0;return-1}for(i=0;i<e;i++)r[i]=n[i+64];return e}var sr,cr=64,ur=32,yr=64;function lr(r,t){if(32!==r.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function wr(){for(var r=0;r<arguments.length;r++)if(!(arguments[r]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function vr(r){for(var t=0;t<r.length;t++)r[t]=0}r.lowlevel={crypto_core_hsalsa20:_,crypto_stream_xor:x,crypto_stream:d,crypto_stream_salsa20_xor:U,crypto_stream_salsa20:E,crypto_onetimeauth:k,crypto_onetimeauth_verify:m,crypto_verify_16:p,crypto_verify_32:b,crypto_secretbox:B,crypto_secretbox_open:S,crypto_scalarmult:G,crypto_scalarmult_base:D,crypto_box_beforenm:X,crypto_box_afternm:j,crypto_box:function(r,t,n,e,o,i){var h=new Uint8Array(32);return X(h,o,i),j(r,t,n,e,h)},crypto_box_open:function(r,t,n,e,o,i){var h=new Uint8Array(32);return X(h,o,i),q(r,t,n,e,h)},crypto_box_keypair:V,crypto_hash:Q,crypto_sign:ar,crypto_sign_keypair:er,crypto_sign_open:fr,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:cr,crypto_sign_PUBLICKEYBYTES:ur,crypto_sign_SECRETKEYBYTES:yr,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:s,L:or,pack25519:T,unpack25519:P,M:O,A:C,S:F,Z:N,pow2523:Z,add:W,set25519:K,modL:ir,scalarmult:tr,scalarbase:nr},r.randomBytes=function(r){var t=new Uint8Array(r);return e(t,r),t},r.secretbox=function(r,t,n){wr(r,t,n),lr(n,t);for(var e=new Uint8Array(32+r.length),o=new Uint8Array(e.length),i=0;i<r.length;i++)e[i+32]=r[i];return B(o,e,e.length,t,n),o.subarray(16)},r.secretbox.open=function(r,t,n){wr(r,t,n),lr(n,t);for(var e=new Uint8Array(16+r.length),o=new Uint8Array(e.length),i=0;i<r.length;i++)e[i+16]=r[i];return e.length<32||0!==S(o,e,e.length,t,n)?null:o.subarray(32)},r.secretbox.keyLength=32,r.secretbox.nonceLength=24,r.secretbox.overheadLength=16,r.scalarMult=function(r,t){if(wr(r,t),32!==r.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var n=new Uint8Array(32);return G(n,r,t),n},r.scalarMult.base=function(r){if(wr(r),32!==r.length)throw new Error("bad n size");var t=new Uint8Array(32);return D(t,r),t},r.scalarMult.scalarLength=32,r.scalarMult.groupElementLength=32,r.box=function(t,n,e,o){var i=r.box.before(e,o);return r.secretbox(t,n,i)},r.box.before=function(r,t){wr(r,t),function(r,t){if(32!==r.length)throw new Error("bad public key size");if(32!==t.length)throw new Error("bad secret key size")}(r,t);var n=new Uint8Array(32);return X(n,r,t),n},r.box.after=r.secretbox,r.box.open=function(t,n,e,o){var i=r.box.before(e,o);return r.secretbox.open(t,n,i)},r.box.open.after=r.secretbox.open,r.box.keyPair=function(){var r=new Uint8Array(32),t=new Uint8Array(32);return V(r,t),{publicKey:r,secretKey:t}},r.box.keyPair.fromSecretKey=function(r){if(wr(r),32!==r.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return D(t,r),{publicKey:t,secretKey:new Uint8Array(r)}},r.box.publicKeyLength=32,r.box.secretKeyLength=32,r.box.sharedKeyLength=32,r.box.nonceLength=24,r.box.overheadLength=r.secretbox.overheadLength,r.sign=function(r,t){if(wr(r,t),t.length!==yr)throw new Error("bad secret key size");var n=new Uint8Array(cr+r.length);return ar(n,r,r.length,t),n},r.sign.open=function(r,t){if(wr(r,t),t.length!==ur)throw new Error("bad public key size");var n=new Uint8Array(r.length),e=fr(n,r,r.length,t);if(e<0)return null;for(var o=new Uint8Array(e),i=0;i<o.length;i++)o[i]=n[i];return o},r.sign.detached=function(t,n){for(var e=r.sign(t,n),o=new Uint8Array(cr),i=0;i<o.length;i++)o[i]=e[i];return o},r.sign.detached.verify=function(r,t,n){if(wr(r,t,n),t.length!==cr)throw new Error("bad signature size");if(n.length!==ur)throw new Error("bad public key size");var e,o=new Uint8Array(cr+r.length),i=new Uint8Array(cr+r.length);for(e=0;e<cr;e++)o[e]=t[e];for(e=0;e<r.length;e++)o[e+cr]=r[e];return fr(i,o,o.length,n)>=0},r.sign.keyPair=function(){var r=new Uint8Array(ur),t=new Uint8Array(yr);return er(r,t),{publicKey:r,secretKey:t}},r.sign.keyPair.fromSecretKey=function(r){if(wr(r),r.length!==yr)throw new Error("bad secret key size");for(var t=new Uint8Array(ur),n=0;n<t.length;n++)t[n]=r[32+n];return{publicKey:t,secretKey:new Uint8Array(r)}},r.sign.keyPair.fromSeed=function(r){if(wr(r),32!==r.length)throw new Error("bad seed size");for(var t=new Uint8Array(ur),n=new Uint8Array(yr),e=0;e<32;e++)n[e]=r[e];return er(t,n,!0),{publicKey:t,secretKey:n}},r.sign.publicKeyLength=ur,r.sign.secretKeyLength=yr,r.sign.seedLength=32,r.sign.signatureLength=cr,r.hash=function(r){wr(r);var t=new Uint8Array(64);return Q(t,r,r.length),t},r.hash.hashLength=64,r.verify=function(r,t){return wr(r,t),0!==r.length&&0!==t.length&&r.length===t.length&&0===v(r,0,t,0,r.length)},r.setPRNG=function(r){e=r},(sr="undefined"!=typeof self?self.crypto||self.msCrypto:null)&&sr.getRandomValues?r.setPRNG((function(r,t){var n,e=new Uint8Array(t);for(n=0;n<t;n+=65536)sr.getRandomValues(e.subarray(n,n+Math.min(t-n,65536)));for(n=0;n<t;n++)r[n]=e[n];vr(e)})):(sr=n(3211))&&sr.randomBytes&&r.setPRNG((function(r,t){var n,e=sr.randomBytes(t);for(n=0;n<t;n++)r[n]=e[n];vr(e)}))}(r.exports?r.exports:self.nacl=self.nacl||{})}}]);
|