(()=>{"use strict";var e={2318:(e,t,r)=>{r(7280),r(5363),r(71);var n=r(8880),o=r(9592),a=r(3673);function i(e,t,r,n,o,i){const l=(0,a.up)("router-view");return(0,a.wg)(),(0,a.j4)(l)}const l=(0,a.aZ)({name:"App"});l.render=i;const s=l;var c=r(7083),d=r(9582);const p=[{path:"/",component:()=>Promise.all([r.e(736),r.e(812)]).then(r.bind(r,7050)),children:[{path:"",component:()=>Promise.all([r.e(736),r.e(536)]).then(r.bind(r,6536))},{path:"referral-link",component:()=>Promise.all([r.e(736),r.e(469)]).then(r.bind(r,6469)),meta:{authenticated:!0}},{path:"website-embeds",component:()=>Promise.all([r.e(736),r.e(338)]).then(r.bind(r,1338)),meta:{authenticated:!0}},{path:"auth/login",component:()=>Promise.all([r.e(736),r.e(977)]).then(r.bind(r,1977))},{path:"auth/register",component:()=>Promise.all([r.e(736),r.e(612)]).then(r.bind(r,3612))},{path:"auth/recover-password",component:()=>Promise.all([r.e(736),r.e(962)]).then(r.bind(r,962))},{path:"contacts",component:()=>Promise.all([r.e(736),r.e(762)]).then(r.bind(r,2762)),meta:{authenticated:!0}},{path:"contacts/create",component:()=>Promise.all([r.e(736),r.e(481)]).then(r.bind(r,3481)),meta:{authenticated:!0}},{path:"contacts/:id",component:()=>Promise.all([r.e(736),r.e(247)]).then(r.bind(r,247)),meta:{authenticated:!0}},{path:"contacts/referral-sign-up",component:()=>Promise.all([r.e(736),r.e(50)]).then(r.bind(r,6050)),props:e=>({referralCode:e.query.c})},{path:"bitrix-test",component:()=>Promise.all([r.e(736),r.e(45)]).then(r.bind(r,6045))},{path:"12-step",component:()=>Promise.all([r.e(736),r.e(215)]).then(r.bind(r,9132)),meta:{authenticated:!0}},{path:"stripe-success",component:()=>Promise.all([r.e(736),r.e(658)]).then(r.bind(r,7658))},{path:"document-collection",component:()=>Promise.all([r.e(736),r.e(19)]).then(r.bind(r,8258)),meta:{authenticated:!0}},{path:"membership",component:()=>Promise.all([r.e(736),r.e(104)]).then(r.bind(r,3104)),meta:{authenticated:!0}}]},{path:"/:catchAll(.*)*",component:()=>Promise.all([r.e(736),r.e(193)]).then(r.bind(r,2193))}],u=p,h=(0,c.BC)((function(){const e=d.r5,t=(0,d.p7)({scrollBehavior:()=>({left:0,top:0}),routes:u,history:e("")});return t}));async function m(e,t){const r="function"===typeof h?await h({}):h,n=e(s);return n.use(o.Z,t),{app:n,router:r}}var f=r(1417);const b={config:{},plugins:{Dialog:f.Z}},g="";async function v({app:e,router:t},r){let n=!1;const o=e=>{n=!0;const r=Object(e)===e?t.resolve(e).fullPath:e;window.location.href=r},a=window.location.href.replace(window.location.origin,"");for(let l=0;!1===n&&lPromise.all([Promise.resolve().then(r.bind(r,4112)),Promise.resolve().then(r.bind(r,5474)),Promise.resolve().then(r.bind(r,9414)),Promise.resolve().then(r.bind(r,8454))]).then((t=>{const r=t.map((e=>e.default)).filter((e=>"function"===typeof e));v(e,r)}))))},5474:(e,t,r)=>{r.r(t),r.d(t,{default:()=>l,axios:()=>a.a,api:()=>i});var n=r(7083),o=r(52),a=r.n(o);const i=a().create({baseURL:"https://api.example.com"}),l=(0,n.xr)((({app:e})=>{e.config.globalProperties.$axios=a(),e.config.globalProperties.$api=i}))},9414:(e,t,r)=>{r.r(t),r.d(t,{default:()=>s,Backendless:()=>o.a});var n=r(3090),o=r.n(n);const a="https://api.backendless.com",i="F17D9B93-F79C-11FD-FF1A-DFF1CAD4BB00",l="DEA9F73E-77D0-477B-A0D4-7FA81BBD529E";o().serverURL=a,o().initApp(i,l);const s=async({app:e})=>{e.config.globalProperties.$backendless=o()}},4112:(e,t,r)=>{r.r(t),r.d(t,{default:()=>s,i18n:()=>l});var n=r(7083),o=r(5948);const a={failed:"Action failed",success:"Action was successful"},i={"en-US":a},l=(0,o.o)({locale:"en-US",messages:i}),s=(0,n.xr)((({app:e})=>{e.use(l)}))},8454:(e,t,r)=>{r.r(t),r.d(t,{default:()=>i});var n=r(1959);const o=(e,t,r)=>{console.log(e),t.config.globalProperties.$currentUser=null,t.config.globalProperties.$loggedIn.value=!1,r({path:"/auth/login"})},a=(e,t)=>{e.config.globalProperties.$backendless.UserService.getCurrentUser().then((function(r){r?(e.config.globalProperties.$currentUser=r,e.config.globalProperties.$loggedIn.value=!0,r.bitrixContactId?t():e.config.globalProperties.$axios.get("https://api.backendless.com/F17D9B93-F79C-11FD-FF1A-DFF1CAD4BB00/F9399ACC-F088-4B87-8208-05429CCD8EF3/services/BitrixService/UserIdByEmail",{params:{email:e.config.globalProperties.$currentUser.email,firstName:e.config.globalProperties.$currentUser.firstName,lastName:e.config.globalProperties.$currentUser.lastName}}).then((function(r){(r.status=r.data)?(e.config.globalProperties.$currentUser.bitrixContactId=r.data,t()):o("Error getting contact with email:"+e.config.globalProperties.$currentUser.email,e,t)}))):(e.config.globalProperties.$currentUser=null,e.config.globalProperties.$loggedIn.value=!1,t({path:"/auth/login"}))})).catch((function(r){o(r,e,t)}))},i=async({app:e,router:t})=>{e.config.globalProperties.$loggedIn=(0,n.iH)(!1),t.beforeEach(((t,r,n)=>{t.matched.some((e=>e.meta.authenticated))?a(e,n):n()}))}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.loaded=!0,a.exports}r.m=e,(()=>{var e=[];r.O=(t,n,o,a)=>{if(!n){var i=1/0;for(d=0;d=a)&&Object.keys(r.O).every((e=>r.O[e](n[s])))?n.splice(s--,1):(l=!1,a0&&e[d-1][2]>a;d--)e[d]=e[d-1];e[d]=[n,o,a]}})(),(()=>{r.n=e=>{var t=e&&e.__esModule?()=>e["default"]:()=>e;return r.d(t,{a:t}),t}})(),(()=>{r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}})(),(()=>{r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((t,n)=>(r.f[n](e,t),t)),[]))})(),(()=>{r.u=e=>"js/"+e+"."+{19:"6bab9cb0",45:"3b5ad6ca",50:"0aead1c1",104:"a913df70",193:"62bf57b6",215:"ab7df277",247:"84cc6a77",338:"40f9a203",469:"09780e60",481:"15be89c3",536:"2362b053",612:"85b85c20",658:"77fda396",762:"be43b64a",812:"c3f2db88",962:"09353cd0",977:"15a7922c"}[e]+".js"})(),(()=>{r.miniCssF=e=>"css/"+(736===e?"vendor":e)+"."+{736:"eef5cca9",812:"1c889707"}[e]+".css"})(),(()=>{r.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()})(),(()=>{r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{var e={},t="debt-masters-crm:";r.l=(n,o,a,i)=>{if(e[n])e[n].push(o);else{var l,s;if(void 0!==a)for(var c=document.getElementsByTagName("script"),d=0;d{l.onerror=l.onload=null,clearTimeout(h);var o=e[n];if(delete e[n],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach((e=>e(r))),t)return t(r)},h=setTimeout(u.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=u.bind(null,l.onerror),l.onload=u.bind(null,l.onload),s&&document.head.appendChild(l)}}})(),(()=>{r.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})(),(()=>{r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e)})(),(()=>{r.p=""})(),(()=>{var e=(e,t,r,n)=>{var o=document.createElement("link");o.rel="stylesheet",o.type="text/css";var a=a=>{if(o.onerror=o.onload=null,"load"===a.type)r();else{var i=a&&("load"===a.type?"missing":a.type),l=a&&a.target&&a.target.href||t,s=new Error("Loading CSS chunk "+e+" failed.\n("+l+")");s.code="CSS_CHUNK_LOAD_FAILED",s.type=i,s.request=l,o.parentNode.removeChild(o),n(s)}};return o.onerror=o.onload=a,o.href=t,document.head.appendChild(o),o},t=(e,t)=>{for(var r=document.getElementsByTagName("link"),n=0;nnew Promise(((o,a)=>{var i=r.miniCssF(n),l=r.p+i;if(t(i,l))return o();e(n,l,o,a)})),o={143:0};r.f.miniCss=(e,t)=>{var r={812:1};o[e]?t.push(o[e]):0!==o[e]&&r[e]&&t.push(o[e]=n(e).then((()=>{o[e]=0}),(t=>{throw delete o[e],t})))}})(),(()=>{var e={143:0};r.f.j=(t,n)=>{var o=r.o(e,t)?e[t]:void 0;if(0!==o)if(o)n.push(o[2]);else{var a=new Promise(((r,n)=>o=e[t]=[r,n]));n.push(o[2]=a);var i=r.p+r.u(t),l=new Error,s=n=>{if(r.o(e,t)&&(o=e[t],0!==o&&(e[t]=void 0),o)){var a=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;l.message="Loading chunk "+t+" failed.\n("+a+": "+i+")",l.name="ChunkLoadError",l.type=a,l.request=i,o[1](l)}};r.l(i,s,"chunk-"+t,t)}},r.O.j=t=>0===e[t];var t=(t,n)=>{var o,a,[i,l,s]=n,c=0;for(o in l)r.o(l,o)&&(r.m[o]=l[o]);if(s)var d=s(r);for(t&&t(n);cr(2318)));n=r.O(n)})();