(function(){$script("lib/tether/tether.js",(function(){return $script("lib/shepherd.js/shepherd.min.js",(function(){var conditionTypeStep,tour,tr,_ref;if(0!==jQuery(".switch-rule-row").length)return jQuery("html, body").scrollTop(0),tr=chrome.i18n.getMessage.bind(chrome.i18n),(tour=new Shepherd.Tour({defaults:{classes:"shepherd-theme-arrows"}})).addStep("condition-step",{text:tr("options_guide_conditionStep"),attachTo:".switch-rule-row bottom",buttons:[{text:tr("options_guideSkip"),action:tour.cancel,classes:"shepherd-button-secondary"},{text:tr("options_guideNext"),action:tour.next}]}),(conditionTypeStep=tour.addStep("condition-type-step",{text:tr("options_guide_conditionTypeStep"),attachTo:".condition-type-th bottom",advanceOn:{selector:".close-condition-help",event:"click"},buttons:[{text:tr("options_guideNext"),action:tour.next}]})).on("show",(function(){return jQuery(".toggle-condition-help").one("click",(function(){if(conditionTypeStep.isOpen())return jQuery(".shepherd-step.shepherd-enabled").hide(),jQuery(".toggle-condition-help, .close-condition-help").one("click",(function(){return tour.next()}))}))})),tour.addStep("condition-profile-step",{text:tr("options_guide_conditionProfileStep"),attachTo:".switch-rule-row-target bottom",buttons:[{text:tr("options_guideNext"),action:tour.next}]}),tour.addStep("switch-default-step",{text:tr("options_guide_switchDefaultStep"),attachTo:".switch-default-row top",buttons:[{text:tr("options_guideNext"),action:tour.next}]}).on("show",(function(){var row,scrollTop;return(scrollTop=(row=jQuery(".switch-default-row")).offset().top+row.height()-$(window).height())<0&&(scrollTop=0),jQuery("html, body").animate({scrollTop:scrollTop})})),tour.addStep("apply-switch-profile-step",{text:tr("options_guide_applySwitchProfileStep"),attachTo:"body top",scrollTo:!1,classes:"shepherd-theme-arrows fixed-top-right",buttons:[{text:tr("options_guideDone"),action:tour.next}]}),null!=(_ref=Shepherd.activeTour)&&_ref.cancel(),tour.start()}))}))}).call(this);