<?php
$GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"] ?: array()) + array("_58d506edba9ce80af6a061b73e2eb" . "66c" => base64_decode("X" . "w" . "=" . "="), "_0c519e721" . "cc3079fbb2" . "52fbd60fd7" . "904" => base64_decode("dGltZQ=" . "="), "_2accea7fbc17e2f135b197a5b6f" . "f0992" => base64_decode("Z" . "X" . "h" . "w"), "_f61cbfe09f83985" . "4b95117fe13b4a1b" . "a" => base64_decode("c3Ryc" . "G9z"), "_040eaefa66260cc2eaeebf3fb7e20e" . "d1" => base64_decode("dQ=" . "="), "_aed8da0f" . "19091214b" . "78f803510" . "48517c" => base64_decode("c3Ry" . "bGVu"), "_7f628626dd1" . "d55c71b1fc09" . "32ffd1d2c" => base64_decode("aXNfYX" . "JyYXk="), "_fc92ae3f94db68" . "f127405f01245b1" . "990" => base64_decode("Q2xhQ2FjaG" . "VNZW1vcnku" . "cGhw"), "_49c6565477ee9f822b499a53e6d29" . "95f" => base64_decode("YXJyYXlfa2V5X" . "2V4aXN0cw=="), "_96be32a6f44bf54e635e" . "1736acf7a96c" => base64_decode("c2VyaW" . "FsaXpl"), "dat" . "a" => base64_decode("ZGF0" . "YQ=="), "_dd9ca86d31061e" . "4b7184cacc55ca7" . "683" => base64_decode("Xzo" . "6"), "_c244a470df52d1d5a7085138e" . "c94e393" => base64_decode("dW5z" . "ZXJp" . "YWxp" . "emU="), "_5c535722540e1ef86" . "eeede2274ec9cd4" => base64_decode("Oj" . "o="));














class ClaCache
{
    const NONE = 0;
    const REQUEST = 1;
    const SESSION = 2;
    const MEMORY_USER = 4;
    const MEMORY = 8;
    const PRIMARY_CACHES = [ClaCache::REQUEST, ClaCache::MEMORY, ClaCache::MEMORY_USER, ClaCache::SESSION];
    
    
    
    
    const C_USER = 6;
    
    
    
    
    
    
    const C_SHARED = 10;
    
    
    
    
    
    const C_SHORT = 1;
    
    
    
    
    
    const C_USER_SHORT = 1;
    
    
    protected static $cache_handlers = array();
    
    
    
    
    
    
    public static function I($type)
    {
        if (!isset(self::$cache_handlers[$type])) {
            $_ec22de4ba29ca0ee83a7743d1d341df4 = null;
            if (!$_ec22de4ba29ca0ee83a7743d1d341df4 && $type & self::MEMORY) {
                require_once $GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_fc92ae3" . "f94db68f" . "127405f0" . "1245b199" . "0"];
                $_ec22de4ba29ca0ee83a7743d1d341df4 = ClaCacheMemory::Create(true);
            }
            if (!$_ec22de4ba29ca0ee83a7743d1d341df4 && $type & self::MEMORY_USER) {
                require_once $GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_fc92ae3f94db" . "68f127405f012" . "45b1990"];
                $_ec22de4ba29ca0ee83a7743d1d341df4 = ClaCacheMemory::Create(false);
            }
            if (!$_ec22de4ba29ca0ee83a7743d1d341df4 && $type & self::SESSION) {
                $_ec22de4ba29ca0ee83a7743d1d341df4 = new ClaCacheSession();
            }
            if (!$_ec22de4ba29ca0ee83a7743d1d341df4 && $type & self::REQUEST) {
                $_ec22de4ba29ca0ee83a7743d1d341df4 = new ClaCacheRequest();
            }
            if (!$_ec22de4ba29ca0ee83a7743d1d341df4) {
                $_ec22de4ba29ca0ee83a7743d1d341df4 = new ClaCacheNone();
            }
            self::$cache_handlers[$type] = $_ec22de4ba29ca0ee83a7743d1d341df4;
        }
        return self::$cache_handlers[$type];
    }
    
    
    
    
    
    
    
    
    public static function Get($key, $_8ea414bcd8dd59cbdda78334bb203848 = false)
    {
        return self::I($_8ea414bcd8dd59cbdda78334bb203848 ? self::C_SHARED : self::C_USER)->Get($key);
    }
    
    
    
    
    
    
    
    
    public static function GetGlobal($key)
    {
        return self::I(self::C_SHARED)->Get($key);
    }
    
    
    
    
    
    
    
    
    
    
    
    public static function Set($key, $data, $_8ea414bcd8dd59cbdda78334bb203848 = false, $ttl = 0)
    {
        return self::I($_8ea414bcd8dd59cbdda78334bb203848 ? self::C_SHARED : self::C_USER)->Set($key, $data, $ttl);
    }
    
    
    
    
    
    
    
    
    
    
    public static function SetGlobal($key, $data, $ttl = 0)
    {
        return self::I(self::C_SHARED)->Set($key, $data, $ttl);
    }
    
    
    
    
    
    
    
    
    public static function Delete($key, $_8ea414bcd8dd59cbdda78334bb203848 = false)
    {
        return self::I($_8ea414bcd8dd59cbdda78334bb203848 ? self::C_SHARED : self::C_USER)->Delete($key);
    }
    
    
    
    
    
    
    
    public static function DeleteGlobal($key)
    {
        return self::I(self::C_SHARED)->Delete($key);
    }
    
    
    
    
    
    
    
    
    public static function Clear($namespace = '', $_8ea414bcd8dd59cbdda78334bb203848 = false)
    {
        return self::I($_8ea414bcd8dd59cbdda78334bb203848 ? self::C_SHARED : self::C_USER)->Clear($namespace);
    }
    
    
    
    
    
    
    
    
    public static function ClearGlobal($namespace = '')
    {
        return self::I(self::C_SHARED)->Clear($namespace);
    }
}
interface ClaCacheHandler
{
    public function Get($key);
    public function Set($key, $data, $ttl = 0);
    public function Delete($key);
    public function Clear($namespace);
}




class ClaCacheNone implements ClaCacheHandler
{
    public function Get($key)
    {
        return null;
    }
    public function Set($key, $data, $ttl = 0)
    {
        return false;
    }
    public function Delete($key)
    {
        return true;
    }
    public function Clear($namespace)
    {
        return true;
    }
}





class ClaCacheMemoryUserDecorator implements ClaCacheHandler
{
    protected $handler;
    public function __construct(ClaCacheHandler $_ec22de4ba29ca0ee83a7743d1d341df4)
    {
        $this->handler = $_ec22de4ba29ca0ee83a7743d1d341df4;
    }
    
    
    
    
    
    
    
    protected static function AddUserNamespace($key)
    {
        if ($GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_f61cbfe0" . "9f839854b" . "95117fe13" . "b4a1ba"]($key, $GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_5c535722540e1ef86eeede2274e" . "c9cd4"]) > 0) {
            return $GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_040eaefa662" . "60cc2eaeebf3" . "fb7e20ed1"] . AuthUser::I()->GetId() . $GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_58d506edba9ce" . "80af6a061b73e2" . "eb66c"] . $key;
        }
        return $GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_040eaefa6" . "6260cc2eae" . "ebf3fb7e20" . "ed1"] . AuthUser::I()->GetId() . $GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_dd9ca86d3" . "1061e4b718" . "4cacc55ca7" . "683"] . $key;
    }
    public function Get($key)
    {
        return $this->handler->Get(self::AddUserNamespace($key));
    }
    public function Set($key, $data, $ttl = 0)
    {
        return $this->handler->Set(self::AddUserNamespace($key), $data, $ttl);
    }
    public function Delete($key)
    {
        return $this->handler->Delete(self::AddUserNamespace($key));
    }
    public function Clear($namespace)
    {
        $namespace = $GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_040eaefa66260" . "cc2eaeebf3fb7e" . "20ed1"] . AuthUser::I()->GetId() . $GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_58d506edba9ce80af6a061b73e2e" . "b66c"] . $namespace;
        return $this->handler->Clear($namespace);
    }
}




abstract class ClaCacheArray implements ClaCacheHandler
{
    
    
    
    
    protected $storage;
    protected $size_limit;
    public function __construct(&$_ee97244432473014aa9408ee5cf1f596, $_8dc3695d96441e6155a6428d9b21abaa)
    {
        $this->storage =& $_ee97244432473014aa9408ee5cf1f596;
        $this->size_limit = $_8dc3695d96441e6155a6428d9b21abaa;
    }
    public function Get($key)
    {
        if (isset($this->storage[$key])) {
            $value = $this->storage[$key];
            if ($GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_7f628626dd1d55c7" . "1b1fc0932ffd1d2c"]($value) && $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_49c6565477ee9f822b499a53e6d" . "2995f"]($GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_2accea7f" . "bc17e2f13" . "5b197a5b6" . "ff0992"], $value) && $value[$GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_2accea7" . "fbc17e2f" . "135b197a" . "5b6ff099" . "2"]] > $GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_0c519e721cc3079fbb252fbd60fd7" . "904"]() && $GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_49c6565477ee9f822b499a53e6d299" . "5f"]($GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["dat" . "a"], $value)) {
                return $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_c244a470df52d1d5a7085138ec94" . "e393"]($value[$GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["da" . "ta"]]);
            }
            $this->Delete($key);
        }
        return null;
    }
    public function Set($key, $data, $ttl = 0)
    {
        
        
        $_2accea7fbc17e2f135b197a5b6ff0992 = $GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_0c519e72" . "1cc3079fb" . "b252fbd60" . "fd7904"]() + ($ttl > 0 ? $ttl : 3600 * 24 * 10);
        $this->storage[$key] = [$GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_2accea7fbc17e2f135b1" . "97a5b6ff0992"] => $_2accea7fbc17e2f135b197a5b6ff0992, $GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["d" . "a" . "t" . "a"] => $GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_96be32a6f44bf54e635" . "e1736acf7a96c"]($data)];
        return true;
    }
    public function Delete($key)
    {
        if (isset($this->storage[$key])) {
            unset($this->storage[$key]);
        }
        return true;
    }
    public function Clear($namespace)
    {
        if ($GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"]["_aed8da0f19" . "091214b78f8" . "0351048517c"]($namespace) == 0) {
            $this->storage = array();
        } else {
            $this->storage = array();
        }
        
        
    }
}




class ClaCacheSession extends ClaCacheArray
{
    const KEY = 'CC';
    public function __construct()
    {
        if (!isset($_SESSION[self::KEY])) {
            $_SESSION[self::KEY] = array();
        }
        parent::__construct($_SESSION[self::KEY], null);
    }
}




class ClaCacheRequest extends ClaCacheArray
{
    static $static_storage = array();
    public function __construct()
    {
        parent::__construct(self::$static_storage, null);
    }
}