Your IP : 3.12.123.189


Current Path : /proc/self/root/home/sudancam/public_html3/host/wp-content/plugins/wpforms-lite/assets/js/components/admin/challenge/
Upload File :
Current File : //proc/self/root/home/sudancam/public_html3/host/wp-content/plugins/wpforms-lite/assets/js/components/admin/challenge/challenge-builder.min.js

"use strict";var WPFormsChallenge=window.WPFormsChallenge||{};WPFormsChallenge.builder=window.WPFormsChallenge.builder||function(e,o,n){var l={init:function(){n(l.ready),n(o).on("load",function(){"function"==typeof n.ready.then?n.ready.then(l.load):l.load()})},ready:function(){l.setup(),l.events()},load:function(){-1<["started","paused"].indexOf(wpforms_challenge_admin.option.status)&&WPFormsChallenge.core.updateTooltipUI(),n(".wpforms-challenge").show()},setup:function(){"inited"===wpforms_challenge_admin.option.status&&(WPFormsChallenge.core.clearLocalStorage(),l.showWelcomePopup()),n("#wpforms-embed").addClass("wpforms-disabled");n.each(["#wpforms-setup-name",".wpforms-setup-title .wpforms-setup-title-after","#add-fields a i","#wpforms-builder-settings-notifications-title"],function(e,o){WPFormsChallenge.core.initTooltips(e+1,o,null)}),n(e).on("wpformsWizardPopupClose",l.enableEmbed)},events:function(){n("#wpforms-challenge-welcome-builder-popup").on("click","button",l.startChallenge),n(".wpforms-challenge-step1-done").on("click",function(){WPFormsChallenge.core.stepCompleted(1)}),n("#wpforms-builder").on("wpformsBuilderSetupReady",function(){l.eventSelectTemplate()}).on("wpformsPanelSwitch wpformsPanelSectionSwitch",function(){WPFormsChallenge.core.updateTooltipUI()}),n(".wpforms-challenge-step3-done").on("click",function(){WPFormsChallenge.core.stepCompleted(3),l.gotoStep(4)}),n(e).on("click",".wpforms-challenge-step4-done",l.showEmbedPopup),n.tooltipster.on("ready",l.tooltipsterReady)},eventSelectTemplate:function(){n("#wpforms-panel-setup").off("click",".wpforms-template-select").on("click",".wpforms-template-select",function(e){l.builderTemplateSelect(this,e)})},startChallenge:function(){WPFormsChallenge.admin.saveChallengeOption({status:"started"}),WPFormsChallenge.core.initListUI("started"),n(".wpforms-challenge-popup-container").fadeOut(function(){n("#wpforms-challenge-welcome-builder-popup").hide()}),WPFormsChallenge.core.timer.run(WPFormsChallenge.core.timer.initialSecondsLeft),WPFormsChallenge.core.updateTooltipUI()},gotoStep:function(e){switch(e=e||WPFormsChallenge.core.loadStep()+1){case 1:case 2:WPFormsBuilder.panelSwitch("setup");break;case 3:WPFormsBuilder.panelSwitch("fields");break;case 4:WPFormsBuilder.panelSwitch("settings"),WPFormsBuilder.panelSectionSwitch(n(".wpforms-panel .wpforms-panel-sidebar-section-notifications"));break;case 5:l.showEmbedPopup()}},builderTemplateSelect:function(e,o){function n(){WPFormsChallenge.core.loadStep()<=1?WPFormsChallenge.core.stepCompleted(2).done(WPForms.Admin.Builder.Setup.selectTemplate.bind(null,o)):WPForms.Admin.Builder.Setup.selectTemplate.bind(null,o)}if("paused"!==wpforms_challenge_admin.option.status)return n();var l=WPFormsChallenge.core.resumeChallenge(o);"object"==typeof l&&"function"==typeof l.done?l.done(n):n()},tooltipsterReady:function(e){var e=n(e.origin).data("wpforms-challenge-step"),o=n("#wpforms-builder-form").data("id"),e=parseInt(e,10)||0,o=parseInt(o,10)||0;3===e&&0<o&&WPFormsChallenge.admin.saveChallengeOption({form_id:o})},showWelcomePopup:function(){n("#wpforms-challenge-welcome-builder-popup").show(),n(".wpforms-challenge-popup-container").fadeIn()},showEmbedPopup:function(){WPFormsChallenge.core.stepCompleted(4),WPFormsFormEmbedWizard.openPopup()},enableEmbed:function(){n("#wpforms-embed").removeClass("wpforms-disabled")}};return l}(document,window,jQuery),WPFormsChallenge.builder.init();