/*
 * SDK Pullenti Unitext, 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# project. 
 * The latest version of the code is available on the site www.pullenti.ru
 */

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

const HtmlTagAttrs = require("./HtmlTagAttrs");

class HtmlTag {
    
    static findTag(_name) {
        if (_name === null) 
            return null;
        let res = null;
        let wrapres43 = new RefOutArgWrapper();
        let inoutres44 = HtmlTag.getAllTags().tryGetValue(_name, wrapres43);
        res = wrapres43.value;
        if (!inoutres44) 
            return null;
        return res;
    }
    
    get isInline() {
        return (((this.m_Attrs.value()) & (HtmlTagAttrs.INLINE.value()))) !== 0;
    }
    
    get isBlock() {
        return (((this.m_Attrs.value()) & (HtmlTagAttrs.BLOCK.value()))) !== 0;
    }
    
    get isTable() {
        return (((this.m_Attrs.value()) & (HtmlTagAttrs.TABLEITEM.value()))) !== 0;
    }
    
    get isEmpty() {
        return (((this.m_Attrs.value()) & (HtmlTagAttrs.EMPTY.value()))) !== 0;
    }
    
    get endtagRequired() {
        return (((this.m_Attrs.value()) & (HtmlTagAttrs.ENDTAGREQ.value()))) !== 0;
    }
    
    get ignoreWithContent() {
        return (((this.m_Attrs.value()) & (HtmlTagAttrs.IGNOREWITHCONTENT.value()))) !== 0;
    }
    
    constructor(_name, typ) {
        this.name = null;
        this.m_Attrs = HtmlTagAttrs.INLINE;
        this.name = _name;
        this.m_Attrs = typ;
        HtmlTag.m_AllTags.put(_name, this);
    }
    
    static getAllTags() {
        if (HtmlTag.m_AllTags === null) {
            HtmlTag.m_AllTags = new Hashtable();
            HtmlTag.createAllTags();
        }
        return HtmlTag.m_AllTags;
    }
    
    static createAllTags() {
        let ht = null;
        ht = new HtmlTag("A", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("ABBR", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("ACRONYM", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("ADDRESS", HtmlTagAttrs.of((HtmlTagAttrs.BLOCK.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("APPLET", HtmlTagAttrs.of((HtmlTagAttrs.CONTROL.value()) | (HtmlTagAttrs.IGNOREWITHCONTENT.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("AREA", HtmlTagAttrs.of((HtmlTagAttrs.BLOCK.value()) | (HtmlTagAttrs.EMPTY.value())));
        ht = new HtmlTag("B", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("BASE", HtmlTagAttrs.of((HtmlTagAttrs.CONTROL.value()) | (HtmlTagAttrs.IGNORETHIS.value()) | (HtmlTagAttrs.EMPTY.value())));
        ht = new HtmlTag("BASEFONT", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.EMPTY.value())));
        ht = new HtmlTag("BDO", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("BIG", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("BLOCKQUOTE", HtmlTagAttrs.of((HtmlTagAttrs.BLOCK.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("BODY", HtmlTagAttrs.BLOCK);
        ht = new HtmlTag("BR", HtmlTagAttrs.of((HtmlTagAttrs.BLOCK.value()) | (HtmlTagAttrs.EMPTY.value())));
        ht = new HtmlTag("BUTTON", HtmlTagAttrs.of((HtmlTagAttrs.CONTROL.value()) | (HtmlTagAttrs.IGNORETHIS.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("CAPTION", HtmlTagAttrs.of((HtmlTagAttrs.TABLEITEM.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("CENTER", HtmlTagAttrs.of((HtmlTagAttrs.BLOCK.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("CITE", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("CODE", HtmlTagAttrs.of((HtmlTagAttrs.CONTROL.value()) | (HtmlTagAttrs.IGNOREWITHCONTENT.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("COL", HtmlTagAttrs.of((HtmlTagAttrs.TABLEITEM.value()) | (HtmlTagAttrs.EMPTY.value())));
        ht = new HtmlTag("COLGROUP", HtmlTagAttrs.TABLEITEM);
        ht = new HtmlTag("DD", HtmlTagAttrs.BLOCK);
        ht = new HtmlTag("DEL", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.IGNOREWITHCONTENT.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("DFN", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("DIR", HtmlTagAttrs.of((HtmlTagAttrs.BLOCK.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("DIV", HtmlTagAttrs.of((HtmlTagAttrs.BLOCK.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("DL", HtmlTagAttrs.of((HtmlTagAttrs.BLOCK.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("DT", HtmlTagAttrs.INLINE);
        ht = new HtmlTag("EM", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("FIELDSET", HtmlTagAttrs.of((HtmlTagAttrs.CONTROL.value()) | (HtmlTagAttrs.IGNORETHIS.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("FONT", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("FORM", HtmlTagAttrs.of((HtmlTagAttrs.CONTROL.value()) | (HtmlTagAttrs.IGNORETHIS.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("FRAME", HtmlTagAttrs.of((HtmlTagAttrs.BLOCK.value()) | (HtmlTagAttrs.EMPTY.value())));
        ht = new HtmlTag("FRAMESET", HtmlTagAttrs.of((HtmlTagAttrs.BLOCK.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("H1", HtmlTagAttrs.of((HtmlTagAttrs.BLOCK.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("H2", HtmlTagAttrs.of((HtmlTagAttrs.BLOCK.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("H3", HtmlTagAttrs.of((HtmlTagAttrs.BLOCK.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("H4", HtmlTagAttrs.of((HtmlTagAttrs.BLOCK.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("H5", HtmlTagAttrs.of((HtmlTagAttrs.BLOCK.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("H6", HtmlTagAttrs.of((HtmlTagAttrs.BLOCK.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("HEAD", HtmlTagAttrs.BLOCK);
        ht = new HtmlTag("HR", HtmlTagAttrs.of((HtmlTagAttrs.BLOCK.value()) | (HtmlTagAttrs.EMPTY.value())));
        ht = new HtmlTag("HTML", HtmlTagAttrs.BLOCK);
        ht = new HtmlTag("I", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("IFRAME", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("IMG", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.EMPTY.value())));
        ht = new HtmlTag("INPUT", HtmlTagAttrs.of((HtmlTagAttrs.CONTROL.value()) | (HtmlTagAttrs.IGNORETHIS.value()) | (HtmlTagAttrs.EMPTY.value())));
        ht = new HtmlTag("INS", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.IGNORETHIS.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("ISINDEX", HtmlTagAttrs.of((HtmlTagAttrs.CONTROL.value()) | (HtmlTagAttrs.EMPTY.value())));
        ht = new HtmlTag("KBD", HtmlTagAttrs.of((HtmlTagAttrs.CONTROL.value()) | (HtmlTagAttrs.IGNORETHIS.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("LABEL", HtmlTagAttrs.of((HtmlTagAttrs.CONTROL.value()) | (HtmlTagAttrs.IGNORETHIS.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("LEGEND", HtmlTagAttrs.of((HtmlTagAttrs.CONTROL.value()) | (HtmlTagAttrs.IGNORETHIS.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("LI", HtmlTagAttrs.BLOCK);
        ht = new HtmlTag("LINK", HtmlTagAttrs.of((HtmlTagAttrs.CONTROL.value()) | (HtmlTagAttrs.EMPTY.value())));
        ht = new HtmlTag("MAP", HtmlTagAttrs.of((HtmlTagAttrs.BLOCK.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("MENU", HtmlTagAttrs.of((HtmlTagAttrs.BLOCK.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("META", HtmlTagAttrs.of((HtmlTagAttrs.CONTROL.value()) | (HtmlTagAttrs.EMPTY.value())));
        ht = new HtmlTag("NOFRAMES", HtmlTagAttrs.of((HtmlTagAttrs.BLOCK.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("NOSCRIPT", HtmlTagAttrs.of((HtmlTagAttrs.BLOCK.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("OBJECT", HtmlTagAttrs.of((HtmlTagAttrs.CONTROL.value()) | (HtmlTagAttrs.IGNOREWITHCONTENT.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("OL", HtmlTagAttrs.of((HtmlTagAttrs.BLOCK.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("OPTGROUP", HtmlTagAttrs.of((HtmlTagAttrs.CONTROL.value()) | (HtmlTagAttrs.IGNORETHIS.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("OPTION", HtmlTagAttrs.of((HtmlTagAttrs.CONTROL.value()) | (HtmlTagAttrs.IGNORETHIS.value())));
        ht = new HtmlTag("P", HtmlTagAttrs.BLOCK);
        ht = new HtmlTag("PARAM", HtmlTagAttrs.of((HtmlTagAttrs.CONTROL.value()) | (HtmlTagAttrs.IGNOREWITHCONTENT.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("PRE", HtmlTagAttrs.of((HtmlTagAttrs.BLOCK.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("Q", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("S", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("SAMP", HtmlTagAttrs.of((HtmlTagAttrs.CONTROL.value()) | (HtmlTagAttrs.IGNORETHIS.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("SCRIPT", HtmlTagAttrs.of((HtmlTagAttrs.CONTROL.value()) | (HtmlTagAttrs.IGNOREWITHCONTENT.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("SELECT", HtmlTagAttrs.of((HtmlTagAttrs.CONTROL.value()) | (HtmlTagAttrs.IGNORETHIS.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("SMALL", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("SPAN", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("STRIKE", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("STRONG", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("STYLE", HtmlTagAttrs.of((HtmlTagAttrs.CONTROL.value()) | (HtmlTagAttrs.IGNOREWITHCONTENT.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("SUB", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("SUP", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("TABLE", HtmlTagAttrs.of((HtmlTagAttrs.TABLEITEM.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("TBODY", HtmlTagAttrs.TABLEITEM);
        ht = new HtmlTag("TD", HtmlTagAttrs.TABLEITEM);
        ht = new HtmlTag("TFOOT", HtmlTagAttrs.TABLEITEM);
        ht = new HtmlTag("TH", HtmlTagAttrs.TABLEITEM);
        ht = new HtmlTag("THEAD", HtmlTagAttrs.TABLEITEM);
        ht = new HtmlTag("TR", HtmlTagAttrs.TABLEITEM);
        ht = new HtmlTag("TEXTAREA", HtmlTagAttrs.of((HtmlTagAttrs.CONTROL.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("TITLE", HtmlTagAttrs.of((HtmlTagAttrs.CONTROL.value()) | (HtmlTagAttrs.IGNORETHIS.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("TT", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("U", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("UL", HtmlTagAttrs.of((HtmlTagAttrs.BLOCK.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
        ht = new HtmlTag("VAR", HtmlTagAttrs.of((HtmlTagAttrs.INLINE.value()) | (HtmlTagAttrs.ENDTAGREQ.value())));
    }
    
    static static_constructor() {
        HtmlTag.m_AllTags = null;
    }
}


HtmlTag.static_constructor();

module.exports = HtmlTag