HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wptoho/wp-content/themes/themify-ultra/themify/js/modules/themify-gallery.js
(($,t,e,i)=>{"use strict";const s={origHash:null,config:{},init(t){this.config=t,this.initLightbox(),this.openAnchor()},lightboxSelector(a){if(a.preventDefault(),a.stopImmediatePropagation(),$(".mfp-wrap.mfp-gallery").length)return;const o=$(this);let r=o.find("> a");r=0===r.length?o.attr("href"):r.attr("href");const l=s,n=l.getFileType(r),h=l.isVideo(r),c=t.parseVideo(r),m={},p=o.parents(".tf_swiper-container");let f;f=p.length>0?o.data("rel")?$('a[data-rel="'+o.data("rel")+'"]'):p.find(".tf_swiper-slide:not(.tf_swiper-slide-duplicate) .themify_lightbox img").parents(".themify_lightbox"):o.data("rel")?$('a[data-rel="'+o.data("rel")+'"]'):o.closest(".themify_builder_content>.module_row, .loops-wrapper, .gallery-wrapper").find(".themify_lightbox img").parents(".themify_lightbox"),$.uniqueSort(f);let g,u=p.length>0&&p[0].swiper?p[0].swiper.realIndex:f.length>1?f.index(this):0,d=h?"100%":l.getParam("width",r)?l.getParam("width",r):l.getParam("post_in_lightbox",r)?"96%; width: 1200px":"94%",y=h?"100%":l.getParam("height",r)?l.getParam("height",r):"100%";if(d.includes("%")||(d+="px"),y.includes("%")||(y+="px"),!0===h&&("youtube"===c.type||"vimeo"===c.type)){const t=l.getCustomParams(r);t&&("youtube"===c.type?(m.youtube={id:"v=",index:"youtube.com/",src:"//www.youtube.com/embed/%id%"+t},r=l.getYoutubePath(r)):(m.vimeo={id:"/",index:"vimeo.com/",src:"//player.vimeo.com/video/%id%"+t},r=r.split("?")[0]))}f.length>1&&-1!==u?(g=[],f.each(((t,e)=>{g.push({src:l.getiFrameLink($(e).prop("href")),title:l.getTitle(e),type:l.getFileType($(e).prop("href")),current:e===o[0]})})),g=g.reduce(((t,e)=>(0===t.filter((t=>e.src===t.src)).length&&(e.current&&(u=t.length),t.push(e)),t)),[])):(u=0,g={src:l.getiFrameLink(r),title:l.getTitle(this)});const b={items:g,type:n,image:{markup:l.getImageMarkup(this)},iframe:{markup:'<div class="mfp-iframe-scaler" style="max-width: '+d+"; height: "+y+';"><div role="button" tabindex="0" class="tf_close mfp-close"></div><div class="mfp-iframe-wrapper"><iframe class="mfp-iframe" noresize="noresize" frameborder="0" allowfullscreen></iframe></div>'+l.getSocialMarkup()+"</div>",patterns:m},callbacks:{beforeOpen(){e.body.classList.add("themify_mp_opened")},open(){l.updateHash("open",this),l.openSharing(this);let t=o.data("zoom-config"),e={};t&&(t=t.split("|"),t[0]&&(e.width=t[0]),void 0!==t[1]&&(e.height=t[1]),$(this.content).parent().css(e))},change(){l.updateHash("open",this)},close(){l.updateHash("close")},afterClose(){e.body.classList.remove("themify_mp_opened")}}};f.length>1&&$.extend(b,{gallery:{enabled:!0,tCounter:l.config.i18n?.tCounter||""}}),o.find("img").length>0&&$.extend(b,{mainClass:"mfp-with-zoom",zoom:{enabled:!t.isTouch,duration:300,easing:"ease-in-out",opener:()=>o.find("img")}}),b.mainClass??="",b.mainClass+=h?" video-frame":" standard-frame",b.fixedContentPos=!0,l.isInIframe()?i.parent.jQuery.magnificPopup.open(b):$.magnificPopup.open(b,u)},gallerySelector(e){const a=s;if("image"!==a.getFileType($(this).prop("href")))return;const o=$(a.config.gallerySelector,$(this).closest(".module, .gallery, .gallery-wrapper, .wp-block-gallery").not(".module-gallery"));if(!o.length)return;e.preventDefault(),e.stopImmediatePropagation();const r=[];o.each((function(){let t=$(this).prop("title");t=""!==t?t:void 0!==$(this).children("img").prop("alt")?$(this).children("img").prop("alt"):"",$(this).parent().next(".gallery-caption").length>0?t=$(this).parent().next(".wp-caption-text").html():$(this).find(".gallery-caption").find(".entry-content").length>0&&(t=$(this).find(".gallery-caption").find(".entry-content").text()),r.push({src:$(this).prop("href"),title:t,type:"image"})}));const l={gallery:{enabled:!0},image:{markup:a.getImageMarkup(this)},items:r,mainClass:"mfp-with-zoom",zoom:{enabled:!t.isTouch,duration:300,easing:"ease-in-out",opener(t){const e=$(o[t.index]);return e.is("img")?e:e.find("img")}},callbacks:{open(){a.updateHash("open",this),a.openSharing(this)},change(){a.updateHash("open",this)},close(){a.updateHash("close")}}};a.isInIframe()?i.parent.jQuery.magnificPopup.open(l,o.index(this)):$.magnificPopup.open(l,o.index(this))},contentImagesAreas(e){const a=s;if("image"===a.getFileType(this.getAttribute("href"))&&this.closest(a.config.contentImagesAreas)){e.preventDefault(),e.stopImmediatePropagation();const s=$(this),o={items:{src:s.prop("href"),title:s.next(".wp-caption-text").length>0?s.next(".wp-caption-text").html():s.children("img").prop("alt")},image:{markup:a.getImageMarkup(this)},type:"image",callbacks:{open(){a.updateHash("open",this),a.openSharing(this)},change(){a.updateHash("open",this)},close(){a.updateHash("close")}}};s.find("img").length>0&&$.extend(o,{mainClass:"mfp-with-zoom",zoom:{enabled:!t.isTouch,duration:300,easing:"ease-in-out",opener:()=>s.find("img")}}),a.isInIframe()?i.parent.jQuery.magnificPopup.open(o):$.magnificPopup.open(o)}},initLightbox(){const t=$("body");t.off("click",this.config.lightboxSelector,this.lightboxSelector).on("click",this.config.lightboxSelector,this.lightboxSelector),this.config.gallerySelector&&t.off("click",this.config.gallerySelector,this.gallerySelector).on("click",this.config.gallerySelector,this.gallerySelector),this.config.contentImagesAreas&&t.off("click",".post-content a,.page-content a",this.contentImagesAreas).on("click",".post-content a,.page-content a",this.contentImagesAreas)},isInIframe(){return!!this.config.extraLightboxArgs?.displayIframeContentsInParent},getFileType(t){let e;try{e=new URL(t)}catch(i){e=t}return(e&&"object"==typeof e?t.replace(e.search,""):t).match(/\.(gif|jpg|jpeg|tiff|png|webp|apng)$/i)?"image":t.match(/\bajax=true\b/i)?"ajax":"#"===t.substr(0,1)?"inline":"iframe"},isVideo(t){return this.isYoutube(t)||this.isVimeo(t)||t.match(/\b.mov\b/i)||t.match(/\b.swf\b/i)},isYoutube:e=>"youtube"===t.parseVideo(e).type,isVimeo:e=>"vimeo"===t.parseVideo(e).type,getYoutubePath(t){const e=new URL(t);e.searchParams.delete("feature");let i="//youtube.com/watch?v=";return i+=(t=""+e).match(/youtu\.be/i)?t.match(/youtu\.be\/([^\?]*)/i)[1]:this.getParam("v",t),i},getiFrameLink(e){return"iframe"===this.getFileType(e)&&null===this.isVideo(e)&&(t.parseVideo(e),e=t.updateQueryString("iframe","true",e)),e},getParam(t,e){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");const i=RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);return null==i?"":i[1]},getCustomParams(t){let e=t.split("?")[1];return e=e?"&"+e.replace(/[\\?&]?(v|autoplay)=[^&#]*/g,"").replace(/^&/g,""):"","?autoplay=1"+e},openSharing(e){if(this.config.disableSharing)return;const i=e.content[0].tfClass("tf_social_sharing")[0];i&&i.tfOn("click",(i=>{i.preventDefault(),t.sharer(i.target.dataset.type,e.currItem.data.src.replace("?iframe=true",""),e.currItem.data.title)}))},updateHash(t,s){if("open"===t){this.origHash??=i.location.hash;let t=s.currItem.data.title,a=e.createElement("div");a.innerHTML=t,t=a.textContent.trim(),""!==t&&this.i(t)}else this.i(this.origHash),this.origHash=null},i(t){"#"!==(""+t)[0]&&(t="#"+t),history.replaceState("","",t)},openAnchor(){if(""!==i.location.hash){let t=decodeURI(i.location.hash.substring(1)),s=e.querySelector('[alt="'+t+'"]');s=null===s?e.querySelector('[title="'+t+'"]'):s,null!==s&&s.click()}},getIcon(t){t="tf-"+t.trim().replace(" ","-");const i="http://www.w3.org/2000/svg",s=e.createElementNS(i,"use"),a=e.createElementNS(i,"svg");return a.setAttribute("class","tf_fa "+t),s.setAttributeNS(null,"href","#"+t),a.appendChild(s),a},getSocialMarkup(){return this.config.disableSharing?"":(t.fonts(["ti-facebook","ti-twitter","ti-pinterest","ti-email"]),'<div class="tf_social_sharing"><a href="#" data-type="facebook">'+this.getIcon("ti-facebook").outerHTML+'</a><a href="#" data-type="twitter">'+this.getIcon("ti-twitter").outerHTML+'</a><a href="#" data-type="pinterest">'+this.getIcon("ti-pinterest").outerHTML+'</a><a href="#" data-type="email">'+this.getIcon("ti-email").outerHTML+"</a></div>")},getTitle(t){const e=t.querySelector("img");let i=t.dataset.t;return!i&&e&&(i=e.title||e.alt),i||(i=t.title),i},getImageMarkup(t){return'<div class="mfp-figure"><div role="button" tabindex="0" class="tf_close mfp-close"></div><div class="mfp-counter"></div><div class="mfp-img"></div><div class="mfp-bottom-bar">'+("no"!==t.dataset.title?'<div class="mfp-title"></div>':"")+this.getSocialMarkup()+"</div></div>"}};t.on("tf_gallery_init",(t=>{s.init(t)}))})(jQuery,Themify,document,window);