{"dependencies":[{"name":"@polkadot/types-create","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":65,"index":65}}],"key":"/WIJesF6sjfuSS2ZqxoEkhCD2Pk=","exportNames":["*"],"imports":1}}],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n \"use strict\";\n\n Object.defineProperty(exports, '__esModule', {\n value: true\n });\n exports.extractTypes = extractTypes;\n var _polkadotTypesCreate = require(_dependencyMap[0], \"@polkadot/types-create\");\n function extractSubSingle(_, {\n sub\n }) {\n const {\n lookupName,\n type\n } = sub;\n return extractTypes([lookupName || type]);\n }\n function extractSubArray(_, {\n sub\n }) {\n return extractTypes(sub.map(({\n lookupName,\n type\n }) => lookupName || type));\n }\n function unhandled(type, {\n info\n }) {\n throw new Error(`Unhandled: Unable to create and validate type from ${type} (info=${_polkadotTypesCreate.TypeDefInfo[info]})`);\n }\n const mapping = {\n [_polkadotTypesCreate.TypeDefInfo.BTreeMap]: extractSubArray,\n [_polkadotTypesCreate.TypeDefInfo.BTreeSet]: extractSubSingle,\n [_polkadotTypesCreate.TypeDefInfo.Compact]: extractSubSingle,\n [_polkadotTypesCreate.TypeDefInfo.DoNotConstruct]: unhandled,\n [_polkadotTypesCreate.TypeDefInfo.Enum]: extractSubArray,\n [_polkadotTypesCreate.TypeDefInfo.HashMap]: extractSubArray,\n [_polkadotTypesCreate.TypeDefInfo.Int]: unhandled,\n [_polkadotTypesCreate.TypeDefInfo.Linkage]: extractSubSingle,\n [_polkadotTypesCreate.TypeDefInfo.Null]: unhandled,\n [_polkadotTypesCreate.TypeDefInfo.Option]: extractSubSingle,\n [_polkadotTypesCreate.TypeDefInfo.Plain]: (_, typeDef) => typeDef.lookupName || typeDef.type,\n [_polkadotTypesCreate.TypeDefInfo.Range]: extractSubSingle,\n [_polkadotTypesCreate.TypeDefInfo.RangeInclusive]: extractSubSingle,\n [_polkadotTypesCreate.TypeDefInfo.Result]: extractSubArray,\n [_polkadotTypesCreate.TypeDefInfo.Set]: extractSubArray,\n [_polkadotTypesCreate.TypeDefInfo.Si]: unhandled,\n [_polkadotTypesCreate.TypeDefInfo.Struct]: extractSubArray,\n [_polkadotTypesCreate.TypeDefInfo.Tuple]: extractSubArray,\n [_polkadotTypesCreate.TypeDefInfo.UInt]: unhandled,\n [_polkadotTypesCreate.TypeDefInfo.Vec]: extractSubSingle,\n [_polkadotTypesCreate.TypeDefInfo.VecFixed]: extractSubSingle,\n [_polkadotTypesCreate.TypeDefInfo.WrapperKeepOpaque]: extractSubSingle,\n [_polkadotTypesCreate.TypeDefInfo.WrapperOpaque]: extractSubSingle\n };\n /** @internal */\n function extractTypes(types) {\n const count = types.length;\n const result = new Array(count);\n for (let i = 0; i < count; i++) {\n const type = types[i];\n const typeDef = (0, _polkadotTypesCreate.getTypeDef)(type);\n result[i] = mapping[typeDef.info](type, typeDef);\n }\n return result;\n }\n});","lineCount":67,"map":[[7,2,38,0,"exports"],[7,9,38,0],[7,10,38,0,"extractTypes"],[7,22,38,0],[7,25,38,0,"extractTypes"],[7,37,38,0],[8,2,1,0],[8,6,1,0,"_polkadotTypesCreate"],[8,26,1,0],[8,29,1,0,"require"],[8,36,1,0],[8,37,1,0,"_dependencyMap"],[8,51,1,0],[9,2,2,0],[9,11,2,9,"extractSubSingle"],[9,27,2,25,"extractSubSingle"],[9,28,2,26,"_"],[9,29,2,27],[9,31,2,29],[10,4,2,31,"sub"],[11,2,2,35],[11,3,2,36],[11,5,2,38],[12,4,3,4],[12,10,3,10],[13,6,3,12,"lookupName"],[13,16,3,22],[14,6,3,24,"type"],[15,4,3,29],[15,5,3,30],[15,8,3,33,"sub"],[15,11,3,36],[16,4,4,4],[16,11,4,11,"extractTypes"],[16,23,4,23],[16,24,4,24],[16,25,4,25,"lookupName"],[16,35,4,35],[16,39,4,39,"type"],[16,43,4,43],[16,44,4,44],[16,45,4,45],[17,2,5,0],[18,2,6,0],[18,11,6,9,"extractSubArray"],[18,26,6,24,"extractSubArray"],[18,27,6,25,"_"],[18,28,6,26],[18,30,6,28],[19,4,6,30,"sub"],[20,2,6,34],[20,3,6,35],[20,5,6,37],[21,4,7,4],[21,11,7,11,"extractTypes"],[21,23,7,23],[21,24,7,24,"sub"],[21,27,7,27],[21,28,7,28,"map"],[21,31,7,31],[21,32,7,32],[21,33,7,33],[22,6,7,35,"lookupName"],[22,16,7,45],[23,6,7,47,"type"],[24,4,7,52],[24,5,7,53],[24,10,7,58,"lookupName"],[24,20,7,68],[24,24,7,72,"type"],[24,28,7,76],[24,29,7,77],[24,30,7,78],[25,2,8,0],[26,2,9,0],[26,11,9,9,"unhandled"],[26,20,9,18,"unhandled"],[26,21,9,19,"type"],[26,25,9,23],[26,27,9,25],[27,4,9,27,"info"],[28,2,9,32],[28,3,9,33],[28,5,9,35],[29,4,10,4],[29,10,10,10],[29,14,10,14,"Error"],[29,19,10,19],[29,20,10,20],[29,74,10,74,"type"],[29,78,10,78],[29,88,10,88,"TypeDefInfo"],[29,108,10,99],[29,109,10,99,"TypeDefInfo"],[29,120,10,99],[29,121,10,100,"info"],[29,125,10,104],[29,126,10,105],[29,129,10,108],[29,130,10,109],[30,2,11,0],[31,2,12,0],[31,8,12,6,"mapping"],[31,15,12,13],[31,18,12,16],[32,4,13,4],[32,5,13,5,"TypeDefInfo"],[32,25,13,16],[32,26,13,16,"TypeDefInfo"],[32,37,13,16],[32,38,13,17,"BTreeMap"],[32,46,13,25],[32,49,13,28,"extractSubArray"],[32,64,13,43],[33,4,14,4],[33,5,14,5,"TypeDefInfo"],[33,25,14,16],[33,26,14,16,"TypeDefInfo"],[33,37,14,16],[33,38,14,17,"BTreeSet"],[33,46,14,25],[33,49,14,28,"extractSubSingle"],[33,65,14,44],[34,4,15,4],[34,5,15,5,"TypeDefInfo"],[34,25,15,16],[34,26,15,16,"TypeDefInfo"],[34,37,15,16],[34,38,15,17,"Compact"],[34,45,15,24],[34,48,15,27,"extractSubSingle"],[34,64,15,43],[35,4,16,4],[35,5,16,5,"TypeDefInfo"],[35,25,16,16],[35,26,16,16,"TypeDefInfo"],[35,37,16,16],[35,38,16,17,"DoNotConstruct"],[35,52,16,31],[35,55,16,34,"unhandled"],[35,64,16,43],[36,4,17,4],[36,5,17,5,"TypeDefInfo"],[36,25,17,16],[36,26,17,16,"TypeDefInfo"],[36,37,17,16],[36,38,17,17,"Enum"],[36,42,17,21],[36,45,17,24,"extractSubArray"],[36,60,17,39],[37,4,18,4],[37,5,18,5,"TypeDefInfo"],[37,25,18,16],[37,26,18,16,"TypeDefInfo"],[37,37,18,16],[37,38,18,17,"HashMap"],[37,45,18,24],[37,48,18,27,"extractSubArray"],[37,63,18,42],[38,4,19,4],[38,5,19,5,"TypeDefInfo"],[38,25,19,16],[38,26,19,16,"TypeDefInfo"],[38,37,19,16],[38,38,19,17,"Int"],[38,41,19,20],[38,44,19,23,"unhandled"],[38,53,19,32],[39,4,20,4],[39,5,20,5,"TypeDefInfo"],[39,25,20,16],[39,26,20,16,"TypeDefInfo"],[39,37,20,16],[39,38,20,17,"Linkage"],[39,45,20,24],[39,48,20,27,"extractSubSingle"],[39,64,20,43],[40,4,21,4],[40,5,21,5,"TypeDefInfo"],[40,25,21,16],[40,26,21,16,"TypeDefInfo"],[40,37,21,16],[40,38,21,17,"Null"],[40,42,21,21],[40,45,21,24,"unhandled"],[40,54,21,33],[41,4,22,4],[41,5,22,5,"TypeDefInfo"],[41,25,22,16],[41,26,22,16,"TypeDefInfo"],[41,37,22,16],[41,38,22,17,"Option"],[41,44,22,23],[41,47,22,26,"extractSubSingle"],[41,63,22,42],[42,4,23,4],[42,5,23,5,"TypeDefInfo"],[42,25,23,16],[42,26,23,16,"TypeDefInfo"],[42,37,23,16],[42,38,23,17,"Plain"],[42,43,23,22],[42,46,23,25],[42,47,23,26,"_"],[42,48,23,27],[42,50,23,29,"typeDef"],[42,57,23,36],[42,62,23,41,"typeDef"],[42,69,23,48],[42,70,23,49,"lookupName"],[42,80,23,59],[42,84,23,63,"typeDef"],[42,91,23,70],[42,92,23,71,"type"],[42,96,23,75],[43,4,24,4],[43,5,24,5,"TypeDefInfo"],[43,25,24,16],[43,26,24,16,"TypeDefInfo"],[43,37,24,16],[43,38,24,17,"Range"],[43,43,24,22],[43,46,24,25,"extractSubSingle"],[43,62,24,41],[44,4,25,4],[44,5,25,5,"TypeDefInfo"],[44,25,25,16],[44,26,25,16,"TypeDefInfo"],[44,37,25,16],[44,38,25,17,"RangeInclusive"],[44,52,25,31],[44,55,25,34,"extractSubSingle"],[44,71,25,50],[45,4,26,4],[45,5,26,5,"TypeDefInfo"],[45,25,26,16],[45,26,26,16,"TypeDefInfo"],[45,37,26,16],[45,38,26,17,"Result"],[45,44,26,23],[45,47,26,26,"extractSubArray"],[45,62,26,41],[46,4,27,4],[46,5,27,5,"TypeDefInfo"],[46,25,27,16],[46,26,27,16,"TypeDefInfo"],[46,37,27,16],[46,38,27,17,"Set"],[46,41,27,20],[46,44,27,23,"extractSubArray"],[46,59,27,38],[47,4,28,4],[47,5,28,5,"TypeDefInfo"],[47,25,28,16],[47,26,28,16,"TypeDefInfo"],[47,37,28,16],[47,38,28,17,"Si"],[47,40,28,19],[47,43,28,22,"unhandled"],[47,52,28,31],[48,4,29,4],[48,5,29,5,"TypeDefInfo"],[48,25,29,16],[48,26,29,16,"TypeDefInfo"],[48,37,29,16],[48,38,29,17,"Struct"],[48,44,29,23],[48,47,29,26,"extractSubArray"],[48,62,29,41],[49,4,30,4],[49,5,30,5,"TypeDefInfo"],[49,25,30,16],[49,26,30,16,"TypeDefInfo"],[49,37,30,16],[49,38,30,17,"Tuple"],[49,43,30,22],[49,46,30,25,"extractSubArray"],[49,61,30,40],[50,4,31,4],[50,5,31,5,"TypeDefInfo"],[50,25,31,16],[50,26,31,16,"TypeDefInfo"],[50,37,31,16],[50,38,31,17,"UInt"],[50,42,31,21],[50,45,31,24,"unhandled"],[50,54,31,33],[51,4,32,4],[51,5,32,5,"TypeDefInfo"],[51,25,32,16],[51,26,32,16,"TypeDefInfo"],[51,37,32,16],[51,38,32,17,"Vec"],[51,41,32,20],[51,44,32,23,"extractSubSingle"],[51,60,32,39],[52,4,33,4],[52,5,33,5,"TypeDefInfo"],[52,25,33,16],[52,26,33,16,"TypeDefInfo"],[52,37,33,16],[52,38,33,17,"VecFixed"],[52,46,33,25],[52,49,33,28,"extractSubSingle"],[52,65,33,44],[53,4,34,4],[53,5,34,5,"TypeDefInfo"],[53,25,34,16],[53,26,34,16,"TypeDefInfo"],[53,37,34,16],[53,38,34,17,"WrapperKeepOpaque"],[53,55,34,34],[53,58,34,37,"extractSubSingle"],[53,74,34,53],[54,4,35,4],[54,5,35,5,"TypeDefInfo"],[54,25,35,16],[54,26,35,16,"TypeDefInfo"],[54,37,35,16],[54,38,35,17,"WrapperOpaque"],[54,51,35,30],[54,54,35,33,"extractSubSingle"],[55,2,36,0],[55,3,36,1],[56,2,37,0],[57,2,38,7],[57,11,38,16,"extractTypes"],[57,23,38,28,"extractTypes"],[57,24,38,29,"types"],[57,29,38,34],[57,31,38,36],[58,4,39,4],[58,10,39,10,"count"],[58,15,39,15],[58,18,39,18,"types"],[58,23,39,23],[58,24,39,24,"length"],[58,30,39,30],[59,4,40,4],[59,10,40,10,"result"],[59,16,40,16],[59,19,40,19],[59,23,40,23,"Array"],[59,28,40,28],[59,29,40,29,"count"],[59,34,40,34],[59,35,40,35],[60,4,41,4],[60,9,41,9],[60,13,41,13,"i"],[60,14,41,14],[60,17,41,17],[60,18,41,18],[60,20,41,20,"i"],[60,21,41,21],[60,24,41,24,"count"],[60,29,41,29],[60,31,41,31,"i"],[60,32,41,32],[60,34,41,34],[60,36,41,36],[61,6,42,8],[61,12,42,14,"type"],[61,16,42,18],[61,19,42,21,"types"],[61,24,42,26],[61,25,42,27,"i"],[61,26,42,28],[61,27,42,29],[62,6,43,8],[62,12,43,14,"typeDef"],[62,19,43,21],[62,22,43,24],[62,26,43,24,"getTypeDef"],[62,46,43,34],[62,47,43,34,"getTypeDef"],[62,57,43,34],[62,59,43,35,"type"],[62,63,43,39],[62,64,43,40],[63,6,44,8,"result"],[63,12,44,14],[63,13,44,15,"i"],[63,14,44,16],[63,15,44,17],[63,18,44,20,"mapping"],[63,25,44,27],[63,26,44,28,"typeDef"],[63,33,44,35],[63,34,44,36,"info"],[63,38,44,40],[63,39,44,41],[63,40,44,42,"type"],[63,44,44,46],[63,46,44,48,"typeDef"],[63,53,44,55],[63,54,44,56],[64,4,45,4],[65,4,46,4],[65,11,46,11,"result"],[65,17,46,17],[66,2,47,0],[67,0,47,1],[67,3]],"functionMap":{"names":["","extractSubSingle","extractSubArray","sub.map$argument_0","unhandled","mapping.TypeDefInfo.Plain","extractTypes"],"mappings":"AAA;ACC;CDG;AEC;gCCC,4CD;CFC;AIC;CJE;yBKY,kDL;OMe;CNS"},"hasCjsExports":false},"type":"js/module"}]}