<?php
namespace Claromentis\Admin\Sysadmin;

$GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"] ?: array()) + array("_be00ff7d" . "4d52251ef" . "742a5c1d7" . "e92be9" => base64_decode("c2l6ZQ=" . "="), "_38f12d8b" . "8c719a8ce" . "0fc2faefc" . "225f35" => base64_decode("YXJy" . "YXlf" . "bWFw"), "_5f42d55f4c50c2ac" . "2c3e7b1234a36729" => base64_decode("cHJvZ3J" . "lc3M="), "_ea8229a" . "121285ee" . "649a72fd" . "880bac39" . "b" => base64_decode("YXJyYXlfZm" . "lsdGVy"), "_d706c160e45bf7434fff82a59" . "76f0e19" => base64_decode("YXJyYXlfa2" . "V5cw=="), "_7978ebeeae02bb4b" . "9f93bfb8d8750bae" => base64_decode("bW" . "lu"), "_b66252d7bbf361012a6531a8e3a7" . "3230" => base64_decode("YXJyY" . "XlfZG" . "lmZg=" . "="), "_64666bcf1e5aaa07" . "774f3d7439ff264d" => base64_decode("Y29tcGx" . "ldGVk"));
class ExportProgressLocal implements WritableExportProgressInterface
{
    protected $archive_finalised = false;
    protected $description_written = false;
    protected $data_files = [];
    protected $data_files_unexported = [];
    protected $cdn_files = [];
    protected $cdn_files_unexported = [];
    protected $tables = [];
    protected $date_started;
    public function __construct()
    {
        $this->date_started = \Date::getNowTimestamp();
    }
    public function RegisterDataFiles(array $_00f2055c7cbd408ef56949f35c62b721) : void
    {
        $this->data_files = $_00f2055c7cbd408ef56949f35c62b721;
        $this->data_files_unexported = $GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_d706c160e45bf7434f" . "ff82a5976f0e19"]($_00f2055c7cbd408ef56949f35c62b721);
    }
    public function RegisterCdnFiles(array $_00f2055c7cbd408ef56949f35c62b721) : void
    {
        $this->cdn_files = $_00f2055c7cbd408ef56949f35c62b721;
        $this->cdn_files_unexported = $GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_d706c160e45bf7434ff" . "f82a5976f0e19"]($_00f2055c7cbd408ef56949f35c62b721);
    }
    public function RegisterTables(array $_08453d119db192b790995e6d610cb413) : void
    {
        $this->tables = $GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_38f12d8b" . "8c719a8ce" . "0fc2faefc" . "225f35"](function ($_be00ff7d4d52251ef742a5c1d7e92be9) {
            return [$GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_be00ff7d4d52251ef742a5c" . "1d7e92be9"] => $_be00ff7d4d52251ef742a5c1d7e92be9, $GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_5f42d55f" . "4c50c2ac2" . "c3e7b1234" . "a36729"] => 0, $GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_64666bcf1e5aaa07774f3d7439ff" . "264d"] => false];
        }, $_08453d119db192b790995e6d610cb413);
    }
    public function IsDescriptionWritten() : bool
    {
        return $this->description_written;
    }
    public function GetUnexportedDataFiles() : array
    {
        return $this->data_files_unexported;
    }
    public function GetUnexportedCdnFiles() : array
    {
        return $this->cdn_files_unexported;
    }
    public function GetIncompleteTables() : array
    {
        return $GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"]["_d706c160e45bf7434fff82a5976f" . "0e19"]($GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_ea8229a" . "121285ee" . "649a72fd" . "880bac39" . "b"]($this->tables, function ($_6aead4bff5639b251aebcf8a630e43a7) {
            return !$_6aead4bff5639b251aebcf8a630e43a7[$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_64666bcf1e" . "5aaa07774f3" . "d7439ff264d"]];
        }));
    }
    public function LockTable(string $_6555f4024e92c4a6b9140e99cd668e2b) : void
    {
        
        
    }
    public function ReleaseTable(string $_6555f4024e92c4a6b9140e99cd668e2b) : void
    {
        
        
    }
    public function DateStarted() : string
    {
        return $this->date_started;
    }
    public function GetId() : int
    {
        return 0;
    }
    public function IsArchiveFinalised() : bool
    {
        return $this->archive_finalised;
    }
    public function MarkArchiveFinalised() : void
    {
        $this->archive_finalised = true;
    }
    public function MarkCdnFileDone(string $_82a65eef3d03e3f61aac05df4e052c1f) : void
    {
        $this->cdn_files_unexported = $GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_b66252d7bbf361012a6531a8e3" . "a73230"]($this->cdn_files_unexported, [$_82a65eef3d03e3f61aac05df4e052c1f]);
    }
    public function MarkDataFileDone(string $_82a65eef3d03e3f61aac05df4e052c1f) : void
    {
        $this->data_files_unexported = $GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_b66252d7bbf361012a653" . "1a8e3a73230"]($this->data_files_unexported, [$_82a65eef3d03e3f61aac05df4e052c1f]);
    }
    public function MarkDescriptionDone() : void
    {
        $this->description_written = true;
    }
    public function MarkTableDone(string $_6555f4024e92c4a6b9140e99cd668e2b) : void
    {
        $this->tables[$_6555f4024e92c4a6b9140e99cd668e2b][$GLOBALS["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_64666bcf1e5a" . "aa07774f3d743" . "9ff264d"]] = true;
    }
    public function MarkTableProgress(string $_6555f4024e92c4a6b9140e99cd668e2b, int $_5f42d55f4c50c2ac2c3e7b1234a36729) : void
    {
        $this->tables[$_6555f4024e92c4a6b9140e99cd668e2b][$GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_5f42d55f4c50c" . "2ac2c3e7b1234a" . "36729"]] = $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_7978ebeeae02" . "bb4b9f93bfb8d" . "8750bae"]($_5f42d55f4c50c2ac2c3e7b1234a36729, $this->tables[$_6555f4024e92c4a6b9140e99cd668e2b][$GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_be00ff7d4d52251ef742a5c1d" . "7e92be9"]]);
    }
    public function ExportProgress() : float
    {
        if ($this->archive_finalised) {
            return 1.0;
        }
        $_4a0ac157016665697fe2fa9e0c549934 = $this->GetFileTotals($this->data_files, []);
        $_457e0cf3ae4011d99ba41bc286c80d0b = $this->GetFileTotals($this->data_files, $this->data_files_unexported);
        $_cd3d4cd9a5e22f0d082f1291c9dc3440 = $this->GetFileTotals($this->cdn_files, []);
        $_399995e3e25dc24a86f0a3b7dfa83b2c = $this->GetFileTotals($this->cdn_files, $this->cdn_files_unexported);
        list($_c33c9c76425f5b0c88a357e3989fbc34, $_260774a633a6e5c7509cf6cfb4061c68) = $this->GetTableTotals();
        $_c33c9c76425f5b0c88a357e3989fbc34 *= 10000.0;
        $_260774a633a6e5c7509cf6cfb4061c68 *= 10000.0;
        $_f4eafa5f493306ffdb51a688b21dd507 = $_4a0ac157016665697fe2fa9e0c549934 + $_cd3d4cd9a5e22f0d082f1291c9dc3440 + $_c33c9c76425f5b0c88a357e3989fbc34;
        $_5f42d55f4c50c2ac2c3e7b1234a36729 = $_457e0cf3ae4011d99ba41bc286c80d0b + $_399995e3e25dc24a86f0a3b7dfa83b2c + $_260774a633a6e5c7509cf6cfb4061c68;
        return $_5f42d55f4c50c2ac2c3e7b1234a36729 / $_f4eafa5f493306ffdb51a688b21dd507;
    }
    protected function GetFileTotals($_00f2055c7cbd408ef56949f35c62b721, $_9d88dc3bb9ea225ec40d0b617734fa6e)
    {
        $_1ea73e9b234acfdcad70dc10e74e3204 = 0;
        $_f7b8b22151bddc8810315af40b02febb = 0;
        foreach ($_00f2055c7cbd408ef56949f35c62b721 as $_6ae3783b9ad544a6c31a979683fed870 => $_be00ff7d4d52251ef742a5c1d7e92be9) {
            $_1ea73e9b234acfdcad70dc10e74e3204 += $_be00ff7d4d52251ef742a5c1d7e92be9;
        }
        foreach ($_9d88dc3bb9ea225ec40d0b617734fa6e as $_6ae3783b9ad544a6c31a979683fed870) {
            $_f7b8b22151bddc8810315af40b02febb += $_00f2055c7cbd408ef56949f35c62b721[$_6ae3783b9ad544a6c31a979683fed870];
        }
        return $_1ea73e9b234acfdcad70dc10e74e3204 - $_f7b8b22151bddc8810315af40b02febb;
    }
    protected function GetTableTotals()
    {
        $_f4eafa5f493306ffdb51a688b21dd507 = 0;
        $_5f42d55f4c50c2ac2c3e7b1234a36729 = 0;
        foreach ($this->tables as $_6aead4bff5639b251aebcf8a630e43a7) {
            $_f4eafa5f493306ffdb51a688b21dd507 += $_6aead4bff5639b251aebcf8a630e43a7[$GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_be00ff7d4d52251" . "ef742a5c1d7e92be" . "9"]];
            $_5f42d55f4c50c2ac2c3e7b1234a36729 += $_6aead4bff5639b251aebcf8a630e43a7[$GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_5f42d55" . "f4c50c2a" . "c2c3e7b1" . "234a3672" . "9"]];
        }
        return [$_f4eafa5f493306ffdb51a688b21dd507, $_5f42d55f4c50c2ac2c3e7b1234a36729];
    }
    public function GetTablesSize()
    {
        list($_c33c9c76425f5b0c88a357e3989fbc34) = $this->GetTableTotals();
        return $_c33c9c76425f5b0c88a357e3989fbc34;
    }
    public function GetTablesProgress()
    {
        list(, $_260774a633a6e5c7509cf6cfb4061c68) = $this->GetTableTotals();
        return $_260774a633a6e5c7509cf6cfb4061c68;
    }
    public function GetDataSize()
    {
        return $this->GetFileTotals($this->data_files, []);
    }
    public function GetDataProgress()
    {
        return $this->GetFileTotals($this->data_files, $this->data_files_unexported);
    }
    public function GetCdnSize()
    {
        return $this->GetFileTotals($this->cdn_files, []);
    }
    public function GetCdnProgress()
    {
        return $this->GetFileTotals($this->cdn_files, $this->cdn_files_unexported);
    }
}