');e.output.push(d)}$(t).html(e.output.join("")),n.target.value=null}))},s.prototype.RemoveItem=function(){var e=this,t=this.listImageWrap;$(t).on("click",".alireview_del_img",(function(t){t.preventDefault();for(var n=$(this).attr("data-fileid"),i=0;i=0&&this.filesToUpload.splice(t,1);this.output.length=0,this.filesToUpload.length=0,window.filesToUpload.length=0,$(e).empty()},s.prototype.Validate=function(e,t){if(!t.name.match(/\.(jpg|jpeg|png|gif)$/i))return alert("Sorry, this file format is not supported. Only jpg, png and gif are accepted."),!1;if(t.size&&t.size>10485760){var n=$(a).addClass("alireview_error_image error_file_size");return n=$(n).text(o.warning_limit_size_upload),0==$(".alireview_error_image.error_file_size").length&&$(n).insertAfter($("#alireview_file_upload_target")),!1}return $(".alireview_error_image.error_file_size").remove(),!0},s.prototype.UploadOneFile=function(e,t){return new Promise((function(t,n){$.ajax({url:i.a.shop_url+"/comment/upload_img?alireview_shop_id="+$('input[name="alireview_shop_id"]').val(),type:"POST",data:e,cache:!1,dataType:"json",processData:!1,contentType:!1,success:function(e){if("success"==e.status){var n=' ');return $("#alireview_file_upload").closest("form").append(n),t()}}})}))},s.prototype.Upload=function(){var e=this,t=this.listImageWrap;return $(t).find(".alireview_del_img").css("display","none"),Promise.all(this.filesToUpload.map((function(t){var n=new FormData;return n.append("files",t.file),e.UploadOneFile(n,t.id)}))).then((function(t){e.Clear()})).catch((function(e){}))}},flsY:function(e,t,n){"use strict";n.r(t);var i=n("r9OC"),r=n("YV4L");function o(e,t){for(var n=0;n1,o=c(o),i.delay>=0&&setTimeout((function(){d(!0)}),i.delay),(i.delay<0||i.combined)&&(s.e=function(e,t){var r,o=0;return function(a,s){function l(){o=+new Date,t.call(n,a)}var u=+new Date-o;r&&clearTimeout(r),u>e||!i.enableThrottle||s?l():r=setTimeout(l,e-u)}}(i.throttle,(function(e){"resize"===e.type&&(x=_=-1),d(e.all)})),s.a=function(e){e=c(e),o.push.apply(o,e)},s.g=function(){return o=r(o).filter((function(){return!r(this).data(i.loadedName)}))},s.f=function(e){for(var t=0;tt.top&&-rt.left&&-r=0?x:x=r(e).width()}function v(){return _>=0?_:_=r(e).height()}function m(e){return e.tagName.toLowerCase()}function g(e,t){if(t){var n=e.split(",");e="";for(var i=0,r=n.length;i