`)});$(".carousel").carousel({wrap:!1});$(".carousel").carousel("pause");$(".carousel-item.active").next().length===0?n.isDoc||$("._bizgaze_popup_container").length!==1?$(".carousel-control-next").addClass("d-none"):n.loadMoreGallery():$(".carousel-control-next").removeClass("d-none");$(".carousel-item.active").prev().length===0?$(".carousel-control-prev").addClass("d-none"):$(".carousel-control-prev").removeClass("d-none")}likePhoto(t,i){if(t!=0){var r={PhotoId:Number(t),LikedBy:Unibase.Platform.Membership.Infos.Identity.currentUser.userId,Liked:i};Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/communications/events/managers/gallerymanager.js",function(){n.Apps.Communications.Events.Managers.GalleryManager.Instance().changephotplike(r).then(n=>{n.result!=null&&(n.result.Liked?($("gallery_liked_"+n.result.PhotoId).closest(".gallery-list").addClass("liked-image"),$("#gallery_liked_"+n.result.PhotoId).removeClass("icon-heart").addClass("fa fa-heart text-danger"),$(`[data-documentfileidimg="${n.result.PhotoId}"]`).find(".bannerliked").attr("value","true"),$("#modellikebtn").find("i").removeClass("icon-heart").addClass("fa fa-heart text-danger")):($("#gallery_liked_"+n.result.PhotoId).removeClass("fa fa-heart text-danger").addClass("icon-heart"),$(`[data-documentfileidimg="${n.result.PhotoId}"]`).find(".bannerliked").attr("value","false"),$("#modellikebtn").find("i").removeClass("fa fa-heart text-danger").addClass("icon-heart")))})})}}downloadImage(n,t){if(t){Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("platform/controls/ filedragndrop/w_documentfiles.js",function(){Unibase.Platform.Forms.Components.DocumentFiles.Instance().downloadDocument(n)});return}Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("platform/controls/filedragndrop/w_documentfiles.js",function(){Unibase.Platform.Forms.Components.DocumentFiles.Instance().downloadDocument(n)})}shareImage(t,i){var r=this;r.documentfileId=t;r.galleryId=i;Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/communications/events/components/shareimage.js",function(){var t=new n.Apps.Communications.Events.Components.ShareImage;r.navigationHelper.popup(0,"",t,null,Unibase.Platform.Helpers.Size.Large)})}deleteImage(n,t){var i=this;i.documentfileId=n;i.galleryId=t;bootbox.confirm("Are you sure?",function(t){t&&i.fileCacheHelper.loadJsFile("platform/files/managers/filemanager.js",function(){var t,i;Unibase.Platform.Files.Managers.FileManager.Instance().deleteDocumentFile(n).then(function(t){t.message=="File Deleted Successfully"&&$('.photoidCustom[data-documentfileidimg="'+n+'"]').remove()});t=Unibase.Themes.Compact.Components.Details.Instance();t._recordId=Unibase.Themes.Providers.DetailHelper.recordId;t._installedAppId=Unibase.Themes.Providers.DetailHelper.installedAppId;t._containerId=$("._bizgaze_detail_container:visible").attr("id");i=t;t.loadPortlets(i)})})}importPortability(n){var t=this;$(".sp_widget_create_"+n+"").find("#LinkButton").click(function(){Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("platform/portability/components/portability.js",function(){let u=Unibase.Themes.Providers.DetailHelper.installedAppId;var r=eval("Unibase.Platform.Portability.Components.ImportAndExport.Instance()"),n=r,i=r;i!==null&&i!==undefined&&(i.appSettings.InstalledAppId=u);n!=null&&n!=undefined&&t.navigationhelper.popup(0,"",n,function(){},Unibase.Platform.Helpers.Size.Large)})})}predictedimages(){var t=Unibase.Themes.Providers.Detail_Settings.instance.InputParameters.find(n=>n.Key.endsWith("eventid")).Value;this.navigationhelper.showLoading();Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/communications/events/managers/gallerymanager.js",function(){bootbox.alert("Face Detection Initiated ! Sit back and relax",function(){bootbox.alert("You will receive a notification once Face Recognition is completed.! Sit back and relax !",function(){n.Apps.Communications.Events.Managers.GalleryManager.Instance().predictedImages().then(n=>{n==="ALL MATCH FOUND"?(this.navigationhelper.hideLoading(),bootbox.alert("Sucess")):this.navigationhelper.hideLoading()})})})})}eventWisePrediction(t){var i=this;i.eventid=t;Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/communications/events/managers/gallerymanager.js",function(){bootbox.alert("The prediction has started",function(){n.Apps.Communications.Events.Managers.GalleryManager.Instance().eventWisePredictedImages(t).then(n=>{n==="ALL MATCH FOUND"?(i.navigationhelper=Unibase.Platform.Helpers.NavigationHelper.Instance(),i.navigationhelper.hideLoading(),bootbox.alert("Sucess"),$("#widgetconfig_Predict").show()):(i.navigationhelper.hideLoading(),$("#widgetconfig_Predict").show())})})})}aprovedImage(t,i){var r=this;r.documentfileId=t;r.statusid=i;r.fileCacheHelper.loadJsFile("apps/communications/events/managers/gallerymanager.js",function(){var r,u;n.Apps.Communications.Events.Managers.GalleryManager.Instance().approvedImage(t,i).then(function(){});r=Unibase.Themes.Compact.Components.Details.Instance();r._recordId=Unibase.Themes.Providers.DetailHelper.recordId;r._installedAppId=Unibase.Themes.Providers.DetailHelper.installedAppId;r._containerId=$("._bizgaze_detail_container:visible").attr("id");u=r;r.loadPortlets(u)})}static Instance(){return this.instance===undefined&&(this.instance=new i),this.instance}}t.Gallery=i})(i=t.Components||(t.Components={}))})(i=t.Events||(t.Events={}))})(i=t.Communications||(t.Communications={}))})(t=n.Apps||(n.Apps={}))})(Bizgaze||(Bizgaze={}));