<?php
namespace Claromentis\Core\TextUtil\JBBCode;

$GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"] ?: array()) + array("_7f628626dd1d" . "55c71b1fc0932" . "ffd1d2c" => base64_decode("aXNf" . "YXJy" . "YXk="), "_0f7321019339ace6ad2e176353d6" . "bf0b" => base64_decode("YXJyYXlfd" . "2Fsaw=="));
use Claromentis\Core\TextUtil\ClaText;






class HTMLSafeVisitor implements \JBBCode\NodeVisitor
{
    protected $cla_text;
    function __construct(ClaText $cla_text)
    {
        $this->cla_text = $cla_text;
    }
    function visitDocumentElement(\JBBCode\DocumentElement $_d132f6bc4a336c5bb52dc5648a5693f0)
    {
        foreach ($_d132f6bc4a336c5bb52dc5648a5693f0->getChildren() as $_1bd6e5a007d5639e67837f0567493081) {
            $_1bd6e5a007d5639e67837f0567493081->accept($this);
        }
    }
    function visitTextNode(\JBBCode\TextNode $_61f33b6db779a1b966e121dc5605306e)
    {
        
        
        $_61f33b6db779a1b966e121dc5605306e->setValue($this->cla_text->HtmlSafe($_61f33b6db779a1b966e121dc5605306e->getValue()));
    }
    function visitElementNode(\JBBCode\ElementNode $_b8b6707212db450b2647d7d5649478b2)
    {
        $attrs = $_b8b6707212db450b2647d7d5649478b2->getAttribute();
        if ($GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_7f628626dd1d55c71b1fc0932" . "ffd1d2c"]($attrs)) {
            $GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_0f73210193" . "39ace6ad2e1" . "76353d6bf0b"]($attrs, function (&$_ee62014f4ef50dbe8eb79b2406d87bc7) {
                $_ee62014f4ef50dbe8eb79b2406d87bc7 = $this->cla_text->HtmlSafe($_ee62014f4ef50dbe8eb79b2406d87bc7);
            });
            $_b8b6707212db450b2647d7d5649478b2->setAttribute($attrs);
        }
        
        
        
        
        
        foreach ($_b8b6707212db450b2647d7d5649478b2->getChildren() as $_1bd6e5a007d5639e67837f0567493081) {
            $_1bd6e5a007d5639e67837f0567493081->accept($this);
        }
    }
}