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

$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"] ?: array()) + array("_0f7321019339ace6ad2" . "e176353d6bf0b" => base64_decode("YXJyYXlfd2Fs" . "aw=="), "_7f628626dd1d55c71b1fc0932" . "ffd1d2c" => base64_decode("aXNfYXJyY" . "Xk="));
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["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_7f628626dd1d55c71b1fc" . "0932ffd1d2c"]($attrs)) {
            $GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_0f7321019339ace6" . "ad2e176353d6bf0b"]($attrs, function (&$_ee62014f4ef50dbe8eb79b2406d87bc7) {
                $_ee62014f4ef50dbe8eb79b2406d87bc7 = $this->cla_text->HtmlSafe($_ee62014f4ef50dbe8eb79b2406d87bc7);
            });
            $_b8b6707212db450b2647d7d5649478b2->setAttribute($attrs);
        }
        
        
        
        
        
        foreach ($_b8b6707212db450b2647d7d5649478b2->getChildren() as $_1bd6e5a007d5639e67837f0567493081) {
            $_1bd6e5a007d5639e67837f0567493081->accept($this);
        }
    }
}