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