var touch,__extends=this&&this.__extends||function(){var t=function(e,a){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])})(e,a)};return function(e,a){function n(){this.constructor=e}if("function"!=typeof a&&null!==a)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");t(e,a),e.prototype=null===a?Object.create(a):(n.prototype=a.prototype,new n)}}();!function(t){var e=function(e){function a(a){var n=e.call(this)||this;n._main=null,n._playerInfos=null,n._curTime=0,n._curHeld=0,n._main=a,n.matchLab.text=t.Lang.getLangText(t.Lang.matching);var r=t.GameDefine.TOTAL_FAKE_AVATARS,o=t.MathUtil.randomNumbers(1,r,12);n._playerInfos=new Array;var i=t.Pool.get("MatchPlayerData",t.MatchPlayerData);i.icon="head/".concat(o[0],".png"),i.matchTime=0,n._playerInfos.push(i),n._curHeld=t.MathUtil.randomInt(0,r-1);for(var s=0;s<11;s++){var c=t.Pool.get("MatchPlayerData",t.MatchPlayerData);c.icon="head/"+o[s+1]+".png",c.matchTime=t.MathUtil.randomInt(0,3e3),n._playerInfos.push(c)}return n._curTime=0,n.listPlayer.array=new Array(n._playerInfos.length),n.listPlayer.renderHandler=Laya.Handler.create(n,n.onRenderItem,null,!1),Laya.timer.frameLoop(1,n,n.onLoop),n.adapterScreen(),Laya.stage.on(Laya.Event.RESIZE,n,n.onResize),n}return __extends(a,e),a.prototype.onResize=function(){this.adapterScreen()},a.prototype.adapterScreen=function(){var t=GameBaseData.getAdapterRatio();this.scale(t,t)},a.prototype.destroy=function(){e.prototype.destroy.call(this),Laya.stage.off(Laya.Event.RESIZE,this,this.onResize)},a.prototype.onRenderItem=function(t,e){if(!(null==t||e>=this._playerInfos.length)){var a=this._playerInfos[e];t.setData(a.icon,a.matchTime)}},a.prototype.onLoop=function(){this._curTime+=Laya.timer.delta;for(var e=this._playerInfos.length,a=0,n=0;n=e&&(Laya.timer.clear(this,this.onLoop),Laya.timer.once(500,this._main,this._main.event,[t.GameEvent.MATCH_OVER]))},a}(ui.MatchDialogUI);t.MatchDialog=e}(touch||(touch={}));