var lua_script = (function() {
var tmp;
var G = window.G;
if(G == null ){
G = lua_newtable2(lua_core);
for (var i in lua_libs) {
G.str[i] = lua_newtable2(lua_libs[i]);
}
G.str['arg'] = lua_newtable();
G.str['_G'] = G;
G.str['cc'] = cc;
G.str['ccs'] = ccs;
G.str['sp'] = sp;
G.str['ccui'] = ccui;
G.str['module'] = function (name) {
return [lua_createmodule(G, name, slice(arguments, 1))];
};
G.str['lua_module_return_list'] = lua_newtable();
G.str['require'] = function (name) {
return [lua_require(G, name)];
};
G.str['package'].str['seeall'] = function (module) {
if (!module.metatable) {
module.metatable = lua_newtable();
}
module.metatable.str['__index'] = G;
};
window.G = G;
}
{
lua_call(G.str['module'], ['UI/LoginView', lua_tableget(G.str['package'], 'seeall')]);
var _getPic_1 = (function (_name) {
var tmp;
return [lua_concat("loading/", _name)];
return [];
});
var _createProgressBar_1 = (function (_imgPath, _fntPath, _alpha) {
var tmp;
var _node_3 = lua_mcall(lua_tableget(G.str['cc'], 'Node'), 'create', [])[0];
var _clipStencil_3 = lua_mcall(lua_tableget(G.str['cc'], 'Sprite'), 'create', [])[0];
var _progressBar_3 = lua_mcall(lua_tableget(G.str['cc'], 'Sprite'), 'create', [])[0];
if (lua_true(lua_mcall(lua_mcall(lua_tableget(G.str['cc'], 'FileUtils'), 'getInstance', [])[0], 'isFileExist', [_imgPath])[0])) {
lua_mcall(_clipStencil_3, 'setTexture', [_imgPath]);
lua_mcall(_progressBar_3, 'setTexture', [_imgPath]);
} else if (lua_true(lua_mcall(lua_mcall(lua_tableget(G.str['cc'], 'SpriteFrameCache'), 'getInstance', [])[0], 'getSpriteFrame', [_imgPath])[0])) {
lua_mcall(_clipStencil_3, 'setSpriteFrame', [_imgPath]);
lua_mcall(_progressBar_3, 'setSpriteFrame', [_imgPath]);
}
var _clipNode_3 = lua_mcall(lua_tableget(G.str['cc'], 'ClippingNode'), 'create', [_clipStencil_3])[0];
lua_mcall(_clipNode_3, 'setAlphaThreshold', [lua_or(_alpha, function () {return 0.7;})]);
lua_mcall(_clipNode_3, 'addChild', [_progressBar_3]);
lua_mcall(_node_3, 'addChild', [_clipNode_3]);
lua_tableset(_node_3, '__progress_bar', _progressBar_3);
lua_tableset(_node_3, '__progress_width', lua_tableget(lua_mcall(_progressBar_3, 'getContentSize', [])[0], 'width'));
if (lua_true(lua_mcall(lua_mcall(lua_tableget(G.str['cc'], 'FileUtils'), 'getInstance', [])[0], 'isFileExist', [_fntPath])[0])) {
var _progressLabel_6 = lua_mcall(lua_tableget(G.str['cc'], 'Label'), 'createWithBMFont', [_fntPath, "0%"])[0];
lua_mcall(_clipNode_3, 'addChild', [_progressLabel_6]);
lua_tableset(_node_3, '__progress_label', _progressLabel_6);
}
lua_tableset(_node_3, 'setPercentage', (function (_obj, _percent) {
var tmp;
if (lua_true(lua_tablegetcall(G.str['tolua'], 'isnull', [lua_tableget(_obj, '__progress_bar')])[0])) {
return [];
}
_percent = lua_or(lua_and(lua_lt(_percent, 0), function () {return 0;}), function () {return _percent;});
_percent = lua_or(lua_and(lua_lt(100, _percent), function () {return 100;}), function () {return _percent;});
var _width_7 = lua_or(lua_tableget(_obj, '__progress_width'), function () {return 0;});
lua_mcall(lua_tableget(_obj, '__progress_bar'), 'setPositionX', [lua_multiply((lua_subtract(lua_divide(_percent, 100.0), 1)), _width_7)]);
if (lua_true(lua_tableget(_obj, '__progress_label'))) {
lua_mcall(lua_tableget(_obj, '__progress_label'), 'setString', [lua_concat(lua_tablegetcall(G.str['math'], 'floor', [_percent])[0], "%")]);
}
lua_tableset(_obj, '__percent', _percent);
return [];
}));
lua_mcall(_node_3, 'setPercentage', [0]);
lua_tableset(_node_3, '__progress_to_tag', 2105271612);
lua_tableset(_node_3, 'progressTo', (function (_obj, _time, _percent) {
var tmp;
if (lua_true(lua_tablegetcall(G.str['tolua'], 'isnull', [_obj])[0])) {
return [];
}
if ((lua_not(_time) || lua_not(_percent))) {
return [];
}
var _tag_10 = lua_or(lua_tableget(_node_3, '__progress_to_tag'), function () {return 0;});
lua_mcall(_obj, 'stopActionByTag', [_tag_10]);
var _frameRate_10 = 30.0;
var _diff_10 = lua_divide((lua_subtract(_percent, lua_tableget(_obj, '__percent'))), (lua_multiply(_time, _frameRate_10)));
var _isUp_10 = lua_lt(lua_tableget(_obj, '__percent'), _percent);
var _delay_10 = 1;
if (lua_true(lua_tableget(G.str['bole'], '__isWeb__'))) {
_delay_10 = 0;
}
var _action_10 = lua_mcall(lua_tableget(G.str['cc'], 'RepeatForever'), 'create', lua_mcall(lua_tableget(G.str['cc'], 'Sequence'), 'create', [lua_mcall(lua_tableget(G.str['cc'], 'DelayTime'), 'create', [lua_divide(_delay_10, _frameRate_10)])[0]].concat(lua_mcall(lua_tableget(G.str['cc'], 'CallFunc'), 'create', [(function () {
var tmp;
var _tmpPercent_14 = lua_add(lua_tableget(_obj, '__percent'), _diff_10);
var _over_14 = false;
if (lua_eq(_tmpPercent_14, _percent)) {
_over_14 = true;
} else if ((lua_true(_isUp_10) && lua_lt(_percent, _tmpPercent_14))) {
_over_14 = true;
} else if ((lua_not(_isUp_10) && lua_lt(_tmpPercent_14, _percent))) {
_over_14 = true;
}
if (lua_true(_over_14)) {
lua_mcall(_obj, 'stopActionByTag', [_tag_10]);
lua_mcall(_obj, 'setPercentage', [_percent]);
} else {
lua_mcall(_obj, 'setPercentage', [_tmpPercent_14]);
}
return [];
})]))))[0];
lua_mcall(_action_10, 'setTag', [_tag_10]);
lua_mcall(_obj, 'runAction', [_action_10]);
return [];
}));
return [_node_3];
return [];
});
G.str['LoginView'] = lua_call(G.str['class'], ["LoginView", (function () {
var tmp;
return lua_mcall(lua_tableget(G.str['cc'], 'Node'), 'create', []);
return [];
})])[0];
lua_tableset(G.str['LoginView'], 'ctor', (function (self, _isRelogin) {
var tmp;
lua_tablegetcall(G.str['bole'], 'setScreenOrientation', [1]);
lua_tableset(self, 'max', lua_tablegetcall(G.str['math'], 'random', [1, 10])[0]);
lua_tableset(self, 'isRelogin', _isRelogin);
lua_tableset(self, 'labelActionStarted', false);
if ((lua_true(G.str['ScreenControl']) && lua_true(lua_tableget(lua_mcall(G.str['ScreenControl'], 'getInstance', [])[0], 'reconnect')))) {
lua_mcall(lua_mcall(G.str['ScreenControl'], 'getInstance', [])[0], 'reconnect', []);
}
lua_mcall(self, 'setName', ['LoginView']);
lua_mcall(self, 'setScale', [G.str['SHRINKSCALE_H']]);
var _newUserFlag_21 = lua_mcall(lua_mcall(lua_tableget(G.str['cc'], 'UserDefault'), 'getInstance', [])[0], 'getIntegerForKey', ["login_loading_newuser", 0])[0];
var _normalBg_21 = lua_call(_getPic_1, ["loading_back.png"])[0];
var _bg_21 = null;
if (lua_eq(_newUserFlag_21, 1)) {
_bg_21 = lua_mcall(lua_tableget(G.str['cc'], 'Sprite'), 'create', [_normalBg_21])[0];
} else {
_bg_21 = lua_mcall(lua_tableget(G.str['cc'], 'Sprite'), 'create', [_normalBg_21])[0];
var _name_24 = lua_mcall(lua_mcall(lua_tableget(G.str['cc'], 'UserDefault'), 'getInstance', [])[0], 'getStringForKey', ["login_loading_image", ""])[0];
if (((lua_not(lua_tablegetcall(G.str['tolua'], 'isnull', [_bg_21])[0]) && lua_true(_name_24)) && lua_lt(0, lua_len(_name_24)))) {
var _save_name_25 = null;
if ((lua_true(lua_tablegetcall(G.str['string'], 'find', [_name_24, "http://"])[0]) || lua_true(lua_tablegetcall(G.str['string'], 'find', [_name_24, "https://"])[0]))) {
_save_name_25 = lua_tablegetcall(G.str['bole'], 'hash', [_name_24])[0];
}
if (lua_true(_save_name_25)) {
var _isExist_27 = lua_mcall(lua_mcall(lua_tableget(G.str['cc'], 'FileUtils'), 'getInstance', [])[0], 'isFileExist', [_save_name_25])[0];
if (lua_true(_isExist_27)) {
var _size_28 = lua_mcall(lua_mcall(lua_tableget(G.str['cc'], 'FileUtils'), 'getInstance', [])[0], 'getFileSize', [_save_name_25])[0];
if (lua_lt(10, _size_28)) {
if ((lua_true(lua_mcall(lua_mcall(lua_tableget(G.str['cc'], 'FileUtils'), 'getInstance', [])[0], 'isFileExist', [_save_name_25])[0]) && lua_not(lua_tablegetcall(G.str['tolua'], 'isnull', [_bg_21])[0]))) {
lua_mcall(_bg_21, 'setTexture', [_save_name_25]);
}
} else {
lua_mcall(lua_mcall(lua_tableget(G.str['cc'], 'FileUtils'), 'getInstance', [])[0], 'removeFile', [_save_name_25]);
}
}
}
}
}
if (lua_true(_bg_21)) {
lua_mcall(self, 'addChild', [_bg_21]);
}
var _ani_id_21 = lua_mcall(lua_mcall(lua_tableget(G.str['cc'], 'UserDefault'), 'getInstance', [])[0], 'getStringForKey', ["loading_ani_id_tag", ""])[0];
if ((lua_true(_ani_id_21) && lua_lt(2, lua_len(_ani_id_21)))) {
_ani_id_21 = lua_call(G.str['tonumber'], [_ani_id_21])[0];
var _dialog_33 = lua_mcall(self, 'getLoadingNodeById', [_ani_id_21])[0];
if (lua_true(_dialog_33)) {
var _node_34 = lua_tablegetcall(_dialog_33, 'new', [lua_newtable([], 'ac_id', _ani_id_21)])[0];
if (lua_true(_node_34)) {
lua_mcall(self, 'addChild', [_node_34]);
if ((lua_true(_bg_21) && lua_not(lua_tablegetcall(G.str['tolua'], 'isnull', [_bg_21])[0]))) {
lua_mcall(_bg_21, 'removeFromParent', []);
_bg_21 = null;
}
}
}
}
if (lua_true(G.str['appDebugMode'])) {
lua_mcall(self, 'showBtnSetting', []);
}
if (lua_true(lua_tableget(G.str['bole'], '__isWeb__'))) {
if (lua_not(lua_tableget(G.str['cc'], 'releaseVersion'))) {
lua_mcall(self, 'showBtnSetting', []);
}
}
var _btn_img_normal_21 = lua_call(_getPic_1, ["loading_btn21.png"])[0];
var _btn_img_pressed_21 = lua_call(_getPic_1, ["loading_btn22.png"])[0];
if ((lua_true(lua_mcall(lua_mcall(lua_tableget(G.str['cc'], 'FileUtils'), 'getInstance', [])[0], 'isFileExist', [_btn_img_normal_21])[0]) && lua_true(lua_mcall(lua_mcall(lua_tableget(G.str['cc'], 'FileUtils'), 'getInstance', [])[0], 'isFileExist', [_btn_img_pressed_21])[0]))) {
var _help_btn_40 = lua_mcall(lua_tableget(G.str['ccui'], 'Button'), 'create', [_btn_img_normal_21, _btn_img_pressed_21, _btn_img_pressed_21])[0];
lua_mcall(_help_btn_40, 'setPosition', lua_tablegetcall(G.str['cc'], 'p', [lua_multiply(507, G.str['HEADER_FOOTER_RATE_H']), 310]));
lua_mcall(self, 'addChild', [_help_btn_40, 1]);
lua_tableset(self, 'help_btn', _help_btn_40);
lua_mcall(_help_btn_40, 'setVisible', [false]);
lua_mcall(_help_btn_40, 'addTouchEventListener', [(function (_sender, _eventType) {
var tmp;
if (lua_eq(_eventType, lua_tableget(lua_tableget(G.str['ccui'], 'TouchEventType'), 'ended'))) {
if ((lua_true(G.str['isHelpshiftEnabled']) && lua_true(lua_call(G.str['isHelpshiftEnabled'], [])[0]))) {
lua_mcall(lua_mcall(G.str['Helpshift'], 'getInstance', [])[0], 'setContactUsCount', [0]);
lua_mcall(lua_mcall(G.str['Helpshift'], 'getInstance', [])[0], 'showFAQs', []);
} else {
if (lua_lt(170, lua_call(G.str['tonumber'], [lua_tableget(G.str['Config'], 'versionCode')])[0])) {
lua_tablegetcall(G.str['bole'], 'shareToEmail', ["Cash Frenzy™ Casino - TOP FREE casino slot games!", "Hey! Come play the best slots with me at Cash Frenzy. It’s such an addicting game with so much fun!
Weekly updates and loads of new feature games makes it more interesting and enjoyable!
It’s totally FREE and gives you 1,0000,000 welcome bonus! Let’s go get spinning! Cheers and enjoy!
Click here to download:
https://bit.ly/CashFrenzyEMAIL
"]);
} else {
var _url_46 = "mailto:?subject=Cash Frenzy™ Casino - TOP FREE casino slot games!&body= Hey! Come play the best slots with me at Cash Frenzy. It’s such an addicting game with so much fun! %0d%0a Weekly updates and loads of new feature games makes it more interesting and enjoyable! %0d%0a It’s totally FREE and gives you 1,0000,000 welcome bonus! Let’s go get spinning! Cheers and enjoy! %0d%0a Click here to download: %0d%0a https://bit.ly/CashFrenzyEMAIL %0d%0a ";
if (lua_true(lua_tablegetcall(G.str['bole'], 'isIOS', [])[0])) {
_url_46 = lua_tablegetcall(G.str['string'], 'gsub', [_url_46, " ", "%%20"])[0];
}
lua_mcall(lua_mcall(lua_tableget(G.str['cc'], 'Application'), 'getInstance', [])[0], 'openURL', [_url_46]);
}
}
}
return [];
})]);
}
lua_tableset(self, 'processNode', lua_mcall(lua_tableget(G.str['cc'], 'Node'), 'create', [])[0]);
lua_mcall(self, 'addChild', [lua_tableget(self, 'processNode'), 2]);
lua_tableset(self, 'process_di', lua_mcall(lua_tableget(G.str['cc'], 'Sprite'), 'create', lua_call(_getPic_1, ["loading_di.png"]))[0]);
lua_mcall(lua_tableget(self, 'process_di'), 'setPosition', [0, -320]);
lua_mcall(lua_tableget(self, 'processNode'), 'addChild', [lua_tableget(self, 'process_di')]);
var _imgPath_21 = lua_call(_getPic_1, ["loading_progressbar.png"])[0];
var _fntPath_21 = lua_call(_getPic_1, ["loading.fnt"])[0];
if (lua_true(lua_tableget(G.str['bole'], '__isWeb__'))) {
_fntPath_21 = lua_call(_getPic_1, ["game_loading_jzfnt.fnt"])[0];
}
lua_tableset(self, 'processBar', lua_call(_createProgressBar_1, [_imgPath_21, _fntPath_21])[0]);
if (lua_true(lua_tableget(self, 'processBar'))) {
lua_mcall(lua_tableget(self, 'processBar'), 'setPosition', [0, -320]);
lua_mcall(lua_tableget(self, 'processNode'), 'addChild', [lua_tableget(self, 'processBar')]);
}
var _font_di_21 = lua_mcall(lua_tableget(G.str['cc'], 'Sprite'), 'create', lua_call(_getPic_1, ["loading_font_bg.png"]))[0];
if (lua_true(_font_di_21)) {
lua_mcall(_font_di_21, 'setPosition', [0, -284]);
lua_mcall(lua_tableget(self, 'processNode'), 'addChild', [_font_di_21]);
}
lua_tableset(self, 'lbProcess', lua_mcall(lua_tableget(G.str['cc'], 'Label'), 'createWithBMFont', [lua_call(_getPic_1, ["game_loading_jzfnt.fnt"])[0], "Checking Game Resource..."])[0]);
if (lua_not(lua_tablegetcall(G.str['tolua'], 'isnull', [lua_tableget(self, 'lbProcess')])[0])) {
lua_mcall(lua_tableget(self, 'processNode'), 'addChild', [lua_tableget(self, 'lbProcess')]);
lua_mcall(lua_tableget(self, 'lbProcess'), 'setPosition', lua_tablegetcall(G.str['cc'], 'p', [0, -282]));
}
if (lua_not(lua_tableget(self, 'isRelogin'))) {
lua_tableset(self, 'isRelogin', true);
lua_mcall(lua_tableget(self, 'lbProcess'), 'setString', ["Checking Game Resource..."]);
} else {
}
lua_tableset(self, 'index', 0);
lua_tableset(self, 'maxPercent', 0);
lua_tableset(self, 'curKb', 0);
lua_tableset(self, 'totalKb', 0);
if (lua_true(lua_tableget(G.str['bole'], '__isWeb__'))) {
lua_tableset(self, 'curFiles', 0);
lua_tableset(self, 'totalFiles', 0);
}
lua_tableset(self, 'count', 0);
lua_tableset(self, 'luaCheckProcess', 0);
if (!lua_eq(lua_tableget(G.str['Config'], 'platform'), "facebook")) {
lua_mcall(self, 'runAction', lua_mcall(lua_tableget(G.str['cc'], 'RepeatForever'), 'create', lua_mcall(lua_tableget(G.str['cc'], 'Sequence'), 'create', [lua_mcall(lua_tableget(G.str['cc'], 'DelayTime'), 'create', [0.2])[0]].concat(lua_mcall(lua_tableget(G.str['cc'], 'CallFunc'), 'create', [(function () {
var tmp;
if (lua_true(lua_tableget(G.str['bole'], '__isWeb__'))) {
if (lua_lt(lua_tableget(self, 'maxPercent'), 50)) {
lua_tableset(self, 'maxPercent', lua_add(lua_tableget(self, 'maxPercent'), 2));
} else if (lua_lt(lua_tableget(self, 'maxPercent'), 70)) {
lua_tableset(self, 'maxPercent', lua_add(lua_tableget(self, 'maxPercent'), 0.5));
} else if (lua_lt(lua_tableget(self, 'maxPercent'), lua_add(80, lua_tableget(self, 'max')))) {
lua_tableset(self, 'maxPercent', lua_add(lua_tableget(self, 'maxPercent'), 0.2));
} else {
lua_tableset(self, 'count', lua_add(lua_tableget(self, 'count'), 1));
if (lua_eq(lua_mod(lua_tableget(self, 'count'), 10), 0)) {
if (lua_lte(lua_tableget(self, 'max'), 10)) {
lua_tableset(self, 'max', lua_add(lua_tableget(self, 'max'), 1));
} else if (lua_lte(lua_tableget(self, 'max'), 15)) {
lua_tableset(self, 'max', lua_add(lua_tableget(self, 'max'), 0.2));
}
}
}
} else {
if (lua_lt(lua_tableget(self, 'maxPercent'), 90)) {
lua_tableset(self, 'maxPercent', lua_add(lua_tableget(self, 'maxPercent'), 2));
}
}
lua_mcall(self, 'updateLoadingPercent', [lua_tableget(self, 'maxPercent')]);
return [];
})])))));
if (lua_true(lua_tableget(self, 'processBar'))) {
lua_mcall(lua_tableget(self, 'processBar'), 'setPercentage', [3]);
}
lua_mcall(self, 'updateLoadingPercent', [5]);
}
return [];
}))
lua_tableset(G.str['LoginView'], 'hideChecking', (function (self) {
var tmp;
if (lua_not(lua_tablegetcall(G.str['tolua'], 'isnull', [lua_tableget(self, 'lbProcess')])[0])) {
lua_mcall(lua_tableget(self, 'lbProcess'), 'setVisible', [false]);
}
return [];
}))
lua_tableset(G.str['LoginView'], 'showFBLogin', (function (self) {
var tmp;
if (lua_true(G.str['LoginViewBtnNode'])) {
var _btnNode_71 = lua_tablegetcall(G.str['LoginViewBtnNode'], 'new', [])[0];
lua_mcall(self, 'addChild', [_btnNode_71]);
} else {
lua_tablegetcall(G.str['bole'], 'send_codeInfo', [lua_tableget(G.str['Splunk_Type'], 'Error'), lua_newtable([], 'msg', "login_view_no_btn"), false]);
}
lua_mcall(lua_tableget(self, 'processNode'), 'setVisible', [false]);
return [];
}))
lua_tableset(G.str['LoginView'], 'exit', (function (self) {
var tmp;
lua_mcall(self, 'removeFromParent', []);
return [];
}))
lua_tableset(G.str['LoginView'], 'registerCall', (function (self, _ctl, _callback) {
var tmp;
lua_tableset(self, 'ctl', _ctl);
lua_tableset(self, 'callback', _callback);
if (lua_true(G.str['isHelpshiftEnabled'])) {
if (lua_true(lua_tableget(self, 'help_btn'))) {
if (lua_not(lua_mcall(lua_tableget(self, 'help_btn'), 'isVisible', [])[0])) {
lua_mcall(lua_tableget(self, 'help_btn'), 'setOpacity', [0]);
lua_mcall(lua_tableget(self, 'help_btn'), 'setVisible', [true]);
lua_mcall(lua_tableget(self, 'help_btn'), 'runAction', lua_mcall(lua_tableget(G.str['cc'], 'FadeIn'), 'create', [0.5]));
}
}
}
return [];
}))
lua_tableset(G.str['LoginView'], 'checkFinish', (function (self) {
var tmp;
if (lua_lt(99, lua_tableget(self, 'maxPercent'))) {
lua_mcall(lua_mcall(G.str['LoginControl'], 'getInstance', [])[0], 'onLoadEnd', [lua_tableget(self, 'totalKb')]);
lua_mcall(self, 'runAction', lua_mcall(lua_tableget(G.str['cc'], 'Sequence'), 'create', [lua_mcall(lua_tableget(G.str['cc'], 'DelayTime'), 'create', [0.3])[0], lua_mcall(lua_tableget(G.str['cc'], 'CallFunc'), 'create', [(function () {
var tmp;
if ((lua_not(lua_mcall(lua_mcall(G.str['LoginControl'], 'getInstance', [])[0], 'isTPPLogedin', [])[0]) && lua_true(lua_mcall(lua_mcall(G.str['LoginControl'], 'getInstance', [])[0], 'needShowLoginChoice', [])[0]))) {
if (lua_true(lua_tableget(self, 'processBar'))) {
lua_mcall(lua_tableget(self, 'processBar'), 'runAction', lua_mcall(lua_tableget(G.str['cc'], 'FadeOut'), 'create', [0.3]));
}
lua_mcall(lua_tableget(self, 'process_di'), 'runAction', lua_mcall(lua_tableget(G.str['cc'], 'FadeOut'), 'create', [0.3]));
if (lua_true(lua_tableget(self, 'process_top'))) {
lua_mcall(lua_tableget(self, 'process_top'), 'runAction', lua_mcall(lua_tableget(G.str['cc'], 'FadeOut'), 'create', [0.3]));
}
if (lua_not(lua_tablegetcall(G.str['tolua'], 'isnull', [lua_tableget(self, 'lbProcess')])[0])) {
lua_mcall(lua_tableget(self, 'lbProcess'), 'runAction', lua_mcall(lua_tableget(G.str['cc'], 'FadeOut'), 'create', [0.3]));
}
}
return [];
})])[0], lua_mcall(lua_tableget(G.str['cc'], 'DelayTime'), 'create', [0.2])[0]].concat(lua_mcall(lua_tableget(G.str['cc'], 'CallFunc'), 'create', [(function () {
var tmp;
if (lua_not(lua_mcall(lua_mcall(G.str['LoginControl'], 'getInstance', [])[0], 'isTPPLogedin', [])[0])) {
if (lua_true(lua_mcall(lua_mcall(G.str['LoginControl'], 'getInstance', [])[0], 'needShowLoginChoice', [])[0])) {
lua_mcall(self, 'showFBLogin', [self]);
} else {
lua_mcall(lua_mcall(G.str['LoginControl'], 'getInstance', [])[0], 'rejectFacebookLogin', []);
}
} else if (lua_true(lua_tableget(self, 'callback'))) {
lua_tablegetcall(self, 'callback', []);
}
return [];
})]))));
return [true];
}
return [false];
return [];
}))
lua_tableset(G.str['LoginView'], 'checkFinishForPreload', (function (self, _func_callBack) {
var tmp;
if (lua_not(lua_tablegetcall(G.str['bole'], 'isWeb', [])[0])) {
return [];
}
var _loadingDone_90 = (function () {
var tmp;
lua_tablegetcall(G.str['bole'], 'preDownloadResBackground', []);
lua_tablegetcall(G.str['libDebug'], 'print', ["tlp", "loadingDone"]);
if (lua_true(_func_callBack)) {
lua_call(_func_callBack, []);
}
lua_mcall(lua_mcall(G.str['LoginControl'], 'getInstance', [])[0], 'onLoadEnd', []);
lua_tableset(self, 'loadEnd', true);
if (lua_lt(lua_tableget(self, 'maxPercent'), 100)) {
lua_tableset(self, 'maxPercent', 100);
if (lua_true(lua_tableget(self, 'processBar'))) {
lua_mcall(lua_tableget(self, 'processBar'), 'progressTo', [0.2, 100]);
}
}
lua_mcall(self, 'runAction', lua_mcall(lua_tableget(G.str['cc'], 'Sequence'), 'create', [lua_mcall(lua_tableget(G.str['cc'], 'DelayTime'), 'create', [0.2])[0], lua_mcall(lua_tableget(G.str['cc'], 'CallFunc'), 'create', [(function () {
var tmp;
if ((lua_not(lua_mcall(lua_mcall(G.str['LoginControl'], 'getInstance', [])[0], 'isTPPLogedin', [])[0]) && lua_true(lua_mcall(lua_mcall(G.str['LoginControl'], 'getInstance', [])[0], 'needShowLoginChoice', [])[0]))) {
if (lua_true(lua_tableget(self, 'processBar'))) {
lua_mcall(lua_tableget(self, 'processBar'), 'runAction', lua_mcall(lua_tableget(G.str['cc'], 'FadeOut'), 'create', [0.3]));
}
lua_mcall(lua_tableget(self, 'process_di'), 'runAction', lua_mcall(lua_tableget(G.str['cc'], 'FadeOut'), 'create', [0.3]));
if (lua_true(lua_tableget(self, 'process_top'))) {
lua_mcall(lua_tableget(self, 'process_top'), 'runAction', lua_mcall(lua_tableget(G.str['cc'], 'FadeOut'), 'create', [0.3]));
}
if (lua_not(lua_tablegetcall(G.str['tolua'], 'isnull', [lua_tableget(self, 'lbProcess')])[0])) {
lua_mcall(lua_tableget(self, 'lbProcess'), 'runAction', lua_mcall(lua_tableget(G.str['cc'], 'FadeOut'), 'create', [0.3]));
}
}
return [];
})])[0], lua_mcall(lua_tableget(G.str['cc'], 'DelayTime'), 'create', [0.2])[0]].concat(lua_mcall(lua_tableget(G.str['cc'], 'CallFunc'), 'create', [(function () {
var tmp;
if (lua_not(lua_mcall(lua_mcall(G.str['LoginControl'], 'getInstance', [])[0], 'isTPPLogedin', [])[0])) {
if (lua_true(lua_mcall(lua_mcall(G.str['LoginControl'], 'getInstance', [])[0], 'needShowLoginChoice', [])[0])) {
lua_mcall(self, 'showFBLogin', [self]);
} else {
lua_mcall(lua_mcall(G.str['LoginControl'], 'getInstance', [])[0], 'rejectFacebookLogin', []);
}
} else if (lua_true(lua_tableget(self, 'callback'))) {
lua_tablegetcall(self, 'callback', []);
}
return [];
})]))));
return [];
});
var _check_list_90 = lua_newtable([lua_tableget(G.str['PreloadKeys'], 'A_ACTIVITY'), lua_tableget(G.str['PreloadKeys'], 'DAILY_ACTIVITY'), lua_tableget(G.str['PreloadKeys'], 'BASE_RES'), lua_tableget(G.str['PreloadKeys'], 'B_GLOBAL'), lua_tableget(G.str['PreloadKeys'], 'SEPRATE_B')]);
var _recursive_check_object_90 = (function (__index) {
var tmp;
var _count_106 = lua_len(_check_list_90);
var _TAG_106 = lua_tableget(_check_list_90, __index);
if ((lua_lte(__index, _count_106) && lua_true(_TAG_106))) {
lua_tablegetcall(G.str['libDebug'], 'print', ["tlp", lua_concat("start check key = ", _TAG_106)]);
lua_mcall(lua_mcall(G.str['PreloadModule'], 'getInstance', [])[0], 'delayDealPreloadObject', [_TAG_106, 0.1, (function () {
var tmp;
if (lua_eq(__index, _count_106)) {
lua_call(_loadingDone_90, []);
} else {
lua_call(_recursive_check_object_90, [lua_add(__index, 1)]);
}
return [];
})]);
} else {
lua_call(_loadingDone_90, []);
return [];
}
return [];
});
lua_call(_recursive_check_object_90, [1]);
return [];
}))
lua_tableset(G.str['LoginView'], 'isTPPLogedin', (function (self) {
var tmp;
var varargs = slice(arguments, 1);
if ((((lua_true(lua_mcall(lua_mcall(G.str['Facebook'], 'getInstance', [])[0], 'isLoggedIn', [])[0]) || lua_true(lua_mcall(lua_mcall(G.str['HMS'], 'getInstance', [])[0], 'isLoggedIn', [])[0])) || lua_true(lua_mcall(lua_mcall(G.str['PluginCommon'], 'getInstance', [])[0], 'isAppleLoggedIn', [])[0])) || (lua_true(lua_mcall(lua_mcall(G.str['GooglePlay'], 'getInstance', [])[0], 'isLoggedIn', [])[0]) && lua_lt(0, lua_tableget(lua_mcall(G.str['User'], 'getInstance', [])[0], 'exp'))))) {
return [true];
}
return [false];
return [];
}))
lua_tableset(G.str['LoginView'], 'onLuaUpdate', (function (self, _type) {
var tmp;
if (lua_eq(_type, 2)) {
} else if (lua_eq(_type, 1)) {
}
return [];
}))
lua_tableset(G.str['LoginView'], 'addTotalByte', (function (self, _byte) {
var tmp;
if (lua_not(lua_tablegetcall(G.str['tolua'], 'isnull', [lua_tableget(self, 'lbProcess')])[0])) {
lua_mcall(lua_tableget(self, 'lbProcess'), 'stopAllActions', []);
lua_mcall(lua_tableget(self, 'lbProcess'), 'setOpacity', [255]);
lua_tableset(self, 'totalKb', lua_add(lua_tableget(self, 'totalKb'), lua_tablegetcall(G.str['math'], 'floor', [lua_divide(_byte, 1000)])[0]));
lua_tableset(self, 'curDownStr', lua_concat("Downloading activity resource... (", lua_concat(lua_tableget(self, 'curKb'), lua_concat(" KB/", lua_concat(lua_tableget(self, 'totalKb'), " KB)")))));
lua_tableset(self, 'tipStr', lua_or(lua_tableget(self, 'tipStr'), function () {return "";}));
if (lua_lt(0, lua_tableget(self, 'totalKb'))) {
lua_mcall(lua_tableget(self, 'lbProcess'), 'setString', [lua_concat(lua_tableget(self, 'tipStr'), lua_tableget(self, 'curDownStr'))]);
}
lua_mcall(lua_tableget(self, 'lbProcess'), 'setVisible', [true]);
}
return [];
}))
lua_tableset(G.str['LoginView'], 'addTotalFiles', (function (self, _count) {
var tmp;
if (lua_not(lua_tablegetcall(G.str['bole'], 'isWeb', [])[0])) {
return [];
}
if (lua_not(lua_tablegetcall(G.str['tolua'], 'isnull', [lua_tableget(self, 'lbProcess')])[0])) {
lua_mcall(lua_tableget(self, 'lbProcess'), 'stopAllActions', []);
lua_mcall(lua_tableget(self, 'lbProcess'), 'setOpacity', [255]);
lua_tableset(self, 'totalFiles', lua_add(lua_tableget(self, 'totalFiles'), _count));
lua_tableset(self, 'curDownStr', lua_concat(" Downloading Files (", lua_concat(lua_tableget(self, 'curFiles'), lua_concat("/", lua_concat(lua_tableget(self, 'totalFiles'), ")")))));
lua_tableset(self, 'tipStr', lua_or(lua_tableget(self, 'tipStr'), function () {return "";}));
lua_mcall(lua_tableget(self, 'lbProcess'), 'setString', [lua_concat(lua_tableget(self, 'tipStr'), lua_tableget(self, 'curDownStr'))]);
lua_mcall(lua_tableget(self, 'lbProcess'), 'setVisible', [true]);
}
return [];
}))
lua_tableset(G.str['LoginView'], 'addCurrentFiles', (function (self) {
var tmp;
if (lua_not(lua_tablegetcall(G.str['bole'], 'isWeb', [])[0])) {
return [];
}
if (lua_lt(lua_tableget(self, 'curFiles'), lua_tableget(self, 'totalFiles'))) {
lua_tableset(self, 'curFiles', lua_add(lua_tableget(self, 'curFiles'), 1));
}
return [];
}))
lua_tableset(G.str['LoginView'], 'updateLoadingPercent', (function (self, _percent) {
var tmp;
if (lua_true(lua_tableget(self, 'loadEnd'))) {
return [];
}
if (lua_lt(lua_tableget(self, 'maxPercent'), _percent)) {
lua_tableset(self, 'maxPercent', _percent);
}
if (lua_true(lua_tableget(self, 'processBar'))) {
lua_mcall(lua_tableget(self, 'processBar'), 'progressTo', [0.2, lua_tableget(self, 'maxPercent')]);
}
if (lua_true(lua_tableget(G.str['bole'], '__isWeb__'))) {
if (lua_lt(0, lua_tableget(self, 'totalFiles'))) {
lua_tableset(self, 'curDownStr', lua_concat(" Downloading Files (", lua_concat(lua_tableget(self, 'curFiles'), lua_concat("/", lua_concat(lua_tableget(self, 'totalFiles'), ")")))));
lua_tableset(self, 'tipStr', lua_or(lua_tableget(self, 'tipStr'), function () {return "";}));
if (lua_not(lua_tablegetcall(G.str['tolua'], 'isnull', [lua_tableget(self, 'lbProcess')])[0])) {
lua_mcall(lua_tableget(self, 'lbProcess'), 'setString', [lua_concat(lua_tableget(self, 'tipStr'), lua_tableget(self, 'curDownStr'))]);
}
}
} else {
if (lua_lt(0, lua_tableget(self, 'totalKb'))) {
var _cur_Kb_134 = lua_tablegetcall(G.str['math'], 'floor', [lua_divide(lua_multiply(_percent, lua_tableget(self, 'totalKb')), 100)])[0];
if (lua_lte(_cur_Kb_134, lua_tableget(self, 'curKb'))) {
if (lua_lt(lua_tableget(self, 'curKb'), lua_subtract(lua_tableget(self, 'totalKb'), 300))) {
lua_tableset(self, 'curKb', lua_add(lua_tableget(self, 'curKb'), lua_tablegetcall(G.str['math'], 'random', [20])[0]));
} else if (lua_lt(lua_tableget(self, 'curKb'), lua_subtract(lua_tableget(self, 'totalKb'), 5))) {
lua_tableset(self, 'curKb', lua_add(lua_tableget(self, 'curKb'), lua_tablegetcall(G.str['math'], 'random', [3])[0]));
}
} else if (lua_lt(lua_tableget(self, 'curKb'), _cur_Kb_134)) {
lua_tableset(self, 'curKb', _cur_Kb_134);
}
lua_tableset(self, 'curDownStr', lua_concat("Downloading activity resource... (", lua_concat(lua_tableget(self, 'curKb'), lua_concat(" KB/", lua_concat(lua_tableget(self, 'totalKb'), " KB)")))));
lua_tableset(self, 'tipStr', lua_or(lua_tableget(self, 'tipStr'), function () {return "";}));
if ((lua_not(lua_tablegetcall(G.str['tolua'], 'isnull', [lua_tableget(self, 'lbProcess')])[0]) && lua_lt(0, lua_tableget(self, 'totalKb')))) {
lua_mcall(lua_tableget(self, 'lbProcess'), 'setString', [lua_concat(lua_tableget(self, 'tipStr'), lua_tableget(self, 'curDownStr'))]);
}
}
if (lua_true(lua_mcall(self, 'checkFinish', [])[0])) {
lua_tableset(self, 'loadEnd', true);
}
}
if ((lua_lt(5, lua_tableget(self, 'maxPercent')) && lua_not(lua_tableget(self, 'bg_audio_played')))) {
var _isMusicMute_141 = lua_mcall(lua_mcall(lua_tableget(G.str['cc'], 'UserDefault'), 'getInstance', [])[0], 'getIntegerForKey', ["music", 1])[0];
var _isSoundMute_141 = lua_mcall(lua_mcall(lua_tableget(G.str['cc'], 'UserDefault'), 'getInstance', [])[0], 'getIntegerForKey', ["sound", 1])[0];
if ((lua_eq(_isMusicMute_141, 1) || lua_eq(_isSoundMute_141, 1))) {
lua_mcall(self, 'runAction', lua_mcall(lua_tableget(G.str['cc'], 'Sequence'), 'create', [lua_mcall(lua_tableget(G.str['cc'], 'DelayTime'), 'create', [1.5])[0]].concat(lua_mcall(lua_tableget(G.str['cc'], 'CallFunc'), 'create', [(function () {
var tmp;
if (lua_eq(lua_tableget(G.str['Config'], 'platform'), "ios")) {
lua_mcall(lua_tableget(G.str['ccexp'], 'AudioEngine'), 'play2d', ["sounds/loading/LogoSound.mp3", false]);
} else {
lua_tablegetcall(G.str['AudioEngine'], 'playEffect', ["sounds/loading/LogoSound.mp3", false]);
}
return [];
})]))));
}
lua_tableset(self, 'bg_audio_played', true);
}
return [];
}))
lua_tableset(G.str['LoginView'], 'showBtnSetting', (function (self) {
var tmp;
var _settingBtn_146 = lua_mcall(lua_tableget(G.str['ccui'], 'Button'), 'create', [])[0];
if (lua_true(_settingBtn_146)) {
var _path_147 = "commonpics/draw9patch_btn3_1.png";
lua_mcall(_settingBtn_146, 'loadTextures', [_path_147, _path_147, _path_147]);
lua_mcall(_settingBtn_146, 'setPosition', [420, 320]);
lua_mcall(_settingBtn_146, 'setTitleText', ["SETTING"]);
lua_mcall(_settingBtn_146, 'setTitleFontSize', [20]);
lua_mcall(_settingBtn_146, 'setScale', [1, 1]);
var _showLinkSelect_147 = (function () {
var tmp;
lua_mcall(_settingBtn_146, 'setTouchEnabled', [false]);
lua_mcall(_settingBtn_146, 'setVisible', [false]);
var _callback_148 = (function () {
var tmp;
lua_mcall(_settingBtn_146, 'setTouchEnabled', [true]);
lua_mcall(_settingBtn_146, 'setVisible', [true]);
return [];
});
var _selectView_148 = lua_call(G.str['require'], ["UI/ChangeServerDialog"])[0];
lua_tablegetcall(_selectView_148, 'new', [self, _callback_148]);
return [];
});
lua_mcall(_settingBtn_146, 'addTouchEventListener', [_showLinkSelect_147]);
lua_mcall(self, 'addChild', [_settingBtn_146]);
}
return [];
}))
lua_tableset(G.str['LoginView'], 'playLabelAction', (function (self) {
var tmp;
if (lua_true(lua_tableget(self, 'labelActionStarted'))) {
return [];
}
lua_tableset(self, 'labelActionStarted', true);
lua_tableset(self, 'tipsList', lua_newtable(["Welcome to Cash Frenzy!", "Change your Profile Name and Avatar in Personal Vault!", "Join Cash Club and play with others!", "Level up to unlock more games!", "Collect Amazing Stamps to win huge coins prize!", "Enter Diamond Lounge to enjoy Ultimate Benefits!", "Activate Speedy to play Red Scratch every hour!", "Level up faster in Diamond Lounge!"]));
lua_tableset(self, 'tipsCount', lua_len(lua_tableget(self, 'tipsList')));
lua_tableset(self, 'startIndex', 0);
lua_tableset(self, 'orderList', lua_mcall(self, 'getLoadingTipsOrder', [])[0]);
lua_mcall(self, 'runAction', lua_mcall(lua_tableget(G.str['cc'], 'RepeatForever'), 'create', lua_mcall(lua_tableget(G.str['cc'], 'Sequence'), 'create', [lua_mcall(lua_tableget(G.str['cc'], 'CallFunc'), 'create', [(function () {
var tmp;
lua_tableset(self, 'startIndex', lua_add(lua_tableget(self, 'startIndex'), 1));
if (lua_lt(lua_tableget(self, 'tipsCount'), lua_tableget(self, 'startIndex'))) {
lua_tableset(self, 'startIndex', 1);
}
var _cur_index_152 = lua_or(lua_tableget(lua_tableget(self, 'orderList'), lua_tableget(self, 'startIndex')), function () {return 1;});
if (lua_true(lua_tableget(lua_tableget(self, 'tipsList'), _cur_index_152))) {
if (lua_not(lua_tablegetcall(G.str['tolua'], 'isnull', [lua_tableget(self, 'lbProcess')])[0])) {
lua_tableset(self, 'curDownStr', lua_or(lua_tableget(self, 'curDownStr'), function () {return "";}));
lua_tableset(self, 'tipStr', lua_tableget(lua_tableget(self, 'tipsList'), _cur_index_152));
lua_mcall(lua_tableget(self, 'lbProcess'), 'setString', [lua_concat(lua_tableget(self, 'tipStr'), lua_tableget(self, 'curDownStr'))]);
}
}
return [];
})])[0]].concat(lua_mcall(lua_tableget(G.str['cc'], 'DelayTime'), 'create', [6])))));
return [];
}))
lua_tableset(G.str['LoginView'], 'getLoadingTipsOrder', (function (self) {
var tmp;
var _res_156 = lua_newtable();
var var_157 = 1, stop_157 = lua_assertfloat(lua_tableget(self, 'tipsCount'));
for (; var_157 <= stop_157; var_157++) {
var _i_157 = var_157;
lua_tableset(_res_156, _i_157, _i_157);
}
var _num_156, _testMapPos_156, _tmp_156;
var var_159 = 2, stop_159 = lua_assertfloat(lua_tableget(self, 'tipsCount'));
for (; var_159 <= stop_159; var_159++) {
var _i_159 = var_159;
_num_156 = lua_tablegetcall(G.str['math'], 'random', [2, lua_tableget(self, 'tipsCount')])[0];
_tmp_156 = lua_tableget(_res_156, _i_159);
lua_tableset(_res_156, _i_159, lua_tableget(_res_156, _num_156));
lua_tableset(_res_156, _num_156, _tmp_156);
}
return [_res_156];
return [];
}))
lua_tableset(G.str['LoginView'], 'checkLoadingError', (function (self) {
var tmp;
var _actionTag_161 = 233;
lua_mcall(self, 'stopActionByTag', [_actionTag_161]);
if (lua_true(lua_tableget(self, 'loadEnd'))) {
return [];
}
var _action_161 = lua_mcall(lua_tableget(G.str['cc'], 'Sequence'), 'create', [lua_mcall(lua_tableget(G.str['cc'], 'DelayTime'), 'create', [5])[0]].concat(lua_mcall(lua_tableget(G.str['cc'], 'CallFunc'), 'create', [(function () {
var tmp;
if ((lua_lte(90, lua_tableget(self, 'maxPercent')) && lua_not(lua_tableget(self, 'notified')))) {
lua_tableset(self, 'notified', true);
var _ctl_164 = lua_or(lua_tableget(self, 'ctl'), function () {return lua_newtable();});
lua_tablegetcall(G.str['bole'], 'send_codeInfo', [lua_tableget(G.str['Splunk_Type'], 'ACTION'), lua_newtable([], 'current', "login_loading", 'maxPercent', lua_tableget(self, 'maxPercent'), 'finishCount', lua_tableget(_ctl_164, 'finishCount'), 'totalCnt', lua_tableget(_ctl_164, 'totalCnt')), false]);
}
return [];
})])))[0];
lua_mcall(_action_161, 'setTag', [_actionTag_161]);
lua_mcall(self, 'runAction', [_action_161]);
return [];
}))
lua_tableset(G.str['LoginView'], 'getLoadingNodeById', (function (self, _id) {
var tmp;
if (lua_not(_id)) {
return [];
}
var _down_type_165 = 2;
var _resRootPath_165 = lua_concat("loading_view/loading", _id);
if (lua_true(lua_tableget(G.str['bole'], '__isWeb__'))) {
var _downloadCtl_167 = lua_mcall(G.str['DownloadController'], 'getInstance', [])[0];
var _downloadType_167 = lua_mcall(_downloadCtl_167, '_getDownType', [lua_tableget(G.str['DOWNLOAD_TYPE'], 'SYSTEM')])[0];
var _resourceKey_167 = lua_concat("loading", _id);
var _res_config_167 = lua_mcall(_downloadCtl_167, '_getResConfig', [_downloadType_167, _resourceKey_167])[0];
if (lua_not(_res_config_167)) {
return [];
}
var _loadId_167 = lua_mcall(lua_mcall(lua_tableget(G.str['cc'], 'UserDefault'), 'getInstance', [])[0], 'getStringForKey', ["loading_ani_id_tag_load", ""])[0];
if (!lua_eq(lua_call(G.str['tostring'], [_loadId_167])[0], lua_call(G.str['tostring'], [_id])[0])) {
return [];
}
}
if ((lua_true(_resRootPath_165) && lua_true(lua_mcall(lua_mcall(lua_tableget(G.str['cc'], 'FileUtils'), 'getInstance', [])[0], 'isFileExist', [_resRootPath_165])[0]))) {
var _luaPath_170 = "";
if (lua_true(lua_tableget(G.str['bole'], 'isBit64'))) {
_luaPath_170 = lua_concat(_resRootPath_165, "/src64/ActivityDialogs");
} else {
_luaPath_170 = lua_concat(_resRootPath_165, "/src/ActivityDialogs");
}
return lua_call(G.str['require'], [_luaPath_170]);
}
return [];
}))
};
return [G];
})()[0];