!function(t){t("document").ready(function(){function e(){a.canceled=!0;var t={current_step:this.getCurrentStep().id};"function"==typeof updraft_send_command?updraft_send_command("set_tour_status",t,function(t){console.log("Successfully deactivated tour")},{alert_on_error:!1}):jQuery.ajax({url:ajaxurl,type:"POST",data:{action:"updraft_ajax",subaction:"set_tour_status",nonce:updraftplus_tour_i18n.nonce,current_step:this.getCurrentStep().id}})}if(t(".updraftplus-welcome .close").click(function(e){e.preventDefault(),t(this).closest(".updraftplus-welcome").remove()}),window.Shepherd){var n="button button-primary",o=window.updraft_plugins_page_tour=new Shepherd.Tour,a=window.updraft_main_tour=new Shepherd.Tour;a.options.defaults=o.options.defaults={classes:"shepherd-theme-arrows-plain-buttons shepherd-main-tour",showCancelLink:!0,scrollTo:!1,tetherOptions:{constraints:[{to:"scrollParent",attachment:"together",pin:!1}]}},o.addStep("intro",{title:updraftplus_tour_i18n.plugins_page.title,text:updraftplus_tour_i18n.plugins_page.text,attachTo:".js-updraftplus-settings top",buttons:[{classes:n,text:updraftplus_tour_i18n.plugins_page.button.text,action:function(){window.location=updraftplus_tour_i18n.plugins_page.button.url}}],tetherOptions:{constraints:[{to:"scrollParent",attachment:"together",pin:!1}],offset:"20px 0"},when:{show:function(){t("body").addClass("highlight-udp");var e=t(this.el);t("body, html").animate({scrollTop:e.offset().top-50},500,function(){window.scrollTo(0,e.offset().top-50)})},hide:function(){t("body").removeClass("highlight-udp")}}}),a.addStep("backup_now",{title:updraftplus_tour_i18n.backup_now.title,text:updraftplus_tour_i18n.backup_now.text,attachTo:"#updraft-backupnow-button bottom",buttons:[{classes:"udp-tour-end",text:updraftplus_tour_i18n.end_tour,action:a.cancel},{classes:n,text:updraftplus_tour_i18n.next,action:function(){t("#updraft-navtab-settings").trigger("click")}}]}),a.addStep("backup_options",{title:updraftplus_tour_i18n.backup_options.title,text:updraftplus_tour_i18n.backup_options.text,classes:"shepherd-theme-arrows-plain-buttons shepherd-main-tour super-index",attachTo:"#backupnow_includedb left",tetherOptions:{offset:"-15px 25px"},buttons:[{classes:"udp-tour-back",text:updraftplus_tour_i18n.back,action:function(){t("#updraft-backupnow-modal").dialog("close")}},{classes:n,text:updraftplus_tour_i18n.next,action:a.next}]}),a.addStep("backup_now_btn",{title:updraftplus_tour_i18n.backup_now_btn.title,text:updraftplus_tour_i18n.backup_now_btn.text,classes:"shepherd-theme-arrows-plain-buttons shepherd-main-tour super-index",attachTo:".js-tour-backup-now-button top",buttons:[{classes:"udp-tour-back",text:updraftplus_tour_i18n.back,action:function(){a.back()}},{classes:n,text:updraftplus_tour_i18n.backup_now_btn.btn_text,action:function(){t("#updraft-backupnow-modal").dialog("close"),t("#updraft-navtab-settings").trigger("click")}}]}),a.addStep("backup_now_btn_success",{title:updraftplus_tour_i18n.backup_now_btn_success.title,text:updraftplus_tour_i18n.backup_now_btn_success.text,attachTo:"#updraft_activejobs_table top",buttons:[{classes:"udp-tour-back",text:updraftplus_tour_i18n.back,action:function(){t("#updraft-backupnow-button").trigger("click"),a.show("backup_now_btn")}},{classes:n,text:updraftplus_tour_i18n.backup_now_btn_success.btn_text,action:function(){t("#updraft-navtab-settings").trigger("click")}}],when:{show:function(){setTimeout(function(){t(window).trigger("scroll")})}}}),a.addStep("settings_timing",{title:updraftplus_tour_i18n.settings_timing.title,text:updraftplus_tour_i18n.settings_timing.text,attachTo:".retain-files right",buttons:[{classes:"udp-tour-back",text:updraftplus_tour_i18n.back,action:function(){t("#updraft-navtab-backups").trigger("click")}},{classes:n,text:updraftplus_tour_i18n.next,action:a.next}],tetherOptions:t.extend({},a.options.defaults.tetherOptions,{offset:"-33px -15px"}),when:{show:function(){u()}}}),a.addStep("settings_remote_storage",{title:updraftplus_tour_i18n.settings_remote_storage.title,text:updraftplus_tour_i18n.settings_remote_storage.text,attachTo:{element:"label[for=updraft_servicecheckbox_updraftvault]",on:"top"},buttons:[{classes:"udp-tour-back",text:updraftplus_tour_i18n.back,action:function(){a.back()}},{classes:n,text:updraftplus_tour_i18n.next,action:function(){t("#updraft_servicecheckbox_updraftvault").is(":checked")?a.show("vault_selected"):a.next()}}],when:{show:function(e){t("label[for=updraft_servicecheckbox_updraftvault]").addClass("emphasize"),u()},hide:function(e){t("label[for=updraft_servicecheckbox_updraftvault]").removeClass("emphasize")}}}),a.addStep("settings_more",{title:updraftplus_tour_i18n.settings_more.title,text:updraftplus_tour_i18n.settings_more.text,attachTo:".js-tour-settings-more top",scrollTo:!1,tetherOptions:{},buttons:[{classes:"udp-tour-back",text:updraftplus_tour_i18n.back,action:function(){a.back()}},{classes:n,text:updraftplus_tour_i18n.next,action:a.next}],when:{show:function(){u()}}}),a.addStep("settings_save",{title:updraftplus_tour_i18n.settings_save.title,text:updraftplus_tour_i18n.settings_save.text,attachTo:"#updraftplus-settings-save top",scrollTo:!1,buttons:[{classes:"udp-tour-back",text:updraftplus_tour_i18n.back,action:function(){a.back()}},{classes:n,text:updraftplus_tour_i18n.next,action:function(){t("#updraftcentral_cloud_connect_container").length?a.show("updraft_central"):t("#updraft-navtab-addons").trigger("click")}}],when:{show:function(){u()}}}),a.addStep("updraft_central",{title:updraftplus_tour_i18n.updraft_central.title,text:updraftplus_tour_i18n.updraft_central.text,attachTo:"#updraftcentral_cloud_connect_container top",scrollTo:!1,buttons:[{classes:"udp-tour-back",text:updraftplus_tour_i18n.back,action:function(){a.back()}},{classes:n,text:updraftplus_tour_i18n.next,action:function(){t("#updraft-navtab-addons").trigger("click")}}],when:{show:function(){u()}}}),a.addStep("premium",{title:updraftplus_tour_i18n.premium.title,text:updraftplus_tour_i18n.premium.text,attachTo:updraftplus_tour_i18n.premium.attach_to,scrollTo:!1,buttons:[{classes:"udp-tour-back",text:updraftplus_tour_i18n.back,action:function(){a.going_somewhere=!0,t("#updraft-navtab-settings").trigger("click"),t("#updraftcentral_cloud_connect_container").length?a.show("updraft_central"):a.show("settings_save"),u()}},{classes:n,text:updraftplus_tour_i18n.premium.button,action:a.cancel}],when:{show:function(){window.scroll(0,0)}}}),a.addStep("vault_selected",{title:updraftplus_tour_i18n.vault_selected.title,text:updraftplus_tour_i18n.vault_selected.text,attachTo:"#updraftvault_settings_cell top",scrollTo:!1,buttons:[{classes:"udp-tour-back",text:updraftplus_tour_i18n.back,action:function(){a.show("settings_remote_storage")}},{classes:n,text:updraftplus_tour_i18n.next,action:function(){a.show("settings_more")}}],when:{show:function(t){u()}}}),a.addStep("settings_saved",{title:updraftplus_tour_i18n.settings_saved.title,text:updraftplus_tour_i18n.settings_saved.text,attachTo:"#updraftplus-settings-save top",scrollTo:!1,buttons:[{classes:"udp-tour-back",text:updraftplus_tour_i18n.back,action:function(){a.show("settings_more")}},{classes:n,text:updraftplus_tour_i18n.next,action:function(){t("#updraftcentral_cloud_connect_container").length?a.show("updraft_central"):t("#updraft-navtab-addons").trigger("click")}}],when:{show:function(){u()}}}),a.steps.forEach(function(e){e.once("show",function(){var e=t(this.el).find("header .shepherd-cancel-link");e.attr("data-btntext",updraftplus_tour_i18n.close),t(this.el).find(".js--go-to-settings").on("click",function(e){e.preventDefault(),t("#updraft-navtab-settings").trigger("click")})})}),a.on("cancel",e),o.on("cancel",e),t("#updraft-backupnow-button").length&&(t("#updraft-backupnow-button").on("click",function(t){a.canceled||a.show("backup_options")}),t("#updraft-navtab-backups").on("click",function(t){a.canceled||a.show("backup_now")}),t(document).on("click","label[for=updraft_servicecheckbox_updraftvault]",function(e){a.canceled||t("#updraft_servicecheckbox_updraftvault").is(":checked")||setTimeout(function(){a.show("vault_selected")},200)}),t("#updraft-backupnow-modal").on("dialogclose",function(t,e){a.canceled||a.show("backup_now")}),t(".js-tour-backup-now-button").on("click",function(t){a.canceled||a.show("backup_now_btn_success")}),t("#updraft-navtab-settings").on("click",function(t){a.canceled||a.going_somewhere||a.show("settings_timing")}),t("#updraft-navtab-addons").on("click",function(t){a.canceled||a.show("premium")}),t("#updraft-navtab-migrate, #updraft-navtab-expert").on("click",function(t){a.canceled||a.hide()}),a.start(),updraftplus_tour_i18n.show_tab_on_load?t(updraftplus_tour_i18n.show_tab_on_load).trigger("click"):t("#updraft-navtab-backups").trigger("click")),t(".js-updraftplus-settings").length&&o.start();var u=function(e){a.going_somewhere=!1,e||(e=a.getCurrentStep());var n=t(e.el);t(e.tether.target);t("body, html").animate({scrollTop:n.offset().top-50},500,function(){window.scrollTo(0,n.offset().top-50)})}}})}(jQuery);