{"version":3,"sources":["webpack:///./src/apps/call/CounterpartDisplayCell.vue?1725","webpack:///src/apps/call/CounterpartDisplayCell.vue","webpack:///./src/apps/call/CounterpartDisplayCell.vue?dcc5","webpack:///./src/apps/call/CounterpartDisplayCell.vue","webpack:///./src/apps/call/CounterpartDisplayCell.vue?2ed9","webpack:///./src/apps/call/CallViewCounterpartComponents/LoadCrmDataWarningModal.vue?cf65","webpack:///src/apps/call/CallViewCounterpartComponents/LoadCrmDataWarningModal.vue","webpack:///./src/apps/call/CallViewCounterpartComponents/LoadCrmDataWarningModal.vue?07d2","webpack:///./src/apps/call/CallViewCounterpartComponents/LoadCrmDataWarningModal.vue","webpack:///./src/apps/talkscript/components/dynamicDataIndex.js","webpack:///./src/apps/base/ErrorModal.vue?968e","webpack:///./src/apps/user/IntegrationReconnectButton.vue?266a","webpack:///src/apps/user/IntegrationReconnectButton.vue","webpack:///./src/apps/user/IntegrationReconnectButton.vue?7dce","webpack:///./src/apps/user/IntegrationReconnectButton.vue","webpack:///src/apps/base/ErrorModal.vue","webpack:///./src/apps/base/ErrorModal.vue?f360","webpack:///./src/apps/base/ErrorModal.vue","webpack:///./src/apps/call/utils.js","webpack:///./src/apps/call/CallViewCounterpartComponents/CounterpartSelector.vue?ece0","webpack:///./public/img/icons/jump_external.svg","webpack:///./src/apps/call/CallViewCounterpartComponents/CounterpartSelectionModal.vue?7264","webpack:///./src/apps/call/CallViewCounterpartComponents/CounterpartSelector.vue?2e85","webpack:///src/apps/call/CallViewCounterpartComponents/CounterpartSelector.vue","webpack:///./src/apps/call/CallViewCounterpartComponents/CounterpartSelector.vue?d484","webpack:///./src/apps/call/CallViewCounterpartComponents/CounterpartSelector.vue","webpack:///src/apps/call/CallViewCounterpartComponents/CounterpartSelectionModal.vue","webpack:///./src/apps/call/CallViewCounterpartComponents/CounterpartSelectionModal.vue?d20e","webpack:///./src/apps/call/CallViewCounterpartComponents/CounterpartSelectionModal.vue","webpack:///./src/apps/call/CallViewCounterpartComponents/CounterpartSelectionModal.vue?9d81","webpack:///./node_modules/vuex-stores/src/main.js","webpack:///./src/services/debounceService.js","webpack:///./src/store/services/callStore.js"],"names":["render","_vm","this","_c","_self","staticClass","_t","attrs","direct_link","class","isOpenFromCallViewSummary","_v","_s","name","getCrmLogo","crm_service","tag","type","staticRenderFns","mixins","CrmLogoMixin","props","String","required","default","Boolean","counterpartAppInfo","counterpart","component","ref","staticText","warning","on","$event","$emit","model","value","callback","$$v","showModal","expression","warningMessage1","warningMessage2","staticTextDefault","computed","$store","getters","$options","methods","USER_DATA_TITLE","en","de","CRM_DATA_TITLE","OTHER_ITEMS_DATA_TITLE","FIRST_NAME_KEY","LAST_NAME_KEY","CURRENT_DATE_KEY","CURRENT_TIME_KEY","COUNTERPART_NAME_KEY","COUNTERPART_FIRST_NAME_KEY","COUNTERPART_LAST_NAME_KEY","CRM_NAME_KEY","ANSWER_KEY","NOTE_KEY","ANSWER_FROM_KEY","NOTE_FROM_KEY","GROUP_TYPE","USER_DATA","CRM_DATA","OTHER_ITEM_DATA","OTHER_ITEM_DATA_TYPE","ANSWER","NOTE","errors","length","extraClass","disabled","showErrorModal","buttonText","_e","title","okLabel","domProps","errorHeaderText","_l","error","index","key","item","IntegrationErrorMsgLabel","IntegrationSuccessMsgLabel","directives","rawName","showDetails","JSON","stringify","arg","copy","errorItem","openOAuthWindow","code_url","reIntegrateBtnLabel","Object","user","crmIntegrations","getCRMIntegrationsForUser","url","that","windowName","Math","floor","random","sfWindow","window","open","focus","e","$refs","navWarningModal","show","existingWin","checkChild","closed","clearInterval","timer","then","checkError","setInterval","errorIsGone","values","some","crm","components","IntegrationReconnectButton","Array","launchErrorModal","COUNTERPART_DATA_LOADER_LABEL","pushOrReplaceRoute","routeUrl","self","top","replace","push","getCallIdFromUrl","currentRoute","params","callId","setEndConversation","dispatch","Promise","resolve","reject","query","newRoute","path","catch","response","mapStateToCurrentCallStore","fieldList","result","forEach","fieldString","loadCounterpartFromUrl","async","counterpartParams","crmService","Error","data","a","post","newCounterpart","loadCounterpartData","counterpartFromUrl","crmDataLoaded","getCrmLookupFieldsInPlaybook","keys","entries","lookupFieldName","split","crmId","external_resource","findCRMLookupFieldValueById","console","checkIfLoadedCrmFieldsExist","counterparts","crmObjectType","serviceTypeCombination","loadedCrmFields","count","getCounterpartsData","selectedCounterparts","promises","counterpartsWithLoadedData","counterpartsWithLoadedDataCount","promiseResults","allSettled","status","counterpartIndex","counterpartCRM","counterpartType","splice","lookupFieldType","get","crm_id","debug","isValidMeetingUrl","meetDomainRegex","test","module","exports","scopedSlots","_u","fn","selectCounterpartsTitle","closeModal","proxy","hideLoadCrmDataButton","canUseCRM","typeToSearchPlaceholder","searchCounterparts","queryTerm","CRMErrorText1","CRMErrorText2","CRMErrorText3","loading","sortedCounterpartOptions","threeCharactersSearch","noResultsText","canUseBaoCrm","getSelectedCounterpart","addNewCounterpartText","toggleSelection","getCounterpartName","canShowLoadButton","loadCrmData","isSelected","id","listEmptyText","connectCrmLinkText","handleCancel","counterpartToLoad","ErrorModal","CounterpartDisplayCell","ProgressIndicator","LoadCrmDataWarningModal","crmData","appInfo","axios","localErrors","canStoreCRMData","CRMSupportsLoadingOfData","getErrors","counterpartOptions","array","map","originalIndex","sort","b","localeCompare","err","filter","find","watch","newVal","setCounterpartOptions","asyncSearch","updateCounterpartsWithLoadedData","cpData","clonedArray","obj","hasOwnProperty","selectedOption","isTag","isLoaded","updateCrmData","Counterpart","option","loadedCrmFieldsExist","loadCrmDataWarningModal","openModal","saveNewCounterpart","counterpartId","CounterpartSelector","isString","enhanced","args","enhancedWatch","vuexStore","propOrFunction","options","getNamespacedHelpers","moduleNamespace","mapState","mapGetters","mapActions","registerAndGetStore","moduleConfig","registrationOptions","storeObject","buildStoreObject","registerModule","namespace","stateObject","state","stateName","defineProperty","enumerable","getterName","namespacedGetterName","actions","actionName","namespacedActionName","namespaced","unregisterModule","hasModule","debounceService","delayQueue","time","cancel","debounceMethod","flush","waitFor","executeDelayedOperation","all","INCREMENT_LABEL","REDUCTION_LABEL","getInitialState","call","playbook","mainContainer","callItems","playbookItems","notes","callDuration","callDurationCounter","dismissCountDownForSave","activeItem","itemActivatedTime","Date","now","saving","showCallResultModal","objectionRaisedForItem","selectedObjection","activeShortcut","parentContainerOfSelectedObjection","displayObjectionModal","unansweredRequiredItems","scroll","callViewComponent","callViewItemsContainerId","getCallItem","rootState","auth","pk","getPlaybookId","duration","talkscript","getUserId","isActiveItem","isCallActive","rootGetters","isItemAnswered","callItem","stripHtmlTags","note","answers","getItem","parentContainer","objections","objection","adc","children","additional_talkscripts","findUnansweredRequiredItems","parent","uniqueId","loadedData","unansweredRequiredItemsFromLoadedData","selected_choice","workflow","concat","crmLookupFieldsInPlaybook","rootContainer","main_container","objectionItems","flatMap","allItems","playbookItem","tempDiv","document","createElement","innerHTML","display_text","spanElements","querySelectorAll","spanElement","dataId","getAttribute","slice","lookupId","fieldKey","includes","mutations","call_items","attachCallItem","ci","talkscript_item","call_item","loaded_additional_data","newItem","addItem","playbookItemWithCallItems","additional_data","activeInterval","oldDuration","newState","assign","newValue","updated_at","setTimeout","shortcut","itemId","itemIds","commit","toLocaleString","crmObject","service","object_type","isArray","callData","apiUrl","finally","put","getCallId","getCallData","checkRequiredItems","executeAllDelayedOperations","networkController","checkAllRequestsCompleted","promise","message","postMessage","handleItemChanged","debounceOperation","callItemData","getCallItemDataToSave","request","getCallItemSaveRequest","callItemPromise","sendRequest","set","additionalDataId","delete","objectionList","payload","isObjection","parse","additionalDataChoice","adcLoaded","adcIndex","playbookData","newADC","getLoadedData","selector","queuedParentContainers","i","currentContainer","playbookObjections","playbookChildren","child","currentChildObjections","childContainer","answerActions","vueComponent","answerPBItem","additionalData","answerAction","targetItem","activePlaybookItem","is_objection","targetId","undefined","objectionID","body","code","wrap","s","func","Function","targetPBItem","storeFuncs","answersChoicesToSelect","getTransformedAnswer","answerChoice","question_id","text","label","has_importance","item_type","importance","selected","tags","transformedAnswers","findActionType","targetElement","$el","querySelector","scrollElement","getElementById","css","head","getElementsByTagName","style","appendChild","styleSheet","cssText","createTextNode","animElement","parentElement","classList","add","toggle","clientHeight","scrollIntoView","block","behavior","mouseY","targetTopPosition","offsetTop","headerOffset","topPosition","scrollTo","newTargetItem","ID","nextTick","getNamespace","getCallStore","override","usedGetters","getGetters","usedState","getState","usedActions","getActions","usedMutations","getMutations","currentCallStore","attachCallStore","callStore","removeCallStore","addEventListener","event","clientY","previousCallStores","MAX_CALL_STORES","setupNewCallStore","testing","previousCallStore","log","newCallStore","setCallStore","oldestCallStore","shift"],"mappings":"oKAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,YAAY,2DAA2D,CAACJ,EAAIK,GAAG,SAASH,EAAG,MAAM,CAACE,YAAY,cAAcE,MAAM,CAAC,GAAK,wCAAwC,CAACJ,EAAG,MAAM,CAACE,YAAY,uBAAuB,CAACF,EAAG,MAAM,CAACI,MAAM,CAAC,MAAQ,KAAK,OAAS,KAAK,QAAU,YAAY,KAAO,OAAO,MAAQ,6BAA6B,aAAa,GAAG,KAAO,eAAe,UAAY,QAAQ,SAAW,OAAO,CAACJ,EAAG,OAAO,CAACI,MAAM,CAAC,EAAI,oJAAoJ,KAAO,iBAAiBJ,EAAG,MAAM,CAACE,YAAY,qBAAqB,CAACF,EAAG,MAAM,CAACE,YAAY,sBAAsB,CAACF,EAAG,OAAO,CAACE,YAAY,6DAA6D,CAAIJ,EAAIO,YAAaL,EAAG,IAAI,CAACM,MAAM,CAAC,gBAAiBR,EAAIS,2BAA2BH,MAAM,CAAC,KAAON,EAAIO,YAAY,OAAS,WAAW,CAACP,EAAIU,GAAG,IAAIV,EAAIW,GAAGX,EAAIY,MAAM,OAAOV,EAAG,OAAO,CAACF,EAAIU,GAAG,IAAIV,EAAIW,GAAGX,EAAIY,MAAM,SAASV,EAAGF,EAAIa,WAAWb,EAAIc,aAAa,CAACC,IAAI,YAAYX,YAA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ie,EAAiB,CACjD,MAAMO,EAAkBR,EAAmBS,QAC3Cb,EAAgBvQ,EAAWmR,GAS7B,OAPAR,EAAmB5Z,KAAKiB,GAOjBA,EAGF,SAASkZ,EAAclR,EAAWsQ,GAEvC,OADAF,EAAmBC,EAAgBrQ,EAAWsQ,GACvCF","file":"js/CallList~CallMainContainer~CallSetup~CallWrapUp~printCallSummary.fa740fb8.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"w-100 d-flex justify-content-between align-items-center\"},[_vm._t(\"start\"),_c('div',{staticClass:\"counterpart\",attrs:{\"id\":\"counterparts-name-icons-20228231112\"}},[_c('div',{staticClass:\"counterpart__avatar\"},[_c('svg',{attrs:{\"width\":\"14\",\"height\":\"16\",\"viewBox\":\"0 0 14 16\",\"fill\":\"none\",\"xmlns\":\"http://www.w3.org/2000/svg\",\"svg-inline\":'',\"role\":'presentation',\"focusable\":'false',\"tabindex\":'-1'}},[_c('path',{attrs:{\"d\":\"M11 4a4 4 0 11-8 0 4 4 0 018 0zM0 15.072A5.57 5.57 0 015.572 9.5h2.856A5.57 5.57 0 0114 15.072a.928.928 0 01-.928.928H.928A.928.928 0 010 15.072z\",\"fill\":\"#AAABBA\"}})])]),_c('div',{staticClass:\"counterpart__text\"},[_c('div',{staticClass:\"counterpart__title\"},[_c('span',{staticClass:\"counterpart__name align-items-center text-left break-word\"},[(!!_vm.direct_link)?_c('a',{class:{'summary-value': _vm.isOpenFromCallViewSummary},attrs:{\"href\":_vm.direct_link,\"target\":\"_blank\"}},[_vm._v(\" \"+_vm._s(_vm.name)+\" \")]):_c('span',[_vm._v(\" \"+_vm._s(_vm.name)+\" \")])]),_c(_vm.getCrmLogo(_vm.crm_service),{tag:\"component\",staticClass:\"crm-logo crm-logo__slate ml-1\"})],1),_c('span',{staticClass:\"counterpart__crm-type\"},[_vm._v(\" \"+_vm._s(_vm.type)+\" \")])])]),_vm._t(\"end\")],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!../../../node_modules/vue-svg-inline-loader/src/index.js!./CounterpartDisplayCell.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!../../../node_modules/vue-svg-inline-loader/src/index.js!./CounterpartDisplayCell.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./CounterpartDisplayCell.vue?vue&type=template&id=dc7c2bee&scoped=true&\"\nimport script from \"./CounterpartDisplayCell.vue?vue&type=script&lang=js&\"\nexport * from \"./CounterpartDisplayCell.vue?vue&type=script&lang=js&\"\nimport style0 from \"./CounterpartDisplayCell.vue?vue&type=style&index=0&id=dc7c2bee&prod&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"dc7c2bee\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!../../../node_modules/vue-svg-inline-loader/src/index.js!./CounterpartDisplayCell.vue?vue&type=style&index=0&id=dc7c2bee&prod&scoped=true&lang=scss&\"","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('b-modal',{ref:\"load-crm-counterpart-warning-202102031020\",attrs:{\"id\":\"load-crm-counterpart-warning-202102031020\",\"title\":_vm.staticText.warning},on:{\"cancel\":function($event){return _vm.$emit('cancel')},\"ok\":function($event){return _vm.$emit('ok')}},model:{value:(_vm.showModal),callback:function ($$v) {_vm.showModal=$$v},expression:\"showModal\"}},[_c('b-alert',{attrs:{\"variant\":\"warning\",\"show\":\"\"}},[_c('p',[_vm._v(\" \"+_vm._s(_vm.staticText.warningMessage1)+\" \")]),_c('p',[_vm._v(\" \"+_vm._s(_vm.staticText.warningMessage2)+\" \")])])],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!../../../../node_modules/vue-svg-inline-loader/src/index.js!./LoadCrmDataWarningModal.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!../../../../node_modules/vue-svg-inline-loader/src/index.js!./LoadCrmDataWarningModal.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./LoadCrmDataWarningModal.vue?vue&type=template&id=5c5a85b0&\"\nimport script from \"./LoadCrmDataWarningModal.vue?vue&type=script&lang=js&\"\nexport * from \"./LoadCrmDataWarningModal.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/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 USER_DATA_TITLE = { en: \"User's Data\", de: \"Userdaten\" }\nexport const CRM_DATA_TITLE = { en: \"CRM Data\", de: \"CRM-Daten\" }\nexport const OTHER_ITEMS_DATA_TITLE = { en: \"Other Item's Data\", de: \"Daten von anderen Items\" }\n\nexport const FIRST_NAME_KEY = { en: \"First Name\", de: \"Vorname\" }\nexport const LAST_NAME_KEY = { en: \"Last Name\", de: \"Nachname\" }\nexport const CURRENT_DATE_KEY = { en: \"Current Date\", de: \"Aktuelles Datum\" }\nexport const CURRENT_TIME_KEY = { en: \"Current Time\", de: \"Aktuelle Uhrzeit\" }\nexport const COUNTERPART_NAME_KEY = { en: \"Counterpart\", de: \"Gesprächspartner\" }\nexport const COUNTERPART_FIRST_NAME_KEY = { en: \"Counterpart's First Name\", de: \"Vorname des Gesprächspartners\" }\nexport const COUNTERPART_LAST_NAME_KEY = { en: \"Counterpart's Last Name\", de: \"Nachname des Gesprächspartners\" }\nexport const CRM_NAME_KEY = { en: \"CRM\", de: \"CRM\" }\nexport const ANSWER_KEY = { en: \"Answer\", de: \"Antwort\" }\nexport const NOTE_KEY = { en: \"Note\", de: \"Notiz\" }\nexport const ANSWER_FROM_KEY = { en: \"Answer from\", de: \"Antwort von\" }\nexport const NOTE_FROM_KEY = { en: \"Note from\", de: \"Notiz von\" }\n\nexport const GROUP_TYPE = {\n USER_DATA: USER_DATA_TITLE.en,\n CRM_DATA: CRM_DATA_TITLE.en,\n OTHER_ITEM_DATA: OTHER_ITEMS_DATA_TITLE.en\n}\n\nexport const OTHER_ITEM_DATA_TYPE = {\n ANSWER: ANSWER_KEY.en,\n NOTE: NOTE_KEY.en\n}\n","var render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.errors.length > 0)?_c('div',[(_vm.errors)?_c('b-btn',{class:_vm.extraClass,attrs:{\"variant\":\"outline-danger\",\"size\":\"sm\",\"disabled\":_vm.disabled},on:{\"click\":function($event){_vm.showErrorModal=true}}},[_c('i',{staticClass:\"fas fa-exclamation-triangle fa-xs\"}),_vm._v(\" \"+_vm._s(_vm.buttonText)+\" \")]):_vm._e(),_c('b-modal',{attrs:{\"id\":\"error-modal-180120211545\",\"title\":_vm.title,\"ok-title\":_vm.staticText.okLabel,\"header-border-variant\":\"danger\",\"header-text-variant\":\"danger\",\"size\":\"lg\",\"ok-only\":\"\"},on:{\"ok\":function($event){return _vm.$emit('Done')}},model:{value:(_vm.showErrorModal),callback:function ($$v) {_vm.showErrorModal=$$v},expression:\"showErrorModal\"}},[_c('p',{domProps:{\"innerHTML\":_vm._s(_vm.errorHeaderText)}}),_vm._t(\"default\"),_vm._l((_vm.errors),function(error,index){return _c('div',{key:index},[_c('ul',{staticClass:\"container\"},_vm._l((error),function(item,key){return _c('li',{key:index+key},[_c('div',{staticClass:\"mt-2 p-2 d-flex justify-content-between\"},[_c('div',[_vm._v(\" \"+_vm._s(key)+\": \"),(item.error)?_c('span',[_vm._v(\" \"+_vm._s(_vm.staticText.IntegrationErrorMsgLabel)+\" \")]):_c('span',[_vm._v(\" \"+_vm._s(_vm.staticText.IntegrationSuccessMsgLabel)+\" \")])]),_c('div',[_c('IntegrationReconnectButton',{attrs:{\"errorItem\":item}})],1)]),_c('div',[_c('a',{directives:[{name:\"b-toggle\",rawName:\"v-b-toggle\",value:('error-details-' + index+key),expression:\"'error-details-' + index+key\"}],attrs:{\"href\":\"#\"}},[_vm._v(\" \"+_vm._s(_vm.staticText.showDetails)+\" \")]),_c('b-collapse',{attrs:{\"id\":'error-details-' + index+key}},[_c('div',{staticClass:\"d-flex justify-content-between\"},[_c('pre',[_vm._v(_vm._s(item))]),_c('div',{staticClass:\"my-auto\"},[_c('b-btn',{directives:[{name:\"clipboard\",rawName:\"v-clipboard:copy\",value:(JSON.stringify(item)),expression:\"JSON.stringify(item)\",arg:\"copy\"}],staticClass:\"ml-2\",attrs:{\"size\":\"sm\",\"variant\":\"light\"}},[_vm._v(\" \"+_vm._s(_vm.staticText.copy)+\" \")])],1)])])],1)])}),0)])})],2)],1):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',[(_vm.errorItem.error)?_c('b-btn',{staticClass:\"float-right\",attrs:{\"variant\":\"primary\"},on:{\"click\":function($event){return _vm.openOAuthWindow(_vm.errorItem.code_url, _vm.errorItem)}}},[_c('i',{staticClass:\"fas fa-sync mr-2\"}),_vm._v(\" \"+_vm._s(_vm.staticText.reIntegrateBtnLabel)+\" \")]):_c('b-btn',{staticClass:\"float-right\",attrs:{\"variant\":\"outline-success\",\"disabled\":\"\"}},[_c('i',{staticClass:\"far fa-check-circle\"})])],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!../../../node_modules/vue-svg-inline-loader/src/index.js!./IntegrationReconnectButton.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!../../../node_modules/vue-svg-inline-loader/src/index.js!./IntegrationReconnectButton.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./IntegrationReconnectButton.vue?vue&type=template&id=0cc4b8a4&scoped=true&\"\nimport script from \"./IntegrationReconnectButton.vue?vue&type=script&lang=js&\"\nexport * from \"./IntegrationReconnectButton.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"0cc4b8a4\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!../../../node_modules/vue-svg-inline-loader/src/index.js!./ErrorModal.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!../../../node_modules/vue-svg-inline-loader/src/index.js!./ErrorModal.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ErrorModal.vue?vue&type=template&id=a5cf7412&scoped=true&\"\nimport script from \"./ErrorModal.vue?vue&type=script&lang=js&\"\nexport * from \"./ErrorModal.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"a5cf7412\",\n null\n \n)\n\nexport default component.exports","import router from \"@/router\"\nimport axios from \"axios\"\nimport { currentCallStore } from \"@/store/services/callStore\"\nimport store from \"../../store\"\nimport { callWrapUpUrl } from \"./index\"\n\nexport const COUNTERPART_DATA_LOADER_LABEL = \"counterpart_data_loader\"\n\nexport function pushOrReplaceRoute (routeUrl) {\n // The route has to be replaced when the application is in an iFrame which would be true if window.self !== window.top\n if (window.self !== window.top) return router.replace(routeUrl)\n else return router.push(routeUrl)\n}\n\n/**\n * Returns the call id from the URL, requires a Vue Router (imported from @/router)\n * */\nexport function getCallIdFromUrl () {\n if (!router || !router.currentRoute || !router.currentRoute.params) return null\n return router.currentRoute.params.callId\n}\n\n/** Pushes the provided value as endConversation flag into the URL as a query param */\nexport function setEndConversation ({ dispatch }, value) {\n return new Promise((resolve, reject) => {\n const callId = getCallIdFromUrl()\n const url = value ? `${callWrapUpUrl}/${callId}` : `/conversation/${callId}`\n const query = router.currentRoute.query\n const newRoute = { path: url, query }\n pushOrReplaceRoute(newRoute).then(() => {\n resolve()\n }).catch(error => {\n dispatch(\"handleError\", error.response)\n reject(error)\n })\n })\n}\n\n/** Utils function to map the provided field list (list of strings) to the currentCallStore (imported) */\nexport function mapStateToCurrentCallStore (fieldList) {\n const result = {}\n fieldList.forEach(fieldString => {\n result[fieldString] = function () {\n return currentCallStore[fieldString]\n }\n })\n return result\n}\n\nexport const loadCounterpartFromUrl = async (counterpartParams) => {\n const crmService = counterpartParams.crm_service\n if (!crmService) {\n throw new Error(\"no crm service found\")\n }\n\n try {\n const url = \"/api/counterpartsnew/get_counterpart?service=\" + crmService\n const { data } = await axios.post(url, counterpartParams)\n const newCounterpart = data\n return newCounterpart\n } catch (error) {\n throw new Error(error)\n }\n}\n\nexport const loadCounterpartData = async (counterpart) => {\n try {\n const counterpartFromUrl = await loadCounterpartFromUrl(counterpart)\n const newCounterpart = { ...counterpartFromUrl, crmDataLoaded: true, index: counterpart.index }\n\n // update downloaded data with additional data from API for lookup fields\n const { getCrmLookupFieldsInPlaybook } = currentCallStore\n\n if (Object.keys(getCrmLookupFieldsInPlaybook).length > 0) {\n for (const [key, value] of Object.entries(getCrmLookupFieldsInPlaybook)) {\n const lookupFieldName = key.split(\"-\")[1]\n const crmId = newCounterpart.external_resource[lookupFieldName]\n if (crmId) {\n newCounterpart.external_resource[lookupFieldName] = await findCRMLookupFieldValueById(counterpart.crm_service, value, crmId)\n }\n }\n }\n return newCounterpart\n } catch (error) {\n console.error(error)\n }\n}\n\nexport const checkIfLoadedCrmFieldsExist = async (counterparts) => {\n for await (const counterpart of counterparts) {\n if (counterpart) {\n const crmService = counterpart.crm_service\n const crmObjectType = counterpart.type\n const serviceTypeCombination = `${crmService}-${crmObjectType}`\n if (currentCallStore.loadedCrmFields[serviceTypeCombination] && currentCallStore.loadedCrmFields[serviceTypeCombination].count) {\n return true\n }\n }\n }\n return false\n}\n\nexport const getCounterpartsData = async ({ counterparts, selectedCounterparts, type }) => {\n const promises = []\n const counterpartsWithLoadedData = {}\n let counterpartsWithLoadedDataCount = 0\n\n // This is to create the promise to get Crm Data of all selected counterparts at once\n if (type === COUNTERPART_DATA_LOADER_LABEL) {\n for (const counterpart of counterparts) if (counterpart) promises.push(loadCounterpartData(counterpart))\n } else {\n for (let [index, counterpart] of counterparts.entries()) {\n if (counterpart) {\n counterpart = { ...counterpart, index }\n if (store.getters[\"counterpartStore/CRMSupportsLoadingOfData\"](counterpart)) promises.push(loadCounterpartData(counterpart))\n }\n }\n }\n\n const promiseResults = await Promise.allSettled(promises)\n promiseResults.forEach((result) => {\n if (result.status === \"fulfilled\" && !!result.value) {\n const newCounterpart = result.value\n const counterpartIndex = newCounterpart.index\n const counterpartCRM = newCounterpart.crm_service\n const counterpartType = newCounterpart.type\n counterpartsWithLoadedData[`${counterpartCRM}-${counterpartType}`] = newCounterpart\n counterpartsWithLoadedDataCount++\n selectedCounterparts.splice(counterpartIndex, 1, newCounterpart)\n }\n })\n\n return { counterpartsWithLoadedDataCount, counterpartsWithLoadedData, selectedCounterparts }\n}\n\nexport const findCRMLookupFieldValueById = async (crmService, lookupFieldType, crmId) => {\n try {\n const url = `/api/oauthservices/${crmService}/get_lookup_value_by_id/`\n const { data } = await axios.get(url, {\n params: {\n type: lookupFieldType,\n crm_id: crmId\n }\n })\n return data\n } catch (error) {\n console.debug(error)\n }\n}\n\nexport const isValidMeetingUrl = (url) => {\n // regular expression to match video meet url\n // 1. google meet's url - https://meet.google.com/abc-defg-hik?...\n const meetDomainRegex = /^https:\\/\\/meet\\.google\\.com\\/[a-zA-Z]{3}-[a-zA-Z]{4}-[a-zA-Z]{3}(\\?|$)/\n return meetDomainRegex.test(url)\n}\n","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!../../../../node_modules/vue-svg-inline-loader/src/index.js!./CounterpartSelector.vue?vue&type=style&index=0&id=5063105a&prod&scoped=true&lang=scss&\"","module.exports = __webpack_public_path__ + \"img/jump_external.2fd33fcf.svg\";","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('b-modal',{attrs:{\"id\":\"counterpartSelectionModal\",\"body-class\":\"p-0\",\"header-class\":\"p-0\",\"dialog-class\":\"p-2\",\"hide-footer\":\"\",\"centered\":\"\"},on:{\"hidden\":function($event){return _vm.$emit('counterparts-modal-closed')}},scopedSlots:_vm._u([{key:\"modal-header\",fn:function(){return [_c('div',{staticClass:\"modal-header\"},[_c('div',{staticClass:\"d-flex align-items-center\"},[_c('svg',{class:'team-icon',attrs:{\"width\":\"18\",\"height\":\"18\",\"viewBox\":\"0 0 18 18\",\"fill\":\"none\",\"xmlns\":\"http://www.w3.org/2000/svg\",\"svg-inline\":'',\"role\":'presentation',\"focusable\":'false',\"tabindex\":'-1'}},[_c('g',{attrs:{\"opacity\":\".8\",\"fill\":\"#2B2727\"}},[_c('path',{attrs:{\"fill-rule\":\"evenodd\",\"clip-rule\":\"evenodd\",\"d\":\"M9.795 8.373a4.11 4.11 0 001.569.31c2.216 0 4.019-1.746 4.019-3.892S13.58.9 11.364.9a4.11 4.11 0 00-1.569.309c1.44.592 2.45 1.975 2.45 3.582 0 1.607-1.01 2.99-2.45 3.582zM12.612 9.575a5.155 5.155 0 001.97-.972c1.519 1.004 2.518 2.694 2.518 4.605v1.965c0 1.062-.893 1.927-1.99 1.927h-2.707l-.006-.045c.894-.189 1.565-.96 1.565-1.882v-1.965c0-1.566-.378-2.716-1.35-3.633z\"}}),_c('path',{attrs:{\"d\":\"M6.658 8.682c2.216 0 4.019-1.745 4.019-3.891S8.874.9 6.657.9C4.443.9 2.64 2.646 2.64 4.791c0 2.146 1.803 3.891 4.019 3.891z\"}}),_c('path',{attrs:{\"fill-rule\":\"evenodd\",\"clip-rule\":\"evenodd\",\"d\":\"M6.658 9.73a5.18 5.18 0 01-3.24-1.128C1.899 9.607.9 11.297.9 13.208v1.964c0 1.063.893 1.927 1.99 1.927H10.404c1.097 0 1.99-.864 1.99-1.927v-1.964c0-1.911-.999-3.6-2.518-4.606A5.18 5.18 0 016.658 9.73z\"}})])]),_c('span',{staticClass:\"ml-2 subTitle\"},[_vm._v(_vm._s(_vm.staticText.selectCounterpartsTitle))])]),_c('svg',{class:'ml-2 cursor-pointer',attrs:{\"width\":\"16\",\"height\":\"16\",\"viewBox\":\"0 0 14 14\",\"fill\":\"none\",\"xmlns\":\"http://www.w3.org/2000/svg\",\"svg-inline\":'',\"role\":'presentation',\"focusable\":'false',\"tabindex\":'-1'},on:{\"click\":_vm.closeModal}},[_c('path',{attrs:{\"d\":\"M7 .6C3.48.6.6 3.48.6 7c0 3.52 2.88 6.4 6.4 6.4 3.52 0 6.4-2.88 6.4-6.4C13.4 3.48 10.52.6 7 .6zm3.2 8.704l-.896.896L7 7.896 4.696 10.2 3.8 9.304 6.104 7 3.8 4.696l.896-.896L7 6.104 9.304 3.8l.896.896L7.896 7 10.2 9.304z\",\"fill\":\"#AAABBA\"}})])])]},proxy:true}]),model:{value:(_vm.showModal),callback:function ($$v) {_vm.showModal=$$v},expression:\"showModal\"}},[_c('counterpart-selector',{ref:\"cpselector\",staticClass:\"container-fluid max-h-500\",attrs:{\"id\":\"cpselector\",\"value\":_vm.counterparts,\"hide-load-crm-data-button\":_vm.hideLoadCrmDataButton},on:{\"download-crm-data\":function($event){return _vm.$emit('download-crm-data')},\"input\":value => _vm.$emit('set-counterparts', value)}})],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"content-wrapper\"},[_c('div',{staticClass:\"d-flex p-0 container-fluid\",attrs:{\"id\":\"counterpart-content-container\"}},[(!_vm.canUseCRM)?_c('div',{staticClass:\"container-fluid p-3 no-counterpart\",attrs:{\"id\":\"no-crm-connected-202101181922\"}},[_c('div',{staticClass:\"row justify-content-center\"},[_vm._v(\" \"+_vm._s(_vm.staticText.listEmptyText)+\" \")]),_c('div',{staticClass:\"row justify-content-center\"},[_c('router-link',{attrs:{\"to\":\"/users/integrations\",\"target\":\"_blank\"}},[_c('img',{staticClass:\"mb-1\",attrs:{\"src\":require(\"../../../../public/img/icons/jump_external.svg\"),\"width\":\"16\"}}),_vm._v(\" \"+_vm._s(_vm.staticText.connectCrmLinkText)+\" \")])],1)]):_c('div',{staticClass:\"pl-3 pr-2 py-3 d-flex flex-column w-100\"},[_c('div',{staticClass:\"d-flex align-items-center h-64 pr-2\"},[_c('b-form-input',{staticClass:\"pr-5\",attrs:{\"placeholder\":_vm.staticText.typeToSearchPlaceholder,\"autofocus\":true,\"size\":\"5\"},on:{\"input\":function($event){return _vm.searchCounterparts(_vm.queryTerm)}},model:{value:(_vm.queryTerm),callback:function ($$v) {_vm.queryTerm=$$v},expression:\"queryTerm\"}}),_c('span',{staticClass:\"search-icon\",on:{\"click\":function($event){return _vm.searchCounterparts(_vm.queryTerm)}}},[(_vm.loading)?_c('progress-indicator',{attrs:{\"showLoadingLabel\":false,\"small\":\"\",\"tooltip\":true}}):_c('img',{attrs:{\"src\":require(\"../../../../public/img/icons/search-icon.svg\")}})],1),(_vm.errors)?_c('span',{staticClass:\"ml-4\"},[_c('error-modal',{attrs:{\"errors\":[_vm.errors],\"error-header-text\":\"\"},on:{\"Done\":function($event){return _vm.searchCounterparts(_vm.queryTerm)}},model:{value:(_vm.errors),callback:function ($$v) {_vm.errors=$$v},expression:\"errors\"}},[_c('p',[_vm._v(\" \"+_vm._s(_vm.staticText.CRMErrorText1)+\" \"),_c('router-link',{attrs:{\"to\":\"/users/integrations\",\"target\":\"_blank\"}},[_vm._v(\" \"+_vm._s(_vm.staticText.CRMErrorText2)+\" \"),_c('img',{staticClass:\"mb-1\",attrs:{\"src\":require(\"../../../../public/img/icons/jump_external.svg\"),\"width\":\"16\"}})]),_vm._v(\" \"+_vm._s(_vm.staticText.CRMErrorText3)+\". \")],1)])],1):_vm._e()],1),_c('div',{staticClass:\"container-counterpart nice-scrollbar noscroll-x\",attrs:{\"id\":\"counterparts-list\"}},[_c('div',[(!_vm.loading)?_c('div',{staticClass:\"pt-3 text-center\",attrs:{\"id\":\"no-table-data\"}},[(!_vm.queryTerm || _vm.queryTerm.length < 3)?_c('span',[_vm._v(\" \"+_vm._s(_vm.staticText.threeCharactersSearch)+\" \")]):_c('span',[(!_vm.sortedCounterpartOptions.length)?_c('span',[_vm._v(_vm._s(_vm.staticText.noResultsText))]):_vm._e()])]):(_vm.loading && !_vm.sortedCounterpartOptions.length)?_c('div',[_c('progress-indicator')],1):_vm._e(),(_vm.canUseBaoCrm && !!_vm.queryTerm)?_c('div',{staticClass:\"py-3 text-center\",attrs:{\"id\":\"add-new-counterpart\"}},[_c('a',{attrs:{\"id\":\"addNewCounterpart-20219271330\",\"href\":\"#\"},on:{\"click\":function($event){return _vm.getSelectedCounterpart({crm_service: 'bao', name: _vm.queryTerm}, true,)}}},[_vm._v(\" + \"+_vm._s(_vm.staticText.addNewCounterpartText)+\" \")])]):_vm._e(),_vm._l((_vm.selectedCounterparts),function(item,index){return _c('div',{key:'selected-counterpart-' + index,staticClass:\"single-counterpart selected\",attrs:{\"id\":'selected-counterpart-' + index}},[_c('div',{staticClass:\"d-flex align-items-center w-100\"},[_c('div',{staticClass:\"toggle-btn\",attrs:{\"role\":\"button\"},on:{\"click\":function($event){return _vm.toggleSelection(item)}}},[_c('svg',{attrs:{\"width\":\"10\",\"height\":\"7\",\"viewBox\":\"0 0 10 7\",\"fill\":\"none\",\"xmlns\":\"http://www.w3.org/2000/svg\",\"svg-inline\":'',\"role\":'presentation',\"focusable\":'false',\"tabindex\":'-1'}},[_c('path',{attrs:{\"d\":\"M9.6.594a.644.644 0 010 .934l-5.486 5.28a.706.706 0 01-.97 0L.4 4.167a.643.643 0 010-.935.706.706 0 01.97 0L3.63 5.405l5-4.811a.706.706 0 01.971 0H9.6z\",\"fill\":\"#5D514B\",\"fill-opacity\":\".4\"}})])]),_c('div',{staticClass:\"counterpart-cell\"},[_c('counterpart-display-cell',{attrs:{\"name\":_vm.getCounterpartName(item),\"type\":item.type,\"crm_service\":item.crm_service,\"direct_link\":item.direct_link}})],1)]),(_vm.canShowLoadButton(item))?_c('b-btn',{staticClass:\"p-0 bg-transparent\",on:{\"click\":function($event){return _vm.loadCrmData(item, index)}}},[_c('i',{staticClass:\"fas fa-download\"})]):_vm._e()],1)}),_vm._l((_vm.sortedCounterpartOptions),function(item,index){return _c('div',{key:'not-selected-counterparts-' + index,staticClass:\"w-100\",attrs:{\"id\":'not-selected-counterparts-' + index},on:{\"click\":function($event){return _vm.toggleSelection(item)}}},[(!_vm.isSelected(item.id))?_c('div',{staticClass:\"single-counterpart unselected\"},[_c('div',{staticClass:\"toggle-btn\"}),_c('div',{staticClass:\"counterpart-cell\"},[_c('counterpart-display-cell',{staticClass:\"counterpart-cell\",attrs:{\"name\":_vm.getCounterpartName(item),\"type\":item.type,\"crm_service\":item.crm_service}})],1)]):_vm._e()])})],2)])]),_c('load-crm-data-warning-modal',{ref:\"loadCrmDataWarningModal\",on:{\"cancel\":_vm.handleCancel,\"ok\":function($event){return _vm.getSelectedCounterpart(_vm.counterpartToLoad, false, true)}}})],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!../../../../node_modules/vue-svg-inline-loader/src/index.js!./CounterpartSelector.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!../../../../node_modules/vue-svg-inline-loader/src/index.js!./CounterpartSelector.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./CounterpartSelector.vue?vue&type=template&id=5063105a&scoped=true&\"\nimport script from \"./CounterpartSelector.vue?vue&type=script&lang=js&\"\nexport * from \"./CounterpartSelector.vue?vue&type=script&lang=js&\"\nimport style0 from \"./CounterpartSelector.vue?vue&type=style&index=0&id=5063105a&prod&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"5063105a\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!../../../../node_modules/vue-svg-inline-loader/src/index.js!./CounterpartSelectionModal.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!../../../../node_modules/vue-svg-inline-loader/src/index.js!./CounterpartSelectionModal.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./CounterpartSelectionModal.vue?vue&type=template&id=0c5f1cae&scoped=true&\"\nimport script from \"./CounterpartSelectionModal.vue?vue&type=script&lang=js&\"\nexport * from \"./CounterpartSelectionModal.vue?vue&type=script&lang=js&\"\nimport style0 from \"./CounterpartSelectionModal.vue?vue&type=style&index=0&id=0c5f1cae&prod&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"0c5f1cae\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!../../../../node_modules/vue-svg-inline-loader/src/index.js!./CounterpartSelectionModal.vue?vue&type=style&index=0&id=0c5f1cae&prod&lang=scss&scoped=true&\"","import { createNamespacedHelpers } from 'vuex'\n\nfunction isString (value) {\n return typeof value === 'string'\n}\n\n// Internal: For the actions, state, and getter methods.\n// Allows passing Strings, an Array of Strings, or an Object as the argument.\nconst enhanced = map => (...args) => isString(args[0]) ? map(args) : map(args[0])\n\n// Internal: Allow to watch store changes using a String with the name of a\n// store property (state or getter), or a Function that returns the watched value.\nfunction enhancedWatch (vuexStore) {\n return function (propOrFunction, callback, options) {\n const fn = isString(propOrFunction) ? () => this[propOrFunction] : propOrFunction\n return vuexStore.watch(fn, callback, options) // https://vuex.vuejs.org/api/#watch\n }\n}\n\n// Public: Returns a set of namespaced helpers, registering a module if\n// necessary.\nexport function getNamespacedHelpers (moduleNamespace) {\n const { mapState, mapGetters, mapActions } = createNamespacedHelpers(moduleNamespace)\n return {\n // Picks a set of properties from the store state.\n //\n // Used in Vue components as computed properties:\n // computed: {\n // ...WindowStore.mapState('isFullscreen', 'windowHeight', 'windowWidth'),\n // },\n mapState: enhanced(mapState),\n\n // Picks a set of getters from the store.\n //\n // Used in Vue components as methods or computed properties:\n // computed: {\n // ...WindowStore.mapGetters('windowSize'),\n // },\n mapGetters: enhanced(mapGetters),\n\n // Picks a set of actions from the store.\n //\n // Used in Vue components as methods:\n // methods: {\n // ...WindowStore.mapActions('setFullscreen', 'updateWindowSize'),\n // },\n mapActions: enhanced(mapActions)\n }\n}\n\n// Public: Registers the module in the Vuex store, and returns a set of helpers.\nexport function registerAndGetStore (vuexStore, moduleConfig, registrationOptions) {\n const storeObject = buildStoreObject(vuexStore, moduleConfig)\n storeObject.registerModule(registrationOptions)\n return storeObject\n}\n\n// Public: Returns an object that can delegate properties and methods to Vuex,\n// allowing to directly access actions, getters, and state as properties.\n//\n// NOTE: If names overlap, actions have priority, then getters, then state.\nexport function buildStoreObject (vuexStore, { namespace, ...moduleConfig }) {\n const moduleNamespace = namespace\n\n // mapState, mapGetters, and mapActions are available in the store object.\n const storeObject = getNamespacedHelpers(moduleNamespace)\n\n // Expose the namespace in the store object.\n storeObject.moduleNamespace = moduleNamespace\n\n // Add a property each state key allowing to get the current value.\n const stateObject = typeof moduleConfig.state === 'function' ? moduleConfig.state() : moduleConfig.state\n Object.keys(stateObject).forEach(stateName => {\n Object.defineProperty(storeObject, stateName, {\n enumerable: true,\n get () {\n return vuexStore.state[moduleNamespace][stateName]\n }\n })\n })\n\n // Allow to access every getter in the store.\n Object.keys(moduleConfig.getters).forEach(getterName => {\n const namespacedGetterName = `${moduleNamespace}/${getterName}`\n Object.defineProperty(storeObject, getterName, {\n enumerable: true,\n get () {\n return vuexStore.getters[namespacedGetterName]\n }\n })\n })\n\n // Add a method for each action which expects the payload as parameters.\n Object.keys(moduleConfig.actions).forEach(actionName => {\n const namespacedActionName = `${moduleNamespace}/${actionName}`\n storeObject[actionName] = (...args) => vuexStore.dispatch(namespacedActionName, ...args)\n })\n\n // Allow to watch store changes using a String syntax or a Function.\n storeObject.watch = enhancedWatch(vuexStore)\n\n // Allows to register this store module.\n storeObject.registerModule = registrationOptions =>\n vuexStore.registerModule(moduleNamespace, { namespaced: true, ...moduleConfig }, registrationOptions)\n\n // Allows to unregister this store module.\n storeObject.unregisterModule = () =>\n vuexStore.hasModule(moduleNamespace) && vuexStore.unregisterModule(moduleNamespace)\n\n return storeObject\n}\n","import _debounce from \"lodash/debounce\"\n\n/***\n * debounceService is used to debounce/delay a user action/function call, to avoid multiple requests being\n * sent to backend, hence, reducing the traffic\n */\nexport const debounceService = {\n delayQueue: {},\n methods: {\n debounceOperation (index, callback, data, time = 250) {\n /**\n * Delays/debounces the execution of callback method based on the provided time (default = 250ms)\n * */\n const delayQueue = debounceService.delayQueue\n if (delayQueue[index]) {\n // Previous operation is in the delay queue, hence, stop it from executing\n delayQueue[index].cancel()\n }\n const debounceMethod = _debounce(() => {\n delete (debounceService.delayQueue[index])\n return callback(data)\n }, time)\n\n delayQueue[index] = debounceMethod\n return debounceMethod()\n },\n executeDelayedOperation (index) {\n /**\n * Executes the debounced operation for the given index immediately and returns a promise\n * */\n if (debounceService.delayQueue[index]) {\n return debounceService.delayQueue[index].flush()\n }\n return Promise.resolve()\n },\n executeAllDelayedOperations () {\n /**\n * Executes all debounced operations immediately and returns a promise that waits for\n * all the operations to complete\n * */\n return new Promise((resolve, reject) => {\n const waitFor = []\n for (const index in debounceService.delayQueue) {\n waitFor.push(debounceService.methods.executeDelayedOperation(index))\n }\n Promise.all(waitFor).then(() => {\n resolve()\n }).catch(error => {\n reject(error)\n })\n })\n }\n }\n}\n","import axios from \"axios\"\nimport appInfo, { utils } from \"@/apps/call\"\nimport Vue from \"vue\"\nimport { registerAndGetStore } from \"vuex-stores\"\nimport { debounceService } from \"@/services/debounceService\"\nimport { networkController } from \"@/services/networkController\"\nimport { GROUP_TYPE } from \"@/apps/talkscript/components/dynamicDataIndex\"\n\nconst INCREMENT_LABEL = \"increment\"\nconst REDUCTION_LABEL = \"reduction\"\n\nexport const getInitialState = () => {\n return {\n call: null,\n playbook: null,\n mainContainer: null,\n callItems: {},\n playbookItems: [],\n counterparts: null,\n notes: null,\n callDuration: 0,\n callDurationCounter: null,\n error: null,\n loading: false,\n dismissCountDownForSave: 0,\n activeItem: null,\n itemActivatedTime: Date.now(),\n saving: false,\n showCallResultModal: false,\n objectionRaisedForItem: null,\n selectedObjection: null,\n activeShortcut: null,\n parentContainerOfSelectedObjection: null,\n displayObjectionModal: false,\n loadedCrmFields: {}, // list of crmfields that contain data. It is a \"service-crm_object_type\" key value pair\n unansweredRequiredItems: [],\n scroll: false, // used to check if scrolling must happen when objection modal closed,\n callViewComponent: null, // used to scroll through the component\n callViewItemsContainerId: \"playbook-items-container\" // this id is needed in the store for the scroll. So I'm passing it from here to the component so the scroll doesn't break if a renaming has to happen\n }\n}\nexport const state = getInitialState()\n\nexport const getters = {\n getCallItem: (state) => (id) => {\n return state.callItems[id]\n },\n getActiveItem (state) {\n return state.activeItem\n },\n getCallId (state) {\n if (state.call && state.call.id) return state.call.id\n return null\n },\n getUserId (state, getters, rootState) {\n return rootState.auth.user && rootState.auth.user.pk ? rootState.auth.user.pk : null\n },\n getPlaybookId: state => {\n return state.playbook && state.playbook.id ? state.playbook.id : null\n },\n getCallData (state, getters) {\n return {\n notes: state.notes,\n counterparts: state.counterparts,\n duration: state.callDuration,\n talkscript: getters.getPlaybookId,\n user: getters.getUserId\n }\n },\n isActiveItem: (state) => (item) => {\n if (!state.activeItem) return false\n return state.activeItem === item\n },\n isCallActive: (state) => {\n return !!state.call && !state.call.duration\n },\n canShowCallResultModal (state, getters, rootState, rootGetters) {\n return rootGetters[\"auth/canUseCallResult\"] && (!!state.call && !state.call.result)\n },\n isItemAnswered: (state) => (item) => {\n return !!item && !!item.callItem && (\n (!!utils.stripHtmlTags(item.callItem.note)) || (!!item.callItem.answers && item.callItem.answers.length > 0)\n )\n },\n getItem: (state) => (id, type, parentContainer) => {\n if (type === \"objection\") {\n return parentContainer.objections.find(objection => objection.id === id)\n }\n if (type === \"add_playbook\") {\n let adc = null\n for (const item of state.mainContainer.children) {\n adc = item.additional_talkscripts.find(adc => adc.id === id)\n if (adc) break\n }\n return adc\n }\n return parentContainer.children.find(item => item.id === id)\n },\n /** This is recursive function to find the unanswered-required items in playbookItems\n and also in the item's loadedData\n */\n findUnansweredRequiredItems: (state, getters) => ({ playbookItems, parent }) => {\n let unansweredRequiredItems = []\n playbookItems.forEach(item => {\n if (item.required && !getters.isItemAnswered(item)) {\n unansweredRequiredItems.push(item.uniqueId)\n item.open = true\n if (parent) parent.open = true\n } else {\n item.open = false\n }\n if (!!item.loadedData && !!item.loadedData.length > 0) {\n item.loadedData.forEach(loadedData => {\n const unansweredRequiredItemsFromLoadedData = getters.findUnansweredRequiredItems({\n playbookItems: loadedData.selected_choice.workflow.children,\n parent: loadedData\n })\n unansweredRequiredItems = unansweredRequiredItems.concat(unansweredRequiredItemsFromLoadedData)\n })\n }\n })\n return unansweredRequiredItems\n },\n getCrmLookupFieldsInPlaybook (state) {\n /**\n * Returns set of key value pairs of lookup field and target data type present in entire playbook including\n * objections where type of dynamic data is CRM data.\n * format: {crmObjectType-lookupField: lookup-targetObjectType}; e.g.: {Opportunity-parent_contact_id: lookup-contact}\n * @return {Object}\n */\n const crmLookupFieldsInPlaybook = {}\n if (state.playbook) {\n const rootContainer = state.playbook.main_container\n const playbookItems = rootContainer.children\n const objectionItems = rootContainer.objections.flatMap(objection => objection.workflow.children)\n const allItems = playbookItems.concat(objectionItems)\n for (const playbookItem of allItems) {\n const tempDiv = document.createElement(\"div\")\n tempDiv.innerHTML = playbookItem.display_text\n const spanElements = tempDiv.querySelectorAll(\"span[data-id]\")\n if (spanElements.length > 0) {\n for (const spanElement of spanElements) {\n const dataId = spanElement.getAttribute(\"data-id\").slice(2, -2).split(\",\")\n // expected dataId format: [dataType, Label, fieldKey, lookup-targetType]\n // e.g.: [CRM Data, Opportunity-Contact, Opportunity-parent_contactid_value, lookup-contact]\n if (dataId.length > 3 && dataId[0] === GROUP_TYPE.CRM_DATA) {\n const lookupId = dataId[3].split(\"-\")\n if (lookupId[0] === \"lookup\") {\n const fieldKey = dataId[2]\n if (!Object.keys(crmLookupFieldsInPlaybook).includes(fieldKey)) {\n crmLookupFieldsInPlaybook[fieldKey] = lookupId[1]\n }\n }\n }\n }\n }\n }\n }\n return crmLookupFieldsInPlaybook\n }\n}\n\nexport const mutations = {\n setCall (state, call) {\n state.call = call\n },\n setLoading (state, loading) {\n state.loading = loading\n },\n setSaving (state, saving) {\n state.saving = saving\n },\n setError (state, error) {\n state.error = error\n },\n clearCallDurationCounter (state) {\n clearInterval(state.callDurationCounter)\n },\n /** Maps the call data into the store - doing so also merges call items with the playbook items so data in the call\n * is displayed properly */\n setCallDetails (state, call) {\n state.call = call\n state.callItems = call.call_items\n state.playbook = call.talkscript\n state.counterparts = call.counterparts\n state.notes = call.notes\n state.callDuration = call.duration || 0\n if (state.playbook) {\n /** Finds and attaches call item data to the provided playbook data - this is required, since we do no longer\n * serialize it merged in the backend to enable reasonable caching of playbook data */\n // TODO: we could also move this outside of here, its just convenience for now\n const attachCallItem = (playbookItem, callItems) => {\n // no call items, we just return the playbookItem as it is\n if (!callItems) return playbookItem\n\n // 1. get the call items for this particular playbook based on the\n // talkscript_item field and the playbookItem.id\n callItems = callItems.filter(ci => ci.talkscript_item === playbookItem.id)\n\n // if no call data is available we return early\n if (callItems.length === 0) return playbookItem\n\n // could be a bug, could be unfortunate circumstances (race condition much?!)\n if (callItems.length > 1) console.error(\"Found more than 1 call item -> investigate!\")\n\n // 2. call items should be sorted by recency anyway (descending) - so we take the first one\n playbookItem.call_item = callItems[0]\n if (\n playbookItem.call_item &&\n playbookItem.call_item.loaded_additional_data &&\n playbookItem.call_item.loaded_additional_data.length > 0\n ) {\n // 3. if the call item contains loaded_additional_data we also have to attach that to the playbook item\n // then do the same for all playbook items\n playbookItem.loadedData = playbookItem.call_item.loaded_additional_data.map(item => {\n const newItem = { ...item }\n newItem.open = true // the state of newly loaded objections/dyn. playbooks should be open\n newItem.selected_choice.workflow.children = item.selected_choice.workflow.children.map(\n // do the same for all playbook items in the loaded data\n addItem => attachCallItem(addItem, newItem.call_items)\n )\n return newItem\n })\n }\n return playbookItem\n }\n const playbookItemWithCallItems = call.talkscript.main_container.children.map(\n item => {\n if (call.call_items && call.call_items.length > 0) {\n return attachCallItem(item, call.call_items.filter(callItem => {\n return callItem.additional_data === null\n }))\n }\n return item\n }\n )\n state.mainContainer = state.playbook.main_container\n state.playbookItems = playbookItemWithCallItems\n state.activeItem = state.playbookItems[0] || null\n }\n },\n startCallTimer (state) {\n if (!!state.call && !state.call.duration) {\n state.callDurationCounter = setInterval(function () {\n state.callDuration = state.callDuration + 1000\n }, 1000)\n }\n },\n setActiveItem (state, item) {\n state.activeItem = item || state.playbookItems[0]\n },\n updateActiveItemDuration (state) {\n if (state.activeItem) {\n const activeInterval = Date.now() - state.itemActivatedTime\n const oldDuration = state.activeItem.duration || 0\n state.activeItem.duration = oldDuration + activeInterval\n }\n },\n resetItemActivatedTime (state) {\n state.itemActivatedTime = Date.now()\n },\n resetCallData (state) {\n const newState = { ...state, ...getInitialState() }\n Object.assign(state, newState)\n },\n updateCounterparts (state, index, counterpart) {\n state.counterparts.splice(index, 1, counterpart)\n },\n setCallResult (state, result) {\n state.call.result = result\n },\n setPlaybook (state, playbook) {\n state.playbook = playbook\n },\n setLastSave (state, newValue) {\n state.call.updated_at = newValue\n state.dismissCountDownForSave = 1\n setTimeout(() => {\n state.dismissCountDownForSave = 0\n }, 1000)\n },\n setShowCallResultModal (state, showCallResultModal) {\n state.showCallResultModal = showCallResultModal\n },\n setObjectionRaisedForItem (state, item) {\n state.objectionRaisedForItem = item || state.activeItem\n },\n setSelectedObjection (state, objection) {\n state.selectedObjection = objection\n },\n setActiveShortcut (state, shortcut) {\n state.activeShortcut = shortcut\n },\n setParentContainerOfSelectedObjection (state, parentContainer) {\n state.parentContainerOfSelectedObjection = parentContainer\n },\n setDisplayObjectionModal (state, value) {\n state.displayObjectionModal = value\n },\n addToLoadedCrmFields (state, { serviceTypeCombination, itemId }) {\n state.loadedCrmFields[serviceTypeCombination] = { count: 1, itemIds: {} }\n state.loadedCrmFields[serviceTypeCombination].itemIds[itemId] = true\n },\n updateLoadedCrmFields (state, { serviceTypeCombination, type, itemId }) {\n if (type === INCREMENT_LABEL) {\n if (!state.loadedCrmFields[serviceTypeCombination].itemIds[itemId]) {\n state.loadedCrmFields[serviceTypeCombination].count++\n state.loadedCrmFields[serviceTypeCombination].itemIds[itemId] = true\n }\n } else {\n state.loadedCrmFields[serviceTypeCombination].count--\n state.loadedCrmFields[serviceTypeCombination].itemIds[itemId] = false\n }\n },\n updateUnansweredRequiredItems (state, value) {\n state.unansweredRequiredItems = value\n },\n resetUnansweredRequiredItems (state) {\n state.unansweredRequiredItems = []\n },\n setScroll (state, value) {\n state.scroll = value\n },\n setCallViewComponent (state, component) {\n state.callViewComponent = component\n }\n\n}\n\nexport const actions = {\n updateLastSaved ({ commit }) {\n commit(\"setLastSave\", new Date().toLocaleString(\"de-DE\"))\n },\n handleCrmFieldLoaded ({ commit, state }, { value, crmObject, itemId }) {\n // This function checks if the combination of object_type and service of a crm field was already added to\n // loadedCrmFields. If not available then adds the object_type and service(combination) as a new entry or it removes\n // it from the crmField is data is cleared.\n // It is used to check if crm field corresponding to counterpart type(that is being loaded) has data already\n const crmService = crmObject.service.key\n const crmObjectType = crmObject.object_type\n const serviceTypeCombination = `${crmService}-${crmObjectType}`\n if (!state.loadedCrmFields[serviceTypeCombination]) {\n commit(\"addToLoadedCrmFields\", { serviceTypeCombination, itemId })\n } else {\n if (!value || value.length === 0) {\n commit(\"updateLoadedCrmFields\", {\n serviceTypeCombination,\n type: REDUCTION_LABEL,\n itemId\n })\n } else commit(\"updateLoadedCrmFields\", { serviceTypeCombination, type: INCREMENT_LABEL, itemId })\n }\n },\n setCounterparts ({ state }, counterparts) {\n if (!Array.isArray(counterparts)) {\n state.error = \"Counterparts must be an array\"\n return\n }\n state.counterparts = counterparts\n },\n setNotes ({ state }, notes) {\n state.notes = notes\n },\n createCall ({ dispatch, commit }, callData) {\n // TODO: can be moved into utils function?\n // I dont think the axios call here is required, the only thing we need is a convenient way to set the loading flags\n return new Promise((resolve, reject) => {\n commit(\"setLoading\", true)\n axios.post(appInfo.apiUrl, callData).then(response => {\n dispatch(\"handleError\", null)\n commit(\"setLoading\", false)\n resolve(response.data)\n }).catch(error => {\n dispatch(\"handleError\", error.response)\n commit(\"setLoading\", false)\n reject(error)\n })\n })\n },\n loadCall ({ dispatch, commit }, callId) {\n commit(\"setLoading\", true)\n return axios.get(appInfo.apiUrl + \"/\" + callId).then(response => {\n dispatch(\"handleError\", null)\n commit(\"setCallDetails\", response.data)\n commit(\"startCallTimer\")\n }).catch(error => {\n dispatch(\"handleError\", error.response)\n }).finally(() => {\n commit(\"setLoading\", false)\n })\n },\n updateCall ({ dispatch, getters }) {\n return axios.put(appInfo.apiUrl + \"/\" + getters.getCallId, getters.getCallData).catch(error => {\n dispatch(\"handleError\", error.response)\n })\n },\n activateItem ({ getters, commit }, item) {\n if (getters.isCallActive) {\n commit(\"updateActiveItemDuration\")\n commit(\"resetItemActivatedTime\")\n }\n commit(\"setActiveItem\", item)\n },\n saveCallDetails ({ commit, dispatch }) {\n /**\n * This method updates the time duration for last active item, clears the call duration counter and updates the call\n */\n return new Promise((resolve, reject) => {\n commit(\"updateActiveItemDuration\")\n commit(\"clearCallDurationCounter\")\n dispatch(\"updateCall\").then(() => {\n dispatch(\"setEndConversation\", true)\n resolve()\n }).catch(error => {\n reject(error)\n })\n })\n },\n endCall ({ commit, dispatch }, checkRequiredItems = true) {\n /**\n * This method waits for all items to be saved(delayed queue and waiting queue is emptied) and then checks if all\n * required items are answered only if checkRequiredItems flag is true. If checkRequiredItems is false, it saves\n * the call immediately without performing the check for the required items.\n * Note: requiredItem check must happen once all the items' saving operations are completed to ensure that the notes\n * and answers are updated to backend correctly before ending the call\n */\n return new Promise((resolve, reject) => {\n commit(\"setSaving\", true)\n debounceService.methods.executeAllDelayedOperations().then(() => {\n return networkController.methods.checkAllRequestsCompleted().then(() => {\n const promise = checkRequiredItems ? dispatch(\"canEndCall\") : Promise.resolve()\n return promise.then(() => {\n // update and end the call and stop audio recording if needed\n return dispatch(\"saveCallDetails\").then(() => {\n commit(\"setSaving\", false)\n // Importing this function from the GlobalMixin didn't work; that's why I repeated the\n // code to send message to the iFrame here\n dispatch(\"sendMessageToBaoSwift\", { type: \"callEnded\" })\n resolve()\n })\n })\n })\n }).catch((error) => {\n commit(\"setSaving\", false)\n dispatch(\"handleError\", error.response)\n reject(error)\n })\n })\n },\n sendMessageToBaoSwift ({ commit }, message) {\n // This is to check if Application is in iFrame\n if (window.self !== window.top) {\n if (window.parent && window.parent.postMessage) {\n window.parent.postMessage(message, \"*\")\n }\n }\n },\n canEndCall ({ commit, state, getters }) {\n /**\n * This method checks if call can be ended based on required items being answered.\n * Returns a resolved promise if all required items are answered\n * Rejects the promise if any required items are unanswered\n */\n return new Promise((resolve, reject) => {\n commit(\"resetUnansweredRequiredItems\")\n const unansweredRequiredItems = getters.findUnansweredRequiredItems({\n playbookItems: state.playbookItems,\n parent: null\n })\n setTimeout(() => {\n // Updating unanswered required items has a watcher on the component which scrolls to the alert. \"findUnansweredRequiredItems\" closes all non-required\n // items, so I need to ensure all the non-required items are closed before updating the unanswered required items, if not, the targetItem clientHeight might be\n // shorter than initially calculated for the scroll because the items above it might close while the scroll is ongoing. To solve this, hence the timeout, and the unanswered\n // required items are updated at once, instead of being pushed one by one\n commit(\"updateUnansweredRequiredItems\", unansweredRequiredItems)\n if (unansweredRequiredItems.length === 0) {\n resolve()\n } else {\n reject(new Error(\"Required items not answered\"))\n }\n }, 500)\n })\n },\n handleCancelCallResult ({ dispatch, commit }) {\n dispatch(\"setEndConversation\", false)\n commit(\"setShowCallResultModal\", false)\n },\n handleSavedCallResult ({ commit }, result) {\n commit(\"setShowCallResultModal\", false)\n commit(\"setCallResult\", result)\n },\n handleResetUnansweredRequiredItems ({ commit }) {\n commit(\"resetUnansweredRequiredItems\")\n },\n handleItemChanged: ({ dispatch }, item) => {\n /***\n * This method debounces \"saveCallItem\" method to avoid multiple requests\n * to backend\n */\n const callback = () => dispatch(\"saveCallItem\", item)\n debounceService.methods.debounceOperation(item.uniqueId, callback)\n },\n saveCallItem ({ dispatch, getters }, item) {\n /***\n * saves(creates/updates) the callItem for the given item and updates\n * the item accordingly\n */\n return new Promise((resolve, reject) => {\n // extract the callItem data from the item\n const callItemData = utils.getCallItemDataToSave(item, getters.getCallId)\n // prepare the request-callback for saving the callItem\n const request = utils.getCallItemSaveRequest(item, callItemData)\n // send the request via networkController(to avoid race condition)\n item.callItemPromise = networkController.methods.sendRequest(item.uniqueId, request)\n item.callItemPromise.then(() => {\n if (getters.isItemAnswered(item)) {\n Vue.set(item, \"edited\", true)\n dispatch(\"updateLastSaved\")\n }\n resolve(item)\n }).catch(error => {\n dispatch(\"handleError\", error.response)\n reject(error)\n })\n })\n },\n\n setEndConversation ({ dispatch }, value) {\n const setEndConversation = require(\"@/../src/apps/call/utils\").setEndConversation\n return setEndConversation({ dispatch }, value)\n },\n createAdditionalData ({ dispatch, commit }, data) {\n return axios.post(\"/api/objections\", data).catch(error => {\n dispatch(\"handleError\", error.response)\n })\n },\n deleteAdditionalData ({ dispatch }, additionalDataId) {\n return axios.delete(\"/api/objections/\" + additionalDataId).catch(error => {\n dispatch(\"handleError\", error.response)\n })\n },\n objectionModalClosed ({ dispatch, commit, state }, item) {\n return new Promise((resolve, reject) => {\n if (\n state.objectionRaisedForItem &&\n state.objectionRaisedForItem.loadedData &&\n state.objectionRaisedForItem.loadedData.length > 0\n ) {\n // collapse the item with the raised objection\n // this item is the last one in the list of loadedData of state.objectionRaisedForItem\n const objectionList = state.objectionRaisedForItem.loadedData\n objectionList[objectionList.length - 1].open = false\n }\n\n dispatch(\"activateItem\", item || state.objectionRaisedForItem).then(() => {\n commit(\"setDisplayObjectionModal\", false)\n commit(\"setActiveShortcut\", null)\n commit(\"setObjectionRaisedForItem\", null)\n if (!state.scroll) {\n resolve()\n return\n }\n return dispatch(\"scrollTo\", \"#\" + state.activeItem.uniqueId).then(() => {\n commit(\"setScroll\", false)\n resolve()\n })\n }).catch(error => {\n dispatch(\"handleError\", error)\n reject(error)\n })\n })\n },\n additionalDataSelected ({ dispatch, getters }, { payload, isObjection }) {\n if (isObjection) return dispatch(\"objectionWasSelected\", payload)\n return dispatch(\"additionalPlaybookSelected\", payload)\n },\n objectionWasSelected ({ dispatch, commit }, { objection, item }) {\n return new Promise((resolve, reject) => {\n objection = JSON.parse(JSON.stringify(objection))\n objection.selected_choice = objection\n commit(\"setObjectionRaisedForItem\", item)\n commit(\"setSelectedObjection\", objection)\n commit(\"setActiveShortcut\", objection)\n dispatch(\"getParentContainerOfObjection\", { id: objection.id })\n if (objection.workflow && objection.workflow.children) {\n dispatch(\"activateItem\", objection.workflow.children[0])\n }\n commit(\"setDisplayObjectionModal\", true)\n const data = { additionalDataChoice: objection, item, isObjection: true }\n dispatch(\"saveAdditionalData\", data).then(() => {\n resolve()\n }).catch(error => {\n dispatch(\"handleError\", error)\n reject(error)\n })\n })\n },\n additionalPlaybookSelected ({ dispatch, getters }, { additionalDataChoice, item }) {\n return new Promise((resolve, reject) => {\n dispatch(\"additionalPlaybookIsLoaded\", { additionalDataChoice, item }).then(adcLoaded => {\n if (adcLoaded) {\n // TODO: add comment why we are resolving + returning in this case\n resolve()\n return\n }\n dispatch(\"saveAdditionalData\", { additionalDataChoice, item, isObjection: false })\n .then(resolve)\n .catch(reject)\n })\n })\n },\n saveAdditionalData (\n { dispatch, commit, getters },\n { additionalDataChoice, item, isObjection = false }) {\n return new Promise((resolve, reject) => {\n if (!item.loadedData) Vue.set(item, \"loadedData\", [])\n const adcIndex = item.loadedData.length\n if (!isObjection) {\n // this should only be done for dyn. playbook but not for objection - not 100% why\n // TODO: once dyn. playbook type is removed from the item, we don't need to retrieve the data from the backend for the workflow\n // This is done so the user is shown a loading icon till the actual workflow is retrieved from the backend\n const { id, name, type } = additionalDataChoice\n Vue.set(item.loadedData, adcIndex, { open: true, selected_choice: { id, name, type } })\n }\n\n // The adcIndex is used to update item (at that index) with the newly created playbook\n // if no items are available we take the first one\n // this should almost never happen\n if (!item) item = state.playbookItems[0]\n\n if (!item.callItemPromise) {\n // if call-item was not created previously, then create it - and wait for it to be created\n dispatch(\"saveCallItem\", item)\n }\n item.callItemPromise.then(() => {\n // save additional data choice and retrieve data at the same time\n const playbookData = {\n call: getters.getCallId,\n talkscript_item: item.id,\n selected_choice: additionalDataChoice.id,\n call_item: item.callItem.id\n }\n dispatch(\"createAdditionalData\", playbookData).then(response => {\n const newADC = response.data\n if (additionalDataChoice.selected_choice) {\n newADC.selected_choice = additionalDataChoice.selected_choice\n }\n newADC.open = true\n Vue.set(item.loadedData, adcIndex, newADC)\n if (isObjection) {\n commit(\"setSelectedObjection\", newADC)\n } else {\n Vue.set(additionalDataChoice, \"loadedData\", newADC)\n }\n resolve()\n }).catch(err => reject(err))\n }).catch(err => reject(err))\n })\n },\n additionalPlaybookIsLoaded ({ dispatch }, { additionalDataChoice, item }) {\n // TODO: refactor\n return new Promise((resolve, reject) => {\n const { loadedData, index } = utils.getLoadedData(additionalDataChoice, item)\n if (!loadedData) {\n resolve(false)\n return\n }\n if (!additionalDataChoice.loadedData) additionalDataChoice.loadedData = loadedData\n additionalDataChoice.loadedData.open = true\n\n const selector = `#${item.uniqueId}-loadedData-${index}`\n dispatch(\"scrollTo\", selector).then(() => {\n resolve(true)\n }).catch(error => {\n reject(error)\n })\n })\n },\n async getParentContainerOfObjection ({ dispatch, commit, getters, state }, { id }) {\n // Treating the main container as a tree, I use breadth first search to get the parent container of the objection\n // or the objection itself, depending on what is required\n commit(\"setParentContainerOfSelectedObjection\", state.mainContainer)\n const queuedParentContainers = [state.mainContainer]\n for (let i = 0; i < queuedParentContainers.length; i++) {\n const currentContainer = queuedParentContainers[i]\n const playbookObjections = currentContainer.objections || []\n for await (const objection of playbookObjections) {\n if (objection.id === id) {\n // This might never be a case if the objection was added to a child item and not the parent\n // Hence the other check on the children below\n commit(\"setParentContainerOfSelectedObjection\", currentContainer)\n return currentContainer\n }\n }\n // After checking the mainContainer to get the parent of the objection, if it is not found\n // we first check the children's objections and return the parent container if the objection is found, else\n // we check the children for additional data and add the additional data's mainContainer to the queue\n const playbookChildren = currentContainer.children\n for await (const child of playbookChildren) {\n const currentChildObjections = child.objections\n for await (const objection of currentChildObjections) {\n if (objection.id === id) {\n commit(\"setParentContainerOfSelectedObjection\", currentContainer)\n return currentContainer\n }\n }\n const loadedData = child.loadedData\n if (loadedData && loadedData.length > 0) {\n for await (const adc of loadedData) {\n const childContainer = adc.selected_choice.workflow\n queuedParentContainers.push(childContainer)\n }\n }\n }\n }\n return null\n },\n async handleAnswerActions ({ dispatch, commit, getters, state }, {\n answerActions,\n vueComponent,\n answerPBItem,\n parentContainer,\n additionalData\n }) {\n for (const answerAction of answerActions) {\n if (answerAction.type === \"end_conversation\") {\n dispatch(\"endCall\")\n continue\n }\n const targetItem = getters.getItem(answerAction.data.id, answerAction.type, parentContainer)\n\n if (answerAction.type === \"custom\") {\n dispatch(\"handleCustomAnswerAction\", { answerAction, vueComponent, answerPBItem, targetItem })\n continue\n }\n\n if (!answerAction.data.id) continue\n\n if (!targetItem && answerAction.type !== \"add_playbook\") continue\n\n if (answerAction.type === \"expand\" || answerAction.type === \"collapse\") {\n dispatch(\"handleExpandAndCollapseAnswerAction\", { targetItem, type: answerAction.type })\n } else if (answerAction.type === \"jump\") {\n dispatch(\"handleJumpAnswerAction\", { answerActions, targetItem })\n } else if (answerAction.type === \"set_answer\") {\n dispatch(\"handleSetAnswerAction\", { answerAction, targetItem })\n } else if (answerAction.type === \"objection\" || answerAction.type === \"add_playbook\") {\n let activePlaybookItem\n if (answerPBItem.is_objection) {\n activePlaybookItem = await dispatch(\"getActivePlaybookItemForObjection\", { parentContainer, additionalData })\n } else activePlaybookItem = state.activeItem\n\n if (answerAction.type === \"objection\") {\n dispatch(\"handleObjectionAnswerAction\", { targetItem, activePlaybookItem })\n } else if (answerAction.type === \"add_playbook\") {\n // for scrolling\n const adcIndex = (activePlaybookItem && activePlaybookItem.loadedData) ? activePlaybookItem.loadedData.length : 0\n let selector = activePlaybookItem ? `#${activePlaybookItem.uniqueId}-loadedData-${adcIndex}` : \"\"\n // if the target item is chosen\n if (answerAction.data.targetId) {\n activePlaybookItem = state.mainContainer.children.find(item => item.id === answerAction.data.targetId)\n selector = undefined\n }\n\n dispatch(\"handleAddPlaybookAnswerAction\", {\n targetItem,\n activePlaybookItem,\n objectionID: answerAction.data.id\n }).then(() => {\n // This timeout was added because the scroll wasn't working properly; as if it was not waiting for\n // Vue.set(additionalDataChoice, \"loadedData\", newADC) to finish before scrolling\n // NextTick didn't resolve it too, hence the timeout\n // if the target item for playbook insertion is specified don't perform jump\n if (selector) {\n setTimeout(() => dispatch(\"scrollTo\", selector), 200)\n }\n })\n }\n }\n }\n },\n async getActivePlaybookItemForObjection ({ commit, state }, { parentContainer, additionalData }) {\n for await (const playbookItem of parentContainer.children) {\n if (playbookItem.loadedData) {\n for await (const loadedData of playbookItem.loadedData) {\n if (loadedData.id === additionalData.id) {\n return playbookItem\n }\n }\n }\n }\n },\n handleCustomAnswerAction ({ dispatch, commit, getters, state }, { answerAction, vueComponent, answerPBItem, targetItem }) {\n try {\n // Note: we explicitly WANT to execute a string-based function as this is coming from the backend in order to\n // execute custom code in an answer action\n const body = \"function( {vueComponent, storeFuncs, answerPBItem, targetPBItem} ){ \" + answerAction.data.code + \" }\"\n const wrap = s => \"{ return \" + body + \" };\"\n // eslint-disable-next-line no-new-func\n const func = new Function(wrap(body))\n\n let targetPBItem = null\n if (answerAction.data.id) {\n targetPBItem = targetItem\n }\n\n // We suppress lint warning here because we think we know what we are doing (note: we probably dont...)\n // eslint-disable-next-line no-useless-call\n func.call(null).call(null,\n { vueComponent, storeFuncs: { dispatch, commit, getters, state }, answerPBItem, targetPBItem }\n ) // looks weird but works, the function is called with the above specified arguments\n } catch (error) {\n console.error(error)\n }\n },\n handleExpandAndCollapseAnswerAction ({ commit, state }, { targetItem, type }) {\n if (type === \"expand\") {\n targetItem.open = true\n } else targetItem.open = false\n },\n handleSetAnswerAction ({ dispatch, commit, state }, { answerAction, targetItem }) {\n const answersChoicesToSelect = answerAction.data.targetId\n const getTransformedAnswer = (answerChoice, targetItem) => {\n return {\n id: answerChoice.id,\n question_id: answerChoice.id,\n text: answerChoice.label,\n // set has_importance flag to true if item type is rated_multiselect otherwise set to false.\n has_importance: targetItem.item_type === \"rated_multiselect\",\n importance: 5,\n actions: answerChoice.actions, // note: nested actions will have no effects here because answer actions are handled just once.\n selected: true,\n tags: answerChoice.tags\n }\n }\n\n let transformedAnswers = []\n // check whether the answer type is single select or multiselect and transform accordingly.\n if (Array.isArray(answersChoicesToSelect)) {\n transformedAnswers = answersChoicesToSelect.map(answerChoice => {\n return getTransformedAnswer(answerChoice, targetItem)\n })\n } else {\n transformedAnswers.push(getTransformedAnswer(answersChoicesToSelect, targetItem))\n }\n\n Vue.set(targetItem, \"selectedAnswers\", transformedAnswers)\n dispatch(\"handleItemChanged\", targetItem)\n },\n handleJumpAnswerAction ({ dispatch, commit, state }, { answerActions, targetItem }) {\n // If objection was raised before the jump then, on close of the objection modal, the item stored in the\n // ObjectionRaisedForItem-variable is made active item and it is scrolled to that item. So, reset the\n // ObjectionRaisedForItem to the target item of the jump, so that on close of the objection Modal the\n // item being jumped to is the target item and not the item where objection was raised.\n commit(\"setObjectionRaisedForItem\", targetItem)\n // TODO: The below code is required to re-jump if objection modal was opened as modal on-close event\n // re-jumps to old item. Figure-out the reason the closing of modal triggers its own scroll-event\n if (utils.findActionType(\"objection\", answerActions)) {\n commit(\"setScroll\", true)\n }\n\n const selector = `#${targetItem.uniqueId}`\n const targetElement = state.callViewComponent.$el.querySelector(selector)\n const scrollElement = document.getElementById(state.callViewItemsContainerId)\n\n dispatch(\"handleAnimationForScroll\", { targetElement })\n dispatch(\"handleScrollForJumpAnswerAction\", { targetElement, scrollElement })\n\n // This timeout is giving a rough estimate as to when the scroll will be finished, where the idea is to activate the item\n // immediately after the scroll. This is not entirely smooth but all methods I tried to get the exact time the scroll stopped\n // proved abortive 😔\n setTimeout(() => {\n dispatch(\"activateItem\", targetItem)\n }, 800)\n },\n handleAnimationForScroll ({ dispatch, commit, state }, { targetElement }) {\n const css = \".sample-class {padding: 20px;transition: all 0.4s; transition-delay: 0.7s; transition-timing-function: cubic-bezier(.45, 10.01, .65, -10.68);} .sample-class__active {transform: scaleX(1.012); padding: 0}\"\n const head = document.head || document.getElementsByTagName(\"head\")[0]\n const style = document.createElement(\"style\")\n\n head.appendChild(style)\n\n style.type = \"text/css\"\n if (style.styleSheet) {\n // This is required for IE8 and below.\n style.styleSheet.cssText = css\n } else {\n style.appendChild(document.createTextNode(css))\n }\n\n // animation - focus management\n const animElement = targetElement.parentElement\n animElement.classList.add(\"sample-class\")\n animElement.classList.toggle(\"sample-class__active\")\n setTimeout(() => {\n animElement.classList.toggle(\"sample-class__active\")\n animElement.classList.toggle(\"sample-class\")\n }, 1200)\n },\n handleScrollForJumpAnswerAction ({ commit, state }, { targetElement, scrollElement }) {\n return new Promise((resolve, reject) => {\n try {\n setTimeout(() => {\n if (targetElement.clientHeight > scrollElement.clientHeight) {\n // console.log(\"element is larger than screen -> scroll top of element to top of screen\")\n targetElement.scrollIntoView({ block: \"start\", behavior: \"smooth\" })\n } else if (targetElement.clientHeight > (scrollElement.clientHeight - mouseY)) {\n // console.log(\"element fits on screen, but not between mouse position and end of screen -> scroll end of element to end of screen\")\n targetElement.scrollIntoView({ block: \"end\", behavior: \"smooth\" })\n } else {\n // console.log(\"in this case the item title should be scrolled onto the mouse cursor\")\n // ParentElement is used because that's the component offsetting the scrollable element\n const targetTopPosition = targetElement.parentElement.offsetTop\n\n // Because we want to scroll to the mouse cursor, and not the top of the element, we have to\n // subtract the mouse offset to the top of the scrollable element i.e. (mouse offset to top of\n // screen - scrollable element offset to top of screen\n const headerOffset = scrollElement.offsetTop\n const topPosition = targetTopPosition - (mouseY - headerOffset)\n\n scrollElement.scrollTo({ top: topPosition, behavior: \"smooth\" })\n }\n }, 50)\n resolve()\n } catch (e) {\n console.error(e)\n reject(e)\n }\n })\n },\n async handleObjectionAnswerAction ({ dispatch, commit, state }, { targetItem, activePlaybookItem }) {\n const data = { objection: targetItem, item: activePlaybookItem }\n await dispatch(\"objectionWasSelected\", data)\n },\n async handleAddPlaybookAnswerAction (\n { dispatch, commit, state },\n { targetItem, activePlaybookItem, objectionID }) {\n let data\n if (!targetItem) {\n const newTargetItem = await dispatch(\"getObjectionChoice\", objectionID)\n data = { additionalDataChoice: newTargetItem, item: activePlaybookItem }\n } else {\n data = { additionalDataChoice: targetItem, item: activePlaybookItem }\n }\n if (data) await dispatch(\"additionalPlaybookSelected\", data)\n },\n async getObjectionChoice ({ commit, state }, ID) {\n const { data } = await axios.get(`/api/objectionchoices/${ID}`)\n\n return data\n },\n handleError ({ commit }, error) {\n commit(\"setError\", error) // Todo: set the global error store\n },\n storeCallViewComponent ({ commit }, component) {\n commit(\"setCallViewComponent\", component)\n },\n scrollTo ({ dispatch, commit, state }, selector) {\n return new Promise((resolve, reject) => {\n Vue.nextTick(() => {\n try {\n const targetElement = state.callViewComponent.$el.querySelector(selector)\n const scrollElement = document.getElementById(state.callViewItemsContainerId)\n dispatch(\"handleAnimationForScroll\", { targetElement })\n\n if (targetElement.clientHeight < scrollElement.clientHeight && targetElement.clientHeight > (scrollElement.clientHeight - mouseY)) {\n targetElement.scrollIntoView({ block: \"end\", behavior: \"smooth\" })\n } else {\n targetElement.scrollIntoView({ block: \"start\", behavior: \"smooth\" })\n }\n resolve()\n } catch (e) {\n console.error(e)\n reject(e)\n }\n })\n })\n }\n}\n\nfunction getNamespace (callId) {\n return \"conversation-\" + callId\n}\n\nexport const getCallStore = (namespace, override = {}) => {\n const usedGetters = { ...getters, ...(override.getGetters ? override.getGetters() : {}) }\n const usedState = { ...getInitialState(), ...(override.getState ? override.getState() : {}) }\n const usedActions = { ...actions, ...(override.getActions ? override.getActions() : {}) }\n const usedMutations = { ...mutations, ...(override.getMutations ? override.getMutations() : {}) }\n\n // console.log(usedActions)\n\n return {\n namespace,\n state: usedState,\n getters: usedGetters,\n mutations: usedMutations,\n actions: usedActions\n }\n}\n\n// Note: default exports are NOT refreshed when the value changes, thus unsuited for dynamic computation\n// export default currentCallStore\nexport let currentCallStore\nexport let mouseY\ndocument.addEventListener(\"mousemove\", function (event) {\n mouseY = event.clientY\n})\n\nexport function attachCallStore (vuexStore, callStore) {\n return registerAndGetStore(vuexStore, callStore)\n}\n\nfunction removeCallStore (vuexStore, callStore) {\n if (vuexStore.hasModule(callStore.moduleNamespace)) {\n vuexStore.unregisterModule(callStore.moduleNamespace)\n }\n callStore = null\n}\n\nconst previousCallStores = []\n\n// MAX_CALL_STORES contains the maximum number of call stores that are allowed to be created to avoid memory leak\nconst MAX_CALL_STORES = 3\n\nexport function setupNewCallStore (callId, vuexStore) {\n if (currentCallStore && currentCallStore.testing) {\n // we are testing -> nothing to be done, store should already be set up by the testing code\n return currentCallStore\n }\n\n const namespace = getNamespace(callId)\n try {\n const previousCallStore = previousCallStores.find(item => item.moduleNamespace === namespace)\n if (previousCallStore) {\n // in this case a module with the same ID has already been created -> we should set it as the currentCallStore and\n // reload the data from the backend\n currentCallStore = previousCallStore\n return currentCallStore\n }\n } catch (e) {\n console.log(e)\n }\n\n // First create a new store using the provided call id\n const newCallStore = getCallStore(namespace)\n // Next attach the call store to our Vuex store\n const result = setCallStore(vuexStore, newCallStore)\n // If number of call stores exceeds MAX_CALL_STORES, then remove/unregister the oldest call store\n if (previousCallStores.length === MAX_CALL_STORES) {\n const oldestCallStore = previousCallStores.shift()\n removeCallStore(vuexStore, oldestCallStore)\n }\n previousCallStores.push(result)\n\n // Debug logs:\n // console.log(\"Setup\")\n // console.log(result)\n // console.log(currentCallStore)\n\n return result\n}\n\nexport function setCallStore (vuexStore, callStore) {\n currentCallStore = attachCallStore(vuexStore, callStore)\n return currentCallStore\n}\n"],"sourceRoot":""}