var AudioSelectDialog=function(i,o){console.log("AudioSelectDialog -> CommonSelectDialog migrate"),void 0==o&&alert("Dialog must defined"),this.opt=$.extend({limitMax:100,limitMin:1,dialogWidth:Math.min($(window).width(),940)+"px",dialogHeight:"90%",server:"/path/to/audio/choose/dialog",callback:function(i){alert("选择了:"+i.join(","))}},i),this.dialog=o,this.runtime={dialog:null}};AudioSelectDialog.prototype.show=function(){var i=this;window.__audioSelectDialogPaths=[],this.runtime.dialog=this.dialog.dialog(this.opt.server,{width:this.opt.dialogWidth,height:this.opt.dialogHeight,closeCallback:function(){if(window.__audioSelectDialogPaths.length)return window.__audioSelectDialogPaths.length>i.opt.limitMax?void i.dialog.tipError("最多只能选择"+i.opt.limitMax+"个音频"):window.__audioSelectDialogPaths.length<i.opt.limitMin?void i.dialog.tipError("最少选择"+i.opt.limitMin+"个音频"):void i.opt.callback(window.__audioSelectDialogPaths)}})},AudioSelectDialog.prototype.close=function(){this.dialog.dialogClose(this.runtime.dialog)},module.exports=AudioSelectDialog;