Decoded Output

Download
<?namespace Acrit\Core\Export;use \Bitrix\Main\Localization\Loc,\Bitrix\Main\Entity,\Bitrix\Main\EventManager,\Acrit\Core\Helper,\Acrit\Core\Export\ProfileTable as Profile,\Acrit\Core\Export\ProfileIBlockTable as ProfileIBlock,\Acrit\Core\Export\ProfileFieldTable as ProfileField,\Acrit\Core\Export\ProfileValueTable as ProfileValue,\Acrit\Core\Export\ExportDataTable as ExportData,\Acrit\Core\Export\CategoryRedefinitionTable as CategoryRedefinition,\Acrit\Core\Export\HistoryTable as History,\Acrit\Core\DiscountRecalculation,\Acrit\Core\Log,\Acrit\Core\Cli,\Acrit\Core\Json,\Acrit\Core\Thread;Helper::loadMessages(Helper::root().$GLOBALS["qvu21nadx3ug28av"]);final class Exporter {const METHOD_CRON=1;const METHOD_SITE=2;const RESULT_SUCCESS=true;const RESULT_ERROR=false;const RESULT_CONTINUE=200;const PROCESS_MODE_AUTO=1;const PROCESS_MODE_FORCE=2;const PROCESS_MODE_PREVIEW=3;const MAX=50;protected $intStartTime;protected $intMaxTime;protected $bCatalog=false;protected $bSale=false;protected $bCurrency=false;protected $bHighload=false;protected $intMethod;protected static $arQueue=[];protected static $arIBlockHasSubsectionsCache=[];protected static $arCacheGetSections=[];protected static $arCacheIBlockPicture=[];protected static $arPlugins=[];protected static $arCachePluginFilename=[];protected static $arPluginObjects=[];protected static $arModuleObjects=[];protected $strModuleId;protected $strModuleCode;protected $arArguments;protected $intUserId;protected $intElementId;protected function __construct($strModuleId){$strModuleId=$GLOBALS["nd6zl0pvcf7gowry"]($strModuleId);$this->strModuleId=$strModuleId;$this->strModuleCode=preg_replace($GLOBALS["3ddpr0p165u2z2da"],$GLOBALS["9ojstki3ua7uqg9z"],$strModuleId);$this->arArguments=Cli::getCliArguments();if($this->arArguments[$GLOBALS["f4w2y0lnyrfmr1my"]]==$GLOBALS["rlbt2tl1rn23mrwz"]&&!defined($GLOBALS["o48546r3zx8y3x3i"])){define($GLOBALS["iy7cegg0qv565si7"], true);}}public static function getInstance($strModuleId){$arModuleObjects=&static::$arModuleObjects;if(!$GLOBALS["ot86452czzkmi7a4"]($strModuleId,$arModuleObjects)){$arModuleObjects[$strModuleId]=new static($strModuleId);}return $arModuleObjects[$strModuleId];}public function getModuleId(){return $this->strModuleId;}public function getModuleCode(){return $this->strModuleCode;}public function setUserId($intUserId){$this->intUserId=$intUserId;}public function findPlugins($bGroup=true){$arPlugins=&static::$arPlugins[$this->strModuleId];if(!$GLOBALS["591p8byuafwijsu3"]($arPlugins)||empty($arPlugins)){$arPlugins=array();$strPluginsDir=Helper::getPluginsDir($GLOBALS["6co8y3gki3yk9f1h"]);try {$resHandle=$GLOBALS["5aek891l165yxqoc"]($_SERVER[$GLOBALS["qjnwybk1yv5816im"]].$strPluginsDir);while ($strPluginDir=$GLOBALS["atp7cowoc0kdz33m"]($resHandle)){if($strPluginDir !=$GLOBALS["1y9vy0qpwo97m8v8"]&&$strPluginDir !=$GLOBALS["k4jelme5g4f5zndz"]){$strPluginFullDir=$_SERVER[$GLOBALS["idam30775mlg02v2"]].$strPluginsDir.$strPluginDir;if($GLOBALS["7p6zaociws9qi6vg"]($strPluginFullDir)&&$GLOBALS["u1vxcm6co9d6fzsz"]($strPluginFullDir.$GLOBALS["qexgxeq53m9rxf3d"])){require_once($strPluginFullDir.$GLOBALS["s2hrn4tbkwt0p2p3"]);$strFormatsDir=$strPluginsDir.$strPluginDir.$GLOBALS["exvuivwm3dwsrsjh"];if($GLOBALS["ww7dbx9d51d3zqfo"]($_SERVER[$GLOBALS["47y0n0d8xtdtqc2y"]].$strFormatsDir)){$resHandle2=$GLOBALS["sxmozatwj6x70js8"]($_SERVER[$GLOBALS["b59zdmdgmrzbw14s"]].$strFormatsDir);while ($strFormatDir=$GLOBALS["8484etumgvilj1eo"]($resHandle2)){if($strFormatDir !=$GLOBALS["suxbdboyagzh6c4g"]&&$strFormatDir !=$GLOBALS["yg9w0b46r2b158tm"]){$strFormatFullDir=$_SERVER[$GLOBALS["jsih2351aq9u8agz"]].$strFormatsDir.$strFormatDir;if($GLOBALS["9mzs0upbfkp5a5et"]($strFormatFullDir)&&$GLOBALS["hsxc4ma8lxhu8qfd"]($strFormatFullDir.$GLOBALS["ov337jsqo9rwslo1"])){require_once($strFormatFullDir.$GLOBALS["9zl00r836amyy09f"]);}}}$GLOBALS["ez086qnv3pxdojwl"]($resHandle2);}}}}$GLOBALS["n6dzvc3a4ygtipe6"]($resHandle);}catch(\SystemException $obException){Log::getInstance($this->strModuleId)->add(Log::getMessage($GLOBALS["tqrqdtrl4h27fm9y"], array($GLOBALS["rsnnjcg9nn5a33p3"]=>$obException->getMessage(),)));}foreach(EventManager::getInstance()->findEventHandlers($this->strModuleId,$GLOBALS["nl93h092mjkivmx2"]) as $arHandler){ExecuteModuleEventEx($arHandler, array());}static::$arCachePluginFilename=array();foreach(get_declared_classes() as $strClass){if($GLOBALS["gf8bmp37l96ay09m"]($strClass,$GLOBALS["p5u8qd827cfzgjcd"])&&$strClass !=$GLOBALS["7gwzcqqrsuj8pdtk"]){$strClass::setStaticModuleId($this->strModuleId);$strPluginCode=$strClass::getCode();$strClassFilename=Helper::getClassFilename($strClass);static::$arCachePluginFilename[$strPluginCode]=Helper::path($strClassFilename);}}$arModulePlugins=$this->getItems();foreach(get_declared_classes() as $strClass){if($GLOBALS["ng0apilen7wv735k"]($strClass,$GLOBALS["dfjfq5bw7k0siexv"])&&$strClass !=$GLOBALS["o2ad96dz48ipju38"]){$strPluginCode=$strClass::getCode();Loc::loadMessages(static::$arCachePluginFilename[$strPluginCode]);$arPlugins[$strPluginCode]=array($GLOBALS["4rn0fxp2v0lbd3rq"]=>$strClass,$GLOBALS["bp42lp9su93ct1ov"]=>$strPluginCode,$GLOBALS["pwkb12s6nvdwrea8"]=>$strClass::getName(),$GLOBALS["vel7sjb0dnn2vtif"]=>$strClass::getDescription(),$GLOBALS["gg8pq4y31kbkebqv"]=>$strClass::getExample(),$GLOBALS["dhv4fqdnn819ixp6"]=>$strClass::isSubclass(),);if($arCurModulePlugins=$arModulePlugins[$this->strModuleCode]){if(!$this->isPluginMatch($strPluginCode,$arCurModulePlugins)){unset($arPlugins[$strPluginCode]);}}}}foreach($arPlugins as $strPlugin=>$arPlugin){if($arPlugin[$GLOBALS["b41hzki0rphhy0w9"]]){$strParentClass=$GLOBALS["uciwcz5j0fx2c8ld"]($arPlugin[$GLOBALS["jokp1sww94cqjr0b"]]);if($GLOBALS["hywlca80ztp8ptkf"]($strParentClass)){foreach($arPlugins as $strPlugin1=>$arPlugin1){if($arPlugin1[$GLOBALS["gotahbw041xk780e"]]==$strParentClass){$arPlugins[$strPlugin][$GLOBALS["7398bd6i640gwioa"]]=$strPlugin1;}}}}}foreach(EventManager::getInstance()->findEventHandlers($this->strModuleId,$GLOBALS["y3p6juvoxxxzq4b9"]) as $arHandler){ExecuteModuleEventEx($arHandler, array(&$arPlugins));}$arPlugins=$GLOBALS["6yeo8gyuvqw9x87j"]($arPlugins) ? $arPlugins : array();foreach($arPlugins as $strPlugin=>$arPlugin){$bCorruptedPlugin=!$GLOBALS["8efa9btd32lcyrng"]($arPlugin)||!$GLOBALS["hgwbmz0a17ic0t4r"]($arPlugin[$GLOBALS["4tnlrfko2iyoef30"]])||!$GLOBALS["kzq1s8z5nl7t4hub"]($arPlugin[$GLOBALS["gh73l2skiqjcxisg"]])||$strPlugin !=$arPlugin[$GLOBALS["d1874od99swmpr4k"]]||$GLOBALS["t977zqsk5keshpww"]($strPlugin)||!$GLOBALS["d81g7qh243mgmvcf"]($arPlugin[$GLOBALS["mwn63s9ghs5il1n4"]])||!$GLOBALS["stdnetinlxy8o8xq"]($arPlugin[$GLOBALS["zlretyz0vcprh9xm"]])||!$GLOBALS["t9faabjbnp1w1bfz"]($arPlugin[$GLOBALS["54vuauq1zhak4ni3"]],$GLOBALS["1ks41jrzemuhaku2"]);if($bCorruptedPlugin){unset($arPlugins[$strPlugin]);Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["399cjoyjaobgwzbk"], array($GLOBALS["btzuogpsrerwy10b"]=>print_r($arPlugin, true),)));}}$strDocumentRoot=\Bitrix\Main\Application::getDocumentRoot();foreach($arPlugins as $strPlugin=>$arPlugin){$arPlugins[$strPlugin][$GLOBALS["e7f9t39lzzz32rvv"]]=Plugin::TYPE_NATIVE;$obReflectionClass=new \ReflectionClass($arPlugin[$GLOBALS["06jf4m6jx5u1fbs7"]]);$strFileClass=$obReflectionClass->getFileName();if($GLOBALS["tn9sp5ae1ss1y65a"]($strFileClass,$strDocumentRoot) !==0){$intPos=$GLOBALS["43v0xr58tol379a7"]($strFileClass,$GLOBALS["1izsg7rhjaonchrk"]);if($intPos !==false){$strFileClass=$strDocumentRoot.$GLOBALS["lfd3p3bb9e8yif3h"]($strFileClass,$intPos);}}unset($obReflectionClass);if($GLOBALS["gw3c5t9y0z4sidr0"]($strFileClass)){$strFileClass=$GLOBALS["gzgi0uc97bqqnpql"]($strFileClass,$GLOBALS["e2a4w10tzi7jclog"]($strDocumentRoot));$arPlugins[$strPlugin][$GLOBALS["eo2f9u6fmnleojxd"]]=Helper::path($GLOBALS["6ijn12z59r4i0y2v"]($strFileClass, PATHINFO_DIRNAME));if($GLOBALS["tqvgnt966xztxtge"]($strFileClass,$strPluginsDir)===0){$arPlugins[$strPlugin][$GLOBALS["dfck53hn24548f9q"]]=Plugin::TYPE_NATIVE;}}if($this->strModuleCode !=$GLOBALS["z7za1a2yvjitev3a"]){if($arPlugins[$strPlugin][$GLOBALS["kzi9jgz6gx2ti3w3"]] !=Plugin::TYPE_NATIVE){unset($arPlugins[$strPlugin]);}}}foreach($arPlugins as $strPlugin=>$arPlugin){$arPlugins[$strPlugin][$GLOBALS["7s6uj3zo57lv9ls1"]]=false;$arPlugins[$strPlugin][$GLOBALS["zqukzet4p3bnx6fc"]]=false;$strFilename=$arPlugin[$GLOBALS["1h7bhcxae3dpyrpq"]].$GLOBALS["7ap7n45h64sct3ei"];$arPlugins[$strPlugin][$GLOBALS["2rk4pce2cj6c6097"]]=$strFilename;if(!$GLOBALS["38z8d42w182w2wdf"]($_SERVER[$GLOBALS["cmsyy3uah6v3pe8x"]].$strFilename)){$arDirectory=$GLOBALS["q34go4cw5kxslt03"]($GLOBALS["slj9t67keyu40doj"],$arPlugin[$GLOBALS["21l8h0bmnyhcvuzv"]]);$GLOBALS["cy3g6ktz01lwej3l"]($arDirectory);if($GLOBALS["x5lz1ewvciqpj61w"]($arDirectory)===$GLOBALS["jwv72qf2honav234"]){$strFilename=$GLOBALS["io1kl535lxgwzja2"]($GLOBALS["nhlpqft3awk9zome"],$arDirectory).$GLOBALS["31ly3qhkxn1opap8"];}}if($GLOBALS["uzes30486xamu2jj"]($_SERVER[$GLOBALS["f33etclq0k4pfr2u"]].$strFilename)){$arPlugins[$strPlugin][$GLOBALS["1d69m2tqvh671k3i"]]=$strFilename;$arPlugins[$strPlugin][$GLOBALS["0o1f3d14cgm7zc1d"]]=$GLOBALS["lyshmyux6yw8b2kh"].base64_encode($GLOBALS["bfohdrhhlfkpcq8f"]($_SERVER[$GLOBALS["f3qi8zi7n0n1rxgv"]].$strFilename));}}$GLOBALS["9zrcq27uyslndapp"]($arPlugins, function($a,$b){$strNameA=$GLOBALS["ubmc8p960rhoziww"]($a[$GLOBALS["zg7p9gmbql2mvu83"]]);$strNameB=$GLOBALS["k7jkz4r9sozrbux5"]($b[$GLOBALS["0qh5jaziumbu32ld"]]);$bCustomA=$GLOBALS["6lb4v2qvwcxbscb6"]($strNameA,$GLOBALS["pfaq13p83leysa2v"]) !==false;$bCustomB=$GLOBALS["sje22385p6swwj1x"]($strNameB,$GLOBALS["xmlc5j214um2h7pv"]) !==false;if($bCustomA&&!$bCustomB){return 1;}elseif(!$bCustomA&&$bCustomB){return -1;}else{return $GLOBALS["w7lbge951qwlwefn"]($strNameA,$strNameB);}});}if($bGroup){$arPluginsTmp=$arPlugins;foreach($arPluginsTmp as $key1=>$arPlugin1){if($arPlugin1[$GLOBALS["lsnl65u9xyvhfqv3"]]){$strDir1=$arPlugin1[$GLOBALS["58or3k9t2ip0itsh"]].$GLOBALS["84ht3hfnrzd2qn5a"];foreach($arPluginsTmp as $key2=>$arPlugin2){$strDir2=$arPlugin2[$GLOBALS["a4ilfbbdv9z23nxx"]].$GLOBALS["uclpy0vxrlg3l36z"];if($GLOBALS["5gi4xdg4azud0s3m"]($strDir1,$strDir2)===0&&$GLOBALS["yots41oc2l3tvxr9"]($strDir1) > $GLOBALS["oqe1x69u8tbh7fnw"]($strDir2)){if(!$GLOBALS["3q6qdk1wbu16j32z"]($arPluginsTmp[$key2][$GLOBALS["zizqzymv793y0x8k"]])){$arPluginsTmp[$key2][$GLOBALS["lzx5uphaz4frrb25"]]=array();}$arPluginsTmp[$key2][$GLOBALS["mnqb7m7h2byl3b5z"]][$arPlugin1[$GLOBALS["00qe1203ofi8iojw"]]]=$arPlugin1;unset($arPluginsTmp[$key1]);}}}}foreach($arPluginsTmp as $key=>&$arPlugin){$GLOBALS["i0kun90wy9f5b910"]($arPlugin[$GLOBALS["wfe53ec9evbu4j0c"]], function($arItemA,$arItemB){$arItemA=$this->convertDirForSort($arItemA[$GLOBALS["qodhcw1tg0ctizg5"]]);$arItemB=$this->convertDirForSort($arItemB[$GLOBALS["ihne04k6anut2lvv"]]);return $GLOBALS["gii8gppahxzn4lu1"]($arItemA,$arItemB);});}return $arPluginsTmp;}else{foreach($arPlugins as $key1=>$arPlugin1){if(!$arPlugin1[$GLOBALS["wstmerfxs6xi5s0o"]]){$arPlugins[$key1][$GLOBALS["3k2aq18ml936bm29"]]=0;}}foreach($arPlugins as $key1=>$arPlugin1){if($arPlugin1[$GLOBALS["yngm0f2w0dkvu7kh"]]&&$GLOBALS["rf4fzve3p6vm8a42"]($arPlugins[$arPlugin1[$GLOBALS["1dhs0bcu63fghzau"]]])){$arPlugins[$arPlugin1[$GLOBALS["f3bl1z0fr6t56vbl"]]][$GLOBALS["ruz1zlmw1rth9b92"]]++;}}return $arPlugins;}}protected function convertDirForSort($strPath){$arPath=$GLOBALS["111s5at32ttxx1zq"]($strPath);if($GLOBALS["vff3kbtc63xfyusa"]($arPath[$GLOBALS["9e34j4qk3sl2lng7"]])){if(preg_match($GLOBALS["tdk0cypmaea7mwxn"],$arPath[$GLOBALS["h0o29vvp8eqkfc01"]],$arMatch)){$strPath=sprintf($GLOBALS["5zja3m385qnj6r76"],$arPath[$GLOBALS["o2m27ye02tss42t9"]],$arMatch[1],$arMatch[2]);}}return $strPath;}protected function getItems(){$arResult=[];$arResult[$GLOBALS["h6a4as6j250eb9wt"]]=[$GLOBALS["u6tyu4kf3eu4wr1n"],$GLOBALS["za06n54rymyfc25n"],$GLOBALS["7dqihq7ino4t3j71"],];$arResult[$GLOBALS["6me73vz75o01b2b3"]]=[$GLOBALS["rxb0uhv89veh1yj0"],$GLOBALS["yyevjmyf6f9ooy69"],$GLOBALS["16u6mqo3ij0b5xwj"],$GLOBALS["x6eh6m057ili94vs"],$GLOBALS["w1el5v86ur1cvrbh"],$GLOBALS["ccki855sw38kt0pe"],$GLOBALS["mvlurd6bmyjkqw21"],$GLOBALS["nu23fzaszlo4hj68"],$GLOBALS["u7spgx7ftxohrfh7"],$GLOBALS["leck6jb3ggfscvhq"],$GLOBALS["vceshb44ol2343x4"],$GLOBALS["mzefdwvnzkkn6hz7"],];$arResult[$GLOBALS["tekqpx4ma7inf9sj"]]=[$GLOBALS["2lp8zn2w25kpsn7y"],$GLOBALS["jw18f9go4uo4w400"],$GLOBALS["7t0b60tlacneb3xv"],$GLOBALS["w183u3ogydgo2s3o"],$GLOBALS["7ij9kp60jmfvnhgo"],$GLOBALS["vcf0lyk7u0lkk1sx"],$GLOBALS["rfk67pq5lu6gdc3y"],$GLOBALS["l22ukbyldkt94nq1"],$GLOBALS["4w63ewllbblevu9d"],$GLOBALS["vmjho194d3mrz0s1"],$GLOBALS["113ka480mkquq9xn"],$GLOBALS["xhsa5eysx636yolx"],$GLOBALS["0nfvqgzikfhvsfsx"],$GLOBALS["aejxsyv6f0o1k8bt"],$GLOBALS["t52ze2gcqtzmw2pt"],];$arResult[$GLOBALS["1fkwt6lb5u2ymfe9"]]=[$GLOBALS["z2dbfsg5ywdpc0tg"],$GLOBALS["glpalcgr3h3fy9lh"],$GLOBALS["a97ewhj5sbxze82i"],$GLOBALS["dpvtiu8psvkmzwiw"],$GLOBALS["12y0lpc5a648y8to"],];$arResult[$GLOBALS["7ogqyohrj83gg99z"]]=$GLOBALS["m6405llpr9mvejto"]($arResult[$GLOBALS["2alvien1s0uvrqmw"]],$arResult[$GLOBALS["ugt8icxrjbwqgxi1"]]);$arResult[$GLOBALS["dz4dvzpqdoz3jwut"]]=$GLOBALS["krgo6uxbbqpob3al"]($arResult[$GLOBALS["nady1os1swp4owjz"]],$arResult[$GLOBALS["mjt49qcohlbd1nqi"]]);return $arResult;}public function getPluginInfo($strFormat){$arResult=false;$arPlugins=$this->findPlugins(false);$arTmp=[];if($GLOBALS["vh0lqzwhejgmrlnl"]($strFormat)&&$GLOBALS["nqk06klyrjw7tcqt"]($arPlugins[$strFormat])){$arResult=$arPlugins[$strFormat];}if(!$GLOBALS["rin7ly54g0pr35hd"]($arResult[$GLOBALS["lcm6d6mkxr1wljqf"]])&&$arResult[$GLOBALS["9tc81bs9x5edxuww"]]){$arParentPlugin=$arPlugins[$arResult[$GLOBALS["xwwpdci3idgeta8h"]]];$arResult[$GLOBALS["dj2mqs8w5947wmef"]]=$arParentPlugin[$GLOBALS["tgbl3euk8m1a1czt"]];$arResult[$GLOBALS["qaxfx2khgif4qplv"]]=$arParentPlugin[$GLOBALS["rja0xalx90t18fqh"]];}unset($arPlugins);return $arResult;}public static function getLangPrefix($strFile, &$strLang, &$strHead, &$strName, &$strHint){if($GLOBALS["3s7ewr3acu0yix6r"](static::$arCachePluginFilename)){$arPath=$GLOBALS["em3o039rr1b7dpfo"]($strFile);$strPath=Helper::path(realpath($arPath[$GLOBALS["20w9sys1b9vmgh52"]].$GLOBALS["sol6hhilq6yfkoyj"])).$GLOBALS["2j8pzdeoeggw73nx"].$arPath[$GLOBALS["l4aefjdglz35t8gv"]];$strPlugin=array_search($strPath, static::$arCachePluginFilename);if($GLOBALS["typewg5wn42kgyf0"]($strPlugin)){$strLang=$GLOBALS["dhg9skjhlt69r9eh"].$strPlugin.$GLOBALS["7v4w7lhn176pjtmd"];$strHead=$strLang.$GLOBALS["4gnxii36buq3naqj"];$strName=$strLang.$GLOBALS["vys3i9zzfp2x3ko2"];$strHint=$strLang.$GLOBALS["h2klcz2w1gxbm91v"];}}}public function includeModules(){$bResult=false;if(\Bitrix\Main\Loader::includeModule($GLOBALS["pk8w4rhiiz1edxxv"])){$bResult=true;$this->bCatalog=\Bitrix\Main\Loader::includeModule($GLOBALS["32u2movw6g4uqcpu"]) ? true : false;$this->bSale=\Bitrix\Main\Loader::includeModule($GLOBALS["zzysec44968sf0i8"]) ? true : false;$this->bCurrency=\Bitrix\Main\Loader::includeModule($GLOBALS["5wj2qt4k334xro28"]) ? true : false;$this->bHighload=\Bitrix\Main\Loader::includeModule($GLOBALS["0npfrk655d80aela"]) ? true : false;}return $bResult;}public static function getExportModules($bAll=false){$arResult=[];$arModulesAll=[$GLOBALS["2ff1e7tpc01jxt8s"],$GLOBALS["8rmtow42tr99kdvq"],$GLOBALS["oclkn2e0vh6vsq0b"],$GLOBALS["0dq343my3jx1xi67"],$GLOBALS["vd289zrwlvq8y392"],];foreach($arModulesAll as $key=>$strModuleId){$arModulesAll[$key]=$GLOBALS["xez4t6gp5bum1r7i"].$strModuleId;}if($bAll){$arResult=$arModulesAll;}else{foreach($arModulesAll as $strModuleId){if(\Bitrix\Main\Loader::includeModule($strModuleId)){$arResult[]=$strModuleId;}}}return $arResult;}public function execute(){$this->includeModules();$this->setMethod(static::METHOD_CRON);$bUnlock=$this->arArguments[$GLOBALS["0t969ma4nbp67viq"]]==$GLOBALS["u9vhmsc7eq81arel"];$intProfileId=$this->arArguments[$GLOBALS["2xiapz0ybxvpunag"]];$arProfilesId=[];if($GLOBALS["zdkuk6x1d9uxddno"]($intProfileId)){$arProfilesId[]=$intProfileId;}elseif($GLOBALS["lufvu4lzqbkl1kap"]($intProfileId,$GLOBALS["a9rw3vxcswf6m2i6"]) !==false){$arProfilesIdTmp=$GLOBALS["3t5iw9s8vpz3ustd"]($GLOBALS["7y8iesqd0q8rl48o"],$intProfileId);foreach($arProfilesIdTmp as $intProfileIdTmp){$intProfileIdTmp=$GLOBALS["ybssuk4g8b1smbhs"]($GLOBALS["eglbnmbgxobrigpb"]($intProfileIdTmp));if($GLOBALS["aasign8c9iji9n6c"]($intProfileIdTmp)&&$intProfileIdTmp > 0){$arProfilesId[]=$intProfileIdTmp;}}}if($GLOBALS["cwec5itmlcz46x22"]($this->arArguments[$GLOBALS["sksznsx72iexhq4q"]])){$this->setUserId($this->arArguments[$GLOBALS["1o62yumjg89m7s86"]]);}foreach($arProfilesId as $intProfileId){if($bUnlock){Helper::call($this->strModuleId,$GLOBALS["tq34v0hp8qfvkuak"],$GLOBALS["zaz4q8qhp5y2mqdk"], [$intProfileId]);}$bLocked=Helper::call($this->strModuleId,$GLOBALS["01n0561xa963h6tf"],$GLOBALS["k6cifmf62g6kc9s9"], [$intProfileId]);if(!$bLocked){Helper::call($this->strModuleId,$GLOBALS["9jpifenjn7pb3ogo"],$GLOBALS["d8dyfcg830mf2261"], [$intProfileId]);$mResult=$this->executeProfile($intProfileId);Helper::call($this->strModuleId,$GLOBALS["4hbzqjs306j8soqb"],$GLOBALS["00a8vrw0lfgufru6"], [$intProfileId]);if($mResult==Exporter::RESULT_SUCCESS){$arProfile=Helper::call($this->strModuleId,$GLOBALS["6sh7pc7l1m7e2lb5"],$GLOBALS["c90680baz3yik6xa"], [$intProfileId]);if($GLOBALS["n14r3pw8spnl0wwg"]($arProfile)&&$arProfile[$GLOBALS["iowa0048jng2zhf4"]]==$GLOBALS["2060zoerty3vl22q"]&&Cli::isProfileOnCron($this->strModuleId,$intProfileId,$GLOBALS["zor6t7gsbqhwaq58"])){if(Cli::deleteProfileCron($this->strModuleId,$intProfileId,$GLOBALS["0kk6nlgy2i0meeso"])){Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["7k5edv6orh80ouln"]),$intProfileId);}else{Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["8856cgkr3wokrvbq"]),$intProfileId);}$obResult=Helper::call($this->strModuleId,$GLOBALS["v5ytksfsu91n86fl"],$GLOBALS["0x6hverqknwsa86x"], [$intProfileId, [$GLOBALS["it8gu10epcagtwxj"]=>$arPost[$GLOBALS["zoyd95s7f11oua6r"]]==$GLOBALS["u8j57dzwgp0nyqol"] ? $GLOBALS["cs32b1yw5stejvxe"] : $GLOBALS["4okrvfdgd0fmx7yk"],]]);}}}else{$mDateLocked=Helper::call($this->strModuleId,$GLOBALS["johkgqn02uqqr2qa"],$GLOBALS["mnaeb21r5v2z82p2"], [$intProfileId]);print $GLOBALS["gaoh2otv2qxxqy7u"].$intProfileId.$GLOBALS["i9q0ln95xqkd75v0"].$mDateLocked->toString().$GLOBALS["okie9tybsilxly0z"].PHP_EOL;Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["ppp99nk638la48f1"], array($GLOBALS["h439rvhm690a6o0q"]=>$mDateLocked->toString(),)),$intProfileId, true);}}}public static function getClassFilename($strClass){$obReflectionClass=new \ReflectionClass($strClass);$strFileClass=$obReflectionClass->getFileName();unset($obReflectionClass);return $strFileClass;}public static function addToQueue($intElementID,$intIBlockID=false){if($GLOBALS["7tlrlrq615lth0f9"]($intElementID)&&$intElementID>0&&!$GLOBALS["mp4da8ao0ef74gzc"]($intElementID, static::$arQueue)){$intIBlockID=$GLOBALS["t2mknjwwzi12rhmd"]($intIBlockID);static::$arQueue[$intElementID]=$intIBlockID;foreach(static::getExportModules() as $strModuleId){static::getInstance($strModuleId)->deleteElement([$GLOBALS["cvglwjbzpk5gauiq"]=>$intElementID,$GLOBALS["g16oeawignxrox5v"]=>$intIBlockID,]);}}}public static function getQueue(){return static::$arQueue;}public static function removeFromQueue($intElementID){unset(static::$arQueue[$intElementID]);}public static function processQueue(){$arQueue=&static::$arQueue;if($GLOBALS["2khpn965ycfbuhf9"]($arQueue)&&!empty($arQueue)){$arModules=static::getExportModules();$arModuleIBlocks=[];foreach($arModules as $strModuleId){$arModuleIBlocks[$strModuleId]=Helper::call($strModuleId,$GLOBALS["rt5oizhapj3mvhjg"],$GLOBALS["j6cpi54igf7lsv01"]);if(!$GLOBALS["6zi3f870q22f3v2n"]($arModuleIBlocks[$strModuleId])){$arModuleIBlocks[$strModuleId]=[];}}foreach($arQueue as $intElementID=>$intIBlockID){foreach($arModules as $strModuleId){if(!$GLOBALS["y052vpmsu5v6zjvk"]($intIBlockID,$arModuleIBlocks[$strModuleId])){continue;}static::processElement($intElementID,$intIBlockID, false, static::PROCESS_MODE_AUTO,$strModuleId);}unset($arQueue[$intElementID]);}}unset($arModules,$arModuleIBlocks,$strModuleId,$intIBlockID,$intElementID);}public static function processElement($intElementID,$intIBlockID=false,$intProfileID=false,$intProcessMode=self::PROCESS_MODE_AUTO,$strModuleId=null){$arResult=[];if($GLOBALS["fwj04ly5z8xefb6l"]($strModuleId)&&$GLOBALS["n952hrzxs280rcj7"]($strModuleId)){$arModules=[$strModuleId];}else{$arModules=static::getExportModules();}foreach($arModules as $strModuleId){$arResult[$strModuleId]=static::getInstance($strModuleId)->processElementByModule($intElementID,$intIBlockID,$intProfileID,$intProcessMode);}return $arResult;}protected function processElementByModule($intElementID,$intIBlockID=false,$intProfileID=false,$intProcessMode=self::PROCESS_MODE_AUTO){$mResult=false;$this->intElementId=$intElementID;$bPreview=$intProcessMode===static::PROCESS_MODE_PREVIEW;$bPreviewByProfileID=$bPreview&&$intProfileID > 0;if(!$intIBlockID){$intIBlockID=Helper::getElementIBlockID($intElementID);}if(!$intIBlockID){$this->intElementId=0;return false;}$arCatalog=Helper::getCatalogArray($intIBlockID);if($arCatalog[$GLOBALS["dafyi3c316tpy45i"]]){$strProp=$GLOBALS["dgjc395ages4zqqf"].$arCatalog[$GLOBALS["cy1w2yd153lh59z1"]];$resOffer=\CIBlockElement::GetList(array(),array($GLOBALS["zwrflyyrqhme6aue"]=>$intElementID,), false, false, array($strProp));if($arOffer=$resOffer->getNext(false,false)){$intParentElementID=$arOffer[$strProp.$GLOBALS["gxheq30p5m8xy53n"]];if($intParentElementID){$this->intElementId=0;return $this->processElementByModule($intParentElementID,$arCatalog[$GLOBALS["3hg59q4z0173xoro"]],$intProfileID,$intProcessMode);}}$this->intElementId=0;return false;}$arProfilesFilter=array($GLOBALS["q0obvn0xgzosccix"]=>$GLOBALS["lq7tbqyvrrhab75k"],);if($intProcessMode==static::PROCESS_MODE_AUTO){$arProfilesFilter[$GLOBALS["y8sgsfrjwxe3kyn4"]]=$GLOBALS["826s2n0bdxd2ovfw"];}if($intProfileID){$arProfilesFilter[$GLOBALS["8hsyi3oszr1fwuar"]]=$intProfileID;}$arProfiles=Helper::call($this->strModuleId,$GLOBALS["08id64gsdpa9u8o8"],$GLOBALS["uy0an866o4a1bzgl"], [$arProfilesFilter]);$fTimeFull=$GLOBALS["i0ra0m97ug1li9cy"](true);$arFeatures=null;if(!$bPreviewByProfileID){$arFeatures=Helper::call($this->strModuleId,$GLOBALS["iasfhqpi35hns036"],$GLOBALS["2mcapnis5fdwb1x2"], [$intProfileID,$intIBlockID]);}if(!$bPreviewByProfileID){$arElement=$this->getElementArray($intElementID,$intIBlockID,$bGetOffers=false,$bGetParent=false,$bGetSection=true,$bGetIBlock=true,$arFeatures);}$fTimeGetData=$GLOBALS["kp49do1v79aqa89u"](true) - $fTimeFull;if(!$bPreview&&!$arElement){$this->deleteElement($intElementID);$this->intElementId=0;return false;}if($GLOBALS["x9251wwix4kzi26f"]($arProfiles)){foreach($arProfiles as $intProfileKey=>$arProfile){if($GLOBALS["171nbbourbqssxgt"]($intIBlockID,$arProfile[$GLOBALS["5hlywxxuens1n77j"]])){$arProfiles[$intProfileKey][$GLOBALS["x7a7r2qi3dqhlbjt"]]=false;$fTime=$GLOBALS["ihl660q0wn80fv6z"](true);$bFilterSuccess=Helper::call($this->strModuleId,$GLOBALS["jwgw1sscm26t2gsl"],$GLOBALS["czh5ma0tqaknfrmr"], [$arProfile[$GLOBALS["b5ai9o93jri5x017"]],$intIBlockID,$intElementID]);if($bFilterSuccess||$bPreview){if($bPreviewByProfileID){$arFeatures=Helper::call($this->strModuleId,$GLOBALS["f6zmk0q6t6t196fw"],$GLOBALS["pxkeqxgvq2v47y0c"], [$arProfile[$GLOBALS["hvonabf3nio2k1iu"]],$intIBlockID]);$arElement=$this->getElementArray($intElementID,$intIBlockID,$bGetOffers=false,$bGetParent=false,$bGetSection=true,$bGetIBlock=true,$arFeatures);}$arProfiles[$intProfileKey][$GLOBALS["4w4ultv7z7thhuty"]]=$bFilterSuccess;if(!$GLOBALS["nvbgxnjh51i33543"]($arProfile[$GLOBALS["1ex9rglmhtwkncq0"]][$intIBlockID][$GLOBALS["i2rfjwxrk2xud2v5"]])){$arProfile[$GLOBALS["ny33qqhwfu3axl7s"]][$intIBlockID][$GLOBALS["lrawxout6sned86v"]]=array();}$this->getElementOffers($arElement,$arProfile,$arFeatures);$arPlugin=$this->getPluginInfo($arProfile[$GLOBALS["oafe3xcvs0z35swb"]]);if(!empty($arPlugin)&&$GLOBALS["hu99dc1j0iskvjcd"]($arPlugin[$GLOBALS["h2tquru8qerf6tm5"]])&&$GLOBALS["40xdtyzkmxmstph6"]($arPlugin[$GLOBALS["qwfremji95a44uob"]])){$obPlugin=&static::$arPluginObjects[$this->strModuleId][$arProfile[$GLOBALS["krrwnuk0hmjqu0c2"]]];if(!$GLOBALS["ydq1qvr1ycx2ycln"]($obPlugin)){$obPlugin=new $arPlugin[$GLOBALS["igakc6kngoutrz62"]]($this->strModuleId);$obPlugin->setProfileArray($arProfile);if($bPreview){$obPlugin->setPreviewMode(true);}}list($bProcessElement,$bProcessOffers)=$this->getProcessEntities($arProfile,$intIBlockID,$arElement,$obPlugin);if($bPreview){$arProfiles[$intProfileKey][$GLOBALS["xxssa7agl6khhwqr"]]=array();}$intOffersSuccess=0;$intOffersErrors=0;$arOffersPreprocess=array();if($bProcessOffers&&$obPlugin->isOffersPreprocess()){if($GLOBALS["c8j1hv2mks693kzm"]($arElement[$GLOBALS["pzl14a49p8ejcov2"]])&&!empty($arElement[$GLOBALS["2li6r1x7z0i2feig"]])){$intOffersIBlockID=$arElement[$GLOBALS["ernyrve4t3hthrv1"]];foreach($arElement[$GLOBALS["61tosk1g9t47xfq9"]] as $intOfferID){$fTime=$GLOBALS["e0ueurjpo0zpg06k"](true);$arOffer=$this->getElementArray($intOfferID,$intOffersIBlockID,$bGetOffers=false,$bGetParent=false,$bGetSection=true,$bGetIBlock=true,$arFeatures);$fTimeGetData +=$GLOBALS["n704ukp4jv1n1ftg"](true) - $fTime;$arOffer[$GLOBALS["9jd9o1m1gs41j0s5"]]=&$arElement;if(!$arElement[$GLOBALS["szeu0g57ip5hdlje"]]){$arOffer[$GLOBALS["g5whmcoq8z1ox4zp"]]=$arElement[$GLOBALS["35ywnbrfd5b7xv02"]];$arOffer[$GLOBALS["iyzgm5s5xtb7nor9"]]=$arElement[$GLOBALS["p314u5lcdlhhe4qk"]];$arOffer[$GLOBALS["6okjpuy6wqtz6kfq"]]=$arElement[$GLOBALS["4zx5wxzqye7q1efe"]];}$arOfferProcessResult=$this->processElementProfile($arOffer,$intOffersIBlockID,$arProfile,$obPlugin);$bIsError=!empty($arOfferProcessResult[$GLOBALS["h8nitznc20xdrpbc"]])||!empty($arOfferProcessResult[$GLOBALS["ajl8wwba1nfjhy61"]]);if($bPreview&&$bIsError){$arProfiles[$intProfileKey][$GLOBALS["qeoyk92433939vb6"]][]=$arOfferProcessResult;}elseif(!$bIsError){$mResult=true;$intOffersSuccess++;}else{$this->deleteElement($arOffer,$arProfile);$bLog=$arOfferProcessResult[$GLOBALS["sy10p37dass4iz11"]] !==[null];if($bLog){if(!empty($arOfferProcessResult[$GLOBALS["di4nh05blfuz05u0"]])){$intOffersErrors++;Log::getInstance($this->strModuleId)->add($GLOBALS["e1wkvvdr0fzffx8a"]($GLOBALS["i87nhq4o0a3epldd"],$arOfferProcessResult[$GLOBALS["7eg8ubv77ldm4x3q"]]),$arProfile[$GLOBALS["649hvw37adqojq23"]]);}elseif(!empty($arOfferProcessResult[$GLOBALS["sewaj3m2l0cpx9tx"]])){$intOffersErrors++;$arEmptyFields=array();foreach($arOfferProcessResult[$GLOBALS["hazomv03qn2j3tgy"]] as $obField){$arEmptyFields[]=$obField->getName();}Log::getInstance($this->strModuleId)->add(var_export($arOfferProcessResult, true).$GLOBALS["qtto9uyyf2oa6tvv"].Loc::getMessage($GLOBALS["e2jyyc1t5j4g4ico"], array($GLOBALS["jr8cfbecv801s63k"]=>$arOffer[$GLOBALS["9s8p8amcdri8rz0j"]],$GLOBALS["67ynic9vl11uqfjk"]=>$GLOBALS["k9i83706zgdjhwqv"]($GLOBALS["oe0gxwl8imocmsgn"],$arEmptyFields),)),$arProfile[$GLOBALS["u33z0htxnh24218r"]]);unset($arEmptyFields);}}}$arOffersPreprocess[]=$arOfferProcessResult;unset($intOfferID,$arOffer);}}if(!empty($arOffersPreprocess)){if($arProfile[$GLOBALS["uetcd9cbtzslgj8m"]][$intIBlockID][$GLOBALS["y02xzx0b5xa66sjy"]][$GLOBALS["skw2dwbkyel5ewum"]]==$GLOBALS["pmv7dagwslp2wct7"]){$strCallback=__CLASS__.$GLOBALS["ny2y8wpmdd5m4877"];}else{$strCallback=__CLASS__.$GLOBALS["b67ei8no5itk2u5u"];}$GLOBALS["pendqw0ailwcnufi"]($arOffersPreprocess,$strCallback);}}$bElementError=false;if($bProcessElement){$arProcessResult=$this->processElementProfile($arElement,$intIBlockID,$arProfile,$obPlugin,$arOffersPreprocess);$arProcessResult[$GLOBALS["qvo3iw1azps23hja"]]=$GLOBALS["nap66jq2gctfaa70"](true) - $fTime + $fTimeGetData;$bElementError=!empty($arProcessResult[$GLOBALS["gs5ucoeve0ikwuig"]])||!empty($arProcessResult[$GLOBALS["va4wbcio5t8djspr"]]);if($bPreview){$arProfiles[$intProfileKey][$GLOBALS["1jzajbj5rz7s0n2u"]][]=$arProcessResult;}elseif(!$bElementError){$mResult=$this->saveElement($arProcessResult,$arProfile, false);}else{$this->deleteElement($arElement,$arProfile);$bLog=$arProcessResult[$GLOBALS["diel9b5oker55d22"]] !==[null];if($bLog){if(!empty($arProcessResult[$GLOBALS["22ucko6m4jjnwcdf"]])){Log::getInstance($this->strModuleId)->add($GLOBALS["3wkky9pcncy9qin0"].$arElement[$GLOBALS["2lnejy3nv0tvu183"]].$GLOBALS["08k9o987hlgjy7i2"].$GLOBALS["2sy10dyoem0tgw2e"]($GLOBALS["mri1s6jvshsd14ry"],$arProcessResult[$GLOBALS["znssvmzsk2w9h1j3"]]),$arProfile[$GLOBALS["f4g2ae0v70jcs8zc"]]);}else{$arEmptyFields=array();foreach($arProcessResult[$GLOBALS["141uhfu9mtie1rpb"]] as $obField){$arEmptyFields[]=$obField->getName();}Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["h8cwdl5k37f0tb9j"], array($GLOBALS["m83jj5sodx5hazvr"]=>$arElement[$GLOBALS["kazvy3w077pezmpa"]],$GLOBALS["8hr7g0tkg6h8yee9"]=>$GLOBALS["fiqm1lv1ti3bl3yz"]($GLOBALS["offldj3uqnarunoo"],$arEmptyFields),)),$arProfile[$GLOBALS["lqr0wc26hd7wq4uq"]]);unset($arEmptyFields);}}$arElementDummy=array($GLOBALS["2dr9pq4hih9mixfl"]=>ExportData::TYPE_DUMMY,$GLOBALS["sca93swg6qmp9ce5"]=>ExportData::TYPE_DUMMY_ERROR,$GLOBALS["v2pbr028vbehwk4v"]=>null,$GLOBALS["bl7uc4acoqmw8xcz"]=>$intIBlockID,$GLOBALS["p1ggd7guusi8jlrv"]=>null,$GLOBALS["hmh6aq0g28s07qh9"]=>null,$GLOBALS["ne5hp2sc0getrsyt"]=>$intElementID,);$this->saveElement($arElementDummy,$arProfile, false);}}else{$arElementDummy=array($GLOBALS["q6k7qwltzaew1nms"]=>ExportData::TYPE_DUMMY,$GLOBALS["o0xvqmjk55guuk36"]=>null,$GLOBALS["fhyphiwpvfnlwg09"]=>$intIBlockID,$GLOBALS["r8bjhst8qy32khn6"]=>$arElement[$GLOBALS["299llp7d56hs5dgb"]],$GLOBALS["e3f2w32raqnbb52w"]=>Helper::getElementAdditionalSections($intElementID,$arElement[$GLOBALS["gmb5d0nz6ni7qf3a"]]),$GLOBALS["599egwimkqpyavbf"]=>$intElementID,);$this->saveElement($arElementDummy,$arProfile, false);}if($bProcessOffers&&!$obPlugin->isOffersPreprocess()){if($GLOBALS["im0ma0j0h959w500"]($arElement[$GLOBALS["hu4fhp1xdy2vh1tl"]])&&!empty($arElement[$GLOBALS["qqcm0ekw98n7a3rk"]])){$intOffersIBlockID=$arElement[$GLOBALS["trpn13e00l3x1cwa"]];foreach($arElement[$GLOBALS["l872hn628l142b3w"]] as $intOfferID){if($bElementError){$this->deleteElement($intOfferID,$arProfile);continue;}$fTime=$GLOBALS["8pg3xzdnjmc1ofch"](true);$arOffer=$this->getElementArray($intOfferID,$intOffersIBlockID,$bGetOffers=false,$bGetParent=false,$bGetSection=true,$bGetIBlock=true,$arFeatures);$fTimeGetData +=$GLOBALS["45338yz3u2unl90v"](true) - $fTime;$arOffer[$GLOBALS["r1r61wkjdv11x9ed"]]=&$arElement;if(!$arElement[$GLOBALS["it6dy90357o8qdfg"]]){$arOffer[$GLOBALS["nc6kxm0tdwj27xsn"]]=$arElement[$GLOBALS["zf99ozsj2qm9s7fl"]];$arOffer[$GLOBALS["woszedv21bdcxg8t"]]=$arElement[$GLOBALS["ge4ljhmmt3p8ewgi"]];$arOffer[$GLOBALS["neh4f23ecfwz3pmz"]]=$arElement[$GLOBALS["rr5b85el1r8usqau"]];}$arOfferProcessResult=$this->processElementProfile($arOffer,$intOffersIBlockID,$arProfile,$obPlugin);$arOfferProcessResult[$GLOBALS["af9d8p928j5hic9m"]]=$GLOBALS["o1sa6b0wb6amw3h1"](true) - $fTime;$bIsError=!empty($arOfferProcessResult[$GLOBALS["s378hvb14qig8ma8"]])||!empty($arOfferProcessResult[$GLOBALS["7fd1fy0yoq3wdsib"]]);if($bPreview){$arProfiles[$intProfileKey][$GLOBALS["92mtlmtn0dllc8c6"]][]=$arOfferProcessResult;}elseif(!$bIsError){$mResultOffer=$this->saveElement($arOfferProcessResult,$arProfile, true);$mResult=$mResult||$mResultOffer;$intOffersSuccess++;}else{$this->deleteElement($arOffer,$arProfile);$bLog=$arOfferProcessResult[$GLOBALS["fry2xe4k3e8znt73"]] !==[null];if($bLog){$intOffersErrors++;if(!empty($arOfferProcessResult[$GLOBALS["kx1u8jogzkxh3kgs"]])){Log::getInstance($this->strModuleId)->add($GLOBALS["ayajhvtua66jvs25"]($GLOBALS["tacugdvb6fo6csc8"],$arOfferProcessResult[$GLOBALS["y23vdssdm7y268ca"]]),$arProfile[$GLOBALS["r19kxkwufwd2r7aa"]]);}else{$arEmptyFields=array();foreach($arOfferProcessResult[$GLOBALS["6107sfybr3xu0xc2"]] as $obField){$arEmptyFields[]=$obField->getName();}Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["6zhw3elrnneq8f6j"], array($GLOBALS["9c4hzvfq3iiei4r4"]=>$arOffer[$GLOBALS["dy3j7gdg4or4nchr"]],$GLOBALS["mjm10k4wyjh2vf2m"]=>$GLOBALS["tvxoutuvek5r8f79"]($GLOBALS["7gpat02d1zf8294q"],$arEmptyFields),)),$arProfile[$GLOBALS["pmnmi0z7f4apfu3b"]]);unset($arEmptyFields);}}}}unset($intOfferID,$arOffer);}}$this->setElementOffersSuccess($arProfile[$GLOBALS["8mtnn8eg1oc6r9e3"]],$arElement[$GLOBALS["eqiibgc8u938w0yu"]],$intOffersSuccess);$this->setElementOffersErrors($arProfile[$GLOBALS["zyi1chtm2jwjkdhg"]],$arElement[$GLOBALS["ijlzj92lcwokk2p7"]],$intOffersErrors);if($mResult&&$intProcessMode==self::PROCESS_MODE_AUTO){Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["qggtfwpbygxitim6"], array($GLOBALS["vvjh6bjjbe6xt7hk"]=>$arElement[$GLOBALS["0z84tg6ixxom6y7w"]],)),$arProfile[$GLOBALS["lgpgowsdf2xcmscn"]], true);}unset($arProcessResult);}unset($arPlugin);}else{if(!$bPreview){$this->deleteElement($arElement,$arProfile);}}}}}if($bPreview){$mResult=array($GLOBALS["mva0w0hbsv323yo1"]=>$arProfiles,);$mResult[$GLOBALS["djjzysn0s4hynw4m"]]=$GLOBALS["ekl2sgw12l8bdy3q"](true) - $fTimeFull;$mResult[$GLOBALS["e3wtvb3ba3b6jevz"]]=$fTimeGetData;}$arResult=array($GLOBALS["b82ghyzw3jqzj9m7"]=>$mResult,);unset($arProfilesFilter,$arProfiles,$arElement,$fTimeFull);$this->intElementId=0;return $arResult;}public function getElementId(){return $GLOBALS["swtk2l4f39ujj2gz"]($this->intElementId);}public static function sortOffersAsc($a,$b){return strcasecmp($a[$GLOBALS["z0exf5ju1a4l2rk0"]],$b[$GLOBALS["uzp3jhuo43wczz8i"]]);}public static function sortOffersDesc($a,$b){return -1 * strcasecmp($a[$GLOBALS["4r0qyvxbbxsxdqg0"]],$b[$GLOBALS["gksse47mfzlzk31h"]]);}protected function processElementProfile($arElement,$intIBlockID,$arProfile,$obPlugin,$arOffersPreprocess=array()){if($this->isDemoLimitReached($arProfile[$GLOBALS["vghhc8wizqjvl99j"]])){return [$GLOBALS["9cxd2zkp124fs047"]=>[null]];}$arResultFields=array();$arPluginFields=$obPlugin->getFieldsCached($arProfile[$GLOBALS["lkgz4lmbjeplio61"]],$intIBlockID);$arEmptyRequiredFields=array();foreach($arPluginFields as $obField){$strFieldCode=$obField->getCode();if(isset($arProfile[$GLOBALS["81w60c0h596dktgc"]][$intIBlockID][$GLOBALS["ditj9yk8rn9ep6cv"]][$strFieldCode])){$arField=$arProfile[$GLOBALS["zxlcg3o62hfzjoin"]][$intIBlockID][$GLOBALS["sf78itef1q81fvro"]][$strFieldCode];}else{$arField=array($GLOBALS["3pi7749wz1a3weko"]=>0,$GLOBALS["d0g9m9k5mzq6utk6"]=>$arProfile[$GLOBALS["838jzgwt5woyq9rl"]],$GLOBALS["p8ud9j1bpqp27vy9"]=>$intIBlockID,$GLOBALS["a3bgnxax5388mggg"]=>$strFieldCode,$GLOBALS["0pnfntck9uarc6ju"]=>$obField->getDefaultValue(),);}$obField->setSiteID($arProfile[$GLOBALS["g3k5wh8j1xv256be"]]);$arFieldResult=$this->processField($obField,$arField,$arElement,$arProfile,$obPlugin);$arResultFields[$strFieldCode]=$arFieldResult;}foreach(EventManager::getInstance()->findEventHandlers($this->strModuleId,$GLOBALS["5yvuats4zdm78yxh"]) as $arHandler){ExecuteModuleEventEx($arHandler, array(&$arResultFields, &$arElement,$intIBlockID, &$arProfile,$obPlugin,&$arOffersPreprocess));}foreach($arPluginFields as $obField){$strFieldCode=$obField->getCode();$bSimpleEmptyMode=$obField->isSimpleEmptyMode()||$obField->isPrice();if($obField->isRequired()&&Helper::isEmpty($arResultFields[$strFieldCode],$bSimpleEmptyMode)){$arEmptyRequiredFields[]=$obField;}}$arProcessResult=array();if(empty($arEmptyRequiredFields)){if($obPlugin->isOffersPreprocess()){$arResultFields[$GLOBALS["pvaaaw1lpc3da2z4"]]=&$arOffersPreprocess;}$arProcessResult=$obPlugin->processElement($arProfile,$intIBlockID,$arElement,$arResultFields);if(!$GLOBALS["nso2ww258pbidh76"]($arProcessResult)){$arProcessResult=array($GLOBALS["3t09lfdu7pv6t0sn"]=>array(),);}}else{$arProcessResult[$GLOBALS["rhm5b4zwcutcw5pv"]]=$arEmptyRequiredFields;}$arProcessResult[$GLOBALS["dj3nrd6cbtilkubf"]]=$intIBlockID;$arProcessResult[$GLOBALS["9e3ewv3nbmdtbkxk"]]=$arElement[$GLOBALS["rnrj5fi90hdonrap"]];$arProcessResult[$GLOBALS["vyuuvrlqftazc1ai"]]=$this->getElementSort($arElement,$arProfile,$obPlugin);unset($arResultFields,$arPluginFields,$arFieldResult);return $arProcessResult;}public function getElementSort($arElement,$arProfile,$obPlugin=null){$strResult=$arElement[$GLOBALS["qh8fb96izev6q033"]];$intBlockID=$arElement[$GLOBALS["ld74zv7jx8ltk1y1"]];if($obPlugin===null){$arPlugin=$this->getPluginInfo($arProfile[$GLOBALS["z5u7xvlytnowrmpn"]]);if($GLOBALS["u6vovlq2pzhq6tui"]($arPlugin)&&$GLOBALS["nlgxe0q2su031aa5"]($arPlugin[$GLOBALS["d8f8dxglvipm1r7i"]])){$obPlugin=new $arPlugin[$GLOBALS["lqtdyyzcz1jy98c8"]];$obPlugin->setProfileArray($arProfile);}}$arSystemFields=array();Helper::call($this->strModuleId,$GLOBALS["2ajww7epz7nefjgw"],$GLOBALS["3my6u9luxx4q7xvz"], [&$arSystemFields,$arProfile[$GLOBALS["agtgpny4cimi3g05"]],$arElement[$GLOBALS["7invr6hfpu6nhtjv"]]]);foreach($arSystemFields as $obField){$strFieldCode=$obField->getCode();if($strFieldCode==Profile::FIELD_SORT_ELEMENT||$strFieldCode==Profile::FIELD_SORT_OFFER){$arField=$arProfile[$GLOBALS["lgkl8sqczq3h600z"]][$intBlockID][$GLOBALS["u62igyk5er56bwjs"]][$strFieldCode];$obField->setSiteID($arProfile[$GLOBALS["e35azq7q30inmtdk"]]);$arFieldResult=$this->processField($obField,$arField,$arElement,$arProfile,$obPlugin);$strResult=$arFieldResult;unset($arFieldResult);}}return $strResult;}protected function getProcessEntities($arProfile,$intIBlockID,$arElement,$obPlugin=null){$bProcessElement=false;$bProcessOffers=false;$strMode=$arProfile[$GLOBALS["v2tulrhsqo2v8iyp"]][$intIBlockID][$GLOBALS["59hgx8oouefhofr3"]][$GLOBALS["1ep75cqxw33omo6z"]];switch($strMode){case $GLOBALS["ofmwawj1y2u3o76w"]:if($GLOBALS["ujxckj48g2tu9guo"]($arElement[$GLOBALS["b9hk84zuqfka1grt"]])&&!empty($arElement[$GLOBALS["jic5mnyrb75zeuqe"]])||$arElement[$GLOBALS["dlr20wcme0r08ke7"]] > 0){$bProcessElement=false;$bProcessOffers=true;}else{$bProcessElement=true;$bProcessOffers=false;}break;case $GLOBALS["f3fi3v5kn3ase0wl"]:$bProcessElement=false;$bProcessOffers=true;break;case $GLOBALS["339gqnsm5bmx2yr9"]:$bProcessElement=true;$bProcessOffers=false;break;default:$bProcessElement=true;$bProcessOffers=true;break;}if($GLOBALS["hqhesshit4cqdwnw"]($obPlugin)){$obPlugin->getProcessEntities($bProcessElement,$bProcessOffers,$arProfile,$intIBlockID,$arElement);}foreach(EventManager::getInstance()->findEventHandlers($this->strModuleId,$GLOBALS["wvarpuktamj0ogoc"]) as $arHandler){ExecuteModuleEventEx($arHandler, array($obExporter,$arProfile,$intIBlockID,$arElement,&$bProcessElement, &$bProcessOffers));}return array($bProcessElement,$bProcessOffers,);}public static function displayPreviewResult($arResultItem){ob_start();if($arResultItem[$GLOBALS["mb89w81wr6l0xk29"]]){print $GLOBALS["9624stuvir1j6rxy"];$arErrorFields=array();foreach($arResultItem[$GLOBALS["izydntwyfjnw32x1"]] as $obField){$arErrorFields[]=$obField->getName();}$arIBlockFilter=array($GLOBALS["3saj62irdu3pg41t"]=>$arResultItem[$GLOBALS["0tep4epdvyhb7utb"]],$GLOBALS["vp0gk05bhdlw1poy"]=>$GLOBALS["wou1yjrb5xy0bxgn"],);$strIBlockType=$GLOBALS["20w51sk1dly062bo"];$resIBlock=\CIBlock::GetList(array(),$arIBlockFilter);if($arIBlock=$resIBlock->getNext(false,false)){$strIBlockType=$arIBlock[$GLOBALS["rkvaypnt0tql26ob"]];}$arCatalog=Helper::getCatalogArray($arResultItem[$GLOBALS["rxmxb3i4buaanblo"]]);$strType=$GLOBALS["9fp0nmo77714tluy"];if($GLOBALS["wxt6ktt7eu46o7y7"]($arCatalog)){$strType=$GLOBALS["pmtm2cuwcoc14e60"];if($arCatalog[$GLOBALS["epbgcwpz0va228vi"]]){$strType=$GLOBALS["rmqismfto3esudeb"];}}print Loc::getMessage($GLOBALS["qf06byha8m3l79xj"], array($GLOBALS["w4c5op3kmffqv2qz"]=>Loc::getMessage($GLOBALS["wdkenw5ofxn61i3r"].$strType),$GLOBALS["855wxro1uniw73m2"]=>$arResultItem[$GLOBALS["vb5ppeo00ma13rvj"]],$GLOBALS["putb77kmgegpxz0w"]=>$arResultItem[$GLOBALS["vmnyfhtzweb5xt59"]],$GLOBALS["nhneszfknv000c4t"]=>$strIBlockType,$GLOBALS["c1vyvul02pjie50l"]=>$GLOBALS["cs5zf1gkjccmuelz"]($GLOBALS["q44jhylcua17xdun"],$arErrorFields),$GLOBALS["nlapxhfruu58err1"]=>LANGUAGE_ID,));print $GLOBALS["5wmzm9k70xtz35rp"];}elseif($GLOBALS["v37k9xvc4md895gn"]($arResultItem[$GLOBALS["sa2kh78sjlyfkb8j"]])&&!empty($arResultItem[$GLOBALS["j5fktpfbvki9a4bt"]])){print Loc::getMessage($GLOBALS["cosp8aiy3uk9gmzk"], array($GLOBALS["kmg45pc46tlu9lch"]=>$GLOBALS["paign9em3yyz4b0u"]($GLOBALS["cnoq4no0zmu38xi1"],$arResultItem[$GLOBALS["cc8rqshwjxptxjpk"]]),));}elseif($GLOBALS["73yzjby10na2scdo"]($arResultItem[$GLOBALS["wskjq3enx8bmg9u1"]])){if($GLOBALS["6akghyt0dnwnv878"]($arResultItem[$GLOBALS["3z4em8jwvher4z3d"]])==$GLOBALS["f7ob88c7u926qvmc"]){print $GLOBALS["61s57fvygh2g11k4"].htmlspecialcharsbx($arResultItem[$GLOBALS["kb7fmrd6rzao4t6x"]]).$GLOBALS["d5zk0c69jww3p0bl"];}elseif($GLOBALS["lambtwo66ey184yp"]($arResultItem[$GLOBALS["qp696wu30wot1g45"]])==$GLOBALS["z0m7tkbzux0wfix2"]){$intJsonPrettyPrintFlags=JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES;if(defined($GLOBALS["7sku9jac69cu8o3b"])){$intJsonPrettyPrintFlags=$intJsonPrettyPrintFlags | JSON_INVALID_UTF8_IGNORE;}if(defined($GLOBALS["870pg4w95g7zv6pt"])){$intJsonPrettyPrintFlags=$intJsonPrettyPrintFlags | JSON_INVALID_UTF8_SUBSTITUTE;}$strJson=Json::encode(Json::decode($arResultItem[$GLOBALS["jrfmtcebqxxmeynn"]]),$intJsonPrettyPrintFlags);if(!Helper::isUtf()){$strJson=Helper::convertEncoding($strJson,$GLOBALS["w0d8f83kz7heovxo"],$GLOBALS["4ez99q43iivg2bq1"]);}print $GLOBALS["ytgp62790erw5x73"].$strJson.$GLOBALS["t3gvv6hp7g4qv68r"];print $GLOBALS["0tkdakr1ypnsbznl"].Helper::getMessage($GLOBALS["ravktui8f7n4bt8e"]).$GLOBALS["txg0uh3154ql3e3y"];print $GLOBALS["gad4mjt6enlrmic1"];print $GLOBALS["a9deu72jgao24sbx"].htmlspecialcharsbx($arResultItem[$GLOBALS["v81n12w9ng3r6y9k"]]).$GLOBALS["uth9shrgs6d8cbwh"];print $GLOBALS["zu6woorhl3jghbud"];}elseif($GLOBALS["eukftjbpb2y27xrg"]($arResultItem[$GLOBALS["tnoai2d0hjyd138i"]])==$GLOBALS["bixux8j0m6qqutqf"]){print $GLOBALS["hf7kq9v4x0ekkrij"].print_r(Json::decode($arResultItem[$GLOBALS["au08ns51ktu0ss05"]]), true).$GLOBALS["k98al8s15lqa8wsz"];print $GLOBALS["1qejj0d346wplnsm"].Helper::getMessage($GLOBALS["1mwmlzr5n24rz2dh"]).$GLOBALS["1aqez51uic1z4s9a"];print $GLOBALS["4ps3qf8oq7w4t70j"];print $GLOBALS["4annn63bu1il3sig"].htmlspecialcharsbx($arResultItem[$GLOBALS["th3nb15tbiwk16pn"]]).$GLOBALS["mswcbwjiq81yr2rn"];print $GLOBALS["wsmck3772tsrjzs4"];}elseif($GLOBALS["5iw8ss1yvcat56mn"]($arResultItem[$GLOBALS["xl73ptl04ga94nqf"]])==$GLOBALS["ok0ihayy2nod9ewz"]){print $GLOBALS["l3bzungawwbqwvj1"].print_r(array_map(function($item){return $GLOBALS["w670rhma5i4jhu7q"]($item) ? htmlspecialcharsbx($item) : $item;},$arResultItem[$GLOBALS["r7o1472z8lk20lal"]]), true).$GLOBALS["9n75n9pi0gofinek"];}elseif($GLOBALS["nf1zz7421ttfovrd"]($arResultItem[$GLOBALS["1neony9x99een4hu"]])==$GLOBALS["370iovs032f3t1ps"]){print $GLOBALS["l4ypxum0wgbiku6p"].print_r(htmlspecialcharsbx($arResultItem[$GLOBALS["h4wbvxsgwftei6px"]]), true).$GLOBALS["t4gb7dvirn4h30wq"];}else{print $GLOBALS["5eckswq5w75pti16"].print_r($arResultItem[$GLOBALS["gfwbdds9868wqa76"]], true).$GLOBALS["usbkpue18jep9ru5"];}}if($GLOBALS["ky8ubl7ms1t6rbop"]($arResultItem[$GLOBALS["nx004hd17jewb6fz"]])&&!empty($arResultItem[$GLOBALS["04aku1y2hyt9xylp"]])){print $GLOBALS["al2uumz0oledtjsn"].Helper::getMessage($GLOBALS["248ppzzbg3cu302o"]).$GLOBALS["12n009tqerrs0crz"];print $GLOBALS["kodeyqoh50bqqv60"];Helper::P($arResultItem[$GLOBALS["0vxgpngb1lzyuwcu"]]);print $GLOBALS["825h3tgsnsxjcr37"];}$strHtml=ob_get_clean();$strHtml=$GLOBALS["3qvygq8lhy5sohy3"]($strHtml);if($GLOBALS["5h33e8q8yjdi8v79"]($strHtml)){$strHtml .=$GLOBALS["jv6jogw3in947qlk"];}return $strHtml;}public function saveElement($arProcessResult,$arProfile,$bOffer=false){if($GLOBALS["gh76mhkl27a1jlu3"]($arProcessResult[$GLOBALS["r7i5o0cia5o9l7c6"]])){$arProcessResult[$GLOBALS["ugy9wrwceu3te29h"]]=$GLOBALS["k5jtmlo59xb8lahq"];}$arData=array($GLOBALS["82k3mn347y0mtokj"]=>$arProfile[$GLOBALS["u20gmx5owv3paros"]],$GLOBALS["eo342mq7o7uoyk2a"]=>$arProcessResult[$GLOBALS["w2ylpxl69t4g1ezl"]],$GLOBALS["odzx9wrpppn6tbvq"]=>$arProcessResult[$GLOBALS["ruimd59im1csy84i"]],$GLOBALS["kvohvcq8nbh66k8o"]=>$arProcessResult[$GLOBALS["0o82ebjf7188qa6q"]],$GLOBALS["boobekqhcb39r07r"]=>$GLOBALS["bvwqyraf9aa9ov40"]($arProcessResult[$GLOBALS["rxerwrx23g9afgj5"]]) ? $GLOBALS["nqctqjvvlytctotq"]($GLOBALS["pyvegnhekf7fw9ph"],$arProcessResult[$GLOBALS["94r7571awidju6f7"]]) : $GLOBALS["j6ie8le9mjt1twom"],$GLOBALS["vs45y3ytf36iwloh"]=>$GLOBALS["2lc2cogcrijy0etu"]($arProcessResult[$GLOBALS["2ys52oc6m3xyuxeo"]]) ? $GLOBALS["38f9y54tmwtiu9rh"]($GLOBALS["qobcloeli2737ukg"],$arProcessResult[$GLOBALS["petgbthjk80ydiwz"]]) : $arProcessResult[$GLOBALS["kcb2ovlp148d1v01"]],$GLOBALS["c6xmvxt4o2g1l3kz"]=>$GLOBALS["3bphc8a0xj02v38c"]($arProcessResult[$GLOBALS["6coyl11diw1tu63m"]]) ? $arProcessResult[$GLOBALS["6r86zw81kbepfm7x"]] : $arProcessResult[$GLOBALS["le1gg2at0xo3zaly"]],$GLOBALS["dehg6swhsyophq6q"]=>$arProcessResult[$GLOBALS["h2jhdrm8yrigof24"]],$GLOBALS["21g1mgz97ghnwftu"]=>$arProcessResult[$GLOBALS["ip0pxopaabozyci4"]],$GLOBALS["5sr4z92prnuujdf9"]=>$GLOBALS["jd30rv7112372h91"]($arProcessResult[$GLOBALS["y4b85pqu38xo0c3e"]]) ? $GLOBALS["9qafqem5n0li5a43"]($arProcessResult[$GLOBALS["eaulwzef0ilq3r18"]]) : $GLOBALS["oqeg1h4ypmb6af2a"]($arProcessResult[$GLOBALS["tq9eib372c4uc6xa"]]),$GLOBALS["ajbyz33crura3y8g"]=>new \Bitrix\Main\Type\DateTime(),$GLOBALS["a5murypfrt7jsmkl"]=>$arProcessResult[$GLOBALS["iyl1aog4nm0a4ssa"]],$GLOBALS["uspse4cwntsh9xp0"]=>null,$GLOBALS["jdtve217cb7k0a1z"]=>$bOffer ? $GLOBALS["kwsrvuatt76tww72"] : null,);if($GLOBALS["goon585pvuz1ayz2"]($arData[$GLOBALS["0nw1u8ei7r0itwaz"]])==$GLOBALS["opnper6yoc3ht0ry"]){$arData[$GLOBALS["gmp2lcyghbbg403t"]]=randString(16);}if($GLOBALS["40x9hk0ou0qcaxoz"]($GLOBALS["faw1mgo14rjt7izs"],$arProcessResult)){if($arProcessResult[$GLOBALS["0yutesbpa46ucjdg"]]==ExportData::TYPE_DUMMY_ERROR){$arData[$GLOBALS["v5r4s0hxdqai3827"]]=$GLOBALS["hqru67q7ngientb1"];}}$arQuery=[$GLOBALS["xd5nauj3kfh4moi5"]=>array($GLOBALS["2d6rmp6fhsateu0l"]=>$arData[$GLOBALS["blsppl497246ek7y"]],$GLOBALS["aaedk7udog0isc4d"]=>$arData[$GLOBALS["q219n0sp68xv43w3"]],),$GLOBALS["zwq001lphfr88mzz"]=>array($GLOBALS["jiphqparwyb182tj"],),$GLOBALS["b1xxxub4zxxmj7wi"]=>1,];$resExistsData=Helper::call($this->strModuleId,$GLOBALS["c2g8inoox3rkmvp5"],$GLOBALS["kfs82vb82k26w7ew"], [$arQuery]);if($arExistsData=$resExistsData->fetch()){$obResult=Helper::call($this->strModuleId,$GLOBALS["i472itf4xk123zsk"],$GLOBALS["t3gbeba9d6fh397c"], [$arExistsData[$GLOBALS["y6e70eg507b4f68b"]],$arData]);}else{$obResult=Helper::call($this->strModuleId,$GLOBALS["pbj0tbxmhxtqh1di"],$GLOBALS["7ql3tnu54qhp0dhl"], [$arData]);}if(!$obResult->isSuccess()){Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["uvupwo3c4bpitqaw"], array($GLOBALS["8l1skifi8p9u2zww"]=>$arProcessResult[$GLOBALS["rlanb8ymk9evwfj6"]],$GLOBALS["46c8wc82af5x6mdt"]=>$GLOBALS["4iva2cf7zkmm1nkl"]($GLOBALS["xs31vew8ff79n4lu"],$obResult->getErrorMessages()),)),$arProfile[$GLOBALS["2naqp0aayqbbkjbz"]]);return false;}return true;}protected function setElementOffersErrors($intProfileID,$intElementID,$intOffersErrors){$arFields=array($GLOBALS["a4bpd913cmv0sgo2"]=>$intOffersErrors,);$arQuery=[$GLOBALS["irrmxa5fygldzkdt"]=>array($GLOBALS["6t9vyq53r26xow6u"]=>$intProfileID,$GLOBALS["1ivrnnvg49ug5ssb"]=>$intElementID,),$GLOBALS["mdkvuvlbs728d3mm"]=>array($GLOBALS["jjkiv7g15axlyn1t"],),$GLOBALS["hp3q1q40r9m6wybp"]=>1,];$resExistsData=Helper::call($this->strModuleId,$GLOBALS["ivcejpwhvyr1ekja"],$GLOBALS["31pnwqx6ott3sv93"], [$arQuery]);if($arExistsData=$resExistsData->fetch()){Helper::call($this->strModuleId,$GLOBALS["tfj9tadjcghsu4vx"],$GLOBALS["uoke27zcvvgn96hg"], [$arExistsData[$GLOBALS["ow12qie2rj0jw4ss"]],$arFields]);}}protected function setElementOffersSuccess($intProfileID,$intElementID,$intOffersSuccess){$arFields=array($GLOBALS["64kjo8v87otdp0q9"]=>$intOffersSuccess,);$arQuery=[$GLOBALS["kluui6vc2dowiaek"]=>array($GLOBALS["zf2d5g3i0ugrx2i8"]=>$intProfileID,$GLOBALS["y1b28uiw0qoa11wa"]=>$intElementID,),$GLOBALS["03pbjaf76ur960qj"]=>array($GLOBALS["qh1jihhb5lzcd8gu"],),$GLOBALS["mio54us09jfq3v69"]=>1,];$resExistsData=Helper::call($this->strModuleId,$GLOBALS["imvq1wgix1c7fncn"],$GLOBALS["u4bqxtmzpr4x50qc"], [$arQuery]);if($arExistsData=$resExistsData->fetch()){Helper::call($this->strModuleId,$GLOBALS["jqq4i944walfnpvz"],$GLOBALS["8yr81fzamm03z3jp"], [$arExistsData[$GLOBALS["426em4oid1p4hftf"]],$arFields]);}}public function deleteElement($arElement,$arProfile=false){$bDeleteWhileExports=Helper::getOption($this->strModuleId,$GLOBALS["37hsyl1kqqrhed1l"])==$GLOBALS["yv31jxamngitzmea"];if($GLOBALS["rqp7ba3mka1bq0mf"]($arElement)){$arElement=array($GLOBALS["5jw85nzfwe6q0cbu"]=>$arElement,);}$arFilter=array($GLOBALS["59zvt8h71kuckvw2"]=>$arElement[$GLOBALS["bm780a2egzfrdikl"]],);if($GLOBALS["1yqvykmsatalv41v"]($arProfile)&&$arProfile[$GLOBALS["e91r40xu8qkjcb47"]]){$arFilter[$GLOBALS["meludofssr8pqga9"]]=$arProfile[$GLOBALS["uwami6odpb3beq0b"]];}if(!$bDeleteWhileExports){$arFilter[$GLOBALS["97saffh5c9p5ixa1"]]=$GLOBALS["n40uj941768hil2d"];}$arQuery=[$GLOBALS["ygplutju0u4uuozx"]=>$arFilter,$GLOBALS["ubmgvdg5embldk65"]=>[$GLOBALS["ojycutf6gz6uqg1z"],],];if(!$bDeleteWhileExports){$arQuery[$GLOBALS["dcyo9va4a4rzsi8a"]]=[$GLOBALS["baa226g5uv54i579"]=>[$GLOBALS["i1ii32fp4sdhljjd"]=>Helper::call($this->strModuleId,$GLOBALS["gvh3ggdpd87lhteo"],$GLOBALS["e9yj44tzswcgx2xr"]),$GLOBALS["el2aqch2tn4huucw"]=>[$GLOBALS["fguqsaojsto2yxep"]=>$GLOBALS["bngf9se1mo9p6i63"]],$GLOBALS["za31826ts14rnf90"]=>$GLOBALS["cxg12rcouqu81k8a"]],];}$resExistsData=Helper::call($this->strModuleId,$GLOBALS["08ofe1kkq0ks4uma"],$GLOBALS["zw5ji53wjel4vxtk"], [$arQuery]);$bFound=false;if($resExistsData){while($arExistsData=$resExistsData->fetch()){$bFound=true;$obResult=Helper::call($this->strModuleId,$GLOBALS["lav6ukscfdvqfcbj"],$GLOBALS["fzevle2dqm9kauam"], [$arExistsData[$GLOBALS["gc06bfanp2th6556"]]]);}}if($bFound){Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["ji6zviz70hir9h4a"], array($GLOBALS["s44uqg8axq2mivch"]=>$arElement[$GLOBALS["20b0vtb2a8uzsrb3"]],)),$arProfile[$GLOBALS["fr39etulj7p309wi"]] > 0 ? $arProfile[$GLOBALS["d3bm7rxije55jzdr"]] : false, true);}return $bFound;}public function processField($obField,$arField,$arElement,$arProfile,$obPlugin=null){$strFieldCode=$obField->getCode();$intProfileID=$arProfile[$GLOBALS["d8kryubf060ald1x"]];if($GLOBALS["z8s47xz0qnlznct2"]($obPlugin)){$mResultBefore=$obPlugin->onBeforeProcessField($obField,$arField,$arElement,$arProfile);if(!$GLOBALS["t0mvmb6mkr9qw7iw"]($mResultBefore)){return $mResultBefore;}}foreach(EventManager::getInstance()->findEventHandlers($this->strModuleId,$GLOBALS["3vxcy38g84gk66k0"]) as $arHandler){$mResultBefore=ExecuteModuleEventEx($arHandler, array(&$obField, &$arField, &$arElement, &$arProfile, &$obPlugin));if($mResultBefore!=null){return $mResultBefore;}}$obField->setProfileID($intProfileID);$obField->setIBlockID($arElement[$GLOBALS["z3fp0czu1cubahwq"]]);$obField->setPlugin($obPlugin);$bIsRequired=$obField->isRequired();$bIsMultiple=$obField->isMultiple();$obField->setType($arField[$GLOBALS["9y5ig0xz666r4f34"]]);if($GLOBALS["gssg9j9d5fu7vqv9"]($arField[$GLOBALS["pzrfxidn27qotpxt"]])){$obField->setConditions($arField[$GLOBALS["tazt9ms552cq8mdn"]]);}if($GLOBALS["591bi9cx0v6yof3t"]($arField[$GLOBALS["vfsv6ntzfvnd7z3o"]])){$obField->setParams($arField[$GLOBALS["m3m2pottyzdb1fpj"]]);}if(!empty($arField[$GLOBALS["qzob6lceznao8mjp"]])){$obField->setValue($arField[$GLOBALS["r7fau03h266s2g1r"]]);}$obField->setModuleId($this->strModuleId);$obField->setElementId($arElement[$GLOBALS["hj5mqvmfkxjt0uo3"]]);$mResult=$obField->processFieldForElement($arElement,$arProfile);if($GLOBALS["4kubv3x6uh9dbkl2"]($obPlugin)){$mResultAfter=$obPlugin->onAfterProcessField($mResult,$obField,$arField,$arElement,$arProfile);if(!$GLOBALS["z997wi8ncj53jqqn"]($mResultAfter)){return $mResultAfter;}}foreach(EventManager::getInstance()->findEventHandlers($this->strModuleId,$GLOBALS["4300vqik1xecl29p"]) as $arHandler){$mResultAfter=ExecuteModuleEventEx($arHandler, array(&$mResult, &$obField, &$arField, &$arElement, &$arProfile, &$obPlugin));if($mResultAfter!=null){return $mResultAfter;}}if($GLOBALS["i08hxgn4sa1qj060"]($mResult)){foreach($mResult as $key=>$value){if($GLOBALS["dtp6bdu7y6mz1ug1"]($value)&&!$GLOBALS["jjsnk05xtyuvay74"]($GLOBALS["92yq2k7i5y46r449"]($value))){unset($mResult[$key]);}}}return $mResult;}public function getElementArray($intElementID,$intIBlockID=false,$bGetOffers=false,$bGetParent=false,$bGetSection=false,$bGetIBlock=false,$arFeatures=null){if(!$intIBlockID){$intIBlockID=Helper::getElementIBlockID($intElementID);}$arCatalog=Helper::getCatalogArray($intIBlockID);$bParent=$GLOBALS["hvzs2y3g516r8z0y"]($arCatalog)&&$arCatalog[$GLOBALS["ygeo0j6sx8yr7lc4"]]||!$GLOBALS["ktpx1rc7bv8sz21f"]($arCatalog);$bOffer=$GLOBALS["rg6t4oq61vppi745"]($arCatalog)&&$arCatalog[$GLOBALS["4mvtih35v0vd4q7u"]];$bFeatures=$GLOBALS["653a959y79v7j35e"]($arFeatures)&&!empty($arFeatures);if($bFeatures){$arFField=&$arFeatures[$GLOBALS["rvkkkd9gclndq7gt"]][$bOffer ? ProfileFieldFeature::OFFER : ProfileFieldFeature::PRODUCT];$arFGroup=&$arFeatures[$GLOBALS["0m0hcia22u8320g6"]][$bOffer ? ProfileFieldFeature::OFFER : ProfileFieldFeature::PRODUCT];$bGetSection=$GLOBALS["humr0vm28y0l43se"]($arFGroup[$GLOBALS["pt75px2cs23evnwj"]]);$bGetIBlock=$GLOBALS["jrxumh9hu81tyw9d"]($arFGroup[$GLOBALS["rsbk48o2bp06n5ws"]]);}$arSort=array($GLOBALS["bawps2c5fwp10jta"]=>$GLOBALS["pe70lvngtw3kumyw"],);$arFilter=array($GLOBALS["ryaogekcvk7v9yam"]=>$intElementID,$GLOBALS["yale84u4qjnfuswv"]=>$intIBlockID,);if($bFeatures){$arSelect=array($GLOBALS["n9thl6d5eyufit3l"],$GLOBALS["t6nzro587tv43i3d"],$GLOBALS["8swldvymzotunr43"],);if($GLOBALS["zq0y93xmcypodjjw"]($arFGroup[$GLOBALS["8ba0mo380m5jxtsa"]])){foreach($arFGroup[$GLOBALS["dx26tst728vn8b5h"]] as $strField){$arSelect[]=$strField;}}if($GLOBALS["5ejgv7g17b61sz13"]($arFGroup[$GLOBALS["8lten3doqlzd0q2d"]])){$arSelect[]=$GLOBALS["diz6uypabgo40g2y"];}$arSelect=$GLOBALS["tlevkaf4umr8jfnn"]($arSelect);}else{$arSelect=array($GLOBALS["t0fsbyaxgyjpuuwv"],$GLOBALS["pze6rzkfc59jmlri"],$GLOBALS["ag623w4o8mutkbwv"],$GLOBALS["ce0b1fo0tf5xln80"],$GLOBALS["wqplse9tit221dvx"],$GLOBALS["v54tndd0pl2pjjs7"],$GLOBALS["kp4os3u3soyejodt"],$GLOBALS["91zz2ajwkxyiy9zn"],$GLOBALS["b3418ds00tfb50an"],$GLOBALS["g0r7uezawj0zg2ny"],$GLOBALS["fjaef4iaiheyg69q"],$GLOBALS["c1rw72m6ka02ldbe"],$GLOBALS["7vh90dsap5mwuodp"],$GLOBALS["75930o967isei76q"],$GLOBALS["gxouufebuccygkmm"],$GLOBALS["29azj6yo1y65pvus"],$GLOBALS["bf7r0dje1xnx61mf"],$GLOBALS["af60pidkozgai6dg"],$GLOBALS["mpjrpowwcub20qa6"],$GLOBALS["0jeaqxpj257ew4jt"],$GLOBALS["o91sn74ucxqi1dic"],$GLOBALS["id79chvrmo6nwzsg"],$GLOBALS["y3z4kez994wk88g9"],$GLOBALS["lgs062dsop9293nd"],$GLOBALS["oz1izt7kuk7sjlej"],$GLOBALS["6jxcfs11nf7mo72h"],);}$resElement=\CIBlockElement::GetList($arSort,$arFilter, false, false,$arSelect);$obElement=$resElement->getNextElement();if($GLOBALS["ca07bgoluoc3ngfu"]($obElement)){$arResult=$obElement->getFields();$arRawItems=array($GLOBALS["3odrtg87hjf5gjcf"],$GLOBALS["utkkf4z65gkj5sdx"],$GLOBALS["1y8cfu3gk6w0kfzo"]);foreach($arRawItems as $strRawItem){if(isset($arResult[$strRawItem])){$arResult[$strRawItem]=$arResult[$GLOBALS["t2ejiqgh0pzp5me1"].$strRawItem];}}$arResult[$GLOBALS["l32ti4pi4hozbmgu"]]=array();if($arResult[$GLOBALS["as114zt8eflxy2pg"]] > 0){$arPicture=\CFile::getFileArray($arResult[$GLOBALS["byu9vsilvmukwlvp"]]);$arResult[$GLOBALS["olf5drdt4mwnvk5j"]]=$arPicture[$GLOBALS["4ckbv7uo1e58wtc6"]];$arResult[$GLOBALS["k1gnjgpt6oczlqxa"]][$arPicture[$GLOBALS["09s6poijmd4b6y77"]]]=$arPicture;unset($arPicture);}if($arResult[$GLOBALS["y11ff4gcp740jx4t"]] > 0){$arPicture=\CFile::getFileArray($arResult[$GLOBALS["6rgrri3l76yhvrda"]]);$arResult[$GLOBALS["tdsd4w0f2ilkd89n"]]=$arPicture[$GLOBALS["3a5mzjxb9dpja3el"]];$arResult[$GLOBALS["ey3log58oezzlh3b"]][$arPicture[$GLOBALS["hhdsb4t1b4fi2h0a"]]]=$arPicture;unset($arPicture);}$arResult[$GLOBALS["t4vrwrliqhz8a117"]]=array();$resSections=\CIBlockElement::GetElementGroups($intElementID, false, array($GLOBALS["i10nhb18ob9vsxjt"]));while($arSection=$resSections->getNext(false,false)){if($arSection[$GLOBALS["bth64y1pv8qvlw0m"]] !=$arResult[$GLOBALS["nqrksb51dvt83jle"]]){$arResult[$GLOBALS["ivwio8y6y0qg56u2"]][]=$arSection[$GLOBALS["p41qd1apn0m4ivab"]];}}$arResult[$GLOBALS["gyxygeegwlr4fyvg"]]=array();if($bGetSection&&$arResult[$GLOBALS["ddjn17356gi5p1je"]]){$arFilter=array($GLOBALS["69wfxa0k5ilpmlv4"]=>$arResult[$GLOBALS["xzm3ksvwtx9xzqbb"]],$GLOBALS["qo0smfnh7ffizi82"]=>$arResult[$GLOBALS["tlfujazmfqdgpkd9"]],$GLOBALS["2hdjbodwaesi3m20"]=>$GLOBALS["yjcja9ybim21tb4h"],);if($bFeatures){$arSelect=array($GLOBALS["9k3lsv0tn8alzb0g"],$GLOBALS["1kp5j7kvzpmti3eb"],$GLOBALS["as23pobpzzbirerw"],);if($GLOBALS["iwbsfbol189d4xvr"]($arFGroup[$GLOBALS["7kfeqwkvvvpapubj"]])){foreach($arFGroup[$GLOBALS["5ewrjyl3hjn8h09p"]] as $strField){$arSelect[]=$strField;}}$arSelect=$GLOBALS["7cubgypmbtwbllyd"]($arSelect);}else{$arSelect=array($GLOBALS["h40za6z7iao7f8ck"],$GLOBALS["bd2a45bfyckkm7cg"],$GLOBALS["wdfp62qiqctjl6d3"],$GLOBALS["r71hw3okfhh18z0u"],$GLOBALS["bytqed9n9xhssxl9"],$GLOBALS["dr46ezrurzr3ji1p"],$GLOBALS["ffpidm06y1l916nv"],$GLOBALS["t66q7u56vvynz145"],$GLOBALS["mgzankzkciu1qwvf"],$GLOBALS["th4yz90qdbdyiqay"],$GLOBALS["eeno7u4khp9att59"],$GLOBALS["47czcbbhrl2394ev"],$GLOBALS["peqi3v2kke1d65b3"],);}$resSection=\CIBlockSection::getList(array($GLOBALS["vfesmeyl1412w79l"]=>$GLOBALS["z33s1ti14jokrh87"]),$arFilter, false,$arSelect);if($arSection=$resSection->getNext()){$arRawItems=array($GLOBALS["9mgrlqikrdxwpit5"],$GLOBALS["uj4c8bjogsqtn2ek"]);foreach($arRawItems as $strRawItem){if(isset($arSection[$strRawItem])){$arSection[$strRawItem]=$arSection[$GLOBALS["99fubvwy8to1rcr5"].$strRawItem];}}if($arSection[$GLOBALS["wlx69dchlqxwv2xv"]] > 0){$arSection[$GLOBALS["43hvnf3oxprrzpx7"]]=\CFile::getPath($arSection[$GLOBALS["9527uqag3a10oefj"]]);}if($arSection[$GLOBALS["vt1az6jtsutegcmm"]] > 0){$arSection[$GLOBALS["d0mgizbntpk63v0k"]]=\CFile::getPath($arSection[$GLOBALS["p3fgoajuhpp567rz"]]);}$arResult[$GLOBALS["zngddap8akwmawx1"]]=$arSection;}unset($resSection,$arSection,$resSection2,$arSection2,$arFilter,$arSelect,$intParentSectionID);}$arResult[$GLOBALS["mo6mb9ulwfwoley2"]]=array();if($bGetIBlock){$arIBlockFilter=array($GLOBALS["vayuwdyf7mi4l006"]=>$arResult[$GLOBALS["1rvo023roae5s6fv"]],$GLOBALS["qfwc3i1yg1yrk7dw"]=>$GLOBALS["95ccscr3tc8ec8wm"],);$resIBlock=\CIBlock::getList(array(),$arIBlockFilter, false);if($arIBlock=$resIBlock->getNext()){$arRawItems=array($GLOBALS["xwutgqszj6z1888d"],$GLOBALS["dlb8azcuj18jpqpo"]);foreach($arRawItems as $strRawItem){$arIBlock[$strRawItem]=$arIBlock[$GLOBALS["9mgo33t4y0qjtrl8"].$strRawItem];}if($arIBlock[$GLOBALS["tivpa7mjxoo3s5ny"]] > 0){$arIBlockPicture=&static::$arCacheIBlockPicture[$arIBlock[$GLOBALS["n5wt81n5gjnian3e"]]];if(!isset($arIBlockPicture)){$arIBlockPicture=\CFile::getPath($arIBlock[$GLOBALS["gsowl16trfeamtl6"]]);}}$arResult[$GLOBALS["pmbokck1ald0mdj1"]]=$arIBlock;}unset($resIBlock,$arIBlock,$arIBlockFilter);}$arPropertyFilter=array($GLOBALS["ail3p65ilsviixol"]=>$GLOBALS["sjl8wq2tt6pbrp9s"],);if($bFeatures){$arPropertyFilter[$GLOBALS["e7ro1mz1yet34pk9"]]=$arFGroup[$GLOBALS["tipr1gcd1pmeqbai"]];}$arResult[$GLOBALS["nhg2gdx63e24hjna"]]=array();foreach($obElement->getProperties(false,$arPropertyFilter) as $arProp){$strPropKey=$GLOBALS["107w88y2cnt609yt"]($arProp[$GLOBALS["odflk8j5ya2vmbfc"]]) ? $arProp[$GLOBALS["88ptfuht6mi5xyzx"]] : $arProp[$GLOBALS["hq4k2h8hw7kmpoy3"]];$arResult[$GLOBALS["94j7ig4kx89v2p89"]][$strPropKey]=$arProp;}$bSkipBarcodes=$bFeatures&&!isset($arFGroup[$GLOBALS["hj3mnnixjw79cyur"]]);if(!$bSkipBarcodes&&$GLOBALS["jkd8k923005ddy51"]($GLOBALS["f5txwcktv4qdx2yn"])){$arResult[$GLOBALS["lf2jtqq5lowj2hbx"]]=array();$resBarcode=\CCatalogStoreBarCode::GetList(array(), array($GLOBALS["ziaimr6dp9kuua67"]=>$intElementID,$GLOBALS["qpn8q6p0172yj0sj"]=>0));while($arBarcode=$resBarcode->fetch()){$arResult[$GLOBALS["ehbuyl4tlbpoqqm3"]][]=$arBarcode[$GLOBALS["o2nsn7x6glpt3sbv"]];}unset($resBarcode,$arBarcode);}if(isset($arResult[$GLOBALS["n99rq0o0lhe4pa4o"]])){$arResult[$GLOBALS["5a3jbp1oh5q1jddy"]]=$arResult[$GLOBALS["bpuhey1vpupttfn9"]];$arResult[$GLOBALS["hrnl9mrspx9malrx"]]=$arResult[$GLOBALS["68zg4nua2dtc0gbl"]];}$arResult[$GLOBALS["938z89601hqo8wey"]]=$bParent;$arResult[$GLOBALS["90tcqnpmlg8jtmwn"]]=$bOffer;if($arResult[$GLOBALS["4sdzu1wxstwxk8bv"]]){$arResult[$GLOBALS["33ycrkqughnrs8bm"]]=$arCatalog[$GLOBALS["0e9gvl54zbfqfcoh"]];}if($arResult[$GLOBALS["8l4vlw6x4zf09m3d"]]){$arResult[$GLOBALS["sbsenxxo68ct63qa"]]=$arCatalog[$GLOBALS["7n77shsnvgu97rxe"]];}if($bGetOffers){$this->getElementOffers($arResult,$arProfile,$arFeatures);}$arSeo=[$GLOBALS["xz5pzaitv33prj3f"]=>$GLOBALS["gd7jxhk66fqady84"],$GLOBALS["1pjlar1p93gx9wzh"]=>$GLOBALS["kv4mgus2owvxpovx"],$GLOBALS["ki72pjqlebu7mcog"]=>$GLOBALS["l0gay5q9euyo40pn"],$GLOBALS["h848mf093h6caes8"]=>$GLOBALS["z8il4h5rrl5f563o"],$GLOBALS["nkshbygcr6thnqae"]=>$GLOBALS["p2183t0nqffstgfk"],$GLOBALS["j565k8t0mueev7j5"]=>$GLOBALS["fdfooqjtrj1363bm"],$GLOBALS["9qdcvlf95dl1oc0u"]=>$GLOBALS["vk6p1m1w24na2jl0"],$GLOBALS["8a40e0awn2nom052"]=>$GLOBALS["ic2cvjp7df393uga"],];if(!$bFeatures||array_intersect(array_keys($arSeo),$arFField)){if($GLOBALS["2jz54vs0zwbtljg4"]($GLOBALS["mk7mal4qhgvz13ri"])){$obIPropValues=new \Bitrix\IBlock\InheritedProperty\ElementValues($arResult[$GLOBALS["i7v0w8cgej0zv4g9"]],$arResult[$GLOBALS["yrqpdu19326e95t0"]]);$arIPropValues=$obIPropValues->getValues();if($GLOBALS["dilyn5wv6jczrbkz"]($arIPropValues)){foreach($arSeo as $strTo=>$strFtom){$arResult[$strTo]=$GLOBALS["zp6zaa5fl7fdtajp"]($arIPropValues[$strFtom]) ? $arIPropValues[$strFtom] : $GLOBALS["o7uxg0jva7bxqxup"];}}unset($obIPropValues,$arIPropValues,$strTo,$strFtom);}}unset($arSeo);if($bGetParent){if($GLOBALS["mwjp8y675p4ho3p4"]($arCatalog)&&$arCatalog[$GLOBALS["6j1zt8k4i3tmvs0m"]]){foreach($arResult[$GLOBALS["xnfb1h1o43pvnbmf"]] as $arProperty){if($arProperty[$GLOBALS["pxmns09yg0xs3ysr"]]==$arCatalog[$GLOBALS["1wqxea2q75ztv9yv"]]){$intParentElementID=$arProperty[$GLOBALS["xywk6d4o9piq03vq"]];$arResult[$GLOBALS["6q36e4td90t5l2kx"]]=$this->getElementArray($intParentElementID,$arCatalog[$GLOBALS["19qx91wulzjlwt8s"]],$bGetOffers_=false,$bGetParent_=false,$bGetSection_=true,$bGetIBlock_=true,$arFeatures);if(empty($arResult[$GLOBALS["du60r6rbsmwqta3f"]])){$arResult[$GLOBALS["vo5dw4f35oxuk611"]]=$arResult[$GLOBALS["oszinpewcbhqgs2e"]][$GLOBALS["be728d1aq0l9cjvg"]];}if(empty($arResult[$GLOBALS["now1cfw28iw0yzyu"]])){$arResult[$GLOBALS["xu1qlsgfp2p9phxe"]]=$arResult[$GLOBALS["4l7ala8z2v2sfwk2"]][$GLOBALS["z0yh5yhqprkrzpp1"]];}break;}}}}foreach(EventManager::getInstance()->findEventHandlers($this->strModuleId,$GLOBALS["yt87gpum91yn70nj"]) as $arHandler){ExecuteModuleEventEx($arHandler, array(&$arResult,$intElementID,$intIBlockID,$bGetParent,$obElement));}unset($arCatalog);return $arResult;}return false;}protected function getElementOffers(&$arElement,$arProfile,$arFeatures=null){$arElement[$GLOBALS["vtl0p35i0cmmd5g0"]]=array();$arElement[$GLOBALS["oex8y7miex4r2mfb"]]=0;$intIBlockID=$arElement[$GLOBALS["kz69jxm5yn3zud2n"]];$arCatalog=Helper::getCatalogArray($intIBlockID);if($GLOBALS["wz98vc9pbmy1l3ag"]($arCatalog)&&$arCatalog[$GLOBALS["zcj927v6vg43osf2"]]){$arElement[$GLOBALS["iismlvvcjgtshat6"]]=static::isIBlockHasSubsections($arCatalog[$GLOBALS["7td65ut6nipkpsik"]]);$arElement[$GLOBALS["rm8dbxhegqmut0mr"]]=$arCatalog[$GLOBALS["k8o0u9ahndsgcr7v"]];$arElement[$GLOBALS["7f90y7xx4oi54v5y"]]=$arCatalog[$GLOBALS["em6fxei91pj09s5e"]];$arSort=array();$arSort2Params=$arProfile[$GLOBALS["ob3hnvig4az09adx"]][$intIBlockID][$GLOBALS["jkgbh1bfny6ofaj5"]][$GLOBALS["8lo4l2vai2hp3bws"]];if($GLOBALS["rxi9z59g44b9rphj"]($arSort2Params)){foreach($arSort2Params[$GLOBALS["oxsrc653o80t4m2z"]] as $key=>$strField){$strOther=$arSort2Params[$GLOBALS["dnk4janobqyt2rb3"]][$key];$strOrder=$arSort2Params[$GLOBALS["0eu2rwj8upphrkaq"]][$key];if($strField==$GLOBALS["d88b15gng0yz5ad4"]){$arSort[$strOther]=$strOrder;}else{$arSort[$strField]=$strOrder;}}}$arFilter[$GLOBALS["3hlnquya3xhh3n1m"].$arCatalog[$GLOBALS["4jwa4rqrsr6iqrc6"]]]=$arElement[$GLOBALS["7akhuwj6zf2h0ojo"]];$arElement[$GLOBALS["z9025euvwjlypxns"]]=\CIBlockElement::GetList($arSort,$arFilter, array());if($arElement[$GLOBALS["1vzg75bkge239r5z"]] > 0){$arNavParams=array();$intOffersMaxCount=&$arProfile[$GLOBALS["xvvcov3u7gpap353"]][$intIBlockID][$GLOBALS["xuskyysvufkklf9d"]][$GLOBALS["7e7x49e5o9uhvktt"]];if($GLOBALS["bs2t0uti3ozbobmz"]($intOffersMaxCount)&&$intOffersMaxCount>0){$arNavParams[$GLOBALS["fuqgoi6rwo01ou0p"]]=$intOffersMaxCount;}$arProfileFilter=Helper::call($this->strModuleId,$GLOBALS["5j13kdckeeu3ct3i"],$GLOBALS["8wwlmxup1oo95uuz"], [$arProfile[$GLOBALS["5ajn66diomi6xi4d"]],$arCatalog[$GLOBALS["9web4tmdajagurpv"]]]);$arFilter=$GLOBALS["rpeypqqcfzk2q32d"]($arProfileFilter,$arFilter);unset($arProfileFilter);$arSelect=[$GLOBALS["ebpfrl3nbojrblhy"]];if($arOfferGroupData=$this->getOffersGroup($arProfile,$intIBlockID)){foreach($arOfferGroupData as $strOfferGroupPropId){$arSelect[]=sprintf($GLOBALS["gs2jfepf58g2bjdm"],$strOfferGroupPropId);}$arOfferGroups=[];}$resOffers=\CIBlockElement::GetList($arSort,$arFilter, false,$arNavParams,$arSelect);while($arOffer=$resOffers->getNext(false, false)){$bSkip=false;if($arOfferGroupData){$arOfferGroupItem=[];foreach($arOfferGroupData as $strOfferGroupPropId){$strKey=sprintf($GLOBALS["kmjqls89b366x74p"],$strOfferGroupPropId);$arOfferGroupItem[$strOfferGroupPropId]=$arOffer[$strKey];}if($GLOBALS["mnyaiph8be7qp226"]($arOfferGroupItem,$arOfferGroups)){$bSkip=true;}else{$arOfferGroups[]=$arOfferGroupItem;}}if($bSkip){continue;}$arElement[$GLOBALS["n1hmgftfhsaw3e8z"]][]=$GLOBALS["mebcqqm01x35c4to"]($arOffer[$GLOBALS["qr7uehh4zlx7xpyj"]]);}if(!empty($arElement[$GLOBALS["e85htn2xl4vmhbhy"]])){$intFirstOfferID=reset($arElement[$GLOBALS["e6z238skosvrwn8h"]]);$arElement[$GLOBALS["67l7hmzdljzt7dxa"]]=$this->getElementArray($intFirstOfferID,$arCatalog[$GLOBALS["xfi5x6zy7ro9vw1s"]],false, false, true, true,$arFeatures);}}}unset($intIBlockID,$arCatalog,$arSort,$arFilter,$intFirstOfferID,$resOffers,$arOffer);}protected function getOffersGroup($arProfile,$intIBlockID){$arResult=$arProfile[$GLOBALS["0oydc03mqj5qx9qq"]][$intIBlockID][$GLOBALS["anqf9i76fss6y6r6"]][$GLOBALS["i6pcxcgqpz9unxy8"]];if(!$GLOBALS["m31wefymaofnd2o6"]($arResult)||empty($arResult)){$arResult=false;}return $arResult;}protected static function isIBlockHasSubsections($intIBlockID){$bExists=false;if(isset(static::$arIBlockHasSubsectionsCache[$intIBlockID])){$bExists=static::$arIBlockHasSubsectionsCache[$intIBlockID];}else{$arSectionFilter=array($GLOBALS["f9skl4m4j5p10oxd"]=>$intIBlockID,$GLOBALS["mfvn95w1v8ajhhy0"]=>$GLOBALS["2w1p8nq478yanv2v"],);$resSection=\CIBlockSection::getList(array(),$arSectionFilter, false, array($GLOBALS["stil81sfv838bns8"]),array($GLOBALS["u8lke0sm4e6o7vm9"]=>1));if($arSection=$resSection->getNext(false, false)){$bExists=true;}static::$arIBlockHasSubsectionsCache[$intIBlockID]=$bExists;}return $bExists;}public function getNotGeneratedElementsID($intProfileID,$intIBlockID,$arSession){$arResult=array();$arFilter=Helper::call($this->strModuleId,$GLOBALS["8dcwujz4hma83eyr"],$GLOBALS["6frmjtu61sv2feqb"], [$intProfileID,$intIBlockID]);$arSubFilter=array($GLOBALS["5kzby64u4dj1vn6i"]=>$intProfileID,$GLOBALS["ac2pejwi0lsdjxqx"]=>$intIBlockID,);$strTableName=Helper::call($this->strModuleId,$GLOBALS["lb3u9kdtaixw7qv0"],$GLOBALS["9t3oc6acyeeqz4xl"]);$arFilter[$GLOBALS["w0usqh9edk8r1jeq"]]=new IBlockElementSubQuery($arSubFilter,$GLOBALS["8t63krt3zilgzdux"],$strTableName,$GLOBALS["910e8bzx7nxwto09"],$this->strModuleId);if(isset($arSession[$GLOBALS["61r67ruozwa4ua85"]][$intIBlockID][$GLOBALS["vv528tgapwzpo3uq"]])){$intLastID=$GLOBALS["lcxi4cfmk48q12hm"]($arSession[$GLOBALS["urmix6zpc78nu8s9"]][$intIBlockID][$GLOBALS["sx7img3c9r2rv7ac"]]);if($intLastID){$arFilter[$GLOBALS["cq32zwwel8wkhyd9"]]=$intLastID;}}$arNavParams=false;$resElements=\CIBlockElement::getList(array($GLOBALS["6zwrykgv78habsun"]=>$GLOBALS["zia3lm9sqcs6t7n2"]),$arFilter, false,$arNavParams, array($GLOBALS["qdp0y4yahx285hnf"]));while($arElement=$resElements->getNext(false, false)){$arResult[]=$GLOBALS["mufm1kv1lgttpbtz"]($arElement[$GLOBALS["fbizc0d2302ea4fo"]]);}return $arResult;}public function setMethod($intMethod){if($GLOBALS["y1q3nbz4pm6pnshm"]($intMethod, array(static::METHOD_CRON, static::METHOD_SITE))){$this->intMethod=$intMethod;}}public function isCron(){return $this->intMethod==static::METHOD_CRON;}public function startTime(){$fStepTime=FloatVal(Helper::getOption($this->strModuleId,$GLOBALS["qcz6zt70i0k0oz5a"]));if($fStepTime<=1){$fStepTime=20;}$this->intMaxTime=$fStepTime;$this->intStartTime=time();}public function haveTime($delta=null){if($this->isCron()){return true;}else{$delta=$GLOBALS["sz2t3ri0gpmhl3vh"]($delta)&&$delta > 0 ? $delta : 0;$bResult=time() - $this->intStartTime + $delta < $this->intMaxTime;return $bResult;}}public function executeProfile($intProfileID){$mResult=static::RESULT_ERROR;$bIsCron=$this->isCron();$bCanExecute=true;if($bIsCron&&Helper::call($this->strModuleId,$GLOBALS["vekda25ae5ox2gso"],$GLOBALS["10alye2lfwpwann2"], [$intProfileID])){$bCanExecute=false;$obDateStarted=Helper::call($this->strModuleId,$GLOBALS["w1who28qgm4bqct9"],$GLOBALS["iq3dsqhr29f77ugj"], [$intProfileID]);$strDateStarted=$obDateStarted->toString();print $GLOBALS["ul3k087ukoprbnnm"].$strDateStarted.$GLOBALS["zwe3pv95tltqxrfg"].PHP_EOL;unset($obDateStarted,$strDateStarted);}if($bCanExecute){$arProfile=Helper::call($this->strModuleId,$GLOBALS["889ize4uo4jb4x5u"],$GLOBALS["7o54vjb2iyszfmwm"], [$intProfileID]);if($GLOBALS["ui51i9eu0xbpr1jf"]($arProfile)&&$arProfile[$GLOBALS["c0iqxj3qzc6xyat0"]]==$GLOBALS["g0ejxa6tak8bg0yt"]){$arSession=&$arProfile[$GLOBALS["1j45crsokhykphw9"]];$arSession=$GLOBALS["tjizfqrhc6j2orbx"]($arSession);$arSession=$GLOBALS["gegafqnsyfmthsug"]($arSession) ? $arSession : array();if(!$GLOBALS["e4l5umfbe8gn0fer"]($arSession[$GLOBALS["x9eeffxr0fzyhy7o"]])){$arSession[$GLOBALS["zahflumqh5rtknu0"]]=$GLOBALS["2t9gymlyz881mmvo"](randString(32));}$arSteps=$this->getSteps($intProfileID);$strCurrentStep=&$arSession[$GLOBALS["si6w5pd5ym2b70fh"]];if(!$GLOBALS["yjgj2t0vjavdrkix"]($strCurrentStep)){$strCurrentStep=key($arSteps);}foreach($arSteps as $strStep=>$arStep){$bCanProcessStep=$bIsCron||$strStep==$strCurrentStep;if($bCanProcessStep){$strStepResultHTML=$GLOBALS["6lkz1wdqzfebt16y"];$mFuncResult=$GLOBALS["vt6p0avtezvao1xy"]($arStep[$GLOBALS["x1o7nze1tn0dv66p"]],$intProfileID, array($GLOBALS["pbfywei9xh15klgy"]=>&$arProfile,$GLOBALS["sepwzsj8mysqcumm"]=>&$arSession,$GLOBALS["jaegnhtb9geukpt5"]=>&$arSteps,$GLOBALS["8upk9779vnl4e971"]=>$strCurrentStep,$GLOBALS["cvjndz65emfkef94"]=>$arSteps[$strCurrentStep],$GLOBALS["nhn58n2e3yxjj6ci"]=>$bIsCron,));if($mFuncResult===static::RESULT_SUCCESS){$strNextStep=Helper::getNextKey($arSteps,$strCurrentStep);if($strNextStep===false){$mResult=static::RESULT_SUCCESS;}else{$mResult=static::RESULT_CONTINUE;}$strCurrentStep=$strNextStep;}elseif($mFuncResult===static::RESULT_CONTINUE){$mResult=static::RESULT_CONTINUE;}elseif($mFuncResult===static::RESULT_ERROR){$mResult=static::RESULT_ERROR;break;}if(!$bIsCron){break;}}}Helper::call($this->strModuleId,$GLOBALS["d9p9nzlyot3nbhcz"],$GLOBALS["1qck6pv7pzh6qo50"], [$intProfileID,$arSession]);if($bIsCron||$mResult===static::RESULT_SUCCESS||$mResult===static::RESULT_ERROR){Helper::call($this->strModuleId,$GLOBALS["z6lrx3cw9u0hgx2u"],$GLOBALS["4hs6yx5wvwhzqr21"], [$intProfileID]);}}else{Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["dxx4zzg3b4b2ibm7"]),$arProfile[$GLOBALS["ehv29s5hbw88yp6x"]]);}}return $mResult;}public function getSteps($intProfileID){$arProfile=Helper::call($this->strModuleId,$GLOBALS["zwum25r70seqi3ki"],$GLOBALS["hx91pra2r655ns8o"], [$intProfileID]);$arResult=array();$arStepPrepare=array($GLOBALS["cmcf8ukxsins20z1"]=>Loc::getMessage($GLOBALS["66vkxgjlnhoh2r65"]),$GLOBALS["2j6u3z5zblb56pue"]=>1,$GLOBALS["0dnzww7u7goefg72"]=>[$this,$GLOBALS["13c3f4vlgpu49iud"]],);$arResult[$GLOBALS["d3vjkzmy8l0mfd8w"]]=$arStepPrepare;$arResult[$GLOBALS["buiocjlclyiv1zqf"]]=array($GLOBALS["5l0amptvqcp7kynt"]=>Loc::getMessage($GLOBALS["ls4udyihg1l5uv3d"]),$GLOBALS["ynd9t3ezp5t5wyf4"]=>10,$GLOBALS["ubep6677v0xgvg81"]=>[$this,$GLOBALS["67uvyphz1umhf1vf"]],);if(DiscountRecalculation::isEnabled()){$arResult[$GLOBALS["sq2ep5ba7wdm78za"]]=array($GLOBALS["upyveylqbivl366g"]=>Loc::getMessage($GLOBALS["p62ggi45jlwvh4ev"]),$GLOBALS["3p1z5rm3vfwnmzra"]=>20,$GLOBALS["3p2ar450gjprpwgd"]=>[$this,$GLOBALS["4gp7sljeu1vt97zi"]],);}$arResult[$GLOBALS["yelj22n1u0zwd5a9"]]=array($GLOBALS["v2yn4py800uslc5k"]=>Loc::getMessage($GLOBALS["9zkj0mxrnld2e9c2"]),$GLOBALS["7myuhrbebovgb63o"]=>50,$GLOBALS["el48a69sdyxud6fx"]=>[$this,$GLOBALS["e611o7xvabn8y8wc"]],);$arResult[$GLOBALS["x8rb9rpjwiln6unv"]]=array($GLOBALS["0ybf31kdd3hkr2d8"]=>Loc::getMessage($GLOBALS["bv1ris2s76fpuyec"]),$GLOBALS["udtv0i222ehpzbv5"]=>100,$GLOBALS["ajf2dxu6cf0putyi"]=>[$this,$GLOBALS["ubf0fv261g6yppou"]],);$arResult[$GLOBALS["ocqzt35gxjjnf70y"]]=array($GLOBALS["cd5v1yi28cwmattm"]=>Loc::getMessage($GLOBALS["q2idfk6h6c1ka083"]),$GLOBALS["04oszk2vqd287v01"]=>1000000,$GLOBALS["3j5n0lxdugfpx15k"]=>[$this,$GLOBALS["kdjupzfej7ps211d"]],);$arProfile=Helper::call($this->strModuleId,$GLOBALS["m6g619452qkgnni8"],$GLOBALS["c0ejumc39s9ul1s9"], [$intProfileID]);$arPlugins=$this->findPlugins(false);$arPlugin=$this->getPluginInfo($arProfile[$GLOBALS["v5tzsxkozpnofw05"]]);if($GLOBALS["6e364p38ycvx1xsn"]($arPlugin)&&$GLOBALS["17ihvplchiccmtuv"]($arPlugin[$GLOBALS["gmtrp9ham4nwnudp"]])){$obPlugin=new $arPlugin[$GLOBALS["r2tm1i052l4qth0q"]]($this->strModuleId);$obPlugin->setProfileArray($arProfile);$arPluginSteps=$obPlugin->getSteps();if($GLOBALS["klwnnlmebsf0e63z"]($arPluginSteps)){foreach($arPluginSteps as $strStep=>$arStep){$strStep=$GLOBALS["nj8gad4mgcfqrizb"]($strStep);if(!$GLOBALS["h340yzhia51puxib"]($strStep, array($GLOBALS["lnsa7qmosb4rf9lv"],$GLOBALS["qw27itt271060h5w"],$GLOBALS["r6ni70e5402uaclj"],$GLOBALS["tf040f3klv5t182m"]))){$arResult[$strStep]=$arStep;}}}unset($obPlugin);}foreach(EventManager::getInstance()->findEventHandlers($this->strModuleId,$GLOBALS["qobyr3j9rv6rub0c"]) as $arHandler){ExecuteModuleEventEx($arHandler, array(&$arResult,$this->strModuleId,$intProfileID));}$arResult[$GLOBALS["w8tyrbgbw0kmo7jl"]]=$arStepPrepare;$GLOBALS["9w8vkc2f61i6ckg3"]($arResult,$GLOBALS["8s76r3xf6h3p3fhl"]);unset($arPlugins,$arProfile);return $arResult;}public function stepPrepare($intProfileID,$arData){$bIsCron=$arData[$GLOBALS["wlho0ag1igodlscz"]];$arSession=&$arData[$GLOBALS["d8bgihfnxgp1uuf5"]];$arCheckResult=$this->stepPrepare_Check($arData);if(!$GLOBALS["bxlt66al214al1dy"]($arCheckResult)&&$this->strModuleId !=$GLOBALS["ic0df74d8m8ovhlf"]){$strMessage=$GLOBALS["sibzuuzqr72jg1tz"];if(!Helper::isUtf()){$strMessage=Helper::convertEncoding($strMessage,$GLOBALS["15r19n74gm3di8ps"],$GLOBALS["o8exe219nvpd79m2"]);}if(!$bIsCron){print Helper::showError($strMessage);}Log::getInstance($this->strModuleId)->add($strMessage,$intProfileID);$this->sendErrorEmail(Loc::getMessage($GLOBALS["92e3tgait9gc2cf3"]),$arData);return static::RESULT_ERROR;}$bExpired=$arCheckResult[$GLOBALS["bmgtfcnor5kelykb"]];if($GLOBALS["iol7da3p250ubir9"]($GLOBALS[$GLOBALS["pbzjs47g9gaxs2zf"]])&&$GLOBALS["qxctvqzsc94n0p5f"]($GLOBALS["o4fiz0nqwv6z1ez5"],$GLOBALS[$GLOBALS["d4a0juxylyey9qs5"]])){$bExpired=true;}if($bExpired){$arStopClassesDefault=[$GLOBALS["mtlensh2wcdirg8q"],$GLOBALS["se0mucxvbi1j3kcu"],$GLOBALS["c24ujvrldqvf7004"],$GLOBALS["k4bw0iw8dqezlp1x"],$GLOBALS["7z13u4kzqg4jk312"],$GLOBALS["37dkcohr6iyd5z0x"],];if($this->strModuleId==$GLOBALS["6hq8zqf1f3jd1tbx"]){$arStopClassesDefault=[];}$arStopClassesForModules=[$GLOBALS["wgkg1gpf8yn2p1c1"]=>[$GLOBALS["jl068miy64c0tbq7"],$GLOBALS["updlnf1buo3bghuf"],$GLOBALS["0b13jpm3s1ory0zt"],$GLOBALS["906lcps5a2yvs2nm"],$GLOBALS["fdm8awm9e35hr60s"],],$GLOBALS["01wq0f27mr80wow3"]=>[$GLOBALS["mt9m0t3qqfnej1u3"],$GLOBALS["fp9hvhg8tua6gcnv"],$GLOBALS["by2sshxfw0bewo0t"],$GLOBALS["grcfesgcb7ibkurt"],$GLOBALS["6cpkud3q52hgvuxz"],$GLOBALS["95hsynvuo2vuthdu"],$GLOBALS["43jbrwl4g0d8wy20"],$GLOBALS["tvxb37ncssk1fd9m"],$GLOBALS["igjlq3y0hfnetbqy"],$GLOBALS["x8fiil2vr26d2yzi"],$GLOBALS["c9lfwti597dc79px"],$GLOBALS["8s6snnh9lahldokw"],],];$arStopClasses=$arStopClassesDefault;$arStopClassesModule=$arStopClassesForModules[$this->strModuleCode];if($GLOBALS["333dr2so43p83reo"]($arStopClassesModule)){$arStopClasses=$GLOBALS["64mm60j3c1lnu4ln"]($arStopClasses,$arStopClassesModule);}$arCurrClasses=[];$arPlugin=$this->getPluginInfo($arData[$GLOBALS["k3rjkhs6paj63n0p"]][$GLOBALS["gahcz7k7ci0snndi"]]);$strClass=$arPlugin[$GLOBALS["h3rg36tn87l28bwx"]];while(true){$arCurrClasses[]=$strClass;if(!$GLOBALS["0lj680mrieptfvew"]($strClass)){break;}$strClass=$GLOBALS["68vipoltjytda4hf"]($strClass);}$bStop=$arCheckResult[$GLOBALS["5pnjg6eq5vgwla9a"]]||count(array_intersect($arCurrClasses,$arStopClasses)) > 0;if($bStop){$strMessagePaid=$GLOBALS["qk02hizbdq72ccxc"];$strMessagePaidText=$GLOBALS["76a6ca2mqxb92h2z"];$strMessageDemo=$GLOBALS["h2lqwkte48gx2s0r"];$strMessageDemoText=$GLOBALS["7f03mdc2ddc5hon1"];$strMessagePaid=sprintf(base64_decode($strMessagePaid),$this->strModuleId);$strMessagePaidText=sprintf(base64_decode($strMessagePaidText),$this->strModuleId);$strMessageDemo=sprintf(base64_decode($strMessageDemo),$this->strModuleId);$strMessageDemoText=sprintf(base64_decode($strMessageDemoText),$this->strModuleId);$strMessage=$arCheckResult[$GLOBALS["r8tsrpqtay67d4ib"]] ? $strMessageDemo : $strMessagePaid;$strDetails=$arCheckResult[$GLOBALS["vzcjb3ywko3t7tuo"]] ? $strMessageDemoText : $strMessagePaidText;if(!Helper::isUtf()){$strMessage=Helper::convertEncoding($strMessage,$GLOBALS["5b8d053dnuzacyev"],$GLOBALS["4ycmyu7ctoehaqt2"]);$strDetails=Helper::convertEncoding($strDetails,$GLOBALS["w2dz47gos6p1dw2u"],$GLOBALS["so98rqqwbnmlew05"]);}if($bIsCron){print sprintf($GLOBALS["9yzvgcrewd59fwpd"].PHP_EOL,$this->strModuleId);}else{print Helper::showError($strMessage,$strDetails);}Log::getInstance($this->strModuleId)->add($strMessage.$GLOBALS["zzkyzrxx448rs0g4"].strip_tags($strDetails),$intProfileID);$this->sendErrorEmail(Loc::getMessage($GLOBALS["q3spy6yxiyfqy5q1"]),$arData);return static::RESULT_ERROR;}else{if($this->strModuleId==$GLOBALS["fb3vkgpm4yhxm19a"]){if($bIsCron){$strMessage=$GLOBALS["wr8zw5ly66w9j387"];$strMessage=sprintf(base64_decode($strMessage),$this->strModuleId);print $strMessage.PHP_EOL;if(!Helper::isUtf()){$strMessage=Helper::convertEncoding($strMessage,$GLOBALS["e26tlujgy2n1j0tp"],$GLOBALS["hoacd9yshuce2eki"]);}Log::getInstance($this->strModuleId)->add($strMessage,$intProfileID);$this->sendErrorEmail(Loc::getMessage($GLOBALS["qzp1i45dpn29yu83"]),$arData);return static::RESULT_ERROR;}elseif(Helper::getOption($this->strModuleId,$GLOBALS["3ojvirkvj2tllarm"])==$GLOBALS["zl0daas6jpazt20l"]){$strMessage=$GLOBALS["h5o2w8vluftohn6n"];$strMessage=sprintf(base64_decode($strMessage),$this->strModuleId);if(!Helper::isUtf()){$strMessage=Helper::convertEncoding($strMessage,$GLOBALS["sn7ek7hlb5l72b5e"],$GLOBALS["jns5a1b9lcr99igz"]);}Log::getInstance($this->strModuleId)->add($strMessage,$intProfileID);if(!$bIsCron){print Helper::showError($strMessage);}$this->sendErrorEmail(Loc::getMessage($GLOBALS["gkqqi57kwivpq5zi"]),$arData);return static::RESULT_ERROR;}}}}if(!$this->stepPrepare_checkPermissions($intProfileID,$arData,$strFilename)){$strMessage=Loc::getMessage($GLOBALS["7nak3n0c8jg9i31n"], array($GLOBALS["w81ihqw3oiksga8z"]=>$strFilename,));Log::getInstance($this->strModuleId)->add($strMessage,$intProfileID);if(!$bIsCron){print Helper::showError($strMessage);}$this->sendErrorEmail(Loc::getMessage($GLOBALS["iy9mtt8aqfsxa8gm"]),$arData);return static::RESULT_ERROR;}foreach(EventManager::getInstance()->findEventHandlers($this->strModuleId,$GLOBALS["awawgfz71g2kh1wi"]) as $arHandler){if(ExecuteModuleEventEx($arHandler, [$intProfileID, &$arData])===static::RESULT_ERROR){$this->sendErrorEmail(Loc::getMessage($GLOBALS["i2mer3z9qpnkc9gl"]),$arData);return static::RESULT_ERROR;}}$arSession[$GLOBALS["cmifcag63kpxty2y"]]=array($GLOBALS["aa61w5c260qshvec"]=>0,$GLOBALS["o5nwd5t4n1z0uma3"]=>0,$GLOBALS["eynnnw703t0cdch6"]=>0,$GLOBALS["efmzuyzstp6ycrzd"]=>0,$GLOBALS["31wrl1yzdqwoo0ww"]=>0,);if($bIsCron){Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["42n27ln3qhrvwdfk"]),$intProfileID);Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["xva5bbdwuzb2xoao"], array($GLOBALS["ploj59dwolkc8zd1"]=>Cli::getPid(),)),$intProfileID, true);}else{Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["r1hcqgswunjc2a48"]),$intProfileID);}$arPlugin=$this->getPluginInfo($arData[$GLOBALS["bsy2u5p2sv9st9hv"]][$GLOBALS["a6phxanasiy1mjhq"]]);if(!$GLOBALS["kedtx3c0tj7l2nbe"]($arPlugin)||empty($arPlugin)){$strMessage=Loc::getMessage($GLOBALS["8avt81j7rbv33o87"], array($GLOBALS["v1lkwk281x94tqve"]=>$arData[$GLOBALS["3l8yp90g6j92pb6x"]][$GLOBALS["1sic1b631i2j7c6p"]],));Log::getInstance($this->strModuleId)->add($strMessage,$intProfileID);if(!$bIsCron){print Helper::showError($strMessage);}$this->sendErrorEmail(Loc::getMessage($GLOBALS["y2axav94gf004s0k"]),$arData);return static::RESULT_ERROR;}Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["o9wwxbnppkxb6434"], array($GLOBALS["6ubetu5s80yh6vkt"]=>$arPlugin[$GLOBALS["vhhzy1a47cry4e3d"]],$GLOBALS["a1mh0c4xhai7b26d"]=>$arPlugin[$GLOBALS["jm1dmp4gwcflk6c8"]],)),$intProfileID, true);unset($arPlugin);Helper::call($this->strModuleId,$GLOBALS["ugeh4fv5zy3r0ra6"],$GLOBALS["ofymvgmyv8tg1300"], [$intProfileID]);if($bIsCron){Helper::call($this->strModuleId,$GLOBALS["wbn1qh97zh1mq5b4"],$GLOBALS["pn7um7qe5lcyfn25"], [$intProfileID]);}Helper::call($this->strModuleId,$GLOBALS["bve1ttesixjg29rn"],$GLOBALS["9yla111g2br8txyr"], [$intProfileID]);$arSession[$GLOBALS["a29yaqabehipjtu4"]]=time();$strIP=$_SERVER[$GLOBALS["xk7vjmltxwedozg2"]];if((!$GLOBALS["o3lxq2jfr1nglu4q"]($strIP)||$strIP==$GLOBALS["pfqmao3bmdn1vvwk"])&&$GLOBALS["69704czjbgy52m2d"]($_SERVER[$GLOBALS["vg4ehwlp1qiy9sz2"]])){$strIP=$_SERVER[$GLOBALS["f0tnkq0b8n1hiw48"]];}$intUserId=null;if($this->intUserId){$intUserId=$this->intUserId;}elseif($GLOBALS["bubisjuqeu6b4454"]($GLOBALS[$GLOBALS["ut81t78r6disazt5"]])&&$GLOBALS[$GLOBALS["q0c952bq4bj5507o"]]->isAuthorized()){$intUserId=$GLOBALS[$GLOBALS["3a78a1vt071fzuu5"]]->getId();}$intFound=0;$arIBlocksID=Helper::call($this->strModuleId,$GLOBALS["5ktj4ik70187hg8x"],$GLOBALS["rwc7b20nac8rfp5c"], [$intProfileID, true]);foreach($arIBlocksID as $intIBlockId){$arFilter=Helper::call($this->strModuleId,$GLOBALS["6pr3h8r4ow4sxx05"],$GLOBALS["do1xujv1z1ojkem5"], [$intProfileID,$intIBlockId]);if(!empty($arFilter)){$intCountElements=$GLOBALS["qcj78hkarfwtuu60"](\CIBlockElement::getList([],$arFilter, []));$intFound +=$intCountElements;}}if(!$intFound){$strMessage=Loc::getMessage($GLOBALS["mv7x41iexxh0w05f"]);Log::getInstance($this->strModuleId)->add($strMessage,$intProfileID);if(!$bIsCron){print Helper::showError($strMessage);}$this->sendErrorEmail(Loc::getMessage($GLOBALS["3texs438kog5kj3e"]),$arData);return static::RESULT_ERROR;}$arHistory=[$GLOBALS["flb7kylkwxh5whb1"]=>$intProfileID,$GLOBALS["bk6btmhmic23ugo9"]=>new \Bitrix\Main\Type\DateTime(),$GLOBALS["9y8n0g2bka0p8jnl"]=>$bIsCron ? $GLOBALS["fk4yi8swl6n1erb6"] : $GLOBALS["9k777q045yxae1t8"],$GLOBALS["7jwvdj3uxh6k7aam"]=>$intUserId,$GLOBALS["fggpat61n66e05ua"]=>!$bIsCron ? $strIP : null,$GLOBALS["6as4xb3ddh2sq96h"]=>Helper::getCurrentCliCommand(),$GLOBALS["zm30i4ulsehfk3bi"]=>Cli::getPid(),$GLOBALS["j8u1xekh1l5wtrx9"]=>Helper::getOption($this->strModuleId,$GLOBALS["sor0b4ew2uz2uac3"])==$GLOBALS["77r1dhfbfbfsm6kr"] ? $GLOBALS["24knc1z9yewzdtb9"] : $GLOBALS["z7ong2izpj70szls"],$GLOBALS["pee929usouavlsuy"]=>Helper::getOption($this->strModuleId,$GLOBALS["l5em2r59wzan4egi"])==$GLOBALS["ozk5r3b1lnwbkh6x"]? Helper::getOption($this->strModuleId,$GLOBALS["w5xmmdr2grt52sc5"]) : null,$GLOBALS["a5isdplfltscqfyf"]=>Helper::getOption($this->strModuleId,$GLOBALS["qtcae6299b6xvj13"])==$GLOBALS["xqanxze7zd83tpwn"]? Helper::getOption($this->strModuleId,$GLOBALS["91wprno7c7goyivh"].($bIsCron?$GLOBALS["wwg7pleruukhoj7i"]:$GLOBALS["9tn1tqycg8qyvua2"])) : null,$GLOBALS["l36jjaewdyg6mojz"]=>sprintf($GLOBALS["mw0hexixj2wg87av"], Helper::getModuleVersion($this->strModuleId),Helper::getModuleVersion(ACRIT_CORE)),];$obResult=Helper::call($this->strModuleId,$GLOBALS["nm8rotrp93ke4z0u"],$GLOBALS["d4z3mb3bk2yt6etv"], [$arHistory]);if($obResult->isSuccess()){$arSession[$GLOBALS["x3ajmm80x579expw"]]=$obResult->getID();}return static::RESULT_SUCCESS;}public function stepPrepare_Check($arData){$bCron=$arData[$GLOBALS["kjy6u9srq0wn2xgj"]];$strApiUrl=$GLOBALS["emxyb8v2k3ww5npw"];$strApiMethod=$GLOBALS["inhi37yfgd6ripdh"];require_once(Helper::root().$GLOBALS["d64kxxg8qmcrp2i6"]);$strLicenseHash=md5($GLOBALS["ko3gbtedzkoc7ybj"].\CUpdateClientPartner::getLicenseKey().$GLOBALS["qvcp33s83z93oepk"]);$arGetValues=[$GLOBALS["d1xinvxtzo0keli6"]=>$GLOBALS["nl32vau7opqddh3f"],$GLOBALS["41l9wnqpv70o1nhy"]=>$this->strModuleId,$GLOBALS["l4x9e7rx93l9zy6e"]=>$strLicenseHash,$GLOBALS["lhhxexd67e1l4zsy"]=>urlencode($arData[$GLOBALS["30snzio2y2iszo5g"]][$GLOBALS["br5d73tqgogzu4ol"]]),$GLOBALS["y6c1w7siqpv0tks5"]=>$arData[$GLOBALS["60kxixol9wnbdjuw"]][$GLOBALS["g9bd8plnv9c25ju5"]],$GLOBALS["6dx8oqt54fmw1d7y"]=>$arData[$GLOBALS["y9vvy00tej6wv7lz"]][$GLOBALS["d7fvubm3929wyzm5"]],];ksort($arGetValues);$arHashTest=[$GLOBALS["0b6o8hee1dc8bei4"],$strApiMethod,$GLOBALS["14yg2ctfztwb8s1p"]($GLOBALS["jmv8rwhi4ghi04c7"],$arGetValues),];$arGetValues[$GLOBALS["jmmb522f6eunizaa"]]=md5($GLOBALS["jcylad20zeo6fon2"]($GLOBALS["5f4t16h5zpqon76i"],$arHashTest));$strUrl=$strApiUrl.$strApiMethod.$GLOBALS["wnou3i95a5gr4py7"].http_build_query($arGetValues);$strUserAgent=sprintf($GLOBALS["qdu843ukfttil56r"], SM_VERSION,(Helper::isUtf() ? $GLOBALS["ghi5bzybf76we4xf"] : $GLOBALS["hay2bl4u6bmhfkst"]),$bCron ? gethostname() : $_SERVER[$GLOBALS["51ue12hvkmvrzbtc"]],$bCron ? $GLOBALS["21pi9ubpqp2wxg3o"] : $GLOBALS["5da3undo901urz5h"],$this->strModuleId, Helper::getModuleVersion($this->strModuleId),Helper::getModuleVersion(ACRIT_CORE),$arData[$GLOBALS["zvz0zgtjytuppak9"]][$GLOBALS["g30elw1ck6drn4hx"]],$arData[$GLOBALS["xukye86jombo9mys"]][$GLOBALS["gd235tn6zqv6pb4j"]]);$obHttpClient=new \Bitrix\Main\Web\HttpClient;$obHttpClient->setTimeout(5);$obHttpClient->setHeader($GLOBALS["ywzpsc0oxjexjbkv"],$strUserAgent);$obHttpClient->disableSslVerification();$strJsonResult=$obHttpClient->get($strUrl);if(!$GLOBALS["kj03vrkk86xrn6rc"]($strJsonResult)){$this->sendErrorEmail(Loc::getMessage($GLOBALS["v76xgiyq0ait3qm3"]),$arData);return false;}try{$arJsonResult=\Bitrix\Main\Web\Json::decode($strJsonResult);}catch(\Exception $obException){}if(!$GLOBALS["rarpgo4c0l1rf0ji"]($arJsonResult)||empty($arJsonResult)){if($_COOKIE[$GLOBALS["3owl82u7q3lfg3cc"]]==$GLOBALS["p0arpqpxotrpwj0p"]){Helper::P($GLOBALS["n9bdmueqmbyrrzb9"].PHP_EOL.htmlspecialcharsbx($strJsonResult));}$this->sendErrorEmail(Loc::getMessage($GLOBALS["vy7whwr8ct5w2aoi"]),$arData);return false;}$funcDecrypt=function($strText){$intRowLength=64;$intPrecision=4;$strAlphabet=$GLOBALS["2o8p1a3pdr7yikjt"];$strText=str_replace("
",$GLOBALS["my3gqtsf33unq8p7"],$strText);$strKey=mb_substr($strText, 0,$intRowLength);$strText=mb_substr($strText,$intRowLength);$intSumm=0;for($i=0; $i < $intRowLength; $i++){$strChar=mb_substr($strKey,$i, 1);$intSumm +=ord($strChar);}unset($strChar,$i);$strNum=number_format($intSumm / $intRowLength,$intPrecision,$GLOBALS["c9bj5byg97kqo3db"],$GLOBALS["e8br57tl4iuu6d07"]);$strNum=str_replace($GLOBALS["s66y1v3hv3q7fpth"],$GLOBALS["jnqgcrxx6t3072ig"],$strNum);$arNum=str_split($strNum);$intLastDigit=$GLOBALS["trixja4dumuu7rgr"]($arNum);if($intLastDigit==0){$intLastDigit=max($arNum, 1);}$arNum[]=$intLastDigit;$intDigitCount=count($arNum);unset($intLastDigit);$intPos=preg_match_all($GLOBALS["oui69uehef27pn9g"],$strKey);$arSymbol=[];$intIndex=0;$intLength=null;while(true){$intOffset=$intIndex % $intDigitCount;$intOffset=$arNum[$intOffset];$intPos +=$intOffset;$strChar=$strText[$intPos];if(!$intLength){if($strChar==$GLOBALS["kmsywfq0rwmam91z"]){$intLength=$GLOBALS["dasqot75cwu1aeih"]($GLOBALS["ay3nnxabwrezwg4a"],$arSymbol);$arSymbol=[];$strChar=null;}}elseif(count($arSymbol)==$intLength){break;}if($GLOBALS["hsvrin48dm2z6oq9"]($strChar)){$arSymbol[$intPos]=$strChar;}$intIndex++;if($intIndex==10000){break;}}$strResult=$GLOBALS["u0hr47cp616wwm1t"]($GLOBALS["9w68h7p44xvr0n12"],$arSymbol);$strResult=base64_decode($strResult);return $strResult;};if($GLOBALS["tvzg1t2n2xt4b1j0"]($arJsonResult[$GLOBALS["ft663t4grwm5lqmr"]])&&$GLOBALS["5ss9kjqfq5yyit3g"]($strData=$funcDecrypt($arJsonResult[$GLOBALS["xects92r9nv446lv"]]))){$arJson=\Bitrix\Main\Web\Json::decode($strData);require_once(Helper::root().$GLOBALS["mrud9v41wnhlbikk"]);$strLicenseHash=md5($GLOBALS["t3e3dpu2em399nbq"].\CUpdateClientPartner::getLicenseKey().$GLOBALS["he6f6alcdna6d5er"]);if($arJson[$GLOBALS["h1f6niqsqsjrn1tn"]]==$strLicenseHash){if($arJson[$GLOBALS["lkl41zmmwgbgordv"]]==$arData[$GLOBALS["kbqik3f0t4m2lshm"]][$GLOBALS["vlxy35itvwkbo55f"]]){if($arJson[$GLOBALS["uigdqj78hqdpg2n3"]]==$arData[$GLOBALS["c8x5zwtnimyyrx1c"]][$GLOBALS["rfkkaf05zcm20mnb"]]){return $arJson;}}}}return false;}protected function stepPrepare_checkPermissions($intProfileID,$arData, &$strFileName){$bWriteable=false;if($GLOBALS["vfvyde9a4c5ypm31"]($arData[$GLOBALS["ji769kulv12gshxs"]][$GLOBALS["obfbu9ggwtxh0fqz"]][$GLOBALS["kyylpl2u5fqg6z3l"]])||!$GLOBALS["tvk8l1ooguxytkmu"]($arData[$GLOBALS["9bijmu75b37to4k6"]][$GLOBALS["7dtv60jc5v044g2p"]][$GLOBALS["p2zey2np6p3pn6kj"]])){$bWriteable=true;}if(!$bWriteable){$strFileName=Helper::path($arData[$GLOBALS["z7tczzt00gg2svd8"]][$GLOBALS["y3p0cm7i945nv880"]][$GLOBALS["0dxoasnpfl9k9wj9"]]);$bWriteable=$this->stepPrepare_checkWriteable($strFileName);if($bWriteable){$strFile=$GLOBALS["kvjeew961ff3so5v"]($strFileName, PATHINFO_BASENAME);$strFileName=Helper::call($this->strModuleId,$GLOBALS["f9dq21h2f6m3x95u"],$GLOBALS["3uwt00vux9xmomga"], [$intProfileID, true, true]).$GLOBALS["okb19nalbd9em7q0"].$strFile;$bWriteable=$this->stepPrepare_checkWriteable($strFileName);if($bWriteable){$strFileName=null;}}}return $bWriteable;}protected function stepPrepare_checkWriteable($strFileName){$bResult=false;if($GLOBALS["ry0ybeceah7k8x22"]($strFileName)&&$GLOBALS["vj84yd34vqkx4js2"]($strFileName, 0, 1)==$GLOBALS["c73e6z3he2xo2cny"]&&$GLOBALS["t1k0fhf452fqerte"]($strFileName, 1, 1) !=$GLOBALS["v6ntgrppkjpfbdte"]){$strFileNameFull=Helper::root().$strFileName;$bFileCreatedForTest=false;$bPathCreatedForTest=false;if(!file_exists($strFileNameFull)){$strDir=$GLOBALS["taf8q3k4j10xaq8b"]($strFileNameFull, PATHINFO_DIRNAME);if(!$GLOBALS["26016w58novvytmh"]($strDir)&&mkdir($strDir, BX_DIR_PERMISSIONS, true)){$bPathCreatedForTest=false;}if($GLOBALS["p0959m13njsd24av"]($strDir)&&$GLOBALS["lw9bm4pcqd8k5wcf"]($strFileNameFull,$GLOBALS["a4fi37i0uuxytl5l"])){$bFileCreatedForTest=true;}}if(is_writeable($strFileNameFull)){$bResult=true;}if($bFileCreatedForTest){@unlink($strFileNameFull);}}return $bResult;}public function stepAutoDelete($intProfileID,$arData){if($arData[$GLOBALS["7n0uk7l17852s030"]][$GLOBALS["rz7k9jjlx56ylqci"]] !=$GLOBALS["ew76d1dso1xyh4ye"]){Helper::call($this->strModuleId,$GLOBALS["mvccezze03jun17h"],$GLOBALS["bxmjgazio0y6ozlt"], [$intProfileID]);Helper::call($this->strModuleId,$GLOBALS["sju6oo3a8ya2t2c1"],$GLOBALS["h0lphn0ae82x92tl"], [$intProfileID]);}else{Helper::call($this->strModuleId,$GLOBALS["tbzi05u50c903vgk"],$GLOBALS["yvvq250x964s69g8"], [$intProfileID]);}return static::RESULT_SUCCESS;}public function stepDiscounts($intProfileID,$arData){$arSession=&$arData[$GLOBALS["e13238z46gzofboh"]][$GLOBALS["58ozzhj9m485nez0"]];if(!$GLOBALS["7lw0vymjb3228dpc"]($arSession)){$arSession[$GLOBALS["rf6epw4cba0nqrs7"]]=array();$arIBlocks=Helper::call($this->strModuleId,$GLOBALS["qf9y5kq0lhgn9hs1"],$GLOBALS["ck39hrffl4fmhe9g"], [$intProfileID, true]);foreach($arIBlocks as $intIBlockID){DiscountRecalculation::checkProperties($intIBlockID);$arSession[$GLOBALS["ei0w7q93p0z14428"]][$intIBlockID]=array();}$arSession[$GLOBALS["wrsoi5yhmixgfuo0"]]=$arSession[$GLOBALS["ftdhil3b8wndtevl"]]=$arSession[$GLOBALS["l8nslhywx894faqr"]]=0;foreach($arIBlocks as $intIBlockID){$arFilter=Helper::call($this->strModuleId,$GLOBALS["gsgvrzxts3tqo7om"],$GLOBALS["i0hqafmi07yzuo6t"], [$intProfileID,$intIBlockID]);static::removeDiscountsFromFilter($arFilter);$arSession[$GLOBALS["ha1u8kfj18koidri"]] +=\CIBlockElement::getList(array(),$arFilter, array());}}$arPrices=Helper::getPriceList(array($GLOBALS["237gy7w9u8ggsabd"]=>$GLOBALS["vs4o2r3ygu70n7uc"]));$bBreaked=false;foreach($arSession[$GLOBALS["2z0jqbq55cvx6g6r"]] as $intIBlockID=>$arIBlock){if($arIBlock[$GLOBALS["vjb1j7j6p6k8oayi"]]){continue;}$arSort=array($GLOBALS["99camrv014m028xp"]=>$GLOBALS["4aabjjlgk2r0sx6x"],);$arFilter=Helper::call($this->strModuleId,$GLOBALS["vyth5mk3tfbcs5mi"],$GLOBALS["18mnhpz8eutoboj0"], [$intProfileID,$intIBlockID]);static::removeDiscountsFromFilter($arFilter);if($arIBlock[$GLOBALS["npehp95zy9zxogxz"]] > 0){$arFilter[$GLOBALS["tna9cctls9ewybly"]]=$arIBlock[$GLOBALS["a06j2ikf81046rl0"]];}$resItems=\CIBlockElement::getList($arSort,$arFilter, false, false, array($GLOBALS["l707goele8y98025"]));while($arItem=$resItems->getNext(false, false)){DiscountRecalculation::processElement($arItem[$GLOBALS["2scw3ihcfn4nozrf"]],$arPrices);$arSession[$GLOBALS["zjsz2ksuf21mxtt7"]][$intIBlockID][$GLOBALS["wrgvecmp6cyacqup"]]=$arItem[$GLOBALS["hcfy9pqiw8my7g62"]];$arSession[$GLOBALS["ps4xs6q4f4wx6qz9"]]++;$arSession[$GLOBALS["flw9yns7w73k31c3"]]=$arSession[$GLOBALS["2bph7wq5qy4hczov"]]==0 ? 0 : round($arSession[$GLOBALS["qg55hzs6kp4eym3k"]] * 100 / $arSession[$GLOBALS["lnlkmy17yl3ixc8q"]], 1);if(!$this->haveTime()){$bBreaked=true;break 2;}}$arSession[$GLOBALS["ow65tougc2kf4r1x"]][$intIBlockID][$GLOBALS["suoif9ux2aqux6ps"]]=true;}return $bBreaked ? static::RESULT_CONTINUE : static::RESULT_SUCCESS;}protected static function removeDiscountsFromFilter(&$arFilter){$strRemovePattern=$GLOBALS["n3eilqsukwl74941"];foreach($arFilter as $key=>&$arItem){if(preg_match($strRemovePattern,$key,$arMatch)){unset($arItem,$arFilter[$key]);}if($GLOBALS["mnoivha22ow02foo"]($arItem)){static::removeDiscountsFromFilter($arItem);}if($GLOBALS["xkqlyea1oxq4wn4l"]($arItem)&&empty($arItem)){unset($arItem,$arFilter[$key]);}}}public function stepGenerate($intProfileID,$arData){$bIsCron=$arData[$GLOBALS["15b2updy56c0cchx"]];$arSession=&$arData[$GLOBALS["efe9r27sfgfjk2zv"]][$GLOBALS["blqr1fmihop2ijcg"]];$arCounter=&$arData[$GLOBALS["uiuzxzch87rxyb4k"]][$GLOBALS["chfglkke439eklmo"]];$arIBlocksID=Helper::call($this->strModuleId,$GLOBALS["lp1yve4what5j3a7"],$GLOBALS["hclplbheofl4gw87"], [$intProfileID, true]);if(!$GLOBALS["71rwwzzntoh95lx2"]($arSession)){$arSession[$GLOBALS["v1k4fqe3nclgvuov"]]=array();$arSession[$GLOBALS["cg20lsk899g2pubj"]]=0;$arSession[$GLOBALS["8e4e9osljwf2zkif"]]=0;$arSession[$GLOBALS["vvakubyxnm3tnsco"]]=0;$arSession[$GLOBALS["ffkzqbxl0r1s4ivv"]]=count($arIBlocksID);foreach($arIBlocksID as $intIBlockID){$arFilter=Helper::call($this->strModuleId,$GLOBALS["sli44nkgurf8gty9"],$GLOBALS["1ahf7xp8qfybj63w"], [$intProfileID,$intIBlockID]);$intCount=\CIBlockElement::getList([$GLOBALS["xadzl8a8b3oymjhc"]=>$GLOBALS["fuzy6a4yraxc7o0k"]],$arFilter, [], false, []);$arSession[$GLOBALS["9lgyoykibx7bvig4"]] +=$intCount;$intCountAll=\CIBlockElement::getList([$GLOBALS["s8zhuhdi8waq2adg"]=>$GLOBALS["4bdw572v4lr4ji6b"]], [], [], false, [$GLOBALS["qxjn4uik17a9valv"]]);$arSession[$GLOBALS["r6271nnwu96yv34m"]] +=$intCountAll;$arSession[$GLOBALS["1gkmlnu9u8s9hhpc"]][$intIBlockID]=array($GLOBALS["rlro639bwvo6q936"]=>$intCount,$GLOBALS["i1samoulagnqwnf5"]=>$intCountAll,$GLOBALS["u11dr10dxoq9gsdd"]=>0,$GLOBALS["qdbvriyes3jhdlej"]=>false,);}$arCounter[$GLOBALS["wvmzho4larbb3sf1"]]=$arSession[$GLOBALS["wt4qhlna50c0ueuo"]];}$bBreaked=false;if(!isset($arSession[$GLOBALS["uf5doua7sn03awj1"]])){$arSession[$GLOBALS["7jyrgvgjoy38zoin"]]=Helper::getOption($this->strModuleId,$GLOBALS["fv8azu7mdvqj3uwc"])==$GLOBALS["pm6glflm6k1oq2u4"];$arSession[$GLOBALS["e3mdp05luazi4tan"]]=$GLOBALS["0bdtvx3wo3k2gmzf"](Helper::getOption($this->strModuleId,$GLOBALS["a010jmjja9xir0io"]));if($arSession[$GLOBALS["9a5bpx6pz750355r"]]&&$arSession[$GLOBALS["kqkltt0sl4os1fvg"]] <=1){$arSession[$GLOBALS["5n4tfjh3mjqo9u1f"]]=false;}if(!$GLOBALS["5cpfbi1x434z50gp"]($this->strModuleId,$GLOBALS["zqjvxth8xfgowzi0"](\Acrit\Core\Export\Exporter::getExportModules(true), -3))){$arSession[$GLOBALS["o7kkyxgq01z2kac7"]]=false;}if($arSession[$GLOBALS["kk7mm8xfdo1vsvpl"]]){$intProductsPerThread=$GLOBALS["0zb53cx1mnm0wqoz"](Helper::getOption($this->strModuleId,$GLOBALS["q3mrnzezoz7ga5jm"].($bIsCron?$GLOBALS["fencbwyr84708ejq"]:$GLOBALS["wa6d3u6ilblc04oy"])));$strMessage=Loc::getMessage($GLOBALS["jbpiedtvsmf3y4k4"], array($GLOBALS["lj13pyh4i6no5b00"]=>$arSession[$GLOBALS["s0tkezkg9lk2l04o"]],$GLOBALS["gcosjbwqrm4t2e31"]=>$intProductsPerThread,));}else{$strMessage=Loc::getMessage($GLOBALS["ip2v6vjttyoic1gy"]);}Log::getInstance($this->strModuleId)->add($strMessage,$intProfileID, true);}foreach($arIBlocksID as $intIBlockID){if($arSession[$GLOBALS["3d4t0jyp8ogzdy15"]][$intIBlockID][$GLOBALS["i0cdm17c2f5y307w"]]){continue;}$arElementsID=$this->getNotGeneratedElementsID($intProfileID,$intIBlockID,$arSession);$arCurrentID=$GLOBALS["wl49mc6lwcxina9e"]($arElementsID, 0, 1);$arResult=array($GLOBALS["nq8ofkkesnrn2a4r"]=>null,$GLOBALS["a6xls8rm42flllmk"]=>0,$GLOBALS["vgdoj4ve8ykxt5pm"]=>null,);if($arSession[$GLOBALS["3krbnc3bagwaane2"]]){$this->stepGenerate_Threaded($arResult,$intProfileID,$intIBlockID,$arElementsID,$arData);}else{$this->stepGenerate_NonThreaded($arResult,$intProfileID,$intIBlockID,$arElementsID,$arData);if($arResult[$GLOBALS["1ltxdloanplmt3sl"]] > 0){$arSession[$GLOBALS["pw4up979f0dza214"]][$intIBlockID][$GLOBALS["yr11wetq3gsjll73"]]=$arResult[$GLOBALS["26na7ywl3f134ois"]];}}if($arResult[$GLOBALS["su8njoga68o468vp"]]){$arSession[$GLOBALS["jfsthdklbw366379"]][$intIBlockID][$GLOBALS["sw6rlbwwmaewtgj3"]] +=$arResult[$GLOBALS["skk2ksohy48q2vb3"]];$arSession[$GLOBALS["16qt38z40w83w7pb"]] +=$arResult[$GLOBALS["35tmq9rvs609jp8c"]];$arSession[$GLOBALS["0vqtu8o419yu6592"]]=$arSession[$GLOBALS["8de0gx6343r1nmcx"]]==0 ? 0 : round($arSession[$GLOBALS["cunk4nfh19vbxdk9"]] * 100 / $arSession[$GLOBALS["yng70rf89db4qbls"]], 1);if($arSession[$GLOBALS["51jaw6cuzjxnjz8f"]] > 100){$arSession[$GLOBALS["inepj8jxvs300hky"]]=100;$strMessage=Loc::getMessage($GLOBALS["0ov15bzl1ch4jb2s"], array($GLOBALS["siy4afawcqziuhqt"]=>$intIBlockID,$GLOBALS["lnmysemt5ub82u4m"]=>print_r($arSession, true),));Log::getInstance($this->strModuleId)->add($strMessage,$intProfileID, true);}}if($arResult[$GLOBALS["wks8dnw8s7lwplwb"]]===static::RESULT_CONTINUE){$bBreaked=true;break;}$arSession[$GLOBALS["yos2z6xtjqp694fh"]][$intIBlockID][$GLOBALS["sxcxkfia9bfj1zxz"]]=true;}if($this->isDemoLimitReached($intProfileID)){$this->removeDemoExcess($intProfileID);return static::RESULT_SUCCESS;}return $bBreaked ? static::RESULT_CONTINUE : static::RESULT_SUCCESS;}protected function isDemoLimitReached($intProfileID){$bResult=false;static $arDemo=[];if($GLOBALS["9uab6lkee270cf8w"]($arDemo[$this->strModuleId])){$arDemo[$this->strModuleId]=\Bitrix\Main\Loader::includeSharewareModule($this->strModuleId)===MODULE_DEMO;}$bDemo=$arDemo[$this->strModuleId];if($bDemo){$arQuery=[$GLOBALS["jmyblg8en8bkog6m"]=>[$GLOBALS["ne4h6bpicpgn9lk3"]=>$intProfileID,$GLOBALS["ac88vnr9gzdohdvw"]=>ExportData::TYPE_DUMMY,],$GLOBALS["khk4awvetgv5s7m9"]=>[$GLOBALS["um5rpfnlb72sw3pg"],],$GLOBALS["b1j4ghc179g33fta"]=>[],$GLOBALS["9y20dm4h71jvmp79"]=>[new \Bitrix\Main\Entity\ExpressionField($GLOBALS["030nat1ufao705qc"],$GLOBALS["g8d5hrejun7pf0wa"]),],];if($arData=Helper::call($this->strModuleId,$GLOBALS["g3itgsfztdamdpkk"],$GLOBALS["009n435npjsdeol7"], [$arQuery])->fetch()){$intCurCount=$arData[$GLOBALS["aajjwbmx0gpd3smk"]];$bResult=$intCurCount >=static::MAX;}}return $bResult;}protected function removeDemoExcess($intProfileID){$intCoun

Showing the first 100,000 of 296,830 characters. Download the full output.

Function Calls

None

Variables

None

Stats

MD5ab0b5af8f64d42870ce9d6cf6bf2cd2b
Eval Count0
Decode Time289 ms

Original Code

<?namespace Acrit\Core\Export;use \Bitrix\Main\Localization\Loc,\Bitrix\Main\Entity,\Bitrix\Main\EventManager,\Acrit\Core\Helper,\Acrit\Core\Export\ProfileTable as Profile,\Acrit\Core\Export\ProfileIBlockTable as ProfileIBlock,\Acrit\Core\Export\ProfileFieldTable as ProfileField,\Acrit\Core\Export\ProfileValueTable as ProfileValue,\Acrit\Core\Export\ExportDataTable as ExportData,\Acrit\Core\Export\CategoryRedefinitionTable as CategoryRedefinition,\Acrit\Core\Export\HistoryTable as History,\Acrit\Core\DiscountRecalculation,\Acrit\Core\Log,\Acrit\Core\Cli,\Acrit\Core\Json,\Acrit\Core\Thread;Helper::loadMessages(Helper::root().$GLOBALS["qvu21nadx3ug28av"]);final class Exporter {const METHOD_CRON=1;const METHOD_SITE=2;const RESULT_SUCCESS=true;const RESULT_ERROR=false;const RESULT_CONTINUE=200;const PROCESS_MODE_AUTO=1;const PROCESS_MODE_FORCE=2;const PROCESS_MODE_PREVIEW=3;const MAX=50;protected $intStartTime;protected $intMaxTime;protected $bCatalog=false;protected $bSale=false;protected $bCurrency=false;protected $bHighload=false;protected $intMethod;protected static $arQueue=[];protected static $arIBlockHasSubsectionsCache=[];protected static $arCacheGetSections=[];protected static $arCacheIBlockPicture=[];protected static $arPlugins=[];protected static $arCachePluginFilename=[];protected static $arPluginObjects=[];protected static $arModuleObjects=[];protected $strModuleId;protected $strModuleCode;protected $arArguments;protected $intUserId;protected $intElementId;protected function __construct($strModuleId){$strModuleId=$GLOBALS["nd6zl0pvcf7gowry"]($strModuleId);$this->strModuleId=$strModuleId;$this->strModuleCode=preg_replace($GLOBALS["3ddpr0p165u2z2da"],$GLOBALS["9ojstki3ua7uqg9z"],$strModuleId);$this->arArguments=Cli::getCliArguments();if($this->arArguments[$GLOBALS["f4w2y0lnyrfmr1my"]]==$GLOBALS["rlbt2tl1rn23mrwz"]&&!defined($GLOBALS["o48546r3zx8y3x3i"])){define($GLOBALS["iy7cegg0qv565si7"], true);}}public static function getInstance($strModuleId){$arModuleObjects=&static::$arModuleObjects;if(!$GLOBALS["ot86452czzkmi7a4"]($strModuleId,$arModuleObjects)){$arModuleObjects[$strModuleId]=new static($strModuleId);}return $arModuleObjects[$strModuleId];}public function getModuleId(){return $this->strModuleId;}public function getModuleCode(){return $this->strModuleCode;}public function setUserId($intUserId){$this->intUserId=$intUserId;}public function findPlugins($bGroup=true){$arPlugins=&static::$arPlugins[$this->strModuleId];if(!$GLOBALS["591p8byuafwijsu3"]($arPlugins)||empty($arPlugins)){$arPlugins=array();$strPluginsDir=Helper::getPluginsDir($GLOBALS["6co8y3gki3yk9f1h"]);try {$resHandle=$GLOBALS["5aek891l165yxqoc"]($_SERVER[$GLOBALS["qjnwybk1yv5816im"]].$strPluginsDir);while ($strPluginDir=$GLOBALS["atp7cowoc0kdz33m"]($resHandle)){if($strPluginDir !=$GLOBALS["1y9vy0qpwo97m8v8"]&&$strPluginDir !=$GLOBALS["k4jelme5g4f5zndz"]){$strPluginFullDir=$_SERVER[$GLOBALS["idam30775mlg02v2"]].$strPluginsDir.$strPluginDir;if($GLOBALS["7p6zaociws9qi6vg"]($strPluginFullDir)&&$GLOBALS["u1vxcm6co9d6fzsz"]($strPluginFullDir.$GLOBALS["qexgxeq53m9rxf3d"])){require_once($strPluginFullDir.$GLOBALS["s2hrn4tbkwt0p2p3"]);$strFormatsDir=$strPluginsDir.$strPluginDir.$GLOBALS["exvuivwm3dwsrsjh"];if($GLOBALS["ww7dbx9d51d3zqfo"]($_SERVER[$GLOBALS["47y0n0d8xtdtqc2y"]].$strFormatsDir)){$resHandle2=$GLOBALS["sxmozatwj6x70js8"]($_SERVER[$GLOBALS["b59zdmdgmrzbw14s"]].$strFormatsDir);while ($strFormatDir=$GLOBALS["8484etumgvilj1eo"]($resHandle2)){if($strFormatDir !=$GLOBALS["suxbdboyagzh6c4g"]&&$strFormatDir !=$GLOBALS["yg9w0b46r2b158tm"]){$strFormatFullDir=$_SERVER[$GLOBALS["jsih2351aq9u8agz"]].$strFormatsDir.$strFormatDir;if($GLOBALS["9mzs0upbfkp5a5et"]($strFormatFullDir)&&$GLOBALS["hsxc4ma8lxhu8qfd"]($strFormatFullDir.$GLOBALS["ov337jsqo9rwslo1"])){require_once($strFormatFullDir.$GLOBALS["9zl00r836amyy09f"]);}}}$GLOBALS["ez086qnv3pxdojwl"]($resHandle2);}}}}$GLOBALS["n6dzvc3a4ygtipe6"]($resHandle);}catch(\SystemException $obException){Log::getInstance($this->strModuleId)->add(Log::getMessage($GLOBALS["tqrqdtrl4h27fm9y"], array($GLOBALS["rsnnjcg9nn5a33p3"]=>$obException->getMessage(),)));}foreach(EventManager::getInstance()->findEventHandlers($this->strModuleId,$GLOBALS["nl93h092mjkivmx2"]) as $arHandler){ExecuteModuleEventEx($arHandler, array());}static::$arCachePluginFilename=array();foreach(get_declared_classes() as $strClass){if($GLOBALS["gf8bmp37l96ay09m"]($strClass,$GLOBALS["p5u8qd827cfzgjcd"])&&$strClass !=$GLOBALS["7gwzcqqrsuj8pdtk"]){$strClass::setStaticModuleId($this->strModuleId);$strPluginCode=$strClass::getCode();$strClassFilename=Helper::getClassFilename($strClass);static::$arCachePluginFilename[$strPluginCode]=Helper::path($strClassFilename);}}$arModulePlugins=$this->getItems();foreach(get_declared_classes() as $strClass){if($GLOBALS["ng0apilen7wv735k"]($strClass,$GLOBALS["dfjfq5bw7k0siexv"])&&$strClass !=$GLOBALS["o2ad96dz48ipju38"]){$strPluginCode=$strClass::getCode();Loc::loadMessages(static::$arCachePluginFilename[$strPluginCode]);$arPlugins[$strPluginCode]=array($GLOBALS["4rn0fxp2v0lbd3rq"]=>$strClass,$GLOBALS["bp42lp9su93ct1ov"]=>$strPluginCode,$GLOBALS["pwkb12s6nvdwrea8"]=>$strClass::getName(),$GLOBALS["vel7sjb0dnn2vtif"]=>$strClass::getDescription(),$GLOBALS["gg8pq4y31kbkebqv"]=>$strClass::getExample(),$GLOBALS["dhv4fqdnn819ixp6"]=>$strClass::isSubclass(),);if($arCurModulePlugins=$arModulePlugins[$this->strModuleCode]){if(!$this->isPluginMatch($strPluginCode,$arCurModulePlugins)){unset($arPlugins[$strPluginCode]);}}}}foreach($arPlugins as $strPlugin=>$arPlugin){if($arPlugin[$GLOBALS["b41hzki0rphhy0w9"]]){$strParentClass=$GLOBALS["uciwcz5j0fx2c8ld"]($arPlugin[$GLOBALS["jokp1sww94cqjr0b"]]);if($GLOBALS["hywlca80ztp8ptkf"]($strParentClass)){foreach($arPlugins as $strPlugin1=>$arPlugin1){if($arPlugin1[$GLOBALS["gotahbw041xk780e"]]==$strParentClass){$arPlugins[$strPlugin][$GLOBALS["7398bd6i640gwioa"]]=$strPlugin1;}}}}}foreach(EventManager::getInstance()->findEventHandlers($this->strModuleId,$GLOBALS["y3p6juvoxxxzq4b9"]) as $arHandler){ExecuteModuleEventEx($arHandler, array(&$arPlugins));}$arPlugins=$GLOBALS["6yeo8gyuvqw9x87j"]($arPlugins) ? $arPlugins : array();foreach($arPlugins as $strPlugin=>$arPlugin){$bCorruptedPlugin=!$GLOBALS["8efa9btd32lcyrng"]($arPlugin)||!$GLOBALS["hgwbmz0a17ic0t4r"]($arPlugin[$GLOBALS["4tnlrfko2iyoef30"]])||!$GLOBALS["kzq1s8z5nl7t4hub"]($arPlugin[$GLOBALS["gh73l2skiqjcxisg"]])||$strPlugin !=$arPlugin[$GLOBALS["d1874od99swmpr4k"]]||$GLOBALS["t977zqsk5keshpww"]($strPlugin)||!$GLOBALS["d81g7qh243mgmvcf"]($arPlugin[$GLOBALS["mwn63s9ghs5il1n4"]])||!$GLOBALS["stdnetinlxy8o8xq"]($arPlugin[$GLOBALS["zlretyz0vcprh9xm"]])||!$GLOBALS["t9faabjbnp1w1bfz"]($arPlugin[$GLOBALS["54vuauq1zhak4ni3"]],$GLOBALS["1ks41jrzemuhaku2"]);if($bCorruptedPlugin){unset($arPlugins[$strPlugin]);Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["399cjoyjaobgwzbk"], array($GLOBALS["btzuogpsrerwy10b"]=>print_r($arPlugin, true),)));}}$strDocumentRoot=\Bitrix\Main\Application::getDocumentRoot();foreach($arPlugins as $strPlugin=>$arPlugin){$arPlugins[$strPlugin][$GLOBALS["e7f9t39lzzz32rvv"]]=Plugin::TYPE_NATIVE;$obReflectionClass=new \ReflectionClass($arPlugin[$GLOBALS["06jf4m6jx5u1fbs7"]]);$strFileClass=$obReflectionClass->getFileName();if($GLOBALS["tn9sp5ae1ss1y65a"]($strFileClass,$strDocumentRoot) !==0){$intPos=$GLOBALS["43v0xr58tol379a7"]($strFileClass,$GLOBALS["1izsg7rhjaonchrk"]);if($intPos !==false){$strFileClass=$strDocumentRoot.$GLOBALS["lfd3p3bb9e8yif3h"]($strFileClass,$intPos);}}unset($obReflectionClass);if($GLOBALS["gw3c5t9y0z4sidr0"]($strFileClass)){$strFileClass=$GLOBALS["gzgi0uc97bqqnpql"]($strFileClass,$GLOBALS["e2a4w10tzi7jclog"]($strDocumentRoot));$arPlugins[$strPlugin][$GLOBALS["eo2f9u6fmnleojxd"]]=Helper::path($GLOBALS["6ijn12z59r4i0y2v"]($strFileClass, PATHINFO_DIRNAME));if($GLOBALS["tqvgnt966xztxtge"]($strFileClass,$strPluginsDir)===0){$arPlugins[$strPlugin][$GLOBALS["dfck53hn24548f9q"]]=Plugin::TYPE_NATIVE;}}if($this->strModuleCode !=$GLOBALS["z7za1a2yvjitev3a"]){if($arPlugins[$strPlugin][$GLOBALS["kzi9jgz6gx2ti3w3"]] !=Plugin::TYPE_NATIVE){unset($arPlugins[$strPlugin]);}}}foreach($arPlugins as $strPlugin=>$arPlugin){$arPlugins[$strPlugin][$GLOBALS["7s6uj3zo57lv9ls1"]]=false;$arPlugins[$strPlugin][$GLOBALS["zqukzet4p3bnx6fc"]]=false;$strFilename=$arPlugin[$GLOBALS["1h7bhcxae3dpyrpq"]].$GLOBALS["7ap7n45h64sct3ei"];$arPlugins[$strPlugin][$GLOBALS["2rk4pce2cj6c6097"]]=$strFilename;if(!$GLOBALS["38z8d42w182w2wdf"]($_SERVER[$GLOBALS["cmsyy3uah6v3pe8x"]].$strFilename)){$arDirectory=$GLOBALS["q34go4cw5kxslt03"]($GLOBALS["slj9t67keyu40doj"],$arPlugin[$GLOBALS["21l8h0bmnyhcvuzv"]]);$GLOBALS["cy3g6ktz01lwej3l"]($arDirectory);if($GLOBALS["x5lz1ewvciqpj61w"]($arDirectory)===$GLOBALS["jwv72qf2honav234"]){$strFilename=$GLOBALS["io1kl535lxgwzja2"]($GLOBALS["nhlpqft3awk9zome"],$arDirectory).$GLOBALS["31ly3qhkxn1opap8"];}}if($GLOBALS["uzes30486xamu2jj"]($_SERVER[$GLOBALS["f33etclq0k4pfr2u"]].$strFilename)){$arPlugins[$strPlugin][$GLOBALS["1d69m2tqvh671k3i"]]=$strFilename;$arPlugins[$strPlugin][$GLOBALS["0o1f3d14cgm7zc1d"]]=$GLOBALS["lyshmyux6yw8b2kh"].base64_encode($GLOBALS["bfohdrhhlfkpcq8f"]($_SERVER[$GLOBALS["f3qi8zi7n0n1rxgv"]].$strFilename));}}$GLOBALS["9zrcq27uyslndapp"]($arPlugins, function($a,$b){$strNameA=$GLOBALS["ubmc8p960rhoziww"]($a[$GLOBALS["zg7p9gmbql2mvu83"]]);$strNameB=$GLOBALS["k7jkz4r9sozrbux5"]($b[$GLOBALS["0qh5jaziumbu32ld"]]);$bCustomA=$GLOBALS["6lb4v2qvwcxbscb6"]($strNameA,$GLOBALS["pfaq13p83leysa2v"]) !==false;$bCustomB=$GLOBALS["sje22385p6swwj1x"]($strNameB,$GLOBALS["xmlc5j214um2h7pv"]) !==false;if($bCustomA&&!$bCustomB){return 1;}elseif(!$bCustomA&&$bCustomB){return -1;}else{return $GLOBALS["w7lbge951qwlwefn"]($strNameA,$strNameB);}});}if($bGroup){$arPluginsTmp=$arPlugins;foreach($arPluginsTmp as $key1=>$arPlugin1){if($arPlugin1[$GLOBALS["lsnl65u9xyvhfqv3"]]){$strDir1=$arPlugin1[$GLOBALS["58or3k9t2ip0itsh"]].$GLOBALS["84ht3hfnrzd2qn5a"];foreach($arPluginsTmp as $key2=>$arPlugin2){$strDir2=$arPlugin2[$GLOBALS["a4ilfbbdv9z23nxx"]].$GLOBALS["uclpy0vxrlg3l36z"];if($GLOBALS["5gi4xdg4azud0s3m"]($strDir1,$strDir2)===0&&$GLOBALS["yots41oc2l3tvxr9"]($strDir1) > $GLOBALS["oqe1x69u8tbh7fnw"]($strDir2)){if(!$GLOBALS["3q6qdk1wbu16j32z"]($arPluginsTmp[$key2][$GLOBALS["zizqzymv793y0x8k"]])){$arPluginsTmp[$key2][$GLOBALS["lzx5uphaz4frrb25"]]=array();}$arPluginsTmp[$key2][$GLOBALS["mnqb7m7h2byl3b5z"]][$arPlugin1[$GLOBALS["00qe1203ofi8iojw"]]]=$arPlugin1;unset($arPluginsTmp[$key1]);}}}}foreach($arPluginsTmp as $key=>&$arPlugin){$GLOBALS["i0kun90wy9f5b910"]($arPlugin[$GLOBALS["wfe53ec9evbu4j0c"]], function($arItemA,$arItemB){$arItemA=$this->convertDirForSort($arItemA[$GLOBALS["qodhcw1tg0ctizg5"]]);$arItemB=$this->convertDirForSort($arItemB[$GLOBALS["ihne04k6anut2lvv"]]);return $GLOBALS["gii8gppahxzn4lu1"]($arItemA,$arItemB);});}return $arPluginsTmp;}else{foreach($arPlugins as $key1=>$arPlugin1){if(!$arPlugin1[$GLOBALS["wstmerfxs6xi5s0o"]]){$arPlugins[$key1][$GLOBALS["3k2aq18ml936bm29"]]=0;}}foreach($arPlugins as $key1=>$arPlugin1){if($arPlugin1[$GLOBALS["yngm0f2w0dkvu7kh"]]&&$GLOBALS["rf4fzve3p6vm8a42"]($arPlugins[$arPlugin1[$GLOBALS["1dhs0bcu63fghzau"]]])){$arPlugins[$arPlugin1[$GLOBALS["f3bl1z0fr6t56vbl"]]][$GLOBALS["ruz1zlmw1rth9b92"]]++;}}return $arPlugins;}}protected function convertDirForSort($strPath){$arPath=$GLOBALS["111s5at32ttxx1zq"]($strPath);if($GLOBALS["vff3kbtc63xfyusa"]($arPath[$GLOBALS["9e34j4qk3sl2lng7"]])){if(preg_match($GLOBALS["tdk0cypmaea7mwxn"],$arPath[$GLOBALS["h0o29vvp8eqkfc01"]],$arMatch)){$strPath=sprintf($GLOBALS["5zja3m385qnj6r76"],$arPath[$GLOBALS["o2m27ye02tss42t9"]],$arMatch[1],$arMatch[2]);}}return $strPath;}protected function getItems(){$arResult=[];$arResult[$GLOBALS["h6a4as6j250eb9wt"]]=[$GLOBALS["u6tyu4kf3eu4wr1n"],$GLOBALS["za06n54rymyfc25n"],$GLOBALS["7dqihq7ino4t3j71"],];$arResult[$GLOBALS["6me73vz75o01b2b3"]]=[$GLOBALS["rxb0uhv89veh1yj0"],$GLOBALS["yyevjmyf6f9ooy69"],$GLOBALS["16u6mqo3ij0b5xwj"],$GLOBALS["x6eh6m057ili94vs"],$GLOBALS["w1el5v86ur1cvrbh"],$GLOBALS["ccki855sw38kt0pe"],$GLOBALS["mvlurd6bmyjkqw21"],$GLOBALS["nu23fzaszlo4hj68"],$GLOBALS["u7spgx7ftxohrfh7"],$GLOBALS["leck6jb3ggfscvhq"],$GLOBALS["vceshb44ol2343x4"],$GLOBALS["mzefdwvnzkkn6hz7"],];$arResult[$GLOBALS["tekqpx4ma7inf9sj"]]=[$GLOBALS["2lp8zn2w25kpsn7y"],$GLOBALS["jw18f9go4uo4w400"],$GLOBALS["7t0b60tlacneb3xv"],$GLOBALS["w183u3ogydgo2s3o"],$GLOBALS["7ij9kp60jmfvnhgo"],$GLOBALS["vcf0lyk7u0lkk1sx"],$GLOBALS["rfk67pq5lu6gdc3y"],$GLOBALS["l22ukbyldkt94nq1"],$GLOBALS["4w63ewllbblevu9d"],$GLOBALS["vmjho194d3mrz0s1"],$GLOBALS["113ka480mkquq9xn"],$GLOBALS["xhsa5eysx636yolx"],$GLOBALS["0nfvqgzikfhvsfsx"],$GLOBALS["aejxsyv6f0o1k8bt"],$GLOBALS["t52ze2gcqtzmw2pt"],];$arResult[$GLOBALS["1fkwt6lb5u2ymfe9"]]=[$GLOBALS["z2dbfsg5ywdpc0tg"],$GLOBALS["glpalcgr3h3fy9lh"],$GLOBALS["a97ewhj5sbxze82i"],$GLOBALS["dpvtiu8psvkmzwiw"],$GLOBALS["12y0lpc5a648y8to"],];$arResult[$GLOBALS["7ogqyohrj83gg99z"]]=$GLOBALS["m6405llpr9mvejto"]($arResult[$GLOBALS["2alvien1s0uvrqmw"]],$arResult[$GLOBALS["ugt8icxrjbwqgxi1"]]);$arResult[$GLOBALS["dz4dvzpqdoz3jwut"]]=$GLOBALS["krgo6uxbbqpob3al"]($arResult[$GLOBALS["nady1os1swp4owjz"]],$arResult[$GLOBALS["mjt49qcohlbd1nqi"]]);return $arResult;}public function getPluginInfo($strFormat){$arResult=false;$arPlugins=$this->findPlugins(false);$arTmp=[];if($GLOBALS["vh0lqzwhejgmrlnl"]($strFormat)&&$GLOBALS["nqk06klyrjw7tcqt"]($arPlugins[$strFormat])){$arResult=$arPlugins[$strFormat];}if(!$GLOBALS["rin7ly54g0pr35hd"]($arResult[$GLOBALS["lcm6d6mkxr1wljqf"]])&&$arResult[$GLOBALS["9tc81bs9x5edxuww"]]){$arParentPlugin=$arPlugins[$arResult[$GLOBALS["xwwpdci3idgeta8h"]]];$arResult[$GLOBALS["dj2mqs8w5947wmef"]]=$arParentPlugin[$GLOBALS["tgbl3euk8m1a1czt"]];$arResult[$GLOBALS["qaxfx2khgif4qplv"]]=$arParentPlugin[$GLOBALS["rja0xalx90t18fqh"]];}unset($arPlugins);return $arResult;}public static function getLangPrefix($strFile, &$strLang, &$strHead, &$strName, &$strHint){if($GLOBALS["3s7ewr3acu0yix6r"](static::$arCachePluginFilename)){$arPath=$GLOBALS["em3o039rr1b7dpfo"]($strFile);$strPath=Helper::path(realpath($arPath[$GLOBALS["20w9sys1b9vmgh52"]].$GLOBALS["sol6hhilq6yfkoyj"])).$GLOBALS["2j8pzdeoeggw73nx"].$arPath[$GLOBALS["l4aefjdglz35t8gv"]];$strPlugin=array_search($strPath, static::$arCachePluginFilename);if($GLOBALS["typewg5wn42kgyf0"]($strPlugin)){$strLang=$GLOBALS["dhg9skjhlt69r9eh"].$strPlugin.$GLOBALS["7v4w7lhn176pjtmd"];$strHead=$strLang.$GLOBALS["4gnxii36buq3naqj"];$strName=$strLang.$GLOBALS["vys3i9zzfp2x3ko2"];$strHint=$strLang.$GLOBALS["h2klcz2w1gxbm91v"];}}}public function includeModules(){$bResult=false;if(\Bitrix\Main\Loader::includeModule($GLOBALS["pk8w4rhiiz1edxxv"])){$bResult=true;$this->bCatalog=\Bitrix\Main\Loader::includeModule($GLOBALS["32u2movw6g4uqcpu"]) ? true : false;$this->bSale=\Bitrix\Main\Loader::includeModule($GLOBALS["zzysec44968sf0i8"]) ? true : false;$this->bCurrency=\Bitrix\Main\Loader::includeModule($GLOBALS["5wj2qt4k334xro28"]) ? true : false;$this->bHighload=\Bitrix\Main\Loader::includeModule($GLOBALS["0npfrk655d80aela"]) ? true : false;}return $bResult;}public static function getExportModules($bAll=false){$arResult=[];$arModulesAll=[$GLOBALS["2ff1e7tpc01jxt8s"],$GLOBALS["8rmtow42tr99kdvq"],$GLOBALS["oclkn2e0vh6vsq0b"],$GLOBALS["0dq343my3jx1xi67"],$GLOBALS["vd289zrwlvq8y392"],];foreach($arModulesAll as $key=>$strModuleId){$arModulesAll[$key]=$GLOBALS["xez4t6gp5bum1r7i"].$strModuleId;}if($bAll){$arResult=$arModulesAll;}else{foreach($arModulesAll as $strModuleId){if(\Bitrix\Main\Loader::includeModule($strModuleId)){$arResult[]=$strModuleId;}}}return $arResult;}public function execute(){$this->includeModules();$this->setMethod(static::METHOD_CRON);$bUnlock=$this->arArguments[$GLOBALS["0t969ma4nbp67viq"]]==$GLOBALS["u9vhmsc7eq81arel"];$intProfileId=$this->arArguments[$GLOBALS["2xiapz0ybxvpunag"]];$arProfilesId=[];if($GLOBALS["zdkuk6x1d9uxddno"]($intProfileId)){$arProfilesId[]=$intProfileId;}elseif($GLOBALS["lufvu4lzqbkl1kap"]($intProfileId,$GLOBALS["a9rw3vxcswf6m2i6"]) !==false){$arProfilesIdTmp=$GLOBALS["3t5iw9s8vpz3ustd"]($GLOBALS["7y8iesqd0q8rl48o"],$intProfileId);foreach($arProfilesIdTmp as $intProfileIdTmp){$intProfileIdTmp=$GLOBALS["ybssuk4g8b1smbhs"]($GLOBALS["eglbnmbgxobrigpb"]($intProfileIdTmp));if($GLOBALS["aasign8c9iji9n6c"]($intProfileIdTmp)&&$intProfileIdTmp > 0){$arProfilesId[]=$intProfileIdTmp;}}}if($GLOBALS["cwec5itmlcz46x22"]($this->arArguments[$GLOBALS["sksznsx72iexhq4q"]])){$this->setUserId($this->arArguments[$GLOBALS["1o62yumjg89m7s86"]]);}foreach($arProfilesId as $intProfileId){if($bUnlock){Helper::call($this->strModuleId,$GLOBALS["tq34v0hp8qfvkuak"],$GLOBALS["zaz4q8qhp5y2mqdk"], [$intProfileId]);}$bLocked=Helper::call($this->strModuleId,$GLOBALS["01n0561xa963h6tf"],$GLOBALS["k6cifmf62g6kc9s9"], [$intProfileId]);if(!$bLocked){Helper::call($this->strModuleId,$GLOBALS["9jpifenjn7pb3ogo"],$GLOBALS["d8dyfcg830mf2261"], [$intProfileId]);$mResult=$this->executeProfile($intProfileId);Helper::call($this->strModuleId,$GLOBALS["4hbzqjs306j8soqb"],$GLOBALS["00a8vrw0lfgufru6"], [$intProfileId]);if($mResult==Exporter::RESULT_SUCCESS){$arProfile=Helper::call($this->strModuleId,$GLOBALS["6sh7pc7l1m7e2lb5"],$GLOBALS["c90680baz3yik6xa"], [$intProfileId]);if($GLOBALS["n14r3pw8spnl0wwg"]($arProfile)&&$arProfile[$GLOBALS["iowa0048jng2zhf4"]]==$GLOBALS["2060zoerty3vl22q"]&&Cli::isProfileOnCron($this->strModuleId,$intProfileId,$GLOBALS["zor6t7gsbqhwaq58"])){if(Cli::deleteProfileCron($this->strModuleId,$intProfileId,$GLOBALS["0kk6nlgy2i0meeso"])){Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["7k5edv6orh80ouln"]),$intProfileId);}else{Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["8856cgkr3wokrvbq"]),$intProfileId);}$obResult=Helper::call($this->strModuleId,$GLOBALS["v5ytksfsu91n86fl"],$GLOBALS["0x6hverqknwsa86x"], [$intProfileId, [$GLOBALS["it8gu10epcagtwxj"]=>$arPost[$GLOBALS["zoyd95s7f11oua6r"]]==$GLOBALS["u8j57dzwgp0nyqol"] ? $GLOBALS["cs32b1yw5stejvxe"] : $GLOBALS["4okrvfdgd0fmx7yk"],]]);}}}else{$mDateLocked=Helper::call($this->strModuleId,$GLOBALS["johkgqn02uqqr2qa"],$GLOBALS["mnaeb21r5v2z82p2"], [$intProfileId]);print $GLOBALS["gaoh2otv2qxxqy7u"].$intProfileId.$GLOBALS["i9q0ln95xqkd75v0"].$mDateLocked->toString().$GLOBALS["okie9tybsilxly0z"].PHP_EOL;Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["ppp99nk638la48f1"], array($GLOBALS["h439rvhm690a6o0q"]=>$mDateLocked->toString(),)),$intProfileId, true);}}}public static function getClassFilename($strClass){$obReflectionClass=new \ReflectionClass($strClass);$strFileClass=$obReflectionClass->getFileName();unset($obReflectionClass);return $strFileClass;}public static function addToQueue($intElementID,$intIBlockID=false){if($GLOBALS["7tlrlrq615lth0f9"]($intElementID)&&$intElementID>0&&!$GLOBALS["mp4da8ao0ef74gzc"]($intElementID, static::$arQueue)){$intIBlockID=$GLOBALS["t2mknjwwzi12rhmd"]($intIBlockID);static::$arQueue[$intElementID]=$intIBlockID;foreach(static::getExportModules() as $strModuleId){static::getInstance($strModuleId)->deleteElement([$GLOBALS["cvglwjbzpk5gauiq"]=>$intElementID,$GLOBALS["g16oeawignxrox5v"]=>$intIBlockID,]);}}}public static function getQueue(){return static::$arQueue;}public static function removeFromQueue($intElementID){unset(static::$arQueue[$intElementID]);}public static function processQueue(){$arQueue=&static::$arQueue;if($GLOBALS["2khpn965ycfbuhf9"]($arQueue)&&!empty($arQueue)){$arModules=static::getExportModules();$arModuleIBlocks=[];foreach($arModules as $strModuleId){$arModuleIBlocks[$strModuleId]=Helper::call($strModuleId,$GLOBALS["rt5oizhapj3mvhjg"],$GLOBALS["j6cpi54igf7lsv01"]);if(!$GLOBALS["6zi3f870q22f3v2n"]($arModuleIBlocks[$strModuleId])){$arModuleIBlocks[$strModuleId]=[];}}foreach($arQueue as $intElementID=>$intIBlockID){foreach($arModules as $strModuleId){if(!$GLOBALS["y052vpmsu5v6zjvk"]($intIBlockID,$arModuleIBlocks[$strModuleId])){continue;}static::processElement($intElementID,$intIBlockID, false, static::PROCESS_MODE_AUTO,$strModuleId);}unset($arQueue[$intElementID]);}}unset($arModules,$arModuleIBlocks,$strModuleId,$intIBlockID,$intElementID);}public static function processElement($intElementID,$intIBlockID=false,$intProfileID=false,$intProcessMode=self::PROCESS_MODE_AUTO,$strModuleId=null){$arResult=[];if($GLOBALS["fwj04ly5z8xefb6l"]($strModuleId)&&$GLOBALS["n952hrzxs280rcj7"]($strModuleId)){$arModules=[$strModuleId];}else{$arModules=static::getExportModules();}foreach($arModules as $strModuleId){$arResult[$strModuleId]=static::getInstance($strModuleId)->processElementByModule($intElementID,$intIBlockID,$intProfileID,$intProcessMode);}return $arResult;}protected function processElementByModule($intElementID,$intIBlockID=false,$intProfileID=false,$intProcessMode=self::PROCESS_MODE_AUTO){$mResult=false;$this->intElementId=$intElementID;$bPreview=$intProcessMode===static::PROCESS_MODE_PREVIEW;$bPreviewByProfileID=$bPreview&&$intProfileID > 0;if(!$intIBlockID){$intIBlockID=Helper::getElementIBlockID($intElementID);}if(!$intIBlockID){$this->intElementId=0;return false;}$arCatalog=Helper::getCatalogArray($intIBlockID);if($arCatalog[$GLOBALS["dafyi3c316tpy45i"]]){$strProp=$GLOBALS["dgjc395ages4zqqf"].$arCatalog[$GLOBALS["cy1w2yd153lh59z1"]];$resOffer=\CIBlockElement::GetList(array(),array($GLOBALS["zwrflyyrqhme6aue"]=>$intElementID,), false, false, array($strProp));if($arOffer=$resOffer->getNext(false,false)){$intParentElementID=$arOffer[$strProp.$GLOBALS["gxheq30p5m8xy53n"]];if($intParentElementID){$this->intElementId=0;return $this->processElementByModule($intParentElementID,$arCatalog[$GLOBALS["3hg59q4z0173xoro"]],$intProfileID,$intProcessMode);}}$this->intElementId=0;return false;}$arProfilesFilter=array($GLOBALS["q0obvn0xgzosccix"]=>$GLOBALS["lq7tbqyvrrhab75k"],);if($intProcessMode==static::PROCESS_MODE_AUTO){$arProfilesFilter[$GLOBALS["y8sgsfrjwxe3kyn4"]]=$GLOBALS["826s2n0bdxd2ovfw"];}if($intProfileID){$arProfilesFilter[$GLOBALS["8hsyi3oszr1fwuar"]]=$intProfileID;}$arProfiles=Helper::call($this->strModuleId,$GLOBALS["08id64gsdpa9u8o8"],$GLOBALS["uy0an866o4a1bzgl"], [$arProfilesFilter]);$fTimeFull=$GLOBALS["i0ra0m97ug1li9cy"](true);$arFeatures=null;if(!$bPreviewByProfileID){$arFeatures=Helper::call($this->strModuleId,$GLOBALS["iasfhqpi35hns036"],$GLOBALS["2mcapnis5fdwb1x2"], [$intProfileID,$intIBlockID]);}if(!$bPreviewByProfileID){$arElement=$this->getElementArray($intElementID,$intIBlockID,$bGetOffers=false,$bGetParent=false,$bGetSection=true,$bGetIBlock=true,$arFeatures);}$fTimeGetData=$GLOBALS["kp49do1v79aqa89u"](true) - $fTimeFull;if(!$bPreview&&!$arElement){$this->deleteElement($intElementID);$this->intElementId=0;return false;}if($GLOBALS["x9251wwix4kzi26f"]($arProfiles)){foreach($arProfiles as $intProfileKey=>$arProfile){if($GLOBALS["171nbbourbqssxgt"]($intIBlockID,$arProfile[$GLOBALS["5hlywxxuens1n77j"]])){$arProfiles[$intProfileKey][$GLOBALS["x7a7r2qi3dqhlbjt"]]=false;$fTime=$GLOBALS["ihl660q0wn80fv6z"](true);$bFilterSuccess=Helper::call($this->strModuleId,$GLOBALS["jwgw1sscm26t2gsl"],$GLOBALS["czh5ma0tqaknfrmr"], [$arProfile[$GLOBALS["b5ai9o93jri5x017"]],$intIBlockID,$intElementID]);if($bFilterSuccess||$bPreview){if($bPreviewByProfileID){$arFeatures=Helper::call($this->strModuleId,$GLOBALS["f6zmk0q6t6t196fw"],$GLOBALS["pxkeqxgvq2v47y0c"], [$arProfile[$GLOBALS["hvonabf3nio2k1iu"]],$intIBlockID]);$arElement=$this->getElementArray($intElementID,$intIBlockID,$bGetOffers=false,$bGetParent=false,$bGetSection=true,$bGetIBlock=true,$arFeatures);}$arProfiles[$intProfileKey][$GLOBALS["4w4ultv7z7thhuty"]]=$bFilterSuccess;if(!$GLOBALS["nvbgxnjh51i33543"]($arProfile[$GLOBALS["1ex9rglmhtwkncq0"]][$intIBlockID][$GLOBALS["i2rfjwxrk2xud2v5"]])){$arProfile[$GLOBALS["ny33qqhwfu3axl7s"]][$intIBlockID][$GLOBALS["lrawxout6sned86v"]]=array();}$this->getElementOffers($arElement,$arProfile,$arFeatures);$arPlugin=$this->getPluginInfo($arProfile[$GLOBALS["oafe3xcvs0z35swb"]]);if(!empty($arPlugin)&&$GLOBALS["hu99dc1j0iskvjcd"]($arPlugin[$GLOBALS["h2tquru8qerf6tm5"]])&&$GLOBALS["40xdtyzkmxmstph6"]($arPlugin[$GLOBALS["qwfremji95a44uob"]])){$obPlugin=&static::$arPluginObjects[$this->strModuleId][$arProfile[$GLOBALS["krrwnuk0hmjqu0c2"]]];if(!$GLOBALS["ydq1qvr1ycx2ycln"]($obPlugin)){$obPlugin=new $arPlugin[$GLOBALS["igakc6kngoutrz62"]]($this->strModuleId);$obPlugin->setProfileArray($arProfile);if($bPreview){$obPlugin->setPreviewMode(true);}}list($bProcessElement,$bProcessOffers)=$this->getProcessEntities($arProfile,$intIBlockID,$arElement,$obPlugin);if($bPreview){$arProfiles[$intProfileKey][$GLOBALS["xxssa7agl6khhwqr"]]=array();}$intOffersSuccess=0;$intOffersErrors=0;$arOffersPreprocess=array();if($bProcessOffers&&$obPlugin->isOffersPreprocess()){if($GLOBALS["c8j1hv2mks693kzm"]($arElement[$GLOBALS["pzl14a49p8ejcov2"]])&&!empty($arElement[$GLOBALS["2li6r1x7z0i2feig"]])){$intOffersIBlockID=$arElement[$GLOBALS["ernyrve4t3hthrv1"]];foreach($arElement[$GLOBALS["61tosk1g9t47xfq9"]] as $intOfferID){$fTime=$GLOBALS["e0ueurjpo0zpg06k"](true);$arOffer=$this->getElementArray($intOfferID,$intOffersIBlockID,$bGetOffers=false,$bGetParent=false,$bGetSection=true,$bGetIBlock=true,$arFeatures);$fTimeGetData +=$GLOBALS["n704ukp4jv1n1ftg"](true) - $fTime;$arOffer[$GLOBALS["9jd9o1m1gs41j0s5"]]=&$arElement;if(!$arElement[$GLOBALS["szeu0g57ip5hdlje"]]){$arOffer[$GLOBALS["g5whmcoq8z1ox4zp"]]=$arElement[$GLOBALS["35ywnbrfd5b7xv02"]];$arOffer[$GLOBALS["iyzgm5s5xtb7nor9"]]=$arElement[$GLOBALS["p314u5lcdlhhe4qk"]];$arOffer[$GLOBALS["6okjpuy6wqtz6kfq"]]=$arElement[$GLOBALS["4zx5wxzqye7q1efe"]];}$arOfferProcessResult=$this->processElementProfile($arOffer,$intOffersIBlockID,$arProfile,$obPlugin);$bIsError=!empty($arOfferProcessResult[$GLOBALS["h8nitznc20xdrpbc"]])||!empty($arOfferProcessResult[$GLOBALS["ajl8wwba1nfjhy61"]]);if($bPreview&&$bIsError){$arProfiles[$intProfileKey][$GLOBALS["qeoyk92433939vb6"]][]=$arOfferProcessResult;}elseif(!$bIsError){$mResult=true;$intOffersSuccess++;}else{$this->deleteElement($arOffer,$arProfile);$bLog=$arOfferProcessResult[$GLOBALS["sy10p37dass4iz11"]] !==[null];if($bLog){if(!empty($arOfferProcessResult[$GLOBALS["di4nh05blfuz05u0"]])){$intOffersErrors++;Log::getInstance($this->strModuleId)->add($GLOBALS["e1wkvvdr0fzffx8a"]($GLOBALS["i87nhq4o0a3epldd"],$arOfferProcessResult[$GLOBALS["7eg8ubv77ldm4x3q"]]),$arProfile[$GLOBALS["649hvw37adqojq23"]]);}elseif(!empty($arOfferProcessResult[$GLOBALS["sewaj3m2l0cpx9tx"]])){$intOffersErrors++;$arEmptyFields=array();foreach($arOfferProcessResult[$GLOBALS["hazomv03qn2j3tgy"]] as $obField){$arEmptyFields[]=$obField->getName();}Log::getInstance($this->strModuleId)->add(var_export($arOfferProcessResult, true).$GLOBALS["qtto9uyyf2oa6tvv"].Loc::getMessage($GLOBALS["e2jyyc1t5j4g4ico"], array($GLOBALS["jr8cfbecv801s63k"]=>$arOffer[$GLOBALS["9s8p8amcdri8rz0j"]],$GLOBALS["67ynic9vl11uqfjk"]=>$GLOBALS["k9i83706zgdjhwqv"]($GLOBALS["oe0gxwl8imocmsgn"],$arEmptyFields),)),$arProfile[$GLOBALS["u33z0htxnh24218r"]]);unset($arEmptyFields);}}}$arOffersPreprocess[]=$arOfferProcessResult;unset($intOfferID,$arOffer);}}if(!empty($arOffersPreprocess)){if($arProfile[$GLOBALS["uetcd9cbtzslgj8m"]][$intIBlockID][$GLOBALS["y02xzx0b5xa66sjy"]][$GLOBALS["skw2dwbkyel5ewum"]]==$GLOBALS["pmv7dagwslp2wct7"]){$strCallback=__CLASS__.$GLOBALS["ny2y8wpmdd5m4877"];}else{$strCallback=__CLASS__.$GLOBALS["b67ei8no5itk2u5u"];}$GLOBALS["pendqw0ailwcnufi"]($arOffersPreprocess,$strCallback);}}$bElementError=false;if($bProcessElement){$arProcessResult=$this->processElementProfile($arElement,$intIBlockID,$arProfile,$obPlugin,$arOffersPreprocess);$arProcessResult[$GLOBALS["qvo3iw1azps23hja"]]=$GLOBALS["nap66jq2gctfaa70"](true) - $fTime + $fTimeGetData;$bElementError=!empty($arProcessResult[$GLOBALS["gs5ucoeve0ikwuig"]])||!empty($arProcessResult[$GLOBALS["va4wbcio5t8djspr"]]);if($bPreview){$arProfiles[$intProfileKey][$GLOBALS["1jzajbj5rz7s0n2u"]][]=$arProcessResult;}elseif(!$bElementError){$mResult=$this->saveElement($arProcessResult,$arProfile, false);}else{$this->deleteElement($arElement,$arProfile);$bLog=$arProcessResult[$GLOBALS["diel9b5oker55d22"]] !==[null];if($bLog){if(!empty($arProcessResult[$GLOBALS["22ucko6m4jjnwcdf"]])){Log::getInstance($this->strModuleId)->add($GLOBALS["3wkky9pcncy9qin0"].$arElement[$GLOBALS["2lnejy3nv0tvu183"]].$GLOBALS["08k9o987hlgjy7i2"].$GLOBALS["2sy10dyoem0tgw2e"]($GLOBALS["mri1s6jvshsd14ry"],$arProcessResult[$GLOBALS["znssvmzsk2w9h1j3"]]),$arProfile[$GLOBALS["f4g2ae0v70jcs8zc"]]);}else{$arEmptyFields=array();foreach($arProcessResult[$GLOBALS["141uhfu9mtie1rpb"]] as $obField){$arEmptyFields[]=$obField->getName();}Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["h8cwdl5k37f0tb9j"], array($GLOBALS["m83jj5sodx5hazvr"]=>$arElement[$GLOBALS["kazvy3w077pezmpa"]],$GLOBALS["8hr7g0tkg6h8yee9"]=>$GLOBALS["fiqm1lv1ti3bl3yz"]($GLOBALS["offldj3uqnarunoo"],$arEmptyFields),)),$arProfile[$GLOBALS["lqr0wc26hd7wq4uq"]]);unset($arEmptyFields);}}$arElementDummy=array($GLOBALS["2dr9pq4hih9mixfl"]=>ExportData::TYPE_DUMMY,$GLOBALS["sca93swg6qmp9ce5"]=>ExportData::TYPE_DUMMY_ERROR,$GLOBALS["v2pbr028vbehwk4v"]=>null,$GLOBALS["bl7uc4acoqmw8xcz"]=>$intIBlockID,$GLOBALS["p1ggd7guusi8jlrv"]=>null,$GLOBALS["hmh6aq0g28s07qh9"]=>null,$GLOBALS["ne5hp2sc0getrsyt"]=>$intElementID,);$this->saveElement($arElementDummy,$arProfile, false);}}else{$arElementDummy=array($GLOBALS["q6k7qwltzaew1nms"]=>ExportData::TYPE_DUMMY,$GLOBALS["o0xvqmjk55guuk36"]=>null,$GLOBALS["fhyphiwpvfnlwg09"]=>$intIBlockID,$GLOBALS["r8bjhst8qy32khn6"]=>$arElement[$GLOBALS["299llp7d56hs5dgb"]],$GLOBALS["e3f2w32raqnbb52w"]=>Helper::getElementAdditionalSections($intElementID,$arElement[$GLOBALS["gmb5d0nz6ni7qf3a"]]),$GLOBALS["599egwimkqpyavbf"]=>$intElementID,);$this->saveElement($arElementDummy,$arProfile, false);}if($bProcessOffers&&!$obPlugin->isOffersPreprocess()){if($GLOBALS["im0ma0j0h959w500"]($arElement[$GLOBALS["hu4fhp1xdy2vh1tl"]])&&!empty($arElement[$GLOBALS["qqcm0ekw98n7a3rk"]])){$intOffersIBlockID=$arElement[$GLOBALS["trpn13e00l3x1cwa"]];foreach($arElement[$GLOBALS["l872hn628l142b3w"]] as $intOfferID){if($bElementError){$this->deleteElement($intOfferID,$arProfile);continue;}$fTime=$GLOBALS["8pg3xzdnjmc1ofch"](true);$arOffer=$this->getElementArray($intOfferID,$intOffersIBlockID,$bGetOffers=false,$bGetParent=false,$bGetSection=true,$bGetIBlock=true,$arFeatures);$fTimeGetData +=$GLOBALS["45338yz3u2unl90v"](true) - $fTime;$arOffer[$GLOBALS["r1r61wkjdv11x9ed"]]=&$arElement;if(!$arElement[$GLOBALS["it6dy90357o8qdfg"]]){$arOffer[$GLOBALS["nc6kxm0tdwj27xsn"]]=$arElement[$GLOBALS["zf99ozsj2qm9s7fl"]];$arOffer[$GLOBALS["woszedv21bdcxg8t"]]=$arElement[$GLOBALS["ge4ljhmmt3p8ewgi"]];$arOffer[$GLOBALS["neh4f23ecfwz3pmz"]]=$arElement[$GLOBALS["rr5b85el1r8usqau"]];}$arOfferProcessResult=$this->processElementProfile($arOffer,$intOffersIBlockID,$arProfile,$obPlugin);$arOfferProcessResult[$GLOBALS["af9d8p928j5hic9m"]]=$GLOBALS["o1sa6b0wb6amw3h1"](true) - $fTime;$bIsError=!empty($arOfferProcessResult[$GLOBALS["s378hvb14qig8ma8"]])||!empty($arOfferProcessResult[$GLOBALS["7fd1fy0yoq3wdsib"]]);if($bPreview){$arProfiles[$intProfileKey][$GLOBALS["92mtlmtn0dllc8c6"]][]=$arOfferProcessResult;}elseif(!$bIsError){$mResultOffer=$this->saveElement($arOfferProcessResult,$arProfile, true);$mResult=$mResult||$mResultOffer;$intOffersSuccess++;}else{$this->deleteElement($arOffer,$arProfile);$bLog=$arOfferProcessResult[$GLOBALS["fry2xe4k3e8znt73"]] !==[null];if($bLog){$intOffersErrors++;if(!empty($arOfferProcessResult[$GLOBALS["kx1u8jogzkxh3kgs"]])){Log::getInstance($this->strModuleId)->add($GLOBALS["ayajhvtua66jvs25"]($GLOBALS["tacugdvb6fo6csc8"],$arOfferProcessResult[$GLOBALS["y23vdssdm7y268ca"]]),$arProfile[$GLOBALS["r19kxkwufwd2r7aa"]]);}else{$arEmptyFields=array();foreach($arOfferProcessResult[$GLOBALS["6107sfybr3xu0xc2"]] as $obField){$arEmptyFields[]=$obField->getName();}Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["6zhw3elrnneq8f6j"], array($GLOBALS["9c4hzvfq3iiei4r4"]=>$arOffer[$GLOBALS["dy3j7gdg4or4nchr"]],$GLOBALS["mjm10k4wyjh2vf2m"]=>$GLOBALS["tvxoutuvek5r8f79"]($GLOBALS["7gpat02d1zf8294q"],$arEmptyFields),)),$arProfile[$GLOBALS["pmnmi0z7f4apfu3b"]]);unset($arEmptyFields);}}}}unset($intOfferID,$arOffer);}}$this->setElementOffersSuccess($arProfile[$GLOBALS["8mtnn8eg1oc6r9e3"]],$arElement[$GLOBALS["eqiibgc8u938w0yu"]],$intOffersSuccess);$this->setElementOffersErrors($arProfile[$GLOBALS["zyi1chtm2jwjkdhg"]],$arElement[$GLOBALS["ijlzj92lcwokk2p7"]],$intOffersErrors);if($mResult&&$intProcessMode==self::PROCESS_MODE_AUTO){Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["qggtfwpbygxitim6"], array($GLOBALS["vvjh6bjjbe6xt7hk"]=>$arElement[$GLOBALS["0z84tg6ixxom6y7w"]],)),$arProfile[$GLOBALS["lgpgowsdf2xcmscn"]], true);}unset($arProcessResult);}unset($arPlugin);}else{if(!$bPreview){$this->deleteElement($arElement,$arProfile);}}}}}if($bPreview){$mResult=array($GLOBALS["mva0w0hbsv323yo1"]=>$arProfiles,);$mResult[$GLOBALS["djjzysn0s4hynw4m"]]=$GLOBALS["ekl2sgw12l8bdy3q"](true) - $fTimeFull;$mResult[$GLOBALS["e3wtvb3ba3b6jevz"]]=$fTimeGetData;}$arResult=array($GLOBALS["b82ghyzw3jqzj9m7"]=>$mResult,);unset($arProfilesFilter,$arProfiles,$arElement,$fTimeFull);$this->intElementId=0;return $arResult;}public function getElementId(){return $GLOBALS["swtk2l4f39ujj2gz"]($this->intElementId);}public static function sortOffersAsc($a,$b){return strcasecmp($a[$GLOBALS["z0exf5ju1a4l2rk0"]],$b[$GLOBALS["uzp3jhuo43wczz8i"]]);}public static function sortOffersDesc($a,$b){return -1 * strcasecmp($a[$GLOBALS["4r0qyvxbbxsxdqg0"]],$b[$GLOBALS["gksse47mfzlzk31h"]]);}protected function processElementProfile($arElement,$intIBlockID,$arProfile,$obPlugin,$arOffersPreprocess=array()){if($this->isDemoLimitReached($arProfile[$GLOBALS["vghhc8wizqjvl99j"]])){return [$GLOBALS["9cxd2zkp124fs047"]=>[null]];}$arResultFields=array();$arPluginFields=$obPlugin->getFieldsCached($arProfile[$GLOBALS["lkgz4lmbjeplio61"]],$intIBlockID);$arEmptyRequiredFields=array();foreach($arPluginFields as $obField){$strFieldCode=$obField->getCode();if(isset($arProfile[$GLOBALS["81w60c0h596dktgc"]][$intIBlockID][$GLOBALS["ditj9yk8rn9ep6cv"]][$strFieldCode])){$arField=$arProfile[$GLOBALS["zxlcg3o62hfzjoin"]][$intIBlockID][$GLOBALS["sf78itef1q81fvro"]][$strFieldCode];}else{$arField=array($GLOBALS["3pi7749wz1a3weko"]=>0,$GLOBALS["d0g9m9k5mzq6utk6"]=>$arProfile[$GLOBALS["838jzgwt5woyq9rl"]],$GLOBALS["p8ud9j1bpqp27vy9"]=>$intIBlockID,$GLOBALS["a3bgnxax5388mggg"]=>$strFieldCode,$GLOBALS["0pnfntck9uarc6ju"]=>$obField->getDefaultValue(),);}$obField->setSiteID($arProfile[$GLOBALS["g3k5wh8j1xv256be"]]);$arFieldResult=$this->processField($obField,$arField,$arElement,$arProfile,$obPlugin);$arResultFields[$strFieldCode]=$arFieldResult;}foreach(EventManager::getInstance()->findEventHandlers($this->strModuleId,$GLOBALS["5yvuats4zdm78yxh"]) as $arHandler){ExecuteModuleEventEx($arHandler, array(&$arResultFields, &$arElement,$intIBlockID, &$arProfile,$obPlugin,&$arOffersPreprocess));}foreach($arPluginFields as $obField){$strFieldCode=$obField->getCode();$bSimpleEmptyMode=$obField->isSimpleEmptyMode()||$obField->isPrice();if($obField->isRequired()&&Helper::isEmpty($arResultFields[$strFieldCode],$bSimpleEmptyMode)){$arEmptyRequiredFields[]=$obField;}}$arProcessResult=array();if(empty($arEmptyRequiredFields)){if($obPlugin->isOffersPreprocess()){$arResultFields[$GLOBALS["pvaaaw1lpc3da2z4"]]=&$arOffersPreprocess;}$arProcessResult=$obPlugin->processElement($arProfile,$intIBlockID,$arElement,$arResultFields);if(!$GLOBALS["nso2ww258pbidh76"]($arProcessResult)){$arProcessResult=array($GLOBALS["3t09lfdu7pv6t0sn"]=>array(),);}}else{$arProcessResult[$GLOBALS["rhm5b4zwcutcw5pv"]]=$arEmptyRequiredFields;}$arProcessResult[$GLOBALS["dj3nrd6cbtilkubf"]]=$intIBlockID;$arProcessResult[$GLOBALS["9e3ewv3nbmdtbkxk"]]=$arElement[$GLOBALS["rnrj5fi90hdonrap"]];$arProcessResult[$GLOBALS["vyuuvrlqftazc1ai"]]=$this->getElementSort($arElement,$arProfile,$obPlugin);unset($arResultFields,$arPluginFields,$arFieldResult);return $arProcessResult;}public function getElementSort($arElement,$arProfile,$obPlugin=null){$strResult=$arElement[$GLOBALS["qh8fb96izev6q033"]];$intBlockID=$arElement[$GLOBALS["ld74zv7jx8ltk1y1"]];if($obPlugin===null){$arPlugin=$this->getPluginInfo($arProfile[$GLOBALS["z5u7xvlytnowrmpn"]]);if($GLOBALS["u6vovlq2pzhq6tui"]($arPlugin)&&$GLOBALS["nlgxe0q2su031aa5"]($arPlugin[$GLOBALS["d8f8dxglvipm1r7i"]])){$obPlugin=new $arPlugin[$GLOBALS["lqtdyyzcz1jy98c8"]];$obPlugin->setProfileArray($arProfile);}}$arSystemFields=array();Helper::call($this->strModuleId,$GLOBALS["2ajww7epz7nefjgw"],$GLOBALS["3my6u9luxx4q7xvz"], [&$arSystemFields,$arProfile[$GLOBALS["agtgpny4cimi3g05"]],$arElement[$GLOBALS["7invr6hfpu6nhtjv"]]]);foreach($arSystemFields as $obField){$strFieldCode=$obField->getCode();if($strFieldCode==Profile::FIELD_SORT_ELEMENT||$strFieldCode==Profile::FIELD_SORT_OFFER){$arField=$arProfile[$GLOBALS["lgkl8sqczq3h600z"]][$intBlockID][$GLOBALS["u62igyk5er56bwjs"]][$strFieldCode];$obField->setSiteID($arProfile[$GLOBALS["e35azq7q30inmtdk"]]);$arFieldResult=$this->processField($obField,$arField,$arElement,$arProfile,$obPlugin);$strResult=$arFieldResult;unset($arFieldResult);}}return $strResult;}protected function getProcessEntities($arProfile,$intIBlockID,$arElement,$obPlugin=null){$bProcessElement=false;$bProcessOffers=false;$strMode=$arProfile[$GLOBALS["v2tulrhsqo2v8iyp"]][$intIBlockID][$GLOBALS["59hgx8oouefhofr3"]][$GLOBALS["1ep75cqxw33omo6z"]];switch($strMode){case $GLOBALS["ofmwawj1y2u3o76w"]:if($GLOBALS["ujxckj48g2tu9guo"]($arElement[$GLOBALS["b9hk84zuqfka1grt"]])&&!empty($arElement[$GLOBALS["jic5mnyrb75zeuqe"]])||$arElement[$GLOBALS["dlr20wcme0r08ke7"]] > 0){$bProcessElement=false;$bProcessOffers=true;}else{$bProcessElement=true;$bProcessOffers=false;}break;case $GLOBALS["f3fi3v5kn3ase0wl"]:$bProcessElement=false;$bProcessOffers=true;break;case $GLOBALS["339gqnsm5bmx2yr9"]:$bProcessElement=true;$bProcessOffers=false;break;default:$bProcessElement=true;$bProcessOffers=true;break;}if($GLOBALS["hqhesshit4cqdwnw"]($obPlugin)){$obPlugin->getProcessEntities($bProcessElement,$bProcessOffers,$arProfile,$intIBlockID,$arElement);}foreach(EventManager::getInstance()->findEventHandlers($this->strModuleId,$GLOBALS["wvarpuktamj0ogoc"]) as $arHandler){ExecuteModuleEventEx($arHandler, array($obExporter,$arProfile,$intIBlockID,$arElement,&$bProcessElement, &$bProcessOffers));}return array($bProcessElement,$bProcessOffers,);}public static function displayPreviewResult($arResultItem){ob_start();if($arResultItem[$GLOBALS["mb89w81wr6l0xk29"]]){print $GLOBALS["9624stuvir1j6rxy"];$arErrorFields=array();foreach($arResultItem[$GLOBALS["izydntwyfjnw32x1"]] as $obField){$arErrorFields[]=$obField->getName();}$arIBlockFilter=array($GLOBALS["3saj62irdu3pg41t"]=>$arResultItem[$GLOBALS["0tep4epdvyhb7utb"]],$GLOBALS["vp0gk05bhdlw1poy"]=>$GLOBALS["wou1yjrb5xy0bxgn"],);$strIBlockType=$GLOBALS["20w51sk1dly062bo"];$resIBlock=\CIBlock::GetList(array(),$arIBlockFilter);if($arIBlock=$resIBlock->getNext(false,false)){$strIBlockType=$arIBlock[$GLOBALS["rkvaypnt0tql26ob"]];}$arCatalog=Helper::getCatalogArray($arResultItem[$GLOBALS["rxmxb3i4buaanblo"]]);$strType=$GLOBALS["9fp0nmo77714tluy"];if($GLOBALS["wxt6ktt7eu46o7y7"]($arCatalog)){$strType=$GLOBALS["pmtm2cuwcoc14e60"];if($arCatalog[$GLOBALS["epbgcwpz0va228vi"]]){$strType=$GLOBALS["rmqismfto3esudeb"];}}print Loc::getMessage($GLOBALS["qf06byha8m3l79xj"], array($GLOBALS["w4c5op3kmffqv2qz"]=>Loc::getMessage($GLOBALS["wdkenw5ofxn61i3r"].$strType),$GLOBALS["855wxro1uniw73m2"]=>$arResultItem[$GLOBALS["vb5ppeo00ma13rvj"]],$GLOBALS["putb77kmgegpxz0w"]=>$arResultItem[$GLOBALS["vmnyfhtzweb5xt59"]],$GLOBALS["nhneszfknv000c4t"]=>$strIBlockType,$GLOBALS["c1vyvul02pjie50l"]=>$GLOBALS["cs5zf1gkjccmuelz"]($GLOBALS["q44jhylcua17xdun"],$arErrorFields),$GLOBALS["nlapxhfruu58err1"]=>LANGUAGE_ID,));print $GLOBALS["5wmzm9k70xtz35rp"];}elseif($GLOBALS["v37k9xvc4md895gn"]($arResultItem[$GLOBALS["sa2kh78sjlyfkb8j"]])&&!empty($arResultItem[$GLOBALS["j5fktpfbvki9a4bt"]])){print Loc::getMessage($GLOBALS["cosp8aiy3uk9gmzk"], array($GLOBALS["kmg45pc46tlu9lch"]=>$GLOBALS["paign9em3yyz4b0u"]($GLOBALS["cnoq4no0zmu38xi1"],$arResultItem[$GLOBALS["cc8rqshwjxptxjpk"]]),));}elseif($GLOBALS["73yzjby10na2scdo"]($arResultItem[$GLOBALS["wskjq3enx8bmg9u1"]])){if($GLOBALS["6akghyt0dnwnv878"]($arResultItem[$GLOBALS["3z4em8jwvher4z3d"]])==$GLOBALS["f7ob88c7u926qvmc"]){print $GLOBALS["61s57fvygh2g11k4"].htmlspecialcharsbx($arResultItem[$GLOBALS["kb7fmrd6rzao4t6x"]]).$GLOBALS["d5zk0c69jww3p0bl"];}elseif($GLOBALS["lambtwo66ey184yp"]($arResultItem[$GLOBALS["qp696wu30wot1g45"]])==$GLOBALS["z0m7tkbzux0wfix2"]){$intJsonPrettyPrintFlags=JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES;if(defined($GLOBALS["7sku9jac69cu8o3b"])){$intJsonPrettyPrintFlags=$intJsonPrettyPrintFlags | JSON_INVALID_UTF8_IGNORE;}if(defined($GLOBALS["870pg4w95g7zv6pt"])){$intJsonPrettyPrintFlags=$intJsonPrettyPrintFlags | JSON_INVALID_UTF8_SUBSTITUTE;}$strJson=Json::encode(Json::decode($arResultItem[$GLOBALS["jrfmtcebqxxmeynn"]]),$intJsonPrettyPrintFlags);if(!Helper::isUtf()){$strJson=Helper::convertEncoding($strJson,$GLOBALS["w0d8f83kz7heovxo"],$GLOBALS["4ez99q43iivg2bq1"]);}print $GLOBALS["ytgp62790erw5x73"].$strJson.$GLOBALS["t3gvv6hp7g4qv68r"];print $GLOBALS["0tkdakr1ypnsbznl"].Helper::getMessage($GLOBALS["ravktui8f7n4bt8e"]).$GLOBALS["txg0uh3154ql3e3y"];print $GLOBALS["gad4mjt6enlrmic1"];print $GLOBALS["a9deu72jgao24sbx"].htmlspecialcharsbx($arResultItem[$GLOBALS["v81n12w9ng3r6y9k"]]).$GLOBALS["uth9shrgs6d8cbwh"];print $GLOBALS["zu6woorhl3jghbud"];}elseif($GLOBALS["eukftjbpb2y27xrg"]($arResultItem[$GLOBALS["tnoai2d0hjyd138i"]])==$GLOBALS["bixux8j0m6qqutqf"]){print $GLOBALS["hf7kq9v4x0ekkrij"].print_r(Json::decode($arResultItem[$GLOBALS["au08ns51ktu0ss05"]]), true).$GLOBALS["k98al8s15lqa8wsz"];print $GLOBALS["1qejj0d346wplnsm"].Helper::getMessage($GLOBALS["1mwmlzr5n24rz2dh"]).$GLOBALS["1aqez51uic1z4s9a"];print $GLOBALS["4ps3qf8oq7w4t70j"];print $GLOBALS["4annn63bu1il3sig"].htmlspecialcharsbx($arResultItem[$GLOBALS["th3nb15tbiwk16pn"]]).$GLOBALS["mswcbwjiq81yr2rn"];print $GLOBALS["wsmck3772tsrjzs4"];}elseif($GLOBALS["5iw8ss1yvcat56mn"]($arResultItem[$GLOBALS["xl73ptl04ga94nqf"]])==$GLOBALS["ok0ihayy2nod9ewz"]){print $GLOBALS["l3bzungawwbqwvj1"].print_r(array_map(function($item){return $GLOBALS["w670rhma5i4jhu7q"]($item) ? htmlspecialcharsbx($item) : $item;},$arResultItem[$GLOBALS["r7o1472z8lk20lal"]]), true).$GLOBALS["9n75n9pi0gofinek"];}elseif($GLOBALS["nf1zz7421ttfovrd"]($arResultItem[$GLOBALS["1neony9x99een4hu"]])==$GLOBALS["370iovs032f3t1ps"]){print $GLOBALS["l4ypxum0wgbiku6p"].print_r(htmlspecialcharsbx($arResultItem[$GLOBALS["h4wbvxsgwftei6px"]]), true).$GLOBALS["t4gb7dvirn4h30wq"];}else{print $GLOBALS["5eckswq5w75pti16"].print_r($arResultItem[$GLOBALS["gfwbdds9868wqa76"]], true).$GLOBALS["usbkpue18jep9ru5"];}}if($GLOBALS["ky8ubl7ms1t6rbop"]($arResultItem[$GLOBALS["nx004hd17jewb6fz"]])&&!empty($arResultItem[$GLOBALS["04aku1y2hyt9xylp"]])){print $GLOBALS["al2uumz0oledtjsn"].Helper::getMessage($GLOBALS["248ppzzbg3cu302o"]).$GLOBALS["12n009tqerrs0crz"];print $GLOBALS["kodeyqoh50bqqv60"];Helper::P($arResultItem[$GLOBALS["0vxgpngb1lzyuwcu"]]);print $GLOBALS["825h3tgsnsxjcr37"];}$strHtml=ob_get_clean();$strHtml=$GLOBALS["3qvygq8lhy5sohy3"]($strHtml);if($GLOBALS["5h33e8q8yjdi8v79"]($strHtml)){$strHtml .=$GLOBALS["jv6jogw3in947qlk"];}return $strHtml;}public function saveElement($arProcessResult,$arProfile,$bOffer=false){if($GLOBALS["gh76mhkl27a1jlu3"]($arProcessResult[$GLOBALS["r7i5o0cia5o9l7c6"]])){$arProcessResult[$GLOBALS["ugy9wrwceu3te29h"]]=$GLOBALS["k5jtmlo59xb8lahq"];}$arData=array($GLOBALS["82k3mn347y0mtokj"]=>$arProfile[$GLOBALS["u20gmx5owv3paros"]],$GLOBALS["eo342mq7o7uoyk2a"]=>$arProcessResult[$GLOBALS["w2ylpxl69t4g1ezl"]],$GLOBALS["odzx9wrpppn6tbvq"]=>$arProcessResult[$GLOBALS["ruimd59im1csy84i"]],$GLOBALS["kvohvcq8nbh66k8o"]=>$arProcessResult[$GLOBALS["0o82ebjf7188qa6q"]],$GLOBALS["boobekqhcb39r07r"]=>$GLOBALS["bvwqyraf9aa9ov40"]($arProcessResult[$GLOBALS["rxerwrx23g9afgj5"]]) ? $GLOBALS["nqctqjvvlytctotq"]($GLOBALS["pyvegnhekf7fw9ph"],$arProcessResult[$GLOBALS["94r7571awidju6f7"]]) : $GLOBALS["j6ie8le9mjt1twom"],$GLOBALS["vs45y3ytf36iwloh"]=>$GLOBALS["2lc2cogcrijy0etu"]($arProcessResult[$GLOBALS["2ys52oc6m3xyuxeo"]]) ? $GLOBALS["38f9y54tmwtiu9rh"]($GLOBALS["qobcloeli2737ukg"],$arProcessResult[$GLOBALS["petgbthjk80ydiwz"]]) : $arProcessResult[$GLOBALS["kcb2ovlp148d1v01"]],$GLOBALS["c6xmvxt4o2g1l3kz"]=>$GLOBALS["3bphc8a0xj02v38c"]($arProcessResult[$GLOBALS["6coyl11diw1tu63m"]]) ? $arProcessResult[$GLOBALS["6r86zw81kbepfm7x"]] : $arProcessResult[$GLOBALS["le1gg2at0xo3zaly"]],$GLOBALS["dehg6swhsyophq6q"]=>$arProcessResult[$GLOBALS["h2jhdrm8yrigof24"]],$GLOBALS["21g1mgz97ghnwftu"]=>$arProcessResult[$GLOBALS["ip0pxopaabozyci4"]],$GLOBALS["5sr4z92prnuujdf9"]=>$GLOBALS["jd30rv7112372h91"]($arProcessResult[$GLOBALS["y4b85pqu38xo0c3e"]]) ? $GLOBALS["9qafqem5n0li5a43"]($arProcessResult[$GLOBALS["eaulwzef0ilq3r18"]]) : $GLOBALS["oqeg1h4ypmb6af2a"]($arProcessResult[$GLOBALS["tq9eib372c4uc6xa"]]),$GLOBALS["ajbyz33crura3y8g"]=>new \Bitrix\Main\Type\DateTime(),$GLOBALS["a5murypfrt7jsmkl"]=>$arProcessResult[$GLOBALS["iyl1aog4nm0a4ssa"]],$GLOBALS["uspse4cwntsh9xp0"]=>null,$GLOBALS["jdtve217cb7k0a1z"]=>$bOffer ? $GLOBALS["kwsrvuatt76tww72"] : null,);if($GLOBALS["goon585pvuz1ayz2"]($arData[$GLOBALS["0nw1u8ei7r0itwaz"]])==$GLOBALS["opnper6yoc3ht0ry"]){$arData[$GLOBALS["gmp2lcyghbbg403t"]]=randString(16);}if($GLOBALS["40x9hk0ou0qcaxoz"]($GLOBALS["faw1mgo14rjt7izs"],$arProcessResult)){if($arProcessResult[$GLOBALS["0yutesbpa46ucjdg"]]==ExportData::TYPE_DUMMY_ERROR){$arData[$GLOBALS["v5r4s0hxdqai3827"]]=$GLOBALS["hqru67q7ngientb1"];}}$arQuery=[$GLOBALS["xd5nauj3kfh4moi5"]=>array($GLOBALS["2d6rmp6fhsateu0l"]=>$arData[$GLOBALS["blsppl497246ek7y"]],$GLOBALS["aaedk7udog0isc4d"]=>$arData[$GLOBALS["q219n0sp68xv43w3"]],),$GLOBALS["zwq001lphfr88mzz"]=>array($GLOBALS["jiphqparwyb182tj"],),$GLOBALS["b1xxxub4zxxmj7wi"]=>1,];$resExistsData=Helper::call($this->strModuleId,$GLOBALS["c2g8inoox3rkmvp5"],$GLOBALS["kfs82vb82k26w7ew"], [$arQuery]);if($arExistsData=$resExistsData->fetch()){$obResult=Helper::call($this->strModuleId,$GLOBALS["i472itf4xk123zsk"],$GLOBALS["t3gbeba9d6fh397c"], [$arExistsData[$GLOBALS["y6e70eg507b4f68b"]],$arData]);}else{$obResult=Helper::call($this->strModuleId,$GLOBALS["pbj0tbxmhxtqh1di"],$GLOBALS["7ql3tnu54qhp0dhl"], [$arData]);}if(!$obResult->isSuccess()){Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["uvupwo3c4bpitqaw"], array($GLOBALS["8l1skifi8p9u2zww"]=>$arProcessResult[$GLOBALS["rlanb8ymk9evwfj6"]],$GLOBALS["46c8wc82af5x6mdt"]=>$GLOBALS["4iva2cf7zkmm1nkl"]($GLOBALS["xs31vew8ff79n4lu"],$obResult->getErrorMessages()),)),$arProfile[$GLOBALS["2naqp0aayqbbkjbz"]]);return false;}return true;}protected function setElementOffersErrors($intProfileID,$intElementID,$intOffersErrors){$arFields=array($GLOBALS["a4bpd913cmv0sgo2"]=>$intOffersErrors,);$arQuery=[$GLOBALS["irrmxa5fygldzkdt"]=>array($GLOBALS["6t9vyq53r26xow6u"]=>$intProfileID,$GLOBALS["1ivrnnvg49ug5ssb"]=>$intElementID,),$GLOBALS["mdkvuvlbs728d3mm"]=>array($GLOBALS["jjkiv7g15axlyn1t"],),$GLOBALS["hp3q1q40r9m6wybp"]=>1,];$resExistsData=Helper::call($this->strModuleId,$GLOBALS["ivcejpwhvyr1ekja"],$GLOBALS["31pnwqx6ott3sv93"], [$arQuery]);if($arExistsData=$resExistsData->fetch()){Helper::call($this->strModuleId,$GLOBALS["tfj9tadjcghsu4vx"],$GLOBALS["uoke27zcvvgn96hg"], [$arExistsData[$GLOBALS["ow12qie2rj0jw4ss"]],$arFields]);}}protected function setElementOffersSuccess($intProfileID,$intElementID,$intOffersSuccess){$arFields=array($GLOBALS["64kjo8v87otdp0q9"]=>$intOffersSuccess,);$arQuery=[$GLOBALS["kluui6vc2dowiaek"]=>array($GLOBALS["zf2d5g3i0ugrx2i8"]=>$intProfileID,$GLOBALS["y1b28uiw0qoa11wa"]=>$intElementID,),$GLOBALS["03pbjaf76ur960qj"]=>array($GLOBALS["qh1jihhb5lzcd8gu"],),$GLOBALS["mio54us09jfq3v69"]=>1,];$resExistsData=Helper::call($this->strModuleId,$GLOBALS["imvq1wgix1c7fncn"],$GLOBALS["u4bqxtmzpr4x50qc"], [$arQuery]);if($arExistsData=$resExistsData->fetch()){Helper::call($this->strModuleId,$GLOBALS["jqq4i944walfnpvz"],$GLOBALS["8yr81fzamm03z3jp"], [$arExistsData[$GLOBALS["426em4oid1p4hftf"]],$arFields]);}}public function deleteElement($arElement,$arProfile=false){$bDeleteWhileExports=Helper::getOption($this->strModuleId,$GLOBALS["37hsyl1kqqrhed1l"])==$GLOBALS["yv31jxamngitzmea"];if($GLOBALS["rqp7ba3mka1bq0mf"]($arElement)){$arElement=array($GLOBALS["5jw85nzfwe6q0cbu"]=>$arElement,);}$arFilter=array($GLOBALS["59zvt8h71kuckvw2"]=>$arElement[$GLOBALS["bm780a2egzfrdikl"]],);if($GLOBALS["1yqvykmsatalv41v"]($arProfile)&&$arProfile[$GLOBALS["e91r40xu8qkjcb47"]]){$arFilter[$GLOBALS["meludofssr8pqga9"]]=$arProfile[$GLOBALS["uwami6odpb3beq0b"]];}if(!$bDeleteWhileExports){$arFilter[$GLOBALS["97saffh5c9p5ixa1"]]=$GLOBALS["n40uj941768hil2d"];}$arQuery=[$GLOBALS["ygplutju0u4uuozx"]=>$arFilter,$GLOBALS["ubmgvdg5embldk65"]=>[$GLOBALS["ojycutf6gz6uqg1z"],],];if(!$bDeleteWhileExports){$arQuery[$GLOBALS["dcyo9va4a4rzsi8a"]]=[$GLOBALS["baa226g5uv54i579"]=>[$GLOBALS["i1ii32fp4sdhljjd"]=>Helper::call($this->strModuleId,$GLOBALS["gvh3ggdpd87lhteo"],$GLOBALS["e9yj44tzswcgx2xr"]),$GLOBALS["el2aqch2tn4huucw"]=>[$GLOBALS["fguqsaojsto2yxep"]=>$GLOBALS["bngf9se1mo9p6i63"]],$GLOBALS["za31826ts14rnf90"]=>$GLOBALS["cxg12rcouqu81k8a"]],];}$resExistsData=Helper::call($this->strModuleId,$GLOBALS["08ofe1kkq0ks4uma"],$GLOBALS["zw5ji53wjel4vxtk"], [$arQuery]);$bFound=false;if($resExistsData){while($arExistsData=$resExistsData->fetch()){$bFound=true;$obResult=Helper::call($this->strModuleId,$GLOBALS["lav6ukscfdvqfcbj"],$GLOBALS["fzevle2dqm9kauam"], [$arExistsData[$GLOBALS["gc06bfanp2th6556"]]]);}}if($bFound){Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["ji6zviz70hir9h4a"], array($GLOBALS["s44uqg8axq2mivch"]=>$arElement[$GLOBALS["20b0vtb2a8uzsrb3"]],)),$arProfile[$GLOBALS["fr39etulj7p309wi"]] > 0 ? $arProfile[$GLOBALS["d3bm7rxije55jzdr"]] : false, true);}return $bFound;}public function processField($obField,$arField,$arElement,$arProfile,$obPlugin=null){$strFieldCode=$obField->getCode();$intProfileID=$arProfile[$GLOBALS["d8kryubf060ald1x"]];if($GLOBALS["z8s47xz0qnlznct2"]($obPlugin)){$mResultBefore=$obPlugin->onBeforeProcessField($obField,$arField,$arElement,$arProfile);if(!$GLOBALS["t0mvmb6mkr9qw7iw"]($mResultBefore)){return $mResultBefore;}}foreach(EventManager::getInstance()->findEventHandlers($this->strModuleId,$GLOBALS["3vxcy38g84gk66k0"]) as $arHandler){$mResultBefore=ExecuteModuleEventEx($arHandler, array(&$obField, &$arField, &$arElement, &$arProfile, &$obPlugin));if($mResultBefore!=null){return $mResultBefore;}}$obField->setProfileID($intProfileID);$obField->setIBlockID($arElement[$GLOBALS["z3fp0czu1cubahwq"]]);$obField->setPlugin($obPlugin);$bIsRequired=$obField->isRequired();$bIsMultiple=$obField->isMultiple();$obField->setType($arField[$GLOBALS["9y5ig0xz666r4f34"]]);if($GLOBALS["gssg9j9d5fu7vqv9"]($arField[$GLOBALS["pzrfxidn27qotpxt"]])){$obField->setConditions($arField[$GLOBALS["tazt9ms552cq8mdn"]]);}if($GLOBALS["591bi9cx0v6yof3t"]($arField[$GLOBALS["vfsv6ntzfvnd7z3o"]])){$obField->setParams($arField[$GLOBALS["m3m2pottyzdb1fpj"]]);}if(!empty($arField[$GLOBALS["qzob6lceznao8mjp"]])){$obField->setValue($arField[$GLOBALS["r7fau03h266s2g1r"]]);}$obField->setModuleId($this->strModuleId);$obField->setElementId($arElement[$GLOBALS["hj5mqvmfkxjt0uo3"]]);$mResult=$obField->processFieldForElement($arElement,$arProfile);if($GLOBALS["4kubv3x6uh9dbkl2"]($obPlugin)){$mResultAfter=$obPlugin->onAfterProcessField($mResult,$obField,$arField,$arElement,$arProfile);if(!$GLOBALS["z997wi8ncj53jqqn"]($mResultAfter)){return $mResultAfter;}}foreach(EventManager::getInstance()->findEventHandlers($this->strModuleId,$GLOBALS["4300vqik1xecl29p"]) as $arHandler){$mResultAfter=ExecuteModuleEventEx($arHandler, array(&$mResult, &$obField, &$arField, &$arElement, &$arProfile, &$obPlugin));if($mResultAfter!=null){return $mResultAfter;}}if($GLOBALS["i08hxgn4sa1qj060"]($mResult)){foreach($mResult as $key=>$value){if($GLOBALS["dtp6bdu7y6mz1ug1"]($value)&&!$GLOBALS["jjsnk05xtyuvay74"]($GLOBALS["92yq2k7i5y46r449"]($value))){unset($mResult[$key]);}}}return $mResult;}public function getElementArray($intElementID,$intIBlockID=false,$bGetOffers=false,$bGetParent=false,$bGetSection=false,$bGetIBlock=false,$arFeatures=null){if(!$intIBlockID){$intIBlockID=Helper::getElementIBlockID($intElementID);}$arCatalog=Helper::getCatalogArray($intIBlockID);$bParent=$GLOBALS["hvzs2y3g516r8z0y"]($arCatalog)&&$arCatalog[$GLOBALS["ygeo0j6sx8yr7lc4"]]||!$GLOBALS["ktpx1rc7bv8sz21f"]($arCatalog);$bOffer=$GLOBALS["rg6t4oq61vppi745"]($arCatalog)&&$arCatalog[$GLOBALS["4mvtih35v0vd4q7u"]];$bFeatures=$GLOBALS["653a959y79v7j35e"]($arFeatures)&&!empty($arFeatures);if($bFeatures){$arFField=&$arFeatures[$GLOBALS["rvkkkd9gclndq7gt"]][$bOffer ? ProfileFieldFeature::OFFER : ProfileFieldFeature::PRODUCT];$arFGroup=&$arFeatures[$GLOBALS["0m0hcia22u8320g6"]][$bOffer ? ProfileFieldFeature::OFFER : ProfileFieldFeature::PRODUCT];$bGetSection=$GLOBALS["humr0vm28y0l43se"]($arFGroup[$GLOBALS["pt75px2cs23evnwj"]]);$bGetIBlock=$GLOBALS["jrxumh9hu81tyw9d"]($arFGroup[$GLOBALS["rsbk48o2bp06n5ws"]]);}$arSort=array($GLOBALS["bawps2c5fwp10jta"]=>$GLOBALS["pe70lvngtw3kumyw"],);$arFilter=array($GLOBALS["ryaogekcvk7v9yam"]=>$intElementID,$GLOBALS["yale84u4qjnfuswv"]=>$intIBlockID,);if($bFeatures){$arSelect=array($GLOBALS["n9thl6d5eyufit3l"],$GLOBALS["t6nzro587tv43i3d"],$GLOBALS["8swldvymzotunr43"],);if($GLOBALS["zq0y93xmcypodjjw"]($arFGroup[$GLOBALS["8ba0mo380m5jxtsa"]])){foreach($arFGroup[$GLOBALS["dx26tst728vn8b5h"]] as $strField){$arSelect[]=$strField;}}if($GLOBALS["5ejgv7g17b61sz13"]($arFGroup[$GLOBALS["8lten3doqlzd0q2d"]])){$arSelect[]=$GLOBALS["diz6uypabgo40g2y"];}$arSelect=$GLOBALS["tlevkaf4umr8jfnn"]($arSelect);}else{$arSelect=array($GLOBALS["t0fsbyaxgyjpuuwv"],$GLOBALS["pze6rzkfc59jmlri"],$GLOBALS["ag623w4o8mutkbwv"],$GLOBALS["ce0b1fo0tf5xln80"],$GLOBALS["wqplse9tit221dvx"],$GLOBALS["v54tndd0pl2pjjs7"],$GLOBALS["kp4os3u3soyejodt"],$GLOBALS["91zz2ajwkxyiy9zn"],$GLOBALS["b3418ds00tfb50an"],$GLOBALS["g0r7uezawj0zg2ny"],$GLOBALS["fjaef4iaiheyg69q"],$GLOBALS["c1rw72m6ka02ldbe"],$GLOBALS["7vh90dsap5mwuodp"],$GLOBALS["75930o967isei76q"],$GLOBALS["gxouufebuccygkmm"],$GLOBALS["29azj6yo1y65pvus"],$GLOBALS["bf7r0dje1xnx61mf"],$GLOBALS["af60pidkozgai6dg"],$GLOBALS["mpjrpowwcub20qa6"],$GLOBALS["0jeaqxpj257ew4jt"],$GLOBALS["o91sn74ucxqi1dic"],$GLOBALS["id79chvrmo6nwzsg"],$GLOBALS["y3z4kez994wk88g9"],$GLOBALS["lgs062dsop9293nd"],$GLOBALS["oz1izt7kuk7sjlej"],$GLOBALS["6jxcfs11nf7mo72h"],);}$resElement=\CIBlockElement::GetList($arSort,$arFilter, false, false,$arSelect);$obElement=$resElement->getNextElement();if($GLOBALS["ca07bgoluoc3ngfu"]($obElement)){$arResult=$obElement->getFields();$arRawItems=array($GLOBALS["3odrtg87hjf5gjcf"],$GLOBALS["utkkf4z65gkj5sdx"],$GLOBALS["1y8cfu3gk6w0kfzo"]);foreach($arRawItems as $strRawItem){if(isset($arResult[$strRawItem])){$arResult[$strRawItem]=$arResult[$GLOBALS["t2ejiqgh0pzp5me1"].$strRawItem];}}$arResult[$GLOBALS["l32ti4pi4hozbmgu"]]=array();if($arResult[$GLOBALS["as114zt8eflxy2pg"]] > 0){$arPicture=\CFile::getFileArray($arResult[$GLOBALS["byu9vsilvmukwlvp"]]);$arResult[$GLOBALS["olf5drdt4mwnvk5j"]]=$arPicture[$GLOBALS["4ckbv7uo1e58wtc6"]];$arResult[$GLOBALS["k1gnjgpt6oczlqxa"]][$arPicture[$GLOBALS["09s6poijmd4b6y77"]]]=$arPicture;unset($arPicture);}if($arResult[$GLOBALS["y11ff4gcp740jx4t"]] > 0){$arPicture=\CFile::getFileArray($arResult[$GLOBALS["6rgrri3l76yhvrda"]]);$arResult[$GLOBALS["tdsd4w0f2ilkd89n"]]=$arPicture[$GLOBALS["3a5mzjxb9dpja3el"]];$arResult[$GLOBALS["ey3log58oezzlh3b"]][$arPicture[$GLOBALS["hhdsb4t1b4fi2h0a"]]]=$arPicture;unset($arPicture);}$arResult[$GLOBALS["t4vrwrliqhz8a117"]]=array();$resSections=\CIBlockElement::GetElementGroups($intElementID, false, array($GLOBALS["i10nhb18ob9vsxjt"]));while($arSection=$resSections->getNext(false,false)){if($arSection[$GLOBALS["bth64y1pv8qvlw0m"]] !=$arResult[$GLOBALS["nqrksb51dvt83jle"]]){$arResult[$GLOBALS["ivwio8y6y0qg56u2"]][]=$arSection[$GLOBALS["p41qd1apn0m4ivab"]];}}$arResult[$GLOBALS["gyxygeegwlr4fyvg"]]=array();if($bGetSection&&$arResult[$GLOBALS["ddjn17356gi5p1je"]]){$arFilter=array($GLOBALS["69wfxa0k5ilpmlv4"]=>$arResult[$GLOBALS["xzm3ksvwtx9xzqbb"]],$GLOBALS["qo0smfnh7ffizi82"]=>$arResult[$GLOBALS["tlfujazmfqdgpkd9"]],$GLOBALS["2hdjbodwaesi3m20"]=>$GLOBALS["yjcja9ybim21tb4h"],);if($bFeatures){$arSelect=array($GLOBALS["9k3lsv0tn8alzb0g"],$GLOBALS["1kp5j7kvzpmti3eb"],$GLOBALS["as23pobpzzbirerw"],);if($GLOBALS["iwbsfbol189d4xvr"]($arFGroup[$GLOBALS["7kfeqwkvvvpapubj"]])){foreach($arFGroup[$GLOBALS["5ewrjyl3hjn8h09p"]] as $strField){$arSelect[]=$strField;}}$arSelect=$GLOBALS["7cubgypmbtwbllyd"]($arSelect);}else{$arSelect=array($GLOBALS["h40za6z7iao7f8ck"],$GLOBALS["bd2a45bfyckkm7cg"],$GLOBALS["wdfp62qiqctjl6d3"],$GLOBALS["r71hw3okfhh18z0u"],$GLOBALS["bytqed9n9xhssxl9"],$GLOBALS["dr46ezrurzr3ji1p"],$GLOBALS["ffpidm06y1l916nv"],$GLOBALS["t66q7u56vvynz145"],$GLOBALS["mgzankzkciu1qwvf"],$GLOBALS["th4yz90qdbdyiqay"],$GLOBALS["eeno7u4khp9att59"],$GLOBALS["47czcbbhrl2394ev"],$GLOBALS["peqi3v2kke1d65b3"],);}$resSection=\CIBlockSection::getList(array($GLOBALS["vfesmeyl1412w79l"]=>$GLOBALS["z33s1ti14jokrh87"]),$arFilter, false,$arSelect);if($arSection=$resSection->getNext()){$arRawItems=array($GLOBALS["9mgrlqikrdxwpit5"],$GLOBALS["uj4c8bjogsqtn2ek"]);foreach($arRawItems as $strRawItem){if(isset($arSection[$strRawItem])){$arSection[$strRawItem]=$arSection[$GLOBALS["99fubvwy8to1rcr5"].$strRawItem];}}if($arSection[$GLOBALS["wlx69dchlqxwv2xv"]] > 0){$arSection[$GLOBALS["43hvnf3oxprrzpx7"]]=\CFile::getPath($arSection[$GLOBALS["9527uqag3a10oefj"]]);}if($arSection[$GLOBALS["vt1az6jtsutegcmm"]] > 0){$arSection[$GLOBALS["d0mgizbntpk63v0k"]]=\CFile::getPath($arSection[$GLOBALS["p3fgoajuhpp567rz"]]);}$arResult[$GLOBALS["zngddap8akwmawx1"]]=$arSection;}unset($resSection,$arSection,$resSection2,$arSection2,$arFilter,$arSelect,$intParentSectionID);}$arResult[$GLOBALS["mo6mb9ulwfwoley2"]]=array();if($bGetIBlock){$arIBlockFilter=array($GLOBALS["vayuwdyf7mi4l006"]=>$arResult[$GLOBALS["1rvo023roae5s6fv"]],$GLOBALS["qfwc3i1yg1yrk7dw"]=>$GLOBALS["95ccscr3tc8ec8wm"],);$resIBlock=\CIBlock::getList(array(),$arIBlockFilter, false);if($arIBlock=$resIBlock->getNext()){$arRawItems=array($GLOBALS["xwutgqszj6z1888d"],$GLOBALS["dlb8azcuj18jpqpo"]);foreach($arRawItems as $strRawItem){$arIBlock[$strRawItem]=$arIBlock[$GLOBALS["9mgo33t4y0qjtrl8"].$strRawItem];}if($arIBlock[$GLOBALS["tivpa7mjxoo3s5ny"]] > 0){$arIBlockPicture=&static::$arCacheIBlockPicture[$arIBlock[$GLOBALS["n5wt81n5gjnian3e"]]];if(!isset($arIBlockPicture)){$arIBlockPicture=\CFile::getPath($arIBlock[$GLOBALS["gsowl16trfeamtl6"]]);}}$arResult[$GLOBALS["pmbokck1ald0mdj1"]]=$arIBlock;}unset($resIBlock,$arIBlock,$arIBlockFilter);}$arPropertyFilter=array($GLOBALS["ail3p65ilsviixol"]=>$GLOBALS["sjl8wq2tt6pbrp9s"],);if($bFeatures){$arPropertyFilter[$GLOBALS["e7ro1mz1yet34pk9"]]=$arFGroup[$GLOBALS["tipr1gcd1pmeqbai"]];}$arResult[$GLOBALS["nhg2gdx63e24hjna"]]=array();foreach($obElement->getProperties(false,$arPropertyFilter) as $arProp){$strPropKey=$GLOBALS["107w88y2cnt609yt"]($arProp[$GLOBALS["odflk8j5ya2vmbfc"]]) ? $arProp[$GLOBALS["88ptfuht6mi5xyzx"]] : $arProp[$GLOBALS["hq4k2h8hw7kmpoy3"]];$arResult[$GLOBALS["94j7ig4kx89v2p89"]][$strPropKey]=$arProp;}$bSkipBarcodes=$bFeatures&&!isset($arFGroup[$GLOBALS["hj3mnnixjw79cyur"]]);if(!$bSkipBarcodes&&$GLOBALS["jkd8k923005ddy51"]($GLOBALS["f5txwcktv4qdx2yn"])){$arResult[$GLOBALS["lf2jtqq5lowj2hbx"]]=array();$resBarcode=\CCatalogStoreBarCode::GetList(array(), array($GLOBALS["ziaimr6dp9kuua67"]=>$intElementID,$GLOBALS["qpn8q6p0172yj0sj"]=>0));while($arBarcode=$resBarcode->fetch()){$arResult[$GLOBALS["ehbuyl4tlbpoqqm3"]][]=$arBarcode[$GLOBALS["o2nsn7x6glpt3sbv"]];}unset($resBarcode,$arBarcode);}if(isset($arResult[$GLOBALS["n99rq0o0lhe4pa4o"]])){$arResult[$GLOBALS["5a3jbp1oh5q1jddy"]]=$arResult[$GLOBALS["bpuhey1vpupttfn9"]];$arResult[$GLOBALS["hrnl9mrspx9malrx"]]=$arResult[$GLOBALS["68zg4nua2dtc0gbl"]];}$arResult[$GLOBALS["938z89601hqo8wey"]]=$bParent;$arResult[$GLOBALS["90tcqnpmlg8jtmwn"]]=$bOffer;if($arResult[$GLOBALS["4sdzu1wxstwxk8bv"]]){$arResult[$GLOBALS["33ycrkqughnrs8bm"]]=$arCatalog[$GLOBALS["0e9gvl54zbfqfcoh"]];}if($arResult[$GLOBALS["8l4vlw6x4zf09m3d"]]){$arResult[$GLOBALS["sbsenxxo68ct63qa"]]=$arCatalog[$GLOBALS["7n77shsnvgu97rxe"]];}if($bGetOffers){$this->getElementOffers($arResult,$arProfile,$arFeatures);}$arSeo=[$GLOBALS["xz5pzaitv33prj3f"]=>$GLOBALS["gd7jxhk66fqady84"],$GLOBALS["1pjlar1p93gx9wzh"]=>$GLOBALS["kv4mgus2owvxpovx"],$GLOBALS["ki72pjqlebu7mcog"]=>$GLOBALS["l0gay5q9euyo40pn"],$GLOBALS["h848mf093h6caes8"]=>$GLOBALS["z8il4h5rrl5f563o"],$GLOBALS["nkshbygcr6thnqae"]=>$GLOBALS["p2183t0nqffstgfk"],$GLOBALS["j565k8t0mueev7j5"]=>$GLOBALS["fdfooqjtrj1363bm"],$GLOBALS["9qdcvlf95dl1oc0u"]=>$GLOBALS["vk6p1m1w24na2jl0"],$GLOBALS["8a40e0awn2nom052"]=>$GLOBALS["ic2cvjp7df393uga"],];if(!$bFeatures||array_intersect(array_keys($arSeo),$arFField)){if($GLOBALS["2jz54vs0zwbtljg4"]($GLOBALS["mk7mal4qhgvz13ri"])){$obIPropValues=new \Bitrix\IBlock\InheritedProperty\ElementValues($arResult[$GLOBALS["i7v0w8cgej0zv4g9"]],$arResult[$GLOBALS["yrqpdu19326e95t0"]]);$arIPropValues=$obIPropValues->getValues();if($GLOBALS["dilyn5wv6jczrbkz"]($arIPropValues)){foreach($arSeo as $strTo=>$strFtom){$arResult[$strTo]=$GLOBALS["zp6zaa5fl7fdtajp"]($arIPropValues[$strFtom]) ? $arIPropValues[$strFtom] : $GLOBALS["o7uxg0jva7bxqxup"];}}unset($obIPropValues,$arIPropValues,$strTo,$strFtom);}}unset($arSeo);if($bGetParent){if($GLOBALS["mwjp8y675p4ho3p4"]($arCatalog)&&$arCatalog[$GLOBALS["6j1zt8k4i3tmvs0m"]]){foreach($arResult[$GLOBALS["xnfb1h1o43pvnbmf"]] as $arProperty){if($arProperty[$GLOBALS["pxmns09yg0xs3ysr"]]==$arCatalog[$GLOBALS["1wqxea2q75ztv9yv"]]){$intParentElementID=$arProperty[$GLOBALS["xywk6d4o9piq03vq"]];$arResult[$GLOBALS["6q36e4td90t5l2kx"]]=$this->getElementArray($intParentElementID,$arCatalog[$GLOBALS["19qx91wulzjlwt8s"]],$bGetOffers_=false,$bGetParent_=false,$bGetSection_=true,$bGetIBlock_=true,$arFeatures);if(empty($arResult[$GLOBALS["du60r6rbsmwqta3f"]])){$arResult[$GLOBALS["vo5dw4f35oxuk611"]]=$arResult[$GLOBALS["oszinpewcbhqgs2e"]][$GLOBALS["be728d1aq0l9cjvg"]];}if(empty($arResult[$GLOBALS["now1cfw28iw0yzyu"]])){$arResult[$GLOBALS["xu1qlsgfp2p9phxe"]]=$arResult[$GLOBALS["4l7ala8z2v2sfwk2"]][$GLOBALS["z0yh5yhqprkrzpp1"]];}break;}}}}foreach(EventManager::getInstance()->findEventHandlers($this->strModuleId,$GLOBALS["yt87gpum91yn70nj"]) as $arHandler){ExecuteModuleEventEx($arHandler, array(&$arResult,$intElementID,$intIBlockID,$bGetParent,$obElement));}unset($arCatalog);return $arResult;}return false;}protected function getElementOffers(&$arElement,$arProfile,$arFeatures=null){$arElement[$GLOBALS["vtl0p35i0cmmd5g0"]]=array();$arElement[$GLOBALS["oex8y7miex4r2mfb"]]=0;$intIBlockID=$arElement[$GLOBALS["kz69jxm5yn3zud2n"]];$arCatalog=Helper::getCatalogArray($intIBlockID);if($GLOBALS["wz98vc9pbmy1l3ag"]($arCatalog)&&$arCatalog[$GLOBALS["zcj927v6vg43osf2"]]){$arElement[$GLOBALS["iismlvvcjgtshat6"]]=static::isIBlockHasSubsections($arCatalog[$GLOBALS["7td65ut6nipkpsik"]]);$arElement[$GLOBALS["rm8dbxhegqmut0mr"]]=$arCatalog[$GLOBALS["k8o0u9ahndsgcr7v"]];$arElement[$GLOBALS["7f90y7xx4oi54v5y"]]=$arCatalog[$GLOBALS["em6fxei91pj09s5e"]];$arSort=array();$arSort2Params=$arProfile[$GLOBALS["ob3hnvig4az09adx"]][$intIBlockID][$GLOBALS["jkgbh1bfny6ofaj5"]][$GLOBALS["8lo4l2vai2hp3bws"]];if($GLOBALS["rxi9z59g44b9rphj"]($arSort2Params)){foreach($arSort2Params[$GLOBALS["oxsrc653o80t4m2z"]] as $key=>$strField){$strOther=$arSort2Params[$GLOBALS["dnk4janobqyt2rb3"]][$key];$strOrder=$arSort2Params[$GLOBALS["0eu2rwj8upphrkaq"]][$key];if($strField==$GLOBALS["d88b15gng0yz5ad4"]){$arSort[$strOther]=$strOrder;}else{$arSort[$strField]=$strOrder;}}}$arFilter[$GLOBALS["3hlnquya3xhh3n1m"].$arCatalog[$GLOBALS["4jwa4rqrsr6iqrc6"]]]=$arElement[$GLOBALS["7akhuwj6zf2h0ojo"]];$arElement[$GLOBALS["z9025euvwjlypxns"]]=\CIBlockElement::GetList($arSort,$arFilter, array());if($arElement[$GLOBALS["1vzg75bkge239r5z"]] > 0){$arNavParams=array();$intOffersMaxCount=&$arProfile[$GLOBALS["xvvcov3u7gpap353"]][$intIBlockID][$GLOBALS["xuskyysvufkklf9d"]][$GLOBALS["7e7x49e5o9uhvktt"]];if($GLOBALS["bs2t0uti3ozbobmz"]($intOffersMaxCount)&&$intOffersMaxCount>0){$arNavParams[$GLOBALS["fuqgoi6rwo01ou0p"]]=$intOffersMaxCount;}$arProfileFilter=Helper::call($this->strModuleId,$GLOBALS["5j13kdckeeu3ct3i"],$GLOBALS["8wwlmxup1oo95uuz"], [$arProfile[$GLOBALS["5ajn66diomi6xi4d"]],$arCatalog[$GLOBALS["9web4tmdajagurpv"]]]);$arFilter=$GLOBALS["rpeypqqcfzk2q32d"]($arProfileFilter,$arFilter);unset($arProfileFilter);$arSelect=[$GLOBALS["ebpfrl3nbojrblhy"]];if($arOfferGroupData=$this->getOffersGroup($arProfile,$intIBlockID)){foreach($arOfferGroupData as $strOfferGroupPropId){$arSelect[]=sprintf($GLOBALS["gs2jfepf58g2bjdm"],$strOfferGroupPropId);}$arOfferGroups=[];}$resOffers=\CIBlockElement::GetList($arSort,$arFilter, false,$arNavParams,$arSelect);while($arOffer=$resOffers->getNext(false, false)){$bSkip=false;if($arOfferGroupData){$arOfferGroupItem=[];foreach($arOfferGroupData as $strOfferGroupPropId){$strKey=sprintf($GLOBALS["kmjqls89b366x74p"],$strOfferGroupPropId);$arOfferGroupItem[$strOfferGroupPropId]=$arOffer[$strKey];}if($GLOBALS["mnyaiph8be7qp226"]($arOfferGroupItem,$arOfferGroups)){$bSkip=true;}else{$arOfferGroups[]=$arOfferGroupItem;}}if($bSkip){continue;}$arElement[$GLOBALS["n1hmgftfhsaw3e8z"]][]=$GLOBALS["mebcqqm01x35c4to"]($arOffer[$GLOBALS["qr7uehh4zlx7xpyj"]]);}if(!empty($arElement[$GLOBALS["e85htn2xl4vmhbhy"]])){$intFirstOfferID=reset($arElement[$GLOBALS["e6z238skosvrwn8h"]]);$arElement[$GLOBALS["67l7hmzdljzt7dxa"]]=$this->getElementArray($intFirstOfferID,$arCatalog[$GLOBALS["xfi5x6zy7ro9vw1s"]],false, false, true, true,$arFeatures);}}}unset($intIBlockID,$arCatalog,$arSort,$arFilter,$intFirstOfferID,$resOffers,$arOffer);}protected function getOffersGroup($arProfile,$intIBlockID){$arResult=$arProfile[$GLOBALS["0oydc03mqj5qx9qq"]][$intIBlockID][$GLOBALS["anqf9i76fss6y6r6"]][$GLOBALS["i6pcxcgqpz9unxy8"]];if(!$GLOBALS["m31wefymaofnd2o6"]($arResult)||empty($arResult)){$arResult=false;}return $arResult;}protected static function isIBlockHasSubsections($intIBlockID){$bExists=false;if(isset(static::$arIBlockHasSubsectionsCache[$intIBlockID])){$bExists=static::$arIBlockHasSubsectionsCache[$intIBlockID];}else{$arSectionFilter=array($GLOBALS["f9skl4m4j5p10oxd"]=>$intIBlockID,$GLOBALS["mfvn95w1v8ajhhy0"]=>$GLOBALS["2w1p8nq478yanv2v"],);$resSection=\CIBlockSection::getList(array(),$arSectionFilter, false, array($GLOBALS["stil81sfv838bns8"]),array($GLOBALS["u8lke0sm4e6o7vm9"]=>1));if($arSection=$resSection->getNext(false, false)){$bExists=true;}static::$arIBlockHasSubsectionsCache[$intIBlockID]=$bExists;}return $bExists;}public function getNotGeneratedElementsID($intProfileID,$intIBlockID,$arSession){$arResult=array();$arFilter=Helper::call($this->strModuleId,$GLOBALS["8dcwujz4hma83eyr"],$GLOBALS["6frmjtu61sv2feqb"], [$intProfileID,$intIBlockID]);$arSubFilter=array($GLOBALS["5kzby64u4dj1vn6i"]=>$intProfileID,$GLOBALS["ac2pejwi0lsdjxqx"]=>$intIBlockID,);$strTableName=Helper::call($this->strModuleId,$GLOBALS["lb3u9kdtaixw7qv0"],$GLOBALS["9t3oc6acyeeqz4xl"]);$arFilter[$GLOBALS["w0usqh9edk8r1jeq"]]=new IBlockElementSubQuery($arSubFilter,$GLOBALS["8t63krt3zilgzdux"],$strTableName,$GLOBALS["910e8bzx7nxwto09"],$this->strModuleId);if(isset($arSession[$GLOBALS["61r67ruozwa4ua85"]][$intIBlockID][$GLOBALS["vv528tgapwzpo3uq"]])){$intLastID=$GLOBALS["lcxi4cfmk48q12hm"]($arSession[$GLOBALS["urmix6zpc78nu8s9"]][$intIBlockID][$GLOBALS["sx7img3c9r2rv7ac"]]);if($intLastID){$arFilter[$GLOBALS["cq32zwwel8wkhyd9"]]=$intLastID;}}$arNavParams=false;$resElements=\CIBlockElement::getList(array($GLOBALS["6zwrykgv78habsun"]=>$GLOBALS["zia3lm9sqcs6t7n2"]),$arFilter, false,$arNavParams, array($GLOBALS["qdp0y4yahx285hnf"]));while($arElement=$resElements->getNext(false, false)){$arResult[]=$GLOBALS["mufm1kv1lgttpbtz"]($arElement[$GLOBALS["fbizc0d2302ea4fo"]]);}return $arResult;}public function setMethod($intMethod){if($GLOBALS["y1q3nbz4pm6pnshm"]($intMethod, array(static::METHOD_CRON, static::METHOD_SITE))){$this->intMethod=$intMethod;}}public function isCron(){return $this->intMethod==static::METHOD_CRON;}public function startTime(){$fStepTime=FloatVal(Helper::getOption($this->strModuleId,$GLOBALS["qcz6zt70i0k0oz5a"]));if($fStepTime<=1){$fStepTime=20;}$this->intMaxTime=$fStepTime;$this->intStartTime=time();}public function haveTime($delta=null){if($this->isCron()){return true;}else{$delta=$GLOBALS["sz2t3ri0gpmhl3vh"]($delta)&&$delta > 0 ? $delta : 0;$bResult=time() - $this->intStartTime + $delta < $this->intMaxTime;return $bResult;}}public function executeProfile($intProfileID){$mResult=static::RESULT_ERROR;$bIsCron=$this->isCron();$bCanExecute=true;if($bIsCron&&Helper::call($this->strModuleId,$GLOBALS["vekda25ae5ox2gso"],$GLOBALS["10alye2lfwpwann2"], [$intProfileID])){$bCanExecute=false;$obDateStarted=Helper::call($this->strModuleId,$GLOBALS["w1who28qgm4bqct9"],$GLOBALS["iq3dsqhr29f77ugj"], [$intProfileID]);$strDateStarted=$obDateStarted->toString();print $GLOBALS["ul3k087ukoprbnnm"].$strDateStarted.$GLOBALS["zwe3pv95tltqxrfg"].PHP_EOL;unset($obDateStarted,$strDateStarted);}if($bCanExecute){$arProfile=Helper::call($this->strModuleId,$GLOBALS["889ize4uo4jb4x5u"],$GLOBALS["7o54vjb2iyszfmwm"], [$intProfileID]);if($GLOBALS["ui51i9eu0xbpr1jf"]($arProfile)&&$arProfile[$GLOBALS["c0iqxj3qzc6xyat0"]]==$GLOBALS["g0ejxa6tak8bg0yt"]){$arSession=&$arProfile[$GLOBALS["1j45crsokhykphw9"]];$arSession=$GLOBALS["tjizfqrhc6j2orbx"]($arSession);$arSession=$GLOBALS["gegafqnsyfmthsug"]($arSession) ? $arSession : array();if(!$GLOBALS["e4l5umfbe8gn0fer"]($arSession[$GLOBALS["x9eeffxr0fzyhy7o"]])){$arSession[$GLOBALS["zahflumqh5rtknu0"]]=$GLOBALS["2t9gymlyz881mmvo"](randString(32));}$arSteps=$this->getSteps($intProfileID);$strCurrentStep=&$arSession[$GLOBALS["si6w5pd5ym2b70fh"]];if(!$GLOBALS["yjgj2t0vjavdrkix"]($strCurrentStep)){$strCurrentStep=key($arSteps);}foreach($arSteps as $strStep=>$arStep){$bCanProcessStep=$bIsCron||$strStep==$strCurrentStep;if($bCanProcessStep){$strStepResultHTML=$GLOBALS["6lkz1wdqzfebt16y"];$mFuncResult=$GLOBALS["vt6p0avtezvao1xy"]($arStep[$GLOBALS["x1o7nze1tn0dv66p"]],$intProfileID, array($GLOBALS["pbfywei9xh15klgy"]=>&$arProfile,$GLOBALS["sepwzsj8mysqcumm"]=>&$arSession,$GLOBALS["jaegnhtb9geukpt5"]=>&$arSteps,$GLOBALS["8upk9779vnl4e971"]=>$strCurrentStep,$GLOBALS["cvjndz65emfkef94"]=>$arSteps[$strCurrentStep],$GLOBALS["nhn58n2e3yxjj6ci"]=>$bIsCron,));if($mFuncResult===static::RESULT_SUCCESS){$strNextStep=Helper::getNextKey($arSteps,$strCurrentStep);if($strNextStep===false){$mResult=static::RESULT_SUCCESS;}else{$mResult=static::RESULT_CONTINUE;}$strCurrentStep=$strNextStep;}elseif($mFuncResult===static::RESULT_CONTINUE){$mResult=static::RESULT_CONTINUE;}elseif($mFuncResult===static::RESULT_ERROR){$mResult=static::RESULT_ERROR;break;}if(!$bIsCron){break;}}}Helper::call($this->strModuleId,$GLOBALS["d9p9nzlyot3nbhcz"],$GLOBALS["1qck6pv7pzh6qo50"], [$intProfileID,$arSession]);if($bIsCron||$mResult===static::RESULT_SUCCESS||$mResult===static::RESULT_ERROR){Helper::call($this->strModuleId,$GLOBALS["z6lrx3cw9u0hgx2u"],$GLOBALS["4hs6yx5wvwhzqr21"], [$intProfileID]);}}else{Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["dxx4zzg3b4b2ibm7"]),$arProfile[$GLOBALS["ehv29s5hbw88yp6x"]]);}}return $mResult;}public function getSteps($intProfileID){$arProfile=Helper::call($this->strModuleId,$GLOBALS["zwum25r70seqi3ki"],$GLOBALS["hx91pra2r655ns8o"], [$intProfileID]);$arResult=array();$arStepPrepare=array($GLOBALS["cmcf8ukxsins20z1"]=>Loc::getMessage($GLOBALS["66vkxgjlnhoh2r65"]),$GLOBALS["2j6u3z5zblb56pue"]=>1,$GLOBALS["0dnzww7u7goefg72"]=>[$this,$GLOBALS["13c3f4vlgpu49iud"]],);$arResult[$GLOBALS["d3vjkzmy8l0mfd8w"]]=$arStepPrepare;$arResult[$GLOBALS["buiocjlclyiv1zqf"]]=array($GLOBALS["5l0amptvqcp7kynt"]=>Loc::getMessage($GLOBALS["ls4udyihg1l5uv3d"]),$GLOBALS["ynd9t3ezp5t5wyf4"]=>10,$GLOBALS["ubep6677v0xgvg81"]=>[$this,$GLOBALS["67uvyphz1umhf1vf"]],);if(DiscountRecalculation::isEnabled()){$arResult[$GLOBALS["sq2ep5ba7wdm78za"]]=array($GLOBALS["upyveylqbivl366g"]=>Loc::getMessage($GLOBALS["p62ggi45jlwvh4ev"]),$GLOBALS["3p1z5rm3vfwnmzra"]=>20,$GLOBALS["3p2ar450gjprpwgd"]=>[$this,$GLOBALS["4gp7sljeu1vt97zi"]],);}$arResult[$GLOBALS["yelj22n1u0zwd5a9"]]=array($GLOBALS["v2yn4py800uslc5k"]=>Loc::getMessage($GLOBALS["9zkj0mxrnld2e9c2"]),$GLOBALS["7myuhrbebovgb63o"]=>50,$GLOBALS["el48a69sdyxud6fx"]=>[$this,$GLOBALS["e611o7xvabn8y8wc"]],);$arResult[$GLOBALS["x8rb9rpjwiln6unv"]]=array($GLOBALS["0ybf31kdd3hkr2d8"]=>Loc::getMessage($GLOBALS["bv1ris2s76fpuyec"]),$GLOBALS["udtv0i222ehpzbv5"]=>100,$GLOBALS["ajf2dxu6cf0putyi"]=>[$this,$GLOBALS["ubf0fv261g6yppou"]],);$arResult[$GLOBALS["ocqzt35gxjjnf70y"]]=array($GLOBALS["cd5v1yi28cwmattm"]=>Loc::getMessage($GLOBALS["q2idfk6h6c1ka083"]),$GLOBALS["04oszk2vqd287v01"]=>1000000,$GLOBALS["3j5n0lxdugfpx15k"]=>[$this,$GLOBALS["kdjupzfej7ps211d"]],);$arProfile=Helper::call($this->strModuleId,$GLOBALS["m6g619452qkgnni8"],$GLOBALS["c0ejumc39s9ul1s9"], [$intProfileID]);$arPlugins=$this->findPlugins(false);$arPlugin=$this->getPluginInfo($arProfile[$GLOBALS["v5tzsxkozpnofw05"]]);if($GLOBALS["6e364p38ycvx1xsn"]($arPlugin)&&$GLOBALS["17ihvplchiccmtuv"]($arPlugin[$GLOBALS["gmtrp9ham4nwnudp"]])){$obPlugin=new $arPlugin[$GLOBALS["r2tm1i052l4qth0q"]]($this->strModuleId);$obPlugin->setProfileArray($arProfile);$arPluginSteps=$obPlugin->getSteps();if($GLOBALS["klwnnlmebsf0e63z"]($arPluginSteps)){foreach($arPluginSteps as $strStep=>$arStep){$strStep=$GLOBALS["nj8gad4mgcfqrizb"]($strStep);if(!$GLOBALS["h340yzhia51puxib"]($strStep, array($GLOBALS["lnsa7qmosb4rf9lv"],$GLOBALS["qw27itt271060h5w"],$GLOBALS["r6ni70e5402uaclj"],$GLOBALS["tf040f3klv5t182m"]))){$arResult[$strStep]=$arStep;}}}unset($obPlugin);}foreach(EventManager::getInstance()->findEventHandlers($this->strModuleId,$GLOBALS["qobyr3j9rv6rub0c"]) as $arHandler){ExecuteModuleEventEx($arHandler, array(&$arResult,$this->strModuleId,$intProfileID));}$arResult[$GLOBALS["w8tyrbgbw0kmo7jl"]]=$arStepPrepare;$GLOBALS["9w8vkc2f61i6ckg3"]($arResult,$GLOBALS["8s76r3xf6h3p3fhl"]);unset($arPlugins,$arProfile);return $arResult;}public function stepPrepare($intProfileID,$arData){$bIsCron=$arData[$GLOBALS["wlho0ag1igodlscz"]];$arSession=&$arData[$GLOBALS["d8bgihfnxgp1uuf5"]];$arCheckResult=$this->stepPrepare_Check($arData);if(!$GLOBALS["bxlt66al214al1dy"]($arCheckResult)&&$this->strModuleId !=$GLOBALS["ic0df74d8m8ovhlf"]){$strMessage=$GLOBALS["sibzuuzqr72jg1tz"];if(!Helper::isUtf()){$strMessage=Helper::convertEncoding($strMessage,$GLOBALS["15r19n74gm3di8ps"],$GLOBALS["o8exe219nvpd79m2"]);}if(!$bIsCron){print Helper::showError($strMessage);}Log::getInstance($this->strModuleId)->add($strMessage,$intProfileID);$this->sendErrorEmail(Loc::getMessage($GLOBALS["92e3tgait9gc2cf3"]),$arData);return static::RESULT_ERROR;}$bExpired=$arCheckResult[$GLOBALS["bmgtfcnor5kelykb"]];if($GLOBALS["iol7da3p250ubir9"]($GLOBALS[$GLOBALS["pbzjs47g9gaxs2zf"]])&&$GLOBALS["qxctvqzsc94n0p5f"]($GLOBALS["o4fiz0nqwv6z1ez5"],$GLOBALS[$GLOBALS["d4a0juxylyey9qs5"]])){$bExpired=true;}if($bExpired){$arStopClassesDefault=[$GLOBALS["mtlensh2wcdirg8q"],$GLOBALS["se0mucxvbi1j3kcu"],$GLOBALS["c24ujvrldqvf7004"],$GLOBALS["k4bw0iw8dqezlp1x"],$GLOBALS["7z13u4kzqg4jk312"],$GLOBALS["37dkcohr6iyd5z0x"],];if($this->strModuleId==$GLOBALS["6hq8zqf1f3jd1tbx"]){$arStopClassesDefault=[];}$arStopClassesForModules=[$GLOBALS["wgkg1gpf8yn2p1c1"]=>[$GLOBALS["jl068miy64c0tbq7"],$GLOBALS["updlnf1buo3bghuf"],$GLOBALS["0b13jpm3s1ory0zt"],$GLOBALS["906lcps5a2yvs2nm"],$GLOBALS["fdm8awm9e35hr60s"],],$GLOBALS["01wq0f27mr80wow3"]=>[$GLOBALS["mt9m0t3qqfnej1u3"],$GLOBALS["fp9hvhg8tua6gcnv"],$GLOBALS["by2sshxfw0bewo0t"],$GLOBALS["grcfesgcb7ibkurt"],$GLOBALS["6cpkud3q52hgvuxz"],$GLOBALS["95hsynvuo2vuthdu"],$GLOBALS["43jbrwl4g0d8wy20"],$GLOBALS["tvxb37ncssk1fd9m"],$GLOBALS["igjlq3y0hfnetbqy"],$GLOBALS["x8fiil2vr26d2yzi"],$GLOBALS["c9lfwti597dc79px"],$GLOBALS["8s6snnh9lahldokw"],],];$arStopClasses=$arStopClassesDefault;$arStopClassesModule=$arStopClassesForModules[$this->strModuleCode];if($GLOBALS["333dr2so43p83reo"]($arStopClassesModule)){$arStopClasses=$GLOBALS["64mm60j3c1lnu4ln"]($arStopClasses,$arStopClassesModule);}$arCurrClasses=[];$arPlugin=$this->getPluginInfo($arData[$GLOBALS["k3rjkhs6paj63n0p"]][$GLOBALS["gahcz7k7ci0snndi"]]);$strClass=$arPlugin[$GLOBALS["h3rg36tn87l28bwx"]];while(true){$arCurrClasses[]=$strClass;if(!$GLOBALS["0lj680mrieptfvew"]($strClass)){break;}$strClass=$GLOBALS["68vipoltjytda4hf"]($strClass);}$bStop=$arCheckResult[$GLOBALS["5pnjg6eq5vgwla9a"]]||count(array_intersect($arCurrClasses,$arStopClasses)) > 0;if($bStop){$strMessagePaid=$GLOBALS["qk02hizbdq72ccxc"];$strMessagePaidText=$GLOBALS["76a6ca2mqxb92h2z"];$strMessageDemo=$GLOBALS["h2lqwkte48gx2s0r"];$strMessageDemoText=$GLOBALS["7f03mdc2ddc5hon1"];$strMessagePaid=sprintf(base64_decode($strMessagePaid),$this->strModuleId);$strMessagePaidText=sprintf(base64_decode($strMessagePaidText),$this->strModuleId);$strMessageDemo=sprintf(base64_decode($strMessageDemo),$this->strModuleId);$strMessageDemoText=sprintf(base64_decode($strMessageDemoText),$this->strModuleId);$strMessage=$arCheckResult[$GLOBALS["r8tsrpqtay67d4ib"]] ? $strMessageDemo : $strMessagePaid;$strDetails=$arCheckResult[$GLOBALS["vzcjb3ywko3t7tuo"]] ? $strMessageDemoText : $strMessagePaidText;if(!Helper::isUtf()){$strMessage=Helper::convertEncoding($strMessage,$GLOBALS["5b8d053dnuzacyev"],$GLOBALS["4ycmyu7ctoehaqt2"]);$strDetails=Helper::convertEncoding($strDetails,$GLOBALS["w2dz47gos6p1dw2u"],$GLOBALS["so98rqqwbnmlew05"]);}if($bIsCron){print sprintf($GLOBALS["9yzvgcrewd59fwpd"].PHP_EOL,$this->strModuleId);}else{print Helper::showError($strMessage,$strDetails);}Log::getInstance($this->strModuleId)->add($strMessage.$GLOBALS["zzkyzrxx448rs0g4"].strip_tags($strDetails),$intProfileID);$this->sendErrorEmail(Loc::getMessage($GLOBALS["q3spy6yxiyfqy5q1"]),$arData);return static::RESULT_ERROR;}else{if($this->strModuleId==$GLOBALS["fb3vkgpm4yhxm19a"]){if($bIsCron){$strMessage=$GLOBALS["wr8zw5ly66w9j387"];$strMessage=sprintf(base64_decode($strMessage),$this->strModuleId);print $strMessage.PHP_EOL;if(!Helper::isUtf()){$strMessage=Helper::convertEncoding($strMessage,$GLOBALS["e26tlujgy2n1j0tp"],$GLOBALS["hoacd9yshuce2eki"]);}Log::getInstance($this->strModuleId)->add($strMessage,$intProfileID);$this->sendErrorEmail(Loc::getMessage($GLOBALS["qzp1i45dpn29yu83"]),$arData);return static::RESULT_ERROR;}elseif(Helper::getOption($this->strModuleId,$GLOBALS["3ojvirkvj2tllarm"])==$GLOBALS["zl0daas6jpazt20l"]){$strMessage=$GLOBALS["h5o2w8vluftohn6n"];$strMessage=sprintf(base64_decode($strMessage),$this->strModuleId);if(!Helper::isUtf()){$strMessage=Helper::convertEncoding($strMessage,$GLOBALS["sn7ek7hlb5l72b5e"],$GLOBALS["jns5a1b9lcr99igz"]);}Log::getInstance($this->strModuleId)->add($strMessage,$intProfileID);if(!$bIsCron){print Helper::showError($strMessage);}$this->sendErrorEmail(Loc::getMessage($GLOBALS["gkqqi57kwivpq5zi"]),$arData);return static::RESULT_ERROR;}}}}if(!$this->stepPrepare_checkPermissions($intProfileID,$arData,$strFilename)){$strMessage=Loc::getMessage($GLOBALS["7nak3n0c8jg9i31n"], array($GLOBALS["w81ihqw3oiksga8z"]=>$strFilename,));Log::getInstance($this->strModuleId)->add($strMessage,$intProfileID);if(!$bIsCron){print Helper::showError($strMessage);}$this->sendErrorEmail(Loc::getMessage($GLOBALS["iy9mtt8aqfsxa8gm"]),$arData);return static::RESULT_ERROR;}foreach(EventManager::getInstance()->findEventHandlers($this->strModuleId,$GLOBALS["awawgfz71g2kh1wi"]) as $arHandler){if(ExecuteModuleEventEx($arHandler, [$intProfileID, &$arData])===static::RESULT_ERROR){$this->sendErrorEmail(Loc::getMessage($GLOBALS["i2mer3z9qpnkc9gl"]),$arData);return static::RESULT_ERROR;}}$arSession[$GLOBALS["cmifcag63kpxty2y"]]=array($GLOBALS["aa61w5c260qshvec"]=>0,$GLOBALS["o5nwd5t4n1z0uma3"]=>0,$GLOBALS["eynnnw703t0cdch6"]=>0,$GLOBALS["efmzuyzstp6ycrzd"]=>0,$GLOBALS["31wrl1yzdqwoo0ww"]=>0,);if($bIsCron){Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["42n27ln3qhrvwdfk"]),$intProfileID);Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["xva5bbdwuzb2xoao"], array($GLOBALS["ploj59dwolkc8zd1"]=>Cli::getPid(),)),$intProfileID, true);}else{Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["r1hcqgswunjc2a48"]),$intProfileID);}$arPlugin=$this->getPluginInfo($arData[$GLOBALS["bsy2u5p2sv9st9hv"]][$GLOBALS["a6phxanasiy1mjhq"]]);if(!$GLOBALS["kedtx3c0tj7l2nbe"]($arPlugin)||empty($arPlugin)){$strMessage=Loc::getMessage($GLOBALS["8avt81j7rbv33o87"], array($GLOBALS["v1lkwk281x94tqve"]=>$arData[$GLOBALS["3l8yp90g6j92pb6x"]][$GLOBALS["1sic1b631i2j7c6p"]],));Log::getInstance($this->strModuleId)->add($strMessage,$intProfileID);if(!$bIsCron){print Helper::showError($strMessage);}$this->sendErrorEmail(Loc::getMessage($GLOBALS["y2axav94gf004s0k"]),$arData);return static::RESULT_ERROR;}Log::getInstance($this->strModuleId)->add(Loc::getMessage($GLOBALS["o9wwxbnppkxb6434"], array($GLOBALS["6ubetu5s80yh6vkt"]=>$arPlugin[$GLOBALS["vhhzy1a47cry4e3d"]],$GLOBALS["a1mh0c4xhai7b26d"]=>$arPlugin[$GLOBALS["jm1dmp4gwcflk6c8"]],)),$intProfileID, true);unset($arPlugin);Helper::call($this->strModuleId,$GLOBALS["ugeh4fv5zy3r0ra6"],$GLOBALS["ofymvgmyv8tg1300"], [$intProfileID]);if($bIsCron){Helper::call($this->strModuleId,$GLOBALS["wbn1qh97zh1mq5b4"],$GLOBALS["pn7um7qe5lcyfn25"], [$intProfileID]);}Helper::call($this->strModuleId,$GLOBALS["bve1ttesixjg29rn"],$GLOBALS["9yla111g2br8txyr"], [$intProfileID]);$arSession[$GLOBALS["a29yaqabehipjtu4"]]=time();$strIP=$_SERVER[$GLOBALS["xk7vjmltxwedozg2"]];if((!$GLOBALS["o3lxq2jfr1nglu4q"]($strIP)||$strIP==$GLOBALS["pfqmao3bmdn1vvwk"])&&$GLOBALS["69704czjbgy52m2d"]($_SERVER[$GLOBALS["vg4ehwlp1qiy9sz2"]])){$strIP=$_SERVER[$GLOBALS["f0tnkq0b8n1hiw48"]];}$intUserId=null;if($this->intUserId){$intUserId=$this->intUserId;}elseif($GLOBALS["bubisjuqeu6b4454"]($GLOBALS[$GLOBALS["ut81t78r6disazt5"]])&&$GLOBALS[$GLOBALS["q0c952bq4bj5507o"]]->isAuthorized()){$intUserId=$GLOBALS[$GLOBALS["3a78a1vt071fzuu5"]]->getId();}$intFound=0;$arIBlocksID=Helper::call($this->strModuleId,$GLOBALS["5ktj4ik70187hg8x"],$GLOBALS["rwc7b20nac8rfp5c"], [$intProfileID, true]);foreach($arIBlocksID as $intIBlockId){$arFilter=Helper::call($this->strModuleId,$GLOBALS["6pr3h8r4ow4sxx05"],$GLOBALS["do1xujv1z1ojkem5"], [$intProfileID,$intIBlockId]);if(!empty($arFilter)){$intCountElements=$GLOBALS["qcj78hkarfwtuu60"](\CIBlockElement::getList([],$arFilter, []));$intFound +=$intCountElements;}}if(!$intFound){$strMessage=Loc::getMessage($GLOBALS["mv7x41iexxh0w05f"]);Log::getInstance($this->strModuleId)->add($strMessage,$intProfileID);if(!$bIsCron){print Helper::showError($strMessage);}$this->sendErrorEmail(Loc::getMessage($GLOBALS["3texs438kog5kj3e"]),$arData);return static::RESULT_ERROR;}$arHistory=[$GLOBALS["flb7kylkwxh5whb1"]=>$intProfileID,$GLOBALS["bk6btmhmic23ugo9"]=>new \Bitrix\Main\Type\DateTime(),$GLOBALS["9y8n0g2bka0p8jnl"]=>$bIsCron ? $GLOBALS["fk4yi8swl6n1erb6"] : $GLOBALS["9k777q045yxae1t8"],$GLOBALS["7jwvdj3uxh6k7aam"]=>$intUserId,$GLOBALS["fggpat61n66e05ua"]=>!$bIsCron ? $strIP : null,$GLOBALS["6as4xb3ddh2sq96h"]=>Helper::getCurrentCliCommand(),$GLOBALS["zm30i4ulsehfk3bi"]=>Cli::getPid(),$GLOBALS["j8u1xekh1l5wtrx9"]=>Helper::getOption($this->strModuleId,$GLOBALS["sor0b4ew2uz2uac3"])==$GLOBALS["77r1dhfbfbfsm6kr"] ? $GLOBALS["24knc1z9yewzdtb9"] : $GLOBALS["z7ong2izpj70szls"],$GLOBALS["pee929usouavlsuy"]=>Helper::getOption($this->strModuleId,$GLOBALS["l5em2r59wzan4egi"])==$GLOBALS["ozk5r3b1lnwbkh6x"]? Helper::getOption($this->strModuleId,$GLOBALS["w5xmmdr2grt52sc5"]) : null,$GLOBALS["a5isdplfltscqfyf"]=>Helper::getOption($this->strModuleId,$GLOBALS["qtcae6299b6xvj13"])==$GLOBALS["xqanxze7zd83tpwn"]? Helper::getOption($this->strModuleId,$GLOBALS["91wprno7c7goyivh"].($bIsCron?$GLOBALS["wwg7pleruukhoj7i"]:$GLOBALS["9tn1tqycg8qyvua2"])) : null,$GLOBALS["l36jjaewdyg6mojz"]=>sprintf($GLOBALS["mw0hexixj2wg87av"], Helper::getModuleVersion($this->strModuleId),Helper::getModuleVersion(ACRIT_CORE)),];$obResult=Helper::call($this->strModuleId,$GLOBALS["nm8rotrp93ke4z0u"],$GLOBALS["d4z3mb3bk2yt6etv"], [$arHistory]);if($obResult->isSuccess()){$arSession[$GLOBALS["x3ajmm80x579expw"]]=$obResult->getID();}return static::RESULT_SUCCESS;}public function stepPrepare_Check($arData){$bCron=$arData[$GLOBALS["kjy6u9srq0wn2xgj"]];$strApiUrl=$GLOBALS["emxyb8v2k3ww5npw"];$strApiMethod=$GLOBALS["inhi37yfgd6ripdh"];require_once(Helper::root().$GLOBALS["d64kxxg8qmcrp2i6"]);$strLicenseHash=md5($GLOBALS["ko3gbtedzkoc7ybj"].\CUpdateClientPartner::getLicenseKey().$GLOBALS["qvcp33s83z93oepk"]);$arGetValues=[$GLOBALS["d1xinvxtzo0keli6"]=>$GLOBALS["nl32vau7opqddh3f"],$GLOBALS["41l9wnqpv70o1nhy"]=>$this->strModuleId,$GLOBALS["l4x9e7rx93l9zy6e"]=>$strLicenseHash,$GLOBALS["lhhxexd67e1l4zsy"]=>urlencode($arData[$GLOBALS["30snzio2y2iszo5g"]][$GLOBALS["br5d73tqgogzu4ol"]]),$GLOBALS["y6c1w7siqpv0tks5"]=>$arData[$GLOBALS["60kxixol9wnbdjuw"]][$GLOBALS["g9bd8plnv9c25ju5"]],$GLOBALS["6dx8oqt54fmw1d7y"]=>$arData[$GLOBALS["y9vvy00tej6wv7lz"]][$GLOBALS["d7fvubm3929wyzm5"]],];ksort($arGetValues);$arHashTest=[$GLOBALS["0b6o8hee1dc8bei4"],$strApiMethod,$GLOBALS["14yg2ctfztwb8s1p"]($GLOBALS["jmv8rwhi4ghi04c7"],$arGetValues),];$arGetValues[$GLOBALS["jmmb522f6eunizaa"]]=md5($GLOBALS["jcylad20zeo6fon2"]($GLOBALS["5f4t16h5zpqon76i"],$arHashTest));$strUrl=$strApiUrl.$strApiMethod.$GLOBALS["wnou3i95a5gr4py7"].http_build_query($arGetValues);$strUserAgent=sprintf($GLOBALS["qdu843ukfttil56r"], SM_VERSION,(Helper::isUtf() ? $GLOBALS["ghi5bzybf76we4xf"] : $GLOBALS["hay2bl4u6bmhfkst"]),$bCron ? gethostname() : $_SERVER[$GLOBALS["51ue12hvkmvrzbtc"]],$bCron ? $GLOBALS["21pi9ubpqp2wxg3o"] : $GLOBALS["5da3undo901urz5h"],$this->strModuleId, Helper::getModuleVersion($this->strModuleId),Helper::getModuleVersion(ACRIT_CORE),$arData[$GLOBALS["zvz0zgtjytuppak9"]][$GLOBALS["g30elw1ck6drn4hx"]],$arData[$GLOBALS["xukye86jombo9mys"]][$GLOBALS["gd235tn6zqv6pb4j"]]);$obHttpClient=new \Bitrix\Main\Web\HttpClient;$obHttpClient->setTimeout(5);$obHttpClient->setHeader($GLOBALS["ywzpsc0oxjexjbkv"],$strUserAgent);$obHttpClient->disableSslVerification();$strJsonResult=$obHttpClient->get($strUrl);if(!$GLOBALS["kj03vrkk86xrn6rc"]($strJsonResult)){$this->sendErrorEmail(Loc::getMessage($GLOBALS["v76xgiyq0ait3qm3"]),$arData);return false;}try{$arJsonResult=\Bitrix\Main\Web\Json::decode($strJsonResult);}catch(\Exception $obException){}if(!$GLOBALS["rarpgo4c0l1rf0ji"]($arJsonResult)||empty($arJsonResult)){if($_COOKIE[$GLOBALS["3owl82u7q3lfg3cc"]]==$GLOBALS["p0arpqpxotrpwj0p"]){Helper::P($GLOBALS["n9bdmueqmbyrrzb9"].PHP_EOL.htmlspecialcharsbx($strJsonResult));}$this->sendErrorEmail(Loc::getMessage($GLOBALS["vy7whwr8ct5w2aoi"]),$arData);return false;}$funcDecrypt=function($strText){$intRowLength=64;$intPrecision=4;$strAlphabet=$GLOBALS["2o8p1a3pdr7yikjt"];$strText=str_replace("\n",$GLOBALS["my3gqtsf33unq8p7"],$strText);$strKey=mb_substr($strText, 0,$intRowLength);$strText=mb_substr($strText,$intRowLength);$intSumm=0;for($i=0; $i < $intRowLength; $i++){$strChar=mb_substr($strKey,$i, 1);$intSumm +=ord($strChar);}unset($strChar,$i);$strNum=number_format($intSumm / $intRowLength,$intPrecision,$GLOBALS["c9bj5byg97kqo3db"],$GLOBALS["e8br57tl4iuu6d07"]);$strNum=str_replace($GLOBALS["s66y1v3hv3q7fpth"],$GLOBALS["jnqgcrxx6t3072ig"],$strNum);$arNum=str_split($strNum);$intLastDigit=$GLOBALS["trixja4dumuu7rgr"]($arNum);if($intLastDigit==0){$intLastDigit=max($arNum, 1);}$arNum[]=$intLastDigit;$intDigitCount=count($arNum);unset($intLastDigit);$intPos=preg_match_all($GLOBALS["oui69uehef27pn9g"],$strKey);$arSymbol=[];$intIndex=0;$intLength=null;while(true){$intOffset=$intIndex % $intDigitCount;$intOffset=$arNum[$intOffset];$intPos +=$intOffset;$strChar=$strText[$intPos];if(!$intLength){if($strChar==$GLOBALS["kmsywfq0rwmam91z"]){$intLength=$GLOBALS["dasqot75cwu1aeih"]($GLOBALS["ay3nnxabwrezwg4a"],$arSymbol);$arSymbol=[];$strChar=null;}}elseif(count($arSymbol)==$intLength){break;}if($GLOBALS["hsvrin48dm2z6oq9"]($strChar)){$arSymbol[$intPos]=$strChar;}$intIndex++;if($intIndex==10000){break;}}$strResult=$GLOBALS["u0hr47cp616wwm1t"]($GLOBALS["9w68h7p44xvr0n12"],$arSymbol);$strResult=base64_decode($strResult);return $strResult;};if($GLOBALS["tvzg1t2n2xt4b1j0"]($arJsonResult[$GLOBALS["ft663t4grwm5lqmr"]])&&$GLOBALS["5ss9kjqfq5yyit3g"]($strData=$funcDecrypt($arJsonResult[$GLOBALS["xects92r9nv446lv"]]))){$arJson=\Bitrix\Main\Web\Json::decode($strData);require_once(Helper::root().$GLOBALS["mrud9v41wnhlbikk"]);$strLicenseHash=md5($GLOBALS["t3e3dpu2em399nbq"].\CUpdateClientPartner::getLicenseKey().$GLOBALS["he6f6alcdna6d5er"]);if($arJson[$GLOBALS["h1f6niqsqsjrn1tn"]]==$strLicenseHash){if($arJson[$GLOBALS["lkl41zmmwgbgordv"]]==$arData[$GLOBALS["kbqik3f0t4m2lshm"]][$GLOBALS["vlxy35itvwkbo55f"]]){if($arJson[$GLOBALS["uigdqj78hqdpg2n3"]]==$arData[$GLOBALS["c8x5zwtnimyyrx1c"]][$GLOBALS["rfkkaf05zcm20mnb"]]){return $arJson;}}}}return false;}protected function stepPrepare_checkPermissions($intProfileID,$arData, &$strFileName){$bWriteable=false;if($GLOBALS["vfvyde9a4c5ypm31"]($arData[$GLOBALS["ji769kulv12gshxs"]][$GLOBALS["obfbu9ggwtxh0fqz"]][$GLOBALS["kyylpl2u5fqg6z3l"]])||!$GLOBALS["tvk8l1ooguxytkmu"]($arData[$GLOBALS["9bijmu75b37to4k6"]][$GLOBALS["7dtv60jc5v044g2p"]][$GLOBALS["p2zey2np6p3pn6kj"]])){$bWriteable=true;}if(!$bWriteable){$strFileName=Helper::path($arData[$GLOBALS["z7tczzt00gg2svd8"]][$GLOBALS["y3p0cm7i945nv880"]][$GLOBALS["0dxoasnpfl9k9wj9"]]);$bWriteable=$this->stepPrepare_checkWriteable($strFileName);if($bWriteable){$strFile=$GLOBALS["kvjeew961ff3so5v"]($strFileName, PATHINFO_BASENAME);$strFileName=Helper::call($this->strModuleId,$GLOBALS["f9dq21h2f6m3x95u"],$GLOBALS["3uwt00vux9xmomga"], [$intProfileID, true, true]).$GLOBALS["okb19nalbd9em7q0"].$strFile;$bWriteable=$this->stepPrepare_checkWriteable($strFileName);if($bWriteable){$strFileName=null;}}}return $bWriteable;}protected function stepPrepare_checkWriteable($strFileName){$bResult=false;if($GLOBALS["ry0ybeceah7k8x22"]($strFileName)&&$GLOBALS["vj84yd34vqkx4js2"]($strFileName, 0, 1)==$GLOBALS["c73e6z3he2xo2cny"]&&$GLOBALS["t1k0fhf452fqerte"]($strFileName, 1, 1) !=$GLOBALS["v6ntgrppkjpfbdte"]){$strFileNameFull=Helper::root().$strFileName;$bFileCreatedForTest=false;$bPathCreatedForTest=false;if(!file_exists($strFileNameFull)){$strDir=$GLOBALS["taf8q3k4j10xaq8b"]($strFileNameFull, PATHINFO_DIRNAME);if(!$GLOBALS["26016w58novvytmh"]($strDir)&&mkdir($strDir, BX_DIR_PERMISSIONS, true)){$bPathCreatedForTest=false;}if($GLOBALS["p0959m13njsd24av"]($strDir)&&$GLOBALS["lw9bm4pcqd8k5wcf"]($strFileNameFull,$GLOBALS["a4fi37i0uuxytl5l"])){$bFileCreatedForTest=true;}}if(is_writeable($strFileNameFull)){$bResult=true;}if($bFileCreatedForTest){@unlink($strFileNameFull);}}return $bResult;}public function stepAutoDelete($intProfileID,$arData){if($arData[$GLOBALS["7n0uk7l17852s030"]][$GLOBALS["rz7k9jjlx56ylqci"]] !=$GLOBALS["ew76d1dso1xyh4ye"]){Helper::call($this->strModuleId,$GLOBALS["mvccezze03jun17h"],$GLOBALS["bxmjgazio0y6ozlt"], [$intProfileID]);Helper::call($this->strModuleId,$GLOBALS["sju6oo3a8ya2t2c1"],$GLOBALS["h0lphn0ae82x92tl"], [$intProfileID]);}else{Helper::call($this->strModuleId,$GLOBALS["tbzi05u50c903vgk"],$GLOBALS["yvvq250x964s69g8"], [$intProfileID]);}return static::RESULT_SUCCESS;}public function stepDiscounts($intProfileID,$arData){$arSession=&$arData[$GLOBALS["e13238z46gzofboh"]][$GLOBALS["58ozzhj9m485nez0"]];if(!$GLOBALS["7lw0vymjb3228dpc"]($arSession)){$arSession[$GLOBALS["rf6epw4cba0nqrs7"]]=array();$arIBlocks=Helper::call($this->strModuleId,$GLOBALS["qf9y5kq0lhgn9hs1"],$GLOBALS["ck39hrffl4fmhe9g"], [$intProfileID, true]);foreach($arIBlocks as $intIBlockID){DiscountRecalculation::checkProperties($intIBlockID);$arSession[$GLOBALS["ei0w7q93p0z14428"]][$intIBlockID]=array();}$arSession[$GLOBALS["wrsoi5yhmixgfuo0"]]=$arSession[$GLOBALS["ftdhil3b8wndtevl"]]=$arSession[$GLOBALS["l8nslhywx894faqr"]]=0;foreach($arIBlocks as $intIBlockID){$arFilter=Helper::call($this->strModuleId,$GLOBALS["gsgvrzxts3tqo7om"],$GLOBALS["i0hqafmi07yzuo6t"], [$intProfileID,$intIBlockID]);static::removeDiscountsFromFilter($arFilter);$arSession[$GLOBALS["ha1u8kfj18koidri"]] +=\CIBlockElement::getList(array(),$arFilter, array());}}$arPrices=Helper::getPriceList(array($GLOBALS["237gy7w9u8ggsabd"]=>$GLOBALS["vs4o2r3ygu70n7uc"]));$bBreaked=false;foreach($arSession[$GLOBALS["2z0jqbq55cvx6g6r"]] as $intIBlockID=>$arIBlock){if($arIBlock[$GLOBALS["vjb1j7j6p6k8oayi"]]){continue;}$arSort=array($GLOBALS["99camrv014m028xp"]=>$GLOBALS["4aabjjlgk2r0sx6x"],);$arFilter=Helper::call($this->strModuleId,$GLOBALS["vyth5mk3tfbcs5mi"],$GLOBALS["18mnhpz8eutoboj0"], [$intProfileID,$intIBlockID]);static::removeDiscountsFromFilter($arFilter);if($arIBlock[$GLOBALS["npehp95zy9zxogxz"]] > 0){$arFilter[$GLOBALS["tna9cctls9ewybly"]]=$arIBlock[$GLOBALS["a06j2ikf81046rl0"]];}$resItems=\CIBlockElement::getList($arSort,$arFilter, false, false, array($GLOBALS["l707goele8y98025"]));while($arItem=$resItems->getNext(false, false)){DiscountRecalculation::processElement($arItem[$GLOBALS["2scw3ihcfn4nozrf"]],$arPrices);$arSession[$GLOBALS["zjsz2ksuf21mxtt7"]][$intIBlockID][$GLOBALS["wrgvecmp6cyacqup"]]=$arItem[$GLOBALS["hcfy9pqiw8my7g62"]];$arSession[$GLOBALS["ps4xs6q4f4wx6qz9"]]++;$arSession[$GLOBALS["flw9yns7w73k31c3"]]=$arSession[$GLOBALS["2bph7wq5qy4hczov"]]==0 ? 0 : round($arSession[$GLOBALS["qg55hzs6kp4eym3k"]] * 100 / $arSession[$GLOBALS["lnlkmy17yl3ixc8q"]], 1);if(!$this->haveTime()){$bBreaked=true;break 2;}}$arSession[$GLOBALS["ow65tougc2kf4r1x"]][$intIBlockID][$GLOBALS["suoif9ux2aqux6ps"]]=true;}return $bBreaked ? static::RESULT_CONTINUE : static::RESULT_SUCCESS;}protected static function removeDiscountsFromFilter(&$arFilter){$strRemovePattern=$GLOBALS["n3eilqsukwl74941"];foreach($arFilter as $key=>&$arItem){if(preg_match($strRemovePattern,$key,$arMatch)){unset($arItem,$arFilter[$key]);}if($GLOBALS["mnoivha22ow02foo"]($arItem)){static::removeDiscountsFromFilter($arItem);}if($GLOBALS["xkqlyea1oxq4wn4l"]($arItem)&&empty($arItem)){unset($arItem,$arFilter[$key]);}}}public function stepGenerate($intProfileID,$arData){$bIsCron=$arData[$GLOBALS["15b2updy56c0cchx"]];$arSession=&$arData[$GLOBALS["efe9r27sfgfjk2zv"]][$GLOBALS["blqr1fmihop2ijcg"]];$arCounter=&$arData[$GLOBALS["uiuzxzch87rxyb4k"]][$GLOBALS["chfglkke439eklmo"]];$arIBlocksID=Helper::call($this->strModuleId,$GLOBALS["lp1yve4what5j3a7"],$GLOBALS["hclplbheofl4gw87"], [$intProfileID, true]);if(!$GLOBALS["71rwwzzntoh95lx2"]($arSession)){$arSession[$GLOBALS["v1k4fqe3nclgvuov"]]=array();$arSession[$GLOBALS["cg20lsk899g2pubj"]]=0;$arSession[$GLOBALS["8e4e9osljwf2zkif"]]=0;$arSession[$GLOBALS["vvakubyxnm3tnsco"]]=0;$arSession[$GLOBALS["ffkzqbxl0r1s4ivv"]]=count($arIBlocksID);foreach($arIBlocksID as $intIBlockID){$arFilter=Helper::call($this->strModuleId,$GLOBALS["sli44nkgurf8gty9"],$GLOBALS["1ahf7xp8qfybj63w"], [$intProfileID,$intIBlockID]);$intCount=\CIBlockElement::getList([$GLOBALS["xadzl8a8b3oymjhc"]=>$GLOBALS["fuzy6a4yraxc7o0k"]],$arFilter, [], false, []);$arSession[$GLOBALS["9lgyoykibx7bvig4"]] +=$intCount;$intCountAll=\CIBlockElement::getList([$GLOBALS["s8zhuhdi8waq2adg"]=>$GLOBALS["4bdw572v4lr4ji6b"]], [], [], false, [$GLOBALS["qxjn4uik17a9valv"]]);$arSession[$GLOBALS["r6271nnwu96yv34m"]] +=$intCountAll;$arSession[$GLOBALS["1gkmlnu9u8s9hhpc"]][$intIBlockID]=array($GLOBALS["rlro639bwvo6q936"]=>$intCount,$GLOBALS["i1samoulagnqwnf5"]=>$intCountAll,$GLOBALS["u11dr10dxoq9gsdd"]=>0,$GLOBALS["qdbvriyes3jhdlej"]=>false,);}$arCounter[$GLOBALS["wvmzho4larbb3sf1"]]=$arSession[$GLOBALS["wt4qhlna50c0ueuo"]];}$bBreaked=false;if(!isset($arSession[$GLOBALS["uf5doua7sn03awj1"]])){$arSession[$GLOBALS["7jyrgvgjoy38zoin"]]=Helper::getOption($this->strModuleId,$GLOBALS["fv8azu7mdvqj3uwc"])==$GLOBALS["pm6glflm6k1oq2u4"];$arSession[$GLOBALS["e3mdp05luazi4tan"]]=$GLOBALS["0bdtvx3wo3k2gmzf"](Helper::getOption($this->strModuleId,$GLOBALS["a010jmjja9xir0io"]));if($arSession[$GLOBALS["9a5bpx6pz750355r"]]&&$arSession[$GLOBALS["kqkltt0sl4os1fvg"]] <=1){$arSession[$GLOBALS["5n4tfjh3mjqo9u1f"]]=false;}if(!$GLOBALS["5cpfbi1x434z50gp"]($this->strModuleId,$GLOBALS["zqjvxth8xfgowzi0"](\Acrit\Core\Export\Exporter::getExportModules(true), -3))){$arSession[$GLOBALS["o7kkyxgq01z2kac7"]]=false;}if($arSession[$GLOBALS["kk7mm8xfdo1vsvpl"]]){$intProductsPerThread=$GLOBALS["0zb53cx1mnm0wqoz"](Helper::getOption($this->strModuleId,$GLOBALS["q3mrnzezoz7ga5jm"].($bIsCron?$GLOBALS["fencbwyr84708ejq"]:$GLOBALS["wa6d3u6ilblc04oy"])));$strMessage=Loc::getMessage($GLOBALS["jbpiedtvsmf3y4k4"], array($GLOBALS["lj13pyh4i6no5b00"]=>$arSession[$GLOBALS["s0tkezkg9lk2l04o"]],$GLOBALS["gcosjbwqrm4t2e31"]=>$intProductsPerThread,));}else{$strMessage=Loc::getMessage($GLOBALS["ip2v6vjttyoic1gy"]);}Log::getInstance($this->strModuleId)->add($strMessage,$intProfileID, true);}foreach($arIBlocksID as $intIBlockID){if($arSession[$GLOBALS["3d4t0jyp8ogzdy15"]][$intIBlockID][$GLOBALS["i0cdm17c2f5y307w"]]){continue;}$arElementsID=$this->getNotGeneratedElementsID($intProfileID,$intIBlockID,$arSession);$arCurrentID=$GLOBALS["wl49mc6lwcxina9e"]($arElementsID, 0, 1);$arResult=array($GLOBALS["nq8ofkkesnrn2a4r"]=>null,$GLOBALS["a6xls8rm42flllmk"]=>0,$GLOBALS["vgdoj4ve8ykxt5pm"]=>null,);if($arSession[$GLOBALS["3krbnc3bagwaane2"]]){$this->stepGenerate_Threaded($arResult,$intProfileID,$intIBlockID,$arElementsID,$arData);}else{$this->stepGenerate_NonThreaded($arResult,$intProfileID,$intIBlockID,$arElementsID,$arData);if($arResult[$GLOBALS["1ltxdloanplmt3sl"]] > 0){$arSession[$GLOBALS["pw4up979f0dza214"]][$intIBlockID][$GLOBALS["yr11wetq3gsjll73"]]=$arResult[$GLOBALS["26na7ywl3f134ois"]];}}if($arResult[$GLOBALS["su8njoga68o468vp"]]){$arSession[$GLOBALS["jfsthdklbw366379"]][$intIBlockID][$GLOBALS["sw6rlbwwmaewtgj3"]] +=$arResult[$GLOBALS["skk2ksohy48q2vb3"]];$arSession[$GLOBALS["16qt38z40w83w7pb"]] +=$arResult[$GLOBALS["35tmq9rvs609jp8c"]];$arSession[$GLOBALS["0vqtu8o419yu6592"]]=$arSession[$GLOBALS["8de0gx6343r1nmcx"]]==0 ? 0 : round($arSession[$GLOBALS["cunk4nfh19vbxdk9"]] * 100 / $arSession[$GLOBALS["yng70rf89db4qbls"]], 1);if($arSession[$GLOBALS["51jaw6cuzjxnjz8f"]] > 100){$arSession[$GLOBALS["inepj8jxvs300hky"]]=100;$strMessage=Loc::getMessage($GLOBALS["0ov15bzl1ch4jb2s"], array($GLOBALS["siy4afawcqziuhqt"]=>$intIBlockID,$GLOBALS["lnmysemt5ub82u4m"]=>print_r($arSession, true),));Log::getInstance($this->strModuleId)->add($strMessage,$intProfileID, true);}}if($arResult[$GLOBALS["wks8dnw8s7lwplwb"]]===static::RESULT_CONTINUE){$bBreaked=true;break;}$arSession[$GLOBALS["yos2z6xtjqp694fh"]][$intIBlockID][$GLOBALS["sxcxkfia9bfj1zxz"]]=true;}if($this->isDemoLimitReached($intProfileID)){$this->removeDemoExcess($intProfileID);return static::RESULT_SUCCESS;}return $bBreaked ? static::RESULT_CONTINUE : static::RESULT_SUCCESS;}protected function isDemoLimitReached($intProfileID){$bResult=false;static $arDemo=[];if($GLOBALS["9uab6lkee270cf8w"]($arDemo[$this->strModuleId])){$arDemo[$this->strModuleId]=\Bitrix\Main\Loader::includeSharewareModule($this->strModuleId)===MODULE_DEMO;}$bDemo=$arDemo[$this->strModuleId];if($bDemo){$arQuery=[$GLOBALS["jmyblg8en8bkog6m"]=>[$GLOBALS["ne4h6bpicpgn9lk3"]=>$intProfileID,$GLOBALS["ac88vnr9gzdohdvw"]=>ExportData::TYPE_DUMMY,],$GLOBALS["khk4awvetgv5s7m9"]=>[$GLOBALS["um5rpfnlb72sw3pg"],],$GLOBALS["b1j4ghc179g33fta"]=>[],$GLOBALS["9y20dm4h71jvmp79"]=>[new \Bitrix\Main\Entity\ExpressionField($GLOBALS["030nat1ufao705qc"],$GLOBALS["g8d5hrejun7pf0wa"]),],];if($arData=Helper::call($this->strModuleId,$GLOBALS["g3itgsfztdamdpkk"],$GLOBALS["009n435npjsdeol7"], [$arQuery])->fetch()){$intCurCount=$arData[$GLOBALS["aajjwbmx0gpd3smk"]];$bResult=$intCurCount >=static::MAX;}}return $bResult;}protected function removeDemoExcess($intProfileID){$intCou

Showing the first 100,000 of 296,831 characters. Download the original.