<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Type; use Illuminate\Support\Str; use ModStart\Core\Input\Request; use ModStart\Core\Input\Response; use ModStart\Core\Util\ConstantUtil; class TypeUtil { public static function dumpJsFile($gQM0b) { goto ESIBg; c9SWn: $LTC5O[] = '// This file is created by ' . Request::currentPageUrl() . '
'; goto LV6In; LV6In: foreach ($ZTnse as $c6VKG => $L3_o5) { $LTC5O[] = "export const {$c6VKG} = " . json_encode($L3_o5, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT) . ';'; } goto cL3PU; E1s9C: foreach ($gQM0b as $F28aA) { $ZTnse[class_basename($F28aA)] = TypeUtil::dump($F28aA); } goto VoRXV; ESIBg: $ZTnse = array(); goto E1s9C; cL3PU: return Response::raw(join('
', $LTC5O), array('Content-Type' => 'text/plain')); goto XeVZG; VoRXV: $LTC5O = array(); goto c9SWn; XeVZG: } public static function name($EtM72, $mdHu1) { goto dfNmE; dfNmE: $HBiwi = $EtM72::getList(); goto mEcoF; D23Bi: return null; goto P_ROl; mEcoF: foreach ($HBiwi as $Fkd1C => $pk5fc) { if ($Fkd1C == $mdHu1) { return $pk5fc; } } goto D23Bi; P_ROl: } public static function filter($EtM72, $QX8nj) { goto G9A15; KyW1x: $geg6A = array(); goto ttzA0; G9A15: $HBiwi = $EtM72::getList(); goto KyW1x; XC3tk: return $geg6A; goto Ooodf; ttzA0: foreach ($HBiwi as $Fkd1C => $pk5fc) { if (in_array($Fkd1C, $QX8nj)) { $geg6A[$Fkd1C] = $pk5fc; } } goto XC3tk; Ooodf: } public static function dump($fUMA5) { goto OzrLR; mTSaA: $yNqI3 = $fUMA5::getList(); goto fMyJT; MJbMm: return $QX8nj; goto iNCXv; fMyJT: foreach ($tLHPG as $HQKqq => $mdHu1) { goto AHJyh; GN7cN: $QX8nj[$HQKqq]['name'] = isset($yNqI3[$mdHu1]) ? $yNqI3[$mdHu1] : null; goto FexaF; AHJyh: $QX8nj[$HQKqq]['key'] = $HQKqq; goto n2uEI; n2uEI: $QX8nj[$HQKqq]['value'] = $mdHu1; goto GN7cN; FexaF: } goto MJbMm; OzrLR: $tLHPG = ConstantUtil::dump($fUMA5); goto mTSaA; iNCXv: } public static function colorGuessMap($NC6bx) { goto SDJeO; BGJSN: $yNqI3 = array(); goto v7TcA; zhZxG: foreach (ConstantUtil::dump($NC6bx) as $Fkd1C => $pk5fc) { $Fkd1C = strtolower($Fkd1C); foreach ($Q1kYd as $pLcCc => $WnvOp) { if (Str::contains($Fkd1C, $pLcCc)) { $yNqI3[$pk5fc] = $WnvOp; break; } } } goto jWLy7; tRJux: if (isset($VUETT[$NC6bx])) { return $VUETT[$NC6bx]; } goto BGJSN; EFllk: return $yNqI3; goto bYeK2; SDJeO: static $VUETT = array(); goto tRJux; v7TcA: $Q1kYd = array('fail' => 'danger', 'error' => 'danger', 'wait_verify' => 'danger', 'wait_pay' => 'warning', 'danger' => 'warning', 'running' => 'warning', 'refund' => 'warning', 'success' => 'success', 'verified' => 'success', 'pass' => 'success', 'reject' => 'danger', 'wait' => 'muted', 'canceled' => 'muted', 'disabled' => 'muted', 'completed' => 'success', 'finish' => 'success', 'converting' => 'warning', 'sending' => 'warning', 'ignore' => 'muted', 'expired' => 'muted', 'info' => 'primary', 'unread' => 'danger', 'read' => 'muted', 'processed' => 'success', 'verifying' => 'warning', 'online' => 'success', 'payed' => 'success', 'wait_process' => 'warning', 'deleted' => 'muted', 'invalid' => 'warning', 'valid' => 'success'); goto zhZxG; jWLy7: $VUETT[$NC6bx] = $yNqI3; goto EFllk; bYeK2: } }