@hashgraphonline/standards-sdk 0.0.50 → 0.0.51

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.
Files changed (133) hide show
  1. package/dist/es/standards-sdk.es10.js +1 -1
  2. package/dist/es/standards-sdk.es101.js +1 -1
  3. package/dist/es/standards-sdk.es102.js +3 -3
  4. package/dist/es/standards-sdk.es103.js +3 -3
  5. package/dist/es/standards-sdk.es111.js +1 -1
  6. package/dist/es/standards-sdk.es16.js +7 -7
  7. package/dist/es/standards-sdk.es16.js.map +1 -1
  8. package/dist/es/standards-sdk.es17.js +2 -2
  9. package/dist/es/standards-sdk.es21.js +6522 -939
  10. package/dist/es/standards-sdk.es21.js.map +1 -1
  11. package/dist/es/standards-sdk.es22.js +36 -6624
  12. package/dist/es/standards-sdk.es22.js.map +1 -1
  13. package/dist/es/standards-sdk.es23.js +48 -36
  14. package/dist/es/standards-sdk.es23.js.map +1 -1
  15. package/dist/es/standards-sdk.es24.js +2 -48
  16. package/dist/es/standards-sdk.es24.js.map +1 -1
  17. package/dist/es/standards-sdk.es25.js +1041 -2
  18. package/dist/es/standards-sdk.es25.js.map +1 -1
  19. package/dist/es/standards-sdk.es26.js +2 -2
  20. package/dist/es/standards-sdk.es29.js +1 -1
  21. package/dist/es/standards-sdk.es30.js +2 -2
  22. package/dist/es/standards-sdk.es31.js +419 -2282
  23. package/dist/es/standards-sdk.es31.js.map +1 -1
  24. package/dist/es/standards-sdk.es32.js +2 -2
  25. package/dist/es/standards-sdk.es32.js.map +1 -1
  26. package/dist/es/standards-sdk.es33.js +120 -2
  27. package/dist/es/standards-sdk.es33.js.map +1 -1
  28. package/dist/es/standards-sdk.es34.js +2281 -194
  29. package/dist/es/standards-sdk.es34.js.map +1 -1
  30. package/dist/es/standards-sdk.es35.js +2 -438
  31. package/dist/es/standards-sdk.es35.js.map +1 -1
  32. package/dist/es/standards-sdk.es36.js +28 -24
  33. package/dist/es/standards-sdk.es36.js.map +1 -1
  34. package/dist/es/standards-sdk.es37.js +2 -139
  35. package/dist/es/standards-sdk.es37.js.map +1 -1
  36. package/dist/es/standards-sdk.es38.js +79 -13
  37. package/dist/es/standards-sdk.es38.js.map +1 -1
  38. package/dist/es/standards-sdk.es39.js +21 -27
  39. package/dist/es/standards-sdk.es39.js.map +1 -1
  40. package/dist/es/standards-sdk.es4.js +1 -1
  41. package/dist/es/standards-sdk.es40.js +144 -25
  42. package/dist/es/standards-sdk.es40.js.map +1 -1
  43. package/dist/es/standards-sdk.es41.js +87 -17
  44. package/dist/es/standards-sdk.es41.js.map +1 -1
  45. package/dist/es/standards-sdk.es42.js +168 -38
  46. package/dist/es/standards-sdk.es42.js.map +1 -1
  47. package/dist/es/standards-sdk.es43.js +191 -14
  48. package/dist/es/standards-sdk.es43.js.map +1 -1
  49. package/dist/es/standards-sdk.es44.js +421 -44
  50. package/dist/es/standards-sdk.es44.js.map +1 -1
  51. package/dist/es/standards-sdk.es45.js +19 -1283
  52. package/dist/es/standards-sdk.es45.js.map +1 -1
  53. package/dist/es/standards-sdk.es46.js +122 -131
  54. package/dist/es/standards-sdk.es46.js.map +1 -1
  55. package/dist/es/standards-sdk.es47.js +12 -85
  56. package/dist/es/standards-sdk.es47.js.map +1 -1
  57. package/dist/es/standards-sdk.es48.js +21 -76
  58. package/dist/es/standards-sdk.es48.js.map +1 -1
  59. package/dist/es/standards-sdk.es49.js +25 -28
  60. package/dist/es/standards-sdk.es49.js.map +1 -1
  61. package/dist/es/standards-sdk.es5.js +1 -1
  62. package/dist/es/standards-sdk.es50.js +20 -5
  63. package/dist/es/standards-sdk.es50.js.map +1 -1
  64. package/dist/es/standards-sdk.es51.js +36 -151
  65. package/dist/es/standards-sdk.es51.js.map +1 -1
  66. package/dist/es/standards-sdk.es52.js +17 -22
  67. package/dist/es/standards-sdk.es52.js.map +1 -1
  68. package/dist/es/standards-sdk.es53.js +53 -785
  69. package/dist/es/standards-sdk.es53.js.map +1 -1
  70. package/dist/es/standards-sdk.es54.js +1262 -116
  71. package/dist/es/standards-sdk.es54.js.map +1 -1
  72. package/dist/es/standards-sdk.es55.js +26 -168
  73. package/dist/es/standards-sdk.es55.js.map +1 -1
  74. package/dist/es/standards-sdk.es56.js +5 -418
  75. package/dist/es/standards-sdk.es56.js.map +1 -1
  76. package/dist/es/standards-sdk.es57.js +159 -2
  77. package/dist/es/standards-sdk.es57.js.map +1 -1
  78. package/dist/es/standards-sdk.es58.js +786 -113
  79. package/dist/es/standards-sdk.es58.js.map +1 -1
  80. package/dist/es/standards-sdk.es59.js +138 -16
  81. package/dist/es/standards-sdk.es59.js.map +1 -1
  82. package/dist/es/standards-sdk.es63.js +358 -25
  83. package/dist/es/standards-sdk.es63.js.map +1 -1
  84. package/dist/es/standards-sdk.es64.js +4 -360
  85. package/dist/es/standards-sdk.es64.js.map +1 -1
  86. package/dist/es/standards-sdk.es65.js +178 -5
  87. package/dist/es/standards-sdk.es65.js.map +1 -1
  88. package/dist/es/standards-sdk.es66.js +73 -171
  89. package/dist/es/standards-sdk.es66.js.map +1 -1
  90. package/dist/es/standards-sdk.es67.js +107 -74
  91. package/dist/es/standards-sdk.es67.js.map +1 -1
  92. package/dist/es/standards-sdk.es68.js +45 -107
  93. package/dist/es/standards-sdk.es68.js.map +1 -1
  94. package/dist/es/standards-sdk.es69.js +9 -51
  95. package/dist/es/standards-sdk.es69.js.map +1 -1
  96. package/dist/es/standards-sdk.es70.js +96 -9
  97. package/dist/es/standards-sdk.es70.js.map +1 -1
  98. package/dist/es/standards-sdk.es71.js +3 -96
  99. package/dist/es/standards-sdk.es71.js.map +1 -1
  100. package/dist/es/standards-sdk.es72.js +2 -4
  101. package/dist/es/standards-sdk.es72.js.map +1 -1
  102. package/dist/es/standards-sdk.es73.js +112 -2
  103. package/dist/es/standards-sdk.es73.js.map +1 -1
  104. package/dist/es/standards-sdk.es74.js +70 -108
  105. package/dist/es/standards-sdk.es74.js.map +1 -1
  106. package/dist/es/standards-sdk.es75.js +5 -73
  107. package/dist/es/standards-sdk.es75.js.map +1 -1
  108. package/dist/es/standards-sdk.es76.js +4 -5
  109. package/dist/es/standards-sdk.es76.js.map +1 -1
  110. package/dist/es/standards-sdk.es77.js +220 -4
  111. package/dist/es/standards-sdk.es77.js.map +1 -1
  112. package/dist/es/standards-sdk.es78.js +51 -214
  113. package/dist/es/standards-sdk.es78.js.map +1 -1
  114. package/dist/es/standards-sdk.es79.js +67 -56
  115. package/dist/es/standards-sdk.es79.js.map +1 -1
  116. package/dist/es/standards-sdk.es8.js +2 -2
  117. package/dist/es/standards-sdk.es80.js +21 -69
  118. package/dist/es/standards-sdk.es80.js.map +1 -1
  119. package/dist/es/standards-sdk.es81.js +1 -1
  120. package/dist/es/standards-sdk.es82.js +1 -1
  121. package/dist/es/standards-sdk.es83.js +5 -5
  122. package/dist/es/standards-sdk.es85.js +2 -2
  123. package/dist/es/standards-sdk.es87.js +2 -2
  124. package/dist/es/standards-sdk.es89.js +1 -1
  125. package/dist/es/standards-sdk.es9.js +1 -1
  126. package/dist/es/standards-sdk.es91.js +4 -4
  127. package/dist/es/standards-sdk.es92.js +3 -3
  128. package/dist/es/standards-sdk.es93.js +1 -1
  129. package/dist/es/standards-sdk.es94.js +3 -3
  130. package/dist/es/standards-sdk.es99.js +1 -1
  131. package/dist/umd/standards-sdk.umd.js +1 -1
  132. package/dist/umd/standards-sdk.umd.js.map +1 -1
  133. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"standards-sdk.es58.js","sources":["../../node_modules/quick-format-unescaped/index.js"],"sourcesContent":["'use strict'\nfunction tryStringify (o) {\n try { return JSON.stringify(o) } catch(e) { return '\"[Circular]\"' }\n}\n\nmodule.exports = format\n\nfunction format(f, args, opts) {\n var ss = (opts && opts.stringify) || tryStringify\n var offset = 1\n if (typeof f === 'object' && f !== null) {\n var len = args.length + offset\n if (len === 1) return f\n var objects = new Array(len)\n objects[0] = ss(f)\n for (var index = 1; index < len; index++) {\n objects[index] = ss(args[index])\n }\n return objects.join(' ')\n }\n if (typeof f !== 'string') {\n return f\n }\n var argLen = args.length\n if (argLen === 0) return f\n var str = ''\n var a = 1 - offset\n var lastPos = -1\n var flen = (f && f.length) || 0\n for (var i = 0; i < flen;) {\n if (f.charCodeAt(i) === 37 && i + 1 < flen) {\n lastPos = lastPos > -1 ? lastPos : 0\n switch (f.charCodeAt(i + 1)) {\n case 100: // 'd'\n case 102: // 'f'\n if (a >= argLen)\n break\n if (args[a] == null) break\n if (lastPos < i)\n str += f.slice(lastPos, i)\n str += Number(args[a])\n lastPos = i + 2\n i++\n break\n case 105: // 'i'\n if (a >= argLen)\n break\n if (args[a] == null) break\n if (lastPos < i)\n str += f.slice(lastPos, i)\n str += Math.floor(Number(args[a]))\n lastPos = i + 2\n i++\n break\n case 79: // 'O'\n case 111: // 'o'\n case 106: // 'j'\n if (a >= argLen)\n break\n if (args[a] === undefined) break\n if (lastPos < i)\n str += f.slice(lastPos, i)\n var type = typeof args[a]\n if (type === 'string') {\n str += '\\'' + args[a] + '\\''\n lastPos = i + 2\n i++\n break\n }\n if (type === 'function') {\n str += args[a].name || '<anonymous>'\n lastPos = i + 2\n i++\n break\n }\n str += ss(args[a])\n lastPos = i + 2\n i++\n break\n case 115: // 's'\n if (a >= argLen)\n break\n if (lastPos < i)\n str += f.slice(lastPos, i)\n str += String(args[a])\n lastPos = i + 2\n i++\n break\n case 37: // '%'\n if (lastPos < i)\n str += f.slice(lastPos, i)\n str += '%'\n lastPos = i + 2\n i++\n a--\n break\n }\n ++a\n }\n ++i\n }\n if (lastPos === -1)\n return f\n else if (lastPos < flen) {\n str += f.slice(lastPos)\n }\n\n return str\n}\n"],"names":[],"mappings":";;;;;AACA,WAAS,aAAc,GAAG;AACxB,QAAI;AAAE,aAAO,KAAK,UAAU,CAAC;AAAA,IAAC,SAAS,GAAG;AAAE,aAAO;AAAA,IAAc;AAAA,EACnE;AAEA,yBAAiB;AAEjB,WAAS,OAAO,GAAG,MAAM,MAAM;AAC7B,QA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AA;AAAA,UACL,KAAK;AACH,gBAAI,KAAK;AACP;AACF,gBAAI,KAAK,CAAC,MAAM,OAAW;AAC3B,gBAAI,UAAU;AACZ,qBAAO,EAAE,MAAM,SAAS,CAAC;AAC3B,gBAAI,OAAO,OAAO,KAAK,CAAC;AACxB,gBAAI,SAAS,UAAU;AACrB,qBAAO,MAAO,KAAK,CAAC,IAAI;AACxB,wBAAU,IAAI;AACd;AACA;AAAA,YACZ;AACU,gBAAI,SAAS,YAAY;AACvB,qBAAO,KAAK,CAAC,EAAE,QAAQ;AACvB,wBAAU,IAAI;AACd;AACA;AAAA,YACZ;AACU,mBAAO,GAAG,KAAK,CAAC,CAAC;AACjB,sBAAU,IAAI;AACd;AACA;AAAA,UACF,KAAK;AACH,gBAAI,KAAK;AACP;AACF,gBAAI,UAAU;AACZ,qBAAO,EAAE,MAAM,SAAS,CAAC;AAC3B,mBAAO,OAAO,KAAK,CAAC,CAAC;AACrB,sBAAU,IAAI;AACd;AACA;AAAA,UACF,KAAK;AACH,gBAAI,UAAU;AACZ,qBAAO,EAAE,MAAM,SAAS,CAAC;AAC3B,mBAAO;AACP,sBAAU,IAAI;AACd;AACA;AACA;AAAA,QACV;AACM,UAAE;AAAA,MACR;AACI,QAAE;AAAA,IACN;AACE,QAAI,YAAY;AACd,aAAO;AAAA,aACA,UAAU,MAAM;AACvB,aAAO,EAAE,MAAM,OAAO;AAAA,IAC1B;AAEE,WAAO;AAAA,EACT;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"standards-sdk.es58.js","sources":["../../node_modules/ethers/lib.esm/abi/typed.js"],"sourcesContent":["/**\n * A Typed object allows a value to have its type explicitly\n * specified.\n *\n * For example, in Solidity, the value ``45`` could represent a\n * ``uint8`` or a ``uint256``. The value ``0x1234`` could represent\n * a ``bytes2`` or ``bytes``.\n *\n * Since JavaScript has no meaningful way to explicitly inform any\n * APIs which what the type is, this allows transparent interoperation\n * with Soldity.\n *\n * @_subsection: api/abi:Typed Values\n */\nimport { assertPrivate, defineProperties } from \"../utils/index.js\";\nconst _gaurd = {};\nfunction n(value, width) {\n let signed = false;\n if (width < 0) {\n signed = true;\n width *= -1;\n }\n // @TODO: Check range is valid for value\n return new Typed(_gaurd, `${signed ? \"\" : \"u\"}int${width}`, value, { signed, width });\n}\nfunction b(value, size) {\n // @TODO: Check range is valid for value\n return new Typed(_gaurd, `bytes${(size) ? size : \"\"}`, value, { size });\n}\nconst _typedSymbol = Symbol.for(\"_ethers_typed\");\n/**\n * The **Typed** class to wrap values providing explicit type information.\n */\nexport class Typed {\n /**\n * The type, as a Solidity-compatible type.\n */\n type;\n /**\n * The actual value.\n */\n value;\n #options;\n /**\n * @_ignore:\n */\n _typedSymbol;\n /**\n * @_ignore:\n */\n constructor(gaurd, type, value, options) {\n if (options == null) {\n options = null;\n }\n assertPrivate(_gaurd, gaurd, \"Typed\");\n defineProperties(this, { _typedSymbol, type, value });\n this.#options = options;\n // Check the value is valid\n this.format();\n }\n /**\n * Format the type as a Human-Readable type.\n */\n format() {\n if (this.type === \"array\") {\n throw new Error(\"\");\n }\n else if (this.type === \"dynamicArray\") {\n throw new Error(\"\");\n }\n else if (this.type === \"tuple\") {\n return `tuple(${this.value.map((v) => v.format()).join(\",\")})`;\n }\n return this.type;\n }\n /**\n * The default value returned by this type.\n */\n defaultValue() {\n return 0;\n }\n /**\n * The minimum value for numeric types.\n */\n minValue() {\n return 0;\n }\n /**\n * The maximum value for numeric types.\n */\n maxValue() {\n return 0;\n }\n /**\n * Returns ``true`` and provides a type guard is this is a [[TypedBigInt]].\n */\n isBigInt() {\n return !!(this.type.match(/^u?int[0-9]+$/));\n }\n /**\n * Returns ``true`` and provides a type guard is this is a [[TypedData]].\n */\n isData() {\n return this.type.startsWith(\"bytes\");\n }\n /**\n * Returns ``true`` and provides a type guard is this is a [[TypedString]].\n */\n isString() {\n return (this.type === \"string\");\n }\n /**\n * Returns the tuple name, if this is a tuple. Throws otherwise.\n */\n get tupleName() {\n if (this.type !== \"tuple\") {\n throw TypeError(\"not a tuple\");\n }\n return this.#options;\n }\n // Returns the length of this type as an array\n // - `null` indicates the length is unforced, it could be dynamic\n // - `-1` indicates the length is dynamic\n // - any other value indicates it is a static array and is its length\n /**\n * Returns the length of the array type or ``-1`` if it is dynamic.\n *\n * Throws if the type is not an array.\n */\n get arrayLength() {\n if (this.type !== \"array\") {\n throw TypeError(\"not an array\");\n }\n if (this.#options === true) {\n return -1;\n }\n if (this.#options === false) {\n return (this.value).length;\n }\n return null;\n }\n /**\n * Returns a new **Typed** of %%type%% with the %%value%%.\n */\n static from(type, value) {\n return new Typed(_gaurd, type, value);\n }\n /**\n * Return a new ``uint8`` type for %%v%%.\n */\n static uint8(v) { return n(v, 8); }\n /**\n * Return a new ``uint16`` type for %%v%%.\n */\n static uint16(v) { return n(v, 16); }\n /**\n * Return a new ``uint24`` type for %%v%%.\n */\n static uint24(v) { return n(v, 24); }\n /**\n * Return a new ``uint32`` type for %%v%%.\n */\n static uint32(v) { return n(v, 32); }\n /**\n * Return a new ``uint40`` type for %%v%%.\n */\n static uint40(v) { return n(v, 40); }\n /**\n * Return a new ``uint48`` type for %%v%%.\n */\n static uint48(v) { return n(v, 48); }\n /**\n * Return a new ``uint56`` type for %%v%%.\n */\n static uint56(v) { return n(v, 56); }\n /**\n * Return a new ``uint64`` type for %%v%%.\n */\n static uint64(v) { return n(v, 64); }\n /**\n * Return a new ``uint72`` type for %%v%%.\n */\n static uint72(v) { return n(v, 72); }\n /**\n * Return a new ``uint80`` type for %%v%%.\n */\n static uint80(v) { return n(v, 80); }\n /**\n * Return a new ``uint88`` type for %%v%%.\n */\n static uint88(v) { return n(v, 88); }\n /**\n * Return a new ``uint96`` type for %%v%%.\n */\n static uint96(v) { return n(v, 96); }\n /**\n * Return a new ``uint104`` type for %%v%%.\n */\n static uint104(v) { return n(v, 104); }\n /**\n * Return a new ``uint112`` type for %%v%%.\n */\n static uint112(v) { return n(v, 112); }\n /**\n * Return a new ``uint120`` type for %%v%%.\n */\n static uint120(v) { return n(v, 120); }\n /**\n * Return a new ``uint128`` type for %%v%%.\n */\n static uint128(v) { return n(v, 128); }\n /**\n * Return a new ``uint136`` type for %%v%%.\n */\n static uint136(v) { return n(v, 136); }\n /**\n * Return a new ``uint144`` type for %%v%%.\n */\n static uint144(v) { return n(v, 144); }\n /**\n * Return a new ``uint152`` type for %%v%%.\n */\n static uint152(v) { return n(v, 152); }\n /**\n * Return a new ``uint160`` type for %%v%%.\n */\n static uint160(v) { return n(v, 160); }\n /**\n * Return a new ``uint168`` type for %%v%%.\n */\n static uint168(v) { return n(v, 168); }\n /**\n * Return a new ``uint176`` type for %%v%%.\n */\n static uint176(v) { return n(v, 176); }\n /**\n * Return a new ``uint184`` type for %%v%%.\n */\n static uint184(v) { return n(v, 184); }\n /**\n * Return a new ``uint192`` type for %%v%%.\n */\n static uint192(v) { return n(v, 192); }\n /**\n * Return a new ``uint200`` type for %%v%%.\n */\n static uint200(v) { return n(v, 200); }\n /**\n * Return a new ``uint208`` type for %%v%%.\n */\n static uint208(v) { return n(v, 208); }\n /**\n * Return a new ``uint216`` type for %%v%%.\n */\n static uint216(v) { return n(v, 216); }\n /**\n * Return a new ``uint224`` type for %%v%%.\n */\n static uint224(v) { return n(v, 224); }\n /**\n * Return a new ``uint232`` type for %%v%%.\n */\n static uint232(v) { return n(v, 232); }\n /**\n * Return a new ``uint240`` type for %%v%%.\n */\n static uint240(v) { return n(v, 240); }\n /**\n * Return a new ``uint248`` type for %%v%%.\n */\n static uint248(v) { return n(v, 248); }\n /**\n * Return a new ``uint256`` type for %%v%%.\n */\n static uint256(v) { return n(v, 256); }\n /**\n * Return a new ``uint256`` type for %%v%%.\n */\n static uint(v) { return n(v, 256); }\n /**\n * Return a new ``int8`` type for %%v%%.\n */\n static int8(v) { return n(v, -8); }\n /**\n * Return a new ``int16`` type for %%v%%.\n */\n static int16(v) { return n(v, -16); }\n /**\n * Return a new ``int24`` type for %%v%%.\n */\n static int24(v) { return n(v, -24); }\n /**\n * Return a new ``int32`` type for %%v%%.\n */\n static int32(v) { return n(v, -32); }\n /**\n * Return a new ``int40`` type for %%v%%.\n */\n static int40(v) { return n(v, -40); }\n /**\n * Return a new ``int48`` type for %%v%%.\n */\n static int48(v) { return n(v, -48); }\n /**\n * Return a new ``int56`` type for %%v%%.\n */\n static int56(v) { return n(v, -56); }\n /**\n * Return a new ``int64`` type for %%v%%.\n */\n static int64(v) { return n(v, -64); }\n /**\n * Return a new ``int72`` type for %%v%%.\n */\n static int72(v) { return n(v, -72); }\n /**\n * Return a new ``int80`` type for %%v%%.\n */\n static int80(v) { return n(v, -80); }\n /**\n * Return a new ``int88`` type for %%v%%.\n */\n static int88(v) { return n(v, -88); }\n /**\n * Return a new ``int96`` type for %%v%%.\n */\n static int96(v) { return n(v, -96); }\n /**\n * Return a new ``int104`` type for %%v%%.\n */\n static int104(v) { return n(v, -104); }\n /**\n * Return a new ``int112`` type for %%v%%.\n */\n static int112(v) { return n(v, -112); }\n /**\n * Return a new ``int120`` type for %%v%%.\n */\n static int120(v) { return n(v, -120); }\n /**\n * Return a new ``int128`` type for %%v%%.\n */\n static int128(v) { return n(v, -128); }\n /**\n * Return a new ``int136`` type for %%v%%.\n */\n static int136(v) { return n(v, -136); }\n /**\n * Return a new ``int144`` type for %%v%%.\n */\n static int144(v) { return n(v, -144); }\n /**\n * Return a new ``int52`` type for %%v%%.\n */\n static int152(v) { return n(v, -152); }\n /**\n * Return a new ``int160`` type for %%v%%.\n */\n static int160(v) { return n(v, -160); }\n /**\n * Return a new ``int168`` type for %%v%%.\n */\n static int168(v) { return n(v, -168); }\n /**\n * Return a new ``int176`` type for %%v%%.\n */\n static int176(v) { return n(v, -176); }\n /**\n * Return a new ``int184`` type for %%v%%.\n */\n static int184(v) { return n(v, -184); }\n /**\n * Return a new ``int92`` type for %%v%%.\n */\n static int192(v) { return n(v, -192); }\n /**\n * Return a new ``int200`` type for %%v%%.\n */\n static int200(v) { return n(v, -200); }\n /**\n * Return a new ``int208`` type for %%v%%.\n */\n static int208(v) { return n(v, -208); }\n /**\n * Return a new ``int216`` type for %%v%%.\n */\n static int216(v) { return n(v, -216); }\n /**\n * Return a new ``int224`` type for %%v%%.\n */\n static int224(v) { return n(v, -224); }\n /**\n * Return a new ``int232`` type for %%v%%.\n */\n static int232(v) { return n(v, -232); }\n /**\n * Return a new ``int240`` type for %%v%%.\n */\n static int240(v) { return n(v, -240); }\n /**\n * Return a new ``int248`` type for %%v%%.\n */\n static int248(v) { return n(v, -248); }\n /**\n * Return a new ``int256`` type for %%v%%.\n */\n static int256(v) { return n(v, -256); }\n /**\n * Return a new ``int256`` type for %%v%%.\n */\n static int(v) { return n(v, -256); }\n /**\n * Return a new ``bytes1`` type for %%v%%.\n */\n static bytes1(v) { return b(v, 1); }\n /**\n * Return a new ``bytes2`` type for %%v%%.\n */\n static bytes2(v) { return b(v, 2); }\n /**\n * Return a new ``bytes3`` type for %%v%%.\n */\n static bytes3(v) { return b(v, 3); }\n /**\n * Return a new ``bytes4`` type for %%v%%.\n */\n static bytes4(v) { return b(v, 4); }\n /**\n * Return a new ``bytes5`` type for %%v%%.\n */\n static bytes5(v) { return b(v, 5); }\n /**\n * Return a new ``bytes6`` type for %%v%%.\n */\n static bytes6(v) { return b(v, 6); }\n /**\n * Return a new ``bytes7`` type for %%v%%.\n */\n static bytes7(v) { return b(v, 7); }\n /**\n * Return a new ``bytes8`` type for %%v%%.\n */\n static bytes8(v) { return b(v, 8); }\n /**\n * Return a new ``bytes9`` type for %%v%%.\n */\n static bytes9(v) { return b(v, 9); }\n /**\n * Return a new ``bytes10`` type for %%v%%.\n */\n static bytes10(v) { return b(v, 10); }\n /**\n * Return a new ``bytes11`` type for %%v%%.\n */\n static bytes11(v) { return b(v, 11); }\n /**\n * Return a new ``bytes12`` type for %%v%%.\n */\n static bytes12(v) { return b(v, 12); }\n /**\n * Return a new ``bytes13`` type for %%v%%.\n */\n static bytes13(v) { return b(v, 13); }\n /**\n * Return a new ``bytes14`` type for %%v%%.\n */\n static bytes14(v) { return b(v, 14); }\n /**\n * Return a new ``bytes15`` type for %%v%%.\n */\n static bytes15(v) { return b(v, 15); }\n /**\n * Return a new ``bytes16`` type for %%v%%.\n */\n static bytes16(v) { return b(v, 16); }\n /**\n * Return a new ``bytes17`` type for %%v%%.\n */\n static bytes17(v) { return b(v, 17); }\n /**\n * Return a new ``bytes18`` type for %%v%%.\n */\n static bytes18(v) { return b(v, 18); }\n /**\n * Return a new ``bytes19`` type for %%v%%.\n */\n static bytes19(v) { return b(v, 19); }\n /**\n * Return a new ``bytes20`` type for %%v%%.\n */\n static bytes20(v) { return b(v, 20); }\n /**\n * Return a new ``bytes21`` type for %%v%%.\n */\n static bytes21(v) { return b(v, 21); }\n /**\n * Return a new ``bytes22`` type for %%v%%.\n */\n static bytes22(v) { return b(v, 22); }\n /**\n * Return a new ``bytes23`` type for %%v%%.\n */\n static bytes23(v) { return b(v, 23); }\n /**\n * Return a new ``bytes24`` type for %%v%%.\n */\n static bytes24(v) { return b(v, 24); }\n /**\n * Return a new ``bytes25`` type for %%v%%.\n */\n static bytes25(v) { return b(v, 25); }\n /**\n * Return a new ``bytes26`` type for %%v%%.\n */\n static bytes26(v) { return b(v, 26); }\n /**\n * Return a new ``bytes27`` type for %%v%%.\n */\n static bytes27(v) { return b(v, 27); }\n /**\n * Return a new ``bytes28`` type for %%v%%.\n */\n static bytes28(v) { return b(v, 28); }\n /**\n * Return a new ``bytes29`` type for %%v%%.\n */\n static bytes29(v) { return b(v, 29); }\n /**\n * Return a new ``bytes30`` type for %%v%%.\n */\n static bytes30(v) { return b(v, 30); }\n /**\n * Return a new ``bytes31`` type for %%v%%.\n */\n static bytes31(v) { return b(v, 31); }\n /**\n * Return a new ``bytes32`` type for %%v%%.\n */\n static bytes32(v) { return b(v, 32); }\n /**\n * Return a new ``address`` type for %%v%%.\n */\n static address(v) { return new Typed(_gaurd, \"address\", v); }\n /**\n * Return a new ``bool`` type for %%v%%.\n */\n static bool(v) { return new Typed(_gaurd, \"bool\", !!v); }\n /**\n * Return a new ``bytes`` type for %%v%%.\n */\n static bytes(v) { return new Typed(_gaurd, \"bytes\", v); }\n /**\n * Return a new ``string`` type for %%v%%.\n */\n static string(v) { return new Typed(_gaurd, \"string\", v); }\n /**\n * Return a new ``array`` type for %%v%%, allowing %%dynamic%% length.\n */\n static array(v, dynamic) {\n throw new Error(\"not implemented yet\");\n return new Typed(_gaurd, \"array\", v, dynamic);\n }\n /**\n * Return a new ``tuple`` type for %%v%%, with the optional %%name%%.\n */\n static tuple(v, name) {\n throw new Error(\"not implemented yet\");\n return new Typed(_gaurd, \"tuple\", v, name);\n }\n /**\n * Return a new ``uint8`` type for %%v%%.\n */\n static overrides(v) {\n return new Typed(_gaurd, \"overrides\", Object.assign({}, v));\n }\n /**\n * Returns true only if %%value%% is a [[Typed]] instance.\n */\n static isTyped(value) {\n return (value\n && typeof (value) === \"object\"\n && \"_typedSymbol\" in value\n && value._typedSymbol === _typedSymbol);\n }\n /**\n * If the value is a [[Typed]] instance, validates the underlying value\n * and returns it, otherwise returns value directly.\n *\n * This is useful for functions that with to accept either a [[Typed]]\n * object or values.\n */\n static dereference(value, type) {\n if (Typed.isTyped(value)) {\n if (value.type !== type) {\n throw new Error(`invalid type: expecetd ${type}, got ${value.type}`);\n }\n return value.value;\n }\n return value;\n }\n}\n//# sourceMappingURL=typed.js.map"],"names":[],"mappings":";;;;;;;;;;;;;AAeA,MAAM,SAAS,CAAE;AACjB,SAAS,EAAE,OAAO,OAAO;AACrB,MAAI,SAAS;AACb,MAAI,QAAQ,GAAG;AACX,aAAS;AACT,aAAS;AAAA,EACjB;AAEI,SAAO,IAAI,MAAM,QAAQ,GAAG,SAAS,KAAK,GAAG,MAAM,KAAK,IAAI,OAAO,EAAE,QAAQ,MAAK,CAAE;AACxF;AACA,SAAS,EAAE,OAAO,MAAM;AAEpB,SAAO,IAAI,MAAM,QAAQ,QAAS,OAAQ,OAAO,EAAE,IAAI,OAAO,EAAE,KAA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,UAAU,CAAC;AAAA,EAAE;AAAA;AAAA;AAAA;AAAA,EAIzD,OAAO,MAAM,GAAG,SAAS;AACrB,UAAM,IAAI,MAAM,qBAAqB;AAAA,EAE7C;AAAA;AAAA;AAAA;AAAA,EAII,OAAO,MAAM,GAAG,MAAM;AAClB,UAAM,IAAI,MAAM,qBAAqB;AAAA,EAE7C;AAAA;AAAA;AAAA;AAAA,EAII,OAAO,UAAU,GAAG;AAChB,WAAO,IAAI,OAAM,QAAQ,aAAa,OAAO,OAAO,CAAA,GAAI,CAAC,CAAC;AAAA,EAClE;AAAA;AAAA;AAAA;AAAA,EAII,OAAO,QAAQ,OAAO;AAClB,WAAQ,SACD,OAAQ,UAAW,YACnB,kBAAkB,SAClB,MAAM,iBAAiB;AAAA,EACtC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQI,OAAO,YAAY,OAAO,MAAM;AAC5B,QAAI,OAAM,QAAQ,KAAK,GAAG;AACtB,UAAI,MAAM,SAAS,MAAM;AACrB,cAAM,IAAI,MAAM,0BAA0B,IAAI,SAAS,MAAM,IAAI,EAAE;AAAA,MACnF;AACY,aAAO,MAAM;AAAA,IACzB;AACQ,WAAO;AAAA,EACf;AACA;AA9iBI;AATG,IAAM,QAAN;","x_google_ignoreList":[0]}
@@ -1,24 +1,146 @@
1
- var __defProp = Object.defineProperty;
2
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import { Coder } from "./standards-sdk.es35.js";
5
- class AnonymousCoder extends Coder {
6
- constructor(coder) {
7
- super(coder.name, coder.type, "_", coder.dynamic);
8
- __publicField(this, "coder");
9
- this.coder = coder;
1
+ import { getBytes } from "./standards-sdk.es41.js";
2
+ import { assertArgument } from "./standards-sdk.es40.js";
3
+ function errorFunc(reason, offset, bytes, output, badCodepoint) {
4
+ assertArgument(false, `invalid codepoint at offset ${offset}; ${reason}`, "bytes", bytes);
5
+ }
6
+ function ignoreFunc(reason, offset, bytes, output, badCodepoint) {
7
+ if (reason === "BAD_PREFIX" || reason === "UNEXPECTED_CONTINUE") {
8
+ let i = 0;
9
+ for (let o = offset + 1; o < bytes.length; o++) {
10
+ if (bytes[o] >> 6 !== 2) {
11
+ break;
12
+ }
13
+ i++;
14
+ }
15
+ return i;
16
+ }
17
+ if (reason === "OVERRUN") {
18
+ return bytes.length - offset - 1;
19
+ }
20
+ return 0;
21
+ }
22
+ function replaceFunc(reason, offset, bytes, output, badCodepoint) {
23
+ if (reason === "OVERLONG") {
24
+ assertArgument(typeof badCodepoint === "number", "invalid bad code point for replacement", "badCodepoint", badCodepoint);
25
+ output.push(badCodepoint);
26
+ return 0;
10
27
  }
11
- defaultValue() {
12
- return this.coder.defaultValue();
28
+ output.push(65533);
29
+ return ignoreFunc(reason, offset, bytes);
30
+ }
31
+ const Utf8ErrorFuncs = Object.freeze({
32
+ error: errorFunc,
33
+ ignore: ignoreFunc,
34
+ replace: replaceFunc
35
+ });
36
+ function getUtf8CodePoints(_bytes, onError) {
37
+ if (onError == null) {
38
+ onError = Utf8ErrorFuncs.error;
13
39
  }
14
- encode(writer, value) {
15
- return this.coder.encode(writer, value);
40
+ const bytes = getBytes(_bytes, "bytes");
41
+ const result = [];
42
+ let i = 0;
43
+ while (i < bytes.length) {
44
+ const c = bytes[i++];
45
+ if (c >> 7 === 0) {
46
+ result.push(c);
47
+ continue;
48
+ }
49
+ let extraLength = null;
50
+ let overlongMask = null;
51
+ if ((c & 224) === 192) {
52
+ extraLength = 1;
53
+ overlongMask = 127;
54
+ } else if ((c & 240) === 224) {
55
+ extraLength = 2;
56
+ overlongMask = 2047;
57
+ } else if ((c & 248) === 240) {
58
+ extraLength = 3;
59
+ overlongMask = 65535;
60
+ } else {
61
+ if ((c & 192) === 128) {
62
+ i += onError("UNEXPECTED_CONTINUE", i - 1, bytes, result);
63
+ } else {
64
+ i += onError("BAD_PREFIX", i - 1, bytes, result);
65
+ }
66
+ continue;
67
+ }
68
+ if (i - 1 + extraLength >= bytes.length) {
69
+ i += onError("OVERRUN", i - 1, bytes, result);
70
+ continue;
71
+ }
72
+ let res = c & (1 << 8 - extraLength - 1) - 1;
73
+ for (let j = 0; j < extraLength; j++) {
74
+ let nextChar = bytes[i];
75
+ if ((nextChar & 192) != 128) {
76
+ i += onError("MISSING_CONTINUE", i, bytes, result);
77
+ res = null;
78
+ break;
79
+ }
80
+ res = res << 6 | nextChar & 63;
81
+ i++;
82
+ }
83
+ if (res === null) {
84
+ continue;
85
+ }
86
+ if (res > 1114111) {
87
+ i += onError("OUT_OF_RANGE", i - 1 - extraLength, bytes, result, res);
88
+ continue;
89
+ }
90
+ if (res >= 55296 && res <= 57343) {
91
+ i += onError("UTF16_SURROGATE", i - 1 - extraLength, bytes, result, res);
92
+ continue;
93
+ }
94
+ if (res <= overlongMask) {
95
+ i += onError("OVERLONG", i - 1 - extraLength, bytes, result, res);
96
+ continue;
97
+ }
98
+ result.push(res);
16
99
  }
17
- decode(reader) {
18
- return this.coder.decode(reader);
100
+ return result;
101
+ }
102
+ function toUtf8Bytes(str, form) {
103
+ assertArgument(typeof str === "string", "invalid string value", "str", str);
104
+ let result = [];
105
+ for (let i = 0; i < str.length; i++) {
106
+ const c = str.charCodeAt(i);
107
+ if (c < 128) {
108
+ result.push(c);
109
+ } else if (c < 2048) {
110
+ result.push(c >> 6 | 192);
111
+ result.push(c & 63 | 128);
112
+ } else if ((c & 64512) == 55296) {
113
+ i++;
114
+ const c2 = str.charCodeAt(i);
115
+ assertArgument(i < str.length && (c2 & 64512) === 56320, "invalid surrogate pair", "str", str);
116
+ const pair = 65536 + ((c & 1023) << 10) + (c2 & 1023);
117
+ result.push(pair >> 18 | 240);
118
+ result.push(pair >> 12 & 63 | 128);
119
+ result.push(pair >> 6 & 63 | 128);
120
+ result.push(pair & 63 | 128);
121
+ } else {
122
+ result.push(c >> 12 | 224);
123
+ result.push(c >> 6 & 63 | 128);
124
+ result.push(c & 63 | 128);
125
+ }
19
126
  }
127
+ return new Uint8Array(result);
128
+ }
129
+ function _toUtf8String(codePoints) {
130
+ return codePoints.map((codePoint) => {
131
+ if (codePoint <= 65535) {
132
+ return String.fromCharCode(codePoint);
133
+ }
134
+ codePoint -= 65536;
135
+ return String.fromCharCode((codePoint >> 10 & 1023) + 55296, (codePoint & 1023) + 56320);
136
+ }).join("");
137
+ }
138
+ function toUtf8String(bytes, onError) {
139
+ return _toUtf8String(getUtf8CodePoints(bytes, onError));
20
140
  }
21
141
  export {
22
- AnonymousCoder
142
+ Utf8ErrorFuncs,
143
+ toUtf8Bytes,
144
+ toUtf8String
23
145
  };
24
146
  //# sourceMappingURL=standards-sdk.es59.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"standards-sdk.es59.js","sources":["../../node_modules/ethers/lib.esm/abi/coders/anonymous.js"],"sourcesContent":["import { Coder } from \"./abstract-coder.js\";\n/**\n * Clones the functionality of an existing Coder, but without a localName\n *\n * @_ignore\n */\nexport class AnonymousCoder extends Coder {\n coder;\n constructor(coder) {\n super(coder.name, coder.type, \"_\", coder.dynamic);\n this.coder = coder;\n }\n defaultValue() {\n return this.coder.defaultValue();\n }\n encode(writer, value) {\n return this.coder.encode(writer, value);\n }\n decode(reader) {\n return this.coder.decode(reader);\n }\n}\n//# sourceMappingURL=anonymous.js.map"],"names":[],"mappings":";;;;AAMO,MAAM,uBAAuB,MAAM;AAAA,EAEtC,YAAY,OAAO;AACf,UAAM,MAAM,MAAM,MAAM,MAAM,KAAK,MAAM,OAAO;AAFpD;AAGI,SAAK,QAAQ;AAAA,EACrB;AAAA,EACI,eAAe;AACX,WAAO,KAAK,MAAM,aAAc;AAAA,EACxC;AAAA,EACI,OAAO,QAAQ,OAAO;AAClB,WAAO,KAAK,MAAM,OAAO,QAAQ,KAAK;AAAA,EAC9C;AAAA,EACI,OAAO,QAAQ;AACX,WAAO,KAAK,MAAM,OAAO,MAAM;AAAA,EACvC;AACA;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"standards-sdk.es59.js","sources":["../../node_modules/ethers/lib.esm/utils/utf8.js"],"sourcesContent":["/**\n * Using strings in Ethereum (or any security-basd system) requires\n * additional care. These utilities attempt to mitigate some of the\n * safety issues as well as provide the ability to recover and analyse\n * strings.\n *\n * @_subsection api/utils:Strings and UTF-8 [about-strings]\n */\nimport { getBytes } from \"./data.js\";\nimport { assertArgument, assertNormalize } from \"./errors.js\";\nfunction errorFunc(reason, offset, bytes, output, badCodepoint) {\n assertArgument(false, `invalid codepoint at offset ${offset}; ${reason}`, \"bytes\", bytes);\n}\nfunction ignoreFunc(reason, offset, bytes, output, badCodepoint) {\n // If there is an invalid prefix (including stray continuation), skip any additional continuation bytes\n if (reason === \"BAD_PREFIX\" || reason === \"UNEXPECTED_CONTINUE\") {\n let i = 0;\n for (let o = offset + 1; o < bytes.length; o++) {\n if (bytes[o] >> 6 !== 0x02) {\n break;\n }\n i++;\n }\n return i;\n }\n // This byte runs us past the end of the string, so just jump to the end\n // (but the first byte was read already read and therefore skipped)\n if (reason === \"OVERRUN\") {\n return bytes.length - offset - 1;\n }\n // Nothing to skip\n return 0;\n}\nfunction replaceFunc(reason, offset, bytes, output, badCodepoint) {\n // Overlong representations are otherwise \"valid\" code points; just non-deistingtished\n if (reason === \"OVERLONG\") {\n assertArgument(typeof (badCodepoint) === \"number\", \"invalid bad code point for replacement\", \"badCodepoint\", badCodepoint);\n output.push(badCodepoint);\n return 0;\n }\n // Put the replacement character into the output\n output.push(0xfffd);\n // Otherwise, process as if ignoring errors\n return ignoreFunc(reason, offset, bytes, output, badCodepoint);\n}\n/**\n * A handful of popular, built-in UTF-8 error handling strategies.\n *\n * **``\"error\"``** - throws on ANY illegal UTF-8 sequence or\n * non-canonical (overlong) codepoints (this is the default)\n *\n * **``\"ignore\"``** - silently drops any illegal UTF-8 sequence\n * and accepts non-canonical (overlong) codepoints\n *\n * **``\"replace\"``** - replace any illegal UTF-8 sequence with the\n * UTF-8 replacement character (i.e. ``\"\\\\ufffd\"``) and accepts\n * non-canonical (overlong) codepoints\n *\n * @returns: Record<\"error\" | \"ignore\" | \"replace\", Utf8ErrorFunc>\n */\nexport const Utf8ErrorFuncs = Object.freeze({\n error: errorFunc,\n ignore: ignoreFunc,\n replace: replaceFunc\n});\n// http://stackoverflow.com/questions/13356493/decode-utf-8-with-javascript#13691499\nfunction getUtf8CodePoints(_bytes, onError) {\n if (onError == null) {\n onError = Utf8ErrorFuncs.error;\n }\n const bytes = getBytes(_bytes, \"bytes\");\n const result = [];\n let i = 0;\n // Invalid bytes are ignored\n while (i < bytes.length) {\n const c = bytes[i++];\n // 0xxx xxxx\n if (c >> 7 === 0) {\n result.push(c);\n continue;\n }\n // Multibyte; how many bytes left for this character?\n let extraLength = null;\n let overlongMask = null;\n // 110x xxxx 10xx xxxx\n if ((c & 0xe0) === 0xc0) {\n extraLength = 1;\n overlongMask = 0x7f;\n // 1110 xxxx 10xx xxxx 10xx xxxx\n }\n else if ((c & 0xf0) === 0xe0) {\n extraLength = 2;\n overlongMask = 0x7ff;\n // 1111 0xxx 10xx xxxx 10xx xxxx 10xx xxxx\n }\n else if ((c & 0xf8) === 0xf0) {\n extraLength = 3;\n overlongMask = 0xffff;\n }\n else {\n if ((c & 0xc0) === 0x80) {\n i += onError(\"UNEXPECTED_CONTINUE\", i - 1, bytes, result);\n }\n else {\n i += onError(\"BAD_PREFIX\", i - 1, bytes, result);\n }\n continue;\n }\n // Do we have enough bytes in our data?\n if (i - 1 + extraLength >= bytes.length) {\n i += onError(\"OVERRUN\", i - 1, bytes, result);\n continue;\n }\n // Remove the length prefix from the char\n let res = c & ((1 << (8 - extraLength - 1)) - 1);\n for (let j = 0; j < extraLength; j++) {\n let nextChar = bytes[i];\n // Invalid continuation byte\n if ((nextChar & 0xc0) != 0x80) {\n i += onError(\"MISSING_CONTINUE\", i, bytes, result);\n res = null;\n break;\n }\n ;\n res = (res << 6) | (nextChar & 0x3f);\n i++;\n }\n // See above loop for invalid continuation byte\n if (res === null) {\n continue;\n }\n // Maximum code point\n if (res > 0x10ffff) {\n i += onError(\"OUT_OF_RANGE\", i - 1 - extraLength, bytes, result, res);\n continue;\n }\n // Reserved for UTF-16 surrogate halves\n if (res >= 0xd800 && res <= 0xdfff) {\n i += onError(\"UTF16_SURROGATE\", i - 1 - extraLength, bytes, result, res);\n continue;\n }\n // Check for overlong sequences (more bytes than needed)\n if (res <= overlongMask) {\n i += onError(\"OVERLONG\", i - 1 - extraLength, bytes, result, res);\n continue;\n }\n result.push(res);\n }\n return result;\n}\n// http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array\n/**\n * Returns the UTF-8 byte representation of %%str%%.\n *\n * If %%form%% is specified, the string is normalized.\n */\nexport function toUtf8Bytes(str, form) {\n assertArgument(typeof (str) === \"string\", \"invalid string value\", \"str\", str);\n if (form != null) {\n assertNormalize(form);\n str = str.normalize(form);\n }\n let result = [];\n for (let i = 0; i < str.length; i++) {\n const c = str.charCodeAt(i);\n if (c < 0x80) {\n result.push(c);\n }\n else if (c < 0x800) {\n result.push((c >> 6) | 0xc0);\n result.push((c & 0x3f) | 0x80);\n }\n else if ((c & 0xfc00) == 0xd800) {\n i++;\n const c2 = str.charCodeAt(i);\n assertArgument(i < str.length && ((c2 & 0xfc00) === 0xdc00), \"invalid surrogate pair\", \"str\", str);\n // Surrogate Pair\n const pair = 0x10000 + ((c & 0x03ff) << 10) + (c2 & 0x03ff);\n result.push((pair >> 18) | 0xf0);\n result.push(((pair >> 12) & 0x3f) | 0x80);\n result.push(((pair >> 6) & 0x3f) | 0x80);\n result.push((pair & 0x3f) | 0x80);\n }\n else {\n result.push((c >> 12) | 0xe0);\n result.push(((c >> 6) & 0x3f) | 0x80);\n result.push((c & 0x3f) | 0x80);\n }\n }\n return new Uint8Array(result);\n}\n;\n//export \nfunction _toUtf8String(codePoints) {\n return codePoints.map((codePoint) => {\n if (codePoint <= 0xffff) {\n return String.fromCharCode(codePoint);\n }\n codePoint -= 0x10000;\n return String.fromCharCode((((codePoint >> 10) & 0x3ff) + 0xd800), ((codePoint & 0x3ff) + 0xdc00));\n }).join(\"\");\n}\n/**\n * Returns the string represented by the UTF-8 data %%bytes%%.\n *\n * When %%onError%% function is specified, it is called on UTF-8\n * errors allowing recovery using the [[Utf8ErrorFunc]] API.\n * (default: [error](Utf8ErrorFuncs))\n */\nexport function toUtf8String(bytes, onError) {\n return _toUtf8String(getUtf8CodePoints(bytes, onError));\n}\n/**\n * Returns the UTF-8 code-points for %%str%%.\n *\n * If %%form%% is specified, the string is normalized.\n */\nexport function toUtf8CodePoints(str, form) {\n return getUtf8CodePoints(toUtf8Bytes(str, form));\n}\n//# sourceMappingURL=utf8.js.map"],"names":[],"mappings":";;AAUA,SAAS,UAAU,QAAQ,QAAQ,OAAO,QAAQ,cAAc;AAC5D,iBAAe,OAAO,+BAA+B,MAAM,KAAK,MAAM,IAAI,SAAS,KAAK;AAC5F;AACA,SAAS,WAAW,QAAQ,QAAQ,OAAO,QAAQ,cAAc;AAE7D,MAAI,WAAW,gBAAgB,WAAW,uBAAuB;AAC7D,QAAI,IAAI;AACR,aAAS,IAAI,SAAS,GAAG,IAAI,MAAM,QAAQ,KAAK;AAC5C,UAAI,MAAM,CAAC,KAAK,MAAM,GAAM;AACxB;AAAA,MAChB;AACY;AAAA,IACZ;AACQ,WAAO;AAAA,EACf;AAGI,MAAI,WAAW,WAAW;AACtB,WAAO,MAAM,SAAS,SAAS;AAAA,EACvC;AAEI,SAAO;AACX;AACA,SAAS,YAAY,QAAQ,QAAQ,OAAO,QAAQ,cAAc;AAE9D,MAAI,WAAW,YAAY;AACvB,mBAAe,OAAQ,iBAAkB,UAAU,0CAA0C,gBAAgB,YAAY;AACzH,WAAO,KAAK,YAAY;AACxB,WAAO;AAAA,EACf;AAEI,SAAO,KAAK,KAAM;AAElB,SAAO,WAAW,QAAQ,QAAQ,KAA2B;AACjE;AAgBY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,GAAI;AAAA,IACzC;AAAA,EACA;AACI,SAAO,IAAI,WAAW,MAAM;AAChC;AAGA,SAAS,cAAc,YAAY;AAC/B,SAAO,WAAW,IAAI,CAAC,cAAc;AACjC,QAAI,aAAa,OAAQ;AACrB,aAAO,OAAO,aAAa,SAAS;AAAA,IAChD;AACQ,iBAAa;AACb,WAAO,OAAO,cAAgB,aAAa,KAAM,QAAS,QAAW,YAAY,QAAS,KAAQ;AAAA,EAC1G,CAAK,EAAE,KAAK,EAAE;AACd;AAQO,SAAS,aAAa,OAAO,SAAS;AACzC,SAAO,cAAc,kBAAkB,OAAO,OAAO,CAAC;AAC1D;","x_google_ignoreList":[0]}
@@ -1,32 +1,365 @@
1
- function getDefaultExportFromCjs(x) {
2
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
1
+ import bind from "./standards-sdk.es64.js";
2
+ const { toString } = Object.prototype;
3
+ const { getPrototypeOf } = Object;
4
+ const kindOf = /* @__PURE__ */ ((cache) => (thing) => {
5
+ const str = toString.call(thing);
6
+ return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
7
+ })(/* @__PURE__ */ Object.create(null));
8
+ const kindOfTest = (type) => {
9
+ type = type.toLowerCase();
10
+ return (thing) => kindOf(thing) === type;
11
+ };
12
+ const typeOfTest = (type) => (thing) => typeof thing === type;
13
+ const { isArray } = Array;
14
+ const isUndefined = typeOfTest("undefined");
15
+ function isBuffer(val) {
16
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
3
17
  }
4
- function getAugmentedNamespace(n) {
5
- if (Object.prototype.hasOwnProperty.call(n, "__esModule")) return n;
6
- var f = n.default;
7
- if (typeof f == "function") {
8
- var a = function a2() {
9
- if (this instanceof a2) {
10
- return Reflect.construct(f, arguments, this.constructor);
11
- }
12
- return f.apply(this, arguments);
13
- };
14
- a.prototype = f.prototype;
15
- } else a = {};
16
- Object.defineProperty(a, "__esModule", { value: true });
17
- Object.keys(n).forEach(function(k) {
18
- var d = Object.getOwnPropertyDescriptor(n, k);
19
- Object.defineProperty(a, k, d.get ? d : {
20
- enumerable: true,
21
- get: function() {
22
- return n[k];
18
+ const isArrayBuffer = kindOfTest("ArrayBuffer");
19
+ function isArrayBufferView(val) {
20
+ let result;
21
+ if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
22
+ result = ArrayBuffer.isView(val);
23
+ } else {
24
+ result = val && val.buffer && isArrayBuffer(val.buffer);
25
+ }
26
+ return result;
27
+ }
28
+ const isString = typeOfTest("string");
29
+ const isFunction = typeOfTest("function");
30
+ const isNumber = typeOfTest("number");
31
+ const isObject = (thing) => thing !== null && typeof thing === "object";
32
+ const isBoolean = (thing) => thing === true || thing === false;
33
+ const isPlainObject = (val) => {
34
+ if (kindOf(val) !== "object") {
35
+ return false;
36
+ }
37
+ const prototype = getPrototypeOf(val);
38
+ return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
39
+ };
40
+ const isDate = kindOfTest("Date");
41
+ const isFile = kindOfTest("File");
42
+ const isBlob = kindOfTest("Blob");
43
+ const isFileList = kindOfTest("FileList");
44
+ const isStream = (val) => isObject(val) && isFunction(val.pipe);
45
+ const isFormData = (thing) => {
46
+ let kind;
47
+ return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
48
+ kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
49
+ };
50
+ const isURLSearchParams = kindOfTest("URLSearchParams");
51
+ const [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
52
+ const trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
53
+ function forEach(obj, fn, { allOwnKeys = false } = {}) {
54
+ if (obj === null || typeof obj === "undefined") {
55
+ return;
56
+ }
57
+ let i;
58
+ let l;
59
+ if (typeof obj !== "object") {
60
+ obj = [obj];
61
+ }
62
+ if (isArray(obj)) {
63
+ for (i = 0, l = obj.length; i < l; i++) {
64
+ fn.call(null, obj[i], i, obj);
65
+ }
66
+ } else {
67
+ const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
68
+ const len = keys.length;
69
+ let key;
70
+ for (i = 0; i < len; i++) {
71
+ key = keys[i];
72
+ fn.call(null, obj[key], key, obj);
73
+ }
74
+ }
75
+ }
76
+ function findKey(obj, key) {
77
+ key = key.toLowerCase();
78
+ const keys = Object.keys(obj);
79
+ let i = keys.length;
80
+ let _key;
81
+ while (i-- > 0) {
82
+ _key = keys[i];
83
+ if (key === _key.toLowerCase()) {
84
+ return _key;
85
+ }
86
+ }
87
+ return null;
88
+ }
89
+ const _global = (() => {
90
+ if (typeof globalThis !== "undefined") return globalThis;
91
+ return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
92
+ })();
93
+ const isContextDefined = (context) => !isUndefined(context) && context !== _global;
94
+ function merge() {
95
+ const { caseless } = isContextDefined(this) && this || {};
96
+ const result = {};
97
+ const assignValue = (val, key) => {
98
+ const targetKey = caseless && findKey(result, key) || key;
99
+ if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
100
+ result[targetKey] = merge(result[targetKey], val);
101
+ } else if (isPlainObject(val)) {
102
+ result[targetKey] = merge({}, val);
103
+ } else if (isArray(val)) {
104
+ result[targetKey] = val.slice();
105
+ } else {
106
+ result[targetKey] = val;
107
+ }
108
+ };
109
+ for (let i = 0, l = arguments.length; i < l; i++) {
110
+ arguments[i] && forEach(arguments[i], assignValue);
111
+ }
112
+ return result;
113
+ }
114
+ const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
115
+ forEach(b, (val, key) => {
116
+ if (thisArg && isFunction(val)) {
117
+ a[key] = bind(val, thisArg);
118
+ } else {
119
+ a[key] = val;
120
+ }
121
+ }, { allOwnKeys });
122
+ return a;
123
+ };
124
+ const stripBOM = (content) => {
125
+ if (content.charCodeAt(0) === 65279) {
126
+ content = content.slice(1);
127
+ }
128
+ return content;
129
+ };
130
+ const inherits = (constructor, superConstructor, props, descriptors) => {
131
+ constructor.prototype = Object.create(superConstructor.prototype, descriptors);
132
+ constructor.prototype.constructor = constructor;
133
+ Object.defineProperty(constructor, "super", {
134
+ value: superConstructor.prototype
135
+ });
136
+ props && Object.assign(constructor.prototype, props);
137
+ };
138
+ const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
139
+ let props;
140
+ let i;
141
+ let prop;
142
+ const merged = {};
143
+ destObj = destObj || {};
144
+ if (sourceObj == null) return destObj;
145
+ do {
146
+ props = Object.getOwnPropertyNames(sourceObj);
147
+ i = props.length;
148
+ while (i-- > 0) {
149
+ prop = props[i];
150
+ if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
151
+ destObj[prop] = sourceObj[prop];
152
+ merged[prop] = true;
23
153
  }
24
- });
154
+ }
155
+ sourceObj = filter !== false && getPrototypeOf(sourceObj);
156
+ } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
157
+ return destObj;
158
+ };
159
+ const endsWith = (str, searchString, position) => {
160
+ str = String(str);
161
+ if (position === void 0 || position > str.length) {
162
+ position = str.length;
163
+ }
164
+ position -= searchString.length;
165
+ const lastIndex = str.indexOf(searchString, position);
166
+ return lastIndex !== -1 && lastIndex === position;
167
+ };
168
+ const toArray = (thing) => {
169
+ if (!thing) return null;
170
+ if (isArray(thing)) return thing;
171
+ let i = thing.length;
172
+ if (!isNumber(i)) return null;
173
+ const arr = new Array(i);
174
+ while (i-- > 0) {
175
+ arr[i] = thing[i];
176
+ }
177
+ return arr;
178
+ };
179
+ const isTypedArray = /* @__PURE__ */ ((TypedArray) => {
180
+ return (thing) => {
181
+ return TypedArray && thing instanceof TypedArray;
182
+ };
183
+ })(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
184
+ const forEachEntry = (obj, fn) => {
185
+ const generator = obj && obj[Symbol.iterator];
186
+ const iterator = generator.call(obj);
187
+ let result;
188
+ while ((result = iterator.next()) && !result.done) {
189
+ const pair = result.value;
190
+ fn.call(obj, pair[0], pair[1]);
191
+ }
192
+ };
193
+ const matchAll = (regExp, str) => {
194
+ let matches;
195
+ const arr = [];
196
+ while ((matches = regExp.exec(str)) !== null) {
197
+ arr.push(matches);
198
+ }
199
+ return arr;
200
+ };
201
+ const isHTMLForm = kindOfTest("HTMLFormElement");
202
+ const toCamelCase = (str) => {
203
+ return str.toLowerCase().replace(
204
+ /[-_\s]([a-z\d])(\w*)/g,
205
+ function replacer(m, p1, p2) {
206
+ return p1.toUpperCase() + p2;
207
+ }
208
+ );
209
+ };
210
+ const hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
211
+ const isRegExp = kindOfTest("RegExp");
212
+ const reduceDescriptors = (obj, reducer) => {
213
+ const descriptors = Object.getOwnPropertyDescriptors(obj);
214
+ const reducedDescriptors = {};
215
+ forEach(descriptors, (descriptor, name) => {
216
+ let ret;
217
+ if ((ret = reducer(descriptor, name, obj)) !== false) {
218
+ reducedDescriptors[name] = ret || descriptor;
219
+ }
25
220
  });
26
- return a;
221
+ Object.defineProperties(obj, reducedDescriptors);
222
+ };
223
+ const freezeMethods = (obj) => {
224
+ reduceDescriptors(obj, (descriptor, name) => {
225
+ if (isFunction(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
226
+ return false;
227
+ }
228
+ const value = obj[name];
229
+ if (!isFunction(value)) return;
230
+ descriptor.enumerable = false;
231
+ if ("writable" in descriptor) {
232
+ descriptor.writable = false;
233
+ return;
234
+ }
235
+ if (!descriptor.set) {
236
+ descriptor.set = () => {
237
+ throw Error("Can not rewrite read-only method '" + name + "'");
238
+ };
239
+ }
240
+ });
241
+ };
242
+ const toObjectSet = (arrayOrString, delimiter) => {
243
+ const obj = {};
244
+ const define = (arr) => {
245
+ arr.forEach((value) => {
246
+ obj[value] = true;
247
+ });
248
+ };
249
+ isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
250
+ return obj;
251
+ };
252
+ const noop = () => {
253
+ };
254
+ const toFiniteNumber = (value, defaultValue) => {
255
+ return value != null && Number.isFinite(value = +value) ? value : defaultValue;
256
+ };
257
+ function isSpecCompliantForm(thing) {
258
+ return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]);
27
259
  }
260
+ const toJSONObject = (obj) => {
261
+ const stack = new Array(10);
262
+ const visit = (source, i) => {
263
+ if (isObject(source)) {
264
+ if (stack.indexOf(source) >= 0) {
265
+ return;
266
+ }
267
+ if (!("toJSON" in source)) {
268
+ stack[i] = source;
269
+ const target = isArray(source) ? [] : {};
270
+ forEach(source, (value, key) => {
271
+ const reducedValue = visit(value, i + 1);
272
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
273
+ });
274
+ stack[i] = void 0;
275
+ return target;
276
+ }
277
+ }
278
+ return source;
279
+ };
280
+ return visit(obj, 0);
281
+ };
282
+ const isAsyncFn = kindOfTest("AsyncFunction");
283
+ const isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
284
+ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
285
+ if (setImmediateSupported) {
286
+ return setImmediate;
287
+ }
288
+ return postMessageSupported ? ((token, callbacks) => {
289
+ _global.addEventListener("message", ({ source, data }) => {
290
+ if (source === _global && data === token) {
291
+ callbacks.length && callbacks.shift()();
292
+ }
293
+ }, false);
294
+ return (cb) => {
295
+ callbacks.push(cb);
296
+ _global.postMessage(token, "*");
297
+ };
298
+ })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
299
+ })(
300
+ typeof setImmediate === "function",
301
+ isFunction(_global.postMessage)
302
+ );
303
+ const asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
304
+ const utils = {
305
+ isArray,
306
+ isArrayBuffer,
307
+ isBuffer,
308
+ isFormData,
309
+ isArrayBufferView,
310
+ isString,
311
+ isNumber,
312
+ isBoolean,
313
+ isObject,
314
+ isPlainObject,
315
+ isReadableStream,
316
+ isRequest,
317
+ isResponse,
318
+ isHeaders,
319
+ isUndefined,
320
+ isDate,
321
+ isFile,
322
+ isBlob,
323
+ isRegExp,
324
+ isFunction,
325
+ isStream,
326
+ isURLSearchParams,
327
+ isTypedArray,
328
+ isFileList,
329
+ forEach,
330
+ merge,
331
+ extend,
332
+ trim,
333
+ stripBOM,
334
+ inherits,
335
+ toFlatObject,
336
+ kindOf,
337
+ kindOfTest,
338
+ endsWith,
339
+ toArray,
340
+ forEachEntry,
341
+ matchAll,
342
+ isHTMLForm,
343
+ hasOwnProperty,
344
+ hasOwnProp: hasOwnProperty,
345
+ // an alias to avoid ESLint no-prototype-builtins detection
346
+ reduceDescriptors,
347
+ freezeMethods,
348
+ toObjectSet,
349
+ toCamelCase,
350
+ noop,
351
+ toFiniteNumber,
352
+ findKey,
353
+ global: _global,
354
+ isContextDefined,
355
+ isSpecCompliantForm,
356
+ toJSONObject,
357
+ isAsyncFn,
358
+ isThenable,
359
+ setImmediate: _setImmediate,
360
+ asap
361
+ };
28
362
  export {
29
- getAugmentedNamespace,
30
- getDefaultExportFromCjs
363
+ utils as default
31
364
  };
32
365
  //# sourceMappingURL=standards-sdk.es63.js.map