| Server IP : 108.167.142.43 / Your IP : 216.73.216.237 Web Server : Apache System : Linux gator4174.hostgator.com 5.14.0-687.39.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Aug 18 06:09:16 EDT 2026 x86_64 User : delarice ( 2406) PHP Version : 8.3.36 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home2/delarice/www/wp-content/plugins/elementor-pro/assets/js/ |
Upload File : |
/*! elementor-pro - v4.3.0 - 13-10-2026 */
(function(){var a=Object.defineProperty,u=(e,t)=>a(e,"name",{value:t,configurable:!0}),l=Object.defineProperty,o=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable,i=(e,t,n)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,d=(e,t)=>{for(var n in t||(t={}))c.call(t,n)&&i(e,n,t[n]);if(o)for(var n of o(t))m.call(t,n)&&i(e,n,t[n]);return e},g=class extends elementorModules.ViewModule{getDefaultSettings(){return d({empty_content_headline:"Empty Content.",crop:{width:1200,height:1500},excluded_external_css_urls:["https://kit-pro.fontawesome.com"],external_images_urls:["https://i.ytimg.com"],timeout:15e3,render_timeout:5e3,timerLabel:null,timer_label:`${ElementorScreenshotConfig.post_id} - timer`,image_placeholder:"data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=",isDebug:elementorCommonConfig.isElementorDebug,isDebugSvg:!1},ElementorScreenshotConfig)}getDefaultElements(){const e=jQuery(ElementorScreenshotConfig.selector),t=e.find(".elementor-section-wrap > .elementor-section, .elementor > .elementor-section");return{$elementor:e,$sections:t,$firstSection:t.first(),$notElementorElements:elementorCommon.elements.$body.find("> *:not(style, link)").not(e),$head:jQuery("head")}}onInit(){return super.onInit(),this.log("Screenshot init","time"),this.timeoutTimer=setTimeout(this.screenshotFailed.bind(this),this.getSettings("timeout")),this.captureScreenshot()}captureScreenshot(){return this.elements.$elementor.length||(elementorCommon.helpers.consoleWarn("Screenshots: The content of this page is empty, the module will create a fake conent just for this screenshot."),this.createFakeContent()),this.removeUnnecessaryElements(),this.handleIFrames(),this.removeFirstSectionMargin(),this.handleLinks(),this.loadExternalCss(),this.loadExternalImages(),Promise.resolve().then(this.createImage.bind(this)).then(this.createImageElement.bind(this)).then(this.cropCanvas.bind(this)).then(this.save.bind(this)).then(this.screenshotSucceed.bind(this)).catch(this.screenshotFailed.bind(this))}createFakeContent(){this.elements.$elementor=jQuery("<div>").css({height:this.getSettings("crop.height"),width:this.getSettings("crop.width"),display:"flex",alignItems:"center",justifyContent:"center"}),this.elements.$elementor.append(jQuery("<h1>").css({fontSize:"85px"}).html(this.getSettings("empty_content_headline"))),document.body.prepend(this.elements.$elementor)}loadExternalCss(){const e=[this.getSettings("home_url"),...this.getSettings("excluded_external_css_urls")].map(t=>`[href^="${t}"]`).join(", ");jQuery("link").not(e).each((t,n)=>{const s=jQuery(n),r=s.clone();r.attr("href",this.getScreenshotProxyUrl(s.attr("href"))),this.elements.$head.append(r),s.remove()})}loadExternalImages(){const e=this.getSettings("external_images_urls").map(t=>`img[src^="${t}"]`).join(", ");jQuery(e).each((t,n)=>{const s=jQuery(n);s.attr("src",this.getScreenshotProxyUrl(s.attr("src")))})}handleIFrames(){this.elements.$elementor.find("iframe").each((e,t)=>{const n=jQuery(t),s=jQuery("<div />",{css:{background:"gray",width:n.width(),height:n.height()}});n.before(s),n.remove()})}removeUnnecessaryElements(){let e=0;this.elements.$sections.filter((t,n)=>{let s=!1;return e>=this.getSettings("crop.height")&&(s=!0),e+=jQuery(n).outerHeight(),s}).each((t,n)=>{n.remove()}),this.elements.$notElementorElements.remove()}handleLinks(){elementorCommon.elements.$body.find("a").attr("href","/")}removeFirstSectionMargin(){this.elements.$firstSection.css({marginTop:0})}createImage(){const e=new Promise(n=>{window.addEventListener("load",()=>{n()})}),t=new Promise(n=>{setTimeout(()=>{n()},this.getSettings("render_timeout"))});return Promise.race([e,t]).then(()=>(this.log("Start creating screenshot."),this.getSettings("isDebugSvg")?(domtoimage.toSvg(document.body,{imagePlaceholder:this.getSettings("image_placeholder")}).then(n=>this.download(n)),Promise.reject("Debug SVG.")):/^((?!chrome|android).)*safari/i.test(window.userAgent)?(this.log('Creating screenshot with "html2canvas"'),html2canvas(document.body).then(n=>n.toDataURL("image/png"))):(this.log('Creating screenshot with "dom-to-image"'),domtoimage.toPng(document.body,{imagePlaceholder:this.getSettings("image_placeholder")}))))}download(e){const t=jQuery("<a/>",{href:e,download:"debugSvg.svg",html:"Download SVG"});elementorCommon.elements.$body.append(t),t.trigger("click")}createImageElement(e){const t=new Image;return t.src=e,new Promise(n=>{t.onload=()=>n(t)})}cropCanvas(e){const t=this.getSettings("crop.width"),n=this.getSettings("crop.height"),s=document.createElement("canvas"),r=s.getContext("2d"),h=t/e.width;return s.width=t,s.height=n>e.height?e.height:n,r.drawImage(e,0,0,e.width,e.height,0,0,e.width*h,e.height*h),Promise.resolve(s)}save(e){return new Promise((t,n)=>{elementorCommon.ajax.addRequest("screenshot_save",{data:{post_id:this.getSettings("post_id"),screenshot:e.toDataURL("image/png")},success:s=>{this.log(`Screenshot created: ${encodeURI(s)}`),t(s)},error:()=>{this.log("Failed to create screenshot."),n()}})})}markAsFailed(){return new Promise((e,t)=>{elementorCommon.ajax.addRequest("screenshot_failed",{data:{post_id:this.getSettings("post_id")},success:()=>{this.log("Marked as failed."),e()},error:()=>{this.log("Failed to mark this screenshot as failed."),t()}})})}getScreenshotProxyUrl(e){return`${this.getSettings("home_url")}?screenshot_proxy&nonce=${this.getSettings("nonce")}&href=${e}`}screenshotSucceed(e){this.screenshotDone(!0,e)}screenshotFailed(e){this.log(e,null),this.markAsFailed().then(()=>this.screenshotDone(!1))}screenshotDone(e,t=null){clearTimeout(this.timeoutTimer),this.timeoutTimer=null,window.parent.postMessage({name:"capture-screenshot-done",success:e,id:this.getSettings("post_id"),imageUrl:t},"*"),this.log(`Screenshot ${e?"Succeed":"Failed"}.`,"timeEnd")}log(e,t="timeLog"){this.getSettings("isDebug")&&(console.log(typeof e=="string"?`${this.getSettings("post_id")} - ${e}`:e),t&&console[t](this.getSettings("timer_label")))}};jQuery(()=>{new g})})();