{"version":3,"sources":["webpack:///./frontend/global/utils/promiseMinTimeout.js","webpack:///./frontend/global/meta.service.js","webpack:///./frontend/global/user.service.js","webpack:///./frontend/global/redirects.service.js","webpack:///./frontend/sales/home/images/stripe-square-cutout.png","webpack:///./frontend/sales/statics/documentation/emails/changedPlan.html","webpack:///./frontend/sales/blog/blogIndex.component.js","webpack:///./frontend/sales/blog/blogShow.component.js","webpack:///./frontend/sales/statics/documentation/documentation.component.js","webpack:///./frontend/sales/sales.component.js","webpack:///./frontend/sales/home/home.component.js","webpack:///./frontend/sales/home/introGraphic.component.js","webpack:///./frontend/sales/home/automationGraphic.component.js","webpack:///./frontend/sales/statics/statics.component.js","webpack:///./frontend/sales/onboardLogo.component.js","webpack:///./frontend/sales/headerSales.component.js","webpack:///./frontend/sales/navSales.component.js","webpack:///./frontend/global/pageChange.hook.js","webpack:///./frontend/sales/sales.module.js","webpack:///./frontend/sales/footerSales.component.js","webpack:///./frontend/sales/home/images/sendview-logo.png","webpack:///./frontend/sales/home/images/itv-logo.png","webpack:///./frontend/sales/home/images/wordtracker-logo.png","webpack:///./frontend/sales/sales.html","webpack:///./frontend/sales/home/home.html","webpack:///./frontend/sales/home/images/email-editor-grab.png","webpack:///./frontend/sales/home/images/email-analytics-grab.png","webpack:///./frontend/sales/home/images/onboard-square.png","webpack:///./frontend/sales/blog/blogIndex.html","webpack:///./frontend/sales/blog/blogShow.html","webpack:///./frontend/sales/home/introGraphic.html","webpack:///./frontend/sales/home/automationGraphic.html","webpack:///./frontend/sales/statics/statics.html","webpack:///./frontend/sales/statics/documentation/emails/dunning.html","webpack:///./frontend/sales/statics/documentation/emails/preDunning.html","webpack:///./frontend/sales/statics/documentation/emails/purchased.html","webpack:///./frontend/sales/statics/documentation/emails/cancellation.html","webpack:///./frontend/sales/statics/documentation/emails/cardUpdated.html","webpack:///./frontend/sales/statics/documentation/emails/chargeSucceeded.html","webpack:///./frontend/sales/statics/documentation/emails/invoiceReceipt.html","webpack:///./frontend/sales/statics/documentation/emails/renewed.html","webpack:///./frontend/sales/statics/documentation/emails/renewedBefore.html","webpack:///./frontend/sales/statics/documentation/emails/trialExpired.html","webpack:///./frontend/sales/statics/documentation/emails/trialStart.html","webpack:///./frontend/sales/statics/documentation/emails/trialWillEnd.html","webpack:///./frontend/sales/statics/documentation/documentation.html","webpack:///./frontend/sales/onboard-logo.html","webpack:///./frontend/sales/headerSales.html","webpack:///./frontend/sales/navSales.html","webpack:///./frontend/sales/statics/faq.html","webpack:///./frontend/sales/statics/support.html","webpack:///./frontend/sales/home/images/owen.png","webpack:///./frontend/sales/home/images/chris.png","webpack:///./frontend/sales/home/images/alex.png","webpack:///./frontend/sales/statics/terms.html","webpack:///./frontend/global/filters/momentTime.filter.js","webpack:///./frontend/global/opportunities/opportunitiesCount.service.js","webpack:///./frontend/global/targetingOptions.service.js","webpack:///./frontend/global/analytics/analyticsManager.service.js","webpack:///./frontend/global/scrollLock.factory.js","webpack:///./frontend/global/factories/tickboxes.factory.js","webpack:///./frontend/global/factories/analytics/analyticQueue.factory.js","webpack:///./frontend/global/analytics/percentageCircle.directive.js","webpack:///./frontend/global/callout.directive.js","webpack:///./frontend/global/stripe/stripeCard.directive.js","webpack:///./frontend/app/app.component.js","webpack:///./frontend/global/filters/perCent.filter.js","webpack:///./frontend/global/filters/targetingSummary.filter.js","webpack:///./frontend/app/messages/messageList.component.js","webpack:///./frontend/app/messages/messageShow.component.js","webpack:///./frontend/app/messages/messageActivity.component.js","webpack:///./frontend/app/messages/advanced_options/advancedOptions.component.js","webpack:///./frontend/app/messages/email_editor/emailEditor.component.js","webpack:///./frontend/app/account/emailDesign.service.js","webpack:///./frontend/app/dashboard/dashboard.module.js","webpack:///./frontend/app/dashboard/dashboard.component.js","webpack:///./frontend/global/elements/modal/modal.component.js","webpack:///./frontend/global/elements/modal/modal.service.js","webpack:///./frontend/global/resourceManager.service.js","webpack:///./frontend/global/resourceRoutes.service.js","webpack:///./frontend/global/availablePlans.service.js","webpack:///./frontend/global/availableProducts.service.js","webpack:///./frontend/global/notifier.service.js","webpack:///./frontend/global/opportunities/opportunitiesAvailable.service.js","webpack:///./frontend/global/opportunities/opportunitiesStatus.service.js","webpack:///./frontend/global/planTickboxes.service.js","webpack:///./frontend/global/productTickboxes.service.js","webpack:///./frontend/global/emailTemplates.service.js","webpack:///./frontend/global/currentSender.service.js","webpack:///./frontend/global/analytics/analyticsResource.service.js","webpack:///./frontend/global/cableConnection.service.js","webpack:///./frontend/global/factories/messageHelper.factory.js","webpack:///./frontend/global/factories/emailHelper.factory.js","webpack:///./frontend/global/factories/analytics/messageAnalytics.factory.js","webpack:///./frontend/global/factories/analytics/opportunityAnalytics.factory.js","webpack:///./frontend/global/factories/analytics/analyticQueueItem.factory.js","webpack:///./frontend/global/analytics/analyticsService.controller.js","webpack:///./frontend/global/modals/connectModal.component.js","webpack:///./frontend/global/modals/testSendModal.component.js","webpack:///./frontend/global/design_colors/designColors.component.js","webpack:///./frontend/global/dots/dots.directive.js","webpack:///./frontend/global/analytics/analyticsTotal.directive.js","webpack:///./frontend/global/analytics/analyticsRate.directive.js","webpack:///./frontend/global/pageChangeApp.hook.js","webpack:///./frontend/global/global.module.js","webpack:///./frontend/global/advancedOptions.service.js","webpack:///./frontend/global/dots/dotItem.directive.js","webpack:///./frontend/global/analytics/analytics.directive.js","webpack:///./frontend/global/metricLabel.directive.js","webpack:///./frontend/global/modals/connectModal.service.js","webpack:///./frontend/global/modals/testSendModal.service.js","webpack:///./frontend/global/stripeForm.component.js","webpack:///./frontend/app/messages/messages.component.js","webpack:///./frontend/app/messages/messageNew.component.js","webpack:///./frontend/app/messages/message.service.js","webpack:///./frontend/app/messages/activityStore.service.js","webpack:///./frontend/app/messages/preview/preview.component.js","webpack:///./frontend/app/messages/targeting_preview/targetingPreview.component.js","webpack:///./frontend/app/messages/activities/activities.component.js","webpack:///./frontend/app/messages/trigger_selector/triggerSelector.component.js","webpack:///./frontend/app/messages/plan_selector/planSelector.component.js","webpack:///./frontend/app/messages/product_selector/productSelector.component.js","webpack:///./frontend/app/messages/refresh_button/refreshButton.component.js","webpack:///./frontend/app/messages/sender_selector/senderSelector.component.js","webpack:///./frontend/app/messages/bcc_selector/bccSelector.component.js","webpack:///./frontend/app/messages/automation_filter/automationFilter.component.js","webpack:///./frontend/app/messages/email_thumbnail/emailThumbnail.component.js","webpack:///./frontend/app/messages/scheduled/scheduledStore.service.js","webpack:///./frontend/app/messages/scheduled/scheduled.component.js","webpack:///./frontend/app/messages/messages.module.js","webpack:///./frontend/global/filters/bigNumber.filter.js","webpack:///./frontend/global/filters/opportunityType.filter.js","webpack:///./frontend/global/filters/capitalize.filter.js","webpack:///./frontend/global/filters/currencyDisplay.filter.js","webpack:///./frontend/global/filters/desnake.filter.js","webpack:///./frontend/global/filters/shortTimeTargetingSummary.filter.js","webpack:///./frontend/global/filters/spinalCase.filter.js","webpack:///./frontend/global/filters/timeTargetingSummary.filter.js","webpack:///./frontend/global/filters/truncate.filter.js","webpack:///./frontend/global/filters/filters.module.js","webpack:///./frontend/global/filters/analyticsDate.filter.js","webpack:///./frontend/global/filters/eventType.filter.js","webpack:///./frontend/global/filters/gradedColorClass.filter.js","webpack:///./frontend/global/filters/objectFilter.filter.js","webpack:///./frontend/global/filters/pluralize.filter.js","webpack:///./frontend/global/filters/sender.filter.js","webpack:///./frontend/global/filters/indefiniteArticle.filter.js","webpack:///./frontend/app/account/account.component.js","webpack:///./frontend/app/account/accountDetails.component.js","webpack:///./frontend/app/account/accountSubscription.component.js","webpack:///./frontend/app/account/accountSettings.component.js","webpack:///./frontend/app/account/accountDeliverability.component.js","webpack:///./frontend/app/account/accountDocuments.component.js","webpack:///./frontend/app/account/subscription_components/cardOverview.component.js","webpack:///./frontend/app/account/subscription_components/updateCard.component.js","webpack:///./frontend/app/account/subscription_components/cancelSubscription.component.js","webpack:///./frontend/app/account/subscription_components/contactSupport.component.js","webpack:///./frontend/app/account/subscription_components/subscriptionSalesSplash.component.js","webpack:///./frontend/app/account/account.module.js","webpack:///./frontend/app/user/login.component.js","webpack:///./frontend/app/user/admin/adminIndex.component.js","webpack:///./frontend/app/user/signUp.component.js","webpack:///./frontend/app/user/passwordReset.component.js","webpack:///./frontend/app/user/passwordEdit.component.js","webpack:///./frontend/app/app.module.js","webpack:///./frontend/app/user/userErrors.factory.js","webpack:///./frontend/global/elements/elements.module.js","webpack:///./frontend/global/elements/async_button/asyncButton.component.js","webpack:///./frontend/global/elements/stripe_card_field/stripeCardField.component.js","webpack:///./frontend/global/elements/text_field/textField.component.js","webpack:///./frontend/global/elements/full_page/fullPage.component.js","webpack:///./frontend/packs/app.js","webpack:///./frontend/global/appModule.js","webpack:///./node_modules/moment/locale sync en","webpack:///./node_modules/ob-daterangepicker/node_modules/moment/locale sync en","webpack:///./frontend/global/editor/button.tinyMCEPlugin.js","webpack:///./frontend/global/editor/palette.tinyMCEPlugin.js","webpack:///./frontend/global/editor/link.tinyMCEPlugin.js","webpack:///./frontend/global/uiCodemirror.module.js","webpack:///./frontend/global/modals/connectModal.html","webpack:///./frontend/global/modals/testSendModal.html","webpack:///./frontend/global/design_colors/designColors.html","webpack:///./frontend/global/dots/dots.html","webpack:///./frontend/global/analytics/total.html","webpack:///./frontend/global/analytics/rate.html","webpack:///./frontend/app/app.html","webpack:///./frontend/app/user/login.html","webpack:///./frontend/app/user/admin/adminIndex.html","webpack:///./frontend/app/user/signUp.html","webpack:///./frontend/app/user/passwordReset.html","webpack:///./frontend/app/user/passwordEdit.html","webpack:///./frontend/app/messages/messageList.html","webpack:///./frontend/app/messages/messageNew.html","webpack:///./frontend/app/messages/messageShow.html","webpack:///./frontend/app/messages/messageActivity.html","webpack:///./frontend/app/messages/preview/preview.html","webpack:///./frontend/app/messages/targeting_preview/targetingPreview.html","webpack:///./frontend/app/messages/activities/activities.html","webpack:///./frontend/app/messages/trigger_selector/triggerSelector.html","webpack:///./frontend/app/messages/plan_selector/planSelector.html","webpack:///./frontend/app/messages/product_selector/productSelector.html","webpack:///./frontend/app/messages/sender_selector/senderSelector.html","webpack:///./frontend/app/messages/bcc_selector/bccSelector.html","webpack:///./frontend/app/messages/advanced_options/advancedOptions.html","webpack:///./frontend/app/messages/automation_filter/automationFilter.html","webpack:///./frontend/app/messages/email_thumbnail/emailThumbnail.html","webpack:///./frontend/app/messages/email_editor/emailEditor.html","webpack:///./frontend/app/messages/scheduled/scheduled.html","webpack:///./frontend/app/account/account.html","webpack:///./frontend/app/account/accountDetails.html","webpack:///./frontend/app/account/accountSubscription.html","webpack:///./frontend/app/account/accountSettings.html","webpack:///./frontend/app/account/accountDeliverability.html","webpack:///./frontend/app/account/accountDocuments.html","webpack:///./frontend/app/account/subscription_components/subscriptionSalesSplash.html","webpack:///./frontend/app/dashboard/dashboard.html"],"names":["promiseMinTimeout","promise","ms","timeout","Promise","resolve","reject","id","setTimeout","clearTimeout","promises","all","map","i","then","value","status","reason","statusPromise","$meta","$window","this","name","title","section","defaultTitle","page","document","getElementsByTagName","className","querySelector","setAttribute","description","state","originalTitle","setTitle","setSection","setDescription","setPage","setName","$inject","UserService","user","builtUser","angular","copy","$redirects","redirects","check","toState","includes","userAccessingUserFunctions","url","module","exports","blogIndex","controller","$postList","$","remove","append","template","require","blogShow","$postEntry","_Controller","$sce","$timeout","$location","templates","dunning","trust","preDunning","purchased","cancellation","cardUpdated","changedPlan","chargeSucceeded","invoiceReceipt","renewed","renewedBefore","trialExpired","trialStart","trialWillEnd","docSection","offsets","disableScroll","links","indent","linkId","e","preventDefault","Object","keys","forEach","key","window","scrollTo","vh","innerHeight","documentElement","style","setProperty","$elements","each","idx","split","_id","_elem","getElementById","offsetTop","element","bind","onScroll","currentTarget","scrollY","setVh","highest","lastId","html","trustAsHtml","documentation","Auth","currentUser","response","initialize","drift","identify","email","sales","location","href","home","introGraphic","automationGraphic","statics","onboardLogo","bindings","width","headerSales","expanded","navSales","pageChangeHook","$transitions","$state","transitionChecker","$anchorScroll","onBefore","transition","to","parent","get","stateService","router","needsAdmin","admin","userFunctionPages","authenticate","target","redirect","error","onSuccess","setFromState","salesState","redirectTo","component","homeState","staticsState","documentationState","faqState","blogIndexState","blogShowState","aboutState","supportState","termsState","SALES_MODULE","config","$uiRouter","AuthProvider","loginPath","logoutPath","resetPasswordMethod","registerPath","urlService","rules","otherwise","$stateRegistry","stateRegistry","register","service","inProgress","run","momentTime","input","small","format","momentFormat","moment","$opportunitiesCount","$http","$q","$opportunitiesAvailable","opCount","result","progress","_","data","count","type","convertedType","convertType","buildValues","number","immediately","now","values","times","text","unshift","$targetingOptions","options","trial_start_after","defaultIndex","shortDescription","trial_will_end_before","trial_expired_after","welcome_after","pre_dunning_before","dunning_after","invoice_receipt_after","charge_succeeded_after","renewed_after","renewed_before","upgrade_downgrade_after","card_updated_after","cancellation_recovery_after","subscription_will_end_before","checkout_completed_after","getDefault","opportunityType","_options","getDescription","getSelectedOption","selectedOption","fetchedOptions","option","equals","getSelectedOptionText","$analyticsManager","analyticQueueItem","analyticQueue","manager","queues","getQueue","queue","onComplete","removeQueue","generateKey","Base64","encode","JSON","stringify","arguments","request","extend","method","currentQueue","currentItem","metric","params","add","defer","queuedResponse","time","bodyScrollLock","enableBodyScroll","disableBodyScroll","clearAllBodyScrollLocks","ScrollLock","targetElementSelector","api","targetElement","on","event","targetClass","classList","tickboxesFactory","available","item_id","tickboxes","targetAll","setSelected","comparison","isArray","length","item","selected","contains","onChangeTargetAll","deselectAll","deselectTargetAll","getTargetedIds","targetedIds","reduce","array","push","AnalyticQueue","$analyticsResource","callOptions","complete","callback","omit","percentageCircle","gradedColorClassFilter","restrict","scope","bindToController","typeA","typeB","label","unit","period","valueA","valueB","resolveValues","controllerAs","link","attrs","ctrls","analytics","ctrl","currency","_currency","$watch","newV","oldV","val","$circle","find","isNaN","r","attr","pct","Math","PI","css","strokeDashoffset","klass","addClass","renderSVG","callout","$compile","calloutDirection","calloutBehaviour","calloutEnabled","show","isDisabled","calloutElement","disabled","timer","setEnabled","newVal","enabled","hover","click","cancel","stripeCard","$resourceManager","stripe","Stripe","__STRIPE_PUBLISHABLE_KEY","elements","_token","loading","card","create","mount","setupIntent","authenticatePayment","subscribe","refreshPage","message","textContent","param","token","intent","handleCardSetup","client_secret","intent_id","$notifier","$availablePlans","$currentSender","$availableProducts","subscribedState","subscription","customer","isDevelopment","__RAILS_ENV","redirectURI","__STRIPE_REDIRECT_URI","banners","bannerTypes","search","subscribed","showBanner","daysUntilExpiry","calculateDaysUntilExpiry","cancel_at_period_end","invoice_settings","default_payment_method","trial_end","current_period_start","banner","findWhere","splice","calculated","parseInt","Date","red","logout","headers","reset","origin","app","perCent","skipSpan","isFinite","isUndefined","isNull","characteristic","toString","match","decimals","parseFloat","toFixed","targetingSummary","items","chain","join","replace","$message","opportunities","list","messages","messageType","opportunity_type","loaded","submittedCreate","completeCreate","triggerFilter","object","opportunity","where","getMessages","messageCounts","buildMessageCounts","processing","creationPromise","saveNew","path","indexOf","green","confirm","onDeleteSuccess","activated","messageList","$connectModal","$modal","$emailTemplates","$planTickboxes","sendTimeDescription","previewHTML","senderContinueEnabled","errors","isDirty","emailEditor","emailEditorLock","triggers","group","hideModal","body","targeting","settings","populateSendTimeOptions","isActivated","updateSendTimeOptions","updateOpportunity","alert","subject","setDefaultSendingTime","targetingOptions","matchingOptions","filter","sendTimeOptions","defaultValue","newConnectModal","requested","goToSection","live_mode","plans","targeted","_plan","plan_id","validatePlanMode","confirmMessage","validateForActivated","save","activate","deactivate","provider_uid","hide","setBodyType","showEmailEditor","off","body_type","bodyType","populateBody","messageShow","startJobs","_this","$scheduledStore","messageAnalytics","analyticsDateFilter","$activityStore","$cableConnection","start","subtract","end","updateActivities","onConnected","setupAndRequest","debugEventId","debugResponse","event_id","res","undefined","messageActivity","$advancedOptions","init","changesObj","defaultAdvancedOptions","getTrigger","advanced","advancedObject","advancedId","hasOwnProperty","advancedOptions","onChange","contentStyle","tinyMCE","PluginManager","editor","addButton","tooltip","toUpperCase","disabledStateSelector","onClick","execCommand","onPostRender","self","setup","formatter","formatChanged","active","$emailDesign","$testSendModal","tinymceOptions","plugins","menubar","toolbar","height","statusbar","content_style","buildDynamicEditorStyles","skin","convert_urls","relative_urls","remove_script_host","codeEditorOptions","lineWrapping","lineNumbers","mode","theme","tabSize","autoRefresh","onClose","refreshing","buttonColor","linkColor","h1Color","h2Color","textColor","editorStore","defaults","branding","button","h1","h2","colors","_color","open","console","log","set","DASHBOARD_MODULE","dashboard","states","$opportunitiesStatus","$cookies","building","messageId","Chart","LineWithLine","line","global","defaultFontFamily","controllers","draw","ease","prototype","call","chart","_active","activePoint","ctx","x","tooltipPosition","topY","scales","top","bottomY","bottom","beginPath","moveTo","lineTo","lineWidth","strokeStyle","stroke","restore","buildSendsChart","builtData","datum","timestamp","setHours","y","sent","datasets","fill","backgroundColor","borderWidth","borderColor","pointRadius","pointBorderColor","pointBackgroundColor","lineTension","borderJoinStyle","tooltips","bodyFontColor","titleFontColor","xPadding","yPadding","intersect","axis","callbacks","tooltipItem","dateTokens","yLabel","legend","display","xAxes","gridLines","drawTicks","zeroLineWidth","borderDash","stepSize","ticks","padding","major","yAxes","beginAtZero","modal","modalName","transclude","classValue","shown","$resourceRoutes","$resource","resources","payload","innerPromise","$promise","$$state","registerFunction","plan","done","products","product","notifier","persist","dismiss","opStatus","responseData","$productTickboxes","pretty","currentSender","sender","cache","paramSerializer","j","$rootScope","ActionCableChannel","ActionCableSocketWrangler","registeredFunctions","func","onConnectedFunctions","connected","waiting","connect","consumer","onReceiveMessage","onConfirmSubscription","MessageHelper","_message","EmailHelper","force","populateSubject","_email","preview","test","testEmails","test_emails","MessageAnalytics","period_start","period_end","OpportunityAnalytics","AnalyticQueueItem","analyticsServiceController","opportunityAnalytics","services","_service","_serviceItem","connectModal","testSendEmail","submitting","testSendModal","colorPickerConfig","position","err","toLowerCase","updateColors","designColors","dots","$document","extraClass","isOpen","$emit","one","close","toggle","analyticsTotalController","analyticsRateController","pageChangeAppHook","GLOBAL_MODULE","opportunties","scheduled","daily","query","refresh","admin_users","lock","unlock","delete","new","update","stop","duplicate","activity","debug","targeting_preview","senders","current","resend_confirmation","emails","users","update_settings","update_password","setup_intent","cancel_subscription","uncancel_subscription","renew_subscription","stripe_account","documents","passwords","types","pre_dunning","cancellation_recovery","category","shortName","buildingDesc","detailedDesc","activatedDesc","timePeriod","html_title","beta","jobName","jobs","wrap","wrapCodeEmail","getSubject","getBody","triggerOptions","trigger_without_payment","default","trigger_on_manual_retries","trigger_on_automatic_retries","trigger_on_automatic_update","trigger_with_description_matches","placeholder","trigger_only_in_trial","trigger_when_canceled","skip_first_invoice","if_trial_trigger_when","ignore_subscription_canceled","include_cancelled_trials","sentFromOptions","bcc_email_address","getSentFrom","factory","directive","calloutContent","submittedScratch","messageNew","$messageHelper","$emailHelper","targetingChanged","build","responses","messageResponse","emailResponse","email_id","onSave","isQuiet","setTargetingClean","store","activities","entries","request_id","oldStore","_store","has_more_in_batch","remaining_in_db","remaining_in_db_after_batch","offset","buildRequestParams","failed","getTime","message_id","clientId","showDesktop","showMobile","isMobile","loadPreview","doShowMobile","doShowDesktop","customer_id","updateIframe","fixMobileCss","iframeId","contentWindow","innerHTML","opportunitiesLoading","loadingTimeout","requestId","totalProcessCount","completeProcessCount","getOpportunities","$ctrl","no_data","stopLoading","targetingPreview","$a","currentOpportunity","hideMenu","setOpportunityType","triggerSelector","setTargetingDirty","planSelector","updateTargeting","productSelector","refreshButton","tempSender","getSenders","resetTempSender","confirmed","pendingSenders","pendingSender","errorName","errorEmail","isDirtyFn","focusNewSenderName","createSender","saveSender","EMAIL_REGEX","updateSender","return_url","focus","senderSelector","bccSelector","onClear","automationFilter","fixZoomLevel","emailThumbnail","requestIds","no_scheduled_jobs","MESSAGES_MODULE","currencyDisplay","bigNumberFilter","isoCurrencyFilter","withCurrency","parts","symbol","shortTimeTargetingSummary","capitalizeFilter","units","timeTargetingSummary","targetingDescription","FILTERS_MODULE","abs","pow","charAt","substr","anchor","momentObject","formatDate","diff","index","classes","threeQuarterBracket","bracket","tickSize","min","max","round","keyLength","searchKey","searchValue","singular","plural","Number","truncate","account","stripeAccount","newPassword","password","password_confirmation","userId","accountDetails","subscriptionCanceled","endDate","accountSubscription","accountSettings","accountDeliverability","invoices","accountDocuments","updateCard","cardOverview","cancelSubscription","contactSupport","salesTitle","salesDesc","subscriptionSalesSplash","newSubscription","buttonText","ACCOUNT_MODULE","userErrors","doValidate","login","submitted","any","notify","isProduction","__IS_PRODUCTION","emailSearch","getUsers","locked","adminIndex","SignUpController","signUp","signup","passwordReset","reset_password_token","passwordEdit","APP_MODULE","validators","generic","valid","field","validationError","ActionCableConfig","autoStart","ELEMENTS_MODULE","loadingText","completeText","icon","submit","model","capitalize","string","substring","uiRouter","ngCookies","ngSanitize","angularMoment","dirPagination","$locationProvider","$provide","hashPrefix","plugin","StickyStatesPlugin","DSRPlugin","html5Mode","requireBase","decorator","$delegate","addParams","removeParams","Array","webpackContext","req","webpackContextResolve","__webpack_require__","o","Error","code","tinymce","attachState","isLink","elm","nodeName","hasLinks","util","Tools","grep","getLink","dom","getParent","getSelectedLink","selection","getStart","openDetachedWindow","Env","ie","createElement","rel","evt","createEvent","initMouseEvent","appendChild","dispatchEvent","removeChild","appendClickRemove","win","opener","doc","write","DOM","gotoLink","a","getAttribute","targetEl","scrollIntoView","gotoSelectedLink","createLinkList","linkList","link_list","XHR","send","success","parse","buildListItems","inputList","itemCallback","startItems","appendItems","output","menuItem","menu","showDialog","selectedElm","anchorElm","initialText","onlyText","textListCtrl","updateText","getNode","getContent","nodes","childNodes","nodeType","isOnlyTextSelected","innerText","getAttrib","default_link_target","size","onchange","target_list","rel_list","link_class_list","textStyle","getCssText","inline","windowManager","filetype","autofocus","meta","inp","attach","onkeyup","onbeforecall","toJSON","onSubmit","createLink","linkAttrs","setAttribs","select","undoManager","getSelectedBlocks","insertContent","createHTML","transact","onclick","cmd","addContextToolbar","sel","rng","node","contextmenu","isContextMenuVisible","getRng","startContainer","isCollapsed","startOffset","VK","metaKeyPressed","keyCode","altKey","shiftKey","ctrlKey","metaKey","hasOnlyAltModifier","addMenuItem","toggleVisibility","parents","getParents","prependToContext","stateSelector","context","linkListCtrl","relListCtrl","targetListCtrl","classListCtrl","linkTitleCtrl","linkListChangeHandler","textCtrl","lastControl","control","convertURL","onselect","link_title","anchorList","buildAnchorListControl","delayedConfirm","Delay","setEditorTimeout","setRng","allow_unsafe_link_target","isUnsafe","removeTargetRules","regExp","RegExp","trim","addTargetRules","toggleTargetRules","insertLink","link_assume_external_targets","shortcut","addShortcut","addCommand","uiCodemirrorDirective","uiCodemirrorConfig","compile","postLink","iElement","iAttrs","ngModel","codemirrorOptions","codemirror","$eval","uiCodemirror","uiCodemirrorOpts","codemirrot","tagName","CodeMirror","fromTextArea","cm_el","newCodemirrorEditor","uiCodemirrorAttr","codemirrorDefaultsKeys","updateOptions","newValues","oldValue","isObject","setOption","configOptionsWatcher","$formatters","$render","safeViewValue","$viewValue","setValue","instance","newValue","getValue","$evalAsync","$setViewValue","configNgModelLink","codeMirror","uiRefreshAttr","oldVal","configUiRefreshAttribute","uiRefresh","$on","isFunction","onLoad","constant"],"mappings":"2lCAgBe,SAASA,EAAkBC,EAASC,GAEjD,IAAMC,EAAU,IAAIC,SAAQ,SAACC,EAASC,GACpC,IAAIC,EAAKC,YAAW,WAClBC,aAAaF,GACbF,EAAQ,eAAiBH,EAAK,SAC7BA,MAGL,OAAO,IAAIE,SAAQ,SAACC,EAASC,GAzBL,IAAAI,KA0BJ,CAChBT,EACAE,GA3BGC,QAAQO,IACbD,EAASE,KAAI,SAACX,EAASY,GAAV,OACXZ,EACGa,MAAK,SAAAC,GAAK,MAAK,CACdC,OAAQ,YACRD,YAHJ,OAKS,SAAAE,GAAM,MAAK,CAChBD,OAAQ,WACRC,kBAmBHH,MAAK,YAAqC,IAAD,SAAlCI,EAAkC,UACb,cAAzBA,EAAcF,OAAwBf,EAAQa,KAAKT,GAClDJ,EAAO,MAAOK,MALrB,MAMSA,Q,8OChCN,IAAMa,EAAb,WAEE,WAAYC,I,4F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,4rC","file":"js/app-54338e011208f724ac4d.chunk.js","sourcesContent":["const promiseAllSettled = promises => {\n return Promise.all(\n promises.map((promise, i) =>\n promise\n .then(value => ({\n status: \"fulfilled\",\n value,\n }))\n .catch(reason => ({\n status: \"rejected\",\n reason,\n }))\n )\n );\n}\n\nexport default function promiseMinTimeout(promise, ms) {\n // Create a promise that rejects in milliseconds\n const timeout = new Promise((resolve, reject) => {\n let id = setTimeout(() => {\n clearTimeout(id);\n resolve('Finished in ' + ms + 'ms.')\n }, ms)\n })\n\n return new Promise((resolve, reject) => {\n promiseAllSettled([\n promise,\n timeout\n ]).then(([statusPromise, statusTimeout]) => {\n if (statusPromise.status === \"fulfilled\") promise.then(resolve);\n else promise.catch(reject);\n }).catch(reject);\n })\n}","export class $meta {\n\n constructor($window) {\n this.$window = $window;\n this.name = null;\n this.title = null;\n this.section = null;\n this.defaultTitle = 'Onboard';\n }\n\n setSection(section) {\n this.section = (section) ? section : null;\n }\n\n setPage(page) {\n this.page = (page) ? page : null;\n }\n \n setName(name) {\n this.name = (name) ? name : null;\n document.getElementsByTagName('body')[0].className = name;\n }\n\n setTitle(title) {\n title = title;\n this.title = title;\n this.$window.document.title = title;\n this.$window.document.querySelector('meta[property=\"og:title\"]').setAttribute(\"content\", title);\n this.$window.document.querySelector('meta[name=\"twitter:title\"]').setAttribute(\"content\", title);\n }\n\n setDescription(description) {\n if (description) {\n this.$window.document.querySelector('meta[name=\"description\"]').setAttribute(\"content\", description);\n this.$window.document.querySelector('meta[property=\"og:description\"]').setAttribute(\"content\", description);\n this.$window.document.querySelector('meta[itemprop=\"description\"]').setAttribute(\"content\", description);\n this.$window.document.querySelector('meta[name=\"twitter:description\"]').setAttribute(\"content\", description);\n }\n }\n\n setFromState(state) {\n if (!state.originalTitle) this.setTitle(state.title);\n this.setSection(state.section);\n this.setDescription(state.description);\n this.setPage(state.page);\n this.setName(state.name);\n }\n\n}\n\n$meta.$inject = ['$window'];\n","export class UserService {\n\n constructor () {\n this.user = {};\n }\n\n initialize(user) {\n let builtUser = {\n // Merge in extra boolean helpers here, eg, 'isSubscriber'\n ...user\n };\n\n angular.copy(builtUser, this.user);\n return this.user;\n }\n\n reset() {\n angular.copy({}, this.user);\n }\n\n}","export const $redirects = () => {\n\n var redirects = {};\n\n const userAccessingUserFunctions = (user, toState) => {\n if (['login', 'signUp', 'passwordReset', 'passwordEdit'].includes(toState.name)) throw 'messageList';\n }\n\n redirects.check = (user, toState) => {\n if (!user) return null;\n try {\n userAccessingUserFunctions(user, toState);\n return false;\n } catch (url) {\n // console.log(`Redirected to ${url}`);\n return url;\n }\n };\n\n return redirects;\n}","module.exports = __webpack_public_path__ + \"stripe-square-cutout-9a1c0f4df6b1f05cd9755d00406beed1.png\";","module.exports = \"

Change plan emails

The 'Changed plan' trigger sends emails automatically whenever a customer changes their subscription plan, whether upgrading or downgrading.

\";","import \"./blog.scss\";\n\nclass _Controller {\n constructor() {\n const $postList = $('#post-list');\n $('#post-list').remove();\n $('#post-list-container').append($postList);\n }\n}\n\nexport const blogIndex = {\n controller: _Controller,\n template: require('./blogIndex.html')\n};\n","class _Controller {\n constructor() {\n const $postEntry = $('#post-entry');\n $('#post-entry').remove();\n $('#post-entry-container').append($postEntry);\n\n debugger\n }\n}\n\nexport const blogShow = {\n controller: _Controller,\n template: require('./blogShow.html')\n};\n","import \"./documentation.scss\";\n\nclass _Controller {\n constructor($sce, $window, $timeout, $location) {\n this.$sce = $sce;\n this.$timeout = $timeout;\n this.$window = $window;\n this.$location = $location;\n this.templates = {\n dunning: this.trust(require(\"./emails/dunning.html\")),\n preDunning: this.trust(require(\"./emails/preDunning.html\")),\n purchased: this.trust(require(\"./emails/purchased.html\")),\n cancellation: this.trust(require(\"./emails/cancellation.html\")),\n cardUpdated: this.trust(require(\"./emails/cardUpdated.html\")),\n changedPlan: this.trust(require(\"./emails/changedPlan.html\")),\n chargeSucceeded: this.trust(require(\"./emails/chargeSucceeded.html\")),\n invoiceReceipt: this.trust(require(\"./emails/invoiceReceipt.html\")),\n renewed: this.trust(require(\"./emails/renewed.html\")),\n renewedBefore: this.trust(require(\"./emails/renewedBefore.html\")),\n trialExpired: this.trust(require(\"./emails/trialExpired.html\")),\n trialStart: this.trust(require(\"./emails/trialStart.html\")),\n trialWillEnd: this.trust(require(\"./emails/trialWillEnd.html\")),\n changedPlan: this.trust(require(\"./emails/changedPlan.html\")),\n }\n this.docSection = \"docs-overview\";\n this.offsets = {};\n this.disableScroll = false;\n this.links = [\n {id: \"overview\", title: \"Overview\"},\n {id: \"connecting-to-stripe\", title: \"Connecting to Stripe\"},\n {id: \"types-of-email\", title: \"Email triggers\"},\n {id: \"trial-start\", title: \"Started trial\", indent: true},\n {id: \"trial-will-end\", title: \"Trial ends soon\", indent: true},\n {id: \"trial-expired\", title: \"Trial expired\", indent: true},\n {id: \"welcome\", title: \"Subscription purchased\", indent: true},\n {id: \"renewed-before\", title: \"Subscription will renew\", indent: true},\n {id: \"renewed\", title: \"Subscription renewed\", indent: true},\n {id: \"cancellation\", title: \"Subscription cancelled\", indent: true},\n {id: \"changed-plan\", title: \"Changed plan\", indent: true},\n {id: \"card-updated\", title: \"Updated card\", indent: true},\n {id: \"dunning\", title: \"Payment failed\", indent: true},\n {id: \"pre-dunning\", title: \"Payment will fail\", indent: true},\n {id: \"invoice-receipt\", title: \"Invoice paid\", indent: true},\n {id: \"charge-succeeded\", title: \"Charge suceeded\", indent: true},\n {id: \"email-editing\", title: \"Email editing\"},\n {id: \"liquid-markup\", title: \"Dynamic content\", indent: true},\n {id: \"previewing-emails\", title: \"Previewing emails\", indent: true},\n {id: \"test-sends\", title: \"Test sends\", indent: true},\n {id: \"activity-scheduled\", title: \"Activity and scheduled preview\"},\n {id: \"troubleshooting\", title: \"Troubleshooting\"}\n ]\n }\n\n\n goToAnchor(linkId, e) {\n e.preventDefault();\n const keys = Object.keys(this.offsets);\n keys.forEach(key => {\n if (this.offsets[key] == `docs-${linkId}`) {\n window.scrollTo(0, key);\n this.disableScroll = true;\n this.docSection = `docs-${linkId}`\n }\n });\n }\n\n\n\n setVh() {\n let vh = window.innerHeight * 0.01;\n // Then we set the value in the --vh custom property to the root of the document\n document.documentElement.style.setProperty('--vh', `${vh}px`);\n }\n\n $onInit() {\n this.$timeout(() => {\n const $elements = $('.list-section h2, .list-section h3, .email-types > li')\n $elements.each((idx) => {\n const elem = $elements[idx];\n if (elem.id.split(\"-\")[0] === \"docs\") {\n const _id = $elements[idx].id;\n const _elem = document.getElementById(_id)\n this.offsets[_elem.offsetTop] = _elem.id;\n }\n })\n angular.element(this.$window).bind(\"scroll\", (e) => {\n this.onScroll(e.currentTarget.scrollY);\n });\n angular.element(this.$window).bind(\"resize\", (e) => {\n this.setVh()\n });\n this.onScroll(window.scrollY);\n this.setVh();\n }, 200);\n }\n\n onScroll(scrollY) {\n if (this.disableScroll) {\n this.disableScroll = false;\n return false;\n }\n const keys = Object.keys(this.offsets);\n let highest = 0;\n keys.forEach(key => {\n if (scrollY + 100 > key) highest = key; \n })\n const lastId = this.offsets[highest];\n if (lastId != this.docSection) {\n const _id = lastId || this.offsets[keys[0]];\n this.$timeout(()=> {\n this.docSection = _id;\n // if (!this.$location.hash() && _id === \"docs-overview\") {\n // // nothing\n // } else {\n // this.$location.replace().hash(_id);\n // }\n })\n }\n }\n\n trust(html) {\n return this.$sce.trustAsHtml(html);\n }\n};\n\n_Controller.$inject = ['$sce', '$window', '$timeout', '$location'];\n\nexport const documentation = {\n controller: _Controller,\n template: require(\"./documentation.html\")\n};\n\n","import \"./sales.scss\";\n\nclass _Controller {\n constructor(UserService, Auth, $timeout) {\n this.Auth = Auth;\n this.UserService = UserService;\n this.$timeout = $timeout;\n }\n\n $onInit() {\n this.Auth.currentUser().then(response => {\n const { user } = response;\n this.UserService.initialize(user);\n this.user = this.UserService.user;\n \n this.$timeout(() => {\n var drift = drift || null;\n if (!!drift) {\n drift.identify('USER-' + this.user.id, {\n email: this.user.email,\n });\n }\n }, 100)\n }).catch(() => {\n // User is not logged in, ignore\n })\n }\n}\n\n_Controller.$inject = ['UserService', 'Auth', '$timeout'];\n\nexport const sales = {\n controller: _Controller,\n template: require('./sales.html')\n};\n","import \"./home.scss\";\n\nclass _Controller {\n\n constructor() {}\n\n goToSignUp () {\n window.location.href = '/sign-up';\n // try {\n // // goog_snippet_vars();\n // // window.google_conversion_format = '3';\n // this.$location.path('/sign-up');\n // } catch (err) {\n // this.$location.path('/sign-up');\n // }\n }\n\n}\n\n_Controller.$inject = [];\n\nexport const home = {\n controller: _Controller,\n template: require('./home.html')\n};\n","import \"./introGraphic.scss\";\n\nexport const introGraphic = {\n template: require('./introGraphic.html'),\n};","import \"./automationGraphic.scss\";\n\nexport const automationGraphic = {\n template: require('./automationGraphic.html'),\n};","import \"./support.scss\";\nimport \"./faq.scss\";\n\nclass _Controller {\n constructor() {\n }\n}\n\nexport const statics = {\n controller: _Controller,\n template: require('./statics.html')\n};\n","export const onboardLogo = {\n bindings: {\n width: '<',\n },\n template: require('./onboard-logo.html')\n};","export const headerSales = {\n template: require('./headerSales.html')\n};","class _Controller {\n\n constructor($location, $meta) {\n this.$location = $location;\n this.expanded = false;\n this.$meta = $meta;\n }\n\n goToSignUp () {\n window.location.href = '/sign-up';\n }\n\n}\n\n_Controller.$inject = ['$location', '$meta'];\n\nexport const navSales = {\n controller: _Controller,\n template: require('./navSales.html')\n};","export function pageChangeHook($transitions, $meta, UserService, $state, Auth, $redirects, transitionChecker, $anchorScroll, $location, $timeout) {\n\n $transitions.onBefore({}, transition => {\n\n const toState = transition.to();\n const parent = (toState.parent) ? $state.get(toState.parent) : false;\n const { stateService } = transition.router;\n\n const needsAdmin = () => ((toState.admin || parent.admin));\n const needsAuth = () => ((toState.authenticate || parent.authenticate));\n const userFunctionPages = () => (['login', 'signUp', 'passwordReset', 'passwordEdit'].includes(toState.name));\n\n if (needsAuth() || needsAdmin() || userFunctionPages()) {\n return Auth.currentUser().then(response => {\n const { user } = response;\n UserService.initialize(user);\n\n if (needsAdmin() && !user.admin) {\n return stateService.target('dashboard');\n }\n\n const redirect = $redirects.check(user, toState);\n if (redirect) return stateService.target(redirect);\n\n return true;\n\n }).catch(error => {\n // console.error(error);\n if (error.status == 401) {\n if (userFunctionPages()) return true;\n return stateService.target('login');\n } else {\n return stateService.target('home');\n }\n });\n } else {\n return true;\n }\n\n });\n\n // Set meta (title/section details) if page change is successful\n $transitions.onSuccess({}, transition => {\n\n $meta.setFromState(transition.to())\n // if ($location.hash()) {\n // $timeout(() => $anchorScroll(), 150);\n // }\n\n })\n\n}\n\npageChangeHook.$inject = ['$transitions', '$meta', 'UserService', '$state', 'Auth', '$redirects', 'transitionChecker', '$anchorScroll', '$location', '$timeout'];\n","import { sales } from \"./sales.component\";\nimport { home } from \"./home/home.component\";\nimport { blogIndex } from \"./blog/blogIndex.component\";\nimport { blogShow } from \"./blog/blogShow.component\";\nimport { introGraphic } from \"./home/introGraphic.component\";\nimport { automationGraphic } from \"./home/automationGraphic.component\";\nimport { statics } from \"./statics/statics.component\";\nimport { documentation } from \"./statics/documentation/documentation.component\";\nimport { onboardLogo } from \"./onboardLogo.component\";\nimport { headerSales } from \"./headerSales.component\";\nimport { navSales } from \"./navSales.component\";\nimport { footerSales } from \"./footerSales.component\";\n\nimport { $redirects } from \"../global/redirects.service\";\nimport { $meta } from \"../global/meta.service\";\nimport { UserService } from \"../global/user.service\";\nimport { pageChangeHook } from \"../global/pageChange.hook\";\n\nexport const salesState = {\n name: 'sales',\n redirectTo: 'home',\n component: 'sales',\n};\n\nexport const homeState = {\n name: 'home',\n url: '/',\n parent: 'sales',\n title: 'Onboard | Stripe emails with dunning, welcome and cancellation from Onboard',\n component: 'home',\n};\n\nexport const staticsState = {\n name: 'statics',\n parent: 'sales',\n component: 'statics',\n};\n\nexport const documentationState = {\n name: 'documentation',\n url: '/documentation',\n title: 'Documentation | Onboard',\n description: 'Learn how to automate Stripe emails with Onboard. Send trial emails, welcome, dunning, cancellation and more.',\n component: 'documentation',\n section: 'documentation'\n};\n\nexport const faqState = {\n name: 'faq',\n url: '/faq',\n parent: 'statics',\n title: 'FAQ | Onboard',\n description: 'What emails does Onboard send? Can I create sequences of emails? Here are some answers to frequently asked questions.',\n template: require('./statics/faq.html'),\n section: 'faq'\n};\n\nexport const blogIndexState = {\n name: 'blogIndex',\n url: '/blog',\n parent: 'statics',\n title: 'Blog | Onboard',\n description: 'What emails does Onboard send? Can I create sequences of emails? Here are some answers to frequently asked questions.',\n component: 'blogIndex',\n section: 'blog'\n};\n\nexport const blogShowState = {\n name: 'blogShow',\n url: '/blog/:id',\n parent: 'statics',\n component: 'blogShow',\n section: 'blog',\n originalTitle: true\n};\n\nexport const aboutState = {\n name: 'about',\n url: '/about',\n redirectTo: 'support'\n // parent: 'statics',\n // title: 'About | Onboard',\n // template: require('./statics/about.html')\n};\n\nexport const supportState = {\n name: 'support',\n url: '/support',\n parent: 'statics',\n title: 'Support | Onboard',\n template: require('./statics/support.html'),\n section: 'support'\n};\n\nexport const termsState = {\n name: 'terms',\n url: '/terms',\n parent: 'statics',\n title: 'Terms and Conditions | Onboard',\n template: require('./statics/terms.html')\n};\n\nexport const SALES_MODULE = angular.module('sales', []);\n\nSALES_MODULE.config(['$uiRouterProvider', 'AuthProvider', function($uiRouter, AuthProvider) {\n // Enable tracing of each TRANSITION... (check the javascript console)\n // $uiRouter.trace.enable(1);\n\n AuthProvider.loginPath('/users/login.json');\n AuthProvider.logoutPath('/users/logout.json');\n AuthProvider.resetPasswordMethod('PUT');\n AuthProvider.registerPath('/users.json');\n\n const $urlService = $uiRouter.urlService;\n $urlService.rules.otherwise({ state: 'home' });\n\n const $stateRegistry = $uiRouter.stateRegistry;\n $stateRegistry.register(salesState);\n $stateRegistry.register(homeState);\n $stateRegistry.register(staticsState);\n $stateRegistry.register(documentationState);\n $stateRegistry.register(faqState);\n $stateRegistry.register(blogIndexState);\n $stateRegistry.register(blogShowState);\n $stateRegistry.register(aboutState);\n $stateRegistry.register(supportState);\n $stateRegistry.register(termsState);\n\n}]);\n\nSALES_MODULE.component('sales', sales);\nSALES_MODULE.component('home', home);\nSALES_MODULE.component('statics', statics);\nSALES_MODULE.component('blogIndex', blogIndex);\nSALES_MODULE.component('blogShow', blogShow);\nSALES_MODULE.component('documentation', documentation);\nSALES_MODULE.component('onboardLogo', onboardLogo);\nSALES_MODULE.component('headerSales', headerSales);\nSALES_MODULE.component('navSales', navSales);\nSALES_MODULE.component('footerSales', footerSales);\nSALES_MODULE.component('introGraphic', introGraphic);\nSALES_MODULE.component('automationGraphic', automationGraphic);\n\nSALES_MODULE.service('$meta', $meta);\nSALES_MODULE.service('$redirects', $redirects);\nSALES_MODULE.service('UserService', UserService);\nSALES_MODULE.value('transitionChecker', { inProgress: false })\nSALES_MODULE.run(pageChangeHook);","export const footerSales = {\n template: `\n `\n};","module.exports = __webpack_public_path__ + \"sendview-logo-de3734e7ae566f1d83a268fb3fc9374e.png\";","module.exports = __webpack_public_path__ + \"itv-logo-2e203bea689662ed219751ad76d1e200.png\";","module.exports = __webpack_public_path__ + \"wordtracker-logo-90d5a713a649a21d49cd6e3887b51bc8.png\";","module.exports = \"\";","module.exports = \"

Use Stripe?
Send emails with Onboard.

Automate all your customer emails. Send dunning emails, welcome sequences and more. Just connect to Stripe in one click.

Welcome and trial emails

Send welcome sequences for new subscriptions. Email customers in trial before their trial expires to boost conversion rates.

Payment emails

Recover revenue by sending dunning emails when payments fail. Email customers who make one-off payments and customize emails to each product.

Lifecycle emails

Email customers before or after they renew, when they upgrade/downgrade, and send cancellation sequences to recover churned subscriptions

Getting started is simple, seamless and secure.

Transactional email without the code.

Setting up Onboard is simple: you plug in your Stripe account with one click. That's it. Once you're connected, all your Stripe plans and products are available to target within our seamless platform. You can even tailor your emails to each Stripe customer.

Beautiful emails in seconds

Onboard's streamlined email editor makes it easy to create effective emails. Insert CTA buttons, links, customise your colors to match your brand... or for those requiring complete control, code your own HTML email.

Automation with confidence

Onboard's comprehensive analytics suite gives you a 360-degree view of your customer communications. Monitor the performance of each email with granular activity logs as well as delivery, open, click and bounce rates.

Advanced targeting

Send different emails based on different Stripe subscription plans

Excellent deliverability

Full support for DKIM and SPF records to maximise delivery rates

Dynamic emails

Customize emails per customer with merge tags and templating

Our customers

Simple pricing.

$35 per month

Unlimited Stripe customersUnlimited email sends

Start 14-day free trial
\";","module.exports = __webpack_public_path__ + \"email-editor-grab-597f3dd6b272c6c86c14b87fab7976a9.png\";","module.exports = __webpack_public_path__ + \"email-analytics-grab-95d4cdee2b69fb1a3384b59b1133a3d3.png\";","module.exports = __webpack_public_path__ + \"onboard-square-3aa7f2507d20f992efed2cd6ad90b695.png\";","module.exports = \"
\";","module.exports = \"
\";","module.exports = \"
Trigger Trial ends soon
Time targeting 2 days before trial end
Subject line Your trial ends in two days
7:24pm
Ling at Sender.io
Your trial ends in two days
Hey! We hope you're enjoying Sender.io...
\";","module.exports = \"

Connect to Stripe

Authorize Onboard to connect to Stripe?

Choose when to send

Payment failed
Subscription purchased
Subscription cancelled
One-off charge
Trial started
Trial ends soon

Set targeting

Select Stripe plans
Entry
Plus
Scale
Premium
Enterprise

Write your email

Dear {{ customer.name }},

Your {{ subscription.plan.name }} subscription is all set up!

To get started check the docs below:

Best,

{{ sender.name }}

Measure

Email performance
98% delivered
67% opened
15% clicked
\";","module.exports = \"
\";","module.exports = \"

Payment failed (aka dunning) emails

The 'Payment failed' trigger sends emails automatically after a customer's payment has failed, so that you can remind them to update their payment details.

Any scheduled emails will be stopped from sending as soon as the customer pays their invoice to you.

Automatic retries

Stripe retries payment sources regularly. If you'd like to trigger emails on every failed retry, make sure 'Trigger email every time an automatic payment retry fails' is ticked. In order to avoid re-triggering email sequences, this option only affects emails whose time targeting is set to send 'immediately after' the customer's payment fails.

\";","module.exports = \"

Payment will fail (aka pre-dunning) emails

The 'Payment will fail' trigger sends emails automatically to any customer whose card details will have expired by the time Stripe attempts to collect payment for their next subscription billing period. This is an ideal opportunity to remind them to update their card details.

Any scheduled 'Payment will fail' emails will stop sending as soon as a customer updates their payment details.

\";","module.exports = \"

Subscription purchased emails

The 'Subscription purchased' trigger sends emails the first time a customer purchases a paid subscription. This will be when a customer either purchases a subscription that doesn't have a trial, or successfully converts from a trial to a paying subscription by adding their payment details.

When this email is triggered by a trialing customer adding their payment details, you can choose to send the email either immediately, or when the trial officially ends and the customer is charged at the start of the new billing period. Set this using the tickbox in the 'advanced options' section.

\";","module.exports = \"

Subscription cancelled emails

The 'Subscription cancelled' trigger sends emails automatically when a customer cancels their Stripe subscription. This can be a good opportunity to ask them if there's anything you can do better, or even offer them a discount if they re-subscribe.

\";","module.exports = \"

Card updated emails

The 'Card updated' trigger sends emails automatically whenever a customer manually updates their card, when their card is updated within the Stripe admin interface, or when their bank issues them a new card with a new expiry date and lets Stripe know about it.

\";","module.exports = \"

Charge succeeded emails

The 'Charge succeeded' trigger sends emails automatically when a customer pays for a Stripe charge. You can create emails that target specific products, packages or other charge types by specifying the charge 'description' to target in the 'advanced options' section.

\";","module.exports = \"

Invoice paid emails

The 'Invoice paid' trigger sends emails automatically when a customer successfully pays their Stripe invoice. An ideal use of this trigger type is to send the customer an invoice receipt.

Advanced options

If you send users information about their new subscription at the point of initial purchase (for example, in a purchased subscription email), you may not want to send them an invoice receipt. If so, make sure 'Don't send this email the first time the customer is invoiced' is ticked.

\";","module.exports = \"

Subscription renewed emails

The 'Subscription renewed' trigger sends emails automatically when a customer's subscription ticks over onto their next billing period.

\";","module.exports = \"

Subscription will renew emails

The 'Subscription will renew' trigger sends emails automatically a customizable number of days before a customer's subscription ticks over onto their next billing period. You can use it to send renewal reminders.

\";","module.exports = \"

Trial expired emails

The 'Trial expired' trigger sends emails automatically when a customer's trial comes to an end.

\";","module.exports = \"

Started trial emails

The 'Started trial' trigger sends emails automatically to each customer whenever they subscribe to a plan that has a trial period.

If you have a welcome sequence that you trigger using the start of your customers' trials, you can use the advanced triggering options to stop sending these emails once customers have added their payment details.

\";","module.exports = \"

Trial ends soon emails

The 'Trial ends soon' trigger sends emails automatically a few days before a customer's trial is due to end.

\";","module.exports = \"

Documentation

Overview

Onboard is a platform for sending emails to your Stripe customers. Onboard is designed for businesses that use Stripe Billing to manage their subscriptions or use Stripe Charges to create one-off charges.

Onboard will send welcome emails or trial emails to your new customers, cancellation emails to customers who churn and dunning, pre-dunning emails to deal with payment problems and much more. You can set up all these emails with just a few clicks.

Connecting to Stripe

To allow Onboard to send automated emails in response to what happens within your Stripe account, you need to authorize Onboard with your Stripe. This is a one-click process: we use Stripe Connect to sort all of the configuration automatically and you don't need to set up webhook endpoints or anything like that.

Using Stripe Connect means your data stays within Stripe. Only occasionally do we store a small amount of Stripe event data for the purposes of scheduling future emails &mdash and even then the data is securely encrypted on our servers and deleted once the email is sent.

Additionally, the access you grant us is read-only. We can't make charges on your account and you can revoke our access at any time via the Stripe admin panel.

To connect, just click the big 'Connect to Stripe' button at the top of the admin area. If you want to disconnect, you can click 'revoke access' in your Stripe account settings under the 'Connect' tab.

Email triggers

Onboard makes triggering Stripe emails simple. Read the guide below to learn about each type of email Onboard can send.

Triggering

'Triggering' here refers to when an email becomes elligible for sending. The actual time it will send depends on the time settings you've set in the triggering section of the email editor.

Email editing

Onboard's email editor accepts pure HTML. It does not interfere with or change your email's HTML before it is sent (with some exceptions, below). We recommend using a tool like Litmus to make sure your email looks awesome in all email clients before you send it.

That said, Onboard does convert any CSS styles to inline attributes, and also converts relative paths to absolute paths, as per email best practice.

It also parses Liquid markup.

Dynamic content

Onboard uses Liquid markup to render information stored in Stripe to your emails.

You can read our comprehensive guide to dynamic content in emails here.

Previewing emails

Our full screen email editor will show you an rendered preview of the email. You can click between a Desktop and Mobile preview.

Note about email clients

Emails will look different in different email clients. The preview function is designed as a rough preview only: we recommend using a tool like Litmus to make sure your email looks awesome in all email clients before you send it.

Test sends

Click 'Send test...' and enter up to five email addresses (separated by commas) to send a test email.

Important note

One of the key factors in deliverability is whether or not people open and click on the emails you send. Therefore it is crucial that each of your test email recipients open every test email you send and click on at least one link inside the email to keep your deliverability nice and high.

Activity and scheduled preview

The 'emails scheduled' view on the Automation activity page shows emails scheduled to be sent in the next seven days.

Important note

Because Onboard double-checks that scheduled emails are still valid at the moment of sending, you may occasionally see emails scheduled in here that will not actually end up being sent. For example: Subscription Will Renew emails where the customer has already cancelled their subscription.

Troubleshooting

If you have any questions, email support@onboardhq.com and we'll get straight back to you.

\";","module.exports = \" Onboard \";","module.exports = \"

\";","module.exports = \" \";","module.exports = \"

Frequently asked questions

What emails does Onboard send?

Onboard can send welcome emails when your customers subscribe, cancellation rescue emails when they cancel, update card prompt emails when card details are due to expire soon, dunning emails for when a customer's payment has failed, trial emails, one-off charge emails, invoice receipts, renewal notifications — pretty much any email that you'd ever want to get out of Stripe.

However, if we've missed any, please let us know by emailing us at support@onboardhq.com. We're always looking to expand our repertoire!

Can I send different emails for different plans?

Yes. Onboard grabs your plan names from Stripe when you sign up and lets you set up emails targeting just one or as many plans as you like.

Can I create sequences of emails?

Absolutely. For example, to create a welcome sequence, simply create your first welcome email with targeting set to 'when customer subscribes', then create another email with targeting set to 'one day after a customer subscribes' and so on.

What email analytics does Onboard provide?

Onboard shows you sends, deliveries, opens, clicks and, for certain types of email, revenue earnt.

Are there any limits on email sends, number of customers, etc?

In short, no. All features of Onboard are completely unlimited even during the free trial. Emails can only be triggered by customer actions, but it doesn’t matter how many of those there are. The price is the same.

Is it secure?

Absolutely. None of your customer details are held within Onboard and we don’t retain any payment or customer information. We use the OAuth protocol to connect with Stripe and our site is behind SSL to ensure everything is kept secure.

How much revenue can I recover?

That depends on how much you’re losing. You can only ever recover a percentage of this, however we’re confident that it will be more than the $35 a month subscription cost. If it’s not, get in touch and we’ll give you one month free (as long as you have an active Stripe account).

\";","module.exports = \"

Support

  • Owen CEO
  • Chris Product
  • Alex Engineering

Contact us

Need some support? Just get in touch.

Email: support@onboardhq.com

If you're stuck, be sure to check out the documentation.

More about Team Onboard

We’re a London based company who have been working together on different projects for the past four years. Check out Wordtracker.com to see one of them in action.

We've used Stripe as our go-to payments provider for years and we love it. But what we don't love is building custom integrations to send emails on cancellation and card expiry, onboarding emails on sign-up and all the other basics any SaaS company needs. So we decided to solve the problem once and for all.

Our mission is to make Onboard the easiest way possible to communicate with customers based on Stripe events. So let us know how we're doing – feedback is always welcome!

\";","module.exports = __webpack_public_path__ + \"owen-36e27b1347e92eedc2c77f6162402e5f.png\";","module.exports = __webpack_public_path__ + \"chris-dd8efab8298f4a10f1647a7d1df4ffdf.png\";","module.exports = __webpack_public_path__ + \"alex-35746eaaa88b08432341bf3352df6aed.png\";","module.exports = \"

Terms

Team Onboard Ltd, International House, 776-778 Barking Road, London, England, E13 9PJ

Summary

Team Onboard ltd (“Team Onboard”) operates the Onboard service, which we hope You (the “Customer”, “You”, or “Your”) use. Any reference to “Onboard” also refers to “Team Onboard ltd”. If You use Onboard, please use it responsibly. If You don’t, we’ll have to terminate Your account.

For paid accounts, you’ll be charged on a monthly basis. You can cancel anytime, but there are no refunds.

You own the business data that you provide to Onboard and You’re responsible for keeping it safe.

The Terms of Service (the “Terms”), the Onboard Service (as defined herin), and our prices can change at any time. We’ll warn you 30 days in advance of any price changes. We’ll try to warn you about major changes to the Terms or Onboard, but we make no guarantees.

So that’s the gist of it, but you must read through the entire below and agree with all the details before you use any of our sites or services (whether or not You have created an account).

You can use these terms too...

We got these terms from Baremetrics, who in turn got them from Heroku, who got them from Google. You’re welcome to use them too under the Creative Commons Attribution 3.0 License. Neither Baremetrics, Inc. nor Heroku, Inc. nor Google, Inc. is connected with, and they do not sponsor, or endorse Onboard or its use of the work.

Your Agreement with Onboard

Your use of the Onboard Service is governed by these Terms. The “Service” means the services Onboard makes available include our web sites (http://Onboardhq.com/), our blog, our API, and any other software, sites, and services offered by Onboard in connection to any of those.

In order to use the Service, You must first agree to the Terms. You understand and agree that Onboard will treat Your use of the Service as acceptance of the Terms from that point onwards.

Onboard may make changes to the Terms from time to time. You may reject the changes by terminating Your account. You understand and agree that if You use the Service after the date on which the Terms have changed, Onboard will treat Your use as acceptance of the updated Terms.

If you have any question about the Terms, please contact us at support@onboardhq.com.

Your Account

You may not use the Service if You are a person barred from receiving the Service under the laws of the United States or other countries, including the country in which You are resident or from which You use the Service.

You may not use the service unless you are over the age of 13.

You must be a human. Account created by automated methods are not permitted.

Use of the Service

You must provide accurate and complete registration information any time You register to use the Service.

You are responsible for the security of Your passwords and for any use of Your account.

Your use of the Service must comply with all applicable laws, regulations and ordinances.

You agree to not engage in any activity that interferes with or disrupts the Service.

Onboard reserves the right to enforce quotas and usage limits (to any resources, including the API) at its sole discretion, with or without notice, which may result in Onboard disabling or throttling Your usage of the Service for any amount of time.

You may not allow multiple people to use the same account or otherwise access the Service in a manner intended to avoid incurring fees.

Service Policies and Privacy

The Service shall be subject to the privacy policy for the Service available at https://onboardhq.com/privacy (the “Privacy Policy”), which are hereby expressly incorporated into the Terms of Service by reference. You agree to the use of Your data in accordance with Onboard’ Privacy Policy.

Fees for Use of the Service

The Service may be provided to You without charge up with certain limits or for a certain “trial” period of time.

Usage over this limit (or after the “trial” period) or requires Your purchase of additional resources or services.

For all purchased resources and services, we will charge Your credit card on a monthly basis.

Payments are non-refundable. There will be no refunds or credits for partial months of service, upgrade/downgrade refunds, or refunds for months unused with an open account.

Charges are solely based on Onboard’s measurements of Your use of the Service, unless otherwise agreed to in writing.

All fees are exclusive of all taxes, levies, or duties imposed by taxing authorities, and You shall be responsible for payment of all such taxes, levies, or duties.

You acknowledge and agree that any credit card and related billing and payment information that You provide to Onboard may be shared by Onboard with companies who work on Onboard’s behalf, such as payment processors and/or credit agencies, solely for the purposes of checking credit, effecting payment to Onboard and servicing Your account.

Onboard may change its fees and payment policies for the Service by notifying You at least thirty (30) days before the beginning of the billing cycle in which such change will take effect.

Cancellation and Termination

You must cancel Your account via support request at http://onboardhq.com using your account email. Any other emails or phone requests to cancel Your account will not be considered a cancellation.

You will not receive any refunds if You cancel Your account.

If You cancel the Service before the end of Your current paid up month, Your cancellation will take effect immediately and You will not be charged again.

You agree that Onboard, in its sole discretion and for any or no reason, may terminate or suspend Your account. You agree that any termination of Your access to the Service may be without prior notice, and You agree that Onboard will not be liable to You or any third party for such termination.

Ideas and Feedback

You may choose to or we may invite You to submit comments or ideas about the Service, including but not limited to ideas about improving the Service or our products (“Ideas”). By submitting any Idea, You agree that Your disclosure is unsolicited and without restriction and will not place Onboard under any fiduciary or other obligation, and that we are free to use the Idea without any additional compensation to You, and/or to disclose the Idea on a non-confidential basis or otherwise to anyone.

Modification of the Service

You acknowledge and agree that the Service may change from time to time without prior notice to You.

Changes include, without limitation, changes to fee and payment policies, security patches, added or removed functionality, and other enhancements or restrictions.

Onboard shall not be liable to you or to any third party for any modification, price change, suspension or discontinuance of the Service.

External Resources

The Service may include hyperlinks to other web sites or content or resources or email content. You acknowledge and agree that Onboard is not responsible for the availability of any such external sites or resources, and does not endorse any advertising, products or other materials on or available from such web sites or resources.

License from Onboard and Restrictions

All of the content available on or through the Service, including without limitation, text, photographs, graphics, logos, trade/service marks, and/or audiovisual content, is owned and/or controlled by Onboard, or other licensors or Service users and is protected, as applicable, by copyright, trademark, trade dress, patent, and trade secret laws, other proprietary rights, and international treaties. You acknowledge that the Service and any underlying technology or software used in connection with the Service contain our proprietary information.

Subject to and conditioned upon Your compliance with these Terms, we grant to you a personal, worldwide, royalty-free, non-assignable and non-exclusive license to use the software provided to You by Onboard as part of the Service as provided to You by Onboard. This license is for the sole purpose of enabling You to use and enjoy the benefit of the Service as provided by Onboard, in the manner permitted by the Terms.

You may not (and You may not permit anyone else to): (a) copy, modify, create a derivative work of, reverse engineer, decompile or otherwise attempt to extract the source code of the Service or any part thereof, unless this is expressly permitted or required by law, or unless You have been specifically told that You may do so by Onboard, in writing (e.g., through an open source software license); or (b) attempt to disable or circumvent any security mechanisms used by the Service.

Open source software licenses for components of the Service released under an open source license constitute separate written agreements. To the limited extent that the open source software licenses expressly supersede these Terms, the open source licenses govern Your agreement with Onboard for the use of the components of the Service released under an open source license.

You may not use the Service in any manner that could damage, disable, overburden or impair our servers or networks, or interfere with any other users’ use or enjoyment of the Service.

You may not attempt to gain unauthorized access to any of the Service, member accounts, or computer systems or networks, through hacking, password mining or any other means.

Without limiting anything else contained herein, You agree that You shall not (and You agree not to allow any third party to):

remove any notices of copyright, trademark or other proprietary rights contained in/on or accessible through the Service or in any content or other material obtained via the Service;

use any robot, spider, website search/retrieval application, or other automated device, process or means to access, retrieve or index any portion of the Service;

reformat or frame any portion of the web pages that are part of the Service;

use the Service for commercial purposes not permitted under these Terms;

create user accounts by automated means or under false or fraudulent pretenses;

attempt to defeat any security or verification measure relating to the Service;

provide or use tracking or monitoring functionality in connection with the Service, including, without limitation, to identify other users’ actions or activities;

impersonate or attempt to impersonate Onboard or any employee, contractor or associate of Onboard, or any other person or entity; or

collect or store personal data about other users in connection with the prohibited activities described in this paragraph.

Our Copyright Dispute Policy

Onboard respects the intellectual property of others and requires that our users do the same. It is our policy to terminate the membership of repeat infringers. If You believe that material or content residing on or accessible through the Service infringes a copyright, please send a notice of copyright infringement containing the following information to the Designated Copyright Agent listed below:

identification of the copyrighted work claimed to have been infringed, or, if multiple copyrighted works are covered by a single notification, a representative list of such works;

identification of the claimed infringing material and information reasonably sufficient to permit us to locate the material on the Onboard Service (providing the URL(s) of the claimed infringing material satisfies this requirement);

information reasonably sufficient to permit us to contact You, such as an address, telephone number, and an email address;

a statement by You that You have a good faith belief that the disputed use is not authorized by the copyright owner, its agent, or the law;

a statement by You, made under penalty of perjury, that the above information in Your notification is accurate and that You are the copyright owner or are authorized to act on the copyright owner’s behalf; and

your physical or electronic signature.

Our Designated Copyright Agent for notification of claimed infringement can be reached at Onboard, Attn: Copyright Officer, One Euston Square, 40 Melton Street, London NW1 2FD, support@onboardhq.com

Links to Other Websites

The Service may contain advertisements and/or links to other websites (“Third Party Sites”). Onboard does not endorse, sanction or verify the accuracy or ownership of the information contained in/on any Third Party Site or any products or services advertised on Third Party Sites. If You decide to leave the Site and navigate to Third Party Sites, or install any software or download content from any such Third Party Sites, You do so at Your own risk. Once You access a Third Party Site through a link on our Site, You may no longer be protected by these Terms of Service and You may be subject to the terms and conditions of such Third Party Site. You should review the applicable policies, including privacy and data gathering practices, of any Third Party Site to which You navigate from the Site, or relating to any software You use or install from a Third Party Site. Concerns regarding a Third Party Site should be directed to the Third Party Site itself. Onboard bears no responsibility for any action associated with any Third Party Site.

Disclaimer of Warranties

IF YOU ACCESS THE SERVICE, YOU DO SO AT YOUR OWN RISK. WE PROVIDE THE SERVICE “AS IS”, “WITH ALL FAULTS” AND “AS AVAILABLE.” WE MAKE NO EXPRESS OR IMPLIED WARRANTIES OR GUARANTEES ABOUT THE SERVICE. TO THE MAXIMUM EXTENT PERMITTED BY LAW, WE HEREBY DISCLAIM ALL SUCH WARRANTIES, INCLUDING ALL STATUTORY WARRANTIES, WITH RESPECT TO THE SERVICE, INCLUDING WITHOUT LIMITATION ANY WARRANTIES THAT THE SERVICE IS MERCHANTABLE, OF SATISFACTORY QUALITY, ACCURATE, FIT FOR A PARTICULAR PURPOSE OR NEED, OR NON-INFRINGING. WE DO NOT GUARANTEE THAT THE RESULTS THAT MAY BE OBTAINED FROM THE USE OF THE SERVICE WILL BE EFFECTIVE, RELIABLE OR ACCURATE OR WILL MEET YOUR REQUIREMENTS. WE DO NOT GUARANTEE THAT YOU WILL BE ABLE TO ACCESS OR USE THE SERVICE (EITHER DIRECTLY OR THROUGH THIRD-PARTY NETWORKS) AT TIMES OR LOCATIONS OF YOUR CHOOSING. WE ARE NOT RESPONSIBLE FOR THE ACCURACY, RELIABILITY, TIMELINESS OR COMPLETENESS OF INFORMATION PROVIDED BY ANY OTHER USERS OF THE SERVICE OR ANY OTHER DATA OR INFORMATION PROVIDED OR RECEIVED THROUGH THE SERVICE. EXCEPT AS EXPRESSLY SET FORTH HEREIN, Onboard MAKES NO WARRANTIES ABOUT THE INFORMATION SYSTEMS, SOFTWARE AND FUNCTIONS MADE ACCESSIBLE BY OR THROUGH THE SERVICE OR ANY SECURITY ASSOCIATED WITH THE TRANSMISSION OF SENSITIVE INFORMATION. Onboard DOES NOT WARRANT THAT THE SERVICE WILL OPERATE ERROR-FREE, THAT ERRORS IN THE SERVICE WILL BE FIXED, THAT LOSS OF DATA WILL NOT OCCUR, OR THAT THE SERVICE OR SOFTWARE ARE FREE OF COMPUTER VIRUSES, CONTAMINANTS OR OTHER HARMFUL ITEMS. UNDER NO CIRCUMSTANCES WILL Onboard, ANY OF OUR AFFILIATES, DISTRIBUTORS, PARTNERS, LICENSORS, AND/OR ANY OF OUR OR THEIR DIRECTORS, OFFICERS, EMPLOYEES, CONSULTANTS, AGENTS, OR OTHER REPRESENTATIVES BE LIABLE FOR ANY LOSS OR DAMAGE CAUSED BY YOUR RELIANCE ON INFORMATION OBTAINED THROUGH THE SERVICE.

Limitations on Liability

YOUR SOLE AND EXCLUSIVE REMEDY FOR ANY DISPUTE WITH US IS THE CANCELLATION OF YOUR REGISTRATION. IN NO EVENT SHALL OUR TOTAL CUMULATIVE LIABILITY TO YOU FOR ANY AND ALL CLAIMS RELATING TO OR ARISING OUT OF YOUR USE OF THE SERVICE, REGARDLESS OF THE FORM OF ACTION, EXCEED THE GREATER OF: (A) THE TOTAL AMOUNT OF FEES, IF ANY, THAT YOU PAID TO UTILIZE THE SERVICE OR (B) ONE HUNDRED DOLLARS ($100). IN NO EVENT SHALL WE BE LIABLE TO YOU (OR TO ANY THIRD PARTY CLAIMING UNDER OR THROUGH YOU) FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES OR ANY BODILY INJURY, EMOTIONAL DISTRESS, DEATH OR ANY OTHER DAMAGES ARISING FROM YOUR USE OF OR INABILITY TO USE THE SERVICE, WHETHER ON-LINE OR OFF-LINE, OR OTHERWISE IN CONNECTION WITH THE SERVICE. THESE EXCLUSIONS APPLY TO ANY CLAIMS FOR LOST PROFITS, LOST DATA, LOSS OF GOODWILL OR BUSINESS REPUTATION, COST OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, ANY OTHER COMMERCIAL DAMAGES OR LOSSES, OR ANY PERSONAL INJURY OR PROPERTY DAMAGES, EVEN IF WE KNEW OR SHOULD HAVE KNOWN OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME STATES OR JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR THE LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, IN SUCH STATES OR JURISDICTIONS, OUR LIABILITY SHALL BE LIMITED TO THE EXTENT PERMITTED BY LAW. IF YOU ARE A CALIFORNIA RESIDENT, YOU WAIVE YOUR RIGHTS WITH RESPECT TO CALIFORNIA CIVIL CODE SECTION 1542, WHICH SAYS “A GENERAL RELEASE DOES NOT EXTEND TO CLAIMS WHICH THE CREDITOR DOES NOT KNOW OR SUSPECT TO EXIST IN HIS FAVOR AT THE TIME OF EXECUTING THE RELEASE, WHICH, IF KNOWN BY HIM MUST HAVE MATERIALLY AFFECTED HIS SETTLEMENT WITH THE DEBTOR.”

Indemnification

You agree to hold harmless and indemnify Onboard, and its subsidiaries, affiliates, officers, agents, employees, advertisers, licensors, suppliers or partners from and against any third party claim arising from or in any way related to (a) Your breach of the Terms, (b) Your use of the Service, or (c) Your violation of applicable laws, rules or regulations in connection with the Service, including any liability or expense arising from all claims, losses, damages (actual and consequential), suits, judgments, litigation costs and attorneys’ fees, of every kind and nature. In such a case, Onboard will provide You with written notice of such claim, suit or action.

Choice of Law and Dispute Resolution

The Terms of Service shall be deemed to have been entered into and shall be construed and enforced in accordance with the laws of the State of Alabama as applied to contracts made and performed entirely within Alabama, without giving effect to any conflicts of law statutes. Any controversy, dispute or claim arising out of or related to the Terms, the Privacy Policy or the Service shall be settled by final and binding arbitration to be conducted by an arbitration tribunal in the State of Alabama and the County of Shelby, pursuant to the rules of the American Arbitration Association. Any and all disputes that You may have with Onboard shall be resolved individually, without resort to any form of class action.

General Legal Terms

The Terms, including the Privacy Policy, constitute the whole legal agreement between You and Onboard and govern Your use of the Service and completely replace any prior agreements between You and Onboard in relation to the Service.

If any part of the Terms is held invalid or unenforceable, that portion shall be construed in a manner consistent with applicable law to reflect, as nearly as possible, the original intentions of the parties, and the remaining portions shall remain in full force and effect.

The failure of Onboard to exercise or enforce any right or provision of the Terms shall not constitute a waiver of such right or provision. The failure of either party to exercise in any respect any right provided for herein shall not be deemed a waiver of any further rights hereunder.

You agree that if Onboard does not exercise or enforce any legal right or remedy which is contained in the Terms (or which Onboard has the benefit of under any applicable law), this will not be taken to be a formal waiver of Onboard’s rights and that those rights or remedies will still be available to Onboard.

Onboard shall not be liable for failing or delaying performance of its obligations resulting from any condition beyond its reasonable control, including but not limited to, governmental action, acts of terrorism, earthquake, fire, flood or other acts of God, labor conditions, power failures, and Internet disturbances.

We may assign this contract at any time to any parent, subsidiary, or any affiliated company, or as part of the sale to, merger with, or other transfer of our company to another entity.

\";","export const momentTime = () => (input, small) => {\n const format = small\n ? \"HH:mm on MMM Do (UTC)\"\n : \"HH:mm on MMMM Do YYYY (UTC)\";\n return momentFormat()(input, format);\n};\n\nexport const momentFormat = () => (input, format) =>\n moment(input * 1000).format(format);\n","export const $opportunitiesCount = ($http, $q, $opportunitiesAvailable) => {\n var opCount = {};\n\n opCount.all = function () {\n var url = '/api/opportunities/count';\n return $q(function (resolve) {\n $http.get(url).then(function (result) {\n var progress = {};\n _.each(result.data, function (count, type) {\n var convertedType = $opportunitiesAvailable.convertType(type);\n progress[convertedType] = count;\n });\n resolve(progress);\n });\n });\n };\n\n return opCount;\n};\n\n$opportunitiesCount.$inject = ['$http', '$q', '$opportunitiesAvailable'];","function buildValues(number, type, immediately, now) {\n var values = _.times(number, function(i) {\n i++;\n var unit = i == 1 ? \" day \" : \" days \";\n var result = { value: { value: i, type: type }, text: i + unit + type };\n if (now) result.value.now = now;\n return result;\n });\n if (immediately) {\n values.unshift({\n value: { value: 0, type: type },\n text: \"immediately \" + type\n });\n }\n return values;\n}\n\nexport const $targetingOptions = () => {\n var options = {\n trial_start_after: {\n options: buildValues(30, \"after\", true),\n defaultIndex: 0,\n description: \"a customer signs up for a trial\",\n shortDescription: \"a customer signs up for a trial\"\n },\n trial_will_end_before: {\n options: buildValues(30, \"before\", false, \"{{customer.trial_end}}\"),\n defaultIndex: 3,\n description: \"a customer's trial ends\",\n shortDescription: \"a customer's trial ends\"\n },\n trial_expired_after: {\n options: buildValues(30, \"after\", true),\n defaultIndex: 0,\n description: \"a customer's trial expires\",\n shortDescription: \"a customer's trial expires\"\n },\n welcome_after: {\n options: buildValues(30, \"after\", true),\n defaultIndex: 0,\n description: \"a customer purchases a paid subscription\",\n shortDescription: \"a customer purchases a subscription\"\n },\n pre_dunning_before: {\n options: buildValues(\n 30,\n \"before\",\n false,\n \"{{customer.current_period_end}}\"\n ),\n defaultIndex: 13,\n description: \"a customer's next payment is due\",\n shortDescription: \"a customer's next payment is due\"\n },\n dunning_after: {\n options: buildValues(30, \"after\", true),\n defaultIndex: 0,\n description: \"a customer's payment fails\",\n shortDescription: \"a customer's payment fails\"\n },\n invoice_receipt_after: {\n options: buildValues(30, \"after\", true),\n defaultIndex: 0,\n description: \"a customer's invoice is paid\",\n shortDescription: \"a customer's invoice is paid\"\n },\n charge_succeeded_after: {\n options: buildValues(30, \"after\", true),\n defaultIndex: 0,\n description: \"a customer's charge is paid\",\n shortDescription: \"a customer's charge is paid\"\n },\n renewed_after: {\n options: buildValues(30, \"after\", true),\n defaultIndex: 0,\n description: \"a customer's subscription renews\",\n shortDescription: \"a customer's subscription renews\"\n },\n renewed_before: {\n options: buildValues(\n 30,\n \"before\",\n false,\n \"{{customer.current_period_end}}\"\n ),\n defaultIndex: 0,\n description: \"a customer's subscription renews\",\n shortDescription: \"a customer's subscription renews\"\n },\n upgrade_downgrade_after: {\n options: buildValues(30, \"after\", true),\n defaultIndex: 0,\n description: \"a customer's plan changes\",\n shortDescription: \"a customer's plan changes\"\n },\n card_updated_after: {\n options: buildValues(30, \"after\", true),\n defaultIndex: 0,\n description: \"a customer's card is updated\",\n shortDescription: \"a customer's card is updated\"\n },\n cancellation_recovery_after: {\n options: buildValues(30, \"after\", true),\n defaultIndex: 0,\n description: \"a customer cancels their subscription\",\n shortDescription: \"a customer cancels their subscription\"\n },\n subscription_will_end_before: {\n options: buildValues(\n 30,\n \"before\",\n false,\n \"{{customer.current_period_end}}\"\n ),\n defaultIndex: 0,\n description: \"a customer cancels their subscription\",\n shortDescription: \"a customer cancels their subscription\"\n },\n checkout_completed_after: {\n options: buildValues(30, \"after\", true),\n defaultIndex: 0,\n description: \"a customer's completes checkout\",\n shortDescription: \"a customer's completes checkout\"\n }\n };\n\n return {\n options,\n get: function(key) {\n return this.options[key];\n },\n getDefault: function(opportunityType) {\n const _options = this.options[opportunityType];\n return _options.options[_options.defaultIndex];\n },\n getDescription: function(key) {\n return this.options[key].description;\n },\n getSelectedOption: function(opportunityType, value) {\n var fetchedOptions = this.get(opportunityType).options;\n var selectedOption;\n fetchedOptions.forEach(function(option) {\n if (selectedOption) return selectedOption;\n if (angular.equals(option.value, value)) selectedOption = option.value;\n });\n return (\n selectedOption ||\n fetchedOptions[this.options[opportunityType].defaultIndex].value\n );\n },\n getSelectedOptionText: function(opportunityType, value) {\n var fetchedOptions = this.get(opportunityType).options;\n var selectedOption;\n fetchedOptions.forEach(function(option) {\n if (selectedOption) return selectedOption;\n if (angular.equals(option.value, value)) selectedOption = option.text;\n });\n return (\n selectedOption ||\n fetchedOptions[this.options[opportunityType].defaultIndex].text\n );\n }\n };\n};\n","import { Base64 } from 'js-base64/base64';\n\nexport const $analyticsManager = ($q, analyticQueueItem, analyticQueue) => {\n var manager = {\n queues: {}\n };\n\n var removeQueue = function (key) {\n // just deletes the queue from this instance\n return delete manager.queues[key];\n };\n\n function getQueue (key, options) {\n // get queue or create a new one\n var queue = manager.queues[key];\n if (!queue) {\n queue = analyticQueue(options);\n // remove queue once complete\n queue.onComplete(function () {\n removeQueue(key);\n });\n manager.queues[key] = queue;\n }\n return queue;\n }\n\n manager.generateKey = function () {\n // build a key so we can keep track of simular calls\n // eg: \"{\"0\":{\"method\":\"request\",\"id\":\"1\",\"type\":\"flows\"}\"\n return Base64.encode(JSON.stringify(arguments));\n \n };\n\n manager.request = function (options) {\n // options = {type , id , params , method *optional*, metric }\n\n // resolve call to be made for a given metric\n // email_deliveries for flow is a 'request'\n options = _.extend({method: 'requestHelper'}, options);\n\n // generate key to easly match simular requests together and queue them\n var queueKey = manager.generateKey(options);\n\n // use key to get analyticQueue or create one\n var currentQueue = getQueue(queueKey, options);\n\n // build promise for every request, so we can trigger them all at once when the first request completes\n var currentItem = analyticQueueItem(options.metric, options.type, options.id, options.params);\n\n // add item to currentQueue. this will send a request if its the first.\n // if not it'll wait for the first to complete then pass the result to it.\n currentQueue.add(currentItem);\n\n return $q(function (resolve, reject) {\n currentItem.defer.promise.then(function (queuedResponse) {\n // get required data from the response\n // return time of serverside request (for pusher)\n var response = {time: queuedResponse.time};\n response.data = (currentItem.metric) ? queuedResponse[currentItem.metric] : queuedResponse;\n resolve(response);\n }, function (reason) {\n reject(reason);\n });\n });\n };\n\n return manager;\n};\n\n$analyticsManager.$inject = ['$q', 'analyticQueueItem', 'analyticQueue'];\n","const { enableBodyScroll, disableBodyScroll, clearAllBodyScrollLocks } = bodyScrollLock;\n\nexport const ScrollLock = function($timeout) {\n\n function _ScrollLock(targetElementSelector) {\n\n const api = {\n targetElementSelector: targetElementSelector,\n targetElement: null,\n };\n\n api.on = () => {\n api.targetElement = document.querySelector(api.targetElementSelector);\n if (!api.targetElement) {\n return $timeout(() => api.on(), 150);\n }\n disableBodyScroll(api.targetElement);\n }\n\n api.off = event => {\n if (event) {\n let targetClass = event.target.classList.value;\n if (![\"dismiss-standard\"].includes(targetClass)) return false;\n }\n enableBodyScroll(api.targetElement);\n };\n\n api.clear = () => {\n clearAllBodyScrollLocks();\n }\n\n return api;\n }\n\n return _ScrollLock;\n\n};\n\nScrollLock.$inject = ['$timeout'];","export const tickboxesFactory = () => (available, item_id) => {\n return {\n tickboxes: available,\n\n targetAll: true,\n setSelected: function(comparison) {\n if (!_.isArray(available) || available.length === 0) return;\n this.tickboxes = available.map(function(item) {\n item.selected = comparison && _.contains(comparison, item[item_id]);\n return item;\n });\n this.targetAll = !comparison || comparison.length === 0;\n },\n\n onChangeTargetAll: function() {\n this.deselectAll();\n this.targetAll = true;\n // if (this.targetAll)\n // if (!this.targetAll && this.tickboxes.length < 1) this.targetAll = true;\n },\n\n deselectAll: function() {\n angular.forEach(this.tickboxes, function(item) {\n item.selected = false;\n });\n },\n\n deselectTargetAll: function() {\n angular.forEach(\n this.tickboxes,\n function(item) {\n if (item.selected) this.targetAll = false;\n }.bind(this)\n );\n },\n\n getTargetedIds: function() {\n var targetedIds = this.tickboxes.reduce(function(array, item) {\n if (item.selected) array.push(item[item_id]);\n return array;\n }, []);\n return targetedIds.length > 0 ? targetedIds : [];\n }\n };\n};\n\ntickboxesFactory.$inject = [];\n","export const AnalyticQueue = ($analyticsResource) => {\n function _AnalyticQueue (callOptions, onComplete) {\n // all data items will make the same api call.\n // so we make the call once and give the response to each datum\n // --------------\n // this exists because the front end was making 3 calls per flow in flow index, usually all at the same time.\n // one will do k thankz bye\n\n var queue = {\n callOptions: callOptions,\n data: [],\n complete: onComplete\n };\n\n queue.onComplete = function (callback) {\n queue.complete = callback;\n };\n\n queue.add = function (item) {\n queue.data.push(item);\n // if the first item in data\n if (queue.data.length === 1) {\n queue.resolve();\n }\n };\n\n queue.resolve = function () {\n // make direct api call, then return response to all queue items\n var method = callOptions.method;\n var options = _.omit(callOptions, ['method']);\n\n var promise = $analyticsResource[method](options);\n\n // analyticsResource will also cache duplicate calls\n promise.then(function (response) {\n angular.forEach(queue.data, function (item) {\n item.defer.resolve(response);\n });\n if (queue.complete) queue.complete();\n }, function (reason) {\n angular.forEach(queue.data, function (item) {\n item.defer.reject(reason);\n });\n if (queue.complete) queue.complete();\n });\n };\n\n return queue;\n }\n\n return _AnalyticQueue;\n};\n\nAnalyticQueue.$inject = ['$analyticsResource'];","export const percentageCircle = (gradedColorClassFilter) => {\n return {\n restrict: 'E',\n require: ['^analytics'],\n scope: {},\n template: `\n \n \n \n \n `,\n bindToController:{ typeA:'@', typeB: '@', label:'@', unit: '@', period: '=', target: '=' },\n controller: function () {\n\n this.valueA = null;\n this.valueB = null;\n this.value = null;\n\n this.resolveValues = function (period) {\n this.service.resolve(period).then(function(response){\n this.valueA = response[this.typeA];\n this.valueB = response[this.typeB];\n this.value = this.valueA / this.valueB;\n }.bind(this));\n };\n },\n controllerAs:'ctrl',\n\n link: function(scope, element, attrs, ctrls){\n var analytics = ctrls[0];\n scope.ctrl.service = analytics.service();\n scope.ctrl.resolveValues(scope.ctrl.period);\n scope.currency = analytics._currency;\n\n scope.$watch('ctrl.period', function (newV, oldV) {\n if (oldV != newV) scope.ctrl.resolveValues(scope.ctrl.period);\n }, true);\n\n var renderSVG = function() {\n var val = scope.ctrl.value * 100;\n var $circle = $(element).find(\".bar\");\n\n if (isNaN(val)) {\n val = 0;\n } else {\n\n var r = $circle.attr('r');\n var c = Math.PI*(r*2);\n if (val < 0) { val = 0;}\n if (val > 100) { val = 100;}\n var pct = ((100-val)/100)*c;\n $circle.css({ strokeDashoffset: pct});\n }\n\n var klass = gradedColorClassFilter(scope.ctrl.value, scope.ctrl.target);\n $(element).find('.percentage-circle.' + scope.ctrl.typeA).find('.bar').addClass(klass);\n\n };\n\n scope.$watch('ctrl.value', function (newV, oldV) {\n if (oldV != newV) renderSVG();\n }, true);\n\n }\n\n };\n};\n\npercentageCircle.$inject = ['gradedColorClassFilter'];\n ","export const callout = ($timeout, $compile) => {\n\n return {\n restrict: 'A',\n scope: {\n callout: '@',\n calloutDirection: '@',\n calloutBehaviour: '@',\n calloutEnabled: '=',\n },\n link: function (scope, element) {\n\n scope.calloutDirection = scope.calloutDirection || 'bottom';\n scope.show = false;\n scope.isDisabled = null;\n var template = \"
\";\n\n var input = element.find('> [ng-disabled]');\n\n $timeout(function() {\n var calloutElement = $compile(template)(scope);\n element.append(calloutElement);\n });\n\n scope.$watch(function() {\n return input.attr('disabled');\n }, function(disabled){\n scope.isDisabled = !!disabled;\n });\n\n const setEnabled = (newVal) => {\n if (!scope.calloutEnabled && typeof scope.calloutEnabled != \"boolean\") {\n scope.enabled = true;\n } else {\n scope.enabled = scope.calloutEnabled;\n }\n }\n scope.$watch('calloutEnabled', setEnabled);\n\n setEnabled();\n\n if (scope.calloutBehaviour === 'disabled hover') {\n $(element).hover(function(){\n $timeout(function() { scope.show = scope.isDisabled; });\n }, function(){\n $timeout(function() { scope.show = false; });\n });\n }\n\n if (scope.calloutBehaviour === 'hover') {\n $(element).hover(function(){\n $timeout(function() { scope.show = scope.enabled; });\n }, function(){\n $timeout(function() { scope.show = false; });\n });\n }\n\n if (scope.calloutBehaviour === 'disabled click') {\n var timer;\n $(element).click(function(){\n $timeout.cancel(timer);\n $timeout(function() {\n scope.show = scope.isDisabled;\n timer = $timeout(function() { scope.show = false; }, 1500);\n });\n });\n }\n \n if (scope.calloutBehaviour === 'click') {\n var timer;\n $(element).click(function(){\n $timeout.cancel(timer);\n $timeout(function() {\n scope.show = scope.enabled;\n timer = $timeout(function() { scope.show = false; }, 1500);\n });\n });\n }\n\n }\n };\n};\n\ncallout.$inject = ['$timeout', '$compile'];","export const stripeCard = ($resourceManager, $q, $timeout) => {\n\n return {\n restrict: 'E',\n scope: {\n type: '@'\n },\n template: `\n
\n
\n
\n
\n \n Confirm\n \n
\n
`,\n link: function (scope, element) {\n\n\n var stripe = Stripe(__STRIPE_PUBLISHABLE_KEY);\n var elements = stripe.elements();\n scope._token = null;\n\n scope.complete = false;\n scope.loading = false;\n\n scope.card = elements.create('card');\n\n scope.card.mount($('.card-element', element)[0]);\n\n element.on('submit', function (event) {\n event.preventDefault();\n setupIntent()\n .then(authenticatePayment)\n .then(subscribe)\n .then(refreshPage)\n .catch(error => {\n if (error && error.message) {\n var errorElement = $('.card-errors', element)[0];\n errorElement.textContent = error.message;\n }\n scope.loading = false;\n scope.complete = false;\n });\n });\n\n const refreshPage = () => {\n scope.complete = true;\n $timeout(() => {\n const param = (scope.type == \"create\") ? \"?subscribed=true\" : \"\";\n window.location.href = `${window.location.href}${param}`;\n }, 1500)\n };\n\n const setupIntent = token => {\n scope.loading = true;\n return $q((resolve, reject) => {\n $resourceManager.request('users', 'setup_intent', {id: 'current'}).then(resolve);\n });\n }\n \n const authenticatePayment = intent => {\n return $q((resolve, reject) => {\n scope.intent = intent;\n stripe.handleCardSetup(intent.client_secret, scope.card).then(result => {\n if (result.error) {\n reject(result.error)\n } else {\n resolve();\n }\n });\n });\n }\n\n const subscribe = () => {\n return $q((resolve, reject) => {\n $resourceManager.request('users', 'subscribe', {id: 'current'}, {intent_id: scope.intent.id}).then(resolve);\n })\n }\n\n }\n };\n};\n\nstripeCard.$inject = ['$resourceManager', '$q', '$timeout'];","import \"./app.scss\";\n\nclass _Controller {\n constructor(\n UserService,\n Auth,\n $location,\n $meta,\n $notifier,\n $timeout,\n $availablePlans,\n $currentSender,\n $resourceManager,\n $availableProducts\n ) {\n this.Auth = Auth;\n this.$location = $location;\n this.$meta = $meta;\n this.$notifier = $notifier;\n this.$timeout = $timeout;\n this.$resourceManager = $resourceManager;\n\n $currentSender.initialize();\n $availablePlans.initialize();\n $availableProducts.initialize();\n\n this.UserService = UserService;\n this.user = UserService.user;\n this.subscribedState = null;\n this.subscription = {};\n this.customer = false;\n\n this.isDevelopment = __RAILS_ENV === \"development\";\n try {\n this.redirectURI = __STRIPE_REDIRECT_URI || \"\";\n } catch (e) {\n this.redirectURI = \"\";\n }\n\n this.banners = [];\n\n this.bannerTypes = [\n {\n id: \"subscribed\",\n type: \"positive\",\n text: \"Success! Thank you for subscribing to Onboard.\"\n },\n {\n id: \"subscribeFailed\",\n type: \"error\",\n text:\n \"Sorry, an error occurred. Please try again or contact support@onboardhq.com.\"\n },\n {\n id: \"emailsWillPause\",\n type: \"warning\",\n text:\n \"Emails will pause on {{ $ctrl.subscription.current_period_end * 1000 | date: 'MMMM dd, yyyy'}}. Re-subscribe to keep sending...\"\n },\n {\n id: \"trialExpired\",\n type: \"warning\",\n text:\n \"We've paused emails because your trial has expired. Add payment details to reactivate emails.\"\n },\n {\n id: \"paymentFailed\",\n type: \"warning\",\n text:\n \"We've had to pause emails because your recent payment to us failed. Update payment details to reactivate emails.\"\n },\n {\n id: \"subscriptionExpired\",\n type: \"warning\",\n text:\n \"We've had to pause emails because your subscription expired. Update payment details to reactivate emails.\"\n },\n {\n id: \"alreadyConnected\",\n type: \"error\",\n text:\n \"Sorry, this Stripe account is already connected to another Onboard account. Please try again or contact support@onboardhq.com.\"\n },\n {\n id: \"refusedConnection\",\n type: \"error\",\n text:\n \"You didn't give us access to your Stripe account. Please try again or contact support@onboardhq.com for more details on why we need it.\"\n }\n ];\n }\n\n $onInit() {\n let { subscribed, error } = this.$location.search();\n if (typeof subscribed !== \"undefined\") {\n if (subscribed == \"true\" || subscribed === true) {\n this.showBanner(\"subscribed\");\n } else {\n this.showBanner(\"subscribeFailed\");\n }\n }\n\n if (error === \"provider_taken\") this.showBanner(\"alreadyConnected\");\n if (error === \"access_denied\") this.showBanner(\"refusedConnection\");\n\n Promise.all([\n this.$resourceManager.request(\"users\", \"subscription\", { id: \"current\" }),\n this.$resourceManager.request(\"users\", \"customer\", { id: \"current\" })\n ]).then(([subscription, customer]) => {\n this.$timeout(() => {\n this.subscription = subscription.id ? subscription : false;\n this.customer = customer.id ? customer : false;\n this.daysUntilExpiry = this.calculateDaysUntilExpiry();\n\n if (\n [\"active\", \"trialing\"].includes(this.subscription.status) &&\n this.subscription.cancel_at_period_end\n )\n this.showBanner(\"emailsWillPause\");\n\n if (\n this.subscription.status == \"trialing\" &&\n this.daysUntilExpiry < 5 &&\n !this.customer.invoice_settings.default_payment_method\n )\n this.showBanner(\"trialWillEnd\");\n\n if (\n this.subscription.status == \"past_due\" &&\n this.subscription.trial_end == this.subscription.current_period_start\n )\n this.showBanner(\"trialExpired\");\n\n if (\n this.subscription.status == \"past_due\" &&\n this.subscription.trial_end != this.subscription.current_period_start\n )\n this.showBanner(\"paymentFailed\");\n\n if (this.subscription === false) this.showBanner(\"subscriptionExpired\");\n });\n });\n\n this.$timeout(() => {\n var drift = drift || null;\n if (!!drift) {\n drift.identify(\"USER-\" + this.user.id, {\n email: this.user.email\n });\n }\n }, 100);\n }\n\n showBanner(id) {\n const banner = _.findWhere(this.bannerTypes, { id });\n if (!!banner) {\n this.banners.unshift(banner);\n }\n }\n\n removeBanner(id) {\n let idx;\n for (let i = 0; i < this.banners.length; i++) {\n if (this.banners[i].id === id) idx = i;\n }\n this.banners.splice(idx, 1);\n }\n\n calculateDaysUntilExpiry() {\n var calculated = parseInt(\n (this.subscription.trial_end * 1000 - Date.now()) / (24 * 3600 * 1000)\n );\n return calculated < 0 ? -1 : calculated;\n }\n\n onError(error) {\n this.error = error;\n this.$notifier.red(\"Error.\");\n }\n\n clearSubscribedState() {\n this.subscribedState = null;\n }\n\n clearErrorState() {\n this.error = null;\n }\n\n logout() {\n this.Auth.logout({ headers: { \"X-HTTP-Method-Override\": \"DELETE\" } }).then(\n () => {\n this.UserService.reset();\n // drift.reset();\n this.$timeout(() => {\n window.location = window.location.origin;\n }, 750);\n },\n error => {\n if (error.status == 306) {\n document.location.href = \"/admin\";\n }\n }\n );\n }\n}\n\n_Controller.$inject = [\n \"UserService\",\n \"Auth\",\n \"$location\",\n \"$meta\",\n \"$notifier\",\n \"$timeout\",\n \"$availablePlans\",\n \"$currentSender\",\n \"$resourceManager\",\n \"$availableProducts\"\n];\n\nexport const app = {\n controller: _Controller,\n template: require(\"./app.html\")\n};\n","export const perCent = function() {\n return function(text, skipSpan) {\n if (!_.isFinite(text) || _.isNaN(text) || _.isUndefined(text) || _.isNull(text)) return \"—\";\n var value = text * 100;\n var characteristic = value.toString().match(/([0-9]{1,})/)[0];\n\n var decimals = 3 - ((characteristic.length > 3) ? 3 : characteristic.length);\n\n var result = parseFloat(value).toFixed(decimals);\n\n if (skipSpan) {\n return result;\n } else {\n return result + '%';\n }\n };\n};\n","export const targetingSummary = function($availablePlans, $availableProducts) {\n return function(items, type) {\n if (!items || items.length === 0) {\n if (type === \"plan\") {\n return \"any subscription plan\";\n }\n\n return \"any product\";\n }\n\n const available =\n type === \"plan\" ? $availablePlans.items : $availableProducts.items;\n\n const names = _.chain(items)\n .map(item => _.findWhere(available, { [`${type}_id`]: item }))\n .reject(_.isUndefined)\n .map(item => item[`${type}_name`])\n .value();\n\n return names.join(\", \").replace(/\\, ([^, ]*)$/, \" or \" + \"$1\");\n };\n};\n\ntargetingSummary.$inject = [\"$availablePlans\", \"$availableProducts\"];\n","import promiseMinTimeout from \"../../global/utils/promiseMinTimeout\";\n\nclass _Controller {\n\n constructor ($resourceManager, $notifier, $location, $opportunitiesAvailable, $message, $timeout) {\n this.$resourceManager = $resourceManager;\n this.$message = $message;\n this.$notifier = $notifier;\n this.$location = $location;\n this.$timeout = $timeout;\n this.$opportunitiesAvailable = $opportunitiesAvailable;\n this.opportunities = $opportunitiesAvailable.list();\n this.messages = [];\n this.messageType = $location.search().opportunity_type || 'welcome';\n this.loaded = false;\n this.submittedCreate = false;\n this.completeCreate = false;\n this.triggerFilter = null;\n }\n\n buildMessageCounts () {\n return _.reduce(this.opportunities, (object, opportunity) => {\n object[opportunity.id] = _.where(this.messages, {opportunity_type: opportunity.id}).length;\n return object;\n }, {});\n }\n\n $onInit() {\n this.getMessages({}); \n }\n\n getMessages(params) {\n const promise = this.$resourceManager.request('messages', 'query', params);\n promiseMinTimeout(promise, 500).then(response => {\n this.$timeout(() => {\n angular.copy(response.messages, this.messages);\n this.messageCounts = this.buildMessageCounts();\n this.loaded = true;\n this.processing = false;\n });\n });\n }\n\n setMessageType(opportunityType) {\n this.$location.search('opportunity_type', opportunityType);\n this.messageType = opportunityType;\n }\n\n setFilter(value) {\n if (value) {\n this.triggerFilter = value;\n this.processing = true;\n this.getMessages({opportunity_type: value});\n }\n }\n \n clearFilter() {\n this.processing = true;\n this.triggerFilter = null;\n this.getMessages({});\n }\n\n // createMessage(opportunityType) {\n // this.$location.path('/automations/new').search({type: opportunityType});\n // }\n\n createAutomation() {\n this.$message.new().then(() => {\n this.submittedCreate = true;\n const creationPromise = this.$message.saveNew();\n promiseMinTimeout(creationPromise, 500).then(response => {\n this.$timeout(() => {\n this.$location.path('/automations/' + response.message.id, false).search({});\n }, 300)\n });\n });\n }\n\n onDeleteSuccess(message) {\n this.messages.splice(this.messages.indexOf(message), 1);\n this.$notifier.green('Deleted.');\n this.messageCounts = this.buildMessageCounts();\n }\n\n deleteMessage(message) {\n if(confirm('Are you sure you want to delete this automation?')) {\n this.$resourceManager.request('messages', 'delete', {id: message.id}).then(() => {\n this.onDeleteSuccess(message);\n });\n }\n }\n\n activateMessage(message) {\n if (confirm('Are you sure you want to activate this email automation?')) {\n this.$resourceManager.request('messages', 'start', {id: message.id}).then(function() {\n message.activated = true;\n });\n }\n }\n\n deactivateMessage(message) {\n if (confirm('Are you sure you want to stop this automation from sending?')) {\n this.$resourceManager.request('messages', 'stop', {id: message.id}).then(function() {\n message.activated = false;\n });\n }\n }\n\n duplicateMessage(message) {\n if(confirm('Are you sure you want to duplicate this automation?')) {\n this.$resourceManager.request('messages', 'duplicate', {id: message.id}).then(response => {\n this.$location.path(\"/automations/\" + response.message.id);\n });\n }\n }\n\n}\n\n_Controller.$inject = ['$resourceManager', '$notifier', '$location', '$opportunitiesAvailable', '$message', '$timeout'];\n\nexport const messageList = {\n controller: _Controller,\n template: require(\"./messageList.html\")\n};","import \"./bodyTypePrompt.scss\";\n\nclass _Controller {\n constructor(\n $location,\n $notifier,\n $targetingOptions,\n $opportunitiesAvailable,\n $timeout,\n $q,\n $message,\n $connectModal,\n UserService,\n $modal,\n ScrollLock,\n $emailTemplates,\n $planTickboxes\n ) {\n this.$location = $location;\n this.$notifier = $notifier;\n this.$connectModal = $connectModal;\n this.$opportunitiesAvailable = $opportunitiesAvailable;\n this.$timeout = $timeout;\n this.$q = $q;\n this.$planTickboxes = $planTickboxes;\n $modal.new(\".body-type-modal\");\n this.$modal = $modal;\n this.$emailTemplates = $emailTemplates;\n this.$targetingOptions = $targetingOptions;\n this.sendTimeDescription = null;\n this.user = UserService.user;\n\n this.$message = $message;\n this.message = $message.message;\n\n this.email = $message.email;\n this.opportunity = $message.opportunity;\n\n this.previewHTML = null;\n this.processing = false;\n this.senderContinueEnabled = true;\n this.errors = {};\n\n this.isDirty = false;\n\n this.emailEditor = false;\n this.emailEditorLock = new ScrollLock(\"email-editor\");\n\n this.triggers = [\n {\n value: \"welcome\",\n title: \"Subscription purchased\",\n group: \"Onboarding\",\n },\n { value: \"trial_start\", title: \"Started trial\", group: \"Onboarding\" },\n {\n value: \"trial_will_end\",\n title: \"Trial ends soon\",\n group: \"Onboarding\",\n },\n { value: \"trial_expired\", title: \"Trial expired\", group: \"Onboarding\" },\n {\n value: \"dunning\",\n title: \"Payment failed (aka dunning)\",\n group: \"Payment emails\",\n },\n {\n value: \"pre_dunning\",\n title: \"Payment will fail (aka pre-dunning)\",\n group: \"Payment emails\",\n },\n {\n value: \"charge_succeeded\",\n title: \"Charge succeeded\",\n group: \"Payment emails\",\n },\n {\n value: \"invoice_receipt\",\n title: \"Invoice paid\",\n group: \"Payment emails\",\n },\n {\n value: \"cancellation_recovery\",\n title: \"Subscription cancelled\",\n group: \"Lifecycle emails\",\n },\n {\n value: \"renewed\",\n title: \"Subscription renewed\",\n group: \"Lifecycle emails\",\n },\n {\n value: \"renewed\",\n title: \"Subscription will renew\",\n group: \"Lifecycle emails\",\n },\n {\n value: \"upgrade_downgrade\",\n title: \"Plan changed\",\n group: \"Lifecycle emails\",\n },\n { value: \"card_updated\", title: \"Card updated\", group: \"Misc\" },\n ];\n }\n\n $onInit() {\n this.hideModal();\n const id = this.$location.path().match(/\\/automations\\/([0-9]+)/)[1];\n this.$message.get(id).then(() => {\n this.body = this.$message.email.body;\n this.targeting = this.$message.message.settings.targeting;\n if (this.$message.message.settings.targeting) {\n this.populateSendTimeOptions();\n }\n if (this.$message.message.state === \"started\") {\n this.isActivated = true;\n }\n });\n }\n\n onChangeTrigger() {\n this.isDirty = true;\n this.updateSendTimeOptions();\n this.$message.updateOpportunity();\n }\n\n onChangeAdvanced() {\n this.isDirty = true;\n }\n\n onChangeTiming() {\n if (this.$message.message.state === \"started\") {\n alert(\"Pause this automation if you'd like to edit the time targeting.\");\n this.targeting = this.$message.message.settings.targeting;\n return false;\n }\n this.$message.message.settings.targeting = this.targeting;\n this.isDirty = true;\n }\n\n onChangeSubject() {\n this.isDirty = true;\n this.errors.subject = null;\n }\n\n onChangeContent() {\n this.isDirty = true;\n }\n\n onChangeBcc() {\n this.isDirty = true;\n }\n\n updateSendTimeOptions() {\n if (!this.$message.message.settings.targeting) {\n this.populateSendTimeOptions();\n this.setDefaultSendingTime();\n this.targeting = this.$message.message.settings.targeting;\n return;\n }\n\n this.sendTimeDescription = null;\n\n const opportunityType = this.$message.message.opportunity_type;\n const targetingOptions = this.$targetingOptions.get(opportunityType);\n const { value, type } = this.$message.message.settings.targeting;\n const { options } = targetingOptions;\n const matchingOptions = _.filter(options, (item) => {\n return item.value.value == value && item.value.type == type;\n });\n\n this.$timeout(() => {\n this.populateSendTimeOptions();\n if (matchingOptions.length > 0) {\n this.$message.message.settings.targeting = matchingOptions[0].value;\n } else {\n this.setDefaultSendingTime();\n }\n this.targeting = this.$message.message.settings.targeting;\n }, 250);\n }\n\n populateSendTimeOptions() {\n const targetingOptions = this.$targetingOptions.get(\n this.$message.message.opportunity_type\n );\n this.sendTimeOptions = targetingOptions.options;\n this.sendTimeDescription = targetingOptions.description;\n }\n\n setDefaultSendingTime() {\n const defaultValue = this.$targetingOptions.getDefault(\n this.$message.message.opportunity_type\n );\n this.$message.message.settings.targeting = defaultValue.value;\n }\n\n hideModal() {\n this.newConnectModal = false;\n }\n\n goToSection(requested) {\n this.$message.goToSection(requested);\n }\n\n validatePlanMode() {\n const { live_mode } = this.$message.message;\n const plans = this.$planTickboxes.plans;\n const targeted = _.filter(plans, (_plan) => {\n return _.contains(this.$message.message.settings.plans, _plan.plan_id);\n });\n return !_.findWhere(targeted, { live_mode });\n }\n\n validateForActivated() {\n if (!this.$message.email.subject) {\n alert(\"Activated automations require a subject line\");\n this.errors.subject = \"Enter a subject line\";\n return false;\n } else if (!this.$message.message.opportunity_type) {\n alert(\"Pick a trigger first!\");\n } else if (!this.validatePlanMode()) {\n const confirmMessage = this.$message.message.live_mode\n ? \"This is a live mode automation, but you're targeting some test mode plans. These will be ignored. Do you want to continue?\"\n : \"This is a test mode automation, but you're targeting some live mode plans. These will be ignored. Do you want to continue?\";\n return confirm(confirmMessage);\n } else {\n return true;\n }\n }\n\n requestSave() {\n if (this.isActivated) {\n return this.validateForActivated() ? this.save() : false;\n } else {\n this.save();\n }\n }\n\n save() {\n this.$message.save(() => {\n this.isDirty = false;\n }, true);\n }\n\n onChangeActivate() {\n if (this.isActivated) {\n this.isActivated = false; // Deny the user having activated. If they pass validation, we'll activate for them.\n this.activate();\n } else {\n this.deactivate();\n }\n }\n\n onChangePlan() {\n this.isDirty = true;\n }\n\n onChangeProduct() {\n this.isDirty = true;\n }\n\n onChangeLiveMode() {\n this.isDirty = true;\n }\n\n activate() {\n if (this.isDirty) return alert(\"Save changes before activating\");\n if (this.validateForActivated()) {\n if (!this.user.provider_uid) {\n this.$connectModal.new();\n } else if (\n confirm(\"Are you sure you want to activate this automatic email?\")\n ) {\n this.$message.activate();\n this.isActivated = true;\n }\n }\n }\n\n deactivate() {\n if (\n confirm(\n \"Are you sure you want to stop this automatic email from sending?\"\n )\n ) {\n this.$message.deactivate();\n } else {\n this.isActivated = true;\n }\n }\n\n cancelNewEmailContent(event) {\n if (event) event.preventDefault();\n this.$modal.hide();\n }\n\n newEmailContent() {\n this.$modal.show();\n }\n\n createEmail(type) {\n this.$modal.hide();\n this.setBodyType(type);\n this.$message.email.save().then(() => {\n this.showEmailEditor();\n });\n }\n\n showEmailEditor() {\n this.emailEditorLock.on();\n this.emailEditor = true;\n }\n\n hideEmailEditor() {\n this.emailEditorLock.off();\n this.emailEditor = false;\n this.body = this.$message.email.body;\n this.$modal.new(\".body-type-modal\");\n }\n\n deleteEmailContent() {\n if (\n confirm(\n \"Are you sure you want to delete this email content? This cannot be undone.\"\n )\n ) {\n this.$message.email.body_type = null;\n this.$message.email.body = null;\n this.$message.email.save().then(() => {\n this.body = \" \"; // Space, so emailThumbnail will be updated.\n });\n }\n }\n\n setBodyType(bodyType) {\n this.$message.email.body_type = bodyType;\n let opportunityType = this.$message.message.opportunity_type;\n this.$emailTemplates.populateBody(\n this.$message.email,\n opportunityType,\n bodyType,\n true\n );\n }\n}\n\n_Controller.$inject = [\n \"$location\",\n \"$notifier\",\n \"$targetingOptions\",\n \"$opportunitiesAvailable\",\n \"$timeout\",\n \"$q\",\n \"$message\",\n \"$connectModal\",\n \"UserService\",\n \"$modal\",\n \"ScrollLock\",\n \"$emailTemplates\",\n \"$planTickboxes\",\n];\n\nexport const messageShow = {\n controller: _Controller,\n template: require(\"./messageShow.html\"),\n};\n","const startJobs = (_this) => () => {\n const id = _this.$location.path().match(/\\/automations\\/([0-9]+)/)[1];\n _this.$scheduledStore.request(id);\n};\n\nclass _Controller {\n constructor(\n $location,\n $timeout,\n $message,\n UserService,\n messageAnalytics,\n analyticsDateFilter,\n $activityStore,\n $modal,\n ScrollLock,\n $resourceManager,\n $scheduledStore,\n $cableConnection\n ) {\n this.$location = $location;\n this.$resourceManager = $resourceManager;\n this.$timeout = $timeout;\n this.user = UserService.user;\n this.$message = $message;\n this.$activityStore = $activityStore;\n this.period = { start: moment().subtract(30, \"days\"), end: moment() };\n this.messageAnalytics = messageAnalytics;\n this.analyticsDateFilter = analyticsDateFilter;\n $modal.new(\".debug-modal\");\n this.$modal = $modal;\n this.$scheduledStore = $scheduledStore;\n this.$cableConnection = $cableConnection;\n }\n\n $onInit() {\n const id = this.$location.path().match(/\\/automations\\/([0-9]+)/)[1];\n this.$message.get(id).then(() => {\n this.updateActivities();\n });\n this.$cableConnection.onConnected(startJobs(this));\n }\n\n updateActivities() {\n this.$activityStore.setupAndRequest(this.$message.message, this.period);\n startJobs(this);\n }\n\n newDebug() {\n this.debugEventId = null;\n this.debugResponse = null;\n this.$modal.show();\n }\n\n closeDebugModal() {\n this.$modal.hide();\n }\n\n debugMessage() {\n this.$resourceManager\n .request(\"messages\", \"debug\", {\n id: this.$message.message.id,\n event_id: this.debugEventId,\n })\n .then((res) => {\n this.debugResponse = JSON.stringify(res, undefined, 2);\n });\n }\n}\n\n_Controller.$inject = [\n \"$location\",\n \"$timeout\",\n \"$message\",\n \"UserService\",\n \"messageAnalytics\",\n \"analyticsDateFilter\",\n \"$activityStore\",\n \"$modal\",\n \"ScrollLock\",\n \"$resourceManager\",\n \"$scheduledStore\",\n \"$cableConnection\",\n];\n\nexport const messageActivity = {\n controller: _Controller,\n template: require(\"./messageActivity.html\"),\n};\n","import \"./advancedOptions.scss\";\n\nclass _Controller {\n constructor($opportunitiesAvailable, $message, $advancedOptions) {\n this.$opportunitiesAvailable = $opportunitiesAvailable;\n this.$message = $message;\n this.expanded = false;\n this.$advancedOptions = $advancedOptions;\n }\n\n $onInit() {\n this.init()\n }\n\n $onChanges(changesObj) {\n this.init()\n }\n\n init() {\n if (this.$message.message.opportunity_type) {\n this.defaultAdvancedOptions = this.$advancedOptions.getTrigger(this.$message.message.opportunity_type);\n }\n\n if (this.defaultAdvancedOptions) {\n if (!this.$message.message.settings.advanced) {\n this.$message.message.settings.advanced = {};\n }\n _.each(this.defaultAdvancedOptions, (advancedObject, advancedId) => {\n if (!this.$message.message.settings.advanced.hasOwnProperty(advancedId)) {\n this.$message.message.settings.advanced[advancedId] = advancedObject.default;\n }\n });\n }\n\n }\n\n showMenu(e) {\n if (!this.$message.message.opportunity_type) return false;\n this.expanded = true;\n }\n\n hideMenu() {\n this.expanded = false;\n }\n\n}\n\n_Controller.$inject = ['$opportunitiesAvailable', '$message', '$advancedOptions'];\n\nexport const advancedOptions = {\n controller: _Controller,\n template: require(\"./advancedOptions.html\"),\n bindings: {\n onChange: '&',\n opportunityType: '<'\n }\n};","import \"./emailEditor.scss\";\nimport \"./codemirror-theme.scss\";\n\nconst { clearAllBodyScrollLocks } = bodyScrollLock;\n\nconst contentStyle = `\n\nbody {\n font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;\n font-size: 16px;\n}\np {\n line-height: 150%;\n margin: 0 0 21px 0;\n font-size: 18px;\n}\n\na.as-button {\n background-color: #0f87f0;\n padding: 0 60px;\n min-width: 200px;\n height: 57px;\n text-align: center;\n line-height: 57px;\n border-radius: 4px;\n display: block;\n width: max-content;\n font-size: 20px;\n text-decoration: none;\n color: #fff;\n margin: 15px 0 33px 0;\n}\n\nh1 {\n font-family: 'Proxima Nova Regular', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n margin: 0 0 33px;\n font-size: 36px;\n line-height: 130%;\n font-weight: normal;\n}\n\nh2 {\n font-family: 'Proxima Nova Regular', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n margin: 0 0 21px;\n font-size: 23px;\n line-height: 130%;\n font-weight: normal;\n}\n\na.as-button:visited {\n color: #fff;\n}\n\n\nbody#tinymce {\n margin: 19px 17px;\n}\n`\n\ntinyMCE.PluginManager.add('stylebuttons', function(editor) {\n ['pre', 'p', 'code', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'].forEach(function(name){\n editor.addButton(\"style-\" + name, {\n tooltip: \"Toggle \" + name,\n text: name.toUpperCase(),\n disabledStateSelector: 'a.as-button',\n onClick: function() { editor.execCommand('mceToggleFormat', false, name); },\n onPostRender: function() {\n var self = this, setup = function() {\n editor.formatter.formatChanged(name, function(state) {\n self.active(state);\n });\n };\n editor.formatter ? setup() : editor.on('init', setup);\n }\n })\n });\n});\n\nimport \"../../../css/skins/lightgray/skin.min.css\";\nimport 'tinymce/themes/modern/theme';\n\n\nclass _Controller {\n\n constructor ($message, $timeout, $emailDesign, $modal, $testSendModal) {\n this.$message = $message;\n this.$timeout = $timeout;\n this.isDirty = false;\n this.$emailDesign = $emailDesign;\n this.$modal = $modal;\n this.$testSendModal = $testSendModal;\n this.tinymceOptions = {\n plugins: 'textcolor colorpicker customLink code button stylebuttons palette code',\n menubar: false,\n toolbar: 'undo redo | bold italic | link | button | style-h1 style-h2 | removeformat palette | code',\n height: 400,\n statusbar: false,\n content_style: `${contentStyle} ${this.buildDynamicEditorStyles()}`,\n skin: false,\n convert_urls: false,\n relative_urls: false,\n remove_script_host: false,\n };\n // this.isDirty = !this.$message.emailHasSavedContent;\n\n this.codeEditorOptions = {\n lineWrapping : false,\n lineNumbers: true,\n mode: 'htmlmixed',\n theme: 'monokai',\n tabSize: 2,\n autoRefresh: true\n };\n\n }\n\n $onInit() {\n this.$modal.new('.design-modal-show');\n this.$timeout(() => {\n this.body = this.$message.email.body;\n })\n }\n\n $onDestroy() {\n clearAllBodyScrollLocks();\n }\n\n close() {\n if (!this.isDirty) return this.onClose();\n if (confirm('Your unsaved changes will be lost. Are you sure?')) {\n this.onClose()\n }\n }\n\n onChange() {\n this.isDirty = true;\n }\n\n save() {\n this.$message.email.body = this.body;\n this.$message.email.save().then(() => {\n // this.$message.emailHasSavedContent = true;\n this.isDirty = false;\n });\n }\n\n showTestSend() {\n this.$testSendModal.new();\n }\n\n hide() {\n this.tinymceOptions.content_style = `${contentStyle} ${this.buildDynamicEditorStyles()}`;\n this.refreshing = true;\n this.$timeout(() => { this.refreshing = false; })\n this.$modal.hide();\n }\n\n buildDynamicEditorStyles() {\n return `\n a.as-button {\n background-color: ${this.$emailDesign.buttonColor};\n }\n\n a.as-button[data-mce-selected=\"inline-boundary\"] {\n background-color: ${this.$emailDesign.buttonColor}!important;\n }\n\n a:not(.as-button) {\n color: ${this.$emailDesign.linkColor};\n }\n\n h1 {\n color: ${this.$emailDesign.h1Color};\n }\n \n h2 {\n color: ${this.$emailDesign.h2Color};\n }\n\n p {\n color: ${this.$emailDesign.textColor};\n }\n `;\n }\n\n}\n\n_Controller.$inject = ['$message', '$timeout', '$emailDesign', '$modal', '$testSendModal'];\n\nexport const emailEditor = {\n controller: _Controller,\n template: require('./emailEditor.html'),\n bindings: {\n onClose: '&',\n bodyType: '<'\n },\n};","export const $emailDesign = (UserService, $modal) => {\n\n window.editorStore = window.editorStore || {};\n\n const defaults = {\n text: UserService.user.settings.branding.textColor || '#222222',\n link: UserService.user.settings.branding.linkColor || '#3893ff',\n button: UserService.user.settings.branding.buttonColor || '#3893ff',\n h1: UserService.user.settings.branding.h1Color || '#3893ff',\n h2: UserService.user.settings.branding.h2Color || '#222222'\n };\n\n let api = {};\n\n api.set = colors => {\n _.keys(colors).forEach(key => {\n const _color = colors[key] || defaults[key];\n api[key + 'Color'] = _color;\n window.editorStore[key + 'Color'] = _color;\n });\n };\n\n window.editorStore.open = () => {\n console.log('do it');\n $modal.new('.design-modal-show', $modal.show);\n }\n\n api.set(defaults);\n\n return api;\n\n};\n\n$emailDesign.$inject = ['UserService', '$modal'];","import \"./dashboard.scss\";\nimport { dashboard } from \"./dashboard.component.js\";\n\nexport const DASHBOARD_MODULE = angular.module(\"dashboard\", []);\n\nDASHBOARD_MODULE.component(\"dashboard\", dashboard);\n\nconst states = [\n {\n name: \"dashboard\",\n url: \"/dashboard\",\n component: \"dashboard\",\n title: \"Dashboard | Onboard\",\n parent: \"app\",\n section: \"dashboard\",\n },\n {\n name: \"summary\",\n url: \"/summary\",\n redirectTo: \"dashboard\",\n },\n];\n\nDASHBOARD_MODULE.config([\n \"$uiRouterProvider\",\n function ($uiRouter) {\n states.forEach((state) => $uiRouter.stateRegistry.register(state));\n },\n]);\n","const pollDelay = 4000;\nconst period = { start: moment().subtract(30, \"days\"), end: moment() };\n\nconst startJobs = (_this) => () => {\n _this.$activityStore.setupAndRequest(null, period);\n};\n\nclass _Controller {\n constructor(\n $opportunitiesStatus,\n $opportunitiesAvailable,\n $timeout,\n $opportunitiesCount,\n $location,\n $cookies,\n $resourceManager,\n $activityStore,\n $cableConnection,\n UserService\n ) {\n this.$opportunitiesStatus = $opportunitiesStatus;\n this.$opportunitiesAvailable = $opportunitiesAvailable;\n this.$timeout = $timeout;\n this.$opportunitiesCount = $opportunitiesCount;\n this.$location = $location;\n this.$cookies = $cookies;\n this.$activityStore = $activityStore;\n this.opportunities = $opportunitiesAvailable.list();\n this.$resourceManager = $resourceManager;\n this.$cableConnection = $cableConnection;\n this.user = UserService.user;\n this.building = false;\n this.loaded = false;\n this.messageId = \"global\";\n\n this.isDevelopment = __RAILS_ENV === \"development\";\n try {\n this.redirectURI = __STRIPE_REDIRECT_URI || \"\";\n } catch (e) {\n this.redirectURI = \"\";\n }\n }\n\n $onInit() {\n this.$activityStore.reset(\"message-global\", period);\n this.$cableConnection.onConnected(startJobs(this));\n\n this.loaded = true;\n this.$timeout(() => {\n Chart.defaults.LineWithLine = Chart.defaults.line;\n Chart.defaults.global.defaultFontFamily = \"'Proxima Nova Regular\";\n Chart.controllers.LineWithLine = Chart.controllers.line.extend({\n draw: function (ease) {\n Chart.controllers.line.prototype.draw.call(this, ease);\n\n if (this.chart.tooltip._active && this.chart.tooltip._active.length) {\n var activePoint = this.chart.tooltip._active[0],\n ctx = this.chart.ctx,\n x = activePoint.tooltipPosition().x,\n topY = this.chart.scales[\"y-axis-0\"].top,\n bottomY = this.chart.scales[\"y-axis-0\"].bottom;\n\n // draw line\n ctx.save();\n ctx.beginPath();\n ctx.moveTo(x, topY);\n ctx.lineTo(x, bottomY);\n ctx.lineWidth = 3;\n ctx.strokeStyle = \"#485572\";\n ctx.stroke();\n ctx.restore();\n }\n },\n });\n\n this.$resourceManager\n .request(\"analytics\", \"daily\", { metric: \"sent\", live_mode: \"true\" })\n .then((res) => {\n this.buildSendsChart(res);\n });\n });\n }\n\n buildSendsChart(data) {\n const builtData = data.map((datum) => {\n return {\n x: new Date(datum.timestamp * 1000).setHours(0, 0, 0, 0),\n y: datum.sent,\n };\n });\n\n var ctx = document.getElementById(\"chart-sends-by-day\");\n const myChart = new Chart(ctx, {\n type: \"LineWithLine\",\n\n data: {\n datasets: [\n {\n fill: \"origin\",\n backgroundColor: \"rgba(96, 132, 226, 0.3)\",\n borderWidth: 3,\n borderColor: \"rgba(96, 132, 226, 1)\",\n pointRadius: 2,\n pointBorderColor: \"rgba(96, 132, 226, 1)\",\n pointBackgroundColor: \"rgba(96, 132, 226, 7)\",\n lineTension: 0,\n borderJoinStyle: \"round\",\n label: false,\n data: builtData,\n },\n ],\n },\n options: {\n tooltips: {\n backgroundColor: \"#ffffff\",\n borderColor: \"#ecedef\",\n borderWidth: 2,\n bodyFontColor: \"#7f93ab\",\n titleFontColor: \"#7f93ab\",\n xPadding: 16,\n yPadding: 12,\n mode: \"index\",\n intersect: false,\n axis: \"x\",\n callbacks: {\n title: function (tooltipItem, data) {\n const dateTokens = tooltipItem[0].label.split(\",\");\n return `${dateTokens[0]}${dateTokens[1]}`;\n },\n label: function (tooltipItem, data) {\n const { yLabel } = tooltipItem;\n return `${yLabel} sends`;\n },\n },\n },\n legend: {\n display: false,\n },\n scales: {\n xAxes: [\n {\n label: false,\n gridLines: {\n drawTicks: false,\n zeroLineWidth: 2,\n borderDash: [1, 1],\n },\n type: \"time\",\n time: {\n unit: \"day\",\n stepSize: 3,\n },\n ticks: {\n padding: 12,\n },\n major: {\n enabled: true,\n },\n },\n ],\n yAxes: [\n {\n gridLines: {\n drawTicks: false,\n zeroLineWidth: 2,\n },\n drawTicks: false,\n ticks: {\n padding: 6,\n beginAtZero: true,\n },\n },\n ],\n },\n },\n });\n }\n}\n\n_Controller.$inject = [\n \"$opportunitiesStatus\",\n \"$opportunitiesAvailable\",\n \"$timeout\",\n \"$opportunitiesCount\",\n \"$location\",\n \"$cookies\",\n \"$resourceManager\",\n \"$activityStore\",\n \"$cableConnection\",\n \"UserService\",\n];\n\nexport const dashboard = {\n controller: _Controller,\n template: require(\"./dashboard.html\"),\n};\n","import \"./modal.scss\";\nconst { clearAllBodyScrollLocks } = bodyScrollLock;\n\nclass _Controller {\n close(event) {\n const classValue = event.target.classList.value;\n if ([\"dismiss-standard\", \"modal-holder-new\"].includes(classValue)) {\n this.onClose();\n }\n }\n\n $onDestroy() {\n clearAllBodyScrollLocks();\n }\n}\n\nexport const modal = {\n template: `\n \n `,\n bindings: {\n show: '<',\n onClose: '&',\n modalName: '@'\n },\n transclude: true,\n controller: _Controller\n}","const disableBodyScroll = bodyScrollLock.disableBodyScroll;\nconst enableBodyScroll = bodyScrollLock.enableBodyScroll;\n\nexport const $modal = function($timeout) {\n\n const modal = {\n name: null,\n targetElement: null,\n shown: false\n };\n\n modal.new = (targetElementSelector, onSuccess) => {\n modal.name = targetElementSelector.split(\".\")[1];\n modal.targetElement = document.querySelector(targetElementSelector);\n if (!modal.targetElement) {\n $timeout(() => modal.new(targetElementSelector), 150);\n } else {\n if (onSuccess) onSuccess();\n }\n }\n\n modal.show = () => {\n if (!modal.targetElement) return console.error(\"No target found. Initialize with `$modal.new('.css-selector')` first\");\n disableBodyScroll(modal.targetElement);\n $timeout(() => { // Must be in timeout in case called from outside of angular\n modal.shown = true;\n })\n };\n\n modal.hide = event => {\n if (event) {\n let targetClass = event.target.classList.value;\n if (![\"modal-holder-new\", \"dismiss-standard\"].includes(targetClass)) return false;\n }\n enableBodyScroll(modal.targetElement);\n modal.shown = false;\n };\n\n return modal;\n\n};\n\n$modal.$inject = ['$timeout'];","export const $resourceManager = ($resourceRoutes, $resource, $q) => {\n\n var baseUrl = '/api/KLASS/:id';\n\n let manager = {\n resources: {}\n };\n\n angular.forEach($resourceRoutes, function (value, key) {\n var url = baseUrl.replace('KLASS', key);\n manager.resources[key] = $resource(url, null, value);\n });\n\n manager.save = function (klass, params, payload) {\n var method = params.id ? 'update' : 'save';\n return manager.request(klass, method, params, payload);\n };\n\n manager.request = function (klass, method, params, payload) {\n return $q (function (resolve, reject) {\n if (!manager.resources[klass] || !manager.resources[klass][method]) {\n throw 'Method missing from resource_routes.js -> ' + klass + ':' + method;\n }\n\n var innerPromise = manager.resources[klass][method](params, payload).$promise;\n\n innerPromise.then(function () {\n resolve(innerPromise);\n }, function () {\n reject(innerPromise.$$state.value);\n });\n });\n };\n\n return manager;\n};\n\n$resourceManager.$inject = ['$resourceRoutes', '$resource', '$q'];\n","export const $resourceRoutes = () => {\n // Default routes created for key\n //\n // 'get' : { method: 'GET' }\n // 'save' : { method: 'POST'}\n // 'query' : { method: 'GET', isArray: true}\n // 'remove': { method: 'DELETE'}\n // 'delete': { method: 'DELETE'}\n\n var routes = {\n opportunties: {\n scheduled: {\n method: \"GET\",\n url: \"/api/opportunities/scheduled\",\n isArray: false\n }\n },\n analytics: {\n daily: { method: \"GET\", url: \"/api/opportunities/daily\", isArray: true }\n },\n plans: {\n query: { method: \"GET\", isArray: false },\n refresh: { method: \"GET\", url: \"/api/plans/refresh\", isArray: false }\n },\n products: {\n query: { method: \"GET\", isArray: false },\n refresh: { method: \"GET\", url: \"/api/products/refresh\", isArray: false }\n },\n admin_users: {\n query: { method: \"GET\", isArray: false, url: \"/api/admin/users\" },\n lock: { method: \"PUT\", url: \"/api/admin/users/:id/lock\" },\n unlock: { method: \"PUT\", url: \"/api/admin/users/:id/unlock\" },\n delete: { method: \"DELETE\", url: \"/api/admin/users/:id\" }\n },\n messages: {\n query: { method: \"GET\", isArray: false },\n new: { method: \"GET\", url: \"/api/messages/new\" },\n update: { method: \"PUT\", url: \"/api/messages/:id\" },\n start: { method: \"PATCH\", url: \"/api/messages/:id/start\" },\n stop: { method: \"PATCH\", url: \"/api/messages/:id/stop\" },\n duplicate: { method: \"POST\", url: \"/api/messages/:id/duplicate\" },\n activity: { method: \"GET\", url: \"/api/messages/:id/activity\" },\n debug: { method: \"GET\", url: \"/api/messages/:id/debug\" },\n targeting_preview: {\n method: \"POST\",\n url: \"/api/messages/targeting_preview\"\n },\n email: { method: \"GET\", url: \"/api/messages/:id/email\" }\n },\n senders: {\n current: { method: \"GET\", url: \"/api/senders/current\" },\n query: { method: \"GET\", isArray: false },\n update: { method: \"PUT\", url: \"/api/senders/:id\" },\n resend_confirmation: {\n method: \"PATCH\",\n url: \"/api/senders/:id/resend_confirmation\"\n }\n },\n emails: {\n update: { method: \"PUT\", url: \"/api/emails/:id\" },\n new: { method: \"GET\", url: \"/api/emails/new\" },\n test: { method: \"POST\", url: \"/api/emails/test\" },\n preview: { method: \"POST\", url: \"/api/emails/preview\" }\n },\n users: {\n update_settings: { method: \"PUT\", url: \"/api/users/:id/update_settings\" },\n update_password: { method: \"PUT\", url: \"/api/users/:id/update_password\" },\n setup_intent: { method: \"POST\", url: \"/api/users/:id/setup_intent\" },\n subscribe: { method: \"POST\", url: \"/api/users/:id/subscribe\" },\n cancel_subscription: {\n method: \"DELETE\",\n url: \"/api/users/:id/cancel_subscription\"\n },\n subscription: { method: \"GET\", url: \"/api/users/:id/subscription\" },\n uncancel_subscription: {\n method: \"PUT\",\n url: \"/api/users/:id/uncancel_subscription\"\n },\n renew_subscription: {\n method: \"PUT\",\n url: \"/api/users/:id/renew_subscription\"\n },\n customer: { method: \"GET\", url: \"/api/users/:id/customer\" },\n stripe_account: { method: \"GET\", url: \"/api/users/:id/stripe_account\" },\n documents: { method: \"GET\", url: \"/api/users/:id/documents\" }\n },\n passwords: {\n reset: { method: \"POST\", url: \"/passwords/reset\" },\n update: { method: \"PUT\", url: \"/passwords/:reset_password_token\" }\n }\n };\n\n return routes;\n};\n","export const $availablePlans = ($resourceManager, $cableConnection) => {\n let available = {\n items: [],\n loading: false\n };\n\n available.initialize = () => {\n $resourceManager.request(\"plans\", \"query\").then(({ plans }) => {\n angular.copy(plans, available.items);\n });\n\n $cableConnection.registerFunction(message => {\n if (message.data.plan) {\n if (message.data.plan.done) {\n available.loading = false;\n } else {\n available.items.push(message.data.plan);\n }\n }\n });\n };\n\n available.refresh = () => {\n available.loading = true;\n $resourceManager.request(\"plans\", \"refresh\");\n };\n return available;\n};\n\n$availablePlans.$inject = [\"$resourceManager\", \"$cableConnection\"];\n","export const $availableProducts = ($resourceManager, $cableConnection) => {\n let available = {\n items: [],\n loading: false\n };\n\n available.initialize = () => {\n $resourceManager.request(\"products\", \"query\").then(({ products }) => {\n angular.copy(products, available.items);\n });\n\n $cableConnection.registerFunction(message => {\n if (message.data.product) {\n if (message.data.product.done) {\n available.loading = false;\n } else {\n available.items.push(message.data.product);\n }\n }\n });\n };\n\n available.refresh = () => {\n available.loading = true;\n $resourceManager.request(\"products\", \"refresh\");\n };\n\n return available;\n};\n\n$availableProducts.$inject = [\"$resourceManager\", \"$cableConnection\"];\n","export const $notifier = ($timeout) => {\n\n var notifier = {};\n\n var create = function(type, text, persist) {\n notifier.type = type;\n notifier.text = text;\n notifier.active = true;\n $timeout(function() {\n if (!persist) notifier.dismiss();\n }.bind(notifier), 3000);\n };\n\n notifier.green = function(text) {\n create('success', text);\n };\n\n notifier.red = function(text) {\n create('error', text);\n };\n\n notifier.dismiss = function() {\n this.active = false;\n this.type = null;\n this.text = null;\n };\n\n return notifier;\n\n};\n\n$notifier.$inject = ['$timeout'];","export const $opportunitiesAvailable = () => {\n var opportunties = {\n types: {\n pre_dunning: \"pre_dunning\",\n cancellation_recovery: \"cancellation_recovery\"\n },\n available: {\n dunning_after: {\n id: \"dunning_after\",\n title: \"Payment failed (dunning)\",\n category: \"payment\",\n shortName: \"Dunning\",\n description: \"Send this email when a customer's regular payment fails\",\n buildingDesc: \"Calculating revenue lost due to failed payments\",\n detailedDesc:\n \"Dunning emails are sent automatically after a customer's payment has failed, reminding them to update their payment details. You can set up multiple dunning emails that will trigger at different times. Onboard will automatically stop sending them when the customer updates their payment details.\",\n activatedDesc: \"reclaimed after failed payments\",\n unit: \"cents\",\n targeting: \"plans\"\n },\n pre_dunning_before: {\n id: \"pre_dunning_before\",\n title: \"Payment will fail (pre-dunning)\",\n category: \"payment\",\n shortName: \"Pre-dunning\",\n description:\n \"Send this email if a customer's card will expire before their next bill date\",\n buildingDesc: \"Analysing subscriptions with expiring cards\",\n detailedDesc:\n \"Pre-dunning emails are emails sent automatically to each customer a few days before their card details are due to expire, to remind them to update their details.\",\n unit: \"cents\",\n activatedDesc: \"rescued from expiring cards\",\n timePeriod: \"in the next 30 days\",\n targeting: \"plans\"\n },\n invoice_receipt_after: {\n id: \"invoice_receipt_after\",\n title: \"Invoice paid\",\n category: \"payment\",\n shortName: \"Invoice receipt\",\n description:\n \"Send this email when a customer pays their subscription invoice\",\n buildingDesc: \"Evaluating invoices\",\n detailedDesc:\n \"Invoice receipt emails are sent automatically when a customer completes a payment and is sent an invoice.\",\n unit: \"count\",\n targeting: \"plans\"\n },\n charge_succeeded_after: {\n id: \"charge_succeeded_after\",\n title: \"Charge succeeded\",\n category: \"payment\",\n shortName: \"Charge succeeded\",\n description:\n \"Send this email when a customer pays for a one-off charge outside of Stripe Billing/Subscriptions\",\n buildingDesc: \"Evaluating card updates\",\n detailedDesc:\n \"One-off charge emails are sent when a customer pays for a Stripe charge. You can create emails that target specific products, packages or other charge types by specifying the charge description to target in the 'advanced options' section. This is designed for subscription based charges.\",\n unit: \"count\",\n targeting: \"plans\"\n },\n welcome_after: {\n id: \"welcome_after\",\n title: \"Subscription purchased\",\n html_title: 'Purchased subscription',\n category: \"onboarding\",\n shortName: \"Purchased subscription\",\n description: \"Send this email when a customer buys a new subscription\",\n buildingDesc: \"Evaluating new subscriptions\",\n detailedDesc:\n \"Purchased subscription emails are sent when a customer either purchases a subscription that doesn't have a trial, or successfully converts from a trial to a paying subscriber.\",\n activatedDesc: \"new customers welcomed\",\n unit: \"count\",\n targeting: \"plans\"\n },\n trial_start_after: {\n id: \"trial_start_after\",\n title: \"Started trial\",\n category: \"onboarding\",\n shortName: \"Started trial\",\n description: \"Send this email when a customer signs up for a trial\",\n buildingDesc: \"Evaluating new trials\",\n detailedDesc:\n \"Started trial emails are emails sent automatically to each customer the first time they start a subscription that has a trial.\",\n unit: \"count\",\n targeting: \"plans\"\n },\n trial_will_end_before: {\n id: \"trial_will_end_before\",\n title: \"Trial ends soon\",\n category: \"onboarding\",\n shortName: \"Trial will end\",\n description:\n \"Send this email a few days before a customer's trial is due to end\",\n buildingDesc: \"Evaluating ending trials\",\n detailedDesc:\n \"Trial will end soon emails are sent automatically to each customer a few days before their trial ends.\",\n unit: \"count\",\n targeting: \"plans\"\n },\n trial_expired_after: {\n id: \"trial_expired_after\",\n category: \"onboarding\",\n title: \"Trial expired\",\n shortName: \"Trial expired\",\n description: \"Send this email when a customer's trial expires\",\n buildingDesc: \"Evaluating expired trials \",\n detailedDesc:\n \"Trial expired emails are sent automatically after a customer's trial has expired.\",\n unit: \"count\",\n targeting: \"plans\"\n },\n renewed_after: {\n id: \"renewed_after\",\n title: \"Subscription renewed\",\n category: \"lifecycle\",\n shortName: \"Renewal\",\n description: \"Send this email when a customer's subscription renews\",\n buildingDesc: \"Evaluating renewals\",\n detailedDesc:\n \"Renewal emails are sent automatically either before or after a customer's subscription ticks over onto their next billing period.\",\n unit: \"count\",\n targeting: \"plans\"\n },\n renewed_before: {\n id: \"renewed_before\",\n title: \"Subscription will renew\",\n category: \"lifecycle\",\n shortName: \"Renewal\",\n description:\n \"Send this email a few days before a customer's subscription renews\",\n buildingDesc: \"Evaluating renewals\",\n detailedDesc:\n \"Renewal emails are sent automatically either before or after a customer's subscription ticks over onto their next billing period.\",\n unit: \"count\",\n targeting: \"plans\"\n },\n card_updated_after: {\n id: \"card_updated_after\",\n title: \"Updated card\",\n category: \"payment\",\n shortName: \"Card updated\",\n description: \"Send this email when a customer's card on file changes\",\n buildingDesc: \"Evaluating card updates\",\n detailedDesc:\n \"Card updated emails are sent automatically when a customer's default card is updated either manually or automatically by the customer's bank.\",\n unit: \"count\",\n targeting: \"plans\"\n },\n cancellation_recovery_after: {\n id: \"cancellation_recovery_after\",\n title: \"Subscription cancelled\",\n category: \"lifecycle\",\n shortName: \"Cancellation\",\n description:\n \"Send this email when a customer cancels their subscription\",\n buildingDesc: \"Evaluating pending cancellations\",\n detailedDesc:\n \"Cancellation emails are sent automatically when a customer cancels their account. This can be a good opportunity to ask them if there's anything you can do better, or even offer them a discount if they re-subscribe.\",\n activatedDesc: \"rescued from cancelling subs\",\n unit: \"cents\",\n timePeriod: \"in the next 30 days\",\n targeting: \"plans\"\n },\n upgrade_downgrade_after: {\n id: \"upgrade_downgrade_after\",\n title: \"Changed plan\",\n category: \"lifecycle\",\n shortName: \"Upgrade/downgrade\",\n description:\n \"Send this email when a customer upgrades or downgrades their plan\",\n buildingDesc: \"Evaluating plan changes\",\n detailedDesc:\n \"Upgrade/downgrade emails are sent when a customer changes their subscription plan.\",\n unit: \"cents\",\n timePeriod: \"in the next 30 days\",\n targeting: \"plans\"\n },\n subscription_will_end_before: {\n id: \"subscription_will_end_before\",\n title: \"Subscription will not renew\",\n category: \"lifecycle\",\n shortName: \"Subscription will end\",\n description:\n \"Send this email a few days before a customer's subscription end\",\n buildingDesc: \"Evaluating renewals\",\n detailedDesc:\n \"Subscription will not renew emails are sent automatically a few days before a customer's cancelled subscription ends.\",\n activatedDesc: \"rescued from cancelling subs\",\n unit: \"cents\",\n timePeriod: \"in the next 30 days\",\n targeting: \"plans\"\n },\n checkout_completed_after: {\n id: \"checkout_completed_after\",\n title: \"Checkout complete\",\n category: \"payment\",\n shortName: \"Checkout complete\",\n beta: true,\n description:\n \"Send this email when a customer completes the purchase of a product via checkout\",\n buildingDesc: \"Evaluating\",\n detailedDesc:\n \"Checkout complete emails are sent automatically after a customer completes a checkout successfully. These can be targeted to specific products and do not require a customer to have a subscription.\",\n unit: \"count\",\n targeting: \"products\"\n }\n }\n };\n\n opportunties.convertJob = function(jobName) {\n return opportunties.jobs[jobName] || null;\n };\n\n opportunties.convertType = function(type) {\n return opportunties.types[type] || type;\n };\n\n opportunties.list = function() {\n return opportunties.available;\n };\n\n opportunties.get = function(key) {\n return opportunties.available[key];\n };\n\n return opportunties;\n};\n","export const $opportunitiesStatus = ($http, $q, $opportunitiesAvailable) => {\n var opStatus = {};\n\n opStatus.shouldRunAgain = function (responseData) {\n return !!responseData.data;\n };\n\n opStatus.status = function () {\n var url = '/api/opportunities/status';\n return $q(function (resolve) {\n $http.get(url).then(function (result) {\n resolve(result);\n });\n });\n };\n\n return opStatus;\n};\n\n$opportunitiesStatus.$inject = ['$http', '$q', '$opportunitiesAvailable'];","export const $planTickboxes = ($availablePlans, tickboxesFactory) => {\n const planTickboxes = tickboxesFactory($availablePlans.items, \"plan_id\");\n return planTickboxes;\n};\n\n$planTickboxes.$inject = [\"$availablePlans\", \"tickboxesFactory\"];\n","export const $productTickboxes = ($availableProducts, tickboxesFactory) => {\n const productTickboxes = tickboxesFactory(\n $availableProducts.items,\n \"product_id\"\n );\n return productTickboxes;\n};\n\n$productTickboxes.$inject = [\"$availableProducts\", \"tickboxesFactory\"];\n","const pretty = require(\"pretty\");\n\nconst CSS = `body{height:100%!important;Margin:0 auto!important;padding:0!important;width:100%!important;min-width:100%!important;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;background-color:#fff}div[style*=\"margin: 16px 0\"]{Margin:0 auto!important}table,td{border-collapse:collapse!important;mso-table-lspace:0;mso-table-rspace:0;border-spacing:0;font-family:sans-serif}td{padding:0}table img{outline:0;text-decoration:none;-ms-interpolation-mode:bicubic;width:100%;height:auto;border:0}p{Margin:0;font-size:18px;text-align:left;font-weight:400;line-height:150%;font-family:'Helvetica Neue',helvetica,arial,sans-serif;padding:0 0 21px 0}a{Margin:0;color:inherit;outline:0;text-decoration:underline;font-family:'Helvetica Neue',helvetica,arial,sans-serif}h1{Margin:0;font-size:36px;font-weight:400;line-height:130%;font-family:'Helvetica Neue',helvetica,arial,sans-serif;padding:0 0 36px 0}h2{Margin:0;font-size:23px;font-weight:400;line-height:130%;font-family:'Helvetica Neue',helvetica,arial,sans-serif;padding:10px 0 24px 0}em{font-style:italic}h3{font-weight:400}h4{font-weight:400}*{text-size-adjust:none;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;-webkit-font-smoothing:antialiased}.ExternalClass,.ReadMsgBody{width:100%}.ExternalClass,.ExternalClass div,.ExternalClass font,.ExternalClass p,.ExternalClass span,.ExternalClass td{line-height:100%}.wrapper{width:100%;table-layout:fixed;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}.webkit{max-width:600px}.outer{Margin:0 auto;width:100%;max-width:600px}.contents{width:100%;text-align:left}.button-container{padding:15px 0 36px 0}.main-content{padding:30px 30px 30px 30px;background-color:#fff}a{color:#3893FF}`;\n\nconst HEADER = `\n\n\n \n \n \n \n \n {{email.subject}}\n \n \n \n\n\n
\n
\n \n \n \n \n \n
\n \n \n \n \n
`;\n\nconst FOOTER = `
\n
\n \n
\n
\n\n\n`;\n\nexport const $emailTemplates = () => {\n var templates = {\n trial_start_after: {\n subject: \"Thanks for signing up for a trial!\",\n body:\n \"

Dear {{ customer.first_name | default: 'customer' }},

\\n\\n

Thanks for signing up for a trial!

\\n\\n

Your trial will end in {{subscription.days_until_trial_end}} days.

\\n\\n

Thanks,

\\n\\n

{{sender.name}}

\"\n },\n trial_will_end_before: {\n subject: \"Your trial subscription is due to end.\",\n body:\n \"

Dear {{ customer.first_name | default: 'customer' }},

\\n\\n

Your trial will end in {{subscription.days_until_trial_end}} days. If you like the product, why not sign up?

\\n\\n

Thanks,

\\n\\n

{{sender.name}}

\"\n },\n trial_expired_after: {\n subject: \"Your trial subscription has expired.\",\n body:\n \"

Dear {{ customer.first_name | default: 'customer' }},

\\n\\n

Thanks for checking out our product. Your trial has now ended.

\\n\\n

To sign up, visit the account area of our app.

\\n\\n

Thanks,

\\n\\n

{{sender.name}}

\"\n },\n welcome_after: {\n subject: \"Thanks for signing up!\",\n body:\n \"

Dear {{ customer.first_name | default: 'customer' }},

\\n\\n

Thanks for subscribing to a paid subscription. Your account has been updated with your new subscription details and is all ready to use.

\\n\\n

Just send us an email at {{ sender.email }} if you have any further questions.

\\n\\n

All the best,

\\n\\n

{{ sender.name }}

\"\n },\n pre_dunning_before: {\n subject: \"The card details we have on file are due to expire\",\n body:\n \"

Dear {{ customer.first_name | default: 'customer' }},

\\n\\n

Unfortunately the card we have on file ending in {{ customer.card.last4 }} will expire before your next payment is due.

\\n\\n

Please update your card details before {{ customer.active_subscription.current_period_end | date }} to avoid your subscription being cancelled. You can update your card details in the account area of our app.

\\n\\n

All the best,

\\n\\n

{{ sender.name }}

\"\n },\n dunning_after: {\n subject: \"Your payment has failed. Please update your payment details.\",\n body: `

Dear {{ customer.first_name | default: 'customer' }},

\\n\\n

We tried to process your regular payment to us for {{ invoice.amount_due | money : invoice.currency }} from the card we have on file{% if customer.card.last4 %} ending in {{ customer.card.last4 }}{% endif %}, but the payment failed.

\\n\\n

Please update your card details to reactivate your subscription.

\\n\\n

Update payment details

\\n\\n

All the best,

\\n\\n

{{ sender.name }}

`\n },\n invoice_receipt_after: {\n subject: \"Your payment was successful.\",\n body:\n \"

Dear {{ customer.first_name | default: 'customer' }},

\\n\\n

Thanks for subscribing.

\\n\\n

Your payment of {{invoice.total | money: invoice.currency }} to {{sender.name}} was successful.

\\n\\n

Thanks,

\\n\\n

{{sender.name}}

\"\n },\n charge_succeeded_after: {\n subject: \"Thank you for purchasing.\",\n body:\n \"

Dear {{ customer.first_name | default: 'customer' }},

\\n\\n

Your payment of {{invoice.total | money: invoice.currency }} to {{sender.name}} was successful.

\\n\\n

Thanks,

\\n\\n

{{sender.name}}

\"\n },\n renewed_after: {\n subject: \"Your subscription has renewed.\",\n body:\n \"

Dear {{ customer.first_name | default: 'customer' }},

\\n\\n

Thanks for renewing your subscription.

\\n\\n

Best regards,

\\n\\n

{{sender.name}}

\"\n },\n renewed_before: {\n subject: \"Your subscription will renew soon\",\n body:\n \"

Dear {{ customer.first_name | default: 'customer' }},

\\n\\n

Your subscription will renew in a few days' time.

\\n\\n

Best regards,

\\n\\n

{{sender.name}}

\"\n },\n upgrade_downgrade_after: {\n subject: \"Welcome to your new plan.\",\n body:\n \"

Dear {{ customer.first_name | default: 'customer' }},

\\n\\n

Your subscription has successfully been changed.

\\n\\n

Thanks,

\\n\\n

{{sender.name}}

\"\n },\n card_updated_after: {\n subject: \"Your card details have been updated\",\n body:\n \"

Dear {{ customer.first_name | default: 'customer' }},

\\n\\n

Just a quick email to let you know that the card details we have on file for you have been updated.

\\n\\n

We'll use these details when charging for your monthly subscription from now onwards.

\\n\\n

All the best,

\\n\\n

{{sender.name}}

\"\n },\n cancellation_recovery_after: {\n subject: \"We're sorry to see you go\",\n body:\n \"

Dear {{ customer.first_name | default: 'customer' }},

\\n\\n

You've recently cancelled your account with us. We're sorry to see you go.

\\n\\n

Is there anything we can do to convince you to stay? If so, simply reply to this email and let's talk. We may be able to sort something out.

\\n\\n

All the best,

\\n\\n

{{ sender.name }}

\"\n },\n subscription_will_end_before: {\n subject: \"Your subscription will end soon\",\n body:\n \"

Dear {{ customer.first_name | default: 'customer' }},

\\n\\n

Your subscription will end in a few days' time.

\\n\\n

Best regards,

\\n\\n

{{sender.name}}

\"\n },\n checkout_completed_after: {\n subject: \"Thank you for purchasing.\",\n body:\n \"

Dear {{ customer.first_name | default: 'customer' }},

\\n\\n

Your payment of {{event.amount_total | money: event.currency }} to {{sender.name}} was successful.

\\n\\n

Thanks,

\\n\\n

{{sender.name}}

\"\n }\n };\n\n const wrapCodeEmail = body => {\n return pretty(`\n ${HEADER}\n ${body.replace(\" class='as-button'\", \"\")}\n ${FOOTER}\n `).replace(\"[CSSHERE]\", CSS);\n };\n\n const wrap = (body, body_type) => {\n if (body_type === \"code\") return wrapCodeEmail(body);\n return body;\n };\n\n var methods = {\n getSubject: function(opportunityType) {\n return templates[opportunityType].subject;\n },\n getBody: function(opportunityType) {\n return templates[opportunityType].body;\n },\n populateSubject: function(email, opportunityType, force) {\n if (opportunityType && (email.subject === null || force)) {\n email.subject = templates[opportunityType].subject;\n }\n return email;\n },\n populateBody: function(email, opportunityType, body_type, force) {\n if (opportunityType && (email.body === null || force)) {\n email.body = wrap(templates[opportunityType].body, body_type);\n }\n return email;\n }\n };\n\n return methods;\n};\n","export const $currentSender = ($resourceManager, $q) => {\n \n let currentSender = {\n sender: {email: null, name: null}\n };\n\n currentSender.initialize = () => {\n return $q((resolve, reject) => {\n $resourceManager.request('senders', 'current').then(response => {\n currentSender.set(response.sender);\n resolve();\n }).catch(reject);\n });\n };\n\n currentSender.set = sender => {\n if (sender) angular.copy(sender, currentSender.sender);\n };\n\n currentSender.update = sender => {\n if (!sender || !sender.email || !sender.name) return false;\n return $q((resolve, reject) => {\n $resourceManager.request('senders', 'update', {id: sender.id }, sender).then(() => {\n currentSender.set(sender);\n resolve(sender);\n }).catch(error => {\n reject(error);\n });\n });\n };\n\n return currentSender;\n\n};\n\n$currentSender.$inject = ['$resourceManager', '$q'];","export const $analyticsResource = ($http, $q) => {\n var analytics = {\n data: {}\n };\n\n function request (url, params, cache) {\n cache = cache || false;\n return $q(function (resolve, reject) {\n var innerPromise = $http.get(url, {cache: cache, params: params, paramSerializer: '$httpParamSerializerJQLike'});\n innerPromise.then(function (response) {\n resolve(response.data);\n }, function (reason) {\n reject(reason);\n });\n });\n }\n\n analytics.opportunity = function (params) {\n var requestParams = angular.extend({}, params);\n var url = '/api/opportunities/analytics';\n return request(url, requestParams);\n };\n\n analytics.message = function (params) {\n if (!params.id) {\n // return rejected promise\n return $q((r,j)=>{j()});\n }\n var url = '/api/messages/'+ params.id +'/analytics';\n return request(url, params.params);\n };\n\n return analytics;\n};\n\n$analyticsResource.$inject = ['$http', '$q'];\n","export const $cableConnection = ($rootScope, ActionCableChannel, ActionCableSocketWrangler, $timeout, $q) => {\n const service = {\n registeredFunctions: [],\n registerFunction: (func) => {\n service.registeredFunctions.push(func)\n return true;\n },\n onConnectedFunctions: [],\n onConnected: (func) => {\n if (service.connected) {\n func();\n } else {\n service.onConnectedFunctions.push(func);\n }\n return true;\n },\n waiting: true,\n queue: [],\n connected: false,\n connect: () => (\n $q(function (resolve, reject) {\n if (!ActionCableSocketWrangler.connected) {\n // ActionCableSocketWrangler.start(); // Don't call start or it breaks\n var consumer = new ActionCableChannel('ResponseChannel');\n consumer.subscribe(onReceiveMessage);\n consumer.onConfirmSubscription(() => {\n setTimeout(onConnected, 1000);\n resolve(true);\n });\n } else {\n resolve(true);\n }\n })\n )\n };\n\n const onConnected = () => {\n service.connected = true;\n service.onConnectedFunctions.forEach((func) => {\n try {\n func();\n } catch (e) {\n // noop\n }\n });\n };\n\n const onReceiveMessage = (message) => {\n service.registeredFunctions.forEach((func) => {\n try {\n func(message);\n } catch (e) {\n // noop\n }\n });\n\n // const writeToQueue = message => service.queue.push(message);\n\n // await $q.all(_.map(service.registeredFunctions, (func) => (\n // $q((resolve, reject) => {\n // try {\n // func(message)\n // } catch (e) {\n // return reject(e);\n // }\n // return resolve();\n // })\n // )));\n };\n\n // $rootScope.$watch(() => `${service.queue.length}-${service.waiting}`, async (newValue, oldValue) => {\n // console.log(newValue)\n // if (!!service.queue.length && service.waiting) {\n // service.waiting = false;\n // await onReceiveMessage(service.queue[0]);\n // service.queue = service.queue.splice(1);\n // service.waiting = true;\n // }\n // })\n\n return service;\n};\n\n$cableConnection.$inject = ['$rootScope', 'ActionCableChannel', 'ActionCableSocketWrangler', '$timeout', '$q'];\n","export const MessageHelper = ($resourceManager, $targetingOptions, $q) => {\n function _MessageHelper(message) {\n if (!message.loading) {\n if (message.opportunity_type)\n message.settings.targeting = $targetingOptions.getSelectedOption(\n message.opportunity_type,\n message.settings.targeting\n );\n message.settings.plans = message.settings.plans || [];\n message.settings.products = message.settings.products || [];\n }\n\n message.save = () => {\n return $q((resolve, reject) => {\n const _message = angular.copy(message);\n\n $resourceManager\n .save(\"messages\", { id: message.id }, _message)\n .then(response => {\n if (message.id === null) message.id = response.message.id;\n resolve(response);\n })\n .catch(reject);\n });\n };\n\n return message;\n }\n\n return _MessageHelper;\n};\n\nMessageHelper.$inject = [\"$resourceManager\", \"$targetingOptions\", \"$q\"];\n","export const EmailHelper = ($resourceManager, $emailTemplates, $q) => {\n function _EmailHelper (email, opportunityType, force) {\n $emailTemplates.populateSubject(email, opportunityType, force);\n\n email.save = () => {\n return $q((resolve, reject) => {\n const _email = angular.copy(email);\n if (!_email.subject) _email.subject = \"\";\n $resourceManager.save('emails', {id: email.id}, _email).then(response => {\n if (email.id === null) email.id = response.email.id;\n resolve(response);\n }).catch(reject);\n });\n };\n\n email.preview = function (onComplete) {\n var promise = $resourceManager.request('emails', 'preview', null, {subject: email.subject, body: email.body, body_type: email.body_type});\n promise.then(onComplete);\n };\n\n email.test = function (testEmails, onComplete) {\n var promise = $resourceManager.request('emails', 'test', null, {test_emails: testEmails, subject: email.subject, body: email.body, body_type: email.body_type});\n promise.then(onComplete);\n };\n\n return email;\n }\n\n return _EmailHelper;\n};\n\nEmailHelper.$inject = ['$resourceManager', '$emailTemplates', '$q'];","export const MessageAnalytics = (\n $analyticsManager,\n $q,\n analyticsDateFilter\n) => {\n function _MessageAnalytics(message) {\n var analytics = { message: message, name: \"messageAnalytics\" };\n\n analytics.resolve = function(period) {\n return $q(function(resolve, reject) {\n const period_start = angular.copy(\n analyticsDateFilter(period.start, \"start\")\n );\n const period_end = angular.copy(analyticsDateFilter(period.end, \"end\"));\n\n var promise = $analyticsManager.request({\n method: \"message\",\n id: message.id,\n params: { period_start, period_end, live_mode: message.live_mode }\n });\n promise.then(\n function(response) {\n var value = response ? response.data : 0;\n return resolve(value);\n },\n function(reason) {\n reject(reason);\n }\n );\n });\n };\n return analytics;\n }\n\n return _MessageAnalytics;\n};\n\nMessageAnalytics.$inject = [\"$analyticsManager\", \"$q\", \"analyticsDateFilter\"];\n","export const OpportunityAnalytics = ($analyticsManager, $q) => {\n function _OpportunityAnalytics (opportunity) {\n var analytics = { opportunity: opportunity, name: 'opportunityAnalytics' };\n\n analytics.resolve = function () {\n return $q(function (resolve, reject) {\n if (opportunity.status === 'building') {\n // will only get analytics if the opportunity is ready\n resolve(null);\n } else {\n var promise = $analyticsManager.request({method: 'opportunity', active: (opportunity.status === 'activated')});\n promise.then(function (response) {\n var value = (response) ? response.data : 0;\n return resolve(value);\n }, function (reason) {\n reject(reason);\n });\n }\n });\n };\n\n return analytics;\n }\n\n return _OpportunityAnalytics;\n};\n\nOpportunityAnalytics.$inject = ['$analyticsManager', '$q'];","export const AnalyticQueueItem = ($q) => {\n function _AnalyticQueueItem (metric, type, id, params) {\n var queueItem = {\n metric: metric,\n type: type,\n id: id,\n params: params,\n defer: $q.defer()\n };\n\n return queueItem;\n }\n\n return _AnalyticQueueItem;\n};\n\nAnalyticQueueItem.$inject = ['$q'];\n","export const analyticsServiceController = function(opportunityAnalytics, messageAnalytics) {\n var services = {\n 'opportunityAnalytics': opportunityAnalytics,\n 'messageAnalytics': messageAnalytics\n };\n\n this.service = function () {\n return services[this._service](this._serviceItem);\n };\n};\n\nanalyticsServiceController.$inject = ['opportunityAnalytics', 'messageAnalytics'];\n","class _Controller {\n constructor($connectModal, $message) {\n this.$message = $message;\n this.$connectModal = $connectModal;\n this.isDevelopment = (__RAILS_ENV === \"development\")\n }\n}\n\n_Controller.$inject = ['$connectModal', '$message'];\n\nexport const connectModal = {\n controller: _Controller,\n template: require('./connectModal.html')\n};","import \"./testSendModal.scss\";\n\nclass _Controller {\n constructor($testSendModal, $message, $notifier, $timeout) {\n this.$message = $message;\n this.$notifier = $notifier;\n this.$testSendModal = $testSendModal;\n this.testSendEmail = null;\n this.submitting = false;\n this.complete = false;\n this.$timeout = $timeout;\n }\n\n sendTestEmail() {\n if (!this.testSendEmail) return false;\n this.submitting = true;\n this.$message.email.test(this.testSendEmail, () => {\n this.complete = true;\n this.$timeout(() => {\n this.$testSendModal.hide();\n this.submitting = false;\n this.complete = false;\n }, 1500)\n });\n }\n}\n\n_Controller.$inject = ['$testSendModal', '$message', '$notifier', '$timeout'];\n\nexport const testSendModal = {\n controller: _Controller,\n template: require('./testSendModal.html')\n};","import \"./designColors.scss\";\n\nclass _Controller {\n\n constructor($resourceManager, $notifier, UserService, $emailDesign) {\n this.$resourceManager = $resourceManager;\n this.user = UserService.user;\n this.$notifier = $notifier;\n this.$emailDesign = $emailDesign;\n\n this.colors = {\n button: angular.copy($emailDesign.buttonColor),\n text: angular.copy($emailDesign.textColor),\n link: angular.copy($emailDesign.linkColor),\n h1: angular.copy($emailDesign.h1Color),\n h2: angular.copy($emailDesign.h2Color),\n };\n\n this.colorPickerConfig = {\n theme: 'bootstrap',\n position: 'top right'\n };\n }\n\n updateColors() {\n\n this.user.settings.branding = {\n buttonColor: this.colors.button,\n linkColor: this.colors.link,\n textColor: this.colors.text,\n h1Color: this.colors.h1,\n h2Color: this.colors.h2,\n };\n\n this.$resourceManager.request('users', 'update_settings', {id: 'current'}, {settings: this.user.settings}).then(res => {\n this.$notifier.green(\"Saved.\");\n this.$emailDesign.set(this.colors);\n }).catch(err => {\n this.$notifier.red('Something went wrong.');\n });\n\n }\n\n isValid() {\n return (\n /^#[0-9A-F]{6}$/i.test(this.colors.button) &&\n /^#[0-9A-F]{6}$/i.test(this.colors.link) &&\n /^#[0-9A-F]{6}$/i.test(this.colors.text) &&\n /^#[0-9A-F]{6}$/i.test(this.colors.h1) &&\n /^#[0-9A-F]{6}$/i.test(this.colors.h2) &&\n !(\n this.colors.link.toLowerCase() === this.$emailDesign.linkColor.toLowerCase() &&\n this.colors.button.toLowerCase() === this.$emailDesign.buttonColor.toLowerCase() &&\n this.colors.text.toLowerCase() === this.$emailDesign.textColor.toLowerCase() &&\n this.colors.h1.toLowerCase() === this.$emailDesign.h1Color.toLowerCase() &&\n this.colors.h2.toLowerCase() === this.$emailDesign.h2Color.toLowerCase()\n )\n );\n }\n\n save() {\n this.updateColors();\n }\n\n}\n\n_Controller.$inject = ['$resourceManager', '$notifier', 'UserService', '$emailDesign'];\n\nexport const designColors = {\n controller: _Controller,\n template: require('./designColors.html')\n};\n","export const dots = ($document, $timeout, $rootScope) => {\n return {\n restrict: 'E',\n transclude: true,\n replace: true,\n scope: {\n extraClass: '@',\n disabled: '=',\n label: '@',\n name: '@'\n },\n template: require('./dots.html'),\n link: function (scope) {\n scope.isOpen = false;\n\n scope.open = function () {\n scope.isOpen = true;\n $rootScope.$emit(scope.name + \":open\");\n $timeout(function(){\n $document.one(\"click\", scope.close);\n }, 10);\n };\n\n scope.toggle = function () {\n (scope.isOpen) ? scope.close() : scope.open();\n };\n\n scope.close = function () {\n $timeout(function(){\n scope.isOpen = false;\n });\n $rootScope.$emit(\"reset:\" + scope.name + \":open\");\n };\n }\n };\n};\n\ndots.$inject = ['$document', '$timeout', '$rootScope'];","function analyticsTotalController () {\n this.reset = function () {\n this.value = null;\n this.loading = false;\n };\n\n this.reset();\n\n this.resolveValues = function (period) {\n this.loading = true;\n this.service.resolve(period).then(function (response) {\n this.loading = false;\n this.value = this.type ? response[this.type] : response;\n }.bind(this), function (reason) {\n this.reset();\n this.error = true;\n }.bind(this));\n };\n}\n\nexport const analyticsTotal = () => {\n return {\n restrict: 'E',\n require: ['^analytics'],\n scope: {},\n template: require('./total.html'),\n bindToController: { type: '@', label: '@', description: '@', unit: '@', period: '=' },\n controller: analyticsTotalController,\n controllerAs: 'ctrl',\n link: function (scope, element, attrs, ctrls) {\n var analytics = ctrls[0];\n scope.ctrl.service = analytics.service();\n scope.ctrl.resolveValues(scope.ctrl.period);\n scope.ctrl.currency = analytics._currency;\n\n scope.$watch('ctrl.period', function (newV, oldV) {\n if (oldV !== newV) scope.ctrl.resolveValues(scope.ctrl.period);\n }, true);\n }\n };\n};\n","function analyticsRateController () {\n this.reset = function () {\n this.valueA = null;\n this.valueB = null;\n this.value = null;\n this.loading = false;\n };\n\n this.reset();\n\n this.resolveValues = function (period) {\n this.loading = true;\n this.service.resolve(period).then(function (response) {\n this.loading = false;\n this.valueA = response[this.typeA];\n this.valueB = response[this.typeB];\n this.value = this.valueA / this.valueB;\n }.bind(this), function (reason) {\n this.reset();\n this.error = true;\n }.bind(this));\n };\n}\n\nexport const analyticsRate = () => {\n return {\n restrict: 'E',\n require: ['^analytics'],\n scope: {},\n template: require('./rate.html'),\n bindToController:{ typeA:'@', typeB: '@', label:'@', unit: '@', period: '=', target: '=' },\n controller:analyticsRateController,\n controllerAs:'ctrl',\n link: function(scope, element, attrs, ctrls){\n var analytics = ctrls[0];\n scope.ctrl.service = analytics.service();\n scope.ctrl.resolveValues(scope.ctrl.period);\n scope.currency = analytics._currency;\n\n scope.$watch('ctrl.period', function (newV, oldV) {\n if (oldV != newV) scope.ctrl.resolveValues(scope.ctrl.period);\n }, true);\n }\n };\n};","export function pageChangeAppHook($transitions, $meta, UserService, $state, Auth, $message, $redirects, transitionChecker, $anchorScroll, $location, $timeout, $activityStore) {\n\n $transitions.onBefore({}, transition => {\n\n // Clear the current message and activity store. Perhaps this should be in onStart rather than onBefore?\n $message.reset();\n $activityStore.reset();\n\n const toState = transition.to();\n const parent = (toState.parent) ? $state.get(toState.parent) : false;\n const { stateService } = transition.router;\n\n const needsAdmin = () => ((toState.admin || parent.admin));\n const needsAuth = () => ((toState.authenticate || parent.authenticate));\n const userFunctionPages = () => (['login', 'signUp', 'passwordReset', 'passwordEdit'].includes(toState.name));\n\n if (needsAuth() || needsAdmin() || userFunctionPages()) {\n return Auth.currentUser().then(response => {\n const { user } = response;\n UserService.initialize(user);\n\n if (needsAdmin() && !user.admin) {\n return stateService.target('dashboard');\n }\n\n const redirect = $redirects.check(user, toState);\n if (redirect) return stateService.target(redirect);\n\n return true;\n\n }).catch(error => {\n console.error(error);\n if (error.status == 401) {\n if (userFunctionPages()) return true;\n return stateService.target('login');\n } else {\n return stateService.target('home');\n }\n });\n } else {\n return true;\n }\n\n });\n\n // Set meta (title/section details) if page change is successful\n $transitions.onSuccess({}, transition => {\n\n $meta.setFromState(transition.to())\n // if ($location.hash()) {\n // $timeout(() => $anchorScroll(), 150);\n // }\n\n })\n\n}\n\npageChangeAppHook.$inject = ['$transitions', '$meta', 'UserService', '$state', 'Auth', '$message', '$redirects', 'transitionChecker', '$anchorScroll', '$location', '$timeout', '$activityStore'];\n","// Load global hooks here. Things like redirects, auth checks, loading bars etc.\n\nimport { $meta } from \"./meta.service\";\nimport { UserService } from \"./user.service\";\nimport { $redirects } from \"./redirects.service\";\nimport { $resourceManager } from \"./resourceManager.service\";\nimport { $resourceRoutes } from \"./resourceRoutes.service\";\nimport { $availablePlans } from \"./availablePlans.service\";\nimport { $availableProducts } from \"./availableProducts.service\";\nimport { $notifier } from \"./notifier.service\";\nimport { $opportunitiesAvailable } from \"./opportunities/opportunitiesAvailable.service\";\nimport { $opportunitiesCount } from \"./opportunities/opportunitiesCount.service\";\nimport { $opportunitiesStatus } from \"./opportunities/opportunitiesStatus.service\";\nimport { $targetingOptions } from \"./targetingOptions.service\";\nimport { $planTickboxes } from \"./planTickboxes.service\";\nimport { $productTickboxes } from \"./productTickboxes.service\";\nimport { $emailTemplates } from \"./emailTemplates.service\";\nimport { $advancedOptions } from \"./advancedOptions.service\";\nimport { $currentSender } from \"./currentSender.service\";\nimport { $analyticsManager } from \"./analytics/analyticsManager.service\";\nimport { $analyticsResource } from \"./analytics/analyticsResource.service\";\nimport { $cableConnection } from \"./cableConnection.service\";\n\nimport { ScrollLock } from \"./scrollLock.factory\";\n\nimport { MessageHelper } from \"./factories/messageHelper.factory\";\nimport { EmailHelper } from \"./factories/emailHelper.factory\";\nimport { tickboxesFactory } from \"./factories/tickboxes.factory\";\nimport { MessageAnalytics } from \"./factories/analytics/messageAnalytics.factory\";\nimport { OpportunityAnalytics } from \"./factories/analytics/opportunityAnalytics.factory\";\nimport { AnalyticQueueItem } from \"./factories/analytics/analyticQueueItem.factory\";\nimport { AnalyticQueue } from \"./factories/analytics/analyticQueue.factory\";\nimport { analyticsServiceController } from \"./analytics/analyticsService.controller\";\n\nimport { $connectModal } from \"./modals/connectModal.service\";\nimport { connectModal } from \"./modals/connectModal.component.js\";\nimport { $testSendModal } from \"./modals/testSendModal.service\";\nimport { testSendModal } from \"./modals/testSendModal.component.js\";\n\nimport { designColors } from \"./design_colors/designColors.component.js\";\n\nimport { dots } from \"./dots/dots.directive.js\";\nimport { dotItem } from \"./dots/dotItem.directive.js\";\nimport { analytics } from \"./analytics/analytics.directive.js\";\nimport { analyticsTotal } from \"./analytics/analyticsTotal.directive\";\nimport { analyticsRate } from \"./analytics/analyticsRate.directive\";\nimport { percentageCircle } from \"./analytics/percentageCircle.directive\";\nimport { metricLabel } from \"./metricLabel.directive\";\nimport { callout } from \"./callout.directive\";\nimport { stripeCard } from \"./stripe/stripeCard.directive.js\";\nimport { stripeForm } from \"./stripeForm.component\";\n\nexport const GLOBAL_MODULE = angular.module(\"global\", []);\n\nGLOBAL_MODULE.service(\"$meta\", $meta);\nGLOBAL_MODULE.service(\"UserService\", UserService);\nGLOBAL_MODULE.service(\"$resourceManager\", $resourceManager);\nGLOBAL_MODULE.service(\"$resourceRoutes\", $resourceRoutes);\nGLOBAL_MODULE.service(\"$availablePlans\", $availablePlans);\nGLOBAL_MODULE.service(\"$availableProducts\", $availableProducts);\nGLOBAL_MODULE.service(\"$notifier\", $notifier);\nGLOBAL_MODULE.service(\"$opportunitiesAvailable\", $opportunitiesAvailable);\nGLOBAL_MODULE.service(\"$opportunitiesCount\", $opportunitiesCount);\nGLOBAL_MODULE.service(\"$opportunitiesStatus\", $opportunitiesStatus);\nGLOBAL_MODULE.service(\"$targetingOptions\", $targetingOptions);\nGLOBAL_MODULE.service(\"$planTickboxes\", $planTickboxes);\nGLOBAL_MODULE.service(\"$productTickboxes\", $productTickboxes);\nGLOBAL_MODULE.service(\"$emailTemplates\", $emailTemplates);\nGLOBAL_MODULE.service(\"$advancedOptions\", $advancedOptions);\nGLOBAL_MODULE.service(\"$currentSender\", $currentSender);\nGLOBAL_MODULE.service(\"$analyticsManager\", $analyticsManager);\nGLOBAL_MODULE.service(\"$analyticsResource\", $analyticsResource);\nGLOBAL_MODULE.service(\"$cableConnection\", $cableConnection);\n\nGLOBAL_MODULE.controller(\n \"analyticsServiceController\",\n analyticsServiceController\n);\n\nGLOBAL_MODULE.factory(\"$messageHelper\", MessageHelper);\nGLOBAL_MODULE.factory(\"$emailHelper\", EmailHelper);\nGLOBAL_MODULE.factory(\"tickboxesFactory\", tickboxesFactory);\n\nGLOBAL_MODULE.factory(\"messageAnalytics\", MessageAnalytics);\nGLOBAL_MODULE.factory(\"opportunityAnalytics\", OpportunityAnalytics);\nGLOBAL_MODULE.factory(\"analyticQueueItem\", AnalyticQueueItem);\nGLOBAL_MODULE.factory(\"analyticQueue\", AnalyticQueue);\nGLOBAL_MODULE.factory(\"ScrollLock\", ScrollLock);\n\nGLOBAL_MODULE.directive(\"dots\", dots);\nGLOBAL_MODULE.directive(\"dotItem\", dotItem);\nGLOBAL_MODULE.directive(\"analytics\", analytics);\nGLOBAL_MODULE.directive(\"metricLabel\", metricLabel);\nGLOBAL_MODULE.directive(\"callout\", callout);\nGLOBAL_MODULE.directive(\"analyticsTotal\", analyticsTotal);\nGLOBAL_MODULE.directive(\"analyticsRate\", analyticsRate);\nGLOBAL_MODULE.directive(\"percentageCircle\", percentageCircle);\nGLOBAL_MODULE.directive(\"stripeCard\", stripeCard);\n\nGLOBAL_MODULE.component(\"connectModal\", connectModal);\nGLOBAL_MODULE.service(\"$connectModal\", $connectModal);\n\nGLOBAL_MODULE.component(\"testSendModal\", testSendModal);\nGLOBAL_MODULE.service(\"$testSendModal\", $testSendModal);\n\nGLOBAL_MODULE.component(\"designColors\", designColors);\nGLOBAL_MODULE.component(\"stripeForm\", stripeForm);\n\nGLOBAL_MODULE.service(\"$redirects\", $redirects);\nGLOBAL_MODULE.value(\"transitionChecker\", { inProgress: false });\nimport { pageChangeAppHook } from \"./pageChangeApp.hook\";\nGLOBAL_MODULE.run(pageChangeAppHook);\n","export const $advancedOptions = () => {\n var triggerOptions = {\n dunning_after: {\n trigger_without_payment: {\n default: true,\n type: \"boolean\",\n description:\n \"Also send this email if the customer has no payment details present\",\n },\n trigger_on_manual_retries: {\n default: false,\n type: \"boolean\",\n description:\n \"Also trigger this email when you attempt to collect payment manually.\",\n },\n trigger_on_automatic_retries: {\n default: false,\n type: \"boolean\",\n description:\n \"Also trigger this email every time an automatic payment retry fails.\",\n link: `Learn more`,\n },\n },\n card_updated_after: {\n trigger_on_automatic_update: {\n default: false,\n type: \"boolean\",\n description:\n \"Only send this email when the card was updated automatically\",\n },\n },\n charge_succeeded_after: {\n trigger_with_description_matches: {\n default: \"\",\n type: \"textarea\",\n description:\n \"Only send this email when the description matches exactly:\",\n placeholder: \"Example Product for 99p (leave blank to send regardless)\",\n },\n },\n trial_will_end_before: {\n trigger_only_in_trial: {\n default: true,\n type: \"boolean\",\n description:\n \"Only send this email if the customer has no payment details present\",\n },\n },\n trial_start_after: {\n trigger_only_in_trial: {\n default: true,\n type: \"boolean\",\n description:\n \"Only send this email if the customer has no payment details present\",\n },\n },\n trial_expired_after: {\n trigger_without_payment: {\n default: true,\n type: \"boolean\",\n description:\n \"Only send this email if the customer has no payment details present\",\n },\n trigger_when_canceled: {\n default: false,\n type: \"boolean\",\n description: \"Send this email when a customer transitions to canceled\",\n },\n },\n invoice_receipt_after: {\n skip_first_invoice: {\n default: false,\n type: \"boolean\",\n description: `Don't send this email the first time the customer is invoiced.`,\n link: `Why not?`,\n },\n },\n welcome_after: {\n if_trial_trigger_when: {\n default: \"payment_details_are_added\",\n type: \"select\",\n description: \"If upgrading from a trial, send this email\",\n options: [\n {\n value: \"payment_details_are_added\",\n description: \"when payment details are added\",\n },\n {\n value: \"start_of_new_billing_period\",\n description: \"at the start of the next billing period\",\n },\n ],\n },\n ignore_subscription_canceled: {\n default: false,\n type: \"boolean\",\n description: \"Send even if subscription state is cancelled\",\n },\n },\n cancellation_recovery_after: {\n include_cancelled_trials: {\n default: false,\n type: \"boolean\",\n description:\n \"Send this email even when a customer is cancelling from a trial.\",\n },\n },\n };\n\n var sentFromOptions = {\n bcc_email_address: {\n default: \"\",\n type: \"string\",\n description: \"Email address:\",\n },\n };\n\n var methods = {\n getTrigger: function (type) {\n return triggerOptions[type] || false;\n },\n getSentFrom: function () {\n return sentFromOptions;\n },\n };\n\n return methods;\n};\n","export const dotItem = () => {\n return {\n restrict: 'E',\n replace: true,\n scope: {\n callback: '&',\n label: '@',\n extraClass: '@',\n disabled: '='\n },\n template: \"
  • \"\n };\n};","export const analytics = () => {\n return {\n restrict: 'A',\n scope: {},\n bindToController: {_serviceItem: '=serviceItem', _service: '@service', _currency: '@currency'},\n controller: 'analyticsServiceController',\n controllerAs: 'analyticsServiceController'\n };\n};","export const metricLabel = () => {\n return {\n restrict: 'E',\n scope: { label: '@', calloutContent: '@' },\n template: `\n `\n };\n};","export const $connectModal = () => {\n let modal = {\n show: false\n };\n\n modal.new = () => {\n modal.show = true;\n };\n\n modal.hide = () => {\n modal.show = false;\n };\n\n return modal;\n\n};","export const $testSendModal = () => {\n let modal = {\n show: false\n };\n\n modal.new = () => {\n modal.show = true;\n };\n\n modal.hide = () => {\n modal.show = false;\n };\n\n return modal;\n\n};","export const stripeForm = {\n bindings: {\n type: '@'\n },\n template: `\n
    \n
    \n
    \n
    \n {{ $ctrl.submitting }}\n \n
    \n
    `\n};","class _Controller {\n constructor () {\n }\n}\n\n_Controller.$inject = [];\n\nexport const messages = {\n controller: _Controller,\n // template: require('./messages.html')\n};\n","import \"./messageNew.scss\";\nimport promiseMinTimeout from \"../../global/utils/promiseMinTimeout\";\n\nclass _Controller {\n\n constructor ($resourceManager, $notifier, $location, $opportunitiesAvailable, $timeout, $message) {\n this.$resourceManager = $resourceManager;\n this.$notifier = $notifier;\n this.$location = $location;\n this.$timeout = $timeout;\n this.$opportunitiesAvailable = $opportunitiesAvailable;\n this.opportunities = $opportunitiesAvailable.list();\n this.loaded = false;\n this.$message = $message;\n }\n\n $onInit() {\n this.$message.new().then(() => {\n this.loaded = true;\n });\n }\n\n createFromTemplate() {\n this.$notifier.red('Soon...');\n }\n\n createFromScratch() {\n this.submittedScratch = true;\n const creationPromise = this.$message.saveNew();\n promiseMinTimeout(creationPromise, 500).then(response => {\n this.$timeout(() => {\n this.$location.path('/automations/' + response.message.id, false).search({});\n }, 300)\n });\n }\n\n}\n\n_Controller.$inject = ['$resourceManager', '$notifier', '$location', '$opportunitiesAvailable', '$timeout', '$message'];\n\nexport const messageNew = {\n controller: _Controller,\n template: require(\"./messageNew.html\")\n};","export const $message = (\n $q,\n $resourceManager,\n $opportunitiesAvailable,\n $messageHelper,\n $emailHelper,\n $notifier,\n $location,\n $planTickboxes,\n $productTickboxes\n) => {\n let $message = {\n message: { loading: true },\n email: { loading: true },\n opportunity: {},\n targetingChanged: false\n };\n\n $message.setTargetingDirty = () => {\n $message.targetingChanged = true;\n };\n\n $message.setOpportunityType = type => {\n $message.message.opportunity_type = type;\n $message.opportunity = $opportunitiesAvailable.get(type);\n };\n\n $message.setTargetingClean = () => {\n $message.targetingChanged = false;\n };\n\n $message.reset = () => {\n $message.message = { loading: true };\n $message.email = { loading: true };\n $message.opportunity = {};\n $message.targetingChanged = false;\n };\n\n $message.updateOpportunity = () => {\n $message.opportunity = $opportunitiesAvailable.get(\n $message.message.opportunity_type\n );\n\n $planTickboxes.setSelected($message.message.settings.plans);\n $productTickboxes.setSelected($message.message.settings.products);\n };\n\n $message.new = type => {\n const params = !!type ? { opportunity_type: type } : {};\n return $message.build([\n $resourceManager.request(\"messages\", \"new\", params),\n $resourceManager.request(\"emails\", \"new\")\n ]);\n };\n\n $message.get = id => {\n return $message.build([\n $resourceManager.request(\"messages\", \"get\", { id }),\n $resourceManager.request(\"messages\", \"email\", { id })\n ]);\n };\n\n $message.build = promises => {\n return $q((resolve, reject) => {\n $q.all(promises)\n .then(responses => {\n let [messageResponse, emailResponse] = responses;\n let message = $messageHelper(messageResponse.message);\n let opportunity = $opportunitiesAvailable.get(\n message.opportunity_type\n );\n let email = $emailHelper(\n emailResponse.email,\n message.opportunity_type\n );\n $message.message = message;\n $message.opportunity = opportunity;\n $message.email = email;\n\n $planTickboxes.setSelected(message.settings.plans);\n $productTickboxes.setSelected(message.settings.products);\n\n resolve($message);\n })\n .catch(reject);\n });\n };\n\n $message.saveNew = () => {\n return $q((resolve, reject) => {\n $message.email.save().then(response => {\n $message.message.email_id = response.email.id;\n $message.message.save().then(response => {\n return resolve(response);\n });\n });\n });\n };\n\n $message.save = (onSave, isQuiet) => {\n $message.message.save().then(() => {\n $message.email.save().then(response => {\n $message.setTargetingClean();\n if (!isQuiet) $notifier.green(\"Saved.\");\n if (onSave) onSave(response);\n });\n });\n };\n\n $message.activate = () => {\n $resourceManager\n .request(\"messages\", \"start\", { id: $message.message.id })\n .then(() => {\n $message.message.activated = true;\n $message.message.state = \"started\";\n });\n };\n\n $message.deactivate = () => {\n $resourceManager\n .request(\"messages\", \"stop\", { id: $message.message.id })\n .then(() => {\n $message.message.activated = false;\n $message.message.state = \"stopped\";\n });\n };\n\n return $message;\n};\n\n$message.$inject = [\n \"$q\",\n \"$resourceManager\",\n \"$opportunitiesAvailable\",\n \"$messageHelper\",\n \"$emailHelper\",\n \"$notifier\",\n \"$location\",\n \"$planTickboxes\",\n \"$productTickboxes\"\n];\n","export const $activityStore = (\n $resourceManager,\n analyticsDateFilter,\n $cableConnection\n) => {\n let store = {\n activities: {\n // Gets populated by 'request' like so:\n // message-global: [],\n // message-1: [],\n // message-2: []\n }\n };\n\n store.add = message => {\n Object.entries(store.activities).forEach(([key, value]) => {\n if (value.request_id === message.request_id) {\n const oldStore = store.activities[key];\n const _store = {\n ...oldStore,\n loading: message.data.has_more_in_batch,\n remaining_in_db: message.data.remaining_in_db_after_batch,\n activities: [...oldStore.activities, ...message.data.activities]\n };\n angular.copy(_store, store.activities[key]);\n }\n });\n };\n\n store.reset = (key, period) => {\n if (key) {\n store.activities[key] = {\n loading: true,\n period: {\n start: analyticsDateFilter(period.start, \"start\"),\n end: analyticsDateFilter(period.end, \"end\")\n }\n };\n }\n };\n\n store.loadMore = messageId => {\n const key = `message-${messageId}`;\n const offset = store.activities[key].activities.length;\n store.request(messageId, key, offset);\n };\n\n store.setupAndRequest = (message, period) => {\n const messageId = message ? message.id : \"global\";\n const key = message ? `message-${message.id}` : \"message-global\";\n store.reset(key, period);\n store.request(messageId, key);\n };\n\n store.request = (messageId, key, offset) => {\n const params = buildRequestParams(messageId, key, offset);\n\n $resourceManager\n .request(\"messages\", \"activity\", params)\n .then(response => {\n store.activities[key].request_id = response.request_id;\n if (!offset) store.activities[key].activities = [];\n })\n .catch(() => {\n store.activities[key].loading = false;\n store.activities[key].failed = true;\n });\n };\n\n $cableConnection.registerFunction(message => {\n if (message.data) {\n store.add(message);\n }\n });\n\n const buildRequestParams = (messageId, key, offset) => {\n const period_start = store.activities[key].period.start;\n const period_end = store.activities[key].period.end;\n const request_id = `${messageId}-${new Date().getTime()}`;\n const params = { period_start, period_end, request_id };\n if (offset) params.offset = offset;\n if (messageId != \"global\") params.message_id = messageId;\n return params;\n };\n\n return store;\n};\n\n$activityStore.$inject = [\n \"$resourceManager\",\n \"analyticsDateFilter\",\n \"$cableConnection\"\n];\n","class _Controller {\n\n constructor ($resourceManager, UserService, $timeout, $testSendModal) {\n this.$resourceManager = $resourceManager;\n this.clientId = null;\n this.processing = true;\n this.user = UserService.user;\n this.$timeout = $timeout;\n this.showDesktop = false;\n this.$testSendModal = $testSendModal;\n this.showMobile = true;\n this.isMobile = true;\n }\n \n $onInit() {\n this.loadPreview();\n }\n\n $onChanges() {\n this.loadPreview();\n }\n\n doShowDesktop() {\n this.showMobile = false;\n this.$timeout(() => {\n this.showDesktop = true;\n }, 200)\n }\n\n doShowMobile() {\n this.showDesktop = false;\n this.$timeout(() => {\n this.showMobile = true;\n }, 200)\n }\n\n updateIsMobile() {\n if (this.isMobile) {\n this.doShowMobile();\n } else {\n this.doShowDesktop();\n }\n }\n\n fixMobileCss(html) {\n const [ before, after ] = html.split(\"