This commit is contained in:
2023-03-11 17:30:20 +00:00
commit b6c4e025bc
5124 changed files with 1153349 additions and 0 deletions
@@ -0,0 +1,760 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Communications;
(function (Communications) {
let Events;
(function (Events) {
let Components;
(function (Components) {
class Gallery extends Unibase.Platform.Core.BaseComponent {
constructor() {
super();
this.filePath = [];
this.documentId = [];
this.hashMapFilePath = {};
this.galleryCurrentId = '';
this.displayFileTypeEl = '';
this.fileTypeDate = [];
this.statusid = '';
this.galleryPage = 0;
this.carousel = '';
this.inputParameters = [];
this.elName = '';
this.isPlaying = false;
this.isDoc = false;
this.isDocCall = false;
this.reportIdGallery = null;
this.nextClickHandler = (e) => {
let instance = this;
if ($('.carousel-item.active').next().length === 1) {
$('.carousel-control-prev').removeClass('d-none');
if ($('.carousel-item.active').next().next().length === 0) {
if (!instance.isDocCall && $('._bizgaze_popup_container').length === 1) {
instance.loadMoreGallery();
}
else {
$('.carousel-control-next').addClass('d-none');
}
}
let bannerliked = $('.carousel-item.active').next().find('img').attr('data-bannerliked');
if (bannerliked == "false" || bannerliked == '' || bannerliked == null ||
bannerliked == 'undefined') {
$('.modelgallery').removeClass("fa fa-heart text-danger").addClass("icon-heart");
}
else {
$('.modelgallery').removeClass("icon-heart").addClass("fa fa-heart text-danger");
}
}
};
this.navigationhelper = Unibase.Platform.Helpers.NavigationHelper.Instance();
}
cssFiles() {
return [];
}
jsFiles() {
return ["apps/communications/events/managers/gallerymanager.js", "apps/communications/events/components/shareimage.js"];
}
load(id, containerid, callback) {
let Instance = this;
Instance.displayImages();
if (Instance.isDocCall) {
this.displayFileType();
}
let imagegalleryheading = $('#div_App_DefaultWidget').find('.biz-header-main-text').text();
$('#imagegalleryheading').text(imagegalleryheading);
let ContainerId = Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds[Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds.length - 1];
$(`#${ContainerId}`).find('.carousel-control-prev').click(this.prevClickHandler);
$(`#${ContainerId}`).find('.carousel-control-next').click(this.nextClickHandler);
$('#modellikebtn').click(function (e) {
let bannerfileid = $('.carousel-item.active').find('img').attr('data-bannerfileid');
let checkclass = $('#modellikebtn').find("i").hasClass('icon-heart');
if (checkclass == true) {
Instance.likePhoto(bannerfileid, true);
}
else {
Instance.likePhoto(bannerfileid, false);
}
});
$('.carousel').on('slide.bs.carousel', function (e) {
if (Instance.isPlaying) {
if ($('.carousel-item.active').next().length > 0) {
$('.carousel-control-prev').removeClass('d-none');
if ($('.carousel-item.active').next().next().length == 0) {
$('.carousel-control-next').addClass('d-none');
}
}
}
});
$('#btn_autoplay').click(function (e) {
Instance.isPlaying = true;
if ($(e.target).find('.fa-pause').length != 0) {
$(e.target).find('.fa-pause').removeClass('fa-pause').addClass('fa-play');
$('.carousel').carousel('pause');
Instance.isPlaying = false;
}
else {
$('.carousel').carousel('cycle');
$(e.target).find('.fa-play').removeClass('fa-play').addClass('fa-pause');
}
});
$('#galleryimagedownloadbtn').click((e) => {
if (this.isDoc) {
let docIdNumber = $('.carousel-item.active').find('img').attr('data-liid');
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile('platform/controls/filedragndrop/w_documentfiles.js', function () {
Unibase.Platform.Forms.Components.DocumentFiles.Instance().downloadDocument(docIdNumber);
});
}
else {
let bannerfileid = $('.carousel-item.active').find('img').attr('data-bannerfileid');
let bannerenable = $('.carousel-item.active').find('img').attr('data-bannerenable');
let idnumberDoc = $('.carousel-item.active').find('img').attr('data-idnumber');
if ($('#modellikebtn').hasClass('d-none')) {
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile('platform/controls/filedragndrop/w_documentfiles.js', function () { Unibase.Platform.Forms.Components.DocumentFiles.Instance().downloadDocument(idnumberDoc); });
}
else if (bannerenable == 'true') {
Instance.downloadImage(bannerfileid);
}
}
});
$('#shareimggallery').click(function (e) {
let galleryIdImg = $('.carousel-item.active').find('img').attr('data-liId');
let galleryDocId = $('.carousel-item.active').find('img').attr('data-documentfileidimg');
Instance.shareImage(galleryDocId, galleryIdImg);
});
}
prevClickHandler(e) {
if ($('.carousel-item.active').prev().length === 1) {
$('.carousel-control-next').removeClass('d-none');
if ($('.carousel-item.active').prev().prev().length === 0) {
$('.carousel-control-prev').addClass('d-none');
}
let bannerliked = $('.carousel-item.active').prev().find('img').attr('data-bannerliked');
if (bannerliked == "false" || bannerliked == '' || bannerliked == null ||
bannerliked == 'undefined') {
$('.modelgallery').removeClass("fa fa-heart text-danger").addClass("icon-heart");
}
else {
$('.modelgallery').removeClass("icon-heart").addClass("fa fa-heart text-danger");
}
}
}
loadMoreGallery() {
let instance = this;
var fromDate = "";
var toDate = "";
var cf_fromDate = Unibase.Platform.Helpers.NavigationHelper.commonFilter_FromDate;
var cf_toDate = Unibase.Platform.Helpers.NavigationHelper.commonFilter_ToDate;
if (cf_fromDate != null && cf_toDate != null) {
fromDate = cf_fromDate.toString();
toDate = cf_toDate.toString();
}
else {
fromDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
toDate = Unibase.Platform.Helpers.DateTimeHelper.Instance().formatLocalDateformat(new Date(Unibase.Platform.Helpers.DateTimeHelper.Instance().currentDate()), "YYYY/MM/DD");
}
let ContainerId = Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds[Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds.length - 2];
instance.reportIdGallery = $(`#${ContainerId}`).find('#hf_ReportId').val();
let objPayload = {
ReportId: Number(instance.reportIdGallery),
page: instance.galleryPage,
Filter: [],
InputParameters: instance.inputParameters,
pageSize: 5,
SearchTerm: null,
FilterId: 0,
DateFilter: [],
IsEnableCount: true,
DisplayModeTypeId: 1,
FromDate: fromDate,
ToDate: toDate,
viewerTypeId: 2,
IsDynamicFilterApplied: undefined,
IsPortletWidget: true,
};
Unibase.Platform.Analytics.Viewers.TemplateViewer.Instance().reportManager.getReportInfo(objPayload).then(function (reportresponse) {
if (reportresponse.result == null) {
console.log('reportresponse.result == null');
$('.carousel-control-next').addClass('d-none');
return;
}
if (reportresponse.result.ReportJsonData.Result.Data === '') {
$('.carousel-control-next').addClass('d-none');
return;
}
;
let dataObj = JSON.parse(reportresponse.result.ReportJsonData.Result.Data);
let newFilePath = [];
dataObj.forEach((currentImg, index) => {
let ContainerId = Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds[Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds.length - 1];
let screenHeight = screen.height;
let heightHeader = $(`#${ContainerId}`).find('.modal-header').first().outerHeight(true);
let heightFooter = $(`#${ContainerId}`).find('.modal-footer').first().outerHeight(true);
let sumHeight = (screenHeight - (heightHeader + heightFooter));
let fileType = currentImg.documentfilepath.split('.')[1].toLowerCase() != 'mp4' ? 'img' : 'video';
let file = currentImg.documentfilepath.slice(1, currentImg.documentfilepath.length);
let id = currentImg.documentfilename;
let bannerenable = currentImg.enabledownload;
let liId = currentImg.documentfileid;
let bannerliked = currentImg.liked === null ? '' : currentImg.liked;
newFilePath.push({ fileType, file, id, bannerenable, liId, bannerfileid: liId, bannerliked });
let details = navigator.userAgent;
let regexp = /android|iphone|kindle|ipad/i;
let isMobileDevice = regexp.test(details);
let el = '';
el = `${instance.elName}`;
if (instance.isDoc == false) {
if (isMobileDevice) {
if (fileType === 'video') {
$('.carousel-inner').append(` <div style="max-height: ${sumHeight}px !important" class="h-100 carousel-item "><video playsinline muted data-bannerenable="${bannerenable}" src="${file}" type="video/mp4" data-liId="${liId}" data-bannerfileid="${+liId}" data-bannerliked="${bannerliked}" onerror="sanitizeURL(event)" data-dynamic="1" data-loaded="0" class="mh-100 mw-100 w-100" controls autoplay loop webkit-playsinline webkitRequestFullscreen msRequestFullscreen style="object-fit: cover; padding-top:5vh;"></video></div>`);
}
else if (fileType === 'img') {
$('.carousel-inner').append(`<div style="max-height: ${sumHeight}px !important" class="carousel-item ">
<img data-bannerenable="${bannerenable}" class="mh-100 mw-100 w-100" data-liId="${liId}" src="${file}" data-bannerfileid="${+liId}" data-bannerliked="${bannerliked}" alt="image not found" onerror="ReloadImage(event)" style="
padding-top: 5vh;
" data-dynamic="1" data-loaded="0">
</div>`);
}
$('.carousel-inner').css('padding', 0);
}
else {
if (fileType === 'video') {
$('.carousel-inner').append(` <div style="max-height: ${sumHeight}px !important" class=" carousel-item "><video muted data-bannerenable="${bannerenable}" data-bannerfileid="${+liId}" data-bannerliked="${bannerliked}" data-liId="${liId}" playsinline src="${file}" type="video/mp4" onerror="sanitizeURL(event)" data-dynamic="1" data-loaded="0" class=" mh-100 mw-100" controls autoplay loop webkit-playsinline webkitRequestFullscreen msRequestFullscreen style="object-fit: cover;"></video></div>`);
}
else if (fileType === 'img') {
$('.carousel-inner').append(`<div style="text-align:center;" class="carousel-item" >
<img style="
height: auto !important;
max-height: 80vh !important;
margin-top: 5vh;
" class="d-block mh-100 mw-100 ml-auto mr-auto" data-liId="${liId}" data-bannerenable="${bannerenable}" data-bannerfileid="${+liId}" data-bannerliked="${bannerliked}" src="${file}" alt="image not found" onerror="ReloadImage(event)" data-dynamic="1" data-loaded="0"">
</div>`);
}
}
}
if (instance.isDoc) {
if (isMobileDevice) {
if (currentImg.documenttypename === 'png' || currentImg.documenttypename === 'jpg' || currentImg.documenttypename === 'jpeg') {
$('.carousel-inner').append(`<div style="max-height: ${sumHeight}px !important" class="carousel-item ">
<img class="mh-100 mw-100 w-100" data-liId="${currentImg.documentfileid}" data-idnumber="${currentImg.documentfileid}" src="${currentImg.documentfilepath}" alt="image not found" onerror="ReloadImage(event)" style="
padding-top: 5vh;
" data-dynamic="1" data-loaded="0">
</div>`);
}
else if (currentImg.documenttypename === 'pdf' || currentImg.documenttypename === 'word' || currentImg.documenttypename === 'excel' || currentImg.fileType != 'removeme') {
$('.carousel-inner').append(`<div style="max-height: ${sumHeight}px !important" class="carousel-item ">
<img class="mh-100 mw-100 w-100" data-liId="${currentImg.documentfileid}" data-idnumber="${currentImg.documentfileid}" src="/tenants/themes/compact/imgs/pdfimgdoc.png" alt="${currentImg.documenttypename}" onerror="ReloadImage(event)" style="
padding-top: 5vh;
" data-dynamic="1" data-loaded="0">
</div>`);
}
$('.carousel-inner').css('padding', 0);
}
else {
if (currentImg.documenttypename === 'png' || currentImg.documenttypename === 'jpg' || currentImg.documenttypename === 'jpeg' || currentImg.fileType === 'svg') {
$('.carousel-inner').append(`<div style="text-align:center;" class="carousel-item">
<img style="
height: auto !important;
max-height: 80vh !important;
margin-top: 5vh;
" class="d-block mh-100 mw-100 ml-auto mr-auto" data-liId="${currentImg.documentfileid}" data-idnumber="${currentImg.documentfileid}" src="${currentImg.documentfilepath}" alt="image not found" onerror="ReloadImage(event)" data-dynamic="1" data-loaded="0">
</div>`);
}
else if (currentImg.documenttypename === 'pdf' || currentImg.documenttypename === 'word' || currentImg.documenttypename === 'excel' || currentImg.fileType != 'removeme') {
$('.carousel-inner').append(`<div style="text-align:center;" class="carousel-item">
<img style="
height: auto !important;
max-height: 80vh !important;
margin-top: 5vh;
width:100px;
" class="d-block mh-100 mw-100 ml-auto mr-auto" data-liId="${currentImg.documentfileid}" data-idnumber="${currentImg.documentfileid}" src="/tenants/themes/compact/imgs/pdfimgdoc.png" alt="image not found" onerror="ReloadImage(event)" data-dynamic="1" data-loaded="0">
</div>`);
}
}
}
$('.carousel-control-next').removeClass('d-none');
});
instance.galleryPage++;
});
let bannerliked = $('.carousel-item.active').next().find('img').attr('data-bannerliked');
if (bannerliked == "false" || bannerliked == '' || bannerliked == null ||
bannerliked == 'undefined') {
$('.modelgallery').removeClass("fa fa-heart text-danger").addClass("icon-heart");
}
else {
$('.modelgallery').removeClass("icon-heart").addClass("fa fa-heart text-danger");
}
}
init(containerid) {
}
html(id, containerid) {
let html = `
<div id="img-modal" class="modal-content h-100">
<div class="modal-header pa-10"> <strong class="modal-title biz-highlight-bg-color" id="imagegalleryheading">Gallery</strong>
<div class="d-flex align-items-center justify-content-between">
<div> <button type="button"
id="btn_autoplay"
class="btn btn-icon btn-icon-circle btn-warning btn-icon-style-3" ><span style="pointer-events:none" class="btn-icon-wrap"><i class="fa fa-play"></i></span></button> <button id="shareimggallery" class="btn btn-icon btn-icon-circle btn-warning btn-icon-style-3" href="javascript:;"
"><span class="btn-icon-wrap"><i class="fa fa-share-alt"></i></span></button> <button
class="btn btn-icon btn-icon-circle btn-success btn-icon-style-3" id="galleryimagedownloadbtn" href="javascript:;"><span
class="btn-icon-wrap"><i class="fa fa-download"></i></span></button> </div>
</div>
<div id="divEditFiltersErrMsg" class="form-error-message"></div>
</div>
<div class="modal-body simple-scroll-bar edit-filters-body py-0 bg-cyan-light-5">
<div class="d-flex" id="galleryheightmodel" style="gap: 10px;align-items: center;height:80vh">
<a style="opacity: 1; width:20px; " class="carousel-control-prev d-none position-static" href="#carouselExampleControls" role="button"
data-slide="prev"> <span style="background-image: none;" class="carousel-control-prev-icon"
aria-hidden="true"> <i class="fa fa-angle-double-left " style=" color: black; font-size: 34px; "></i>
</span> <span class="preImgHandler sr-only">Previous</span> </a>
<div class="card bg-transparent border-0 shadow-none" id="staticFiltersCard" style="
flex-grow: 1;
">
<div id="carouselExampleControls" data-interval="2000" class="carousel slide-fade" data-ride="carousel">
<div class="carousel-inner " style="padding:0px 100px "> </div>
</div>
</div>
<a style="opacity: 1;width: 20px;" class="carousel-control-next position-static" href="#carouselExampleControls" role="button"
data-slide="next"> <span style="background-image: none;" class="carousel-control-next-icon"
aria-hidden="true"> <i class="fa fa-angle-double-right" style=" color: black; font-size: 34px;"></i>
</span> <span class="sr-only ">Next</span> </a>
</div>
</div>
<div class="modal-footer pa-10"> <button type="button"
onclick="Unibase.Platform.Helpers.NavigationHelper.Instance().closePopUp()" id="btn_CloseForm_${id}"
class="btn btn-light btn-sm mr-auto">Close</button>
<div> <button id="modellikebtn" class="btn btn-icon btn-icon-circle btn-liked btn-danger btn-icon-style-3"
href="javascript:;"><span class="btn-icon-wrap"><i class="modelgallery icon-heart"></i></span></button> <a
class="badge badge-soft-info badge-pill align-items-center justify-content-center biz-highlight-text-color"
href="javascript:;" onclick="">1235 <i class="fa fa-thumbs-up ml-1"></i></a> </div>
</div>
</div>`;
return html;
}
openModalFile(currentElId) {
this.galleryPage = 2;
this.elName = '.documenttypegapCustom';
let Instance = this;
Instance.isDocCall = true;
this.displayFileTypeEl = currentElId;
let ContainerId = Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds[Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds.length - 1];
this.isDoc = true;
Instance.fileTypeDate = [];
let el = '';
if ($('._bizgaze_popup_container').length === 0) {
el = `.documenttypegapCustom`;
}
else {
el = `._bizgaze_popup_container .documenttypegapCustom`;
}
$(el).each(function (i, e) {
let fileType = $(e).find('[data-filetype]').val();
fileType = `${fileType}`.toLowerCase();
let documentfilepath = $(`#list-group-item-${$(e).find('[data-documentfileidCus]').val()}`).find('[data-documentfilepath]').val();
let id = $(e).find('[data-documentfileidCus]').val();
debugger;
Instance.fileTypeDate.push({
id,
fileType,
documentfilepath,
dataIdNumber: $(e).find('[data-documentfileidCus]').val()
});
});
}
displayFileType() {
let Instance = this;
let ContainerId = Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds[Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds.length - 1];
if (this.isDoc) {
$('#shareimggallery').addClass('d-none');
$('#modellikebtn').addClass('d-none');
$('.fa-thumbs-up').parent().addClass('d-none');
}
let screenHeight = screen.height;
let heightHeader = $(`#${ContainerId}`).find('.modal-header').first().outerHeight(true);
let heightFooter = $(`#${ContainerId}`).find('.modal-footer').first().outerHeight(true);
let sumHeight = (screenHeight - (heightHeader + heightFooter));
$('.carousel-inner').html('');
Instance.fileTypeDate.forEach(function (e, i) {
let active = '';
if (Instance.displayFileTypeEl == +e.id) {
active = 'active';
}
debugger;
let details = navigator.userAgent;
let regexp = /android|iphone|kindle|ipad/i;
let isMobileDevice = regexp.test(details);
if (isMobileDevice) {
if (e.fileType === 'png' || e.fileType === 'jpg' || e.fileType === 'jpeg') {
$('.carousel-inner').append(`<div style="max-height: ${sumHeight}px !important" class="carousel-item ${active} ">
<img class="mh-100 mw-100 w-100" data-liId="${e.dataIdNumber}" data-idnumber="${e.dataIdNumber}" src="${e.documentfilepath}" alt="image not found" onerror="ReloadImage(event)" style="
padding-top: 5vh;
" data-dynamic="1" data-loaded="0">
</div>`);
}
else if (e.fileType === 'mp4') {
$('.carousel-inner').append(`<div style="max-height: ${sumHeight}px !important" class="carousel-item ${active} ">
<video class="d-block mh-100 mw-100 ml-auto mr-auto" data-liId="${e.id}" data-idnumber="${e.dataIdNumber}" alt="image not found" onerror="ReloadImage(event)" data-dynamic="1" data-loaded="0" controls > <source src="${e.documentfilepath.replace('~/', '')}" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>`);
}
else if (e.fileType === 'txt' || e.fileType === 'pdf') {
$('.carousel-inner').append(`<div style="max-height: ${sumHeight}px !important" class="carousel-item ${active} ">
<iframe src='${e.documentfilepath.replace('~/', '')}' title="W3Schools Free Online Web Tutorials"></iframe>
</div>`);
}
else if (e.fileType === 'pdf' || e.fileType === 'word' || e.fileType === 'excel' || e.fileType != 'removeme') {
$('.carousel-inner').append(`<div data-pathsrc="${e.documentfilepath}" style="max-height: ${sumHeight}px !important" class="carousel-item ${active} ">
<img class="mh-100 mw-100 w-100" data-liId="${e.dataIdNumber}" data-idnumber="${e.dataIdNumber}" src="/tenants/themes/compact/imgs/pdfimgdoc.png" alt="image not found" onerror="ReloadImage(event)" style="
padding-top: 5vh;
" data-dynamic="1" data-loaded="0">
</div>`);
}
$('.carousel-inner').css('padding', 0);
}
else {
if (e.fileType === 'png' || e.fileType === 'jpg' || e.fileType === 'jpeg' || e.fileType === 'svg') {
$('.carousel-inner').append(`<div style="text-align:center;" class="carousel-item ${active}">
<img style="
height: auto !important;
max-height: 80vh !important;
margin-top: 5vh;
" class="d-block mh-100 mw-100 ml-auto mr-auto" data-liId="${e.id}" data-idnumber="${e.dataIdNumber}" src="${e.documentfilepath}" alt="image not found" onerror="ReloadImage(event)" data-dynamic="1" data-loaded="0">
</div>`);
}
else if (e.fileType === 'mp4') {
$('.carousel-inner').append(`<div style="text-align:center;" class="carousel-item ${active}">
<video style="
height: auto !important;
max-height: 80vh !important;
margin-top: 5vh;
" class="d-block mh-100 mw-100 ml-auto mr-auto" data-liId="${e.id}" data-idnumber="${e.dataIdNumber}" alt="image not found" onerror="ReloadImage(event)" data-dynamic="1" data-loaded="0" controls > <source src="${e.documentfilepath.replace('~/', '')}" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>`);
}
else if (e.fileType === 'txt' || e.fileType === 'pdf') {
$('.carousel-inner').append(`<div style="text-align:center;" data-pathsrc="${e.documentfilepath}" class="carousel-item ${active}">
<iframe style="
height: 80vh !important;
margin-top: 5vh;
width:100%;
" src='${e.documentfilepath.replace('~/', '')}' title="W3Schools Free Online Web Tutorials"></iframe>
</div>`);
}
else if (e.fileType === 'word' || e.fileType === 'excel' || e.fileType != 'removeme') {
$('.carousel-inner').append(`<div style="text-align:center;" data-pathsrc="${e.documentfilepath}" class="carousel-item ${active}">
<img style="
height: auto !important;
max-height: 80vh !important;
margin-top: 5vh;
width:100px;
" class="d-block mh-100 mw-100 ml-auto mr-auto" data-liId="${e.id}" data-idnumber="${e.dataIdNumber}" src="/tenants/themes/compact/imgs/pdfimgdoc.png" alt="image not found" onerror="ReloadImage(event)" data-dynamic="1" data-loaded="0">
</div>`);
}
}
});
$('.carousel').carousel({
interval: 2000,
wrap: false,
});
$('.carousel').carousel('pause');
if ($('.carousel-item.active').next().length === 0) {
if ($('._bizgaze_popup_container').length === 1) {
$('.carousel-control-next').addClass('d-none');
Instance.loadMoreGallery();
}
}
else {
$('.carousel-control-next').removeClass('d-none');
}
if ($('.carousel-item.active').prev().length === 0) {
$('.carousel-control-prev').addClass('d-none');
}
else {
$('.carousel-control-prev').removeClass('d-none');
}
Instance.isDocCall = false;
}
filePathPush(galleryCurrentId) {
let Instance = this;
this.galleryCurrentId = galleryCurrentId;
let ContainerId = Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds[0];
Instance.galleryPage = 2;
Instance.elName = `.banner-media`;
Instance.filePath = [];
let el = '';
if ($('._bizgaze_popup_container').length === 0) {
el = `.banner-media`;
}
else {
el = `._bizgaze_popup_container .banner-media`;
}
$(el).each(function (i, e) {
let file = '';
let fileType = '';
let id = $(e).parents('.gallery-list').attr('data-documentfileidimg');
if (id == '') {
id = $(e).parents('.gallery-list').attr('data-otherid');
}
let liId = $(e).parents('.gallery-list').attr('id');
liId = liId.replace(/list-group-item-/g, '');
let bannerfileid = $(e).parents('.gallery-list').find('.bannerfileid').val();
let bannerliked = $(e).parents('.gallery-list').find('.bannerliked').val();
let bannerenable = $(e).parents('.gallery-list').find('.enabledownload').val();
if ($(this).find('img').length === 1) {
fileType = 'img';
file = $(this).find('img').attr('src');
}
else if ($(this).find('video').length === 1) {
fileType = 'video';
file = $(this).find('video').attr('src');
}
if (!Instance.hashMapFilePath[id]) {
Instance.hashMapFilePath[id] = true;
}
Instance.filePath.push({ fileType, file, id, bannerfileid, bannerliked, liId, bannerenable });
});
}
displayImages() {
let Instance = this;
let ContainerId = Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds[Unibase.Platform.Helpers.NavigationHelper.ModalContainerIds.length - 1];
$('.carousel-inner').html('');
let screenHeight = screen.height;
let heightHeader = $(`#${ContainerId}`).find('.modal-header').first().outerHeight(true);
let heightFooter = $(`#${ContainerId}`).find('.modal-footer').first().outerHeight(true);
let sumHeight = (screenHeight - (heightHeader + heightFooter));
this.filePath.forEach(function (e, i) {
let active = '';
if (Instance.galleryCurrentId == e.id) {
active = 'active';
if (e.bannerliked == "false" || e.bannerliked == '' || e.bannerliked == null ||
e.bannerliked == 'undefined') {
$('.modelgallery').removeClass("fa fa-heart text-danger").addClass("icon-heart");
}
else {
$('.modelgallery').removeClass("icon-heart").addClass("fa fa-heart text-danger");
}
if (e.bannerenable == 'false') {
$('#galleryimagedownloadbtn').addClass('d-none');
}
}
let details = navigator.userAgent;
let regexp = /android|iphone|kindle|ipad/i;
let isMobileDevice = regexp.test(details);
if (isMobileDevice) {
if (e.fileType === 'video') {
$('.carousel-inner').append(` <div style="max-height: ${sumHeight}px !important" class="h-100 carousel-item ${active}"><video playsinline muted data-bannerenable="${e.bannerenable}" src="${e.file}" type="video/mp4" data-liId="${e.liId}" data-bannerfileid="${e.bannerfileid}" data-bannerliked="${e.bannerliked}" onerror="sanitizeURL(event)" data-dynamic="1" data-loaded="0" class="mh-100 mw-100 w-100" controls autoplay loop webkit-playsinline webkitRequestFullscreen msRequestFullscreen style="object-fit: cover; padding-top:5vh;"></video></div>`);
}
else if (e.fileType === 'img') {
$('.carousel-inner').append(`<div style="max-height: ${sumHeight}px !important" class="carousel-item ${active} ">
<img data-bannerenable="${e.bannerenable}" class="mh-100 mw-100 w-100" data-liId="${e.liId}" src="${e.file}" data-bannerfileid="${e.bannerfileid}" data-bannerliked="${e.bannerliked}" alt="image not found" onerror="ReloadImage(event)" style="
padding-top: 5vh;
" data-dynamic="1" data-loaded="0">
</div>`);
}
$('.carousel-inner').css('padding', 0);
}
else {
if (e.fileType === 'video') {
$('.carousel-inner').append(` <div style="max-height: ${sumHeight}px !important" class=" carousel-item ${active}"><video muted data-bannerenable="${e.bannerenable}" data-bannerfileid="${e.bannerfileid}" data-bannerliked="${e.bannerliked}" data-liId="${e.liId}" playsinline src="${e.file}" type="video/mp4" onerror="sanitizeURL(event)" data-dynamic="1" data-loaded="0" class=" mh-100 mw-100" controls autoplay loop webkit-playsinline webkitRequestFullscreen msRequestFullscreen style="object-fit: cover;"></video></div>`);
}
else if (e.fileType === 'img') {
$('.carousel-inner').append(`<div style="text-align:center;" class="carousel-item ${active}">
<img style="
height: auto !important;
max-height: 80vh !important;
margin-top: 5vh;
" class="d-block mh-100 mw-100 ml-auto mr-auto" data-liId="${e.liId}" data-bannerenable="${e.bannerenable}" data-bannerfileid="${e.bannerfileid}" data-bannerliked="${e.bannerliked}" src="${e.file}" alt="image not found" onerror="ReloadImage(event)" data-dynamic="1" data-loaded="0"">
</div>`);
}
}
});
$('.carousel').carousel({
wrap: false
});
$('.carousel').carousel('pause');
if ($('.carousel-item.active').next().length === 0) {
if (!Instance.isDoc && $('._bizgaze_popup_container').length === 1) {
Instance.loadMoreGallery();
}
else {
$('.carousel-control-next').addClass('d-none');
}
}
else {
$('.carousel-control-next').removeClass('d-none');
}
if ($('.carousel-item.active').prev().length === 0) {
$('.carousel-control-prev').addClass('d-none');
}
else {
$('.carousel-control-prev').removeClass('d-none');
}
}
likePhoto(documentfileId, isLiked) {
if (documentfileId != 0) {
var data = {
PhotoId: Number(documentfileId),
LikedBy: Unibase.Platform.Membership.Infos.Identity.currentUser.userId,
Liked: isLiked
};
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/communications/events/managers/gallerymanager.js", function () {
Bizgaze.Apps.Communications.Events.Managers.GalleryManager.Instance().changephotplike(data).then((responce) => {
if (responce.result != null) {
if (responce.result.Liked) {
$("gallery_liked_" + responce.result.PhotoId).closest(".gallery-list").addClass("liked-image");
$("#gallery_liked_" + responce.result.PhotoId).removeClass("icon-heart").addClass("fa fa-heart text-danger");
$(`[data-documentfileidimg="${responce.result.PhotoId}"]`).find('.bannerliked').attr('value', 'true');
$('#modellikebtn').find('i').removeClass("icon-heart").addClass("fa fa-heart text-danger");
}
else {
$("#gallery_liked_" + responce.result.PhotoId).removeClass("fa fa-heart text-danger").addClass("icon-heart");
$(`[data-documentfileidimg="${responce.result.PhotoId}"]`).find('.bannerliked').attr('value', 'false');
$('#modellikebtn').find('i').removeClass("fa fa-heart text-danger").addClass("icon-heart");
}
}
});
});
}
}
downloadImage(documentfileId, isTrue) {
if (isTrue) {
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile('platform/controls/ filedragndrop/w_documentfiles.js', function () {
Unibase.Platform.Forms.Components.DocumentFiles.Instance().downloadDocument(documentfileId);
});
return;
}
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("platform/controls/filedragndrop/w_documentfiles.js", function () {
Unibase.Platform.Forms.Components.DocumentFiles.Instance().downloadDocument(documentfileId);
});
}
shareImage(documentfileId, galleryId) {
var instance = this;
instance.documentfileId = documentfileId;
instance.galleryId = galleryId;
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/communications/events/components/shareimage.js", function () {
var obj = new Bizgaze.Apps.Communications.Events.Components.ShareImage;
instance.navigationHelper.popup(0, '', obj, null, Unibase.Platform.Helpers.Size.Large);
});
}
deleteImage(DocumentFileId, galleryId) {
var instance = this;
instance.documentfileId = DocumentFileId;
instance.galleryId = galleryId;
bootbox.confirm("Are you sure?", function (result) {
if (!result)
return;
instance.fileCacheHelper.loadJsFile("platform/files/managers/filemanager.js", function () {
Unibase.Platform.Files.Managers.FileManager.Instance().deleteDocumentFile(DocumentFileId).then(function (response) {
if (response.message == 'File Deleted Successfully') {
$('.photoidCustom[data-documentfileidimg="' + DocumentFileId + '"]').remove();
}
});
var detailobj = Unibase.Themes.Compact.Components.Details.Instance();
detailobj._recordId = Unibase.Themes.Providers.DetailHelper.recordId;
detailobj._installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
detailobj._containerId = $("._bizgaze_detail_container:visible").attr("id");
var idetailObj = detailobj;
detailobj.loadPortlets(idetailObj);
});
});
}
importPortability(containerid) {
var instance = this;
$('.sp_widget_create_' + containerid + '').find('#LinkButton').click(function () {
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile('platform/portability/components/portability.js', function () {
let InstalledAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
let portabilityinstance = 'Unibase.Platform.Portability.Components.ImportAndExport.Instance()';
var jsinstance = eval(portabilityinstance);
var component = jsinstance;
var appSettingComponent = jsinstance;
if (appSettingComponent !== null && appSettingComponent !== undefined) {
appSettingComponent.appSettings.InstalledAppId = InstalledAppId;
}
if (component != null && component != undefined) {
instance.navigationhelper.popup(0, '', component, function () {
}, Unibase.Platform.Helpers.Size.Large);
}
});
});
}
predictedimages() {
var eventid = Unibase.Themes.Providers.Detail_Settings.instance.InputParameters.find(f => f.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 !<br> Sit back and relax", function () {
bootbox.alert("You will receive a notification once Face Recognition is completed.!<br>Sit back and relax !", function () {
Bizgaze.Apps.Communications.Events.Managers.GalleryManager.Instance().predictedImages().then((response) => {
if (response === 'ALL MATCH FOUND') {
this.navigationhelper.hideLoading();
bootbox.alert("Sucess");
}
else {
this.navigationhelper.hideLoading();
}
});
});
});
});
}
eventWisePrediction(eventId) {
var instance = this;
instance.eventid = eventId;
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFile("apps/communications/events/managers/gallerymanager.js", function () {
var imgbase64 = "~/tenants/themes/compact/imgs/alertimg.png";
bootbox.alert("The prediction has started", function () {
Bizgaze.Apps.Communications.Events.Managers.GalleryManager.Instance().eventWisePredictedImages(eventId).then((response) => {
if (response === 'ALL MATCH FOUND') {
instance.navigationhelper = Unibase.Platform.Helpers.NavigationHelper.Instance();
instance.navigationhelper.hideLoading();
bootbox.alert("Sucess");
$("#widgetconfig_Predict").show();
}
else {
instance.navigationhelper.hideLoading();
$("#widgetconfig_Predict").show();
}
});
});
});
}
aprovedImage(DocumentFileId, statusid) {
var instance = this;
instance.documentfileId = DocumentFileId;
instance.statusid = statusid;
instance.fileCacheHelper.loadJsFile("apps/communications/events/managers/gallerymanager.js", function () {
Bizgaze.Apps.Communications.Events.Managers.GalleryManager.Instance().approvedImage(DocumentFileId, statusid).then(function (response) {
});
var detailobj = Unibase.Themes.Compact.Components.Details.Instance();
detailobj._recordId = Unibase.Themes.Providers.DetailHelper.recordId;
detailobj._installedAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
detailobj._containerId = $("._bizgaze_detail_container:visible").attr("id");
var idetailObj = detailobj;
detailobj.loadPortlets(idetailObj);
});
}
static Instance() {
if (this.instance === undefined) {
this.instance = new Gallery();
}
return this.instance;
}
}
Components.Gallery = Gallery;
})(Components = Events.Components || (Events.Components = {}));
})(Events = Communications.Events || (Communications.Events = {}));
})(Communications = Apps.Communications || (Apps.Communications = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,125 @@
var Bizgaze;
(function (Bizgaze) {
let Apps;
(function (Apps) {
let Communications;
(function (Communications) {
let Events;
(function (Events) {
let Components;
(function (Components) {
class ShareImage extends Unibase.Platform.Core.BaseComponent {
constructor() {
super();
this.gallery = Bizgaze.Apps.Communications.Events.Components.Gallery.Instance();
this.guestArray = [];
this.currentImg = '';
this.navigationhelper = Unibase.Platform.Helpers.NavigationHelper.Instance();
}
cssFiles() {
return [];
}
jsFiles() {
return ['apps/communications/events/managers/gallerymanager.js'];
}
html(id, containerid) {
var html = `<div class="modal-header pa-10">
<strong class="modal-title biz-highlight-bg-color">Share Images</strong>
<div id="divShareImageErrMsg" class="form-error-message"></div>
</div>
<div data-simplebar class="simple-scroll-bar modal-body">
<!--<div class="card" id="Share-Guest-photo">
<div class="card-header">Select Guest To Share</div>
<div class="card-body">
<select id="guestsMultiSelect" class="form-control guest-multiselect"></select>
</div>
</div>-->
<div class="card" id="Share-Guest-photo">
<div class="card-header">Select Apps To Share</div>
<div class="card-body">
<a href="https://www.facebook.com/sharer/sharer.php?u=" " target="_blank" class="btn btn-rounded mr-10 font-20 text-white shareEventFacebook" style="background-color:#1DA1F2;" title="facebook"> <i class="fa fa-facebook"></i></a>
<a href="https://twitter.com/intent/tweet?
url=@Url.Encode(Request.Url.ToString())&text=@Url.Encode(Title)" target="_blank" class="shareEventTwitter btn btn-rounded mr-10 font-20 text-white" style="background-color:#1DA1F2;" title="Tweet" >
<i class="fa fa-twitter"></i>
</a>
<a href="https://api.whatsapp.com/send/?text="
" target="_blank" class="btn btn-rounded mr-10 font-20 text-white shareEventWhatsapp " style="background-color:#25D366;" >
<i class="fa fa-whatsapp"></i>
</a>
<a href="https://www.linkedin.com/sharing/share-offsite/?url=" " target="_blank" class="btn btn-rounded mr-10 font-20 text-white shareEventLinkedin" style="background-color:#1DA1F2;" title="linkedin"> <i class="fa fa-linkedin"></i></a> </div>
</div>
</div>
<!--<div class="modal-footer pa-10">
<a href="javascript:;" id="shareImageCloseBtn" class="btn btn-light btn-sm mr-auto">Close</a>
<a href="javascript:;" class="btn btn-icon btn-icon-circle btn-primary btn-icon-style-2 btn-rounded" id="shareImages"><span class="btn-icon-wrap"><i class="fa fa-paper-plane"></i></span></a>
</div>-->`;
return html;
}
load(id, containerid, callback) {
var instance = this;
var html = "";
Bizgaze.Apps.Communications.Events.Managers.GalleryManager.Instance().getGuestUsers().then((response) => {
instance.guestArray = response.result;
const data = [];
response.result.forEach(function (obj) {
data.push({ id: obj.guestid, text: obj.guestname });
});
$('#guestsMultiSelect').select2({
placeholder: "Select Guests",
multiple: true,
data: data
});
});
$("#shareImages").click(function (e) {
e.preventDefault();
instance.shareImage(instance.gallery.documentfileId, instance.gallery.galleryId);
});
debugger;
let domainName = window.location.origin;
debugger;
let imageUrl = domainName + $(`[data-documentfileidimg="${Bizgaze.Apps.Communications.Events.Components.Gallery.Instance().documentfileId}"]`).find('.biz-bannerimg').attr('src');
$('.shareEventFacebook').attr('href', `https://www.facebook.com/sharer/sharer.php?u=${imageUrl}`);
$('.shareEventTwitter').attr('href', `http://twitter.com/share?text=&url=${imageUrl}`);
$('.shareEventWhatsapp').attr('href', `https://api.whatsapp.com/send/?text=${imageUrl}`);
$('.shareEventLinkedin').attr('href', `https://www.linkedin.com/sharing/share-offsite/?url==${imageUrl}`);
$('#shareImageCloseBtn').click(function () {
instance.navigationHelper.closePopUp();
});
}
shareImage(documentFileId, galleryId) {
debugger;
let selectedGuests = $('#guestsMultiSelect').val();
selectedGuests = selectedGuests.map(Number);
if (selectedGuests.length > 0) {
var data = {
UserIds: selectedGuests,
ImageId: documentFileId,
GalleryId: galleryId,
};
Bizgaze.Apps.Communications.Events.Managers.GalleryManager.Instance().shareImage(data).then((response) => {
if (response.status == Unibase.Data.Status.Error) {
MessageHelper.Instance().showError(response.message, "divShareImageErrMsg");
}
else {
MessageHelper.Instance().showSuccess(response.message, "divShareImageErrMsg");
Unibase.Platform.Helpers.NavigationHelper.Instance().closePopUp();
}
});
}
else {
MessageHelper.Instance().showError("Select Atleast One User", "divShareImageErrMsg");
}
}
static Instance() {
if (this.instance === undefined) {
this.instance = new ShareImage();
}
return this.instance;
}
}
Components.ShareImage = ShareImage;
})(Components = Events.Components || (Events.Components = {}));
})(Events = Communications.Events || (Communications.Events = {}));
})(Communications = Apps.Communications || (Apps.Communications = {}));
})(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
})(Bizgaze || (Bizgaze = {}));
@@ -0,0 +1 @@
{"version":3,"file":"shareimage.js","sourceRoot":"","sources":["shareimage.ts"],"names":[],"mappings":"AAAA,IAAU,OAAO,CA8JhB;AA9JD,WAAU,OAAO;IACb,IAAiB,IAAI,CA4JpB;IA5JD,WAAiB,IAAI;QACjB,IAAiB,cAAc,CA0J9B;QA1JD,WAAiB,cAAc;YAC3B,IAAiB,MAAM,CAwJtB;YAxJD,WAAiB,MAAM;gBACnB,IAAiB,UAAU,CAsJ1B;gBAtJD,WAAiB,UAAU;oBACvB,MAAa,UAAW,SAAQ,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa;wBAK/D;4BACI,KAAK,EAAE,CAAC;4BAJZ,YAAO,GAAG,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;4BAC3E,eAAU,GAAG,EAAE,CAAC;4BAChB,eAAU,GAAW,EAAE,CAAC;4BAGpB,IAAI,CAAC,gBAAgB,GAAG,OAAO,C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,IAAI,GAAJ,YAAI,KAAJ,YAAI,QA4JpB;AACL,CAAC,EA9JS,OAAO,KAAP,OAAO,QA8JhB"}
+30
View File
@@ -0,0 +1,30 @@
var Bizgaze;(function(n){let t;(function(t){let i;(function(t){let i;(function(t){let i;(function(t){class i extends Unibase.Platform.Core.BaseComponent{constructor(){super();this.gallery=n.Apps.Communications.Events.Components.Gallery.Instance();this.guestArray=[];this.currentImg="";this.navigationhelper=Unibase.Platform.Helpers.NavigationHelper.Instance()}cssFiles(){return[]}jsFiles(){return["apps/communications/events/managers/gallerymanager.js"]}html(){return`<div class="modal-header pa-10">
<strong class="modal-title biz-highlight-bg-color">Share Images</strong>
<div id="divShareImageErrMsg" class="form-error-message"></div>
</div>
<div data-simplebar class="simple-scroll-bar modal-body">
<!--<div class="card" id="Share-Guest-photo">
<div class="card-header">Select Guest To Share</div>
<div class="card-body">
<select id="guestsMultiSelect" class="form-control guest-multiselect"></select>
</div>
</div>-->
<div class="card" id="Share-Guest-photo">
<div class="card-header">Select Apps To Share</div>
<div class="card-body">
<a href="https://www.facebook.com/sharer/sharer.php?u=" " target="_blank" class="btn btn-rounded mr-10 font-20 text-white shareEventFacebook" style="background-color:#1DA1F2;" title="facebook"> <i class="fa fa-facebook"></i></a>
<a href="https://twitter.com/intent/tweet?
url=@Url.Encode(Request.Url.ToString())&text=@Url.Encode(Title)" target="_blank" class="shareEventTwitter btn btn-rounded mr-10 font-20 text-white" style="background-color:#1DA1F2;" title="Tweet" >
<i class="fa fa-twitter"></i>
</a>
<a href="https://api.whatsapp.com/send/?text="
" target="_blank" class="btn btn-rounded mr-10 font-20 text-white shareEventWhatsapp " style="background-color:#25D366;" >
<i class="fa fa-whatsapp"></i>
</a>
<a href="https://www.linkedin.com/sharing/share-offsite/?url=" " target="_blank" class="btn btn-rounded mr-10 font-20 text-white shareEventLinkedin" style="background-color:#1DA1F2;" title="linkedin"> <i class="fa fa-linkedin"></i></a> </div>
</div>
</div>
<!--<div class="modal-footer pa-10">
<a href="javascript:;" id="shareImageCloseBtn" class="btn btn-light btn-sm mr-auto">Close</a>
<a href="javascript:;" class="btn btn-icon btn-icon-circle btn-primary btn-icon-style-2 btn-rounded" id="shareImages"><span class="btn-icon-wrap"><i class="fa fa-paper-plane"></i></span></a>
</div>-->`}load(){var t=this;n.Apps.Communications.Events.Managers.GalleryManager.Instance().getGuestUsers().then(n=>{t.guestArray=n.result;const i=[];n.result.forEach(function(n){i.push({id:n.guestid,text:n.guestname})});$("#guestsMultiSelect").select2({placeholder:"Select Guests",multiple:!0,data:i})});$("#shareImages").click(function(n){n.preventDefault();t.shareImage(t.gallery.documentfileId,t.gallery.galleryId)});let r=window.location.origin;let i=r+$(`[data-documentfileidimg="${n.Apps.Communications.Events.Components.Gallery.Instance().documentfileId}"]`).find(".biz-bannerimg").attr("src");$(".shareEventFacebook").attr("href",`https://www.facebook.com/sharer/sharer.php?u=${i}`);$(".shareEventTwitter").attr("href",`http://twitter.com/share?text=&url=${i}`);$(".shareEventWhatsapp").attr("href",`https://api.whatsapp.com/send/?text=${i}`);$(".shareEventLinkedin").attr("href",`https://www.linkedin.com/sharing/share-offsite/?url==${i}`);$("#shareImageCloseBtn").click(function(){t.navigationHelper.closePopUp()})}shareImage(t,i){let r=$("#guestsMultiSelect").val();if(r=r.map(Number),r.length>0){var u={UserIds:r,ImageId:t,GalleryId:i};n.Apps.Communications.Events.Managers.GalleryManager.Instance().shareImage(u).then(n=>{n.status==Unibase.Data.Status.Error?MessageHelper.Instance().showError(n.message,"divShareImageErrMsg"):(MessageHelper.Instance().showSuccess(n.message,"divShareImageErrMsg"),Unibase.Platform.Helpers.NavigationHelper.Instance().closePopUp())})}else MessageHelper.Instance().showError("Select Atleast One User","divShareImageErrMsg")}static Instance(){return this.instance===undefined&&(this.instance=new i),this.instance}}t.ShareImage=i})(i=t.Components||(t.Components={}))})(i=t.Events||(t.Events={}))})(i=t.Communications||(t.Communications={}))})(t=n.Apps||(n.Apps={}))})(Bizgaze||(Bizgaze={}));