/*
 * SDK Pullenti Lingvo, version 4.33, fabruary 2026. Copyright (c) 2013-2026, Pullenti. All rights reserved. 
 * Non-Commercial Freeware and Commercial Software.
 * This class is generated using the converter Unisharping (www.unisharping.ru) from Pullenti C#.NET project. 
 * The latest version of the code is available on the site www.pullenti.ru
 */

const Utils = require("./../../../unisharp/Utils");
const RefOutArgWrapper = require("./../../../unisharp/RefOutArgWrapper");

const MiscHelper = require("./../../core/MiscHelper");
const TextToken = require("./../../TextToken");
const NumberSpellingType = require("./../../NumberSpellingType");
const TerminParseAttr = require("./../../core/TerminParseAttr");
const OrganizationKind = require("./../../org/OrganizationKind");
const OrganizationReferent = require("./../../org/OrganizationReferent");
const UriReferent = require("./../../uri/UriReferent");
const MorphLang = require("./../../../morph/MorphLang");
const Termin = require("./../../core/Termin");
const BlkTyps = require("./../../core/internal/BlkTyps");
const BookLinkRefReferent = require("./../BookLinkRefReferent");
const TerminCollection = require("./../../core/TerminCollection");
const BlockLine = require("./../../core/internal/BlockLine");
const TitleItemToken = require("./TitleItemToken");
const ReferentToken = require("./../../ReferentToken");
const GetTextAttr = require("./../../core/GetTextAttr");
const PersonPropertyReferent = require("./../../person/PersonPropertyReferent");
const BookLinkTyp = require("./BookLinkTyp");
const FioTemplateType = require("./../../person/internal/FioTemplateType");
const BracketParseAttr = require("./../../core/BracketParseAttr");
const GeoReferent = require("./../../geo/GeoReferent");
const PersonItemToken = require("./../../person/internal/PersonItemToken");
const DateReferent = require("./../../date/DateReferent");
const PersonReferent = require("./../../person/PersonReferent");
const MetaToken = require("./../../MetaToken");
const BracketHelper = require("./../../core/BracketHelper");
const NumberToken = require("./../../NumberToken");

class BookLinkToken extends MetaToken {
    
    constructor(b, e) {
        super(b, e, null);
        this.typ = BookLinkTyp.UNDEFINED;
        this.value = null;
        this.tok = null;
        this.ref = null;
        this.addCoef = 0;
        this.personTemplate = FioTemplateType.UNDEFINED;
        this.startOfName = null;
    }
    
    static tryParseAuthor(t, prevPersTemplate = FioTemplateType.UNDEFINED) {
        if (t === null) 
            return null;
        let rtp = PersonItemToken.tryParsePerson(t, prevPersTemplate, false);
        if (rtp !== null) {
            let re = null;
            if (rtp.data === null) 
                re = BookLinkToken._new464(t, (rtp === t ? t : rtp.endToken), BookLinkTyp.PERSON, rtp.referent);
            else 
                re = BookLinkToken._new465(t, rtp.endToken, BookLinkTyp.PERSON, rtp);
            re.personTemplate = FioTemplateType.of(rtp.miscAttrs);
            for (let tt = rtp.beginToken; tt !== null && tt.endChar <= rtp.endChar; tt = tt.next) {
                if (!(tt.getReferent() instanceof PersonPropertyReferent)) 
                    continue;
                let rt = Utils.as(tt, ReferentToken);
                if (rt.beginToken.chars.isCapitalUpper && tt !== rtp.beginToken) {
                    re.startOfName = MiscHelper.getTextValueOfMetaToken(rt, GetTextAttr.KEEPREGISTER);
                    break;
                }
                return null;
            }
            return re;
        }
        if (t.isChar('[')) {
            let re = BookLinkToken.tryParseAuthor(t.next, FioTemplateType.UNDEFINED);
            if (re !== null && re.endToken.next !== null && re.endToken.next.isChar(']')) {
                re.beginToken = t;
                re.endToken = re.endToken.next;
                return re;
            }
        }
        if (((t.isValue("И", null) || t.isValue("ET", null))) && t.next !== null) {
            if (t.next.isValue("ДРУГИЕ", null) || t.next.isValue("ДР", null) || t.next.isValue("AL", null)) {
                let res = BookLinkToken._new466(t, t.next, BookLinkTyp.ANDOTHERS);
                if (t.next.next !== null && t.next.next.isChar('.')) 
                    res.endToken = res.endToken.next;
                return res;
            }
        }
        return null;
    }
    
    static tryParse(t, lev = 0) {
        if (t === null || lev > 3) 
            return null;
        let res = BookLinkToken._tryParse(t, lev + 1);
        if (res === null) {
            if (t.isHiphen) 
                res = BookLinkToken._tryParse(t.next, lev + 1);
            if (res === null) 
                return null;
        }
        if (res.endToken.next !== null && res.endToken.next.isChar('.')) 
            res.endToken = res.endToken.next;
        t = res.endToken.next;
        if (t !== null && t.isComma) 
            t = t.next;
        if (res.typ === BookLinkTyp.GEO || res.typ === BookLinkTyp.PRESS) {
            let re2 = BookLinkToken._tryParse(t, lev + 1);
            if (re2 !== null && ((re2.typ === BookLinkTyp.PRESS || re2.typ === BookLinkTyp.YEAR))) 
                res.addCoef += (1);
        }
        return res;
    }
    
    static _tryParse(t, lev) {
        if (t === null || lev > 3) 
            return null;
        if (t.isChar('[')) {
            let re = BookLinkToken._tryParse(t.next, lev + 1);
            if (re !== null && re.endToken.next !== null && re.endToken.next.isChar(']')) {
                re.beginToken = t;
                re.endToken = re.endToken.next;
                return re;
            }
            if (re !== null && re.endToken.isChar(']')) {
                re.beginToken = t;
                return re;
            }
            if (re !== null) {
                if (re.typ === BookLinkTyp.SOSTAVITEL || re.typ === BookLinkTyp.EDITORS) 
                    return re;
            }
            let br = BracketHelper.tryParse(t, BracketParseAttr.NO, 100);
            if (br !== null) {
                if ((br.endToken.previous instanceof NumberToken) && (br.lengthChar < 30)) 
                    return BookLinkToken._new467(t, br.endToken, BookLinkTyp.NUMBER, MiscHelper.getTextValue(br.beginToken.next, br.endToken.previous, GetTextAttr.NO));
            }
        }
        let t0 = t;
        if (t instanceof ReferentToken) {
            if (t.getReferent() instanceof PersonReferent) 
                return BookLinkToken.tryParseAuthor(t, FioTemplateType.UNDEFINED);
            if (t.getReferent() instanceof GeoReferent) 
                return BookLinkToken._new464(t, t, BookLinkTyp.GEO, t.getReferent());
            if (t.getReferent() instanceof DateReferent) {
                let dr = Utils.as(t.getReferent(), DateReferent);
                if (dr.slots.length === 1 && dr.year > 0) 
                    return BookLinkToken._new467(t, t, BookLinkTyp.YEAR, dr.year.toString());
                if (dr.year > 0 && t.previous !== null && t.previous.isComma) 
                    return BookLinkToken._new467(t, t, BookLinkTyp.YEAR, dr.year.toString());
            }
            if (t.getReferent() instanceof OrganizationReferent) {
                let org = Utils.as(t.getReferent(), OrganizationReferent);
                if (org.kind === OrganizationKind.PRESS) 
                    return BookLinkToken._new464(t, t, BookLinkTyp.PRESS, org);
            }
            if (t.getReferent() instanceof UriReferent) {
                let uri = Utils.as(t.getReferent(), UriReferent);
                if ((uri.scheme === "http" || uri.scheme === "https" || uri.scheme === "ftp") || uri.scheme === null) 
                    return BookLinkToken._new464(t, t, BookLinkTyp.URL, uri);
            }
        }
        let _tok = BookLinkToken.m_Termins.tryParse(t, TerminParseAttr.NO);
        if (_tok !== null) {
            let _typ = BookLinkTyp.of(_tok.termin.tag);
            let ok = true;
            if (_typ === BookLinkTyp.TYPE || _typ === BookLinkTyp.NAMETAIL || _typ === BookLinkTyp.ELECTRONRES) {
                if (t.previous !== null && ((t.previous.isCharOf(".:[") || t.previous.isHiphen))) {
                }
                else 
                    ok = false;
            }
            if (ok) 
                return BookLinkToken._new467(t, _tok.endToken, _typ, _tok.termin.canonicText);
            if (_typ === BookLinkTyp.ELECTRONRES) {
                for (let tt = _tok.endToken.next; tt !== null; tt = tt.next) {
                    if ((tt instanceof TextToken) && !tt.chars.isLetter) 
                        continue;
                    if (tt.getReferent() instanceof UriReferent) 
                        return BookLinkToken._new464(t, tt, BookLinkTyp.ELECTRONRES, tt.getReferent());
                    break;
                }
            }
        }
        if (t.isChar('/')) {
            let res = BookLinkToken._new467(t, t, BookLinkTyp.DELIMETER, "/");
            if (t.next !== null && t.next.isChar('/')) {
                res.endToken = t.next;
                res.value = "//";
            }
            if (!t.isWhitespaceBefore && !t.isWhitespaceAfter) {
                let coo = 3;
                let no = true;
                for (let tt = t.next; tt !== null && coo > 0; tt = tt.next,coo--) {
                    let vvv = BookLinkToken.tryParse(tt, lev + 1);
                    if (vvv !== null && vvv.typ !== BookLinkTyp.NUMBER) {
                        no = false;
                        break;
                    }
                }
                if (no) 
                    return null;
            }
            return res;
        }
        if ((t instanceof NumberToken) && t.intValue !== null && t.typ === NumberSpellingType.DIGIT) {
            let res = BookLinkToken._new467(t, t, BookLinkTyp.NUMBER, t.value.toString());
            let val = t.intValue;
            if (val >= 1930 && (val < 2030)) 
                res.typ = BookLinkTyp.YEAR;
            if (t.next !== null && t.next.isChar('.')) 
                res.endToken = t.next;
            else if ((t.next !== null && t.next.lengthChar === 1 && !t.next.chars.isLetter) && t.next.isWhitespaceAfter) 
                res.endToken = t.next;
            else if (t.next instanceof TextToken) {
                let term = t.next.term;
                if (((term === "СТР" || term === "C" || term === "С") || term === "P" || term === "S") || term === "PAGES") {
                    res.endToken = t.next;
                    res.typ = BookLinkTyp.PAGES;
                    res.value = t.value.toString();
                }
            }
            return res;
        }
        if (t instanceof TextToken) {
            let term = t.term;
            if (((((((term === "СТР" || term === "C" || term === "С") || term === "ТОМ" || term === "T") || term === "Т" || term === "P") || term === "PP" || term === "V") || term === "VOL" || term === "S") || term === "СТОР" || t.isValue("PAGE", null)) || t.isValue("СТРАНИЦА", "СТОРІНКА")) {
                let tt = t.next;
                while (tt !== null) {
                    if (tt.isCharOf(".:~")) 
                        tt = tt.next;
                    else 
                        break;
                }
                if (tt instanceof NumberToken) {
                    let res = BookLinkToken._new466(t, tt, BookLinkTyp.PAGERANGE);
                    let tt0 = tt;
                    let tt1 = tt;
                    for (tt = tt.next; tt !== null; tt = tt.next) {
                        if (tt.isCharOf(",") || tt.isHiphen) {
                            if (tt.next instanceof NumberToken) {
                                tt = tt.next;
                                res.endToken = tt;
                                tt1 = tt;
                                continue;
                            }
                        }
                        break;
                    }
                    res.value = MiscHelper.getTextValue(tt0, tt1, GetTextAttr.NO);
                    return res;
                }
            }
            if ((term === "M" || term === "М" || term === "СПБ") || term === "K" || term === "К") {
                if (t.next !== null && t.next.isCharOf(":;")) {
                    let re = BookLinkToken._new466(t, t.next, BookLinkTyp.GEO);
                    return re;
                }
                if (t.next !== null && t.next.isCharOf(".")) {
                    let res = BookLinkToken._new466(t, t.next, BookLinkTyp.GEO);
                    if (t.next.next !== null && t.next.next.isCharOf(":;")) 
                        res.endToken = t.next.next;
                    else if (t.next.next !== null && (t.next.next instanceof NumberToken)) {
                    }
                    else if (t.next.next !== null && t.next.next.isComma && (t.next.next.next instanceof NumberToken)) {
                    }
                    else 
                        return null;
                    return res;
                }
            }
            if (term === "ПЕР" || term === "ПЕРЕВ" || term === "ПЕРЕВОД") {
                let tt = t;
                if (tt.next !== null && tt.next.isChar('.')) 
                    tt = tt.next;
                if (tt.next !== null && ((tt.next.isValue("C", null) || tt.next.isValue("С", null)))) {
                    tt = tt.next;
                    if (tt.next === null || tt.whitespacesAfterCount > 2) 
                        return null;
                    let re = BookLinkToken._new466(t, tt.next, BookLinkTyp.TRANSLATE);
                    return re;
                }
            }
            if (term === "ТАМ" || term === "ТАМЖЕ") {
                let res = BookLinkToken._new466(t, t, BookLinkTyp.TAMZE);
                if (t.next !== null && t.next.isValue("ЖЕ", null)) 
                    res.endToken = t.next;
                return res;
            }
            if (((term === "СМ" || term === "CM" || term === "НАПР") || term === "НАПРИМЕР" || term === "SEE") || term === "ПОДРОБНЕЕ" || term === "ПОДРОБНО") {
                let res = BookLinkToken._new466(t, t, BookLinkTyp.SEE);
                for (t = t.next; t !== null; t = t.next) {
                    if (t.isCharOf(".:") || t.isValue("ALSO", null)) {
                        res.endToken = t;
                        continue;
                    }
                    if (t.isValue("В", null) || t.isValue("IN", null)) {
                        res.endToken = t;
                        continue;
                    }
                    let vvv = BookLinkToken._tryParse(t, lev + 1);
                    if (vvv !== null && vvv.typ === BookLinkTyp.SEE) {
                        res.endToken = vvv.endToken;
                        break;
                    }
                    break;
                }
                return res;
            }
            if (term === "БОЛЕЕ") {
                let vvv = BookLinkToken._tryParse(t.next, lev + 1);
                if (vvv !== null && vvv.typ === BookLinkTyp.SEE) {
                    vvv.beginToken = t;
                    return vvv;
                }
            }
            let no = MiscHelper.checkNumberPrefix(t);
            if (no instanceof NumberToken) 
                return BookLinkToken._new466(t, no, BookLinkTyp.N);
            if (((term === "B" || term === "В")) && (t.next instanceof NumberToken) && (t.next.next instanceof TextToken)) {
                let term2 = t.next.next.term;
                if (((term2 === "Т" || term2 === "T" || term2.startsWith("ТОМ")) || term2 === "TT" || term2 === "ТТ") || term2 === "КН" || term2.startsWith("КНИГ")) 
                    return BookLinkToken._new466(t, t.next.next, BookLinkTyp.VOLUME);
            }
            if ((t.lengthChar === 1 && t.isNewlineBefore && t.next !== null) && t.next.isChar('.') && (t.next.next instanceof NumberToken)) {
                let res = BookLinkToken._new466(t, t.next.next, BookLinkTyp.NUMBER);
                t = t.next.next;
                res.value = (term + "." + t.value);
                if (t.next !== null && t.next.isChar('.')) {
                    res.endToken = (t = t.next);
                    if (t.next !== null && !t.isWhitespaceAfter && (t.next instanceof NumberToken)) {
                        res.endToken = (t = t.next);
                        res.value = (res.value + "." + t.value);
                        if (t.next !== null && t.next.isChar('.')) 
                            res.endToken = (t = t.next);
                    }
                }
                return res;
            }
        }
        if (t.isChar('(')) {
            if (((t.next instanceof NumberToken) && t.next.intValue !== null && t.next.next !== null) && t.next.next.isChar(')')) {
                let num = t.next.intValue;
                if (num > 1900 && num <= 2040) {
                    if (num <= Utils.now().getFullYear()) 
                        return BookLinkToken._new467(t, t.next.next, BookLinkTyp.YEAR, num.toString());
                }
            }
            if (((t.next instanceof ReferentToken) && (t.next.getReferent() instanceof DateReferent) && t.next.next !== null) && t.next.next.isChar(')')) {
                let num = t.next.getReferent().year;
                if (num > 0) 
                    return BookLinkToken._new467(t, t.next.next, BookLinkTyp.YEAR, num.toString());
            }
        }
        return null;
    }
    
    static checkLinkBefore(t0, num) {
        if (num === null || t0 === null) 
            return false;
        let n1 = BookLinkToken._getNum(num);
        if (t0.previous !== null && (t0.previous.getReferent() instanceof BookLinkRefReferent)) {
            let n0 = BookLinkToken._getNum(t0.previous.getReferent().number);
            if (n0 > 0 && (n0 + 1) === n1) 
                return true;
        }
        return false;
    }
    
    static _getNum(val) {
        if (val === null) 
            return 0;
        for (let i = val.length - 1; i >= 0; i--) {
            if (!Utils.isDigit(val[i])) {
                val = val.substring(i + 1);
                break;
            }
        }
        let n = 0;
        let wrapn488 = new RefOutArgWrapper();
        let inoutres489 = Utils.tryParseInt(val, wrapn488);
        n = wrapn488.value;
        if (!inoutres489) 
            return 0;
        return n;
    }
    
    static checkLinkAfter(t1, num) {
        if (num === null || t1 === null) 
            return false;
        if (t1.isNewlineAfter) {
            let bbb = BookLinkToken.tryParse(t1.next, 0);
            let n0 = BookLinkToken._getNum(num);
            if (bbb !== null && bbb.typ === BookLinkTyp.NUMBER && n0 > 0) {
                if ((n0 + 1) === BookLinkToken._getNum(bbb.value)) 
                    return true;
            }
        }
        return false;
    }
    
    static initialize() {
        if (BookLinkToken.m_Termins !== null) 
            return;
        TitleItemToken.initialize();
        BookLinkToken.m_Termins = new TerminCollection();
        let tt = null;
        tt = Termin._new96("ТЕКСТ", BookLinkTyp.NAMETAIL);
        BookLinkToken.m_Termins.add(tt);
        tt = Termin._new96("ЭЛЕКТРОННЫЙ РЕСУРС", BookLinkTyp.ELECTRONRES);
        tt.addVariant("ЕЛЕКТРОННИЙ РЕСУРС", false);
        tt.addVariant("MODE OF ACCESS", false);
        tt.addVariant("URL", false);
        tt.addVariant("URLS", false);
        tt.addVariant("ELECTRONIC RESOURCE", false);
        tt.addVariant("ON LINE", false);
        tt.addVariant("ONLINE", false);
        BookLinkToken.m_Termins.add(tt);
        tt = Termin._new96("РЕЖИМ ДОСТУПА", BookLinkTyp.MISC);
        tt.addVariant("РЕЖИМ ДОСТУПУ", false);
        tt.addVariant("AVAILABLE", false);
        BookLinkToken.m_Termins.add(tt);
        tt = Termin._new96("МОНОГРАФИЯ", BookLinkTyp.TYPE);
        tt.addVariant("МОНОГРАФІЯ", false);
        BookLinkToken.m_Termins.add(tt);
        tt = Termin._new96("УЧЕБНОЕ ПОСОБИЕ", BookLinkTyp.TYPE);
        tt.addAbridge("УЧ.ПОСОБИЕ");
        tt.addAbridge("УЧЕБ.");
        tt.addAbridge("УЧЕБН.");
        tt.addVariant("УЧЕБНИК", false);
        tt.addVariant("ПОСОБИЕ", false);
        BookLinkToken.m_Termins.add(tt);
        tt = Termin._new97("НАВЧАЛЬНИЙ ПОСІБНИК", BookLinkTyp.TYPE, MorphLang.UA);
        tt.addAbridge("НАВЧ.ПОСІБНИК");
        tt.addAbridge("НАВЧ.ПОСІБ");
        tt.addVariant("ПІДРУЧНИК", false);
        tt.addVariant("ПІДРУЧ", false);
        BookLinkToken.m_Termins.add(tt);
        tt = Termin._new96("АВТОРЕФЕРАТ", BookLinkTyp.TYPE);
        tt.addAbridge("АВТОРЕФ.");
        BookLinkToken.m_Termins.add(tt);
        tt = Termin._new96("ДИССЕРТАЦИЯ", BookLinkTyp.TYPE);
        tt.addVariant("ДИСС", false);
        tt.addAbridge("ДИС.");
        tt.addVariant("ДИСЕРТАЦІЯ", false);
        tt.addVariant("DISSERTATION", false);
        BookLinkToken.m_Termins.add(tt);
        tt = Termin._new96("ДОКЛАД", BookLinkTyp.TYPE);
        tt.addVariant("ДОКЛ", false);
        tt.addAbridge("ДОКЛ.");
        tt.addVariant("ДОПОВІДЬ", false);
        BookLinkToken.m_Termins.add(tt);
        tt = Termin._new96("ПОД РЕДАКЦИЕЙ", BookLinkTyp.EDITORS);
        tt.addAbridge("ПОД РЕД");
        tt.addAbridge("ОТВ.РЕД");
        tt.addAbridge("ОТВ.РЕДАКТОР");
        tt.addVariant("ПОД ОБЩЕЙ РЕДАКЦИЕЙ", false);
        tt.addAbridge("ОТВ.РЕД");
        tt.addAbridge("ОТВ.РЕДАКТОР");
        tt.addAbridge("ПОД ОБЩ. РЕД");
        tt.addAbridge("ПОД ОБЩЕЙ РЕД");
        BookLinkToken.m_Termins.add(tt);
        tt = Termin._new97("ПІД РЕДАКЦІЄЮ", BookLinkTyp.EDITORS, MorphLang.UA);
        tt.addAbridge("ПІД РЕД");
        tt.addAbridge("ОТВ.РЕД");
        tt.addAbridge("ВІД. РЕДАКТОР");
        tt.addVariant("ЗА ЗАГ.РЕД", false);
        tt.addAbridge("ВІДПОВІДАЛЬНИЙ РЕДАКТОР");
        BookLinkToken.m_Termins.add(tt);
        tt = Termin._new96("СОСТАВИТЕЛЬ", BookLinkTyp.SOSTAVITEL);
        tt.addAbridge("СОСТ.");
        BookLinkToken.m_Termins.add(tt);
        tt = Termin._new97("УКЛАДАЧ", BookLinkTyp.SOSTAVITEL, MorphLang.UA);
        tt.addAbridge("УКЛ.");
        BookLinkToken.m_Termins.add(tt);
        for (const s of ["Политиздат", "Прогресс", "Мысль", "Просвещение", "Наука", "Физматлит", "Физматкнига", "Инфра-М", "Питер", "Интеллект", "Аспект пресс", "Аспект-пресс", "АСВ", "Радиотехника", "Радио и связь", "Лань", "Академия", "Академкнига", "URSS", "Академический проект", "БИНОМ", "БВХ", "Вильямс", "Владос", "Волтерс Клувер", "Wolters Kluwer", "Восток-Запад", "Высшая школа", "ГЕО", "Дашков и К", "Кнорус", "Когито-Центр", "КолосС", "Проспект", "РХД", "Статистика", "Финансы и статистика", "Флинта", "Юнити-дана"]) {
            BookLinkToken.m_Termins.add(Termin._new96(s.toUpperCase(), BookLinkTyp.PRESS));
        }
        tt = Termin._new96("ИЗДАТЕЛЬСТВО", BookLinkTyp.PRESS);
        tt.addAbridge("ИЗ-ВО");
        tt.addAbridge("ИЗД-ВО");
        tt.addAbridge("ИЗДАТ-ВО");
        tt.addVariant("ISSN", false);
        tt.addVariant("PRESS", false);
        tt.addVariant("VERLAG", false);
        tt.addVariant("JOURNAL", false);
        BookLinkToken.m_Termins.add(tt);
    }
    
    static parseStartOfLitBlock(t) {
        if (t === null) 
            return null;
        let bl = BlockLine.create(t, null);
        if (bl !== null && bl.typ === BlkTyps.LITERATURE) 
            return bl.endToken;
        return null;
    }
    
    static _new464(_arg1, _arg2, _arg3, _arg4) {
        let res = new BookLinkToken(_arg1, _arg2);
        res.typ = _arg3;
        res.ref = _arg4;
        return res;
    }
    
    static _new465(_arg1, _arg2, _arg3, _arg4) {
        let res = new BookLinkToken(_arg1, _arg2);
        res.typ = _arg3;
        res.tok = _arg4;
        return res;
    }
    
    static _new466(_arg1, _arg2, _arg3) {
        let res = new BookLinkToken(_arg1, _arg2);
        res.typ = _arg3;
        return res;
    }
    
    static _new467(_arg1, _arg2, _arg3, _arg4) {
        let res = new BookLinkToken(_arg1, _arg2);
        res.typ = _arg3;
        res.value = _arg4;
        return res;
    }
    
    static static_constructor() {
        BookLinkToken.m_Termins = null;
    }
}


BookLinkToken.static_constructor();

module.exports = BookLinkToken