"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var strings_1 = require("@ethersproject/strings"); var wordlist_1 = require("./wordlist"); var data = "}aE#4A=Yv&co#4N#6G=cJ&SM#66|/Z#4t&kn~46#4K~4q%b9=IR#7l,mB#7W_X2*dl}Uo~7s}Uf&Iw#9c&cw~6O&H6&wx&IG%v5=IQ~8a&Pv#47$PR&50%Ko&QM&3l#5f,D9#4L|/H&tQ;v0~6n]nN> 2), 128 + codes.indexOf(data[i * 3 + 1]), 128 + codes.indexOf(data[i * 3 + 2]), ]; if (lang.locale === "zh_tw") { var common = s % 4; for (var i_1 = common; i_1 < 3; i_1++) { bytes[i_1] = codes.indexOf(deltaData[deltaOffset++]) + ((i_1 == 0) ? 228 : 128); } } wordlist[lang.locale].push(strings_1.toUtf8String(bytes)); } // Verify the computed list matches the official list /* istanbul ignore if */ if (wordlist_1.Wordlist.check(lang) !== Checks[lang.locale]) { wordlist[lang.locale] = null; throw new Error("BIP39 Wordlist for " + lang.locale + " (Chinese) FAILED"); } } var LangZh = /** @class */ (function (_super) { __extends(LangZh, _super); function LangZh(country) { return _super.call(this, "zh_" + country) || this; } LangZh.prototype.getWord = function (index) { loadWords(this); return wordlist[this.locale][index]; }; LangZh.prototype.getWordIndex = function (word) { loadWords(this); return wordlist[this.locale].indexOf(word); }; LangZh.prototype.split = function (mnemonic) { mnemonic = mnemonic.replace(/(?:\u3000| )+/g, ""); return mnemonic.split(""); }; return LangZh; }(wordlist_1.Wordlist)); var langZhCn = new LangZh("cn"); exports.langZhCn = langZhCn; wordlist_1.Wordlist.register(langZhCn); wordlist_1.Wordlist.register(langZhCn, "zh"); var langZhTw = new LangZh("tw"); exports.langZhTw = langZhTw; wordlist_1.Wordlist.register(langZhTw); //# sourceMappingURL=lang-zh.js.map