# ChestCustomerActivity_View_ChestCustomerActivityBaseWindow_1684.luac
; fn @ChestCustomerActivityBaseWindow.lua  line 0-0 np=0 va=1 ms=3 code=40 consts=16 upvals=1 protos=10
;   K[0]='ChestCustomerActivityBaseWindow'
;   K[1]='setmetatable'
;   K[2]='m_bCloseWhenFinish'
;   K[3]=true
;   K[4]='BaseWindow'
;   K[5]='__index'
;   K[6]='BeforeOpenCheck'
;   K[7]='Init'
;   K[8]='GetModel'
;   K[9]='GetActivityDefinition'
;   K[10]='_IsModelIdChanged'
;   K[11]='IsActivityValid'
;   K[12]='_OnStateChanged'
;   K[13]='CloseWhenNotValid'
;   K[14]='UpdatePerSecond'
;   K[15]='_GetCountDownEndTime'
;   upvals: _ENV
0000  GETTABUP  R0 = _ENV[K1('setmetatable')]
0001  NEWTABLE  R1 = {} (0 items)
0002  SETTABLE  R1[K2('m_bCloseWhenFinish')] = K3(true)
0003  GETTABUP  R2 = _ENV[K4('BaseWindow')]
0004  CALL      R0 = call(R0, 1 args, 2 rets)
0005  SETTABUP  _ENV[K0('ChestCustomerActivityBaseWindow')] = R0
0006  GETTABUP  R0 = _ENV[K0('ChestCustomerActivityBaseWindow')]
0007  GETTABUP  R1 = _ENV[K0('ChestCustomerActivityBaseWindow')]
0008  SETTABLE  R0[K5('__index')] = R1
0009  GETTABUP  R0 = _ENV[K0('ChestCustomerActivityBaseWindow')]
0010  CLOSURE   R1 = closure proto0
0011  SETTABLE  R0[K6('BeforeOpenCheck')] = R1
0012  GETTABUP  R0 = _ENV[K0('ChestCustomerActivityBaseWindow')]
0013  CLOSURE   R1 = closure proto1
0014  SETTABLE  R0[K7('Init')] = R1
0015  GETTABUP  R0 = _ENV[K0('ChestCustomerActivityBaseWindow')]
0016  CLOSURE   R1 = closure proto2
0017  SETTABLE  R0[K8('GetModel')] = R1
0018  GETTABUP  R0 = _ENV[K0('ChestCustomerActivityBaseWindow')]
0019  CLOSURE   R1 = closure proto3
0020  SETTABLE  R0[K9('GetActivityDefinition')] = R1
0021  GETTABUP  R0 = _ENV[K0('ChestCustomerActivityBaseWindow')]
0022  CLOSURE   R1 = closure proto4
0023  SETTABLE  R0[K10('_IsModelIdChanged')] = R1
0024  GETTABUP  R0 = _ENV[K0('ChestCustomerActivityBaseWindow')]
0025  CLOSURE   R1 = closure proto5
0026  SETTABLE  R0[K11('IsActivityValid')] = R1
0027  GETTABUP  R0 = _ENV[K0('ChestCustomerActivityBaseWindow')]
0028  CLOSURE   R1 = closure proto6
0029  SETTABLE  R0[K12('_OnStateChanged')] = R1
0030  GETTABUP  R0 = _ENV[K0('ChestCustomerActivityBaseWindow')]
0031  CLOSURE   R1 = closure proto7
0032  SETTABLE  R0[K13('CloseWhenNotValid')] = R1
0033  GETTABUP  R0 = _ENV[K0('ChestCustomerActivityBaseWindow')]
0034  CLOSURE   R1 = closure proto8
0035  SETTABLE  R0[K14('UpdatePerSecond')] = R1
0036  GETTABUP  R0 = _ENV[K0('ChestCustomerActivityBaseWindow')]
0037  CLOSURE   R1 = closure proto9
0038  SETTABLE  R0[K15('_GetCountDownEndTime')] = R1
0039  RETURN    return R0..R-1
; ---------- proto0 [BeforeOpenCheck] ----------
  ; fn ?  line 16-22 np=3 va=0 ms=7 code=25 consts=9 upvals=1 protos=0
  ;   K[0]='GM'
  ;   K[1]='ActivityManager'
  ;   K[2]='GetModel'
  ;   K[3]='GetState'
  ;   K[4]=nil
  ;   K[5]='ActivityState'
  ;   K[6]='Started'
  ;   K[7]='Ended'
  ;   K[8]='GetId'
  ;   upvals: _ENV
  ;   locals: self(0-25), activityType(0-25), id(0-25), model(5-25), state(7-25)
  0000  GETTABUP  R3 = _ENV[K0('GM')]
  0001  GETTABLE  R3 = R3[K1('ActivityManager')]
  0002  SELF      R4 = R3[K2('GetModel')] (self)
  0003  MOVE      R5 = R0
  0004  CALL      R3 = call(R3, 1 args, 2 rets)
  0005  SELF      R5 = R3[K3('GetState')] (self)
  0006  CALL      R4 = call(R4, 1 args, 1 rets)
  0007  EQ        if R1 eq K4(nil)   -> -129267
  0008  JMP       (jump)   -> 21
  0009  GETTABUP  R5 = _ENV[K5('ActivityState')]
  0010  GETTABLE  R5 = R5[K6('Started')]
  0011  EQ        if R1 eq R5   -> -129006
  0012  JMP       (jump)   -> 17
  0013  GETTABUP  R5 = _ENV[K5('ActivityState')]
  0014  GETTABLE  R5 = R5[K7('Ended')]
  0015  EQ        if R0 eq R5   -> -129002
  0016  JMP       (jump)   -> 21
  0017  SELF      R6 = R3[K8('GetId')] (self)
  0018  CALL      R5 = call(R5, 1 args, 1 rets)
  0019  EQ        if R1 eq R2   -> -128489
  0020  JMP       (jump)   -> 22
  0021  LOADBOOL  R5 = false
  0022  LOADBOOL  R5 = true
  0023  RETURN    return R5..R4
  0024  RETURN    return R0..R-1
; ---------- proto1 [Init] ----------
  ; fn ?  line 27-38 np=4 va=0 ms=9 code=38 consts=20 upvals=1 protos=0
  ;   K[0]='m_activityType'
  ;   K[1]='m_model'
  ;   K[2]='GM'
  ;   K[3]='ActivityManager'
  ;   K[4]='GetModel'
  ;   K[5]='m_id'
  ;   K[6]='m_activityDefinition'
  ;   K[7]='GetActivityDefinition'
  ;   K[8]='LogWindowAction'
  ;   K[9]='EBIType'
  ;   K[10]='UIActionType'
  ;   K[11]='Open'
  ;   K[12]='EBIReferType'
  ;   K[13]='AutoPopup'
  ;   K[14]='UserClick'
  ;   K[15]='EventDispatcher'
  ;   K[16]='AddListener'
  ;   K[17]='StateChangedEvent'
  ;   K[18]='_OnStateChanged'
  ;   K[19]='UpdatePerSecond'
  ;   upvals: _ENV
  ;   locals: self(0-38), activityType(0-38), id(0-38), bAutoPop(0-38)
  0000  SETTABLE  R0[K0('m_activityType')] = R1
  0001  GETTABUP  R4 = _ENV[K2('GM')]
  0002  GETTABLE  R4 = R4[K3('ActivityManager')]
  0003  SELF      R5 = R4[K4('GetModel')] (self)
  0004  MOVE      R6 = R0
  0005  CALL      R4 = call(R4, 1 args, 2 rets)
  0006  SETTABLE  R0[K1('m_model')] = R4
  0007  SETTABLE  R0[K5('m_id')] = R2
  0008  GETTABLE  R4 = R0[K1('m_model')]
  0009  SELF      R5 = R4[K7('GetActivityDefinition')] (self)
  0010  CALL      R4 = call(R4, 1 args, 1 rets)
  0011  SETTABLE  R0[K6('m_activityDefinition')] = R4
  0012  SELF      R5 = R0[K8('LogWindowAction')] (self)
  0013  GETTABUP  R6 = _ENV[K9('EBIType')]
  0014  GETTABLE  R6 = R6[K10('UIActionType')]
  0015  GETTABLE  R6 = R6[K11('Open')]
  0016  NEWTABLE  R7 = {} (1 items)
  0017  TEST      if not R3 then   -> -131053
  0018  JMP       (jump)   -> 23
  0019  GETTABUP  R8 = _ENV[K12('EBIReferType')]
  0020  GETTABLE  R8 = R8[K13('AutoPopup')]
  0021  TEST      if not R8 then   -> -131048
  0022  JMP       (jump)   -> 25
  0023  GETTABUP  R8 = _ENV[K12('EBIReferType')]
  0024  GETTABLE  R8 = R8[K14('UserClick')]
  0025  SETLIST   setlist R7[B=1,C=1]
  0026  CALL      R4 = call(R4, 0 args, 3 rets)
  0027  GETTABUP  R4 = _ENV[K15('EventDispatcher')]
  0028  GETTABLE  R4 = R4[K16('AddListener')]
  0029  SELF      R6 = R0[K7('GetActivityDefinition')] (self)
  0030  CALL      R5 = call(R5, 1 args, 1 rets)
  0031  GETTABLE  R5 = R5[K17('StateChangedEvent')]
  0032  MOVE      R6 = R0
  0033  GETTABLE  R7 = R0[K18('_OnStateChanged')]
  0034  CALL      R4 = call(R4, 0 args, 3 rets)
  0035  SELF      R5 = R0[K19('UpdatePerSecond')] (self)
  0036  CALL      R4 = call(R4, 0 args, 1 rets)
  0037  RETURN    return R0..R-1
; ---------- proto2 [GetModel] ----------
  ; fn ?  line 40-42 np=1 va=0 ms=2 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='m_model'
  ;   locals: self(0-3)
  0000  GETTABLE  R1 = R0[K0('m_model')]
  0001  RETURN    return R1..R0
  0002  RETURN    return R0..R-1
; ---------- proto3 [GetActivityDefinition] ----------
  ; fn ?  line 44-46 np=1 va=0 ms=3 code=6 consts=2 upvals=0 protos=0
  ;   K[0]='GetModel'
  ;   K[1]='GetActivityDefinition'
  ;   locals: self(0-6)
  0000  SELF      R2 = R0[K0('GetModel')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  SELF      R2 = R1[K1('GetActivityDefinition')] (self)
  0003  TAILCALL  tailcall(R1, 0)
  0004  RETURN    return R1..R0
  0005  RETURN    return R0..R-1
; ---------- proto4 [_IsModelIdChanged] ----------
  ; fn ?  line 48-50 np=1 va=0 ms=4 code=11 consts=3 upvals=0 protos=0
  ;   K[0]='m_id'
  ;   K[1]='GetModel'
  ;   K[2]='GetId'
  ;   locals: self(0-11)
  0000  GETTABLE  R1 = R0[K0('m_id')]
  0001  SELF      R3 = R0[K1('GetModel')] (self)
  0002  CALL      R2 = call(R2, 1 args, 1 rets)
  0003  SELF      R3 = R2[K2('GetId')] (self)
  0004  CALL      R2 = call(R2, 1 args, 1 rets)
  0005  EQ        if R0 eq R2   -> -130551
  0006  JMP       (jump)   -> 8
  0007  LOADBOOL  R1 = false
  0008  LOADBOOL  R1 = true
  0009  RETURN    return R1..R0
  0010  RETURN    return R0..R-1
; ---------- proto5 [IsActivityValid] ----------
  ; fn ?  line 53-55 np=1 va=0 ms=3 code=17 consts=4 upvals=0 protos=0
  ;   K[0]='GetModel'
  ;   K[1]='IsActivityOpen'
  ;   K[2]='IsInDuration'
  ;   K[3]='_IsModelIdChanged'
  ;   locals: self(0-17)
  0000  SELF      R2 = R0[K0('GetModel')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  SELF      R2 = R1[K1('IsActivityOpen')] (self)
  0003  CALL      R1 = call(R1, 1 args, 1 rets)
  0004  TEST      if not R1 then   -> -131066
  0005  JMP       (jump)   -> 15
  0006  SELF      R2 = R0[K0('GetModel')] (self)
  0007  CALL      R1 = call(R1, 1 args, 1 rets)
  0008  SELF      R2 = R1[K2('IsInDuration')] (self)
  0009  CALL      R1 = call(R1, 1 args, 1 rets)
  0010  TEST      if not R1 then   -> -131060
  0011  JMP       (jump)   -> 15
  0012  SELF      R2 = R0[K3('_IsModelIdChanged')] (self)
  0013  CALL      R1 = call(R1, 1 args, 1 rets)
  0014  NOT       R1 = not R0
  0015  RETURN    return R1..R0
  0016  RETURN    return R0..R-1
; ---------- proto6 [_OnStateChanged] ----------
  ; fn ?  line 57-60 np=1 va=0 ms=3 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='CloseWhenNotValid'
  ;   locals: self(0-3)
  0000  SELF      R2 = R0[K0('CloseWhenNotValid')] (self)
  0001  CALL      R1 = call(R1, 0 args, 1 rets)
  0002  RETURN    return R0..R-1
; ---------- proto7 [CloseWhenNotValid] ----------
  ; fn ?  line 62-66 np=1 va=0 ms=3 code=10 consts=3 upvals=0 protos=0
  ;   K[0]='m_bCloseWhenFinish'
  ;   K[1]='IsActivityValid'
  ;   K[2]='Close'
  ;   locals: self(0-10)
  0000  GETTABLE  R1 = R0[K0('m_bCloseWhenFinish')]
  0001  TEST      if not R1 then   -> -131069
  0002  JMP       (jump)   -> 9
  0003  SELF      R2 = R0[K1('IsActivityValid')] (self)
  0004  CALL      R1 = call(R1, 1 args, 1 rets)
  0005  TEST      if not R1 then   -> -131064
  0006  JMP       (jump)   -> 9
  0007  SELF      R2 = R0[K2('Close')] (self)
  0008  CALL      R1 = call(R1, 0 args, 1 rets)
  0009  RETURN    return R0..R-1
; ---------- proto8 [UpdatePerSecond] ----------
  ; fn ?  line 68-78 np=1 va=0 ms=8 code=45 consts=20 upvals=1 protos=0
  ;   K[0]='UIUtil'
  ;   K[1]='IsEmptyComponent'
  ;   K[2]='m_countDownText'
  ;   K[3]='IsActivityValid'
  ;   K[4]='GetModel'
  ;   K[5]='IsInDuration'
  ;   K[6]='text'
  ;   K[7]='GM'
  ;   K[8]='GameTextModel'
  ;   K[9]='GetText'
  ;   K[10]='countdown_finished'
  ;   K[11]='math'
  ;   K[12]='max'
  ;   K[13]=0
  ;   K[14]='_GetCountDownEndTime'
  ;   K[15]='GameModel'
  ;   K[16]='GetServerTime'
  ;   K[17]='TimeUtil'
  ;   K[18]='ParseTimeDescription'
  ;   K[19]=2
  ;   upvals: _ENV
  ;   locals: self(0-45), leftDuration(35-44)
  0000  GETTABUP  R1 = _ENV[K0('UIUtil')]
  0001  GETTABLE  R1 = R1[K1('IsEmptyComponent')]
  0002  GETTABLE  R2 = R0[K2('m_countDownText')]
  0003  CALL      R1 = call(R1, 1 args, 1 rets)
  0004  TEST      if not R1 then   -> -131065
  0005  JMP       (jump)   -> 44
  0006  SELF      R2 = R0[K3('IsActivityValid')] (self)
  0007  CALL      R1 = call(R1, 1 args, 1 rets)
  0008  TEST      if not R1 then   -> -131062
  0009  JMP       (jump)   -> 16
  0010  SELF      R2 = R0[K4('GetModel')] (self)
  0011  CALL      R1 = call(R1, 1 args, 1 rets)
  0012  SELF      R2 = R1[K5('IsInDuration')] (self)
  0013  CALL      R1 = call(R1, 1 args, 1 rets)
  0014  TEST      if not R1 then   -> -131055
  0015  JMP       (jump)   -> 24
  0016  GETTABLE  R1 = R0[K2('m_countDownText')]
  0017  GETTABUP  R2 = _ENV[K7('GM')]
  0018  GETTABLE  R2 = R2[K8('GameTextModel')]
  0019  SELF      R3 = R2[K9('GetText')] (self)
  0020  LOADK     R4 = K10 'countdown_finished'
  0021  CALL      R2 = call(R2, 1 args, 2 rets)
  0022  SETTABLE  R1[K6('text')] = R2
  0023  JMP       (jump)   -> 44
  0024  GETTABUP  R1 = _ENV[K11('math')]
  0025  GETTABLE  R1 = R1[K12('max')]
  0026  LOADK     R2 = K13 0
  0027  SELF      R4 = R0[K14('_GetCountDownEndTime')] (self)
  0028  CALL      R3 = call(R3, 1 args, 1 rets)
  0029  GETTABUP  R4 = _ENV[K7('GM')]
  0030  GETTABLE  R4 = R4[K15('GameModel')]
  0031  SELF      R5 = R4[K16('GetServerTime')] (self)
  0032  CALL      R4 = call(R4, 1 args, 1 rets)
  0033  SUB       R3 = R4 sub R3
  0034  CALL      R1 = call(R1, 1 args, 2 rets)
  0035  GETTABLE  R2 = R0[K2('m_countDownText')]
  0036  GETTABUP  R3 = _ENV[K17('TimeUtil')]
  0037  GETTABLE  R3 = R3[K18('ParseTimeDescription')]
  0038  MOVE      R4 = R0
  0039  LOADK     R5 = K19 2
  0040  LOADBOOL  R6 = false
  0041  LOADBOOL  R7 = false
  0042  CALL      R3 = call(R3, 1 args, 4 rets)
  0043  SETTABLE  R2[K6('text')] = R3
  0044  RETURN    return R0..R-1
; ---------- proto9 [_GetCountDownEndTime] ----------
  ; fn ?  line 81-83 np=1 va=0 ms=3 code=6 consts=2 upvals=0 protos=0
  ;   K[0]='GetModel'
  ;   K[1]='GetTriggerEndTime'
  ;   locals: self(0-6)
  0000  SELF      R2 = R0[K0('GetModel')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  SELF      R2 = R1[K1('GetTriggerEndTime')] (self)
  0003  TAILCALL  tailcall(R1, 0)
  0004  RETURN    return R1..R0
  0005  RETURN    return R0..R-1
