????

Your IP : 18.217.79.15


Current Path : /home/ncom/public_html/wp-content/plugins/optinmonster/vue/dist/js/
Upload File :
Current File : /home/ncom/public_html/wp-content/plugins/optinmonster/vue/dist/js/playbooks.ad8f6c27.js.map

{"version":3,"file":"js/playbooks.ad8f6c27.js","mappings":"uNAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAQF,EAAII,qBAAsBF,EAAG,2BAA2B,CAACG,MAAM,CAAC,gBAAe,KAAQH,EAAG,YAAY,CAACA,EAAG,MAAM,CAACI,YAAY,2CAA2CC,MAAM,CAAEC,YAAY,IAAS,CAACN,EAAG,qBAAqB,CAACG,MAAM,CAAC,QAAU,YAAY,KAAOL,EAAIS,QAAST,EAAIU,OAAOC,OAAQT,EAAG,MAAM,CAACI,YAAY,YAAYM,YAAY,CAAC,OAAS,mBAAmB,CAACV,EAAG,cAAc,CAACG,MAAM,CAAC,OAASL,EAAIU,WAAW,GAAGV,EAAIa,KAAKX,EAAG,MAAM,CAACI,YAAY,qBAAqB,CAACJ,EAAG,mBAAoBF,EAAIc,UAAWZ,EAAG,eAAe,CAACI,YAAY,sBAAsBJ,EAAG,MAAM,CAAEF,EAAIe,mBAAoBb,EAAG,6BAA6BF,EAAIa,KAAKX,EAAG,oBAAoB,IAAI,GAAGA,EAAG,0BAA0B,CAACA,EAAG,sBAAsB,CAACI,YAAY,iBAAiBM,YAAY,CAAC,OAAS,YAAYP,MAAM,CAAC,KAAO,SAAS,aAAa,YAAY,OAAS,UAAUW,KAAK,UAAU,CAAChB,EAAIiB,GAAG,0BAA0B,GAAGf,EAAG,kCAAkC,CAACG,MAAM,CAAC,iBAAgB,KAAQH,EAAG,kCAAkC,IACzjC,EACIgB,EAAkB,G,kECsCtB,GACAC,OAAAA,CAAAA,EAAAA,EAAAA,EAAAA,EAAAA,EAAAA,EAAAA,EAAAA,GACAC,SAAAA,KACA,wBACA,uFACA,kDACA,4CAMAN,SAAAA,GACA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EACzBE,EAAOa,QAAQE,KAAOhB,GACjB,IAAAiB,kBACJhB,EAAOa,QAAQI,KAAM,IAAAC,iBAAkB,MAAQ,EAAAC,YAGhDd,EAAKe,YAAYpB,GAEVA,CAAM,EChBDqB,EAAwB,CACpC,OAAA5C,GACCvB,KAAKoE,mBAGL,WAEA,WAEA,WAEA,WAEA,UAEApE,KAAKqE,OAAOC,WAAWC,IACtB,MAAMC,EAAS,CACd,8BACA,0BACA,0BACA,sBACA,2BACA,4BACA,oBACA,0BAEKC,EAAW,CAAC,uBAElB,IAAIC,EAAcH,EAAShB,KAAKoB,WAAW,gBAAkBH,EAAOI,SAASL,EAAShB,MACjFmB,IACJA,EAAcD,EAASG,SAASL,EAAShB,OAGtCmB,GACH1E,KAAK6E,kBACN,GAEF,EACA,aAAAC,IACC,SAAkB,IAClB,SAAgB,IAChB,SAAqB,IACrB,SAAqB,IACrB,SAAkB,EACnB,EACAjD,QAAS,CACR,eAAAuC,CAAgBW,EAAK,oBACpB,CAAC,cAAe,eAAgB,oBAAqB,oBAAoBC,SAASC,GACjFlC,SAASgC,GAAIE,EAAKjF,KAAKkF,eAEzB,EASA,YAAAA,GACClF,KAAKoE,gBAAgB,uBACrBpE,KAAKqE,OAAOc,OAAO,yBACpB,EAMA,gBAAAN,IACC,UACA7E,KAAKqE,OAAOc,OAAO,8BAA+B,IAClDnF,KAAKqE,OAAOc,OAAO,0BAA2B,GAC/C,EAUA,aAAA1C,CAAcE,EAAUC,EAAWC,GAClC,OAAOJ,EAAc,KAAK2C,QAASzC,EAAUC,EAAWC,EACzD,G","sources":["webpack://optinmonster-wordpress-plugin-vue-app/./src/pages/Playbooks.vue","webpack://optinmonster-wordpress-plugin-vue-app/src/pages/Playbooks.vue","webpack://optinmonster-wordpress-plugin-vue-app/./src/pages/Playbooks.vue?3d41","webpack://optinmonster-wordpress-plugin-vue-app/./src/pages/Playbooks.vue?a029","webpack://optinmonster-wordpress-plugin-vue-app/./src/components/mixins/creation.js","webpack://optinmonster-wordpress-plugin-vue-app/./node_modules/optinmonster-js-library/src/utils/apiJsScript.js","webpack://optinmonster-wordpress-plugin-vue-app/./node_modules/optinmonster-js-library/src/vue/templates/mixins/templatePreviewsSetup.js"],"sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.reachedCampaignLimit)?_c('templates-limit-exceeded',{attrs:{\"is-playbooks\":true}}):_c('core-page',[_c('div',{staticClass:\"playbooks-page-wrapper dashboard-wrapper\",class:{ previewing: false }},[_c('common-page-tabnav',{attrs:{\"current\":\"playbooks\",\"tabs\":_vm.tabs}}),(_vm.alerts.length)?_c('div',{staticClass:\"container\",staticStyle:{\"margin\":\"46px auto 40px\"}},[_c('core-alerts',{attrs:{\"alerts\":_vm.alerts}})],1):_vm._e(),_c('div',{staticClass:\"playbooks-content\"},[_c('playbooks-intro'),(_vm.isLoading)?_c('core-loading',{staticClass:\"playbooks-loading\"}):_c('div',[(_vm.hasRecommendations)?_c('playbooks-recommendations'):_vm._e(),_c('playbooks-table')],1)],1),_c('playbooks-upgrade-modal',[_c('core-upgrade-button',{staticClass:\"button primary\",staticStyle:{\"margin\":\"0 0 15px\"},attrs:{\"slot\":\"button\",\"utm-medium\":\"Playbooks\",\"target\":\"_blank\"},slot:\"button\"},[_vm._v(\" Unlock Access Now \")])],1),_c('campaigns-modal-create-campaign',{attrs:{\"from-playbook\":true}}),_c('templates-modal-not-connected')],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n\t<templates-limit-exceeded v-if=\"reachedCampaignLimit\" :is-playbooks=\"true\" />\n\t<core-page v-else>\n\t\t<div class=\"playbooks-page-wrapper dashboard-wrapper\" :class=\"{ previewing: false }\">\n\t\t\t<common-page-tabnav current=\"playbooks\" :tabs=\"tabs\" />\n\t\t\t<div v-if=\"alerts.length\" class=\"container\" style=\"margin: 46px auto 40px\">\n\t\t\t\t<core-alerts :alerts=\"alerts\" />\n\t\t\t</div>\n\t\t\t<div class=\"playbooks-content\">\n\t\t\t\t<playbooks-intro />\n\t\t\t\t<core-loading v-if=\"isLoading\" class=\"playbooks-loading\" />\n\t\t\t\t<div v-else>\n\t\t\t\t\t<playbooks-recommendations v-if=\"hasRecommendations\" />\n\t\t\t\t\t<playbooks-table />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<playbooks-upgrade-modal>\n\t\t\t\t<core-upgrade-button\n\t\t\t\t\tslot=\"button\"\n\t\t\t\t\tutm-medium=\"Playbooks\"\n\t\t\t\t\tclass=\"button primary\"\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\tstyle=\"margin: 0 0 15px\"\n\t\t\t\t>\n\t\t\t\t\tUnlock Access Now\n\t\t\t\t</core-upgrade-button>\n\t\t\t</playbooks-upgrade-modal>\n\t\t\t<campaigns-modal-create-campaign :from-playbook=\"true\" />\n\t\t\t<templates-modal-not-connected />\n\t\t</div>\n\t</core-page>\n</template>\n\n<script>\nimport { mapState, mapGetters, mapMutations } from 'vuex';\nimport { filtering } from 'optinmonster-js-library/src/vue/playbooks/mixins/filtering';\nimport { rules } from 'optinmonster-js-library/src/vue/playbooks/mixins/rules';\nimport { creation } from '@/components/mixins/creation';\nimport { templatePreviewsSetup } from 'optinmonster-js-library/src/vue/templates/mixins/templatePreviewsSetup';\n\nexport default {\n\tmixins: [filtering, templatePreviewsSetup, creation, rules],\n\tcomputed: {\n\t\t...mapState(['alerts']),\n\t\t...mapState('playbooks', ['playbooks', 'previewing', 'filterOptions', 'selectedPlaybook']),\n\t\t...mapGetters(['connected', 'reachedCampaignLimit']),\n\t\t...mapGetters('playbooks', ['hasRecommendations']),\n\t\t/**\n\t\t * Is Loading\n\t\t *\n\t\t * @returns {boolean} Are playbooks, rules, or filters loading?\n\t\t */\n\t\tisLoading() {\n\t\t\treturn this.$store.getters.isLoading(['playbooks', 'rules', 'filterOptions']);\n\t\t},\n\t\t/**\n\t\t * Get the unavailable rules\n\t\t *\n\t\t * @returns {Array} The array of unavailable rules.\n\t\t */\n\t\tunavailableRules() {\n\t\t\treturn this.selectedPlaybook.rules.filter((rule) => !this.ruleAvailable(rule)) || [];\n\t\t},\n\t},\n\twatch: {\n\t\t/**\n\t\t * Listen for changes to the selected Playbook. This will\n\t\t * then trigger the creation flow.\n\t\t *\n\t\t * @param {Object} playbook The selected Playbook.\n\t\t *\n\t\t * @returns {void}\n\t\t */\n\t\tselectedPlaybook(playbook) {\n\t\t\tif (playbook) {\n\t\t\t\tthis.handleUsePlaybook();\n\t\t\t}\n\t\t},\n\t},\n\tcreated() {\n\t\tthis.$store\n\t\t\t.dispatch('campaigns/fetchRulesetData')\n\t\t\t.then((data) => {\n\t\t\t\tlet rules = data.rules;\n\n\t\t\t\trules.push(...data.bigCommerceRules);\n\t\t\t\trules.push(...data.eddRules);\n\t\t\t\trules.push(...data.shopifyRules);\n\t\t\t\trules.push(...data.wooCommerceRules);\n\n\t\t\t\tthis.setRules(rules);\n\t\t\t})\n\t\t\t.catch(() => {});\n\n\t\t// No filter options? Go get'em.\n\t\tif (!this.filterOptions.length) {\n\t\t\tthis.$store\n\t\t\t\t.dispatch('templates/fetchFilterOptions')\n\t\t\t\t.then(({ body }) => {\n\t\t\t\t\tthis.setFilterOptions(body);\n\t\t\t\t})\n\t\t\t\t.catch(() => {});\n\t\t}\n\n\t\t// No Playbooks, get them too.\n\t\tif (!this.playbooks.length) {\n\t\t\tthis.$store\n\t\t\t\t.dispatch('playbooks/fetchPlaybooksData')\n\t\t\t\t.then(() => {\n\t\t\t\t\tif (this.$store.getters.connected) {\n\t\t\t\t\t\tthis.$store.dispatch('playbooks/fetchRecommendationsData').catch(() => {});\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.catch(() => {});\n\t\t}\n\n\t\tthis.setDismissedRecommendations();\n\n\t\tthis.loadApiScript(\n\t\t\t'omwpapi-playbooks-apijs',\n\t\t\tthis.$constants.PLAYBOOKS_PREVIEW_ACCOUNT,\n\t\t\tthis.$constants.PLAYBOOKS_PREVIEW_USER\n\t\t);\n\t},\n\tmethods: {\n\t\t...mapMutations('playbooks', ['setDismissedRecommendations', 'setRules', 'setFilterOptions', 'setUpgradeRule']),\n\t\t/**\n\t\t * Handle clicking the 'Use Playbook' button.\n\t\t *\n\t\t * @returns {void}\n\t\t */\n\t\thandleUsePlaybook() {\n\t\t\tthis.$store.commit('templates/setActiveTemplate', this.selectedPlaybook);\n\n\t\t\tif (!this.$store.getters.connected) {\n\t\t\t\treturn this.$modal.show('not-connected');\n\t\t\t}\n\n\t\t\tif (this.unavailableRules.length) {\n\t\t\t\tconst rule = ['exit-intent', 'inactivity-time'].find((rule) => this.unavailableRules.includes(rule));\n\n\t\t\t\tif (rule) {\n\t\t\t\t\tthis.setUpgradeRule(rule);\n\t\t\t\t}\n\t\t\t\treturn this.$modal.show('upgrade-modal');\n\t\t\t}\n\n\t\t\tthis.$modal.show('create-campaign-modal');\n\t\t},\n\t},\n};\n</script>\n<style lang=\"scss\">\n@import '../assets/scss/pages/playbooks.scss';\n</style>\n","import mod from \"-!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./Playbooks.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!../../node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./Playbooks.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Playbooks.vue?vue&type=template&id=18e6b3ec&\"\nimport script from \"./Playbooks.vue?vue&type=script&lang=js&\"\nexport * from \"./Playbooks.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Playbooks.vue?vue&type=style&index=0&id=18e6b3ec&prod&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\nexport default component.exports","export const creation = {\n\tdata() {\n\t\treturn {\n\t\t\ttabs: {\n\t\t\t\ttemplates: {\n\t\t\t\t\tname: 'Templates',\n\t\t\t\t\troute: {\n\t\t\t\t\t\tpath: 'templates',\n\t\t\t\t\t\tparams: { tab: 'popup' },\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tplaybooks: {\n\t\t\t\t\tname: 'Playbooks',\n\t\t\t\t\troute: {\n\t\t\t\t\t\tpath: 'playbooks',\n\t\t\t\t\t\tparams: {},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t},\n};\n","import { isProduction, isDevelopment, currentEnv } from './env';\n\nexport const loadApiScript = (apiJsUrl, scriptId, accountid, userId) => {\n\tlet script = document.getElementById(scriptId);\n\tif (script) {\n\t\treturn script;\n\t}\n\n\tif (!apiJsUrl) {\n\t\tconsole.error('apiJsUrl not provided to loadApiScript');\n\t\treturn;\n\t}\n\n\tconst head = document.getElementsByTagName('head')[0] || document.documentElement;\n\tscript = document.createElement('script');\n\tscript.type = 'text/javascript';\n\tscript.id = scriptId;\n\tscript.src = apiJsUrl;\n\tscript.async = true;\n\tscript.dataset.account = accountid;\n\tscript.dataset.user = userId;\n\tif (!isProduction()) {\n\t\tscript.dataset.env = isDevelopment() ? 'dev' : currentEnv;\n\t}\n\n\thead.appendChild(script);\n\n\treturn script;\n};\n","import {\n\tcloseCampaigns,\n\tinitCampaignsDemo,\n\tinitCampaignsWp,\n\tinitCampaignsPreview,\n\tinitCampaignsBgClick,\n\tinitMobilePreview,\n} from 'optinmonster-js-library/src/utils/omapi';\nimport { urls } from 'optinmonster-js-library/src/vue/utils';\nimport { loadApiScript } from 'optinmonster-js-library/src/utils/apiJsScript';\n\nexport const templatePreviewsSetup = {\n\tcreated() {\n\t\tthis.listenApiLoaded();\n\n\t\t// Ensure campaigns are flagged as demos.\n\t\tinitCampaignsDemo();\n\t\t// Ensure campaigns are flagged as wp.\n\t\tinitCampaignsWp();\n\t\t// Make previews closeable by clicking background.\n\t\tinitCampaignsBgClick();\n\t\t// Disable form fields\n\t\tinitCampaignsPreview();\n\t\t// Handle mobile template previews\n\t\tinitMobilePreview();\n\n\t\tthis.$store.subscribe((mutation) => {\n\t\t\tconst ignore = [\n\t\t\t\t'templates/setLoadingPreview',\n\t\t\t\t'templates/setPreviewing',\n\t\t\t\t'templates/filterOptions',\n\t\t\t\t'templates/templates',\n\t\t\t\t'templates/permittedTypes',\n\t\t\t\t'templates/recentTemplates',\n\t\t\t\t'templates/popular',\n\t\t\t\t'templates/setApiLoaded',\n\t\t\t];\n\t\t\tconst triggers = ['route/ROUTE_CHANGED'];\n\n\t\t\tlet shouldClose = mutation.type.startsWith('templates/') && !ignore.includes(mutation.type);\n\t\t\tif (!shouldClose) {\n\t\t\t\tshouldClose = triggers.includes(mutation.type);\n\t\t\t}\n\n\t\t\tif (shouldClose) {\n\t\t\t\tthis.closeAllPreviews();\n\t\t\t}\n\t\t});\n\t},\n\tbeforeDestroy() {\n\t\tinitCampaignsDemo(false);\n\t\tinitCampaignsWp(false);\n\t\tinitCampaignsPreview(false);\n\t\tinitCampaignsBgClick(false);\n\t\tinitMobilePreview(false);\n\t},\n\tmethods: {\n\t\tlistenApiLoaded(cb = 'addEventListener') {\n\t\t\t['om.Api.init', 'om.Main.init', 'om.Campaigns.init', 'om.Campaign.init'].forEach((evt) =>\n\t\t\t\tdocument[cb](evt, this.setApiLoaded)\n\t\t\t);\n\t\t},\n\t\t/**\n\t\t * Handle finishing the API load.\n\t\t *\n\t\t * Remove the apiLoaded event listener and set the\n\t\t * apiLoaded flag to true once the api has loaded.\n\t\t *\n\t\t * @returns {void}\n\t\t */\n\t\tsetApiLoaded() {\n\t\t\tthis.listenApiLoaded('removeEventListener');\n\t\t\tthis.$store.commit('templates/setApiLoaded');\n\t\t},\n\t\t/**\n\t\t * Handles closing all open campaigns and resetting preview state.\n\t\t *\n\t\t * @returns {void}\n\t\t */\n\t\tcloseAllPreviews() {\n\t\t\tcloseCampaigns();\n\t\t\tthis.$store.commit('templates/setLoadingPreview', '');\n\t\t\tthis.$store.commit('templates/setPreviewing', '');\n\t\t},\n\t\t/**\n\t\t * Handles generating our api script tag.\n\t\t *\n\t\t * @param {string} scriptId The script id.\n\t\t * @param {int} accountid The account id.\n\t\t * @param {int} userId The user id.\n\t\t *\n\t\t * @returns {string} The script tag\n\t\t */\n\t\tloadApiScript(scriptId, accountid, userId) {\n\t\t\treturn loadApiScript(urls.apiJs(), scriptId, accountid, userId);\n\t\t},\n\t},\n};\n"],"names":["render","_vm","this","_c","_self","reachedCampaignLimit","attrs","staticClass","class","previewing","tabs","alerts","length","staticStyle","_e","isLoading","hasRecommendations","slot","_v","staticRenderFns","mixins","computed","unavailableRules","watch","selectedPlaybook","created","dispatch","then","rules","catch","body","methods","handleUsePlaybook","component","creation","data","templates","name","route","path","params","tab","playbooks","loadApiScript","apiJsUrl","scriptId","accountid","userId","script","document","getElementById","console","error","head","getElementsByTagName","documentElement","createElement","type","id","src","async","dataset","account","user","isProduction","env","isDevelopment","currentEnv","appendChild","templatePreviewsSetup","listenApiLoaded","$store","subscribe","mutation","ignore","triggers","shouldClose","startsWith","includes","closeAllPreviews","beforeDestroy","cb","forEach","evt","setApiLoaded","commit","apiJs"],"sourceRoot":""}