1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3445],{76439:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});var a=n(72919);let r=(0,a.Z)("circle-play",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]])},76915:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});var a=n(72919);let r=(0,a.Z)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},56953:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});var a=n(72919);let r=(0,a.Z)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]])},66592:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});var a=n(72919);let r=(0,a.Z)("octagon-pause",[["path",{d:"M10 15V9",key:"1lckn7"}],["path",{d:"M14 15V9",key:"1muqhk"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}]])},13718:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});var a=n(72919);let r=(0,a.Z)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},15309:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/engagement",function(){return n(76976)}])},76976:function(t,e,n){"use strict";n.r(e),n.d(e,{__N_SSG:function(){return y}});var a=n(85893),r=n(67294),s=n(9008),c=n.n(s),o=n(36081);n(85523);var i=n(30273),u=n(64988),l=n(45661),d=n(37497),m=n(31325),y=!0;e.default=t=>{let{}=t,[e,n]=(0,r.useState)(null);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c(),{children:(0,a.jsx)("title",{children:"Engagement | Somble"})}),(0,a.jsx)(i.wF,{children:(0,a.jsxs)(i.PR,{children:[(0,a.jsx)(o.Z,{}),(0,a.jsx)(i.GD,{children:(0,a.jsx)(i._8,{className:"py-0",children:(0,a.jsxs)(i.T1,{children:[(0,a.jsxs)(i.BL,{children:[(0,a.jsx)(i.Oo,{}),(0,a.jsx)(u.Z,{})]}),(0,a.jsxs)("div",{className:"flex justify-between items-start sm:items-center flex-col sm:flex-row mt-4 md:mt-0",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(i.TG,{children:"Engagement Overview"}),(0,a.jsx)(i.Dy,{children:"View and manage ways you engage with your clients"}),(0,a.jsx)(i.Gw,{type:"engagement",children:"Learn more about engagement"})]}),(0,a.jsxs)(d.Z,{palette:"var(--c-sk-accent-500)",shape:"rect",size:"sm",className:"!py-1.5 !px-3 !h-[34px] !mt-5 sm:!m-0 !min-w-[212px]",handleClick:()=>n(Date.now()),children:[(0,a.jsx)(m.Z,{size:"16",className:"mr-2"}),"Create New Automation"]})]}),(0,a.jsx)("div",{className:"mt-5 flex-grow max-h-[calc(100%-168px-20px)] md:max-h-[calc(100%-56px-82px-20px-16px)]",children:(0,a.jsx)("div",{className:"md:mt-4 h-[calc(100%-16px)] max-h-[calc(100%-16px)]",children:(0,a.jsx)(l.Z,{createAutomationKey:e})})})]})})})]})})]})}},89904:function(t,e,n){"use strict";n.d(e,{NQ:function(){return getMyCohorts},aJ:function(){return getMyCommunity},bs:function(){return removeContactFromList},qI:function(){return getMyAutomations},wx:function(){return getCommunityMostVisited}});var a=n(9669),r=n.n(a),s=n(12526),c=n(63605),o=n(59269);let getMyCommunity=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return async(e,n)=>{let a=n().MyCommunity.contacts||[],i=0==a.length,u=t?parseInt(n().MyCommunity.offset||0)+5e3:0;e({type:"GET_MY_COMMUNITY_REQUEST",payload:{loadingEnum:i?"LOADING":"LOADED"}});let l=n().CurrentUser.user.user_id;try{let t=await r()({url:"".concat(s.default.somble.apiURL,"/users/").concat(l,"/my-community?contactOffset=").concat(u),method:"GET",headers:{Authorization:await (0,c.L)()}});if(200===t.status){let n=t.data&&t.data.contactData&&t.data.contactData.filter(t=>{let{email_address:e,user_id:n}=t;return e&&e.includes("@")&&(!n||n!=l)});return e({type:"GET_MY_COMMUNITY_SUCCESS",payload:{contacts:(0,o.Sx)([...a,...n],"email_address"),upcomingSchedule:t.data.upcomingSchedule,pastMessages:t.data.pastMessages,offset:u,moreContacts:t.data.moreContacts}})}throw Error("Something went wrong")}catch(t){e({type:"GET_MY_COMMUNITY_ERROR",payload:{error:t.message}})}}},getCommunityMostVisited=()=>async(t,e)=>{let n=e().CurrentUser.user.user_id;try{let e=await r()({url:"".concat(s.default.somble.apiURL,"/analytics/").concat(n,"/community-most-visited"),method:"GET",headers:{Authorization:await (0,c.L)()}});200===e.status&&t({type:"GET_COMMUNITY_MOST_VISITED",payload:{communityMostVisited:e.data.mostVisitedData}})}catch(t){}},removeContactFromList=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return async(e,n)=>{let a=Array.from(n().MyCommunity.contacts||[]),r=a.findIndex(e=>{let{email_address:n}=e;return n==t});r>-1&&(a.splice(r,1),e({type:"UPDATE_COMMUNITY_CONTACTS",payload:{contacts:a}}))}},getMyCohorts=()=>async(t,e)=>{let n=e().CurrentUser.user,{user_id:a}=n||{};try{let e=await r()({url:"".concat(s.default.somble.apiURL,"/analytics/").concat(a,"/community-cohort"),method:"GET",headers:{Authorization:await (0,c.L)()}});if(200==e.status)return t({type:"GET_MY_COMMUNITY_COHORT",payload:{communityCohorts:e.data.communityCohortData}});throw Error("Something went wrong")}catch(t){}},getMyAutomations=()=>async(t,e)=>{let n=e().CurrentUser.user.user_id;try{let e=await r()({url:"".concat(s.default.somble.apiURL,"/instructors/").concat(n,"/automations"),method:"GET",headers:{Authorization:await (0,c.L)()}});200===e.status&&t({type:"GET_COMMUNITY_AUTOMATIONS",payload:{automations:e.data.automations||[]}})}catch(t){}}},78724:function(t,e,n){"use strict";
1n.d(e,{e:function(){return useEscapeKeydown}});var a=n(67294),r=n(79698);function useEscapeKeydown(t,e=globalThis?.document){let n=(0,r.W)(t);a.useEffect(()=>{let handleKeyDown=t=>{"Escape"===t.key&&n(t)};return e.addEventListener("keydown",handleKeyDown,{capture:!0}),()=>e.removeEventListener("keydown",handleKeyDown,{capture:!0})},[n,e])}},57898:function(t,e,n){"use strict";n.d(e,{D:function(){return usePrevious}});var a=n(67294);function usePrevious(t){let e=a.useRef({value:t,previous:t});return a.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}}},function(t){t.O(0,[6911,1509,8057,142,5155,2213,8254,5239,1446,1214,8531,2023,4477,613,308,1430,3362,9324,1497,6649,8185,8197,1352,5361,3184,6746,835,767,6282,8934,4991,5661,9774,567,179],function(){return t(t.s=15309)}),_N_E=t.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.