(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["ContactView","chunk-7c89143a","chunk-2d207917","chunk-4a5f46a6","chunk-2d0c0a07","chunk-2d230c1b","chunk-60820dbc","chunk-7946f847","chunk-3e604bf2","chunk-2d230492","chunk-2d21e744"],{"0123":function(e,t,n){"use strict";e.exports=function(e,t,n,i,o){return e.config=t,n&&(e.code=n),e.request=i,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},"0131":function(e,t,n){"use strict";var i=n("8336"),o=n("b0af"),a=n("99d9"),r=n("ce87"),s=n("132d"),l=n("b974"),c=n("2fa4"),u=n("8654"),d=n("3a2f"),p=function(){var e=this,t=e._self._c;return t(r["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:n}){return[t(o["a"],{attrs:{id:"account-card",outlined:""}},[t(a["d"],{staticClass:"secondary--text py-2 border-b-1"},[e._v(" Account "),t(c["a"]),e.account?[n?t(d["a"],{attrs:{"open-delay":"300",bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:o}){return[t(i["a"],e._g(e._b({attrs:{small:"",icon:""},on:{click:function(t){return e.$emit("personalize-fields")}}},"v-btn",o,!1),n),[t(s["a"],{attrs:{small:"",color:"grey darken-1"}},[e._v(" mdi-eye ")])],1)]}}],null,!0)},[t("span",[e._v("Personalize what you want to see")])]):e._e(),t(d["a"],{attrs:{"open-delay":"500",bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:o}){return[t(i["a"],e._g(e._b({attrs:{small:"",icon:""},on:{click:function(t){return e.$emit("edit-account")}}},"v-btn",o,!1),n),[t(s["a"],{attrs:{small:"",color:"grey darken-1"}},[e._v(" mdi-pencil ")])],1)]}}],null,!0)},[t("span",[e._v("Edit")])]),t(d["a"],{attrs:{"open-delay":"500",bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:o}){return[t(i["a"],e._g(e._b({attrs:{small:"",icon:""},on:{click:function(t){e.switchAccount=!0}}},"v-btn",o,!1),n),[t(s["a"],{attrs:{small:"",color:"grey darken-1"}},[e._v(" mdi-swap-vertical ")])],1)]}}],null,!0)},[t("span",[e._v("Switch account")])])]:e.dataLoading||e.switchingAccount?e._e():[n?t(d["a"],{attrs:{"open-delay":"300",bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:o}){return[t(i["a"],e._g(e._b({attrs:{small:"",icon:""},on:{click:function(t){e.addAccount=!0}}},"v-btn",o,!1),n),[t(s["a"],{attrs:{small:"",color:"grey darken-1"}},[e._v(" mdi-plus ")])],1)]}}],null,!0)},[t("span",[e._v("Link an account")])]):e._e()]],2),t(a["c"],{staticClass:"px-4 pt-4 pb-0"},[e.dataLoading||e.account&&!e.switchAccount?[e.allFieldsHidden?t("div",{staticClass:"font-italic grey--text text--darken-2 mb-4"},[e._v(" All fields are hidden. You can unhide fields by clicking on personalize fields. ")]):e._e(),e.isFieldShown("Name","accountFieldsConfig")?t(r["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:n}){return[t("div",{staticClass:"mb-4"},[t("SkeletonLoader",{attrs:{loaderType:"sentences",styleClass:"mr-4",isLoading:e.dataLoading||e.switchingAccount}},[t("icon-label-value",{attrs:{id:"name",valuePlaceholder:"No account",icon:"mdi-office-building",label:"Name",dataType:"string",editComponent:"VTextField",showSuggestions:e.isContactPage?"account":"",allowEdit:!!(e.account||{}).name,hover:n,value:(e.account||{}).name,showValue:!!(e.account||{}).name},on:{"save-clicked":function(t){return e.onValueSaved("name",t)},"add-value":function(t){return e.$emit("edit-account")},"suggestion-selected":e.switchAccountOnProspect},scopedSlots:e._u([{key:"value",fn:function(){return[t("div",{staticClass:"d-flex align-center flex-wrap"},[t("router-link",{attrs:{to:{name:"AccountView",params:{id:e.account.id}}},scopedSlots:e._u([{key:"default",fn:function({navigate:n,href:i}){return[t("a",{staticClass:"mr-2",attrs:{href:i},on:{click:function(e){return e.stopPropagation(),n.apply(null,arguments)}}},[e._v(" "+e._s((e.account||{}).name)+" ")])]}}],null,!0)}),t(d["a"],{attrs:{bottom:"","open-delay":"200"},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t(s["a"],e._g({directives:[{name:"show",rawName:"v-show",value:(e.account||{}).website_url,expression:"(account || {}).website_url"}],staticClass:"mr-1",attrs:{small:""},on:{click:function(t){e.openInTab((e.account||{}).website_url)}}},n),[e._v(" mdi-web ")])]}}],null,!0)},[t("span",[e._v("Open Website")])]),t(d["a"],{attrs:{bottom:"","open-delay":"200"},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t(s["a"],e._g({directives:[{name:"show",rawName:"v-show",value:(e.account||{}).linkedin_url,expression:"(account || {}).linkedin_url"}],attrs:{small:"",color:"blue"},on:{click:function(t){e.openInTab((e.account||{}).linkedin_url)}}},n),[e._v(" mdi-linkedin ")])]}}],null,!0)},[t("span",[e._v("Open Linkedin")])])],1)]},proxy:!0}],null,!0)})],1)],1)]}}],null,!0)}):e._e(),e.isFieldShown("Description","accountFieldsConfig")?t(r["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:n}){return[t("div",{staticClass:"mb-4"},[t("SkeletonLoader",{attrs:{loaderType:"sentences",styleClass:"mr-4",isLoading:e.dataLoading||e.switchingAccount}},[t("icon-label-value",{attrs:{allowEdit:"",id:"description",valuePlaceholder:"No description",icon:"mdi-text",label:"Description",dataType:"text",editComponent:"VTextArea",value:(e.account||{}).description,hover:n,showValue:!!(e.account||{}).description},on:{"save-clicked":function(t){return e.onValueSaved("description",t)},"add-value":function(t){return e.$emit("edit-account")}},scopedSlots:e._u([{key:"value",fn:function(){return[t("read-more",{attrs:{respectLineBreak:"",text:(e.account||{}).description,charLimit:100}})]},proxy:!0}],null,!0)})],1)],1)]}}],null,!0)}):e._e(),e.showContactsInAccount?t("div",{staticClass:"mb-4"},[t("SkeletonLoader",{attrs:{loaderType:"sentences",styleClass:"mr-4",isLoading:e.dataLoading||e.switchingAccount}},[t("icon-label-value",{attrs:{valuePlaceholder:"No other contacts in this account",icon:"mdi-account-group",label:"Other contacts in this account",showValue:!!e.accountContacts.length},scopedSlots:e._u([{key:"value",fn:function(){return[t("SkeletonLoader",{attrs:{loaderType:"sentences",styleClass:"mr-4 mt-2",isLoading:e.contactsLoading}},[t("ul",e._l(e.accountContacts,(function(n){return t("li",{key:n.id},[t("router-link",{attrs:{to:{name:"ContactView",params:{id:n.id}}},scopedSlots:e._u([{key:"default",fn:function({navigate:i,href:o}){return[t("div",{staticClass:"d-flex align-center"},[t("a",{staticClass:"text-body-2 font-weight-medium",attrs:{href:o},on:{click:function(e){return e.stopPropagation(),i.apply(null,arguments)}}},[e._v(" "+e._s(e._get(n,"full_name",""))+" ")]),n.title?t("div",{staticClass:"text-caption grey--text text--darken-2 font-weight-medium ml-2"},[e._v(" ("+e._s(n.title)+") ")]):e._e()])]}}],null,!0)})],1)})),0),e.totalAccountContacts>3?t("router-link",{attrs:{to:{name:"AccountView",params:{id:e.account.id}}}},[e._v(" + "+e._s(e.totalAccountContacts-3)+" more ")]):e._e()],1)]},proxy:!0}],null,!0)})],1)],1):e._e(),e.isFieldShown("Phone","accountFieldsConfig")?t(r["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:n}){return[t("div",{staticClass:"mb-4"},[t("SkeletonLoader",{attrs:{loaderType:"sentences",styleClass:"mr-4",isLoading:e.dataLoading||e.switchingAccount}},[t("icon-label-value",{attrs:{allowEdit:"",id:"phoneNumbers",icon:"mdi-phone",valuePlaceholder:"No phone",hover:n,value:(e.account||{}).phoneNumbers,showValue:!!((e.account||{}).phoneNumbers||[]).length,label:"Phone"+(((e.account||{}).phoneNumbers||[]).length>1?"s":"")},on:{"edit-clicked":function(t){return e.initTempPhones()},"save-clicked":function(t){return e.onValueSaved("phoneNumbers",e.tempPhones)},"add-value":function(t){return e.$emit("edit-account")}},scopedSlots:e._u([{key:"value",fn:function(){return e._l((e.account||{}).phoneNumbers,(function(n,i){return t("div",{key:i,staticClass:"grey--text text--darken-4"},[t("PhoneNumber",{attrs:{showFormattingAction:"",phoneNumberObject:n,account:e.account},on:{"format-updated":function(t){return e.updatePhoneFormat(t,n)}}})],1)}))},proxy:!0},{key:"editState",fn:function(){return[e._l(e.tempPhones,(function(n,o){return t("div",{key:o,staticClass:"d-flex align-center extra-dense-fields my-2"},[t(u["a"],{staticClass:"mr-2 w-75 text-body-2",attrs:{dense:"",outlined:"","hide-details":"",placeholder:"Phone#"+(o+1)},model:{value:e.tempPhones[o].number,callback:function(t){e.$set(e.tempPhones[o],"number",t)},expression:"tempPhones[index].number"}}),t(l["a"],{staticClass:"mr-2 w-25 text-caption",attrs:{dense:"",outlined:"","hide-details":"","item-text":"label","item-value":"value",items:e.accountPhoneTypes},model:{value:e.tempPhones[o].phone_type,callback:function(t){e.$set(e.tempPhones[o],"phone_type",t)},expression:"tempPhones[index].phone_type"}}),t(i["a"],{attrs:{icon:"","x-small":""}},[t(s["a"],{attrs:{color:"red",size:"15"},on:{click:function(t){return e.removeTempPhone(o)}}},[e._v(" mdi-trash-can ")])],1)],1)})),t("div",{staticClass:"d-flex justify-end mt-n1 mb-3 pr-7 w-100 link text-caption",on:{click:e.addTempPhone}},[e._v(" Add another ")])]},proxy:!0}],null,!0)})],1)],1)]}}],null,!0)}):e._e(),e.isFieldShown("Industry","accountFieldsConfig")?t(r["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:n}){return[t("div",{staticClass:"mb-4"},[t("SkeletonLoader",{attrs:{loaderType:"sentences",styleClass:"mr-4",isLoading:e.dataLoading||e.switchingAccount}},[t("icon-label-value",{attrs:{allowEdit:"",id:"industry",valuePlaceholder:"No industry",icon:"mdi-factory",label:"Industry",dataType:"enum",editComponent:"VSelect",hover:n,value:(e.account||{}).industry,showValue:!!(e.account||{}).industry,editOptions:e.accountIndustries},on:{"save-clicked":function(t){return e.onValueSaved("industry",t)},"add-value":function(t){return e.$emit("edit-account")}},scopedSlots:e._u([{key:"value",fn:function(){return[t("read-more",{attrs:{text:(e.account||{}).industry}})]},proxy:!0}],null,!0)})],1)],1)]}}],null,!0)}):e._e(),e.isFieldShown("Ownership","accountFieldsConfig")?t(r["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:n}){return[t("div",{staticClass:"mb-4"},[t("SkeletonLoader",{attrs:{loaderType:"sentences",styleClass:"mr-4",isLoading:e.dataLoading||e.switchingAccount}},[t("icon-label-value",{attrs:{allowEdit:"",id:"ownership",valuePlaceholder:"No value",icon:"mdi-script-text-key",label:"Ownership",dataType:"enum",editComponent:"VSelect",editOptions:["Public","Private","Subsidiary","Other"],hover:n,value:(e.account||{}).ownership,showValue:!!(e.account||{}).ownership},on:{"save-clicked":function(t){return e.onValueSaved("ownership",t)},"add-value":function(t){return e.$emit("edit-account")}},scopedSlots:e._u([{key:"value",fn:function(){return[t("read-more",{attrs:{text:(e.account||{}).ownership,charLimit:100}})]},proxy:!0}],null,!0)})],1)],1)]}}],null,!0)}):e._e(),e.isFieldShown("Number of employees","accountFieldsConfig")?t(r["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:n}){return[t("div",{staticClass:"mb-4"},[t("SkeletonLoader",{attrs:{loaderType:"sentences",styleClass:"mr-4",isLoading:e.dataLoading||e.switchingAccount}},[t("icon-label-value",{attrs:{valuePlaceholder:"No value",icon:"mdi-account-group",label:"Number of employees",hover:n,showValue:!!(e.account||{}).number_of_employees},on:{"add-value":function(t){return e.$emit("edit-account")}},scopedSlots:e._u([{key:"value",fn:function(){return[t("read-more",{attrs:{text:""+(e.account||{}).number_of_employees,charLimit:100}})]},proxy:!0}],null,!0)})],1)],1)]}}],null,!0)}):e._e(),e.isFieldShown("Founded on","accountFieldsConfig")?t(r["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:n}){return[t("div",{staticClass:"mb-4"},[t("SkeletonLoader",{attrs:{loaderType:"sentences",styleClass:"mr-4",isLoading:e.dataLoading||e.switchingAccount}},[t("icon-label-value",{attrs:{allowEdit:"",id:"founded_on",valuePlaceholder:"No value",icon:"mdi-calendar-check",label:"Founded on",dataType:"date",editComponent:"DateTimePicker",hover:n,value:(e.account||{}).founded_on,showValue:!!(e.account||{}).founded_on},on:{"save-clicked":function(t){return e.onValueSaved("founded_on",t,"date")},"add-value":function(t){return e.$emit("edit-account")}},scopedSlots:e._u([{key:"value",fn:function(){return[t("read-more",{attrs:{text:""+e.convertToLocalTime((e.account||{}).founded_on),charLimit:100}})]},proxy:!0}],null,!0)})],1)],1)]}}],null,!0)}):e._e(),e.isFieldShown("SIC code","accountFieldsConfig")?t(r["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:n}){return[t("div",{staticClass:"mb-4"},[t("SkeletonLoader",{attrs:{loaderType:"sentences",styleClass:"mr-4",isLoading:e.dataLoading||e.switchingAccount}},[t("icon-label-value",{attrs:{allowEdit:"",id:"sic",valuePlaceholder:"No value",icon:"mdi-pound-box",label:"SIC code",dataType:"string",editComponent:"VTextField",hover:n,value:(e.account||{}).sic,showValue:!!(e.account||{}).sic},on:{"save-clicked":function(t){return e.onValueSaved("sic",t)},"add-value":function(t){return e.$emit("edit-account")}},scopedSlots:e._u([{key:"value",fn:function(){return[t("read-more",{attrs:{text:(e.account||{}).sic,charLimit:100}})]},proxy:!0}],null,!0)})],1)],1)]}}],null,!0)}):e._e()]:[e.addAccount||e.switchAccount?t("div",{staticClass:"mb-4"},[t("account-autocomplete",{attrs:{autofocus:"",inputPlaceholder:"Select account"},model:{value:e.accountToAdd,callback:function(t){e.accountToAdd=t},expression:"accountToAdd"}}),t("div",{staticClass:"d-flex align-center justify-end w-100 mt-2"},[t(i["a"],{staticClass:"white--text mr-2",attrs:{"x-small":"",color:"red"},on:{click:function(t){e.addAccount=!1,e.switchAccount=!1}}},[e._v(" Cancel ")]),t(i["a"],{attrs:{"x-small":"",color:"primary",disabled:!e.accountToAdd,loading:e.addAccountLoader},on:{click:e.addAccountToProspect}},[e._v(" "+e._s(e.switchAccount?"Switch":"Add")+" ")])],1)],1):t("div",{staticClass:"font-italic grey--text text--darken-2 mb-4"},[e._v(" No account linked ")])]],2)],1)]}}])})},h=[],f=n("2f62"),m=n("6885"),v=n("151a"),g=n("4324"),y=n("ee49"),b=n("fc88"),w=n("1bcb"),_=n("b59f"),x=n("e8e0"),k=n("2fa3"),C=n("e9f8");const S=n("0644"),T=n("9b02");var O={props:{account:{required:!0},allFieldsHidden:{type:Boolean},isFieldShown:{type:Function},dataLoading:{type:Boolean},showContactsInAccount:{type:Boolean},isContactPage:{type:Boolean,default:!1}},mixins:[x["a"]],components:{AccountAutocomplete:v["default"],SkeletonLoader:m["a"],ReadMore:b["a"],IconLabelValue:g["default"],PhoneNumber:y["default"]},data:()=>({accountContacts:[],totalAccountContacts:0,contactsLoading:!1,addAccountLoader:!1,accountToAdd:null,addAccount:!1,switchAccount:!1,switchingAccount:!1,tempPhones:[],accountPhoneTypes:[{label:"Company",value:"company"}]}),computed:{...Object(f["c"])("user",["getSettingByKey"]),...Object(f["c"])("contact",["contact"]),timezone(){return this.getSettingByKey("timezone")},accountIndustries(){return this.getSettingByKey("accountIndustries")}},watch:{account:{handler(e){e&&this.showContactsInAccount&&this.loadContactsInAccount()},immediate:!0}},methods:{_get:T,openInTab:k["S"],...Object(f["b"])("contact",["updateContact"]),...Object(f["b"])("accounts",["editAccount"]),updatePhoneFormat(e,t){const n=this.account.phoneNumbers.findIndex(e=>e.id===t.id);if(-1===n)return;const i={id:t.id,phone_type:t.phone_type,number:e},o=[...this.account.phoneNumbers.slice(0,n),i,...this.account.phoneNumbers.slice(n+1)];this.editAccount({...this.account,phoneNumbers:o}).then(e=>this.$emit("account-updated",e))},loadContactsInAccount(){this.contactsLoading=!0,_["a"].getProspectsByAccountId(this.account.id,{itemsPerPage:5,allUsers:!0}).then(e=>{this.accountContacts=e.data.filter(e=>e.id!==this.contact.id).slice(0,3),this.totalAccountContacts=e.pagination.total}).finally(()=>this.contactsLoading=!1)},addAccountToProspect(){this.addAccountLoader=!0,this.updateContact({prospectId:this.contact.id,prospect:{...this.contact,account:this.accountToAdd}}).then(()=>{this.$store.commit("snackbar/setSnack",{snack:"Account added successfully",snackType:"success"}),this.addAccount=!1,this.switchAccount=!1,this.$emit("fetch-contact")}).catch(()=>{this.$store.commit("snackbar/setSnack",{snack:"There was an issue saving the person",snackType:"error"})}).finally(()=>{this.addAccountLoader=!1})},switchAccountOnProspect(e){this.switchingAccount=!0,this.updateContact({prospectId:this.contact.id,prospect:{...this.contact,account:{id:e.id,name:e.name}}}).then(()=>{this.$store.commit("snackbar/setSnack",{snack:"Account added successfully",snackType:"success"}),this.$emit("fetch-contact")}).catch(()=>{this.$store.commit("snackbar/setSnack",{snack:"There was an issue saving the person",snackType:"error"})}).finally(()=>{this.switchingAccount=!1})},initTempPhones(){this.tempPhones=S(this.account.phoneNumbers)||[]},addTempPhone(){this.tempPhones=[...this.tempPhones,{number:"",phone_type:"company"}]},removeTempPhone(e){this.tempPhones=[...this.tempPhones.slice(0,e),...this.tempPhones.slice(e+1)]},onValueSaved(e,t,n){if("date"===n){const e=Object(C["o"])(t+" 12:00",!1,this.timezone);t=Object(C["h"])(e).toFormat(C["b"])}else if("datetime"===n){const e=Object(C["o"])(t,!1,this.timezone);t=Object(C["h"])(e).toFormat(C["b"])}const i={...this.account,[e]:t};this.editAccount(i).then(t=>{w["a"].$emit("clear-icon-label-edit",e),this.tempPhones=[],this.$emit("account-updated",t)})}}},P=O,A=n("2877"),E=Object(A["a"])(P,p,h,!1,null,null,null);t["a"]=E.exports},"02ae":function(e,t,n){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},"04b8":function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i["throw"](e))}catch(t){a(t)}}function l(e){e.done?n(e.value):o(e.value).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=2&a[0]?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(s){a=[6,s],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(t,"__esModule",{value:!0});var a="/operations",r=function(){function e(e){this.apiCall=e}return e.prototype.perform=function(e,t){return void 0===t&&(t={}),i(this,void 0,void 0,(function(){return o(this,(function(n){return[2,this.apiCall.post("".concat(a,"/").concat(e),{},t)]}))}))},e}();t.default=r},"0d5d":function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i["throw"](e))}catch(t){a(t)}}function l(e){e.done?n(e.value):o(e.value).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=2&a[0]?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(s){a=[6,s],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=a(n("9791")),s=function(){function e(e,t){this.presetId=e,this.apiCall=t}return e.prototype.retrieve=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.delete=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.apiCall.delete(this.endpointPath())]}))}))},e.prototype.endpointPath=function(){return"".concat(r.default.RESOURCEPATH,"/").concat(this.presetId)},e}();t.default=s},"0eff":function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i["throw"](e))}catch(t){a(t)}}function l(e){e.done?n(e.value):o(e.value).then(r,s)}l((i=i.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=2&a[0]?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(s){a=[6,s],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(t,"__esModule",{value:!0});var r=n("bd7c"),s=n("38b8"),l=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return i(t,e),t.prototype.create=function(e,t){return void 0===t&&(t={}),o(this,void 0,void 0,(function(){return a(this,(function(n){if(!e)throw new Error("No document provided");return[2,this.apiCall.post(this.endpointPath(),e,t)]}))}))},t.prototype.upsert=function(e,t){return void 0===t&&(t={}),o(this,void 0,void 0,(function(){return a(this,(function(n){if(!e)throw new Error("No document provided");return[2,this.apiCall.post(this.endpointPath(),e,Object.assign({},t,{action:"upsert"}))]}))}))},t.prototype.update=function(e,t){return void 0===t&&(t={}),o(this,void 0,void 0,(function(){return a(this,(function(n){if(!e)throw new Error("No document provided");return[2,this.apiCall.post(this.endpointPath(),e,Object.assign({},t,{action:"update"}))]}))}))},t.prototype.delete=function(e){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){return a(this,(function(t){return"string"===typeof e?[2,this.apiCall.delete(this.endpointPath(e),e)]:[2,this.apiCall.delete(this.endpointPath(),e)]}))}))},t.prototype.createMany=function(e,t){return void 0===t&&(t={}),o(this,void 0,void 0,(function(){return a(this,(function(n){return this.configuration.logger.warn("createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents"),[2,this.import(e,t)]}))}))},t.prototype.import=function(e,t){return void 0===t&&(t={}),o(this,void 0,void 0,(function(){var n,i,o,s;return a(this,(function(a){switch(a.label){case 0:if(Array.isArray(e))try{n=e.map((function(e){return JSON.stringify(e)})).join("\n")}catch(l){if(RangeError instanceof l&&(null===l||void 0===l?void 0:l.includes("Too many properties to enumerate")))throw new Error("".concat(l,"\n          It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object\n\n          Please try reducing the number of keys in your document, or using CURL to import your data.\n          "));throw new Error(l)}else n=e;return[4,this.apiCall.performRequest("post",this.endpointPath("import"),{queryParameters:t,bodyParameters:n,additionalHeaders:{"Content-Type":"text/plain"},skipConnectionTimeout:!0})];case 1:if(i=a.sent(),Array.isArray(e)){if(o=i.split("\n").map((function(e){return JSON.parse(e)})),s=o.filter((function(e){return!1===e.success})),s.length>0)throw new r.ImportError("".concat(o.length-s.length," documents imported successfully, ").concat(s.length," documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."),o);return[2,o]}return[2,i]}}))}))},t.prototype.export=function(e){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){return a(this,(function(t){return[2,this.apiCall.get(this.endpointPath("export"),e)]}))}))},t.prototype.exportStream=function(e){return void 0===e&&(e={}),o(this,void 0,void 0,(function(){return a(this,(function(t){return[2,this.apiCall.get(this.endpointPath("export"),e,{responseType:"stream"})]}))}))},t}(s.SearchOnlyDocuments);t.default=l},1:function(e,t){},"151a":function(e,t,n){"use strict";n.r(t);var i=n("c6a6"),o=n("cc20"),a=n("132d"),r=n("da13"),s=n("490a"),l=function(){var e=this,t=e._self._c;return t(i["a"],{ref:"account-autocomplete",attrs:{dense:"",outlined:"","small-chips":"","hide-details":"","hide-selected":"","return-object":"","item-text":"name","item-value":"name",items:e.accounts,loading:"loading"===e.apiState,"menu-props":{bottom:!0,offsetY:!0,nudgeBottom:"4px",maxWidth:"310px"},autofocus:e.autofocus,"search-input":e.search,placeholder:e.inputPlaceholder},on:{"update:searchInput":function(t){e.search=t},"update:search-input":[function(t){e.search=t},e.searchDebounced],keypress:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:(t.stopPropagation(),e.createNewAccount.apply(null,arguments))}},scopedSlots:e._u([{key:"selection",fn:function({item:n}){return[t(o["a"],{staticClass:"bg-selected primary--text font-weight-medium text-truncate mxw-100",staticStyle:{"max-width":"80%"},attrs:{label:"",small:""}},[e._v(e._s(n.name)+" ")])]}},{key:"append",fn:function(){return[e.searchLoading?t(s["a"],{attrs:{size:"18",width:"2",indeterminate:"",color:"primary"}}):e.hideInputIcon?e._e():t(a["a"],[e._v("mdi-office-building")])]},proxy:!0},{key:"no-data",fn:function(){return["error"===e.apiState?t(r["a"],{staticClass:"text-body-2"},[e._v(" No record found ")]):e.search?t(r["a"],[t("span",{staticClass:"text-body-2"},[e._v("Press "),t("kbd",[e._v("enter")]),e._v(" to create")])]):t(r["a"],[t("span",{staticClass:"text-body-2"},[e._v(" Enter name and press "),t("kbd",[e._v("enter")]),e._v(" to create account. ")])])]},proxy:!0}]),model:{value:e.tempValue,callback:function(t){e.tempValue=t},expression:"tempValue"}})},c=[],u=(n("14d9"),n("2f62")),d=n("f3b2"),p=n("bfa1");const h=n("0644"),f=n("8718"),m=n("b047c");var v={props:{value:{required:!0},autofocus:{type:Boolean},hideInputIcon:{type:Boolean},inputPlaceholder:{type:String}},data(){return{typeSenseClient:null,search:"",searchLoading:!1,accounts:[],apiState:null}},watch:{tempValue(e,t){if(e&&!t){const t=this.accounts.find(t=>t.id===e.id);t||(this.accounts=f(this.accounts,[e],"id").filter(e=>!!e))}}},methods:{searchDebounced:m((function(){this.fetchAccounts()}),300),fetchAccounts(){this.tempValue||(this.searchLoading=!0);const e="prod_";let t={searches:[{collection:e+"accounts",q:this.search||"",query_by:"name",per_page:50}]};this.typeSenseClient.multiSearch.perform(t).then(({results:e})=>{var t;const n=(null===(t=e[0])||void 0===t?void 0:t.hits.map(({document:e})=>({name:e.name,id:e.id})))||[];this.accounts=f(n,[this.value],"id").filter(e=>!!e)}).finally(()=>this.searchLoading=!1)},initTypeSense(){this.typeSenseClient=new d["SearchClient"]({nodes:[{host:"typesense.symbo.lol",port:"443",protocol:"https"}],apiKey:""+this.user.typesense_key,connectionTimeoutSeconds:2})},createNewAccount(){""!==this.search&&void 0===this.accounts.filter(e=>!!e).find(e=>(e.name||"").toLowerCase()===this.search.toLowerCase())&&(this.apiState="loading",p["a"].createAccount({name:this.search}).then(e=>{this.accounts.push(e),this.tempValue=e,this.search=""}).finally(()=>{this.apiState="success",this.$refs["account-autocomplete"].blur()}))}},computed:{...Object(u["c"])("user",["user"]),tempValue:{get(){return this.value},set(e){this.$emit("input",e)}}},created(){this.initTypeSense(),this.tempValue&&(this.accounts=[h(this.tempValue)].filter(e=>!!e)),this.fetchAccounts()}},g=v,y=(n("afdde"),n("2877")),b=Object(y["a"])(g,l,c,!1,null,null,null);t["default"]=b.exports},"16ab":function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=o(n("edd2")),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(a.default);t.default=r},1896:function(e,t,n){"use strict";n("511d")},"1bb2":function(e,t,n){"use strict";n("f589")},"22b2":function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=i(n("3d25")),a=i(n("4561")),r="/analytics",s=function(){function e(e){this.apiCall=e,this.individualAnalyticsRules={},this.apiCall=e,this._analyticsRules=new o.default(this.apiCall)}return e.prototype.rules=function(e){return void 0===e?this._analyticsRules:(void 0===this.individualAnalyticsRules[e]&&(this.individualAnalyticsRules[e]=new a.default(e,this.apiCall)),this.individualAnalyticsRules[e])},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return r},enumerable:!1,configurable:!0}),e}();t.default=s},2317:function(e,t,n){"use strict";var i=n("4f2c");function o(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,i=n._listeners.length;for(t=0;t<i;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,i=new Promise((function(e){n.subscribe(e),t=e})).then(e);return i.cancel=function(){n.unsubscribe(t)},i},e((function(e){n.reason||(n.reason=new i(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},o.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},o.source=function(){var e,t=new o((function(t){e=t}));return{token:t,cancel:e}},e.exports=o},2944:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i["throw"](e))}catch(t){a(t)}}function l(e){e.done?n(e.value):o(e.value).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=2&a[0]?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(s){a=[6,s],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(t,"__esModule",{value:!0});var a="/health",r=function(){function e(e){this.apiCall=e}return e.prototype.retrieve=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.apiCall.get(a)]}))}))},e}();t.default=r},"2bfd":function(e,t,n){},"2ecc":function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i["throw"](e))}catch(t){a(t)}}function l(e){e.done?n(e.value):o(e.value).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=2&a[0]?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(s){a=[6,s],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(t,"__esModule",{value:!0});var a="/metrics.json",r=function(){function e(e){this.apiCall=e}return e.prototype.retrieve=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.apiCall.get(a)]}))}))},e}();t.default=r},"33d1":function(e,t,n){"use strict";var i=n("23e7"),o=n("7b0b"),a=n("07fa"),r=n("5926"),s=n("44d2");i({target:"Array",proto:!0},{at:function(e){var t=o(this),n=a(t),i=r(e),s=i>=0?i:n+i;return s<0||s>=n?void 0:t[s]}}),s("at")},3515:function(e,t,n){"use strict";var i=n("132d"),o=function(){var e=this,t=e._self._c;return t("div",{staticClass:"d-flex align-center",staticStyle:{"min-width":"80px"}},[t(i["a"],{staticClass:"mr-1",attrs:{small:"",color:e.iconColor}},[e._v(" "+e._s(e.icon)+" ")]),t("div",{staticClass:"text-caption font-weight-medium grey--text text--darken-3"},[e._v(" "+e._s(e.time)+" ")])],1)},a=[],r={props:{time:{type:String}},computed:{icon(){return this.darkTime||this.midTime?"mdi-weather-night":"mdi-weather-sunny"},iconColor(){return this.darkTime?"primary darken-3":this.midTime?"#8BA3C9":"amber darken-2"},hour(){const[e,t]=[this.time.split(":")[0],this.time.split(" ")[1]],n="AM"==t?parseInt(e):parseInt(e)+12;return n},darkTime(){return[0,1,2,3,4,5,22,23].includes(this.hour)},midTime(){return[6,7,18,19,20,21].includes(this.hour)},brightTIme(){return[8,9,10,11,12,13,14,15,16,17].includes(this.hour)}}},s=r,l=n("2877"),c=Object(l["a"])(s,o,a,!1,null,null,null);t["a"]=c.exports},"354a":function(e,t,n){"use strict";var i=n("aa28");e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(i("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},"38b8":function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i["throw"](e))}catch(t){a(t)}}function l(e){e.done?n(e.value):o(e.value).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=2&a[0]?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(s){a=[6,s],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SearchOnlyDocuments=void 0;var r=a(n("8de0")),s=a(n("97e1")),l="/documents",c=function(){function e(e,t,n){this.collectionName=e,this.apiCall=t,this.configuration=n,this.requestWithCache=new r.default}return e.prototype.clearCache=function(){this.requestWithCache.clearCache()},e.prototype.search=function(e,t){var n=void 0===t?{}:t,a=n.cacheSearchResultsForSeconds,r=void 0===a?this.configuration.cacheSearchResultsForSeconds:a,s=n.abortSignal,l=void 0===s?null:s;return i(this,void 0,void 0,(function(){var t,n,i;return o(this,(function(o){for(n in t={},!0===this.configuration.useServerSideSearchCache&&(t["use_cache"]=!0),e)Array.isArray(e[n])&&(t[n]=e[n].join(","));return i=Object.assign({},e,t),[2,this.requestWithCache.perform(this.apiCall,this.apiCall.get,[this.endpointPath("search"),i,{abortSignal:l}],{cacheResponseForSeconds:r})]}))}))},e.prototype.endpointPath=function(e){return"".concat(s.default.RESOURCEPATH,"/").concat(this.collectionName).concat(l).concat(void 0===e?"":"/"+e)},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return l},enumerable:!1,configurable:!0}),e}();t.SearchOnlyDocuments=c},"3a0b":function(e,t,n){"use strict";var i=n("6491"),o=Object.prototype.toString;function a(e){return Array.isArray(e)}function r(e){return"undefined"===typeof e}function s(e){return null!==e&&!r(e)&&null!==e.constructor&&!r(e.constructor)&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function l(e){return"[object ArrayBuffer]"===o.call(e)}function c(e){return"[object FormData]"===o.call(e)}function u(e){var t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&l(e.buffer),t}function d(e){return"string"===typeof e}function p(e){return"number"===typeof e}function h(e){return null!==e&&"object"===typeof e}function f(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function m(e){return"[object Date]"===o.call(e)}function v(e){return"[object File]"===o.call(e)}function g(e){return"[object Blob]"===o.call(e)}function y(e){return"[object Function]"===o.call(e)}function b(e){return h(e)&&y(e.pipe)}function w(e){return"[object URLSearchParams]"===o.call(e)}function _(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function x(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)}function k(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),a(e))for(var n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}function C(){var e={};function t(t,n){f(e[n])&&f(t)?e[n]=C(e[n],t):f(t)?e[n]=C({},t):a(t)?e[n]=t.slice():e[n]=t}for(var n=0,i=arguments.length;n<i;n++)k(arguments[n],t);return e}function S(e,t,n){return k(t,(function(t,o){e[o]=n&&"function"===typeof t?i(t,n):t})),e}function T(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}e.exports={isArray:a,isArrayBuffer:l,isBuffer:s,isFormData:c,isArrayBufferView:u,isString:d,isNumber:p,isObject:h,isPlainObject:f,isUndefined:r,isDate:m,isFile:v,isBlob:g,isFunction:y,isStream:b,isURLSearchParams:w,isStandardBrowserEnv:x,forEach:k,merge:C,extend:S,trim:_,stripBOM:T}},"3a88":function(e,t,n){"use strict";var i=n("3a0b");function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){i.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},"3be5":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchOnlyCollection=void 0;var i=n("38b8"),o=function(){function e(e,t,n){this.name=e,this.apiCall=t,this.configuration=n,this._documents=new i.SearchOnlyDocuments(this.name,this.apiCall,this.configuration)}return e.prototype.documents=function(){return this._documents},e}();t.SearchOnlyCollection=o},"3d25":function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i["throw"](e))}catch(t){a(t)}}function l(e){e.done?n(e.value):o(e.value).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=2&a[0]?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(s){a=[6,s],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(t,"__esModule",{value:!0});var a="/analytics/rules",r=function(){function e(e){this.apiCall=e,this.apiCall=e}return e.prototype.upsert=function(e,t){return i(this,void 0,void 0,(function(){return o(this,(function(n){return[2,this.apiCall.put(this.endpointPath(e),t)]}))}))},e.prototype.retrieve=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.endpointPath=function(t){return"".concat(e.RESOURCEPATH).concat(void 0===t?"":"/"+t)},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return a},enumerable:!1,configurable:!0}),e}();t.default=r},"431c":function(e,t,n){"use strict";n.r(t);var i=n("c6a6"),o=n("b0af"),a=n("132d"),r=n("da13"),s=n("490a"),l=n("90a2"),c=function(){var e=this,t=e._self._c;return t(i["a"],{ref:"tag-autocomplete",attrs:{multiple:"",outlined:"","small-chips":"","return-object":"","hide-selected":"","item-text":"name","item-value":"name",placeholder:e.placeholder,disabled:e.disabled,items:e.tags,label:e.hideLabel?"":e.label,loading:"loading"===e.apiState,"menu-props":{bottom:!e.top,top:e.top,offsetY:!0,nudgeBottom:e.top?"":"4px",nudgeTop:e.top?"4px":"",maxHeight:e.menuMaxHeight},dense:e.dense,"search-input":e.search,"persistent-hint":!e.hideHint,"hide-details":e.hideHint,hint:e.hideHint?"":"Customize the look of your tags in settings"},on:{"update:searchInput":function(t){e.search=t},"update:search-input":[function(t){e.search=t},e.searchDebounced],keypress:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.createNewTag.apply(null,arguments)}},scopedSlots:e._u([{key:"append",fn:function(){return[e.searchLoading?t(s["a"],{attrs:{size:"18",width:"2",indeterminate:"",color:"primary"}}):e.hideIcon?e._e():t(a["a"],{staticClass:"py-1",attrs:{size:"18"}},[e._v("mdi-tag")])]},proxy:!0},e.hideHint?null:{key:"message",fn:function({}){return[t("span",[e._v(" Customize the look of your tags in "),t("router-link",{attrs:{to:{name:"Settings",params:{initialSettingCategory:"Tags"}}}},[e._v("settings")]),e._v(". ")],1)]}},{key:"no-data",fn:function(){return["error"===e.apiState?t(r["a"],{staticClass:"text-body-2"},[e._v(" Unable to load tags ")]):e.tempValue&&e.tempValue.find(t=>t.name==e.search)?t(r["a"],[t("prospect-tag",{attrs:{tag:{name:e.search},size:"small",hideIcon:""}}),e._v("  "),t("span",{staticClass:"text-body-2"},[e._v("already selected.")])],1):t(r["a"],[t("span",{staticClass:"text-body-2"},[e._v(" Enter name and press "),t("kbd",[e._v("enter")]),e._v(" to create tag. ")])])]},proxy:!0},{key:"selection",fn:function({attrs:n,item:i,parent:o}){return[t("prospect-tag",e._b({attrs:{allowDelete:"",size:"small",disabled:e.disabled,tag:i},on:{"delete-tag":function(e){return o.selectItem(i)}}},"prospect-tag",n,!1))]}},{key:"item",fn:function({item:n,on:i,attrs:o}){return[t(r["a"],e._g(e._b({attrs:{dense:""}},"v-list-item",o,!1),i),[t("prospect-tag",{attrs:{tag:n,size:"small"}})],1)]}},{key:"append-item",fn:function(){return[e.pageLoading?t("div",{staticClass:"w-100 d-flex align-center justify-center"},[t(s["a"],{attrs:{size:"18",width:"2",indeterminate:"",color:"primary"}})],1):t(o["a"],{directives:[{def:l["a"],name:"intersect",rawName:"v-intersect.quiet",value:e.getNextPage,expression:"getNextPage",modifiers:{quiet:!0}}],attrs:{height:"1"}})]},proxy:!0}],null,!0),model:{value:e.tempValue,callback:function(t){e.tempValue=t},expression:"tempValue"}})},u=[],d=(n("14d9"),n("0278"));const p=n("0644"),h=n("8718"),f=n("b047c");var m={props:{value:{required:!0},dense:{type:Boolean},hideHint:{type:Boolean},hideLabel:{type:Boolean},hideIcon:{type:Boolean},top:{type:Boolean},menuMaxHeight:{type:String,default:"160px"},placeholder:{default:"Add tags",type:String},label:{default:"Assign tags",type:String},disabled:{type:Boolean,default:!1}},data(){return{search:"",searchLoading:!1,pageLoading:!1,page:1,lastPage:2,tags:[],apiState:null}},methods:{getNextPage(e,t,n){this.tags.length&&n&&this.page<this.lastPage&&(this.page++,this.pageLoading=!0,this.fetchTags({page:this.page}))},searchDebounced:f((function(e){this.searchLoading=!0,this.page=1,this.fetchTags({searchByName:e,page:this.page})}),300),fetchTags(e){Object(d["c"])(e).then(e=>{this.searchLoading=!1,this.pageLoading=!1,this.lastPage=e.pagination.lastPage,this.tags=h(this.tags,e.data,"id")})},createNewTag(){""!==this.search&&void 0===this.tags.find(e=>e.name===this.search)&&(this.apiState="loading",Object(d["a"])(this.search).then(e=>{var t;this.tags.push(e),null===(t=this.tempValue)||void 0===t||t.push(e),this.search=""}).finally(()=>{this.apiState="success",this.$refs["tag-autocomplete"].blur()}))}},computed:{tempValue:{get(){return this.value},set(e){this.$emit("input",e)}}},created(){this.tempValue&&(this.tags=p(this.tempValue)),this.fetchTags()}},v=m,g=n("2877"),y=Object(g["a"])(v,c,u,!1,null,"29b550c4",null);t["default"]=y.exports},4561:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i["throw"](e))}catch(t){a(t)}}function l(e){e.done?n(e.value):o(e.value).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=2&a[0]?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(s){a=[6,s],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=a(n("3d25")),s=function(){function e(e,t){this.name=e,this.apiCall=t}return e.prototype.retrieve=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.delete=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.apiCall.delete(this.endpointPath())]}))}))},e.prototype.endpointPath=function(){return"".concat(r.default.RESOURCEPATH,"/").concat(this.name)},e}();t.default=s},4691:function(e,t,n){"use strict";var i=n("9c95").version,o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var a={};function r(e,t,n){if("object"!==typeof e)throw new TypeError("options must be an object");var i=Object.keys(e),o=i.length;while(o-- >0){var a=i[o],r=t[a];if(r){var s=e[a],l=void 0===s||r(s,a,e);if(!0!==l)throw new TypeError("option "+a+" must be "+l)}else if(!0!==n)throw Error("Unknown option "+a)}}o.transitional=function(e,t,n){function o(e,t){return"[Axios v"+i+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,i,r){if(!1===e)throw new Error(o(i," has been removed"+(t?" in "+t:"")));return t&&!a[i]&&(a[i]=!0,console.warn(o(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,r)}},e.exports={assertOptions:r,validators:o}},"48cc":function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i["throw"](e))}catch(t){a(t)}}function l(e){e.done?n(e.value):o(e.value).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=2&a[0]?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(s){a=[6,s],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=a(n("f58d")),s=function(){function e(e,t){this.id=e,this.apiCall=t}return e.prototype.retrieve=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.delete=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.apiCall.delete(this.endpointPath())]}))}))},e.prototype.endpointPath=function(){return"".concat(r.default.RESOURCEPATH,"/").concat(this.id)},e}();t.default=s},"4ee7":function(e,t,n){"use strict";var i=n("3a0b"),o=n("9a29"),a=n("96ce"),r=n("f93e"),s=n("4f2c");function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s("canceled")}e.exports=function(e){l(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=i.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),i.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]}));var t=e.adapter||r.adapter;return t(e).then((function(t){return l(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return a(t)||(l(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},"4f2c":function(e,t,n){"use strict";function i(e){this.message=e}i.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},i.prototype.__CANCEL__=!0,e.exports=i},"511d":function(e,t,n){},5248:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i["throw"](e))}catch(t){a(t)}}function l(e){e.done?n(e.value):o(e.value).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=2&a[0]?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(s){a=[6,s],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=a(n("daaa")),s=n("bd7c"),l=a(n("edd2")),c="X-TYPESENSE-API-KEY",u=!0,d=!1,p=function(){function e(e){this.configuration=e,this.apiKey=this.configuration.apiKey,this.nodes=null==this.configuration.nodes?this.configuration.nodes:JSON.parse(JSON.stringify(this.configuration.nodes)),this.nearestNode=null==this.configuration.nearestNode?this.configuration.nearestNode:JSON.parse(JSON.stringify(this.configuration.nearestNode)),this.connectionTimeoutSeconds=this.configuration.connectionTimeoutSeconds,this.healthcheckIntervalSeconds=this.configuration.healthcheckIntervalSeconds,this.numRetriesPerRequest=this.configuration.numRetries,this.retryIntervalSeconds=this.configuration.retryIntervalSeconds,this.sendApiKeyAsQueryParam=this.configuration.sendApiKeyAsQueryParam,this.additionalUserHeaders=this.configuration.additionalHeaders,this.logger=this.configuration.logger,this.initializeMetadataForNodes(),this.currentNodeIndex=-1}return e.prototype.get=function(e,t,n){void 0===t&&(t={});var a=void 0===n?{}:n,r=a.abortSignal,s=void 0===r?null:r,l=a.responseType,c=void 0===l?void 0:l;return i(this,void 0,void 0,(function(){return o(this,(function(n){return[2,this.performRequest("get",e,{queryParameters:t,abortSignal:s,responseType:c})]}))}))},e.prototype.delete=function(e,t){return void 0===t&&(t={}),i(this,void 0,void 0,(function(){return o(this,(function(n){return[2,this.performRequest("delete",e,{queryParameters:t})]}))}))},e.prototype.post=function(e,t,n,a){return void 0===t&&(t={}),void 0===n&&(n={}),void 0===a&&(a={}),i(this,void 0,void 0,(function(){return o(this,(function(i){return[2,this.performRequest("post",e,{queryParameters:n,bodyParameters:t,additionalHeaders:a})]}))}))},e.prototype.put=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),i(this,void 0,void 0,(function(){return o(this,(function(i){return[2,this.performRequest("put",e,{queryParameters:n,bodyParameters:t})]}))}))},e.prototype.patch=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),i(this,void 0,void 0,(function(){return o(this,(function(i){return[2,this.performRequest("patch",e,{queryParameters:n,bodyParameters:t})]}))}))},e.prototype.performRequest=function(e,t,n){var a,s,l,c=n.queryParameters,p=void 0===c?null:c,h=n.bodyParameters,f=void 0===h?null:h,m=n.additionalHeaders,v=void 0===m?{}:m,g=n.abortSignal,y=void 0===g?null:g,b=n.responseType,w=void 0===b?void 0:b,_=n.skipConnectionTimeout,x=void 0!==_&&_;return i(this,void 0,void 0,(function(){var n,i,c,h,m,g;return o(this,(function(b){switch(b.label){case 0:this.configuration.validate(),n=Date.now(),this.logger.debug("Request #".concat(n,": Performing ").concat(e.toUpperCase()," request: ").concat(t)),c=function(c){var m,g,b,_,k,C,S;return o(this,(function(o){switch(o.label){case 0:if(m=h.getNextNode(n),h.logger.debug("Request #".concat(n,": Attempting ").concat(e.toUpperCase()," request Try #").concat(c," to Node ").concat(m.index)),y&&y.aborted)return[2,{value:Promise.reject(new Error("Request aborted by caller."))}];g=void 0,o.label=1;case 1:return o.trys.push([1,3,5,6]),b={method:e,url:h.uriFor(t,m),headers:Object.assign({},h.defaultHeaders(),v,h.additionalUserHeaders),maxContentLength:1/0,maxBodyLength:1/0,responseType:w,validateStatus:function(e){return e>0},transformResponse:[function(e,t){var n=e;return void 0!==t&&"string"===typeof e&&t["content-type"]&&t["content-type"].startsWith("application/json")&&(n=JSON.parse(e)),n}]},!0!==x&&(b.timeout=1e3*h.connectionTimeoutSeconds),p&&0!==Object.keys(p).length&&(b.params=p),h.sendApiKeyAsQueryParam&&(b.params=b.params||{},b.params["x-typesense-api-key"]=h.apiKey),f&&("string"===typeof f&&0!==f.length||"object"===typeof f&&0!==Object.keys(f).length)&&(b.data=f),y&&(_=r.default.CancelToken,k=_.source(),g=function(){return k.cancel()},y.addEventListener("abort",g),b.cancelToken=k.token),[4,(0,r.default)(b)];case 2:if(C=o.sent(),C.status>=1&&C.status<=499&&h.setNodeHealthcheck(m,u),h.logger.debug("Request #".concat(n,": Request to Node ").concat(m.index," was made. Response Code was ").concat(C.status,".")),C.status>=200&&C.status<300)return[2,{value:Promise.resolve(C.data)}];if(C.status<500)return[2,{value:Promise.reject(h.customErrorForResponse(C,null===(a=C.data)||void 0===a?void 0:a.message))}];throw h.customErrorForResponse(C,null===(s=C.data)||void 0===s?void 0:s.message);case 3:return S=o.sent(),h.setNodeHealthcheck(m,d),i=S,h.logger.warn("Request #".concat(n,": Request to Node ").concat(m.index,' failed due to "').concat(S.code," ").concat(S.message).concat(null==S.response?"":" - "+JSON.stringify(null===(l=S.response)||void 0===l?void 0:l.data),'"')),h.logger.warn("Request #".concat(n,": Sleeping for ").concat(h.retryIntervalSeconds,"s and then retrying request...")),[4,h.timer(h.retryIntervalSeconds)];case 4:return o.sent(),[3,6];case 5:return y&&g&&y.removeEventListener("abort",g),[7];case 6:return[2]}}))},h=this,m=1,b.label=1;case 1:return m<=this.numRetriesPerRequest+1?[5,c(m)]:[3,4];case 2:if(g=b.sent(),"object"===typeof g)return[2,g.value];b.label=3;case 3:return m++,[3,1];case 4:return this.logger.debug("Request #".concat(n,": No retries left. Raising last error")),[2,Promise.reject(i)]}}))}))},e.prototype.getNextNode=function(e){if(void 0===e&&(e=0),null!=this.nearestNode){if(this.logger.debug("Request #".concat(e,": Nodes Health: Node ").concat(this.nearestNode.index," is ").concat(!0===this.nearestNode.isHealthy?"Healthy":"Unhealthy")),!0===this.nearestNode.isHealthy||this.nodeDueForHealthcheck(this.nearestNode,e))return this.logger.debug("Request #".concat(e,": Updated current node to Node ").concat(this.nearestNode.index)),this.nearestNode;this.logger.debug("Request #".concat(e,": Falling back to individual nodes"))}this.logger.debug("Request #".concat(e,": Nodes Health: ").concat(this.nodes.map((function(e){return"Node ".concat(e.index," is ").concat(!0===e.isHealthy?"Healthy":"Unhealthy")})).join(" || ")));for(var t=this.nodes[0],n=0;n<=this.nodes.length;n++)if(this.currentNodeIndex=(this.currentNodeIndex+1)%this.nodes.length,t=this.nodes[this.currentNodeIndex],!0===t.isHealthy||this.nodeDueForHealthcheck(t,e))return this.logger.debug("Request #".concat(e,": Updated current node to Node ").concat(t.index)),t;return this.logger.debug("Request #".concat(e,": No healthy nodes were found. Returning the next node, Node ").concat(t.index)),t},e.prototype.nodeDueForHealthcheck=function(e,t){void 0===t&&(t=0);var n=Date.now()-e.lastAccessTimestamp>1e3*this.healthcheckIntervalSeconds;return n&&this.logger.debug("Request #".concat(t,": Node ").concat(e.index," has exceeded healtcheckIntervalSeconds of ").concat(this.healthcheckIntervalSeconds,". Adding it back into rotation.")),n},e.prototype.initializeMetadataForNodes=function(){var e=this;null!=this.nearestNode&&(this.nearestNode.index="nearestNode",this.setNodeHealthcheck(this.nearestNode,u)),this.nodes.forEach((function(t,n){t.index=n,e.setNodeHealthcheck(t,u)}))},e.prototype.setNodeHealthcheck=function(e,t){e.isHealthy=t,e.lastAccessTimestamp=Date.now()},e.prototype.uriFor=function(e,t){return null!=t.url?"".concat(t.url).concat(e):"".concat(t.protocol,"://").concat(t.host,":").concat(t.port).concat(t.path).concat(e)},e.prototype.defaultHeaders=function(){var e={};return this.sendApiKeyAsQueryParam||(e[c]=this.apiKey),e["Content-Type"]="application/json",e},e.prototype.timer=function(e){return i(this,void 0,void 0,(function(){return o(this,(function(t){return[2,new Promise((function(t){return setTimeout(t,1e3*e)}))]}))}))},e.prototype.customErrorForResponse=function(e,t){var n="Request failed with HTTP code ".concat(e.status);"string"===typeof t&&""!==t.trim()&&(n+=" | Server said: ".concat(t));var i=new l.default(n);return i=400===e.status?new s.RequestMalformed(n):401===e.status?new s.RequestUnauthorized(n):404===e.status?new s.ObjectNotFound(n):409===e.status?new s.ObjectAlreadyExists(n):422===e.status?new s.ObjectUnprocessable(n):e.status>=500&&e.status<=599?new s.ServerError(n):new s.HTTPError(n),i.httpStatus=e.status,i},e}();t.default=p},5847:function(e,t,n){"use strict";n("929b")},"5c7d":function(e,t,n){var i,o;(function(a,r){"use strict";i=r,o="function"===typeof i?i.call(t,n,t,e):i,void 0===o||(e.exports=o)})(0,(function(){"use strict";var e=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),i=["trace","debug","info","warn","error"];function o(e,t){var n=e[t];if("function"===typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(i){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function a(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function r(i){return"debug"===i&&(i="log"),typeof console!==t&&("trace"===i&&n?a:void 0!==console[i]?o(console,i):void 0!==console.log?o(console,"log"):e)}function s(t,n){for(var o=0;o<i.length;o++){var a=i[o];this[a]=o<t?e:this.methodFactory(a,t,n)}this.log=this.debug}function l(e,n,i){return function(){typeof console!==t&&(s.call(this,n,i),this[e].apply(this,arguments))}}function c(e,t,n){return r(e)||l.apply(this,arguments)}function u(e,n,o){var a,r=this;n=null==n?"WARN":n;var l="loglevel";function u(e){var n=(i[e]||"silent").toUpperCase();if(typeof window!==t&&l){try{return void(window.localStorage[l]=n)}catch(o){}try{window.document.cookie=encodeURIComponent(l)+"="+n+";"}catch(o){}}}function d(){var e;if(typeof window!==t&&l){try{e=window.localStorage[l]}catch(o){}if(typeof e===t)try{var n=window.document.cookie,i=n.indexOf(encodeURIComponent(l)+"=");-1!==i&&(e=/^([^;]+)/.exec(n.slice(i))[1])}catch(o){}return void 0===r.levels[e]&&(e=void 0),e}}function p(){if(typeof window!==t&&l){try{return void window.localStorage.removeItem(l)}catch(e){}try{window.document.cookie=encodeURIComponent(l)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}"string"===typeof e?l+=":"+e:"symbol"===typeof e&&(l=void 0),r.name=e,r.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},r.methodFactory=o||c,r.getLevel=function(){return a},r.setLevel=function(n,i){if("string"===typeof n&&void 0!==r.levels[n.toUpperCase()]&&(n=r.levels[n.toUpperCase()]),!("number"===typeof n&&n>=0&&n<=r.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(a=n,!1!==i&&u(n),s.call(r,n,e),typeof console===t&&n<r.levels.SILENT)return"No console available for logging"},r.setDefaultLevel=function(e){n=e,d()||r.setLevel(e,!1)},r.resetLevel=function(){r.setLevel(n,!1),p()},r.enableAll=function(e){r.setLevel(r.levels.TRACE,e)},r.disableAll=function(e){r.setLevel(r.levels.SILENT,e)};var h=d();null==h&&(h=n),r.setLevel(h,!1)}var d=new u,p={};d.getLogger=function(e){if("symbol"!==typeof e&&"string"!==typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=p[e];return t||(t=p[e]=new u(e,d.getLevel(),d.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return d.noConflict=function(){return typeof window!==t&&window.log===d&&(window.log=h),d},d.getLoggers=function(){return p},d["default"]=d,d}))},"5d1b":function(e,t,n){"use strict";var i=n("3a0b"),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,a,r={};return e?(i.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),t=i.trim(e.substr(0,a)).toLowerCase(),n=i.trim(e.substr(a+1)),t){if(r[t]&&o.indexOf(t)>=0)return;r[t]="set-cookie"===t?(r[t]?r[t]:[]).concat([n]):r[t]?r[t]+", "+n:n}})),r):r}},6339:function(e,t,n){"use strict";var i=n("3a0b"),o=n("6491"),a=n("9b5c"),r=n("8e7f"),s=n("f93e");function l(e){var t=new a(e),n=o(a.prototype.request,t);return i.extend(n,a.prototype,t),i.extend(n,t),n.create=function(t){return l(r(e,t))},n}var c=l(s);c.Axios=a,c.Cancel=n("4f2c"),c.CancelToken=n("2317"),c.isCancel=n("96ce"),c.VERSION=n("9c95").version,c.all=function(e){return Promise.all(e)},c.spread=n("c7f8"),c.isAxiosError=n("cc8f"),e.exports=c,e.exports.default=c},6491:function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];return e.apply(t,n)}}},"66e6":function(e,t,n){"use strict";n.r(t);var i=n("8336"),o=n("b0af"),a=n("cc20"),r=n("132d"),s=n("e449"),l=n("3a2f"),c=function(){var e=this,t=e._self._c;return t("div",{staticClass:"w-100 d-flex align-center bar-wrapper"},[e.statusBarOverflow?t(i["a"],{staticClass:"mr-2",attrs:{icon:"",small:"","min-height":"16",height:"16","max-height":"16","min-width":"16",width:"16","max-width":"16"},on:{click:function(t){return e.scrollStatusBar(!0)}}},[t(r["a"],[e._v("mdi-chevron-left")])],1):e._e(),e.prospectStatuses?t("div",{staticClass:"d-flex align-center prospect-status-bar",class:{overflow:e.statusBarOverflow}},e._l(e.prospectStatuses,(function(n,c){var u;return t("div",{key:n.value,staticClass:"flex-grow-1"},[e.isContactView?t(s["a"],{attrs:{"open-on-hover":"","offset-y":"",bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:i}){return[t(a["a"],e._g({staticClass:"font-weight-medium hover-outlined flex-grow-1 d-flex justify-center",class:{"first-stage":0===c,"rounded-l-xl":0===c,"middle-stage":c!==e.prospectStatuses.length-1&&0!==c,"last-stage":c===e.prospectStatuses.length-1,"rounded-r-xl":c===e.prospectStatuses.length-1},staticStyle:{overflow:"visible"},style:`opacity: ${e.getStatusOpacity(n)};`,attrs:{id:n.value,"x-small":"",label:"",color:""+(e.selectedStatus&&e.selectedStatus.value!==n.value?"grey":n.color),"text-color":e.selectedStatus&&e.selectedStatus.value!==n.value?"black":e.getTextColorFromBG(n.color)}},i),[e._v(" "+e._s(n.name)+" "),t("div",{staticClass:"hover-to-display",class:{hovered:e.hoveredStatus===n.value}}),n.closed?t(l["a"],{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t(r["a"],e._g({staticClass:"ml-1",attrs:{color:"red darken-4","x-small":""}},n),[e._v("mdi-cancel")])]}}],null,!0)},[t("span",[e._v("People with this status are excluded from default table view.")])]):e._e()],1)]}}],null,!0)},[t("div",{staticStyle:{height:"8px",background:"transparent"},on:{mouseover:function(t){e.hoveredStatus=n.value},mouseleave:function(t){e.hoveredStatus=null}}}),t(o["a"],{staticClass:"px-3 py-2 hover-card",staticStyle:{border:"1.4px solid #324499"},attrs:{outlined:""},on:{mouseover:function(t){e.hoveredStatus=n.value},mouseleave:function(t){e.hoveredStatus=null}}},[t("div",{staticClass:"font-weight-bold"},[e._v("Set prospect status")]),t("div",{staticClass:"text-caption"},[e._v(" "+e._s(e.isSelectedStatus(n)?"Click unselect to remove this status":"Click select to transition to this status")+" ")]),null!==(u=n.triggers)&&void 0!==u&&u.length?t("div",[t("div",{staticClass:"d-flex align-center mt-3"},[t(r["a"],{staticClass:"mr-1",attrs:{small:""}},[e._v("mdi-lightning-bolt")]),t("span",{staticClass:"font-weight-bold"},[e._v("Triggers")])],1),t("ul",e._l(n.triggers,(function(n){return t("li",{key:n.id,staticClass:"text-caption"},[n.action_data?t("span",{staticClass:"ml-1"},[e._v(" "+e._s(e.getDynamicTriggerLabel(n))+" ")]):e._e()])})),0)]):e._e(),t("div",{staticClass:"d-flex justify-end mt-2"},[t(i["a"],{staticClass:"hover-card",attrs:{outlined:"",primary:"","x-small":"",color:e.isSelectedStatus(n)?"red":"green"},on:{click:function(t){return e.onStatusClick(n)}}},[e._v(" "+e._s(e.isSelectedStatus(n)?"Unselect":"Select")+" ")])],1)])],1):t(l["a"],{attrs:{bottom:"",disabled:e.isContactView,"open-delay":200},scopedSlots:e._u([{key:"activator",fn:function({on:i}){return[t(a["a"],e._g({staticClass:"font-weight-medium flex-grow-1 d-flex justify-center",class:{"first-stage":0===c,"rounded-l-xl":0===c,"middle-stage":c!==e.prospectStatuses.length-1&&0!==c,"last-stage":c===e.prospectStatuses.length-1,"rounded-r-xl":c===e.prospectStatuses.length-1},style:"opacity: "+e.getStatusOpacity(n),attrs:{label:"","x-small":"",id:n.value,color:""+(e.selectedStatus&&e.selectedStatus.value!==n.value?"grey":n.color),"text-color":e.selectedStatus&&e.selectedStatus.value!==n.value?"black":e.getTextColorFromBG(n.color)},on:{click:function(t){return e.onStatusClick(n)}}},i),[e._v(" "+e._s(n.name)+" "),n.closed?t(r["a"],{staticClass:"ml-1",attrs:{color:"red darken-4","x-small":""}},[e._v("mdi-cancel ")]):e._e()],1)]}}],null,!0)},[t("div",[t("div",[e._v(e._s(e.tooltip))]),n.closed?t("div",[e._v(" These people are excluded from default view. ")]):e._e()])])],1)})),0):e._e(),e.statusBarOverflow?t(i["a"],{staticClass:"ml-2",attrs:{icon:"",small:"","min-height":"16",height:"16","max-height":"16","min-width":"16",width:"16","max-width":"16"},on:{click:function(t){return e.scrollStatusBar()}}},[t(r["a"],[e._v("mdi-chevron-right")])],1):e._e()],1)},u=[],d=n("2f62"),p=n("2fa3"),h=n("5a50"),f={props:{initialStatus:{type:String},invertOpacity:{type:Boolean},isContactView:{type:Boolean},tooltip:{type:String}},data:()=>({hoveredStatus:null,selectedStatus:null,statusBarOverflow:!1,calculcateOverflowTimeout:null}),computed:{...Object(d["c"])("user",["getSettingByKey"]),prospectStatuses(){return this.getSettingByKey(h["n"].PROSPECT_STATUSES)||[]}},watch:{prospectStatuses(){this.calculateStatusesOverflow()}},methods:{getTextColorFromBG:p["L"],getDynamicTriggerLabel:h["E"],scrollStatusBar(e){const t=document.querySelector(".prospect-status-bar");e?t.scroll({left:t.scrollLeft-100,behavior:"smooth"}):t.scroll({left:t.scrollLeft+100,behavior:"smooth"})},calculateStatusesOverflow(){clearTimeout(this.calculcateOverflowTimeout),this.calculcateOverflowTimeout=setTimeout(()=>{const e=document.querySelector(".prospect-status-bar"),t=document.querySelector(".bar-wrapper").offsetWidth;let n=0;Array.from(e.children).forEach(e=>n+=e.clientWidth),this.statusBarOverflow=t<=n},300)},isSelectedStatus(e){return this.selectedStatus&&this.selectedStatus.value===e.value},getStatusOpacity(e){return this.invertOpacity?this.isSelectedStatus(e)?1:.5:this.selectedStatus&&this.selectedStatus.value!==e.value?.4:1},onStatusClick(e){var t;(null===(t=this.selectedStatus)||void 0===t?void 0:t.value)===e.value?(this.selectedStatus=null,this.$emit("status-selected",null)):(this.selectedStatus=e,this.$emit("status-selected",e))}},mounted(){if(this.calculateStatusesOverflow(),this.initialStatus){const e=this.prospectStatuses.find(e=>e.value===this.initialStatus);this.selectedStatus=e}},created(){window.addEventListener("resize",this.calculateStatusesOverflow)},destroyed(){window.removeEventListener("resize",this.calculateStatusesOverflow)}},m=f,v=(n("1bb2"),n("2877")),g=Object(v["a"])(m,c,u,!1,null,"574a4566",null);t["default"]=g.exports},"6c0b":function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i["throw"](e))}catch(t){a(t)}}function l(e){e.done?n(e.value):o(e.value).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=2&a[0]?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(s){a=[6,s],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=a(n("97e1")),s=a(n("eb86")),l=function(){function e(e,t,n){this.collectionName=e,this.synonymId=t,this.apiCall=n}return e.prototype.retrieve=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.delete=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.apiCall.delete(this.endpointPath())]}))}))},e.prototype.endpointPath=function(){return"".concat(r.default.RESOURCEPATH,"/").concat(this.collectionName).concat(s.default.RESOURCEPATH,"/").concat(this.synonymId)},e}();t.default=l},"6c3a":function(e,t,n){"use strict";var i=n("3a0b");e.exports=function(e,t){i.forEach(e,(function(n,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[i])}))}},"6ea7":function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=o(n("edd2")),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(a.default);t.default=r},"70b7":function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},"74e2":function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i["throw"](e))}catch(t){a(t)}}function l(e){e.done?n(e.value):o(e.value).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=2&a[0]?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(s){a=[6,s],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=a(n("97e1")),s="/overrides",l=function(){function e(e,t){this.collectionName=e,this.apiCall=t}return e.prototype.upsert=function(e,t){return i(this,void 0,void 0,(function(){return o(this,(function(n){return[2,this.apiCall.put(this.endpointPath(e),t)]}))}))},e.prototype.retrieve=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.endpointPath=function(t){return"".concat(r.default.RESOURCEPATH,"/").concat(this.collectionName).concat(e.RESOURCEPATH).concat(void 0===t?"":"/"+t)},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return s},enumerable:!1,configurable:!0}),e}();t.default=l},"76d9":function(e,t,n){"use strict";var i=n("8336"),o=n("b0af"),a=n("99d9"),r=n("cc20"),s=n("132d"),l=n("490a"),c=n("2fa4"),u=n("3a2f"),d=function(){var e=this,t=e._self._c;return e.prospectFieldsLoading?t("div",{staticClass:"d-flex align-center justify-center w-100 h-100"},[t(l["a"],{attrs:{color:"primary",indeterminate:""}})],1):t("div",{staticClass:"d-flex align-start h-100 overflow-scroll",on:{click:function(t){e.fieldToDelete=null}}},[e.fieldToEdit||e.creatingNew?t("create-prospect-field",{attrs:{fieldToEdit:e.fieldToEdit},on:{back:function(t){e.creatingNew=!1,e.fieldToEdit=null},saved:function(t){e.creatingNew=!1,e.fieldToEdit=null}}}):t("div",{staticClass:"d-flex align-center flex-wrap"},[e._l(e.customProspectFields,(function(n,d){var p,h,f;return t(o["a"],{key:d,staticClass:"ma-2",attrs:{height:"200",width:"218",outlined:""}},[t(u["a"],{attrs:{bottom:"","open-delay":"300"},scopedSlots:e._u([{key:"activator",fn:function({on:i}){return[t(a["d"],e._g({staticClass:"text-body-2 border-b-1 pt-2 pb-1 font-weight-bold text-truncate d-flex align-center px-3"},i),[t(s["a"],{staticClass:"mr-1",attrs:{small:""}},[e._v(e._s(e.getIcon(n.type)))]),t("span",{staticClass:"text-truncate",staticStyle:{width:"calc(100% - 20px)"}},[e._v(e._s(n.name))])],1)]}}],null,!0)},[t("span",[e._v(e._s(n.name))])]),t(a["c"],{staticClass:"px-3 pt-1",staticStyle:{height:"130px"}},[t("div",{staticClass:"d-flex align-center text-caption"},[e.toggleAddVisibleFlagLoader!==n.id?[n.add_visible_flag?t(s["a"],{staticClass:"mr-1",attrs:{small:""},on:{click:function(t){return e.toggleAddVisibleFlag(n)}}},[e._v(" mdi-checkbox-marked ")]):t(s["a"],{staticClass:"mr-1",attrs:{small:""},on:{click:function(t){return e.toggleAddVisibleFlag(n)}}},[e._v(" mdi-checkbox-blank-outline ")])]:t(l["a"],{staticClass:"mr-2",attrs:{indeterminate:"",size:"13",width:"1.5",color:"primary"}}),t("span",[e._v('Show in "Create person" form')])],2),t("div",{staticClass:"d-flex align-center text-caption"},[e.toggleRequiredLoader!==n.id?[n.is_required?t(s["a"],{staticClass:"mr-1",attrs:{small:""},on:{click:function(t){return e.toggleRequired(n)}}},[e._v(" mdi-checkbox-marked ")]):t(s["a"],{staticClass:"mr-1",attrs:{small:""},on:{click:function(t){return e.toggleRequired(n)}}},[e._v(" mdi-checkbox-blank-outline ")])]:t(l["a"],{staticClass:"mr-2",attrs:{indeterminate:"",size:"13",width:"1.5",color:"primary"}}),t("span",[e._v("Required")])],2),"integer"===n.type?t("div",{staticClass:"d-flex align-center text-caption"},[e.toggleDisplayWithCommasLoader!==n.id?[n.display_with_commas?t(s["a"],{staticClass:"mr-1",attrs:{small:""},on:{click:function(t){return e.toggleDisplayWithCommas(n)}}},[e._v(" mdi-checkbox-marked ")]):t(s["a"],{staticClass:"mr-1",attrs:{small:""},on:{click:function(t){return e.toggleDisplayWithCommas(n)}}},[e._v(" mdi-checkbox-blank-outline ")])]:t(l["a"],{staticClass:"mr-2",attrs:{indeterminate:"",size:"13",width:"1.5",color:"primary"}}),t("span",[e._v("Display with commas")])],2):e._e(),t("div",{staticClass:"d-flex align-center text-caption"},[t("span",{staticClass:"font-weight-medium mr-2"},[e._v("Type:")]),t("span",[e._v(e._s(e.getTypeName(n.type)))])]),null!==(p=n.options)&&void 0!==p&&p.length?t("div",{staticClass:"d-flex align-start text-caption"},[t("span",{staticClass:"font-weight-medium mr-2"},[e._v("Options:")]),t("div",{staticClass:"d-flex flex-column",staticStyle:{width:"calc(100% - 65px)"}},e._l(n.options.slice(0,2),(function(i,o){return t("div",{key:o,staticClass:"d-flex align-center"},[t(u["a"],{attrs:{bottom:"","open-delay":"200"},scopedSlots:e._u([{key:"activator",fn:function({on:a}){return[t("div",e._g({staticClass:"w-100 d-flex align-center"},a),[t("span",{staticClass:"mr-2 text-truncate"},[e._v(e._s(i))]),1===o&&n.options.length>2?t(r["a"],{staticClass:"font-weight-bold px-1",attrs:{color:"grey lighten-2",label:"","x-small":""}},[e._v(" +"+e._s(n.options.slice(2).length)+" ")]):e._e()],1)]}}],null,!0)},[t("div",{staticClass:"d-flex flex-column"},[t("div",{staticClass:"font-weight-bold"},[e._v("All options:")]),t("ul",e._l(n.options,(function(n,i){return t("li",{key:i},[e._v(" "+e._s(n)+" ")])})),0)])])],1)})),0)]):e._e(),n.add_visible_flag?t("div",{staticClass:"d-flex align-center text-caption"},[t("span",{staticClass:"font-weight-medium mr-2"},[e._v("Category:")]),t("span",[e._v(e._s(n.category||"Other"))]),t(u["a"],{attrs:{bottom:"","open-delay":"300","max-width":"200"},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t(s["a"],e._g({staticClass:"ml-2",attrs:{size:"10"}},n),[e._v("mdi-information")])]}}],null,!0)},[t("span",[e._v('You can set the category this field appears in "Create person" form')])])],1):e._e()]),t(a["a"],{staticClass:"d-flex px-3 border-t-1",class:(null===(h=e.fieldToDelete)||void 0===h?void 0:h.id)===n.id?"":"justify-end"},[(null===(f=e.fieldToDelete)||void 0===f?void 0:f.id)===n.id?[t("span",{staticClass:"text-caption font-weight-bold"},[e._v("Are you sure?")]),t(c["a"]),t(i["a"],{staticClass:"font-weight-bold mr-2 px-0",attrs:{"x-small":"",outlined:"",color:"green darken-3",width:"26","max-width":"26","min-width":"26"},on:{click:e.deleteField}},[e.deleteLoader?t(l["a"],{attrs:{indeterminate:"",color:"green",size:"13",width:"2"}}):t(s["a"],{attrs:{small:""}},[e._v("mdi-check")])],1),t(i["a"],{staticClass:"font-weight-bold mx-0 px-0",attrs:{"x-small":"",outlined:"",color:"red darken-3",width:"26","max-width":"26","min-width":"26"},on:{click:function(t){e.fieldToDelete=null}}},[t(s["a"],{attrs:{small:""}},[e._v("mdi-close")])],1)]:[t(i["a"],{staticClass:"font-weight-bold mr-2 px-0",attrs:{"x-small":"",outlined:"",color:"green darken-3",width:"26","max-width":"26","min-width":"26"},on:{click:function(t){e.fieldToEdit=n}}},[t(s["a"],{attrs:{small:""}},[e._v("mdi-pencil")])],1),t(i["a"],{staticClass:"font-weight-bold mx-0 px-0",attrs:{"x-small":"",outlined:"",color:"red darken-3",width:"26","max-width":"26","min-width":"26"},on:{click:function(t){t.stopPropagation(),e.fieldToDelete=n}}},[t(s["a"],{attrs:{small:""}},[e._v("mdi-trash-can-outline")])],1)]],2)],1)})),t(o["a"],{staticClass:"ma-2 d-flex align-center justify-center",attrs:{height:"200",width:"218",outlined:""},on:{click:function(t){e.creatingNew=!0}}},[t("div",{staticClass:"d-flex flex-column align-center"},[t(s["a"],{attrs:{size:"52",color:"grey"}},[e._v("mdi-plus")]),t("div",{staticClass:"font-weight-bold text-h5 grey--text"},[e._v("New field")])],1)])],2)],1)},p=[],h=n("2f62"),f=n("ac7c"),m=n("b974"),v=n("8654"),g=function(){var e,t=this,n=t._self._c;return n("div",{staticClass:"d-flex align-center justify-center h-100 w-100"},[n(o["a"],{attrs:{outlined:"",height:"calc(100% - 16px)",width:"calc(100% - 16px)"}},[n(a["d"],{staticClass:"d-flex justify-center pt-2"},[t._v(t._s(t.fieldToEdit?"Edit":"Create"))]),n(a["c"],{staticClass:"pt-3 d-flex flex-column align-center overflow-scroll",staticStyle:{height:"calc(100% - 84px)"}},[t.fieldToEdit?t._e():n("div",{staticClass:"d-flex flex-column w-50 mb-2"},[n("div",{staticClass:"mb-1 font-weight-medium"},[t._v("Type:")]),n(m["a"],{attrs:{dense:"",outlined:"",placeholder:"Field type","validate-on-blur":"",items:t.types,"menu-props":{offsetY:!0,maxWidth:400},rules:[e=>!!e||"Type is required"],"hide-details":"auto","prepend-inner-icon":t.field.type?t.getProspectFieldIcon(t.field.type):null,"item-text":"name","item-value":"key"},scopedSlots:t._u([{key:"item",fn:function({item:e}){return[n("div",{staticClass:"d-flex flex-column"},[n("div",{staticClass:"d-flex align-center"},[n(s["a"],{staticClass:"mr-2",attrs:{small:""}},[t._v(t._s(e.icon))]),n("div",{staticClass:"font-weight-medium text-body-2"},[t._v(" "+t._s(e.name)+" ")])],1),n("div",{staticClass:"text-caption"},[t._v(t._s(e.description))])])]}}],null,!1,1881835306),model:{value:t.field.type,callback:function(e){t.$set(t.field,"type",e)},expression:"field.type"}})],1),n("div",{staticClass:"d-flex flex-column w-50"},[n("div",{staticClass:"mb-1 font-weight-medium"},[t._v("Name:")]),n(v["a"],{attrs:{dense:"",outlined:"",placeholder:"Field name","validate-on-blur":"",rules:[e=>!!e||"Name is required"],"hide-details":"auto","prepend-inner-icon":t.fieldToEdit?t.getProspectFieldIcon(t.fieldToEdit.type):null},model:{value:t.field.name,callback:function(e){t.$set(t.field,"name",e)},expression:"field.name"}})],1),null!==(e=t.field.options)&&void 0!==e&&e.length||t.isFieldWithOptions?n("div",{staticClass:"d-flex flex-column w-50 mt-3"},[n("div",{staticClass:"mb-1 font-weight-medium"},[t._v("Options:")]),t._l(t.field.options,(function(e,i){return n(v["a"],{key:i,staticClass:"mb-2",attrs:{dense:"",outlined:"",placeholder:"Add new option","hide-details":t.duplicateIndex!==i,"error-messages":t.duplicateIndex===i?["Options must be unique"]:[],"append-icon":"mdi-trash-can-outline"},on:{"click:append":function(e){return t.removeOption(i)}},model:{value:t.field.options[i],callback:function(e){t.$set(t.field.options,i,e)},expression:"field.options[index]"}})})),n("div",{staticClass:"d-flex align-start"},[n(v["a"],{attrs:{dense:"",outlined:"",placeholder:"Add new option","hide-details":-1===t.duplicateIndex,"error-messages":-1!==t.duplicateIndex?["Options must be unique"]:[]},on:{input:function(e){-1!==t.duplicateIndex&&(t.duplicateIndex=-1)}},model:{value:t.newOption,callback:function(e){t.newOption=e},expression:"newOption"}}),n(i["a"],{staticClass:"ml-2 my-0 elevation-0",attrs:{width:"42","min-width":"42","max-width":"42",height:"40",color:"green darken-2"},on:{click:t.addOption}},[n(s["a"],{attrs:{color:"white"}},[t._v("mdi-plus")])],1)],1)],2):t._e(),"integer"===t.field.type?n("div",{staticClass:"d-flex w-50 mt-2"},[n(f["a"],{attrs:{"persistent-hint":"",hint:"When turned on, large values would be displayed with commas (e.g. 1,000)",dense:"",label:"Display commas"},model:{value:t.field.display_with_commas,callback:function(e){t.$set(t.field,"display_with_commas",e)},expression:"field.display_with_commas"}})],1):t._e(),n("div",{staticClass:"d-flex w-50 mt-2"},[n(f["a"],{attrs:{"hide-details":"",dense:"",label:"Required"},model:{value:t.field.is_required,callback:function(e){t.$set(t.field,"is_required",e)},expression:"field.is_required"}})],1),n("div",{staticClass:"d-flex w-50"},[n(f["a"],{attrs:{"hide-details":"",dense:"",label:"Show on 'Create person' form"},model:{value:t.field.add_visible_flag,callback:function(e){t.$set(t.field,"add_visible_flag",e)},expression:"field.add_visible_flag"}})],1),t.field.add_visible_flag?n("div",{staticClass:"d-flex flex-column w-50 mt-3"},[n("div",{staticClass:"mb-1 font-weight-medium"},[t._v("Category:")]),n("div",{staticClass:"d-flex align-center"},[n(m["a"],{staticClass:"mr-2",attrs:{dense:"","hide-details":"",placeholder:"Other",outlined:"","menu-props":{offsetY:!0},items:["Basic","Location","Social","Other"]},model:{value:t.field.category,callback:function(e){t.$set(t.field,"category",e)},expression:"field.category"}}),n(u["a"],{attrs:{bottom:"","open-delay":"300","max-width":"240"},scopedSlots:t._u([{key:"activator",fn:function({on:e}){return[n(s["a"],t._g({attrs:{size:"12"}},e),[t._v("mdi-information")])]}}],null,!1,2355732879)},[n("span",[t._v('You can set the category this field appears in "Create person" form')])])],1)]):t._e()]),n(a["a"],{staticClass:"d-flex align-center justify-end"},[n(i["a"],{staticClass:"white--text mr-0",attrs:{small:"",color:"red darken-2"},on:{click:function(e){return t.$emit("back")}}},[t._v("Back")]),n(i["a"],{staticClass:"white--text",attrs:{small:"",color:"green darken-2",loading:t.saveLoader,disabled:t.shouldDisableSave},on:{click:t.save}},[t._v("Save")])],1)],1)],1)},y=[],b=(n("14d9"),n("5a50")),w={props:{fieldToEdit:{type:Object}},data:()=>({field:{name:"",options:[],is_required:!1,add_visible_flag:!1,type:"",category:"Other"},newOption:"",duplicateIndex:-1,saveLoader:!1}),computed:{types(){return b["m"]||[]},isFieldWithOptions(){return["enum","set"].includes(this.field.type)},shouldDisableSave(){return!this.field.type||!this.field.name||this.isFieldWithOptions&&!this.field.options.length}},methods:{...Object(h["b"])("prospectFields",["updateProspectField","createProspectField"]),getProspectFieldIcon:b["I"],initField(e){this.field={name:e.name,options:e.options||[],is_required:e.is_required,add_visible_flag:e.add_visible_flag,type:e.type,category:e.category||"Other"}},removeOption(e){this.field.options.splice(e,1)},addOption(){this.newOption&&(this.duplicateIndex=this.field.options.findIndex(e=>e===this.newOption),-1===this.duplicateIndex&&(this.field.options.push(this.newOption),this.newOption=""))},save(){this.fieldToEdit?this.updateField():this.createNewField()},createNewField(){this.saveLoader=!0,this.createProspectField(this.field).then(()=>this.$emit("saved")).finally(()=>this.saveLoader=!1)},updateField(){this.saveLoader=!0,this.updateProspectField({...this.field,id:this.fieldToEdit.id}).then(()=>this.$emit("saved")).finally(()=>this.saveLoader=!1)}},created(){this.fieldToEdit&&this.initField(this.fieldToEdit)}},_=w,x=n("2877"),k=Object(x["a"])(_,g,y,!1,null,null,null),C=k.exports,S={components:{CreateProspectField:C},data:()=>({fieldToDelete:null,deleteLoader:!1,toggleAddVisibleFlagLoader:!1,toggleRequiredLoader:!1,toggleDisplayWithCommasLoader:!1,creatingNew:!1,fieldToEdit:null}),computed:{...Object(h["c"])("prospectFields",["customProspectFields","prospectFieldsLoading"])},methods:{...Object(h["b"])("prospectFields",["fetchProspectFields","deleteProspectField","updateProspectField"]),getIcon(e){var t;return(null===(t=Object(b["K"])(e))||void 0===t?void 0:t.icon)||""},getTypeName(e){var t;return(null===(t=Object(b["K"])(e))||void 0===t?void 0:t.name)||""},deleteField(){this.fieldToDelete&&!this.deleteLoader&&(this.deleteLoader=!0,this.deleteProspectField(this.fieldToDelete.id).then(()=>this.fieldToDelete=null).finally(()=>this.deleteLoader=!1))},toggleAddVisibleFlag(e){this.toggleAddVisibleFlagLoader=e.id;const t={...e,add_visible_flag:!e.add_visible_flag};this.updateProspectField(t).finally(()=>this.toggleAddVisibleFlagLoader=!1)},toggleRequired(e){this.toggleRequiredLoader=e.id;const t={...e,is_required:!e.is_required};this.updateProspectField(t).finally(()=>this.toggleRequiredLoader=!1)},toggleDisplayWithCommas(e){this.toggleDisplayWithCommasLoader=e.id;const t={...e,display_with_commas:!e.display_with_commas};this.updateProspectField(t).finally(()=>this.toggleDisplayWithCommasLoader=!1)}},watch:{creatingNew(e){e||this.fetchProspectFields()},fieldToEdit(e){e||this.fetchProspectFields()}},created(){this.fetchProspectFields()}},T=S,O=Object(x["a"])(T,d,p,!1,null,"56eef890",null);t["a"]=O.exports},"773f":function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=o(n("edd2")),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(a.default);t.default=r},7877:function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=o(n("edd2")),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(a.default);t.default=r},7966:function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=o(n("edd2")),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(a.default);t.default=r},"7b6b":function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=o(n("edd2")),r=function(e){function t(t,n){var i=e.call(this,t)||this;return i.importResults=n,i}return i(t,e),t}(a.default);t.default=r},"7bd7":function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=i(n("8d2f")),a=i(n("5248")),r=i(n("7bdd")),s=n("3be5"),l=function(){function e(e){var t;e.sendApiKeyAsQueryParam=null===(t=e.sendApiKeyAsQueryParam)||void 0===t||t,!0===e.sendApiKeyAsQueryParam&&(e.apiKey||"").length>2e3&&(console.warn("[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter."),e.sendApiKeyAsQueryParam=!1),this.configuration=new o.default(e),this.apiCall=new a.default(this.configuration),this.multiSearch=new r.default(this.apiCall,this.configuration,!0),this.individualCollections={}}return e.prototype.clearCache=function(){this.multiSearch.clearCache(),Object.entries(this.individualCollections).forEach((function(e){e[0];var t=e[1];t.documents().clearCache()}))},e.prototype.collections=function(e){if(e)return void 0===this.individualCollections[e]&&(this.individualCollections[e]=new s.SearchOnlyCollection(e,this.apiCall,this.configuration)),this.individualCollections[e];throw new Error("Typesense.SearchClient only supports search operations, so the collectionName that needs to be searched must be specified. Use Typesense.Client if you need to access the collection object.")},e}();t.default=l},"7bdd":function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i["throw"](e))}catch(t){a(t)}}function l(e){e.done?n(e.value):o(e.value).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=2&a[0]?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(s){a=[6,s],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=a(n("8de0")),s="/multi_search",l=function(){function e(e,t,n){void 0===n&&(n=!1),this.apiCall=e,this.configuration=t,this.useTextContentType=n,this.requestWithCache=new r.default}return e.prototype.clearCache=function(){this.requestWithCache.clearCache()},e.prototype.perform=function(e,t,n){void 0===t&&(t={});var a=void 0===n?{}:n,r=a.cacheSearchResultsForSeconds,l=void 0===r?this.configuration.cacheSearchResultsForSeconds:r;return i(this,void 0,void 0,(function(){var n,i,a;return o(this,(function(o){return n={},this.useTextContentType&&(n["content-type"]="text/plain"),i={},!0===this.configuration.useServerSideSearchCache&&(i["use_cache"]=!0),a=Object.assign({},t,i),[2,this.requestWithCache.perform(this.apiCall,this.apiCall.post,[s,e,a,n],{cacheResponseForSeconds:l})]}))}))},e}();t.default=l},"7bf5":function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i["throw"](e))}catch(t){a(t)}}function l(e){e.done?n(e.value):o(e.value).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=2&a[0]?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(s){a=[6,s],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=a(n("97e1")),s=a(n("74e2")),l=function(){function e(e,t,n){this.collectionName=e,this.overrideId=t,this.apiCall=n}return e.prototype.retrieve=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.delete=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.apiCall.delete(this.endpointPath())]}))}))},e.prototype.endpointPath=function(){return"".concat(r.default.RESOURCEPATH,"/").concat(this.collectionName).concat(s.default.RESOURCEPATH,"/").concat(this.overrideId)},e}();t.default=l},"7fc7":function(e,t,n){"use strict";var i=n("70b7"),o=n("bb73");e.exports=function(e,t){return e&&!i(t)?o(e,t):t}},8015:function(e,t,n){"use strict";var i=n("cc20"),o=n("3a2f"),a=function(){var e,t=this,n=t._self._c;return n(o["a"],{attrs:{bottom:"","open-delay":"200","max-width":"200",disabled:t.disableTooltip},scopedSlots:t._u([{key:"activator",fn:function({on:e}){var o;return[n(i["a"],t._g({staticClass:"px-2 py-2 white--text text-truncate",class:t.chipClass,style:"max-width:"+t.maxWidth,attrs:{label:"",outlined:"","x-small":"",color:"symbo-pink"}},e),[n("span",{staticClass:"mr-2 font-weight-bold"},[t._v(t._s(t.title)+":")]),n("span",{staticClass:"text-truncate"},[t._v(t._s(null===(o=t.user)||void 0===o?void 0:o.full_name))])])]}}])},[t.tooltip?n("span",{staticClass:"text-caption"},[t._v(t._s(t.tooltip))]):n("span",{staticClass:"text-caption"},[t._v(" This "+t._s(t.entity)+" is owned by "+t._s(null===(e=t.user)||void 0===e?void 0:e.full_name)+". Performing any action on this "+t._s(t.entity)+" will affect the same record and analytics. ")])])},r=[],s={props:{user:{type:Object},disableTooltip:{type:Boolean,default:!1},title:{type:String,default:"Owner"},tooltip:{type:String},entity:{type:String,default:"contact"},chipClass:{type:String},maxWidth:{type:String,default:"auto"}}},l=s,c=n("2877"),u=Object(c["a"])(l,a,r,!1,null,null,null);t["a"]=u.exports},"83a3":function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i["throw"](e))}catch(t){a(t)}}function l(e){e.done?n(e.value):o(e.value).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=2&a[0]?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(s){a=[6,s],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=a(n("a3e4")),s=function(){function e(e,t){this.name=e,this.apiCall=t}return e.prototype.retrieve=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.delete=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.apiCall.delete(this.endpointPath())]}))}))},e.prototype.endpointPath=function(){return"".concat(r.default.RESOURCEPATH,"/").concat(this.name)},e}();t.default=s},8642:function(e,t,n){"use strict";var i=n("3a0b");e.exports=i.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=i.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return function(){return!0}}()},"86e8":function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i=n("2b0e"),o=n("e8ec");const a=Object(o["b"])("tableOps")||{};a.contacts&&a.contacts.itemsPerPage>60&&(a.contacts.itemsPerPage=60);const r=n("0644"),s={tableOps:a||{}},l=i["default"].observable(s),c={get:function(e){return l.tableOps[e]},set:function(e){const{tableName:t,ops:n}=e;l.tableOps={...l.tableOps,[t]:r(n)},Object(o["e"])("tableOps",JSON.stringify(l.tableOps))}}},"8d2f":function(e,t,n){"use strict";var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e["default"]=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var s=r(n("5c7d")),l=n("bd7c"),c=function(){function e(e){var t=this;this.nodes=e.nodes||[],this.nodes=this.nodes.map((function(e){return t.setDefaultPathInNode(e)})).map((function(e){return t.setDefaultPortInNode(e)})).map((function(e){return i({},e)})),null==e.randomizeNodes&&(e.randomizeNodes=!0),!0===e.randomizeNodes&&this.shuffleArray(this.nodes),this.nearestNode=e.nearestNode,this.nearestNode=this.setDefaultPathInNode(this.nearestNode),this.nearestNode=this.setDefaultPortInNode(this.nearestNode),this.connectionTimeoutSeconds=e.connectionTimeoutSeconds||e.timeoutSeconds||5,this.healthcheckIntervalSeconds=e.healthcheckIntervalSeconds||60,this.numRetries=e.numRetries||this.nodes.length+(null==this.nearestNode?0:1)||3,this.retryIntervalSeconds=e.retryIntervalSeconds||.1,this.apiKey=e.apiKey,this.sendApiKeyAsQueryParam=e.sendApiKeyAsQueryParam,this.cacheSearchResultsForSeconds=e.cacheSearchResultsForSeconds||0,this.useServerSideSearchCache=e.useServerSideSearchCache||!1,this.logger=e.logger||s,this.logLevel=e.logLevel||"warn",this.logger.setLevel(this.logLevel),this.additionalHeaders=e.additionalHeaders,this.showDeprecationWarnings(e),this.validate()}return e.prototype.validate=function(){if(null==this.nodes||0===this.nodes.length||this.validateNodes())throw new l.MissingConfigurationError("Ensure that nodes[].protocol, nodes[].host and nodes[].port are set");if(null!=this.nearestNode&&this.isNodeMissingAnyParameters(this.nearestNode))throw new l.MissingConfigurationError("Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set");if(null==this.apiKey)throw new l.MissingConfigurationError("Ensure that apiKey is set");return!0},e.prototype.validateNodes=function(){var e=this;return this.nodes.some((function(t){return e.isNodeMissingAnyParameters(t)}))},e.prototype.isNodeMissingAnyParameters=function(e){return!["protocol","host","port","path"].every((function(t){return e.hasOwnProperty(t)}))&&null==e["url"]},e.prototype.setDefaultPathInNode=function(e){return null==e||e.hasOwnProperty("path")||(e["path"]=""),e},e.prototype.setDefaultPortInNode=function(e){if(null!=e&&!e.hasOwnProperty("port")&&e.hasOwnProperty("protocol"))switch(e["protocol"]){case"https":e["port"]=443;break;case"http":e["port"]=80;break}return e},e.prototype.showDeprecationWarnings=function(e){e.timeoutSeconds&&this.logger.warn("Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds"),e.masterNode&&this.logger.warn("Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12"),e.readReplicaNodes&&this.logger.warn("Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12")},e.prototype.shuffleArray=function(e){for(var t,n=e.length-1;n>0;n--){var i=Math.floor(Math.random()*(n+1));t=[e[i],e[n]],e[n]=t[0],e[i]=t[1]}},e}();t.default=c},"8de0":function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i["throw"](e))}catch(t){a(t)}}function l(e){e.done?n(e.value):o(e.value).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=2&a[0]?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(s){a=[6,s],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},a=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var r=120,s=100,l=function(){function e(){this.responseCache=new Map,this.responsePromiseCache=new Map}return e.prototype.clearCache=function(){this.responseCache=new Map,this.responsePromiseCache=new Map},e.prototype.perform=function(e,t,n,l){return i(this,void 0,void 0,(function(){var i,c,u,d,p,h,f,m,v,g,y,b,w,_,x;return o(this,(function(o){switch(o.label){case 0:if(i=l.cacheResponseForSeconds,c=void 0===i?r:i,u=l.maxSize,d=void 0===u?s:u,p=c<=0||d<=0,p)return[2,t.call.apply(t,a([e],n,!1))];if(h=JSON.stringify(n),f=this.responseCache.get(h),m=Date.now(),f){if(g=m-f.requestTimestamp<1e3*c,g)return this.responseCache.delete(h),this.responseCache.set(h,f),[2,Promise.resolve(f.response)];this.responseCache.delete(h)}if(v=this.responsePromiseCache.get(h),v){if(g=m-v.requestTimestamp<1e3*c,g)return this.responsePromiseCache.delete(h),this.responsePromiseCache.set(h,v),[2,v.responsePromise];this.responsePromiseCache.delete(h)}return y=t.call.apply(t,a([e],n,!1)),this.responsePromiseCache.set(h,{requestTimestamp:m,responsePromise:y}),[4,y];case 1:return b=o.sent(),this.responseCache.set(h,{requestTimestamp:m,response:b}),w=this.responseCache.size>d,w&&(x=this.responseCache.keys().next().value,this.responseCache.delete(x)),_=this.responsePromiseCache.size>d,_&&(x=this.responsePromiseCache.keys().next().value,this.responsePromiseCache.delete(x)),[2,b]}}))}))},e}();t.default=l},"8e7f":function(e,t,n){"use strict";var i=n("3a0b");e.exports=function(e,t){t=t||{};var n={};function o(e,t){return i.isPlainObject(e)&&i.isPlainObject(t)?i.merge(e,t):i.isPlainObject(t)?i.merge({},t):i.isArray(t)?t.slice():t}function a(n){return i.isUndefined(t[n])?i.isUndefined(e[n])?void 0:o(void 0,e[n]):o(e[n],t[n])}function r(e){if(!i.isUndefined(t[e]))return o(void 0,t[e])}function s(n){return i.isUndefined(t[n])?i.isUndefined(e[n])?void 0:o(void 0,e[n]):o(void 0,t[n])}function l(n){return n in t?o(e[n],t[n]):n in e?o(void 0,e[n]):void 0}var c={url:r,method:r,data:r,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l};return i.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||a,o=t(e);i.isUndefined(o)&&t!==l||(n[e]=o)})),n}},"8f5b":function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=i(n("8d2f")),a=i(n("5248")),r=i(n("97e1")),s=i(n("e083")),l=i(n("a3e4")),c=i(n("83a3")),u=i(n("f58d")),d=i(n("48cc")),p=i(n("bf19")),h=i(n("2ecc")),f=i(n("2944")),m=i(n("04b8")),v=i(n("7bdd")),g=i(n("9791")),y=i(n("0d5d")),b=i(n("22b2")),w=function(){function e(e){var t;e.sendApiKeyAsQueryParam=null!==(t=e.sendApiKeyAsQueryParam)&&void 0!==t&&t,this.configuration=new o.default(e),this.apiCall=new a.default(this.configuration),this.debug=new p.default(this.apiCall),this.metrics=new h.default(this.apiCall),this.health=new f.default(this.apiCall),this.operations=new m.default(this.apiCall),this.multiSearch=new v.default(this.apiCall,this.configuration),this._collections=new r.default(this.apiCall),this.individualCollections={},this._aliases=new l.default(this.apiCall),this.individualAliases={},this._keys=new u.default(this.apiCall),this.individualKeys={},this._presets=new g.default(this.apiCall),this.individualPresets={},this.analytics=new b.default(this.apiCall)}return e.prototype.collections=function(e){return void 0===e?this._collections:(void 0===this.individualCollections[e]&&(this.individualCollections[e]=new s.default(e,this.apiCall,this.configuration)),this.individualCollections[e])},e.prototype.aliases=function(e){return void 0===e?this._aliases:(void 0===this.individualAliases[e]&&(this.individualAliases[e]=new c.default(e,this.apiCall)),this.individualAliases[e])},e.prototype.keys=function(e){return void 0===e?this._keys:(void 0===this.individualKeys[e]&&(this.individualKeys[e]=new d.default(e,this.apiCall)),this.individualKeys[e])},e.prototype.presets=function(e){return void 0===e?this._presets:(void 0===this.individualPresets[e]&&(this.individualPresets[e]=new y.default(e,this.apiCall)),this.individualPresets[e])},e}();t.default=w},"929b":function(e,t,n){},"95f3":function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=o(n("edd2")),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(a.default);t.default=r},"96a3":function(e,t,n){"use strict";var i=n("3a0b"),o=n("354a"),a=n("cbdb"),r=n("fc7f"),s=n("7fc7"),l=n("5d1b"),c=n("8642"),u=n("aa28"),d=n("02ae"),p=n("4f2c");e.exports=function(e){return new Promise((function(t,n){var h,f=e.data,m=e.headers,v=e.responseType;function g(){e.cancelToken&&e.cancelToken.unsubscribe(h),e.signal&&e.signal.removeEventListener("abort",h)}i.isFormData(f)&&delete m["Content-Type"];var y=new XMLHttpRequest;if(e.auth){var b=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";m.Authorization="Basic "+btoa(b+":"+w)}var _=s(e.baseURL,e.url);function x(){if(y){var i="getAllResponseHeaders"in y?l(y.getAllResponseHeaders()):null,a=v&&"text"!==v&&"json"!==v?y.response:y.responseText,r={data:a,status:y.status,statusText:y.statusText,headers:i,config:e,request:y};o((function(e){t(e),g()}),(function(e){n(e),g()}),r),y=null}}if(y.open(e.method.toUpperCase(),r(_,e.params,e.paramsSerializer),!0),y.timeout=e.timeout,"onloadend"in y?y.onloadend=x:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(x)},y.onabort=function(){y&&(n(u("Request aborted",e,"ECONNABORTED",y)),y=null)},y.onerror=function(){n(u("Network Error",e,null,y)),y=null},y.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",i=e.transitional||d;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,i.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",y)),y=null},i.isStandardBrowserEnv()){var k=(e.withCredentials||c(_))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;k&&(m[e.xsrfHeaderName]=k)}"setRequestHeader"in y&&i.forEach(m,(function(e,t){"undefined"===typeof f&&"content-type"===t.toLowerCase()?delete m[t]:y.setRequestHeader(t,e)})),i.isUndefined(e.withCredentials)||(y.withCredentials=!!e.withCredentials),v&&"json"!==v&&(y.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&y.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(h=function(e){y&&(n(!e||e&&e.type?new p("canceled"):e),y.abort(),y=null)},e.cancelToken&&e.cancelToken.subscribe(h),e.signal&&(e.signal.aborted?h():e.signal.addEventListener("abort",h))),f||(f=null),y.send(f)}))}},"96ce":function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},9791:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i["throw"](e))}catch(t){a(t)}}function l(e){e.done?n(e.value):o(e.value).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=2&a[0]?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(s){a=[6,s],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(t,"__esModule",{value:!0});var a="/presets",r=function(){function e(e){this.apiCall=e}return e.prototype.upsert=function(e,t){return i(this,void 0,void 0,(function(){return o(this,(function(n){return[2,this.apiCall.put(this.endpointPath(e),t)]}))}))},e.prototype.retrieve=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.endpointPath=function(t){return"".concat(e.RESOURCEPATH).concat(void 0===t?"":"/"+t)},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return a},enumerable:!1,configurable:!0}),e}();t.default=r},"97e1":function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i["throw"](e))}catch(t){a(t)}}function l(e){e.done?n(e.value):o(e.value).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=2&a[0]?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(s){a=[6,s],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(t,"__esModule",{value:!0});var a="/collections",r=function(){function e(e){this.apiCall=e}return e.prototype.create=function(e,t){return void 0===t&&(t={}),i(this,void 0,void 0,(function(){return o(this,(function(n){return[2,this.apiCall.post(a,e,t)]}))}))},e.prototype.retrieve=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.apiCall.get(a)]}))}))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return a},enumerable:!1,configurable:!0}),e}();t.default=r},"9a29":function(e,t,n){"use strict";var i=n("3a0b"),o=n("f93e");e.exports=function(e,t,n){var a=this||o;return i.forEach(n,(function(n){e=n.call(a,e,t)})),e}},"9b5c":function(e,t,n){"use strict";var i=n("3a0b"),o=n("fc7f"),a=n("3a88"),r=n("4ee7"),s=n("8e7f"),l=n("4691"),c=l.validators;function u(e){this.defaults=e,this.interceptors={request:new a,response:new a}}u.prototype.request=function(e,t){"string"===typeof e?(t=t||{},t.url=e):t=e||{},t=s(this.defaults,t),t.method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&l.assertOptions(n,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var i=[],o=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));var a,u=[];if(this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)})),!o){var d=[r,void 0];Array.prototype.unshift.apply(d,i),d=d.concat(u),a=Promise.resolve(t);while(d.length)a=a.then(d.shift(),d.shift());return a}var p=t;while(i.length){var h=i.shift(),f=i.shift();try{p=h(p)}catch(m){f(m);break}}try{a=r(p)}catch(m){return Promise.reject(m)}while(u.length)a=a.then(u.shift(),u.shift());return a},u.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},i.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),i.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,i){return this.request(s(i||{},{method:e,url:t,data:n}))}})),e.exports=u},"9c95":function(e,t){e.exports={version:"0.26.1"}},a0a3:function(e,t,n){"use strict";n.r(t);var i=n("8336"),o=n("132d"),a=n("3a2f"),r=function(){var e=this,t=e._self._c;return e.shouldShowIcon?t(a["a"],{attrs:{bottom:"","open-delay":"100","max-width":"500"},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t("div",{class:{"ml-1":!e.noMargin},staticStyle:{"min-width":"25px"}},[t(i["a"],e._g({attrs:{icon:"","x-small":!e.size,small:!!e.size},on:{click:function(t){return t.stopPropagation(),e.openInCRM()}}},n),[t(o["a"],{attrs:{color:e.crmColor,"x-small":!e.size,size:e.size}},[e._v(" "+e._s(e.crmIcon)+" ")])],1)],1)]}}],null,!1,4278973551)},[t("span",[e._v("Open in "+e._s(e.crmName))])]):e._e()},s=[],l=n("2f62"),c=n("2fa3"),u={props:{prospect:{type:Object},account:{type:Object},size:{type:String},noMargin:{type:Boolean}},computed:{...Object(l["c"])("user",["crm","crmColor","crmName","crmIcon"]),shouldShowIcon(){var e,t;return!!this.crm&&((null===(e=this.prospect)||void 0===e?void 0:e.external_id)||(null===(t=this.account)||void 0===t?void 0:t.external_id))}},methods:{buildExternalCrmLink:c["b"],openInCRM(){const e=this.buildExternalCrmLink(this.crm,this.prospect||this.account,!!this.account);window.open(e,"_blank")}}},d=u,p=n("2877"),h=Object(p["a"])(d,r,s,!1,null,null,null);t["default"]=h.exports},a3e4:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i["throw"](e))}catch(t){a(t)}}function l(e){e.done?n(e.value):o(e.value).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=2&a[0]?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(s){a=[6,s],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(t,"__esModule",{value:!0});var a="/aliases",r=function(){function e(e){this.apiCall=e}return e.prototype.upsert=function(e,t){return i(this,void 0,void 0,(function(){return o(this,(function(n){return[2,this.apiCall.put(this.endpointPath(e),t)]}))}))},e.prototype.retrieve=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.apiCall.get(a)]}))}))},e.prototype.endpointPath=function(t){return"".concat(e.RESOURCEPATH,"/").concat(t)},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return a},enumerable:!1,configurable:!0}),e}();t.default=r},a4b5:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i["throw"](e))}catch(t){a(t)}}function l(e){e.done?n(e.value):o(e.value).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=2&a[0]?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(s){a=[6,s],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Document=void 0;var r=a(n("97e1")),s=a(n("0eff")),l=function(){function e(e,t,n){this.collectionName=e,this.documentId=t,this.apiCall=n}return e.prototype.retrieve=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.delete=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.apiCall.delete(this.endpointPath())]}))}))},e.prototype.update=function(e,t){return void 0===t&&(t={}),i(this,void 0,void 0,(function(){return o(this,(function(n){return[2,this.apiCall.patch(this.endpointPath(),e,t)]}))}))},e.prototype.endpointPath=function(){return"".concat(r.default.RESOURCEPATH,"/").concat(this.collectionName).concat(s.default.RESOURCEPATH,"/").concat(this.documentId)},e}();t.Document=l},a523:function(e,t,n){"use strict";n("20f6"),n("4b85");var i=n("2b0e");function o(e){return i["default"].extend({name:"v-"+e,functional:!0,props:{id:String,tag:{type:String,default:"div"}},render(t,{props:n,data:i,children:o}){i.staticClass=`${e} ${i.staticClass||""}`.trim();const{attrs:a}=i;if(a){i.attrs={};const e=Object.keys(a).filter(e=>{if("slot"===e)return!1;const t=a[e];return e.startsWith("data-")?(i.attrs[e]=t,!1):t||"string"===typeof t});e.length&&(i.staticClass+=" "+e.join(" "))}return n.id&&(i.domProps=i.domProps||{},i.domProps.id=n.id),t(n.tag,i,o)}})}var a=n("d9f7");t["a"]=o("container").extend({name:"v-container",functional:!0,props:{id:String,tag:{type:String,default:"div"},fluid:{type:Boolean,default:!1}},render(e,{props:t,data:n,children:i}){let o;const{attrs:r}=n;return r&&(n.attrs={},o=Object.keys(r).filter(e=>{if("slot"===e)return!1;const t=r[e];return e.startsWith("data-")?(n.attrs[e]=t,!1):t||"string"===typeof t})),t.id&&(n.domProps=n.domProps||{},n.domProps.id=t.id),e(t.tag,Object(a["a"])(n,{staticClass:"container",class:Array({"container--fluid":t.fluid}).concat(o||[])}),i)}})},a77c:function(e,t,n){},aa28:function(e,t,n){"use strict";var i=n("0123");e.exports=function(e,t,n,o,a){var r=new Error(e);return i(r,t,n,o,a)}},aa47:function(e,t,n){"use strict";
/**!
 * Sortable 1.10.2
 * @author	RubaXa   <trash@rubaxa.org>
 * @author	owenm    <owen23355@gmail.com>
 * @license MIT
 */
function i(e){return i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},a.apply(this,arguments)}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){o(e,t,n[t])}))}return e}function s(e,t){if(null==e)return{};var n,i,o={},a=Object.keys(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||(o[n]=e[n]);return o}function l(e,t){if(null==e)return{};var n,i,o=s(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function c(e){return u(e)||d(e)||p()}function u(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function d(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function p(){throw new TypeError("Invalid attempt to spread non-iterable instance")}n.r(t),n.d(t,"MultiDrag",(function(){return Mt})),n.d(t,"Sortable",(function(){return Je})),n.d(t,"Swap",(function(){return Tt}));var h="1.10.2";function f(e){if("undefined"!==typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var m=f(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),v=f(/Edge/i),g=f(/firefox/i),y=f(/safari/i)&&!f(/chrome/i)&&!f(/android/i),b=f(/iP(ad|od|hone)/i),w=f(/chrome/i)&&f(/android/i),_={capture:!1,passive:!1};function x(e,t,n){e.addEventListener(t,n,!m&&_)}function k(e,t,n){e.removeEventListener(t,n,!m&&_)}function C(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(n){return!1}return!1}}function S(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function T(e,t,n,i){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&C(e,t):C(e,t))||i&&e===n)return e;if(e===n)break}while(e=S(e))}return null}var O,P=/\s+/g;function A(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(P," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(P," ")}}function E(e,t,n){var i=e&&e.style;if(i){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in i||-1!==t.indexOf("webkit")||(t="-webkit-"+t),i[t]=n+("string"===typeof n?"":"px")}}function N(e,t){var n="";if("string"===typeof e)n=e;else do{var i=E(e,"transform");i&&"none"!==i&&(n=i+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function D(e,t,n){if(e){var i=e.getElementsByTagName(t),o=0,a=i.length;if(n)for(;o<a;o++)n(i[o],o);return i}return[]}function j(){var e=document.scrollingElement;return e||document.documentElement}function $(e,t,n,i,o){if(e.getBoundingClientRect||e===window){var a,r,s,l,c,u,d;if(e!==window&&e!==j()?(a=e.getBoundingClientRect(),r=a.top,s=a.left,l=a.bottom,c=a.right,u=a.height,d=a.width):(r=0,s=0,l=window.innerHeight,c=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!m))do{if(o&&o.getBoundingClientRect&&("none"!==E(o,"transform")||n&&"static"!==E(o,"position"))){var p=o.getBoundingClientRect();r-=p.top+parseInt(E(o,"border-top-width")),s-=p.left+parseInt(E(o,"border-left-width")),l=r+a.height,c=s+a.width;break}}while(o=o.parentNode);if(i&&e!==window){var h=N(o||e),f=h&&h.a,v=h&&h.d;h&&(r/=v,s/=f,d/=f,u/=v,l=r+u,c=s+d)}return{top:r,left:s,bottom:l,right:c,width:d,height:u}}}function L(e,t,n){var i=B(e,!0),o=$(e)[t];while(i){var a=$(i)[n],r=void 0;if(r="top"===n||"left"===n?o>=a:o<=a,!r)return i;if(i===j())break;i=B(i,!1)}return!1}function I(e,t,n){var i=0,o=0,a=e.children;while(o<a.length){if("none"!==a[o].style.display&&a[o]!==Je.ghost&&a[o]!==Je.dragged&&T(a[o],n.draggable,e,!1)){if(i===t)return a[o];i++}o++}return null}function F(e,t){var n=e.lastElementChild;while(n&&(n===Je.ghost||"none"===E(n,"display")||t&&!C(n,t)))n=n.previousElementSibling;return n||null}function M(e,t){var n=0;if(!e||!e.parentNode)return-1;while(e=e.previousElementSibling)"TEMPLATE"===e.nodeName.toUpperCase()||e===Je.clone||t&&!C(e,t)||n++;return n}function R(e){var t=0,n=0,i=j();if(e)do{var o=N(e),a=o.a,r=o.d;t+=e.scrollLeft*a,n+=e.scrollTop*r}while(e!==i&&(e=e.parentNode));return[t,n]}function q(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var i in t)if(t.hasOwnProperty(i)&&t[i]===e[n][i])return Number(n);return-1}function B(e,t){if(!e||!e.getBoundingClientRect)return j();var n=e,i=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=E(n);if(n.clientWidth<n.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!n.getBoundingClientRect||n===document.body)return j();if(i||t)return n;i=!0}}}while(n=n.parentNode);return j()}function z(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function V(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function U(e,t){return function(){if(!O){var n=arguments,i=this;1===n.length?e.call(i,n[0]):e.apply(i,n),O=setTimeout((function(){O=void 0}),t)}}}function H(){clearTimeout(O),O=void 0}function W(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function K(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function G(e,t){E(e,"position","absolute"),E(e,"top",t.top),E(e,"left",t.left),E(e,"width",t.width),E(e,"height",t.height)}function Q(e){E(e,"position",""),E(e,"top",""),E(e,"left",""),E(e,"width",""),E(e,"height","")}var Y="Sortable"+(new Date).getTime();function Z(){var e,t=[];return{captureAnimationState:function(){if(t=[],this.options.animation){var e=[].slice.call(this.el.children);e.forEach((function(e){if("none"!==E(e,"display")&&e!==Je.ghost){t.push({target:e,rect:$(e)});var n=r({},t[t.length-1].rect);if(e.thisAnimationDuration){var i=N(e,!0);i&&(n.top-=i.f,n.left-=i.e)}e.fromRect=n}}))}},addAnimationState:function(e){t.push(e)},removeAnimationState:function(e){t.splice(q(t,{target:e}),1)},animateAll:function(n){var i=this;if(!this.options.animation)return clearTimeout(e),void("function"===typeof n&&n());var o=!1,a=0;t.forEach((function(e){var t=0,n=e.target,r=n.fromRect,s=$(n),l=n.prevFromRect,c=n.prevToRect,u=e.rect,d=N(n,!0);d&&(s.top-=d.f,s.left-=d.e),n.toRect=s,n.thisAnimationDuration&&V(l,s)&&!V(r,s)&&(u.top-s.top)/(u.left-s.left)===(r.top-s.top)/(r.left-s.left)&&(t=X(u,l,c,i.options)),V(s,r)||(n.prevFromRect=r,n.prevToRect=s,t||(t=i.options.animation),i.animate(n,u,s,t)),t&&(o=!0,a=Math.max(a,t),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),t),n.thisAnimationDuration=t)})),clearTimeout(e),o?e=setTimeout((function(){"function"===typeof n&&n()}),a):"function"===typeof n&&n(),t=[]},animate:function(e,t,n,i){if(i){E(e,"transition",""),E(e,"transform","");var o=N(this.el),a=o&&o.a,r=o&&o.d,s=(t.left-n.left)/(a||1),l=(t.top-n.top)/(r||1);e.animatingX=!!s,e.animatingY=!!l,E(e,"transform","translate3d("+s+"px,"+l+"px,0)"),J(e),E(e,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),E(e,"transform","translate3d(0,0,0)"),"number"===typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){E(e,"transition",""),E(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),i)}}}}function J(e){return e.offsetWidth}function X(e,t,n,i){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*i.animation}var ee=[],te={initializeByDefault:!0},ne={mount:function(e){for(var t in te)te.hasOwnProperty(t)&&!(t in e)&&(e[t]=te[t]);ee.push(e)},pluginEvent:function(e,t,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var o=e+"Global";ee.forEach((function(i){t[i.pluginName]&&(t[i.pluginName][o]&&t[i.pluginName][o](r({sortable:t},n)),t.options[i.pluginName]&&t[i.pluginName][e]&&t[i.pluginName][e](r({sortable:t},n)))}))},initializePlugins:function(e,t,n,i){for(var o in ee.forEach((function(i){var o=i.pluginName;if(e.options[o]||i.initializeByDefault){var r=new i(e,t,e.options);r.sortable=e,r.options=e.options,e[o]=r,a(n,r.defaults)}})),e.options)if(e.options.hasOwnProperty(o)){var r=this.modifyOption(e,o,e.options[o]);"undefined"!==typeof r&&(e.options[o]=r)}},getEventProperties:function(e,t){var n={};return ee.forEach((function(i){"function"===typeof i.eventProperties&&a(n,i.eventProperties.call(t[i.pluginName],e))})),n},modifyOption:function(e,t,n){var i;return ee.forEach((function(o){e[o.pluginName]&&o.optionListeners&&"function"===typeof o.optionListeners[t]&&(i=o.optionListeners[t].call(e[o.pluginName],n))})),i}};function ie(e){var t=e.sortable,n=e.rootEl,i=e.name,o=e.targetEl,a=e.cloneEl,s=e.toEl,l=e.fromEl,c=e.oldIndex,u=e.newIndex,d=e.oldDraggableIndex,p=e.newDraggableIndex,h=e.originalEvent,f=e.putSortable,g=e.extraEventProperties;if(t=t||n&&n[Y],t){var y,b=t.options,w="on"+i.charAt(0).toUpperCase()+i.substr(1);!window.CustomEvent||m||v?(y=document.createEvent("Event"),y.initEvent(i,!0,!0)):y=new CustomEvent(i,{bubbles:!0,cancelable:!0}),y.to=s||n,y.from=l||n,y.item=o||n,y.clone=a,y.oldIndex=c,y.newIndex=u,y.oldDraggableIndex=d,y.newDraggableIndex=p,y.originalEvent=h,y.pullMode=f?f.lastPutMode:void 0;var _=r({},g,ne.getEventProperties(i,t));for(var x in _)y[x]=_[x];n&&n.dispatchEvent(y),b[w]&&b[w].call(t,y)}}var oe=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.evt,o=l(n,["evt"]);ne.pluginEvent.bind(Je)(e,t,r({dragEl:re,parentEl:se,ghostEl:le,rootEl:ce,nextEl:ue,lastDownEl:de,cloneEl:pe,cloneHidden:he,dragStarted:Te,putSortable:be,activeSortable:Je.active,originalEvent:i,oldIndex:fe,oldDraggableIndex:ve,newIndex:me,newDraggableIndex:ge,hideGhostForTarget:Ge,unhideGhostForTarget:Qe,cloneNowHidden:function(){he=!0},cloneNowShown:function(){he=!1},dispatchSortableEvent:function(e){ae({sortable:t,name:e,originalEvent:i})}},o))};function ae(e){ie(r({putSortable:be,cloneEl:pe,targetEl:re,rootEl:ce,oldIndex:fe,oldDraggableIndex:ve,newIndex:me,newDraggableIndex:ge},e))}var re,se,le,ce,ue,de,pe,he,fe,me,ve,ge,ye,be,we,_e,xe,ke,Ce,Se,Te,Oe,Pe,Ae,Ee,Ne=!1,De=!1,je=[],$e=!1,Le=!1,Ie=[],Fe=!1,Me=[],Re="undefined"!==typeof document,qe=b,Be=v||m?"cssFloat":"float",ze=Re&&!w&&!b&&"draggable"in document.createElement("div"),Ve=function(){if(Re){if(m)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Ue=function(e,t){var n=E(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=I(e,0,t),a=I(e,1,t),r=o&&E(o),s=a&&E(a),l=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+$(o).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+$(a).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&r["float"]&&"none"!==r["float"]){var u="left"===r["float"]?"left":"right";return!a||"both"!==s.clear&&s.clear!==u?"horizontal":"vertical"}return o&&("block"===r.display||"flex"===r.display||"table"===r.display||"grid"===r.display||l>=i&&"none"===n[Be]||a&&"none"===n[Be]&&l+c>i)?"vertical":"horizontal"},He=function(e,t,n){var i=n?e.left:e.top,o=n?e.right:e.bottom,a=n?e.width:e.height,r=n?t.left:t.top,s=n?t.right:t.bottom,l=n?t.width:t.height;return i===r||o===s||i+a/2===r+l/2},We=function(e,t){var n;return je.some((function(i){if(!F(i)){var o=$(i),a=i[Y].options.emptyInsertThreshold,r=e>=o.left-a&&e<=o.right+a,s=t>=o.top-a&&t<=o.bottom+a;return a&&r&&s?n=i:void 0}})),n},Ke=function(e){function t(e,n){return function(i,o,a,r){var s=i.options.group.name&&o.options.group.name&&i.options.group.name===o.options.group.name;if(null==e&&(n||s))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"===typeof e)return t(e(i,o,a,r),n)(i,o,a,r);var l=(n?i:o).options.group.name;return!0===e||"string"===typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var n={},o=e.group;o&&"object"==i(o)||(o={name:o}),n.name=o.name,n.checkPull=t(o.pull,!0),n.checkPut=t(o.put),n.revertClone=o.revertClone,e.group=n},Ge=function(){!Ve&&le&&E(le,"display","none")},Qe=function(){!Ve&&le&&E(le,"display","")};Re&&document.addEventListener("click",(function(e){if(De)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),De=!1,!1}),!0);var Ye=function(e){if(re){e=e.touches?e.touches[0]:e;var t=We(e.clientX,e.clientY);if(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[Y]._onDragOver(n)}}},Ze=function(e){re&&re.parentNode[Y]._isOutsideThisEl(e.target)};function Je(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=a({},t),e[Y]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ue(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Je.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var i in ne.initializePlugins(this,e,n),n)!(i in t)&&(t[i]=n[i]);for(var o in Ke(t),this)"_"===o.charAt(0)&&"function"===typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!t.forceFallback&&ze,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?x(e,"pointerdown",this._onTapStart):(x(e,"mousedown",this._onTapStart),x(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(x(e,"dragover",this),x(e,"dragenter",this)),je.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),a(this,Z())}function Xe(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function et(e,t,n,i,o,a,r,s){var l,c,u=e[Y],d=u.options.onMove;return!window.CustomEvent||m||v?(l=document.createEvent("Event"),l.initEvent("move",!0,!0)):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=t,l.from=e,l.dragged=n,l.draggedRect=i,l.related=o||t,l.relatedRect=a||$(t),l.willInsertAfter=s,l.originalEvent=r,e.dispatchEvent(l),d&&(c=d.call(u,l,r)),c}function tt(e){e.draggable=!1}function nt(){Fe=!1}function it(e,t,n){var i=$(F(n.el,n.options.draggable)),o=10;return t?e.clientX>i.right+o||e.clientX<=i.right&&e.clientY>i.bottom&&e.clientX>=i.left:e.clientX>i.right&&e.clientY>i.top||e.clientX<=i.right&&e.clientY>i.bottom+o}function ot(e,t,n,i,o,a,r,s){var l=i?e.clientY:e.clientX,c=i?n.height:n.width,u=i?n.top:n.left,d=i?n.bottom:n.right,p=!1;if(!r)if(s&&Ae<c*o){if(!$e&&(1===Pe?l>u+c*a/2:l<d-c*a/2)&&($e=!0),$e)p=!0;else if(1===Pe?l<u+Ae:l>d-Ae)return-Pe}else if(l>u+c*(1-o)/2&&l<d-c*(1-o)/2)return at(t);return p=p||r,p&&(l<u+c*a/2||l>d-c*a/2)?l>u+c/2?1:-1:0}function at(e){return M(re)<M(e)?1:-1}function rt(e){var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,i=0;while(n--)i+=t.charCodeAt(n);return i.toString(36)}function st(e){Me.length=0;var t=e.getElementsByTagName("input"),n=t.length;while(n--){var i=t[n];i.checked&&Me.push(i)}}function lt(e){return setTimeout(e,0)}function ct(e){return clearTimeout(e)}Je.prototype={constructor:Je,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(Oe=null)},_getDirection:function(e,t){return"function"===typeof this.options.direction?this.options.direction.call(this,e,t,re):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,i=this.options,o=i.preventOnFilter,a=e.type,r=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,s=(r||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,c=i.filter;if(st(n),!re&&!(/mousedown|pointerdown/.test(a)&&0!==e.button||i.disabled)&&!l.isContentEditable&&(s=T(s,i.draggable,n,!1),(!s||!s.animated)&&de!==s)){if(fe=M(s),ve=M(s,i.draggable),"function"===typeof c){if(c.call(this,e,s,this))return ae({sortable:t,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),oe("filter",t,{evt:e}),void(o&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(i){if(i=T(l,i.trim(),n,!1),i)return ae({sortable:t,rootEl:i,name:"filter",targetEl:s,fromEl:n,toEl:n}),oe("filter",t,{evt:e}),!0})),c))return void(o&&e.cancelable&&e.preventDefault());i.handle&&!T(l,i.handle,n,!1)||this._prepareDragStart(e,r,s)}}},_prepareDragStart:function(e,t,n){var i,o=this,a=o.el,r=o.options,s=a.ownerDocument;if(n&&!re&&n.parentNode===a){var l=$(n);if(ce=a,re=n,se=re.parentNode,ue=re.nextSibling,de=n,ye=r.group,Je.dragged=re,we={target:re,clientX:(t||e).clientX,clientY:(t||e).clientY},Ce=we.clientX-l.left,Se=we.clientY-l.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,re.style["will-change"]="all",i=function(){oe("delayEnded",o,{evt:e}),Je.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!g&&o.nativeDraggable&&(re.draggable=!0),o._triggerDragStart(e,t),ae({sortable:o,name:"choose",originalEvent:e}),A(re,r.chosenClass,!0))},r.ignore.split(",").forEach((function(e){D(re,e.trim(),tt)})),x(s,"dragover",Ye),x(s,"mousemove",Ye),x(s,"touchmove",Ye),x(s,"mouseup",o._onDrop),x(s,"touchend",o._onDrop),x(s,"touchcancel",o._onDrop),g&&this.nativeDraggable&&(this.options.touchStartThreshold=4,re.draggable=!0),oe("delayStart",this,{evt:e}),!r.delay||r.delayOnTouchOnly&&!t||this.nativeDraggable&&(v||m))i();else{if(Je.eventCanceled)return void this._onDrop();x(s,"mouseup",o._disableDelayedDrag),x(s,"touchend",o._disableDelayedDrag),x(s,"touchcancel",o._disableDelayedDrag),x(s,"mousemove",o._delayedDragTouchMoveHandler),x(s,"touchmove",o._delayedDragTouchMoveHandler),r.supportPointer&&x(s,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(i,r.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){re&&tt(re),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;k(e,"mouseup",this._disableDelayedDrag),k(e,"touchend",this._disableDelayedDrag),k(e,"touchcancel",this._disableDelayedDrag),k(e,"mousemove",this._delayedDragTouchMoveHandler),k(e,"touchmove",this._delayedDragTouchMoveHandler),k(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?x(document,"pointermove",this._onTouchMove):x(document,t?"touchmove":"mousemove",this._onTouchMove):(x(re,"dragend",this),x(ce,"dragstart",this._onDragStart));try{document.selection?lt((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(e,t){if(Ne=!1,ce&&re){oe("dragStarted",this,{evt:t}),this.nativeDraggable&&x(document,"dragover",Ze);var n=this.options;!e&&A(re,n.dragClass,!1),A(re,n.ghostClass,!0),Je.active=this,e&&this._appendGhost(),ae({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(_e){this._lastX=_e.clientX,this._lastY=_e.clientY,Ge();var e=document.elementFromPoint(_e.clientX,_e.clientY),t=e;while(e&&e.shadowRoot){if(e=e.shadowRoot.elementFromPoint(_e.clientX,_e.clientY),e===t)break;t=e}if(re.parentNode[Y]._isOutsideThisEl(e),t)do{if(t[Y]){var n=void 0;if(n=t[Y]._onDragOver({clientX:_e.clientX,clientY:_e.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);Qe()}},_onTouchMove:function(e){if(we){var t=this.options,n=t.fallbackTolerance,i=t.fallbackOffset,o=e.touches?e.touches[0]:e,a=le&&N(le,!0),r=le&&a&&a.a,s=le&&a&&a.d,l=qe&&Ee&&R(Ee),c=(o.clientX-we.clientX+i.x)/(r||1)+(l?l[0]-Ie[0]:0)/(r||1),u=(o.clientY-we.clientY+i.y)/(s||1)+(l?l[1]-Ie[1]:0)/(s||1);if(!Je.active&&!Ne){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(le){a?(a.e+=c-(xe||0),a.f+=u-(ke||0)):a={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");E(le,"webkitTransform",d),E(le,"mozTransform",d),E(le,"msTransform",d),E(le,"transform",d),xe=c,ke=u,_e=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!le){var e=this.options.fallbackOnBody?document.body:ce,t=$(re,!0,qe,!0,e),n=this.options;if(qe){Ee=e;while("static"===E(Ee,"position")&&"none"===E(Ee,"transform")&&Ee!==document)Ee=Ee.parentNode;Ee!==document.body&&Ee!==document.documentElement?(Ee===document&&(Ee=j()),t.top+=Ee.scrollTop,t.left+=Ee.scrollLeft):Ee=j(),Ie=R(Ee)}le=re.cloneNode(!0),A(le,n.ghostClass,!1),A(le,n.fallbackClass,!0),A(le,n.dragClass,!0),E(le,"transition",""),E(le,"transform",""),E(le,"box-sizing","border-box"),E(le,"margin",0),E(le,"top",t.top),E(le,"left",t.left),E(le,"width",t.width),E(le,"height",t.height),E(le,"opacity","0.8"),E(le,"position",qe?"absolute":"fixed"),E(le,"zIndex","100000"),E(le,"pointerEvents","none"),Je.ghost=le,e.appendChild(le),E(le,"transform-origin",Ce/parseInt(le.style.width)*100+"% "+Se/parseInt(le.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,i=e.dataTransfer,o=n.options;oe("dragStart",this,{evt:e}),Je.eventCanceled?this._onDrop():(oe("setupClone",this),Je.eventCanceled||(pe=K(re),pe.draggable=!1,pe.style["will-change"]="",this._hideClone(),A(pe,this.options.chosenClass,!1),Je.clone=pe),n.cloneId=lt((function(){oe("clone",n),Je.eventCanceled||(n.options.removeCloneOnHide||ce.insertBefore(pe,re),n._hideClone(),ae({sortable:n,name:"clone"}))})),!t&&A(re,o.dragClass,!0),t?(De=!0,n._loopId=setInterval(n._emulateDragOver,50)):(k(document,"mouseup",n._onDrop),k(document,"touchend",n._onDrop),k(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",o.setData&&o.setData.call(n,i,re)),x(document,"drop",n),E(re,"transform","translateZ(0)")),Ne=!0,n._dragStartId=lt(n._dragStarted.bind(n,t,e)),x(document,"selectstart",n),Te=!0,y&&E(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,i,o,a=this.el,s=e.target,l=this.options,c=l.group,u=Je.active,d=ye===c,p=l.sort,h=be||u,f=this,m=!1;if(!Fe){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),s=T(s,l.draggable,a,!0),D("dragOver"),Je.eventCanceled)return m;if(re.contains(e.target)||s.animated&&s.animatingX&&s.animatingY||f._ignoreWhileAnimating===s)return I(!1);if(De=!1,u&&!l.disabled&&(d?p||(i=!ce.contains(re)):be===this||(this.lastPutMode=ye.checkPull(this,u,re,e))&&c.checkPut(this,u,re,e))){if(o="vertical"===this._getDirection(e,s),t=$(re),D("dragOverValid"),Je.eventCanceled)return m;if(i)return se=ce,j(),this._hideClone(),D("revert"),Je.eventCanceled||(ue?ce.insertBefore(re,ue):ce.appendChild(re)),I(!0);var v=F(a,l.draggable);if(!v||it(e,o,this)&&!v.animated){if(v===re)return I(!1);if(v&&a===e.target&&(s=v),s&&(n=$(s)),!1!==et(ce,a,re,t,s,n,e,!!s))return j(),a.appendChild(re),se=a,R(),I(!0)}else if(s.parentNode===a){n=$(s);var g,y,b=0,w=re.parentNode!==a,_=!He(re.animated&&re.toRect||t,s.animated&&s.toRect||n,o),x=o?"top":"left",k=L(s,"top","top")||L(re,"top","top"),C=k?k.scrollTop:void 0;if(Oe!==s&&(g=n[x],$e=!1,Le=!_&&l.invertSwap||w),b=ot(e,s,n,o,_?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,Le,Oe===s),0!==b){var S=M(re);do{S-=b,y=se.children[S]}while(y&&("none"===E(y,"display")||y===le))}if(0===b||y===s)return I(!1);Oe=s,Pe=b;var O=s.nextElementSibling,P=!1;P=1===b;var N=et(ce,a,re,t,s,n,e,P);if(!1!==N)return 1!==N&&-1!==N||(P=1===N),Fe=!0,setTimeout(nt,30),j(),P&&!O?a.appendChild(re):s.parentNode.insertBefore(re,P?O:s),k&&W(k,0,C-k.scrollTop),se=re.parentNode,void 0===g||Le||(Ae=Math.abs(g-$(s)[x])),R(),I(!0)}if(a.contains(re))return I(!1)}return!1}function D(l,c){oe(l,f,r({evt:e,isOwner:d,axis:o?"vertical":"horizontal",revert:i,dragRect:t,targetRect:n,canSort:p,fromSortable:h,target:s,completed:I,onMove:function(n,i){return et(ce,a,re,t,n,$(n),e,i)},changed:R},c))}function j(){D("dragOverAnimationCapture"),f.captureAnimationState(),f!==h&&h.captureAnimationState()}function I(t){return D("dragOverCompleted",{insertion:t}),t&&(d?u._hideClone():u._showClone(f),f!==h&&(A(re,be?be.options.ghostClass:u.options.ghostClass,!1),A(re,l.ghostClass,!0)),be!==f&&f!==Je.active?be=f:f===Je.active&&be&&(be=null),h===f&&(f._ignoreWhileAnimating=s),f.animateAll((function(){D("dragOverAnimationComplete"),f._ignoreWhileAnimating=null})),f!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(s===re&&!re.animated||s===a&&!s.animated)&&(Oe=null),l.dragoverBubble||e.rootEl||s===document||(re.parentNode[Y]._isOutsideThisEl(e.target),!t&&Ye(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),m=!0}function R(){me=M(re),ge=M(re,l.draggable),ae({sortable:f,name:"change",toEl:a,newIndex:me,newDraggableIndex:ge,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){k(document,"mousemove",this._onTouchMove),k(document,"touchmove",this._onTouchMove),k(document,"pointermove",this._onTouchMove),k(document,"dragover",Ye),k(document,"mousemove",Ye),k(document,"touchmove",Ye)},_offUpEvents:function(){var e=this.el.ownerDocument;k(e,"mouseup",this._onDrop),k(e,"touchend",this._onDrop),k(e,"pointerup",this._onDrop),k(e,"touchcancel",this._onDrop),k(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;me=M(re),ge=M(re,n.draggable),oe("drop",this,{evt:e}),se=re&&re.parentNode,me=M(re),ge=M(re,n.draggable),Je.eventCanceled||(Ne=!1,Le=!1,$e=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),ct(this.cloneId),ct(this._dragStartId),this.nativeDraggable&&(k(document,"drop",this),k(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),y&&E(document.body,"user-select",""),E(re,"transform",""),e&&(Te&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),le&&le.parentNode&&le.parentNode.removeChild(le),(ce===se||be&&"clone"!==be.lastPutMode)&&pe&&pe.parentNode&&pe.parentNode.removeChild(pe),re&&(this.nativeDraggable&&k(re,"dragend",this),tt(re),re.style["will-change"]="",Te&&!Ne&&A(re,be?be.options.ghostClass:this.options.ghostClass,!1),A(re,this.options.chosenClass,!1),ae({sortable:this,name:"unchoose",toEl:se,newIndex:null,newDraggableIndex:null,originalEvent:e}),ce!==se?(me>=0&&(ae({rootEl:se,name:"add",toEl:se,fromEl:ce,originalEvent:e}),ae({sortable:this,name:"remove",toEl:se,originalEvent:e}),ae({rootEl:se,name:"sort",toEl:se,fromEl:ce,originalEvent:e}),ae({sortable:this,name:"sort",toEl:se,originalEvent:e})),be&&be.save()):me!==fe&&me>=0&&(ae({sortable:this,name:"update",toEl:se,originalEvent:e}),ae({sortable:this,name:"sort",toEl:se,originalEvent:e})),Je.active&&(null!=me&&-1!==me||(me=fe,ge=ve),ae({sortable:this,name:"end",toEl:se,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){oe("nulling",this),ce=re=se=le=ue=pe=de=he=we=_e=Te=me=ge=fe=ve=Oe=Pe=be=ye=Je.dragged=Je.ghost=Je.clone=Je.active=null,Me.forEach((function(e){e.checked=!0})),Me.length=xe=ke=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":re&&(this._onDragOver(e),Xe(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e,t=[],n=this.el.children,i=0,o=n.length,a=this.options;i<o;i++)e=n[i],T(e,a.draggable,this.el,!1)&&t.push(e.getAttribute(a.dataIdAttr)||rt(e));return t},sort:function(e){var t={},n=this.el;this.toArray().forEach((function(e,i){var o=n.children[i];T(o,this.options.draggable,n,!1)&&(t[e]=o)}),this),e.forEach((function(e){t[e]&&(n.removeChild(t[e]),n.appendChild(t[e]))}))},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return T(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var i=ne.modifyOption(this,e,t);n[e]="undefined"!==typeof i?i:t,"group"===e&&Ke(n)},destroy:function(){oe("destroy",this);var e=this.el;e[Y]=null,k(e,"mousedown",this._onTapStart),k(e,"touchstart",this._onTapStart),k(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(k(e,"dragover",this),k(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),je.splice(je.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!he){if(oe("hideClone",this),Je.eventCanceled)return;E(pe,"display","none"),this.options.removeCloneOnHide&&pe.parentNode&&pe.parentNode.removeChild(pe),he=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(he){if(oe("showClone",this),Je.eventCanceled)return;ce.contains(re)&&!this.options.group.revertClone?ce.insertBefore(pe,re):ue?ce.insertBefore(pe,ue):ce.appendChild(pe),this.options.group.revertClone&&this.animate(re,pe),E(pe,"display",""),he=!1}}else this._hideClone()}},Re&&x(document,"touchmove",(function(e){(Je.active||Ne)&&e.cancelable&&e.preventDefault()})),Je.utils={on:x,off:k,css:E,find:D,is:function(e,t){return!!T(e,t,e,!1)},extend:z,throttle:U,closest:T,toggleClass:A,clone:K,index:M,nextTick:lt,cancelNextTick:ct,detectDirection:Ue,getChild:I},Je.get=function(e){return e[Y]},Je.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Je.utils=r({},Je.utils,e.utils)),ne.mount(e)}))},Je.create=function(e,t){return new Je(e,t)},Je.version=h;var ut,dt,pt,ht,ft,mt,vt=[],gt=!1;function yt(){function e(){for(var e in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"===typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?x(document,"dragover",this._handleAutoScroll):this.options.supportPointer?x(document,"pointermove",this._handleFallbackAutoScroll):t.touches?x(document,"touchmove",this._handleFallbackAutoScroll):x(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?k(document,"dragover",this._handleAutoScroll):(k(document,"pointermove",this._handleFallbackAutoScroll),k(document,"touchmove",this._handleFallbackAutoScroll),k(document,"mousemove",this._handleFallbackAutoScroll)),wt(),bt(),H()},nulling:function(){ft=dt=ut=gt=mt=pt=ht=null,vt.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,i=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,a=document.elementFromPoint(i,o);if(ft=e,t||v||m||y){xt(e,this.options,a,t);var r=B(a,!0);!gt||mt&&i===pt&&o===ht||(mt&&wt(),mt=setInterval((function(){var a=B(document.elementFromPoint(i,o),!0);a!==r&&(r=a,bt()),xt(e,n.options,a,t)}),10),pt=i,ht=o)}else{if(!this.options.bubbleScroll||B(a,!0)===j())return void bt();xt(e,this.options,B(a,!1),!1)}}},a(e,{pluginName:"scroll",initializeByDefault:!0})}function bt(){vt.forEach((function(e){clearInterval(e.pid)})),vt=[]}function wt(){clearInterval(mt)}var _t,xt=U((function(e,t,n,i){if(t.scroll){var o,a=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,s=t.scrollSensitivity,l=t.scrollSpeed,c=j(),u=!1;dt!==n&&(dt=n,bt(),ut=t.scroll,o=t.scrollFn,!0===ut&&(ut=B(n,!0)));var d=0,p=ut;do{var h=p,f=$(h),m=f.top,v=f.bottom,g=f.left,y=f.right,b=f.width,w=f.height,_=void 0,x=void 0,k=h.scrollWidth,C=h.scrollHeight,S=E(h),T=h.scrollLeft,O=h.scrollTop;h===c?(_=b<k&&("auto"===S.overflowX||"scroll"===S.overflowX||"visible"===S.overflowX),x=w<C&&("auto"===S.overflowY||"scroll"===S.overflowY||"visible"===S.overflowY)):(_=b<k&&("auto"===S.overflowX||"scroll"===S.overflowX),x=w<C&&("auto"===S.overflowY||"scroll"===S.overflowY));var P=_&&(Math.abs(y-a)<=s&&T+b<k)-(Math.abs(g-a)<=s&&!!T),A=x&&(Math.abs(v-r)<=s&&O+w<C)-(Math.abs(m-r)<=s&&!!O);if(!vt[d])for(var N=0;N<=d;N++)vt[N]||(vt[N]={});vt[d].vx==P&&vt[d].vy==A&&vt[d].el===h||(vt[d].el=h,vt[d].vx=P,vt[d].vy=A,clearInterval(vt[d].pid),0==P&&0==A||(u=!0,vt[d].pid=setInterval(function(){i&&0===this.layer&&Je.active._onTouchMove(ft);var t=vt[this.layer].vy?vt[this.layer].vy*l:0,n=vt[this.layer].vx?vt[this.layer].vx*l:0;"function"===typeof o&&"continue"!==o.call(Je.dragged.parentNode[Y],n,t,e,ft,vt[this.layer].el)||W(vt[this.layer].el,n,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&p!==c&&(p=B(p,!1)));gt=u}}),30),kt=function(e){var t=e.originalEvent,n=e.putSortable,i=e.dragEl,o=e.activeSortable,a=e.dispatchSortableEvent,r=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(t){var l=n||o;r();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,u=document.elementFromPoint(c.clientX,c.clientY);s(),l&&!l.el.contains(u)&&(a("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function Ct(){}function St(){}function Tt(){function e(){this.defaults={swapClass:"sortable-swap-highlight"}}return e.prototype={dragStart:function(e){var t=e.dragEl;_t=t},dragOverValid:function(e){var t=e.completed,n=e.target,i=e.onMove,o=e.activeSortable,a=e.changed,r=e.cancel;if(o.options.swap){var s=this.sortable.el,l=this.options;if(n&&n!==s){var c=_t;!1!==i(n)?(A(n,l.swapClass,!0),_t=n):_t=null,c&&c!==_t&&A(c,l.swapClass,!1)}a(),t(!0),r()}},drop:function(e){var t=e.activeSortable,n=e.putSortable,i=e.dragEl,o=n||this.sortable,a=this.options;_t&&A(_t,a.swapClass,!1),_t&&(a.swap||n&&n.options.swap)&&i!==_t&&(o.captureAnimationState(),o!==t&&t.captureAnimationState(),Ot(i,_t),o.animateAll(),o!==t&&t.animateAll())},nulling:function(){_t=null}},a(e,{pluginName:"swap",eventProperties:function(){return{swapItem:_t}}})}function Ot(e,t){var n,i,o=e.parentNode,a=t.parentNode;o&&a&&!o.isEqualNode(t)&&!a.isEqualNode(e)&&(n=M(e),i=M(t),o.isEqualNode(a)&&n<i&&i++,o.insertBefore(t,o.children[n]),a.insertBefore(e,a.children[i]))}Ct.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var i=I(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(t,i):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:kt},a(Ct,{pluginName:"revertOnSpill"}),St.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable,i=n||this.sortable;i.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),i.animateAll()},drop:kt},a(St,{pluginName:"removeOnSpill"});var Pt,At,Et,Nt,Dt,jt=[],$t=[],Lt=!1,It=!1,Ft=!1;function Mt(){function e(e){for(var t in this)"_"===t.charAt(0)&&"function"===typeof this[t]&&(this[t]=this[t].bind(this));e.options.supportPointer?x(document,"pointerup",this._deselectMultiDrag):(x(document,"mouseup",this._deselectMultiDrag),x(document,"touchend",this._deselectMultiDrag)),x(document,"keydown",this._checkKeyDown),x(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,setData:function(t,n){var i="";jt.length&&At===e?jt.forEach((function(e,t){i+=(t?", ":"")+e.textContent})):i=n.textContent,t.setData("Text",i)}}}return e.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(e){var t=e.dragEl;Et=t},delayEnded:function(){this.isMultiDrag=~jt.indexOf(Et)},setupClone:function(e){var t=e.sortable,n=e.cancel;if(this.isMultiDrag){for(var i=0;i<jt.length;i++)$t.push(K(jt[i])),$t[i].sortableIndex=jt[i].sortableIndex,$t[i].draggable=!1,$t[i].style["will-change"]="",A($t[i],this.options.selectedClass,!1),jt[i]===Et&&A($t[i],this.options.chosenClass,!1);t._hideClone(),n()}},clone:function(e){var t=e.sortable,n=e.rootEl,i=e.dispatchSortableEvent,o=e.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||jt.length&&At===t&&(qt(!0,n),i("clone"),o()))},showClone:function(e){var t=e.cloneNowShown,n=e.rootEl,i=e.cancel;this.isMultiDrag&&(qt(!1,n),$t.forEach((function(e){E(e,"display","")})),t(),Dt=!1,i())},hideClone:function(e){var t=this,n=(e.sortable,e.cloneNowHidden),i=e.cancel;this.isMultiDrag&&($t.forEach((function(e){E(e,"display","none"),t.options.removeCloneOnHide&&e.parentNode&&e.parentNode.removeChild(e)})),n(),Dt=!0,i())},dragStartGlobal:function(e){e.sortable;!this.isMultiDrag&&At&&At.multiDrag._deselectMultiDrag(),jt.forEach((function(e){e.sortableIndex=M(e)})),jt=jt.sort((function(e,t){return e.sortableIndex-t.sortableIndex})),Ft=!0},dragStarted:function(e){var t=this,n=e.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){jt.forEach((function(e){e!==Et&&E(e,"position","absolute")}));var i=$(Et,!1,!0,!0);jt.forEach((function(e){e!==Et&&G(e,i)})),It=!0,Lt=!0}n.animateAll((function(){It=!1,Lt=!1,t.options.animation&&jt.forEach((function(e){Q(e)})),t.options.sort&&Bt()}))}},dragOver:function(e){var t=e.target,n=e.completed,i=e.cancel;It&&~jt.indexOf(t)&&(n(!1),i())},revert:function(e){var t=e.fromSortable,n=e.rootEl,i=e.sortable,o=e.dragRect;jt.length>1&&(jt.forEach((function(e){i.addAnimationState({target:e,rect:It?$(e):o}),Q(e),e.fromRect=o,t.removeAnimationState(e)})),It=!1,Rt(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(e){var t=e.sortable,n=e.isOwner,i=e.insertion,o=e.activeSortable,a=e.parentEl,r=e.putSortable,s=this.options;if(i){if(n&&o._hideClone(),Lt=!1,s.animation&&jt.length>1&&(It||!n&&!o.options.sort&&!r)){var l=$(Et,!1,!0,!0);jt.forEach((function(e){e!==Et&&(G(e,l),a.appendChild(e))})),It=!0}if(!n)if(It||Bt(),jt.length>1){var c=Dt;o._showClone(t),o.options.animation&&!Dt&&c&&$t.forEach((function(e){o.addAnimationState({target:e,rect:Nt}),e.fromRect=Nt,e.thisAnimationDuration=null}))}else o._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,n=e.isOwner,i=e.activeSortable;if(jt.forEach((function(e){e.thisAnimationDuration=null})),i.options.animation&&!n&&i.multiDrag.isMultiDrag){Nt=a({},t);var o=N(Et,!0);Nt.top-=o.f,Nt.left-=o.e}},dragOverAnimationComplete:function(){It&&(It=!1,Bt())},drop:function(e){var t=e.originalEvent,n=e.rootEl,i=e.parentEl,o=e.sortable,a=e.dispatchSortableEvent,r=e.oldIndex,s=e.putSortable,l=s||this.sortable;if(t){var c=this.options,u=i.children;if(!Ft)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),A(Et,c.selectedClass,!~jt.indexOf(Et)),~jt.indexOf(Et))jt.splice(jt.indexOf(Et),1),Pt=null,ie({sortable:o,rootEl:n,name:"deselect",targetEl:Et,originalEvt:t});else{if(jt.push(Et),ie({sortable:o,rootEl:n,name:"select",targetEl:Et,originalEvt:t}),t.shiftKey&&Pt&&o.el.contains(Pt)){var d,p,h=M(Pt),f=M(Et);if(~h&&~f&&h!==f)for(f>h?(p=h,d=f):(p=f,d=h+1);p<d;p++)~jt.indexOf(u[p])||(A(u[p],c.selectedClass,!0),jt.push(u[p]),ie({sortable:o,rootEl:n,name:"select",targetEl:u[p],originalEvt:t}))}else Pt=Et;At=l}if(Ft&&this.isMultiDrag){if((i[Y].options.sort||i!==n)&&jt.length>1){var m=$(Et),v=M(Et,":not(."+this.options.selectedClass+")");if(!Lt&&c.animation&&(Et.thisAnimationDuration=null),l.captureAnimationState(),!Lt&&(c.animation&&(Et.fromRect=m,jt.forEach((function(e){if(e.thisAnimationDuration=null,e!==Et){var t=It?$(e):m;e.fromRect=t,l.addAnimationState({target:e,rect:t})}}))),Bt(),jt.forEach((function(e){u[v]?i.insertBefore(e,u[v]):i.appendChild(e),v++})),r===M(Et))){var g=!1;jt.forEach((function(e){e.sortableIndex===M(e)||(g=!0)})),g&&a("update")}jt.forEach((function(e){Q(e)})),l.animateAll()}At=l}(n===i||s&&"clone"!==s.lastPutMode)&&$t.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))}},nullingGlobal:function(){this.isMultiDrag=Ft=!1,$t.length=0},destroyGlobal:function(){this._deselectMultiDrag(),k(document,"pointerup",this._deselectMultiDrag),k(document,"mouseup",this._deselectMultiDrag),k(document,"touchend",this._deselectMultiDrag),k(document,"keydown",this._checkKeyDown),k(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(("undefined"===typeof Ft||!Ft)&&At===this.sortable&&(!e||!T(e.target,this.options.draggable,this.sortable.el,!1))&&(!e||0===e.button))while(jt.length){var t=jt[0];A(t,this.options.selectedClass,!1),jt.shift(),ie({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvt:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},a(e,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[Y];t&&t.options.multiDrag&&!~jt.indexOf(e)&&(At&&At!==t&&(At.multiDrag._deselectMultiDrag(),At=t),A(e,t.options.selectedClass,!0),jt.push(e))},deselect:function(e){var t=e.parentNode[Y],n=jt.indexOf(e);t&&t.options.multiDrag&&~n&&(A(e,t.options.selectedClass,!1),jt.splice(n,1))}},eventProperties:function(){var e=this,t=[],n=[];return jt.forEach((function(i){var o;t.push({multiDragElement:i,index:i.sortableIndex}),o=It&&i!==Et?-1:It?M(i,":not(."+e.options.selectedClass+")"):M(i),n.push({multiDragElement:i,index:o})})),{items:c(jt),clones:[].concat($t),oldIndicies:t,newIndicies:n}},optionListeners:{multiDragKey:function(e){return e=e.toLowerCase(),"ctrl"===e?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}function Rt(e,t){jt.forEach((function(n,i){var o=t.children[n.sortableIndex+(e?Number(i):0)];o?t.insertBefore(n,o):t.appendChild(n)}))}function qt(e,t){$t.forEach((function(n,i){var o=t.children[n.sortableIndex+(e?Number(i):0)];o?t.insertBefore(n,o):t.appendChild(n)}))}function Bt(){jt.forEach((function(e){e!==Et&&e.parentNode&&e.parentNode.removeChild(e)}))}Je.mount(new yt),Je.mount(St,Ct),t["default"]=Je},adfc:function(e,t,n){"use strict";var i=n("b974"),o=function(){var e=this,t=e._self._c;return t(i["a"],{attrs:{dense:"",outlined:"","hide-details":"","item-text":"label","item-value":"value",disabled:e.disabled,"return-object":!e.useString,items:e.availableTimezones,label:e.label,placeholder:e.placeholder,"prepend-icon":e.prependIcon,rules:[!!e.timezoneLocal]},model:{value:e.timezoneLocal,callback:function(t){e.timezoneLocal=t},expression:"timezoneLocal"}})},a=[],r=(n("3c65"),n("2f62")),s=n("b0e3");const l=[{label:"Eastern Time",value:"America/New_York"},{label:"Central Time",value:"America/Chicago"},{label:"Mountain Time (America/Denver)",value:"America/Denver"},{label:"Pacific Time",value:"America/Los_Angeles"},{label:"Alaska Time",value:"America/Anchorage"}];var c={props:{value:{required:!0},useString:{type:Boolean,default:!1},prospectTimezone:{type:String},prependIcon:{type:String},label:{type:String},placeholder:{type:String},disabled:{type:Boolean}},computed:{...Object(r["c"])("user",["user","getSettingByKey"]),availableTimezones(){const e=s,t=this.getSettingByKey("timezone");e.splice(e.indexOf(t),1),this.prospectTimezone&&e.splice(e.indexOf(this.prospectTimezone),1);const n=e.map(e=>({value:e,label:e}));return n.unshift({divider:!0},{header:"All timezones"}),this.prospectTimezone&&this.prospectTimezone===t?(n.unshift({header:"Quick timezones"},{label:this.prospectTimezone+" (Shared)",value:this.prospectTimezone},...l),n):(this.prospectTimezone&&n.unshift({label:this.prospectTimezone+" (Prospect)",value:this.prospectTimezone}),n.unshift({header:"Quick timezones"},...t?[{label:t+" (Yours)",value:t}]:[],...l),n)},timezoneLocal:{get(){return this.value},set(e){this.$emit("input",e)}}},created(){this.timezoneLocal||(this.timezoneLocal=this.availableTimezones[1])}},u=c,d=n("2877"),p=Object(d["a"])(u,o,a,!1,null,"0d4fb5be",null);t["a"]=p.exports},afdde:function(e,t,n){"use strict";n("fda0")},b0e8:function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=o(n("edd2")),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(a.default);t.default=r},b676:function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=o(n("edd2")),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(a.default);t.default=r},b76a:function(e,t,n){(function(t,i){e.exports=i(n("aa47"))})("undefined"!==typeof self&&self,(function(e){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="fb15")}({"01f9":function(e,t,n){"use strict";var i=n("2d00"),o=n("5ca1"),a=n("2aba"),r=n("32e9"),s=n("84f2"),l=n("41a0"),c=n("7f20"),u=n("38fd"),d=n("2b4c")("iterator"),p=!([].keys&&"next"in[].keys()),h="@@iterator",f="keys",m="values",v=function(){return this};e.exports=function(e,t,n,g,y,b,w){l(n,t,g);var _,x,k,C=function(e){if(!p&&e in P)return P[e];switch(e){case f:return function(){return new n(this,e)};case m:return function(){return new n(this,e)}}return function(){return new n(this,e)}},S=t+" Iterator",T=y==m,O=!1,P=e.prototype,A=P[d]||P[h]||y&&P[y],E=A||C(y),N=y?T?C("entries"):E:void 0,D="Array"==t&&P.entries||A;if(D&&(k=u(D.call(new e)),k!==Object.prototype&&k.next&&(c(k,S,!0),i||"function"==typeof k[d]||r(k,d,v))),T&&A&&A.name!==m&&(O=!0,E=function(){return A.call(this)}),i&&!w||!p&&!O&&P[d]||r(P,d,E),s[t]=E,s[S]=v,y)if(_={values:T?E:C(m),keys:b?E:C(f),entries:N},w)for(x in _)x in P||a(P,x,_[x]);else o(o.P+o.F*(p||O),t,_);return _}},"02f4":function(e,t,n){var i=n("4588"),o=n("be13");e.exports=function(e){return function(t,n){var a,r,s=String(o(t)),l=i(n),c=s.length;return l<0||l>=c?e?"":void 0:(a=s.charCodeAt(l),a<55296||a>56319||l+1===c||(r=s.charCodeAt(l+1))<56320||r>57343?e?s.charAt(l):a:e?s.slice(l,l+2):r-56320+(a-55296<<10)+65536)}}},"0390":function(e,t,n){"use strict";var i=n("02f4")(!0);e.exports=function(e,t,n){return t+(n?i(e,t).length:1)}},"0bfb":function(e,t,n){"use strict";var i=n("cb7c");e.exports=function(){var e=i(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},"0d58":function(e,t,n){var i=n("ce10"),o=n("e11e");e.exports=Object.keys||function(e){return i(e,o)}},1495:function(e,t,n){var i=n("86cc"),o=n("cb7c"),a=n("0d58");e.exports=n("9e1e")?Object.defineProperties:function(e,t){o(e);var n,r=a(t),s=r.length,l=0;while(s>l)i.f(e,n=r[l++],t[n]);return e}},"214f":function(e,t,n){"use strict";n("b0c5");var i=n("2aba"),o=n("32e9"),a=n("79e5"),r=n("be13"),s=n("2b4c"),l=n("520a"),c=s("species"),u=!a((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),d=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var p=s(e),h=!a((function(){var t={};return t[p]=function(){return 7},7!=""[e](t)})),f=h?!a((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[c]=function(){return n}),n[p](""),!t})):void 0;if(!h||!f||"replace"===e&&!u||"split"===e&&!d){var m=/./[p],v=n(r,p,""[e],(function(e,t,n,i,o){return t.exec===l?h&&!o?{done:!0,value:m.call(t,n,i)}:{done:!0,value:e.call(n,t,i)}:{done:!1}})),g=v[0],y=v[1];i(String.prototype,e,g),o(RegExp.prototype,p,2==t?function(e,t){return y.call(e,this,t)}:function(e){return y.call(e,this)})}}},"230e":function(e,t,n){var i=n("d3f4"),o=n("7726").document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},"23c6":function(e,t,n){var i=n("2d95"),o=n("2b4c")("toStringTag"),a="Arguments"==i(function(){return arguments}()),r=function(e,t){try{return e[t]}catch(n){}};e.exports=function(e){var t,n,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=r(t=Object(e),o))?n:a?i(t):"Object"==(s=i(t))&&"function"==typeof t.callee?"Arguments":s}},2621:function(e,t){t.f=Object.getOwnPropertySymbols},"2aba":function(e,t,n){var i=n("7726"),o=n("32e9"),a=n("69a8"),r=n("ca5a")("src"),s=n("fa5b"),l="toString",c=(""+s).split(l);n("8378").inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var l="function"==typeof n;l&&(a(n,"name")||o(n,"name",t)),e[t]!==n&&(l&&(a(n,r)||o(n,r,e[t]?""+e[t]:c.join(String(t)))),e===i?e[t]=n:s?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,l,(function(){return"function"==typeof this&&this[r]||s.call(this)}))},"2aeb":function(e,t,n){var i=n("cb7c"),o=n("1495"),a=n("e11e"),r=n("613b")("IE_PROTO"),s=function(){},l="prototype",c=function(){var e,t=n("230e")("iframe"),i=a.length,o="<",r=">";t.style.display="none",n("fab2").appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(o+"script"+r+"document.F=Object"+o+"/script"+r),e.close(),c=e.F;while(i--)delete c[l][a[i]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(s[l]=i(e),n=new s,s[l]=null,n[r]=e):n=c(),void 0===t?n:o(n,t)}},"2b4c":function(e,t,n){var i=n("5537")("wks"),o=n("ca5a"),a=n("7726").Symbol,r="function"==typeof a,s=e.exports=function(e){return i[e]||(i[e]=r&&a[e]||(r?a:o)("Symbol."+e))};s.store=i},"2d00":function(e,t){e.exports=!1},"2d95":function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},"2fdb":function(e,t,n){"use strict";var i=n("5ca1"),o=n("d2c8"),a="includes";i(i.P+i.F*n("5147")(a),"String",{includes:function(e){return!!~o(this,e,a).indexOf(e,arguments.length>1?arguments[1]:void 0)}})},"32e9":function(e,t,n){var i=n("86cc"),o=n("4630");e.exports=n("9e1e")?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},"38fd":function(e,t,n){var i=n("69a8"),o=n("4bf8"),a=n("613b")("IE_PROTO"),r=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),i(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?r:null}},"41a0":function(e,t,n){"use strict";var i=n("2aeb"),o=n("4630"),a=n("7f20"),r={};n("32e9")(r,n("2b4c")("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=i(r,{next:o(1,n)}),a(e,t+" Iterator")}},"456d":function(e,t,n){var i=n("4bf8"),o=n("0d58");n("5eda")("keys",(function(){return function(e){return o(i(e))}}))},4588:function(e,t){var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},4630:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"4bf8":function(e,t,n){var i=n("be13");e.exports=function(e){return Object(i(e))}},5147:function(e,t,n){var i=n("2b4c")("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[i]=!1,!"/./"[e](t)}catch(o){}}return!0}},"520a":function(e,t,n){"use strict";var i=n("0bfb"),o=RegExp.prototype.exec,a=String.prototype.replace,r=o,s="lastIndex",l=function(){var e=/a/,t=/b*/g;return o.call(e,"a"),o.call(t,"a"),0!==e[s]||0!==t[s]}(),c=void 0!==/()??/.exec("")[1],u=l||c;u&&(r=function(e){var t,n,r,u,d=this;return c&&(n=new RegExp("^"+d.source+"$(?!\\s)",i.call(d))),l&&(t=d[s]),r=o.call(d,e),l&&r&&(d[s]=d.global?r.index+r[0].length:t),c&&r&&r.length>1&&a.call(r[0],n,(function(){for(u=1;u<arguments.length-2;u++)void 0===arguments[u]&&(r[u]=void 0)})),r}),e.exports=r},"52a7":function(e,t){t.f={}.propertyIsEnumerable},5537:function(e,t,n){var i=n("8378"),o=n("7726"),a="__core-js_shared__",r=o[a]||(o[a]={});(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:i.version,mode:n("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},"5ca1":function(e,t,n){var i=n("7726"),o=n("8378"),a=n("32e9"),r=n("2aba"),s=n("9b43"),l="prototype",c=function(e,t,n){var u,d,p,h,f=e&c.F,m=e&c.G,v=e&c.S,g=e&c.P,y=e&c.B,b=m?i:v?i[t]||(i[t]={}):(i[t]||{})[l],w=m?o:o[t]||(o[t]={}),_=w[l]||(w[l]={});for(u in m&&(n=t),n)d=!f&&b&&void 0!==b[u],p=(d?b:n)[u],h=y&&d?s(p,i):g&&"function"==typeof p?s(Function.call,p):p,b&&r(b,u,p,e&c.U),w[u]!=p&&a(w,u,h),g&&_[u]!=p&&(_[u]=p)};i.core=o,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},"5eda":function(e,t,n){var i=n("5ca1"),o=n("8378"),a=n("79e5");e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],r={};r[e]=t(n),i(i.S+i.F*a((function(){n(1)})),"Object",r)}},"5f1b":function(e,t,n){"use strict";var i=n("23c6"),o=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"===typeof n){var a=n.call(e,t);if("object"!==typeof a)throw new TypeError("RegExp exec method returned something other than an Object or null");return a}if("RegExp"!==i(e))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},"613b":function(e,t,n){var i=n("5537")("keys"),o=n("ca5a");e.exports=function(e){return i[e]||(i[e]=o(e))}},"626a":function(e,t,n){var i=n("2d95");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},6762:function(e,t,n){"use strict";var i=n("5ca1"),o=n("c366")(!0);i(i.P,"Array",{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")("includes")},6821:function(e,t,n){var i=n("626a"),o=n("be13");e.exports=function(e){return i(o(e))}},"69a8":function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},"6a99":function(e,t,n){var i=n("d3f4");e.exports=function(e,t){if(!i(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!i(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},7333:function(e,t,n){"use strict";var i=n("0d58"),o=n("2621"),a=n("52a7"),r=n("4bf8"),s=n("626a"),l=Object.assign;e.exports=!l||n("79e5")((function(){var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach((function(e){t[e]=e})),7!=l({},e)[n]||Object.keys(l({},t)).join("")!=i}))?function(e,t){var n=r(e),l=arguments.length,c=1,u=o.f,d=a.f;while(l>c){var p,h=s(arguments[c++]),f=u?i(h).concat(u(h)):i(h),m=f.length,v=0;while(m>v)d.call(h,p=f[v++])&&(n[p]=h[p])}return n}:l},7726:function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"77f1":function(e,t,n){var i=n("4588"),o=Math.max,a=Math.min;e.exports=function(e,t){return e=i(e),e<0?o(e+t,0):a(e,t)}},"79e5":function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},"7f20":function(e,t,n){var i=n("86cc").f,o=n("69a8"),a=n("2b4c")("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,a)&&i(e,a,{configurable:!0,value:t})}},8378:function(e,t){var n=e.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},"84f2":function(e,t){e.exports={}},"86cc":function(e,t,n){var i=n("cb7c"),o=n("c69a"),a=n("6a99"),r=Object.defineProperty;t.f=n("9e1e")?Object.defineProperty:function(e,t,n){if(i(e),t=a(t,!0),i(n),o)try{return r(e,t,n)}catch(s){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},"9b43":function(e,t,n){var i=n("d8e8");e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,o){return e.call(t,n,i,o)}}return function(){return e.apply(t,arguments)}}},"9c6c":function(e,t,n){var i=n("2b4c")("unscopables"),o=Array.prototype;void 0==o[i]&&n("32e9")(o,i,{}),e.exports=function(e){o[i][e]=!0}},"9def":function(e,t,n){var i=n("4588"),o=Math.min;e.exports=function(e){return e>0?o(i(e),9007199254740991):0}},"9e1e":function(e,t,n){e.exports=!n("79e5")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},a352:function(t,n){t.exports=e},a481:function(e,t,n){"use strict";var i=n("cb7c"),o=n("4bf8"),a=n("9def"),r=n("4588"),s=n("0390"),l=n("5f1b"),c=Math.max,u=Math.min,d=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,h=/\$([$&`']|\d\d?)/g,f=function(e){return void 0===e?e:String(e)};n("214f")("replace",2,(function(e,t,n,m){return[function(i,o){var a=e(this),r=void 0==i?void 0:i[t];return void 0!==r?r.call(i,a,o):n.call(String(a),i,o)},function(e,t){var o=m(n,e,this,t);if(o.done)return o.value;var d=i(e),p=String(this),h="function"===typeof t;h||(t=String(t));var g=d.global;if(g){var y=d.unicode;d.lastIndex=0}var b=[];while(1){var w=l(d,p);if(null===w)break;if(b.push(w),!g)break;var _=String(w[0]);""===_&&(d.lastIndex=s(p,a(d.lastIndex),y))}for(var x="",k=0,C=0;C<b.length;C++){w=b[C];for(var S=String(w[0]),T=c(u(r(w.index),p.length),0),O=[],P=1;P<w.length;P++)O.push(f(w[P]));var A=w.groups;if(h){var E=[S].concat(O,T,p);void 0!==A&&E.push(A);var N=String(t.apply(void 0,E))}else N=v(S,p,T,O,A,t);T>=k&&(x+=p.slice(k,T)+N,k=T+S.length)}return x+p.slice(k)}];function v(e,t,i,a,r,s){var l=i+e.length,c=a.length,u=h;return void 0!==r&&(r=o(r),u=p),n.call(s,u,(function(n,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,i);case"'":return t.slice(l);case"<":s=r[o.slice(1,-1)];break;default:var u=+o;if(0===u)return n;if(u>c){var p=d(u/10);return 0===p?n:p<=c?void 0===a[p-1]?o.charAt(1):a[p-1]+o.charAt(1):n}s=a[u-1]}return void 0===s?"":s}))}}))},aae3:function(e,t,n){var i=n("d3f4"),o=n("2d95"),a=n("2b4c")("match");e.exports=function(e){var t;return i(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==o(e))}},ac6a:function(e,t,n){for(var i=n("cadf"),o=n("0d58"),a=n("2aba"),r=n("7726"),s=n("32e9"),l=n("84f2"),c=n("2b4c"),u=c("iterator"),d=c("toStringTag"),p=l.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},f=o(h),m=0;m<f.length;m++){var v,g=f[m],y=h[g],b=r[g],w=b&&b.prototype;if(w&&(w[u]||s(w,u,p),w[d]||s(w,d,g),l[g]=p,y))for(v in i)w[v]||a(w,v,i[v],!0)}},b0c5:function(e,t,n){"use strict";var i=n("520a");n("5ca1")({target:"RegExp",proto:!0,forced:i!==/./.exec},{exec:i})},be13:function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on  "+e);return e}},c366:function(e,t,n){var i=n("6821"),o=n("9def"),a=n("77f1");e.exports=function(e){return function(t,n,r){var s,l=i(t),c=o(l.length),u=a(r,c);if(e&&n!=n){while(c>u)if(s=l[u++],s!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},c649:function(e,t,n){"use strict";(function(e){n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return o})),n.d(t,"d",(function(){return l}));n("a481");function i(){return"undefined"!==typeof window?window.console:e.console}var o=i();function a(e){var t=Object.create(null);return function(n){var i=t[n];return i||(t[n]=e(n))}}var r=/-(\w)/g,s=a((function(e){return e.replace(r,(function(e,t){return t?t.toUpperCase():""}))}));function l(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function c(e,t,n){var i=0===n?e.children[0]:e.children[n-1].nextSibling;e.insertBefore(t,i)}}).call(this,n("c8ba"))},c69a:function(e,t,n){e.exports=!n("9e1e")&&!n("79e5")((function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a}))},c8ba:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(i){"object"===typeof window&&(n=window)}e.exports=n},ca5a:function(e,t){var n=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},cadf:function(e,t,n){"use strict";var i=n("9c6c"),o=n("d53b"),a=n("84f2"),r=n("6821");e.exports=n("01f9")(Array,"Array",(function(e,t){this._t=r(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),a.Arguments=a.Array,i("keys"),i("values"),i("entries")},cb7c:function(e,t,n){var i=n("d3f4");e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},ce10:function(e,t,n){var i=n("69a8"),o=n("6821"),a=n("c366")(!1),r=n("613b")("IE_PROTO");e.exports=function(e,t){var n,s=o(e),l=0,c=[];for(n in s)n!=r&&i(s,n)&&c.push(n);while(t.length>l)i(s,n=t[l++])&&(~a(c,n)||c.push(n));return c}},d2c8:function(e,t,n){var i=n("aae3"),o=n("be13");e.exports=function(e,t,n){if(i(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(e))}},d3f4:function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},d53b:function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},d8e8:function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},e11e:function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},f559:function(e,t,n){"use strict";var i=n("5ca1"),o=n("9def"),a=n("d2c8"),r="startsWith",s=""[r];i(i.P+i.F*n("5147")(r),"String",{startsWith:function(e){var t=a(this,e,r),n=o(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),i=String(e);return s?s.call(t,i,n):t.slice(n,n+i.length)===i}})},f6fd:function(e,t){(function(e){var t="currentScript",n=e.getElementsByTagName("script");t in e||Object.defineProperty(e,t,{get:function(){try{throw new Error}catch(i){var e,t=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(i.stack)||[!1])[1];for(e in n)if(n[e].src==t||"interactive"==n[e].readyState)return n[e];return null}}})})(document)},f751:function(e,t,n){var i=n("5ca1");i(i.S+i.F,"Object",{assign:n("7333")})},fa5b:function(e,t,n){e.exports=n("5537")("native-function-to-string",Function.toString)},fab2:function(e,t,n){var i=n("7726").document;e.exports=i&&i.documentElement},fb15:function(e,t,n){"use strict";var i;(n.r(t),"undefined"!==typeof window)&&(n("f6fd"),(i=window.document.currentScript)&&(i=i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(n.p=i[1]));n("f751"),n("f559"),n("ac6a"),n("cadf"),n("456d");function o(e){if(Array.isArray(e))return e}function a(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],i=!0,o=!1,a=void 0;try{for(var r,s=e[Symbol.iterator]();!(i=(r=s.next()).done);i=!0)if(n.push(r.value),t&&n.length===t)break}catch(l){o=!0,a=l}finally{try{i||null==s["return"]||s["return"]()}finally{if(o)throw a}}return n}}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function s(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}function l(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(e,t){return o(e)||a(e,t)||s(e,t)||l()}n("6762"),n("2fdb");function u(e){if(Array.isArray(e))return r(e)}function d(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function p(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function h(e){return u(e)||d(e)||s(e)||p()}var f=n("a352"),m=n.n(f),v=n("c649");function g(e,t,n){return void 0===n||(e=e||{},e[t]=n),e}function y(e,t){return e.map((function(e){return e.elm})).indexOf(t)}function b(e,t,n,i){if(!e)return[];var o=e.map((function(e){return e.elm})),a=t.length-i,r=h(t).map((function(e,t){return t>=a?o.length:o.indexOf(e)}));return n?r.filter((function(e){return-1!==e})):r}function w(e,t){var n=this;this.$nextTick((function(){return n.$emit(e.toLowerCase(),t)}))}function _(e){var t=this;return function(n){null!==t.realList&&t["onDrag"+e](n),w.call(t,e,n)}}function x(e){return["transition-group","TransitionGroup"].includes(e)}function k(e){if(!e||1!==e.length)return!1;var t=c(e,1),n=t[0].componentOptions;return!!n&&x(n.tag)}function C(e,t,n){return e[n]||(t[n]?t[n]():void 0)}function S(e,t,n){var i=0,o=0,a=C(t,n,"header");a&&(i=a.length,e=e?[].concat(h(a),h(e)):h(a));var r=C(t,n,"footer");return r&&(o=r.length,e=e?[].concat(h(e),h(r)):h(r)),{children:e,headerOffset:i,footerOffset:o}}function T(e,t){var n=null,i=function(e,t){n=g(n,e,t)},o=Object.keys(e).filter((function(e){return"id"===e||e.startsWith("data-")})).reduce((function(t,n){return t[n]=e[n],t}),{});if(i("attrs",o),!t)return n;var a=t.on,r=t.props,s=t.attrs;return i("on",a),i("props",r),Object.assign(n.attrs,s),n}var O=["Start","Add","Remove","Update","End"],P=["Choose","Unchoose","Sort","Filter","Clone"],A=["Move"].concat(O,P).map((function(e){return"on"+e})),E=null,N={options:Object,list:{type:Array,required:!1,default:null},value:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:function(e){return e}},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},D={name:"draggable",inheritAttrs:!1,props:N,data:function(){return{transitionMode:!1,noneFunctionalComponentMode:!1}},render:function(e){var t=this.$slots.default;this.transitionMode=k(t);var n=S(t,this.$slots,this.$scopedSlots),i=n.children,o=n.headerOffset,a=n.footerOffset;this.headerOffset=o,this.footerOffset=a;var r=T(this.$attrs,this.componentData);return e(this.getTag(),r,i)},created:function(){null!==this.list&&null!==this.value&&v["b"].error("Value and list props are mutually exclusive! Please set one or another."),"div"!==this.element&&v["b"].warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props"),void 0!==this.options&&v["b"].warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props")},mounted:function(){var e=this;if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase()&&!this.getIsFunctional(),this.noneFunctionalComponentMode&&this.transitionMode)throw new Error("Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ".concat(this.getTag()));var t={};O.forEach((function(n){t["on"+n]=_.call(e,n)})),P.forEach((function(n){t["on"+n]=w.bind(e,n)}));var n=Object.keys(this.$attrs).reduce((function(t,n){return t[Object(v["a"])(n)]=e.$attrs[n],t}),{}),i=Object.assign({},this.options,n,t,{onMove:function(t,n){return e.onDragMove(t,n)}});!("draggable"in i)&&(i.draggable=">*"),this._sortable=new m.a(this.rootContainer,i),this.computeIndexes()},beforeDestroy:function(){void 0!==this._sortable&&this._sortable.destroy()},computed:{rootContainer:function(){return this.transitionMode?this.$el.children[0]:this.$el},realList:function(){return this.list?this.list:this.value}},watch:{options:{handler:function(e){this.updateOptions(e)},deep:!0},$attrs:{handler:function(e){this.updateOptions(e)},deep:!0},realList:function(){this.computeIndexes()}},methods:{getIsFunctional:function(){var e=this._vnode.fnOptions;return e&&e.functional},getTag:function(){return this.tag||this.element},updateOptions:function(e){for(var t in e){var n=Object(v["a"])(t);-1===A.indexOf(n)&&this._sortable.option(n,e[t])}},getChildrenNodes:function(){if(this.noneFunctionalComponentMode)return this.$children[0].$slots.default;var e=this.$slots.default;return this.transitionMode?e[0].child.$slots.default:e},computeIndexes:function(){var e=this;this.$nextTick((function(){e.visibleIndexes=b(e.getChildrenNodes(),e.rootContainer.children,e.transitionMode,e.footerOffset)}))},getUnderlyingVm:function(e){var t=y(this.getChildrenNodes()||[],e);if(-1===t)return null;var n=this.realList[t];return{index:t,element:n}},getUnderlyingPotencialDraggableComponent:function(e){var t=e.__vue__;return t&&t.$options&&x(t.$options._componentTag)?t.$parent:!("realList"in t)&&1===t.$children.length&&"realList"in t.$children[0]?t.$children[0]:t},emitChanges:function(e){var t=this;this.$nextTick((function(){t.$emit("change",e)}))},alterList:function(e){if(this.list)e(this.list);else{var t=h(this.value);e(t),this.$emit("input",t)}},spliceList:function(){var e=arguments,t=function(t){return t.splice.apply(t,h(e))};this.alterList(t)},updatePosition:function(e,t){var n=function(n){return n.splice(t,0,n.splice(e,1)[0])};this.alterList(n)},getRelatedContextFromMoveEvent:function(e){var t=e.to,n=e.related,i=this.getUnderlyingPotencialDraggableComponent(t);if(!i)return{component:i};var o=i.realList,a={list:o,component:i};if(t!==n&&o&&i.getUnderlyingVm){var r=i.getUnderlyingVm(n);if(r)return Object.assign(r,a)}return a},getVmIndex:function(e){var t=this.visibleIndexes,n=t.length;return e>n-1?n:t[e]},getComponent:function(){return this.$slots.default[0].componentInstance},resetTransitionData:function(e){if(this.noTransitionOnDrag&&this.transitionMode){var t=this.getChildrenNodes();t[e].data=null;var n=this.getComponent();n.children=[],n.kept=void 0}},onDragStart:function(e){this.context=this.getUnderlyingVm(e.item),e.item._underlying_vm_=this.clone(this.context.element),E=e.item},onDragAdd:function(e){var t=e.item._underlying_vm_;if(void 0!==t){Object(v["d"])(e.item);var n=this.getVmIndex(e.newIndex);this.spliceList(n,0,t),this.computeIndexes();var i={element:t,newIndex:n};this.emitChanges({added:i})}},onDragRemove:function(e){if(Object(v["c"])(this.rootContainer,e.item,e.oldIndex),"clone"!==e.pullMode){var t=this.context.index;this.spliceList(t,1);var n={element:this.context.element,oldIndex:t};this.resetTransitionData(t),this.emitChanges({removed:n})}else Object(v["d"])(e.clone)},onDragUpdate:function(e){Object(v["d"])(e.item),Object(v["c"])(e.from,e.item,e.oldIndex);var t=this.context.index,n=this.getVmIndex(e.newIndex);this.updatePosition(t,n);var i={element:this.context.element,oldIndex:t,newIndex:n};this.emitChanges({moved:i})},updateProperty:function(e,t){e.hasOwnProperty(t)&&(e[t]+=this.headerOffset)},computeFutureIndex:function(e,t){if(!e.element)return 0;var n=h(t.to.children).filter((function(e){return"none"!==e.style["display"]})),i=n.indexOf(t.related),o=e.component.getVmIndex(i),a=-1!==n.indexOf(E);return a||!t.willInsertAfter?o:o+1},onDragMove:function(e,t){var n=this.move;if(!n||!this.realList)return!0;var i=this.getRelatedContextFromMoveEvent(e),o=this.context,a=this.computeFutureIndex(i,e);Object.assign(o,{futureIndex:a});var r=Object.assign({},e,{relatedContext:i,draggedContext:o});return n(r,t)},onDragEnd:function(){this.computeIndexes(),E=null}}};"undefined"!==typeof window&&"Vue"in window&&window.Vue.component("draggable",D);var j=D;t["default"]=j}})["default"]}))},b965:function(e,t,n){"use strict";t["a"]={methods:{phoneNumber(e){var t=(""+e).replace(/\D/g,""),n=t.match(/^(1|)?(\d{3})(\d{3})(\d{4})$/);if(n){var i=n[1]?"+1 ":"";return[i,"(",n[2],") ",n[3],"-",n[4]].join("")}return null},generateUuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0,n="x"==e?t:3&t|8;return n.toString(16)}))},numberWithCommas(e,t){return e?e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","):t?0:""}}}},bb73:function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},bd7c:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ImportError=t.TypesenseError=t.ServerError=t.RequestUnauthorized=t.RequestMalformed=t.ObjectUnprocessable=t.ObjectNotFound=t.ObjectAlreadyExists=t.MissingConfigurationError=t.HTTPError=void 0;var o=i(n("95f3"));t.HTTPError=o.default;var a=i(n("6ea7"));t.MissingConfigurationError=a.default;var r=i(n("7966"));t.ObjectAlreadyExists=r.default;var s=i(n("16ab"));t.ObjectNotFound=s.default;var l=i(n("b0e8"));t.ObjectUnprocessable=l.default;var c=i(n("773f"));t.RequestMalformed=c.default;var u=i(n("7877"));t.RequestUnauthorized=u.default;var d=i(n("b676"));t.ServerError=d.default;var p=i(n("7b6b"));t.ImportError=p.default;var h=i(n("edd2"));t.TypesenseError=h.default},bf19:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i["throw"](e))}catch(t){a(t)}}function l(e){e.done?n(e.value):o(e.value).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=2&a[0]?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(s){a=[6,s],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(t,"__esModule",{value:!0});var a="/debug",r=function(){function e(e){this.apiCall=e}return e.prototype.retrieve=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.apiCall.get(a)]}))}))},e}();t.default=r},c6a6:function(e,t,n){"use strict";n("2bfd");var i=n("b974"),o=n("8654"),a=n("d9f7"),r=n("80d2");const s={...i["b"],offsetY:!0,offsetOverflow:!0,transition:!1};t["a"]=i["a"].extend({name:"v-autocomplete",props:{autoSelectFirst:{type:Boolean,default:!1},filter:{type:Function,default:(e,t,n)=>n.toLocaleLowerCase().indexOf(t.toLocaleLowerCase())>-1},hideNoData:Boolean,menuProps:{type:i["a"].options.props.menuProps.type,default:()=>s},noFilter:Boolean,searchInput:{type:String}},data(){return{lazySearch:this.searchInput}},computed:{classes(){return{...i["a"].options.computed.classes.call(this),"v-autocomplete":!0,"v-autocomplete--is-selecting-index":this.selectedIndex>-1}},computedItems(){return this.filteredItems},selectedValues(){return this.selectedItems.map(e=>this.getValue(e))},hasDisplayedItems(){return this.hideSelected?this.filteredItems.some(e=>!this.hasItem(e)):this.filteredItems.length>0},currentRange(){return null==this.selectedItem?0:String(this.getText(this.selectedItem)).length},filteredItems(){return!this.isSearching||this.noFilter||null==this.internalSearch?this.allItems:this.allItems.filter(e=>{const t=Object(r["r"])(e,this.itemText),n=null!=t?String(t):"";return this.filter(e,String(this.internalSearch),n)})},internalSearch:{get(){return this.lazySearch},set(e){this.lazySearch!==e&&(this.lazySearch=e,this.$emit("update:search-input",e))}},isAnyValueAllowed(){return!1},isDirty(){return this.searchIsDirty||this.selectedItems.length>0},isSearching(){return this.multiple&&this.searchIsDirty||this.searchIsDirty&&this.internalSearch!==this.getText(this.selectedItem)},menuCanShow(){return!!this.isFocused&&(this.hasDisplayedItems||!this.hideNoData)},$_menuProps(){const e=i["a"].options.computed.$_menuProps.call(this);return e.contentClass=("v-autocomplete__content "+(e.contentClass||"")).trim(),{...s,...e}},searchIsDirty(){return null!=this.internalSearch&&""!==this.internalSearch},selectedItem(){return this.multiple?null:this.selectedItems.find(e=>this.valueComparator(this.getValue(e),this.getValue(this.internalValue)))},listData(){const e=i["a"].options.computed.listData.call(this);return e.props={...e.props,items:this.virtualizedItems,noFilter:this.noFilter||!this.isSearching||!this.filteredItems.length,searchInput:this.internalSearch},e}},watch:{filteredItems:"onFilteredItemsChanged",internalValue:"setSearch",isFocused(e){e?(document.addEventListener("copy",this.onCopy),this.$refs.input&&this.$refs.input.select()):(document.removeEventListener("copy",this.onCopy),this.blur(),this.updateSelf())},isMenuActive(e){!e&&this.hasSlot&&(this.lazySearch=null)},items(e,t){t&&t.length||!this.hideNoData||!this.isFocused||this.isMenuActive||!e.length||this.activateMenu()},searchInput(e){this.lazySearch=e},internalSearch:"onInternalSearchChanged",itemText:"updateSelf"},created(){this.setSearch()},destroyed(){document.removeEventListener("copy",this.onCopy)},methods:{onFilteredItemsChanged(e,t){if(e!==t){if(!this.autoSelectFirst){const n=t[this.$refs.menu.listIndex];n?this.setMenuIndex(e.findIndex(e=>e===n)):this.setMenuIndex(-1),this.$emit("update:list-index",this.$refs.menu.listIndex)}this.$nextTick(()=>{this.internalSearch&&(1===e.length||this.autoSelectFirst)&&(this.$refs.menu.getTiles(),this.autoSelectFirst&&e.length&&(this.setMenuIndex(0),this.$emit("update:list-index",this.$refs.menu.listIndex)))})}},onInternalSearchChanged(){this.updateMenuDimensions()},updateMenuDimensions(){this.isMenuActive&&this.$refs.menu&&this.$refs.menu.updateDimensions()},changeSelectedIndex(e){this.searchIsDirty||(this.multiple&&e===r["x"].left?-1===this.selectedIndex?this.selectedIndex=this.selectedItems.length-1:this.selectedIndex--:this.multiple&&e===r["x"].right?this.selectedIndex>=this.selectedItems.length-1?this.selectedIndex=-1:this.selectedIndex++:e!==r["x"].backspace&&e!==r["x"].delete||this.deleteCurrentItem())},deleteCurrentItem(){const e=this.selectedIndex,t=this.selectedItems[e];if(!this.isInteractive||this.getDisabled(t))return;const n=this.selectedItems.length-1;if(-1===this.selectedIndex&&0!==n)return void(this.selectedIndex=n);const i=this.selectedItems.length,o=e!==i-1?e:e-1,a=this.selectedItems[o];a?this.selectItem(t):this.setValue(this.multiple?[]:null),this.selectedIndex=o},clearableCallback(){this.internalSearch=null,i["a"].options.methods.clearableCallback.call(this)},genInput(){const e=o["a"].options.methods.genInput.call(this);return e.data=Object(a["a"])(e.data,{attrs:{"aria-activedescendant":Object(r["p"])(this.$refs.menu,"activeTile.id"),autocomplete:Object(r["p"])(e.data,"attrs.autocomplete","off")},domProps:{value:this.internalSearch}}),e},genInputSlot(){const e=i["a"].options.methods.genInputSlot.call(this);return e.data.attrs.role="combobox",e},genSelections(){return this.hasSlot||this.multiple?i["a"].options.methods.genSelections.call(this):[]},onClick(e){this.isInteractive&&(this.selectedIndex>-1?this.selectedIndex=-1:this.onFocus(),this.isAppendInner(e.target)||this.activateMenu())},onInput(e){if(this.selectedIndex>-1||!e.target)return;const t=e.target,n=t.value;t.value&&this.activateMenu(),this.multiple||""!==n||this.deleteCurrentItem(),this.internalSearch=n,this.badInput=t.validity&&t.validity.badInput},onKeyDown(e){const t=e.keyCode;!e.ctrlKey&&[r["x"].home,r["x"].end].includes(t)||i["a"].options.methods.onKeyDown.call(this,e),this.changeSelectedIndex(t)},onSpaceDown(e){},onTabDown(e){i["a"].options.methods.onTabDown.call(this,e),this.updateSelf()},onUpDown(e){e.preventDefault(),this.activateMenu()},selectItem(e){i["a"].options.methods.selectItem.call(this,e),this.setSearch()},setSelectedItems(){i["a"].options.methods.setSelectedItems.call(this),this.isFocused||this.setSearch()},setSearch(){this.$nextTick(()=>{this.multiple&&this.internalSearch&&this.isMenuActive||(this.internalSearch=!this.selectedItems.length||this.multiple||this.hasSlot?null:this.getText(this.selectedItem))})},updateSelf(){(this.searchIsDirty||this.internalValue)&&(this.multiple||this.valueComparator(this.internalSearch,this.getValue(this.internalValue))||this.setSearch())},hasItem(e){return this.selectedValues.indexOf(this.getValue(e))>-1},onCopy(e){var t,n;if(-1===this.selectedIndex)return;const i=this.selectedItems[this.selectedIndex],o=this.getText(i);null===(t=e.clipboardData)||void 0===t||t.setData("text/plain",o),null===(n=e.clipboardData)||void 0===n||n.setData("text/vnd.vuetify.autocomplete.item+plain",o),e.preventDefault()}}})},c7f8:function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},cbdb:function(e,t,n){"use strict";var i=n("3a0b");e.exports=i.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,a,r){var s=[];s.push(e+"="+encodeURIComponent(t)),i.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),i.isString(o)&&s.push("path="+o),i.isString(a)&&s.push("domain="+a),!0===r&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},cc8f:function(e,t,n){"use strict";var i=n("3a0b");e.exports=function(e){return i.isObject(e)&&!0===e.isAxiosError}},cca1:function(e,t,n){"use strict";var i=n("c6a6"),o=n("b0af"),a=n("132d"),r=n("da13"),s=n("490a"),l=n("90a2"),c=function(){var e=this,t=e._self._c;return t(i["a"],{attrs:{"hide-selected":"",dense:"",autofocus:"","item-text":"name","item-value":"name",placeholder:"Outcome name",outlined:e.outlined,disabled:e.disabled,items:e.availableDispositionTemplates,loading:"loading"===e.apiState,"menu-props":{bottom:!0,offsetY:!0,nudgeBottom:"4px",maxHeight:"200px"},"return-object":"","search-input":e.search},on:{"update:searchInput":function(t){e.search=t},"update:search-input":[function(t){e.search=t},e.searchDebounced],keypress:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.$emit("add-disposition",{name:e.search,sentiment:e.sentiment})},input:function(t){return e.$emit("add-disposition",t)}},scopedSlots:e._u([{key:"append",fn:function(){return[e.searchLoading?t(s["a"],{attrs:{indeterminate:"",size:"18",width:"2",color:"primary"}}):t("span",[e._v(" ")])]},proxy:!0},{key:"no-data",fn:function(){return["error"===e.apiState?t(r["a"],{staticClass:"text-body-2"},[e._v(" Unable to load outcomes ")]):e.search?t(r["a"],[t("span",{staticClass:"text-body-2"},[e._v(" Press "),t("kbd",[e._v("enter")]),e._v(" to create "),t(a["a"],{attrs:{small:""}},[e._v("mdi-flag-checkered")]),e._v(e._s(e.search)+". ")],1)]):t(r["a"],[t("span",{staticClass:"text-body-2"},[e._v(" Enter name and press "),t("kbd",[e._v("enter")]),e._v(" to create outcome. ")])])]},proxy:!0},{key:"append-item",fn:function(){return[e.pageLoading?t("div",{staticClass:"w-100 d-flex align-center justify-center"},[t(s["a"],{attrs:{indeterminate:"",size:"18",width:"2",color:"primary"}})],1):t(o["a"],{directives:[{def:l["a"],name:"intersect",rawName:"v-intersect.quiet",value:e.getNextPage,expression:"getNextPage",modifiers:{quiet:!0}}],attrs:{height:"1"}})]},proxy:!0}]),model:{value:e.selectedDisposition,callback:function(t){e.selectedDisposition=t},expression:"selectedDisposition"}})},u=[],d=n("2f62"),p=n("5c97");const h=n("8718"),f=n("b047c"),m=n("a125");var v={props:{value:{type:Object},disabled:{type:Boolean},outlined:{type:Boolean},sentiment:{type:String}},data(){return{search:"",searchLoading:!1,pageLoading:!1,page:1,lastPage:2,dispositionTemplates:[],apiState:null}},methods:{getNextPage(e,t,n){this.dispositionTemplates.length&&n&&this.page<this.lastPage&&(this.page++,this.pageLoading=!0,this.fetchDispositionTemplates({page:this.page}))},searchDebounced:f((function(e){this.searchLoading=!0,this.page=1,this.fetchDispositionTemplates({searchByName:e,page:this.page})}),300),fetchDispositionTemplates(e){Object(p["c"])({...e,sentiment:this.sentiment}).then(e=>{this.searchLoading=!1,this.pageLoading=!1,this.lastPage=e.pagination.lastPage,this.dispositionTemplates=h(this.dispositionTemplates,e.data,"id")})}},computed:{...Object(d["c"])("drive",["dispositions"]),selectedDisposition:{get(){return this.value},set(e){this.$emit("input",e)}},availableDispositionTemplates(){return m(this.dispositionTemplates,this.dispositions,"name")}},created(){this.fetchDispositionTemplates()}},g=v,y=n("2877"),b=Object(y["a"])(g,c,u,!1,null,null,null);t["a"]=b.exports},d043:function(e,t,n){e.exports=n.p+"img/empty-inbox-illustration.e3bc0dfe.svg"},d640:function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e._self._c;return e.timezone&&!e.prospectFirstName&&e.currentLocalTime?t("div",{staticClass:"d-flex flex-column",class:{"align-center":e.center}},[t("time-of-day",{attrs:{time:e.currentLocalTime}}),t("div",{staticClass:"text-caption"},[e._v(" "+e._s(e.timezone)+" ")])],1):e.timezone&&e.prospectFirstName&&e.currentLocalTime?t("div",{staticClass:"d-flex align-center"},[t("time-of-day",{attrs:{time:e.currentLocalTime}}),t("span",{staticClass:"text-caption grey--text text--darken-3"},[e._v(" for "+e._s(e.prospectFirstName)+" ("+e._s(e.timezone)+") ")])],1):e.prospectFirstName?e._e():t("span",{staticClass:"font-weight-light font-italic text-caption"},[e._v(" "+e._s("No Time Zone")+" ")])},o=[],a=n("3515"),r=n("1315"),s=n("2b0e");const l=s["default"].observable({browserTime:null,clockStarted:!1}),c={initClock:()=>{l.clockStarted||(l.clockStarted=!0,p())}},u={browserTime:()=>l.browserTime,clockMinuteInteger:()=>{var e;return null===(e=l.browserTime)||void 0===e?void 0:e.minute}},d=()=>{l.browserTime=r["DateTime"].now()},p=()=>{setInterval(()=>{d()},1e3)};var h=n("e9f8"),f={components:{TimeOfDay:a["a"]},props:{timezone:{type:String},center:{type:Boolean,default:!1},prospectFirstName:{type:String},noMargin:{type:Boolean,default:!1}},data:()=>({currentLocalTime:""}),computed:{...u,timeOfDayIcon(){const[e,t]=[this.currentLocalTime.split(":")[0],this.currentLocalTime.split(" ")[1]],n="AM"==t?parseInt(e):parseInt(e)+12;return n>=8&&n<18?"mdi-weather-sunny":"mdi-weather-night"}},methods:{...c,setCurrentLocalTime(){this.timezone&&(this.currentLocalTime=Object(h["n"])(this.timezone))}},watch:{clockMinuteInteger(e,t){e!==t&&this.setCurrentLocalTime()}},created(){this.setCurrentLocalTime(),this.initClock()},updated(){this.setCurrentLocalTime()}},m=f,v=n("2877"),g=Object(v["a"])(m,i,o,!1,null,null,null);t["default"]=g.exports},d66a4:function(e,t,n){"use strict";n("a77c")},daaa:function(e,t,n){e.exports=n("6339")},df61:function(e,t,n){"use strict";var i=n("8336"),o=n("b0af"),a=n("99d9"),r=n("ac7c"),s=n("cc20"),l=n("132d"),c=n("2fa4"),u=n("3a2f"),d=function(){var e=this,t=e._self._c;return t(o["a"],{class:e.containerClass},[e.hideTitle?e._e():t(a["d"],{staticClass:"d-flex align-center"},[t("div",{staticClass:"d-flex flex-column"},[t("div",[e._v("Personalize fields")]),t("div",{staticClass:"text-body-2"},[e._v(" Show/hide fields you want to see on prospect card ")])]),t(c["a"]),t(r["a"],{attrs:{label:"Hide All"},on:{change:e.hideAll}})],1),t(a["c"],[t("div",{staticClass:"text-xs"},[e._v(e._s(e.fieldToMerge))]),e.allowOrderingAndMerging?t("draggable",{attrs:{group:"fields"},model:{value:e.fields,callback:function(t){e.fields=t},expression:"fields"}},e._l(e.fields,(function(n,a){var r,d,p,h;return t("div",{key:a,staticClass:"d-flex align-center w-100"},[t(o["a"],{staticClass:"px-2 py-5 ma-2 d-flex align-center",class:n.mergedWith?"flex-grow-1":"w-100",attrs:{outlined:"",height:"70"},on:{click:function(t){return e.selectField(a)}}},[n.show?t(l["a"],{attrs:{color:"primary"}},[e._v(" mdi-checkbox-marked ")]):t(l["a"],{attrs:{color:"secondary"}},[e._v("mdi-checkbox-blank-outline")]),t("span",{staticClass:"ml-2"},[e._v(e._s(n.text))]),["emailAddresses","phoneNumbers"].includes(n.value)?e._e():[t(c["a"]),e.fieldToMerge?null!==(d=n.mergedWith)&&void 0!==d&&d.length?e._e():[n.value!==(null===(p=e.fieldToMerge)||void 0===p?void 0:p.value)?t(s["a"],{staticClass:"white--text",attrs:{small:"",label:"",color:"green"},on:{click:function(t){return t.stopPropagation(),e.mergeWith(n)}}},[e._v(" Merge ")]):t(s["a"],{staticClass:"white--text",attrs:{small:"",label:"",color:"red"},on:{click:function(t){t.stopPropagation(),e.fieldToMerge=null}}},[e._v(" Cancel merge ")])]:[null!==(r=n.mergedWith)&&void 0!==r&&r.length?t(u["a"],{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:o}){return[t(i["a"],e._g({attrs:{icon:"",small:""},on:{click:function(t){return t.stopPropagation(),e.unmergeField(n)}}},o),[t(l["a"],[e._v("mdi-set-split")])],1)]}}],null,!0)},[t("div",[t("div",{staticClass:"font-weight-bold"},[e._v("Remove merge.")]),t("div",[e._v(" This will remove the merge and cause this field to take a new line. ")])])]):t(u["a"],{attrs:{bottom:"","max-width":"300"},scopedSlots:e._u([{key:"activator",fn:function({on:o}){return[t(i["a"],e._g({attrs:{icon:"",small:""},on:{click:function(t){return t.stopPropagation(),e.selectFieldToMerge(n)}}},o),[t(l["a"],{attrs:{size:"17"}},[e._v("mdi-merge")])],1)]}}],null,!0)},[t("div",[t("div",{staticClass:"font-weight-bold"},[e._v("Merge with another row:")]),t("div",[e._v(" This lets you merge two rows into one, while keeping their values separate and displaying them together in a single row. ")])])]),t(l["a"],{staticClass:"drag-icon"},[e._v("mdi-drag-vertical")])]]],2),null!==(h=n.mergedWith)&&void 0!==h&&h.length?e._l(n.mergedWith,(function(n,r){return t(o["a"],{key:n.value,staticClass:"px-2 py-5 ma-2 d-flex align-center flex-grow-1",attrs:{outlined:"",height:"70"},on:{click:function(t){return e.selectMergedField(a,r)}}},[n.show?t(l["a"],{attrs:{color:"primary"}},[e._v("mdi-checkbox-marked")]):t(l["a"],{attrs:{color:"secondary"}},[e._v("mdi-checkbox-blank-outline")]),t("span",{staticClass:"ml-2"},[e._v(e._s(n.text))]),t(c["a"]),e.fieldToMerge?e._e():[t(u["a"],{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:o}){return[t(i["a"],e._g({attrs:{icon:"",small:""},on:{click:function(t){return t.stopPropagation(),e.unmergeField(n)}}},o),[t(l["a"],[e._v("mdi-set-split")])],1)]}}],null,!0)},[t("div",[t("div",{staticClass:"font-weight-bold"},[e._v("Remove merge.")]),t("div",[e._v(" This will remove the merge and cause this field to take a new line. ")])])]),t(l["a"],{staticClass:"drag-icon"},[e._v("mdi-drag-vertical")])]],2)})):e._e()],2)})),0):t("div",e._l(e.fields,(function(n,i){return t(o["a"],{key:i,staticClass:"px-2 py-5 ma-2 d-flex align-center",class:n.mergedWith?"flex-grow-1":"w-100",attrs:{outlined:"",height:"70"},on:{click:function(t){return e.selectField(i)}}},[n.show?t(l["a"],{attrs:{color:"primary"}},[e._v("mdi-checkbox-marked")]):t(l["a"],{attrs:{color:"secondary"}},[e._v("mdi-checkbox-blank-outline")]),t("span",{staticClass:"ml-2"},[e._v(e._s(n.text))])],1)})),1)],1)],1)},p=[],h=n("b76a"),f=n.n(h),m=n("2f62"),v={props:["value","configName","hideTitle","containerClass","allowOrderingAndMerging"],components:{draggable:f.a},data:()=>({fieldToMerge:null}),computed:{...Object(m["c"])("user",["getSettingByKey"]),fields:{get(){return this.value},set(e){this.$emit("input",e)}}},methods:{mergeWith(e){if(!this.fieldToMerge)return;const t=this.fields.findIndex(t=>t.value===e.value);if(-1!==t){const n={...e,mergedWith:[{...this.fieldToMerge}]};this.fields[t]=n,this.fields=this.fields.filter(e=>{var t;return e.value!==(null===(t=this.fieldToMerge)||void 0===t?void 0:t.value)}),this.fieldToMerge=null}},unmergeField(e){var t;if(null!==(t=e.mergedWith)&&void 0!==t&&t.length){const t=this.fields.findIndex(t=>t.value===e.value);if(-1===t)return;const n=[...e.mergedWith],i={...e,mergedWith:[]};this.fields=[...this.fields.slice(0,t),i,...n,...this.fields.slice(t+1)]}else{const t=this.fields.findIndex(t=>t.mergedWith&&t.mergedWith.some(t=>t.value===e.value));if(-1===t)return;const n={...this.fields[t],mergedWith:[]};this.fields=[...this.fields.slice(0,t),n,e,...this.fields.slice(t+1)]}},selectFieldToMerge(e){this.fieldToMerge=e},selectField(e){const t=this.fields[e];t.show=!t.show},selectMergedField(e,t){const n=this.fields[e].mergedWith[t];n.show=!n.show},hideAll(e){e?this.fields.forEach(e=>e.show=!1):this.fields=this.getSettingByKey(this.configName)}}},g=v,y=n("2877"),b=Object(y["a"])(g,d,p,!1,null,null,null);t["a"]=b.exports},e083:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i["throw"](e))}catch(t){a(t)}}function l(e){e.done?n(e.value):o(e.value).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=2&a[0]?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(s){a=[6,s],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=a(n("97e1")),s=a(n("0eff")),l=n("bd7c"),c=a(n("74e2")),u=a(n("7bf5")),d=a(n("eb86")),p=a(n("6c0b")),h=n("a4b5"),f=function(){function e(e,t,n){this.name=e,this.apiCall=t,this.configuration=n,this.individualDocuments={},this.individualOverrides={},this.individualSynonyms={},this.name=e,this.apiCall=t,this.configuration=n,this._documents=new s.default(this.name,this.apiCall,this.configuration),this._overrides=new c.default(this.name,this.apiCall),this._synonyms=new d.default(this.name,this.apiCall)}return e.prototype.retrieve=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.update=function(e){return i(this,void 0,void 0,(function(){return o(this,(function(t){return[2,this.apiCall.patch(this.endpointPath(),e)]}))}))},e.prototype.delete=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.apiCall.delete(this.endpointPath())]}))}))},e.prototype.exists=function(){return i(this,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.retrieve()];case 1:return t.sent(),[2,!0];case 2:if(e=t.sent(),e instanceof l.ObjectNotFound)return[2,!1];throw e;case 3:return[2]}}))}))},e.prototype.documents=function(e){return e?(void 0===this.individualDocuments[e]&&(this.individualDocuments[e]=new h.Document(this.name,e,this.apiCall)),this.individualDocuments[e]):this._documents},e.prototype.overrides=function(e){return void 0===e?this._overrides:(void 0===this.individualOverrides[e]&&(this.individualOverrides[e]=new u.default(this.name,e,this.apiCall)),this.individualOverrides[e])},e.prototype.synonyms=function(e){return void 0===e?this._synonyms:(void 0===this.individualSynonyms[e]&&(this.individualSynonyms[e]=new p.default(this.name,e,this.apiCall)),this.individualSynonyms[e])},e.prototype.endpointPath=function(){return"".concat(r.default.RESOURCEPATH,"/").concat(this.name)},e}();t.default=f},e1fc:function(e,t,n){(function(t){(function(t,n){e.exports=n()})(0,(function(){"use strict";const e=window.customElements.define.bind(window.customElements);function n(){}function i(e,t){for(const n in t)e[n]=t[n];return e}function o(e){return e&&"object"==typeof e&&"function"==typeof e.then}function a(e){return e()}function r(){return Object.create(null)}function s(e){e.forEach(a)}function l(e){return"function"==typeof e}function c(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}let u;function d(e,t){return u||(u=document.createElement("a")),u.href=t,e===u.href}function p(e,t){return e!=e?t==t:e!==t}function h(e){return 0===Object.keys(e).length}function f(e,...t){if(null==e)return n;const i=e.subscribe(...t);return i.unsubscribe?()=>i.unsubscribe():i}function m(e,t,n){e.$$.on_destroy.push(f(t,n))}function v(e){const t={};for(const n in e)"$"!==n[0]&&(t[n]=e[n]);return t}window.customElements.define=(t,...n)=>{if(!customElements.get(t))return e(t,...n)};let g,y=!1;function b(){y=!0}function w(){y=!1}function _(e,t,n,i){for(;e<t;){const o=e+(t-e>>1);n(o)<=i?e=o+1:t=o}return e}function x(e){if(e.hydrate_init)return;e.hydrate_init=!0;let t=e.childNodes;if("HEAD"===e.nodeName){const e=[];for(let n=0;n<t.length;n++){const i=t[n];void 0!==i.claim_order&&e.push(i)}t=e}const n=new Int32Array(t.length+1),i=new Int32Array(t.length);n[0]=-1;let o=0;for(let l=0;l<t.length;l++){const e=t[l].claim_order,a=(o>0&&t[n[o]].claim_order<=e?o+1:_(1,o,e=>t[n[e]].claim_order,e))-1;i[l]=n[a]+1;const r=a+1;n[r]=l,o=Math.max(r,o)}const a=[],r=[];let s=t.length-1;for(let l=n[o]+1;0!=l;l=i[l-1]){for(a.push(t[l-1]);s>=l;s--)r.push(t[s]);s--}for(;s>=0;s--)r.push(t[s]);a.reverse(),r.sort((e,t)=>e.claim_order-t.claim_order);for(let l=0,c=0;l<r.length;l++){for(;c<a.length&&r[l].claim_order>=a[c].claim_order;)c++;const t=c<a.length?a[c]:null;e.insertBefore(r[l],t)}}function k(e,t){e.appendChild(t)}function C(e,t){if(y){for(x(e),(void 0===e.actual_end_child||null!==e.actual_end_child&&e.actual_end_child.parentElement!==e)&&(e.actual_end_child=e.firstChild);null!==e.actual_end_child&&void 0===e.actual_end_child.claim_order;)e.actual_end_child=e.actual_end_child.nextSibling;t!==e.actual_end_child?(void 0!==t.claim_order||t.parentNode!==e)&&e.insertBefore(t,e.actual_end_child):e.actual_end_child=t.nextSibling}else(t.parentNode!==e||null!==t.nextSibling)&&e.appendChild(t)}function S(e,t,n){e.insertBefore(t,n||null)}function T(e,t,n){y&&!n?C(e,t):(t.parentNode!==e||t.nextSibling!=n)&&e.insertBefore(t,n||null)}function O(e){e.parentNode.removeChild(e)}function P(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function A(e){return document.createElement(e)}function E(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function N(e){return document.createTextNode(e)}function D(){return N(" ")}function j(){return N("")}function $(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function L(e){return function(t){return t.preventDefault(),e.call(this,t)}}function I(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function F(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function M(e,t){for(const n in t)F(e,n,t[n])}function R(e,t,n){t in e?e[t]="boolean"==typeof e[t]&&""===n||n:F(e,t,n)}function q(e){return Array.from(e.childNodes)}function B(e){void 0===e.claim_info&&(e.claim_info={last_index:0,total_claimed:0})}function z(e,t,n,i,o=!1){B(e);const a=(()=>{for(let i=e.claim_info.last_index;i<e.length;i++){const a=e[i];if(t(a)){const t=n(a);return void 0===t?e.splice(i,1):e[i]=t,o||(e.claim_info.last_index=i),a}}for(let i=e.claim_info.last_index-1;i>=0;i--){const a=e[i];if(t(a)){const t=n(a);return void 0===t?e.splice(i,1):e[i]=t,o?void 0===t&&e.claim_info.last_index--:e.claim_info.last_index=i,a}}return i()})();return a.claim_order=e.claim_info.total_claimed,e.claim_info.total_claimed+=1,a}function V(e,t,n,i){return z(e,e=>e.nodeName===t,e=>{const t=[];for(let i=0;i<e.attributes.length;i++){const o=e.attributes[i];n[o.name]||t.push(o.name)}t.forEach(t=>e.removeAttribute(t))},()=>i(t))}function U(e,t,n){return V(e,t,n,E)}function H(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function W(e,t,n,i){e.style.setProperty(t,n,i?"important":"")}function K(e,t,n){e.classList[n?"add":"remove"](t)}class G{constructor(){this.e=this.n=null}c(e){this.h(e)}m(e,t,n=null){this.e||(this.e=A(t.nodeName),this.t=t,this.c(e)),this.i(n)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.childNodes)}i(e){for(let t=0;t<this.n.length;t+=1)S(this.t,this.n[t],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(O)}}function Q(e){const t={};for(const n of e)t[n.name]=n.value;return t}function Y(e){g=e}function Z(){if(!g)throw new Error("Function called outside component initialization");return g}function J(e){Z().$$.before_update.push(e)}function X(e){Z().$$.on_mount.push(e)}const ee=[],te=[],ne=[],ie=[],oe=Promise.resolve();let ae=!1;function re(){ae||(ae=!0,oe.then(de))}function se(){return re(),oe}function le(e){ne.push(e)}const ce=new Set;let ue=0;function de(){const e=g;do{for(;ue<ee.length;){const e=ee[ue];ue++,Y(e),pe(e.$$)}for(Y(null),ee.length=0,ue=0;te.length;)te.pop()();for(let e=0;e<ne.length;e+=1){const t=ne[e];ce.has(t)||(ce.add(t),t())}ne.length=0}while(ee.length);for(;ie.length;)ie.pop()();ae=!1,ce.clear(),Y(e)}function pe(e){if(null!==e.fragment){e.update(),s(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(le)}}const he=new Set;let fe,me;function ve(){fe={r:0,c:[],p:fe}}function ge(){fe.r||s(fe.c),fe=fe.p}function ye(e,t){e&&e.i&&(he.delete(e),e.i(t))}function be(e,t,n,i){if(e&&e.o){if(he.has(e))return;he.add(e),fe.c.push(()=>{he.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}}function we(e,t){const n=t.token={};function i(e,i,o,a){if(t.token!==n)return;t.resolved=a;let r=t.ctx;void 0!==o&&(r=r.slice(),r[o]=a);const s=e&&(t.current=e)(r);let l=!1;t.block&&(t.blocks?t.blocks.forEach((e,n)=>{n!==i&&e&&(ve(),be(e,1,1,()=>{t.blocks[n]===e&&(t.blocks[n]=null)}),ge())}):t.block.d(1),s.c(),ye(s,1),s.m(t.mount(),t.anchor),l=!0),t.block=s,t.blocks&&(t.blocks[i]=s),l&&de()}if(o(e)){const n=Z();if(e.then(e=>{Y(n),i(t.then,1,t.value,e),Y(null)},e=>{if(Y(n),i(t.catch,2,t.error,e),Y(null),!t.hasCatch)throw e}),t.current!==t.pending)return i(t.pending,0),!0}else{if(t.current!==t.then)return i(t.then,1,t.value,e),!0;t.resolved=e}}function _e(e,t,n){const i=t.slice(),{resolved:o}=e;e.current===e.then&&(i[e.value]=o),e.current===e.catch&&(i[e.error]=o),e.block.p(i,n)}function xe(e,t){const n={},i={},o={$$scope:1};let a=e.length;for(;a--;){const r=e[a],s=t[a];if(s){for(const e in r)e in s||(i[e]=1);for(const e in s)o[e]||(n[e]=s[e],o[e]=1);e[a]=s}else for(const e in r)o[e]=1}for(const r in i)r in n||(n[r]=void 0);return n}function ke(e){e&&e.c()}function Ce(e,t,n,i){const{fragment:o,on_mount:r,on_destroy:c,after_update:u}=e.$$;o&&o.m(t,n),i||le(()=>{const t=r.map(a).filter(l);c?c.push(...t):s(t),e.$$.on_mount=[]}),u.forEach(le)}function Se(e,t){const n=e.$$;null!==n.fragment&&(s(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Te(e,t){-1===e.$$.dirty[0]&&(ee.push(e),re(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function Oe(e,t,i,o,a,l,c,u=[-1]){const d=g;Y(e);const p=e.$$={fragment:null,ctx:null,props:l,update:n,not_equal:a,bound:r(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(d?d.$$.context:[])),callbacks:r(),dirty:u,skip_bound:!1,root:t.target||d.$$.root};c&&c(p.root);let h=!1;if(p.ctx=i?i(e,t.props||{},(t,n,...i)=>{const o=i.length?i[0]:n;return p.ctx&&a(p.ctx[t],p.ctx[t]=o)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](o),h&&Te(e,t)),n}):[],p.update(),h=!0,s(p.before_update),p.fragment=!!o&&o(p.ctx),t.target){if(t.hydrate){b();const e=q(t.target);p.fragment&&p.fragment.l(e),e.forEach(O)}else p.fragment&&p.fragment.c();t.intro&&ye(e.$$.fragment),Ce(e,t.target,t.anchor,t.customElement),w(),de()}Y(d)}"function"==typeof HTMLElement&&(me=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(a).filter(l);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(e,t,n){this[e]=n}disconnectedCallback(){s(this.$$.on_disconnect)}$destroy(){Se(this,1),this.$destroy=n}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){this.$$set&&!h(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});class Pe{$destroy(){Se(this,1),this.$destroy=n}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){this.$$set&&!h(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Ae=[];function Ee(e,t){return{subscribe:Ne(e,t).subscribe}}function Ne(e,t=n){let i;const o=new Set;function a(t){if(c(e,t)&&(e=t,i)){const t=!Ae.length;for(const n of o)n[1](),Ae.push(n,e);if(t){for(let e=0;e<Ae.length;e+=2)Ae[e][0](Ae[e+1]);Ae.length=0}}}function r(t){a(t(e))}function s(r,s=n){const l=[r,s];return o.add(l),1===o.size&&(i=t(a)||n),r(e),()=>{o.delete(l),0===o.size&&(i(),i=null)}}return{set:a,update:r,subscribe:s}}function De(e,t,i){const o=!Array.isArray(e),a=o?[e]:e,r=t.length<2;return Ee(i,e=>{let i=!1;const c=[];let u=0,d=n;const p=()=>{if(u)return;d();const i=t(o?c[0]:c,e);r?e(i):d=l(i)?i:n},h=a.map((e,t)=>f(e,e=>{c[t]=e,u&=~(1<<t),i&&p()},()=>{u|=1<<t}));return i=!0,p(),function(){s(h),d()}})}function je(){return Ne({})}const $e=je();var Le=Object.defineProperty,Ie=Object.defineProperties,Fe=Object.getOwnPropertyDescriptors,Me=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable,Be=(e,t,n)=>t in e?Le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ze=(e,t)=>{for(var n in t||(t={}))Re.call(t,n)&&Be(e,n,t[n]);if(Me)for(var n of Me(t))qe.call(t,n)&&Be(e,n,t[n]);return e},Ve=(e,t)=>Ie(e,Fe(t));async function Ue(e){if(!e.ok){const t=await e.json().then(e=>e),n=new Error(t.message);return n.name=t.name,Promise.reject({message:n,statusCode:e.status})}return e.json()}function He(e={component_id:""}){return{method:e.method||"GET",headers:{Accept:"application/json","Content-Type":"application/json","X-Component-Id":e.component_id||"","X-Access-Token":e.access_token||""},body:e.body?JSON.stringify(e.body):void 0}}function We(e,t){throw console.error(t),$e.update(n=>Ve(ze({},n),{[e]:t})),t}const Ke={"001":"","002":"ireland-","003":"canada-"};function Ge(e){let t="";if("-"===e.substring(3,4)){const n=e.substring(0,3);"undefined"!=typeof Ke[n]&&(t=Ke[n])}return`https://${t}web-components.nylas.com/middleware`}function Qe(e){}const Ye=async(e,t,n)=>{const i=await fetch(`${Ge(e.component_id)}/contact-list/contacts?limit=${n}&offset=${t}`,He({component_id:e.component_id,access_token:e.access_token})).then(e=>Ue(e)).then(e=>e.response).catch(t=>We(e.component_id,t));return null!=i?i:[]},Ze=async e=>{const t=await fetch(`${Ge(e.component_id)}/contacts${e.query}`,He({component_id:e.component_id,access_token:e.access_token})).then(e=>Ue(e)).then(e=>e.response).catch(t=>We(e.component_id,t));return null!=t?t:[]},Je=async(e,t)=>await fetch(`${Ge(e.component_id)}/contacts/${t}/picture`,He({component_id:e.component_id,access_token:e.access_token})).then(e=>Ue(e)).then(e=>e.response).catch(t=>We(e.component_id,t)),Xe=(e,t,n)=>{let i=`${Ge(e.component_id)}/threads?view=expanded&not_in=trash&limit=${t}&offset=${n}`;return e.query&&Object.entries(e.query).forEach(e=>i=i.concat(`&${e[0]}=${e[1]}`)),fetch(i,He(e)).then(e=>Ue(e)).then(e=>e.response).catch(t=>We(e.component_id,t))};function et(e){let t=Ge(e.component_id)+"/threads?view=expanded&not_in=trash&view=count";return e.query&&Object.entries(e.query).forEach(e=>t=t.concat(`&${e[0]}=${e[1]}`)),e.keywordToSearch&&(t+="&q="+e.keywordToSearch),fetch(t,He(e)).then(e=>Ue(e)).then(e=>e.response.count)}const tt=e=>{const t=`${Ge(e.component_id)}/threads/search?q=${e.keywordToSearch}&view=expanded`;return fetch(t,He(e)).then(async e=>Ue(e)).then(e=>e.response).catch(t=>We(e.component_id,t))},nt=async e=>await fetch(`${Ge(e.component_id)}/threads/${e.thread_id}?view=expanded`,He({component_id:e.component_id,access_token:e.access_token})).then(e=>Ue(e)).then(e=>e.response).catch(t=>We(e.component_id,t)),it=(e,t)=>fetch(`${Ge(e.component_id)}/threads/${t.id}`,He({method:"PUT",component_id:e.component_id,access_token:e.access_token,body:{unread:t.unread,starred:t.starred,folder_id:t.folder_id,label_ids:t.label_ids}})).then(e=>Ue(e)).then(e=>e.response).catch(t=>We(e.component_id,t)),ot=async(e,t)=>await fetch(Ge(e)+"/manifest",He({access_token:t,component_id:e})).then(Ue).then(e=>e.component.theming).catch(t=>We(e,t)),at=async(e,t)=>{const n=`${Ge(e.component_id)}/messages/${t}`;return await fetch(n,He(e)).then(e=>Ue(e)).then(e=>e.response).catch(t=>We(e.component_id,t))},rt=async e=>{const t=`${Ge(e.component_id)}/messages/${e.message_id}`;return await fetch(t,He(e)).then(e=>Ue(e)).then(e=>e.response).catch(t=>We(e.component_id,t))},st=async e=>await fetch(Ge(e.component_id)+"/account",He(e)).then(e=>Ue(e)).then(e=>e.response).catch(t=>We(e.component_id,t)),lt=e=>fetch(Ge(e.component_id)+"/neural/conversation",He({method:"PUT",access_token:e.access_token,component_id:e.component_id,body:{message_id:e.message_id}})).then(async e=>(await Ue(e)).response).catch(t=>We(e.component_id,t));var ct=Object.defineProperty,ut=Object.getOwnPropertySymbols,dt=Object.prototype.hasOwnProperty,pt=Object.prototype.propertyIsEnumerable,ht=(e,t,n)=>t in e?ct(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ft=(e,t)=>{for(var n in t||(t={}))dt.call(t,n)&&ht(e,n,t[n]);if(ut)for(var n of ut(t))pt.call(t,n)&&ht(e,n,t[n]);return e};const mt=async e=>fetch(Ge(e.component_id)+"/calendars/availability",He({method:"POST",component_id:e.component_id,access_token:e.access_token,body:e.body})).then(async e=>{const t=await Ue(e);return t.response.time_slots=t.response.time_slots.map(e=>(e.start_time=e.start||0,e.end_time=e.end||0,delete e.start,delete e.end,e)),t.response}).catch(t=>We(e.component_id,t)),vt=async e=>fetch(Ge(e.component_id)+"/calendars/availability/consecutive",He({method:"POST",component_id:e.component_id,access_token:e.access_token,body:e.body})).then(async t=>{var n;let i=(null==(n=(await Ue(t)).response)?void 0:n.map(e=>(e=e.map(e=>(e.start_time=new Date(1e3*e.start_time),e.end_time=new Date(1e3*e.end_time),e)),e)))||[];const o=gt(i,e.body.events);return yt(o)}).catch(t=>We(e.component_id,t));function gt(e,t){return e.map(e=>e.map(e=>ft(ft({},e),t.find(t=>t.participantEmails.length===e.emails.length&&t.participantEmails.every(t=>e.emails.includes(t))))))}function yt(e){const t=new Set;return e.filter(e=>{const n=`${e[0].start_time}_${e[e.length-1].end_time}`;return!t.has(n)&&(t.add(n),!0)})}var bt=Object.defineProperty,wt=Object.getOwnPropertySymbols,_t=Object.prototype.hasOwnProperty,xt=Object.prototype.propertyIsEnumerable,kt=(e,t,n)=>t in e?bt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ct=(e,t)=>{for(var n in t||(t={}))_t.call(t,n)&&kt(e,n,t[n]);if(wt)for(var n of wt(t))xt.call(t,n)&&kt(e,n,t[n]);return e};function St(){const e=(e,n)=>{var i,o;const a=JSON.parse(n),r=Ct({},a);if(delete r.forceReload,n=JSON.stringify(r),a.component_id&&(null==(i=null==a?void 0:a.body)?void 0:i.start_time)&&(null==(o=null==a?void 0:a.body)?void 0:o.end_time)){if(!e[n]||a.forceReload){const i=mt(a);t.update(e=>(e[n]=i,e)),e[n]=i}return e[n]}},t=Ne(new Proxy({},{get:e}));return t}St();var Tt=Object.defineProperty,Ot=Object.getOwnPropertySymbols,Pt=Object.prototype.hasOwnProperty,At=Object.prototype.propertyIsEnumerable,Et=(e,t,n)=>t in e?Tt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nt=(e,t)=>{for(var n in t||(t={}))Pt.call(t,n)&&Et(e,n,t[n]);if(Ot)for(var n of Ot(t))At.call(t,n)&&Et(e,n,t[n]);return e};function Dt(){const e=(e,n)=>{var i,o;const a=JSON.parse(n),r=Nt({},a);if(delete r.forceReload,n=JSON.stringify(r),a.component_id&&(null==(i=null==a?void 0:a.body)?void 0:i.start_time)&&(null==(o=null==a?void 0:a.body)?void 0:o.end_time)){if(!e[n]||a.forceReload){const i=vt(a);t.update(e=>(e[n]=i,e)),e[n]=i}return e[n]}},t=Ne(new Proxy({},{get:e}));return t}Dt();var jt=Object.defineProperty,$t=Object.getOwnPropertySymbols,Lt=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable,Ft=(e,t,n)=>t in e?jt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mt=(e,t)=>{for(var n in t||(t={}))Lt.call(t,n)&&Ft(e,n,t[n]);if($t)for(var n of $t(t))It.call(t,n)&&Ft(e,n,t[n]);return e};let Rt={};function qt(e){return e.filter(e=>!!e.given_name||!!e.surname||Array.isArray(e.emails)&&e.emails.length>0).map(e=>((!Array.isArray(e.emails)||0===e.emails.length)&&(e.emails=[{email:""}]),e))}function Bt(){const{subscribe:e,set:t,update:n}=Ne({});return{subscribe:e,addContacts:async(e,t,i)=>{var o;const a=JSON.stringify(e);if(!Rt[a]&&(e.component_id||e.access_token)){0===t&&zt.reset();const r=null!=(o=await Ye(e,t,i).then(e=>qt(e)).catch(()=>[]))?o:[];return Rt[a]=Rt[a]?[...Rt[a],...r]:r,n(e=>(e[a]=Rt[a],Mt({},e))),Rt[a]}},addContact:async e=>{var t;const i=JSON.stringify(e);if(!Rt[i]&&(e.component_id||e.access_token)){const o=null!=(t=await Ze(e).then(e=>qt(e)).catch(()=>[]))?t:[];Rt[i]=Rt[i]?[...Rt[i],...o]:o,n(e=>(e[i]=Rt[i],Mt({},e)))}return Rt[i]},reset:()=>{Rt={},t({})}}}const zt=Bt(),Vt={};function Ut(){const{subscribe:e,set:t}=Ne({});return{subscribe:e,getContactAvatar:async(e,t,n=!1)=>{if(!Vt[t]||n){const n=await Je(e,t).then(e=>e).catch(()=>"");n&&(Vt[t]=n)}return Vt[t]},reset:()=>t({})}}const Ht=Ut();var Wt=Object.defineProperty,Kt=Object.getOwnPropertySymbols,Gt=Object.prototype.hasOwnProperty,Qt=Object.prototype.propertyIsEnumerable,Yt=(e,t,n)=>t in e?Wt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zt=(e,t)=>{for(var n in t||(t={}))Gt.call(t,n)&&Yt(e,n,t[n]);if(Kt)for(var n of Kt(t))Qt.call(t,n)&&Yt(e,n,t[n]);return e};async function Jt(e){const t=[];for(let n=0;n<e;n++)t.push({isLoaded:!1,threads:[]});return t}function Xt(){const{subscribe:e,set:t,update:n}=Ne({});let i,o={};return{subscribe:e,set:t,getThreads:async(e,t,a,r=!1)=>{const s=JSON.stringify(e);if(!e.component_id&&!e.access_token)return[];if(void 0===i||r){const t=await et(e).catch(Qe);t&&(i=t)}if(!Array.isArray(o[s])||r){const e=Math.ceil(i/a);o[s]=await Jt(e)}if("undefined"==typeof o[s][t])return[];if(!o[s][t].isLoaded){const n=await Xe(e,a,t*a).catch(Qe);n&&(o[s][t].threads=n,o[s][t].isLoaded=!0)}return n(e=>(e[s]=o[s],Zt({},e))),o[s][t].threads},getNumberOfItems:async e=>{if(!e.component_id&&!e.access_token)return 0;if("undefined"==typeof i){const t=await et(e).catch(Qe);t&&(i=t)}return i},getThreadsWithSearchKeyword:async(e,t=!1)=>{if(!e.component_id&&!e.access_token)return[];const i=JSON.stringify(e);if((!Array.isArray(o[i])||t)&&(o[i]=await Jt(1)),!o[i][0].isLoaded||t){const t=await tt(e).catch(Qe);t&&(o[i][0].threads=t,o[i][0].isLoaded=!0)}return n(e=>(e[i]=o[i],Zt({},e))),o[i][0].threads},updateThread:async(e,t,i,a,r)=>{const s=await it(e,i).catch(Qe);if(!o[t][a].isLoaded){const e=await Xe(JSON.parse(t),r,a*r).catch(Qe);e&&(o[t][a].threads=e,o[t][a].isLoaded=!0)}return o[t][a].threads=o[t][a].threads.map(e=>(s&&e.id===s.id&&(e=Object.assign(e,s)),e)),n(e=>(e[t]=o[t],Zt({},e))),o[t][a].threads},updateThreadSelection:(e,t,i)=>{const a=o[e][t].threads;if(i){const e=a.find(e=>e.id===i);e&&(e.selected=!e.selected)}else{const e=a.some(e=>e.selected);for(const t of a)t.selected=!e}return n(t=>(t[e]=o[e],Zt({},t))),o[e][t].threads},reset:()=>{o={},t({})},hydrateMessageInThread:(e,t,i)=>{var a,r,s;const l=JSON.stringify(t),c=null==(r=null==(a=o[l][i])?void 0:a.threads)?void 0:r.find(t=>t.id===e.thread_id);if(c){const t=null==(s=c.messages)?void 0:s.find(t=>t.id===e.id);t&&(t.body=e.body,n(t=>{if(e.thread_id){let e=t[l][i].threads.find(e=>e.id===c.id);e&&(e=JSON.parse(JSON.stringify(c)))}return Zt({},t)}))}return o[l][i].threads}}}const en=Xt(),tn=De(en,e=>{const t={};return Object.entries(e).forEach(([e,n])=>t[e]=n.map(e=>e.threads).flat()),t});function nn(){const e=(e,n)=>{const i=JSON.parse(n);if(i.component_id){if(!e[n]){const o=ot(i.component_id,i.access_token);t.update(e=>(e[n]=o,e)),e[n]=o}return e[n]}},t=Ne(new Proxy({},{get:e}));return t}const on=nn(),an=async e=>{let t=`${Ge(e.component_id)}/files/${e.file_id}/download`;return await fetch(t,He(e)).then(e=>Ue(e)).then(e=>e.response).catch(t=>We(e.component_id,t))};var rn=Object.defineProperty,sn=Object.getOwnPropertySymbols,ln=Object.prototype.hasOwnProperty,cn=Object.prototype.propertyIsEnumerable,un=(e,t,n)=>t in e?rn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dn=(e,t)=>{for(var n in t||(t={}))ln.call(t,n)&&un(e,n,t[n]);if(sn)for(var n of sn(t))cn.call(t,n)&&un(e,n,t[n]);return e};function pn(){const{subscribe:e,set:t,update:n}=Ne({}),i={};return{subscribe:e,getFilesForMessage:async(e,t)=>{if(!i[e.id]){const o={};for(const n of e.files.values())("inline"===n.content_disposition||n.content_id)&&!o[n.id]&&(o[n.id]=n,o[n.id].data=await an({file_id:n.id,component_id:t.component_id,access_token:t.access_token}));i[e.id]=o,n(t=>(t[e.id]=o,dn({},t)))}return i[e.id]},hasInlineFiles:e=>{var t;return null==(t=null==e?void 0:e.files)?void 0:t.some(e=>"inline"===e.content_disposition||e.content_id)},reset:()=>t({})}}const hn=pn();function fn(e){return(t,n)=>{e.dispatchEvent&&e.dispatchEvent(new CustomEvent(t,{detail:n,composed:!0}))}}function mn(e,t,n){return new Proxy(e,{get:(e,i)=>"toString"===i||"toJSON"===i?()=>JSON.stringify(e):void 0!==Reflect.get(e,i)?vn(Reflect.get(e,i),n[i]):t&&i in t?vn(t[i],n[i]):n[i],ownKeys:e=>{const i=new Set([...Reflect.ownKeys(e),...Object.keys(t),...Object.keys(n)]);return Array.from(i)},getOwnPropertyDescriptor:(e,i)=>{var o,a;let r=Reflect.getOwnPropertyDescriptor(e,i);return r||(r=null!=(a=null!=(o=t&&Object.getOwnPropertyDescriptor(t,i))?o:n&&Object.getOwnPropertyDescriptor(n,i))?a:{configurable:!0,enumerable:!0,writable:!0},Reflect.defineProperty(e,i,r)),r}})}function vn(e,t){if(e){if("boolean"==typeof t)return gn(e);if("number"==typeof t)return Number(e);if(t instanceof Date)return new Date(e)}return void 0===e?null!=t?t:null:e}function gn(e){return[!0,"true","1"].includes(e)}function yn(e,t){var n;const i=Uint8Array.from(atob(e),e=>e.charCodeAt(0)),o=new Blob([i],{type:t.content_type}),a=window.URL.createObjectURL(o),r=document.createElement("a");r.href=a,r.download=null!=(n=t.filename)?n:t.id,r.target="_blank",r.click(),r.remove()}function bn(e){let t,n,i,o,a,r;function s(e,t){return"HostDomainNotAllowedError"===e[2]?_n:"IncompatibleProperties"===e[2]?wn:void 0}let l=s(e),c=l&&l(e);return{c(){var s,l;t=A("div"),c&&c.c(),n=D(),i=A("span"),i.textContent="Debug info:",o=D(),a=A("textarea"),F(i,"class","details"),F(a,"class","details"),a.readOnly=!0,a.value=r="\n      "+e[2]+": "+e[0]+"\n      "+(null!=(l=null==(s=e[1].message)?void 0:s.message)?l:"")+"\n    ",F(t,"class","message-container")},m(e,r){S(e,t,r),c&&c.m(t,null),k(t,n),k(t,i),k(t,o),k(t,a)},p(e,i){var o,u;l===(l=s(e))&&c?c.p(e,i):(c&&c.d(1),c=l&&l(e),c&&(c.c(),c.m(t,n))),7&i&&r!==(r="\n      "+e[2]+": "+e[0]+"\n      "+(null!=(u=null==(o=e[1].message)?void 0:o.message)?u:"")+"\n    ")&&(a.value=r)},d(e){e&&O(t),c&&c.d()}}}function wn(e){let t;return{c(){t=A("h3"),t.textContent="Your component properties do not work with each other."},m(e,n){S(e,t,n)},p:n,d(e){e&&O(t)}}}function _n(e){let t,i,o,a,r,s;return{c(){t=A("h3"),i=N("You are trying to access this component from \n        "),o=A("code"),o.textContent=""+window.location.hostname,a=N(". The component's settings do not\n        allow access from this domain."),r=D(),s=A("h4"),s.innerHTML='The list of allowed domains can be modified in your \n        <a href="https://dashboard.nylas.com">Dashboard</a>.'},m(e,n){S(e,t,n),k(t,i),k(t,o),k(t,a),S(e,r,n),S(e,s,n)},p:n,d(e){e&&O(t),e&&O(r),e&&O(s)}}}function xn(e){let t,i=e[2]&&e[3]&&bn(e);return{c(){i&&i.c(),t=j(),this.c=n},m(e,n){i&&i.m(e,n),S(e,t,n)},p(e,[n]){e[2]&&e[3]?i?i.p(e,n):(i=bn(e),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},i:n,o:n,d(e){i&&i.d(e),e&&O(t)}}}function kn(e,t,n){let i;var o,a,r,s;m(e,$e,e=>n(8,i=e));let l,c,{id:u}=t;const d=window.location.href.includes("localhost")||window.location.href.includes("127.0.0.1");return e.$$set=e=>{"id"in e&&n(0,u=e.id)},e.$$.update=()=>{499&e.$$.dirty&&(n(1,l=null!==n(4,o=i[u])&&void 0!==o?o:{name:""}),n(2,c=null!==n(7,s=null!==n(5,a=l.name)&&void 0!==a?a:null===n(6,r=l.message)||void 0===r?void 0:r.name)&&void 0!==s?s:""))},[u,l,c,d,o,a,r,s,i]}class Cn extends me{constructor(e){super(),this.shadowRoot.innerHTML="<style>.message-container{background:#fff6f6;border-radius:5px;box-shadow:0 0 0 1px #aa92a0 inset, 0 0 0 0 transparent;color:#9f3a38;font-size:1.25rem;padding:10px;margin:0 auto;transition:opacity 500ms ease, color 500ms ease,\n      background-color 500ms ease, box-shadow 500ms ease,\n      -webkit-box-shadow 500ms ease}.message-container *:focus{outline:5px auto Highlight;outline:5px auto -webkit-focus-ring-color}.details{color:#494949;font-size:0.75rem;width:100%}</style>",Oe(this,{target:this.shadowRoot,props:Q(this.attributes),customElement:!0},kn,xn,p,{id:0},null),e&&(e.target&&S(e.target,this,e.anchor),e.props&&(this.$set(e.props),de()))}static get observedAttributes(){return["id"]}get id(){return this.$$.ctx[0]}set id(e){this.$$set({id:e}),de()}}function Sn(e){let t,o,a=[{width:"17"},{height:"16"},{viewBox:"0 0 17 16"},{fill:"none"},{xmlns:"http://www.w3.org/2000/svg"},e[0]],r={};for(let n=0;n<a.length;n+=1)r=i(r,a[n]);return{c(){t=E("svg"),o=E("path"),this.h()},l(e){t=U(e,"svg",{width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0});var n=q(t);o=U(n,"path",{d:!0,stroke:!0,"stroke-miterlimit":!0}),q(o).forEach(O),n.forEach(O),this.h()},h(){F(o,"d","M11.1666 6.66666L8.50094 9.48258L5.83331 6.66666"),F(o,"stroke","#8d94a5"),F(o,"stroke-miterlimit","10"),M(t,r)},m(e,n){T(e,t,n),C(t,o)},p(e,[n]){M(t,r=xe(a,[{width:"17"},{height:"16"},{viewBox:"0 0 17 16"},{fill:"none"},{xmlns:"http://www.w3.org/2000/svg"},1&n&&e[0]]))},i:n,o:n,d(e){e&&O(t)}}}function Tn(e,t,n){return e.$$set=e=>{n(0,t=i(i({},t),v(e)))},t=v(t),[t]}customElements.define("nylas-error",Cn);class On extends Pe{constructor(e){super(),Oe(this,e,Tn,Sn,c,{})}}function Pn(e){let t,o,a=[{width:"11"},{height:"13"},{viewBox:"0 0 11 13"},{fill:"none"},{xmlns:"http://www.w3.org/2000/svg"},e[0]],r={};for(let n=0;n<a.length;n+=1)r=i(r,a[n]);return{c(){t=E("svg"),o=E("path"),this.h()},l(e){t=U(e,"svg",{width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0});var n=q(t);o=U(n,"path",{d:!0,fill:!0}),q(o).forEach(O),n.forEach(O),this.h()},h(){F(o,"d","M0.75 11.375C0.75 12.0078 1.24219 12.5 1.875 12.5H8.625C9.23438 12.5 9.75 12.0078 9.75 11.375V3.5H0.75V11.375ZM7.125 5.375C7.125 5.1875 7.28906 5 7.5 5C7.6875 5 7.875 5.1875 7.875 5.375V10.625C7.875 10.8359 7.6875 11 7.5 11C7.28906 11 7.125 10.8359 7.125 10.625V5.375ZM4.875 5.375C4.875 5.1875 5.03906 5 5.25 5C5.4375 5 5.625 5.1875 5.625 5.375V10.625C5.625 10.8359 5.4375 11 5.25 11C5.03906 11 4.875 10.8359 4.875 10.625V5.375ZM2.625 5.375C2.625 5.1875 2.78906 5 3 5C3.1875 5 3.375 5.1875 3.375 5.375V10.625C3.375 10.8359 3.1875 11 3 11C2.78906 11 2.625 10.8359 2.625 10.625V5.375ZM10.125 1.25H7.3125L7.07812 0.828125C6.98438 0.640625 6.79688 0.5 6.58594 0.5H3.89062C3.67969 0.5 3.49219 0.640625 3.39844 0.828125L3.1875 1.25H0.375C0.164062 1.25 0 1.4375 0 1.625V2.375C0 2.58594 0.164062 2.75 0.375 2.75H10.125C10.3125 2.75 10.5 2.58594 10.5 2.375V1.625C10.5 1.4375 10.3125 1.25 10.125 1.25Z"),F(o,"fill","#6A7285"),M(t,r)},m(e,n){T(e,t,n),C(t,o)},p(e,[n]){M(t,r=xe(a,[{width:"11"},{height:"13"},{viewBox:"0 0 11 13"},{fill:"none"},{xmlns:"http://www.w3.org/2000/svg"},1&n&&e[0]]))},i:n,o:n,d(e){e&&O(t)}}}function An(e,t,n){return e.$$set=e=>{n(0,t=i(i({},t),v(e)))},t=v(t),[t]}class En extends Pe{constructor(e){super(),Oe(this,e,An,Pn,c,{})}}function Nn(e){let t,o,a=[{width:"12"},{height:"13"},{viewBox:"0 0 12 13"},{fill:"none"},{xmlns:"http://www.w3.org/2000/svg"},e[0]],r={};for(let n=0;n<a.length;n+=1)r=i(r,a[n]);return{c(){t=E("svg"),o=E("path"),this.h()},l(e){t=U(e,"svg",{width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0});var n=q(t);o=U(n,"path",{d:!0,fill:!0}),q(o).forEach(O),n.forEach(O),this.h()},h(){F(o,"d","M4.125 5.5625H7.875C8.0625 5.5625 8.25 5.39844 8.25 5.1875V4.8125C8.25 4.625 8.0625 4.4375 7.875 4.4375H4.125C3.91406 4.4375 3.75 4.625 3.75 4.8125V5.1875C3.75 5.39844 3.91406 5.5625 4.125 5.5625ZM3.75 7.4375C3.75 7.64844 3.91406 7.8125 4.125 7.8125H7.875C8.0625 7.8125 8.25 7.64844 8.25 7.4375V7.0625C8.25 6.875 8.0625 6.6875 7.875 6.6875H4.125C3.91406 6.6875 3.75 6.875 3.75 7.0625V7.4375ZM6 10.2969C5.60156 10.2969 5.22656 10.1797 4.89844 9.92188L0 6.38281V11.375C0 12.0078 0.492188 12.5 1.125 12.5H10.875C11.4844 12.5 12 12.0078 12 11.375V6.38281L7.07812 9.92188C6.75 10.1797 6.375 10.2969 6 10.2969ZM11.5547 4.32031C11.3438 4.17969 11.1562 4.01562 10.875 3.80469V2.75C10.875 2.14062 10.3594 1.625 9.75 1.625H7.92188C7.85156 1.57812 7.78125 1.53125 7.71094 1.48438C7.3125 1.20312 6.53906 0.5 6 0.5C5.4375 0.5 4.66406 1.20312 4.26562 1.48438C4.19531 1.53125 4.125 1.57812 4.05469 1.625H2.25C1.61719 1.625 1.125 2.14062 1.125 2.75V3.80469C0.820312 4.01562 0.632812 4.17969 0.421875 4.32031C0.164062 4.53125 0 4.85938 0 5.21094V5.46875L2.25 7.08594V2.75H9.75V7.08594L12 5.46875V5.21094C12 4.85938 11.8359 4.55469 11.5547 4.32031Z"),F(o,"fill","#6A7285"),M(t,r)},m(e,n){T(e,t,n),C(t,o)},p(e,[n]){M(t,r=xe(a,[{width:"12"},{height:"13"},{viewBox:"0 0 12 13"},{fill:"none"},{xmlns:"http://www.w3.org/2000/svg"},1&n&&e[0]]))},i:n,o:n,d(e){e&&O(t)}}}function Dn(e,t,n){return e.$$set=e=>{n(0,t=i(i({},t),v(e)))},t=v(t),[t]}class jn extends Pe{constructor(e){super(),Oe(this,e,Dn,Nn,c,{})}}function $n(e){let t,o,a=[{width:"12"},{height:"9"},{viewBox:"0 0 12 9"},{fill:"none"},{xmlns:"http://www.w3.org/2000/svg"},e[0]],r={};for(let n=0;n<a.length;n+=1)r=i(r,a[n]);return{c(){t=E("svg"),o=E("path"),this.h()},l(e){t=U(e,"svg",{width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0});var n=q(t);o=U(n,"path",{d:!0,fill:!0}),q(o).forEach(O),n.forEach(O),this.h()},h(){F(o,"d","M11.7656 2.97656C11.2266 3.39844 10.5469 3.91406 8.15625 5.64844C7.6875 6 6.82031 6.77344 6 6.77344C5.15625 6.77344 4.3125 6 3.82031 5.64844C1.42969 3.91406 0.75 3.39844 0.210938 2.97656C0.117188 2.90625 0 2.97656 0 3.09375V7.875C0 8.50781 0.492188 9 1.125 9H10.875C11.4844 9 12 8.50781 12 7.875V3.09375C12 2.97656 11.8594 2.90625 11.7656 2.97656ZM6 6C6.53906 6.02344 7.3125 5.32031 7.71094 5.03906C10.8281 2.78906 11.0625 2.57812 11.7656 2.01562C11.9062 1.92188 12 1.75781 12 1.57031V1.125C12 0.515625 11.4844 0 10.875 0H1.125C0.492188 0 0 0.515625 0 1.125V1.57031C0 1.75781 0.0703125 1.92188 0.210938 2.01562C0.914062 2.57812 1.14844 2.78906 4.26562 5.03906C4.66406 5.32031 5.4375 6.02344 6 6Z"),F(o,"fill","#6A7285"),M(t,r)},m(e,n){T(e,t,n),C(t,o)},p(e,[n]){M(t,r=xe(a,[{width:"12"},{height:"9"},{viewBox:"0 0 12 9"},{fill:"none"},{xmlns:"http://www.w3.org/2000/svg"},1&n&&e[0]]))},i:n,o:n,d(e){e&&O(t)}}}function Ln(e,t,n){return e.$$set=e=>{n(0,t=i(i({},t),v(e)))},t=v(t),[t]}class In extends Pe{constructor(e){super(),Oe(this,e,Ln,$n,c,{})}}function Fn(e){let t,o,a,r,s=[{width:"17"},{height:"16"},{xmlns:"http://www.w3.org/2000/svg"},{"xmlns:xlink":"http://www.w3.org/1999/xlink"},{x:"0px"},{y:"0px"},{viewBox:"0 0 511.36 511.36"},{style:"enable-background:new 0 0 511.36 511.36;"},{"xml:space":"preserve"},e[0]],l={};for(let n=0;n<s.length;n+=1)l=i(l,s[n]);return{c(){t=E("svg"),o=E("g"),a=E("g"),r=E("path"),this.h()},l(e){t=U(e,"svg",{width:!0,height:!0,xmlns:!0,"xmlns:xlink":!0,x:!0,y:!0,viewBox:!0,style:!0,"xml:space":!0});var n=q(t);o=U(n,"g",{});var i=q(o);a=U(i,"g",{});var s=q(a);r=U(s,"path",{d:!0}),q(r).forEach(O),s.forEach(O),i.forEach(O),n.forEach(O),this.h()},h(){F(r,"d","M454.827,35.2c-46.933-46.933-122.027-46.933-168.96,0L63.147,258.773c-3.413,3.413-3.413,8.533,0,11.947\r\n\t\t\ts8.533,3.413,11.947,0l222.72-223.573c40.107-40.107,104.96-40.107,145.067,0c40.107,40.107,40.107,104.96,0,145.067\r\n\t\t\tL162.133,472.96c-28.16,28.16-74.24,28.16-102.4,0c-28.16-28.16-28.16-74.24,0-102.4l226.133-226.987\r\n\t\t\tc17.067-16.213,43.52-17.067,60.587,0c16.213,17.067,16.213,44.373,0,60.587l-168.96,169.813c-3.413,3.413-3.413,8.533,0,11.947\r\n\t\t\tc3.413,3.413,8.533,3.413,11.947,0L358.4,216.96c23.04-23.04,23.04-61.44,0-84.48c-23.04-23.04-61.44-23.04-84.48,0\r\n\t\t\tL47.787,358.613c-34.987,34.133-34.987,91.307,0,126.293c17.067,17.92,40.107,26.453,63.147,26.453\r\n\t\t\tc23.04,0,46.08-8.533,63.147-26.453L454.827,204.16c22.187-22.187,34.987-52.907,34.987-84.48\r\n\t\t\tC489.813,88.107,477.013,57.387,454.827,35.2z"),M(t,l)},m(e,n){T(e,t,n),C(t,o),C(o,a),C(a,r)},p(e,[n]){M(t,l=xe(s,[{width:"17"},{height:"16"},{xmlns:"http://www.w3.org/2000/svg"},{"xmlns:xlink":"http://www.w3.org/1999/xlink"},{x:"0px"},{y:"0px"},{viewBox:"0 0 511.36 511.36"},{style:"enable-background:new 0 0 511.36 511.36;"},{"xml:space":"preserve"},1&n&&e[0]]))},i:n,o:n,d(e){e&&O(t)}}}function Mn(e,t,n){return e.$$set=e=>{n(0,t=i(i({},t),v(e)))},t=v(t),[t]}class Rn extends Pe{constructor(e){super(),Oe(this,e,Mn,Fn,c,{})}}function qn(e){let t,o,a,r=[{width:"24"},{height:"24"},{viewBox:"0 0 24 24"},{fill:"none"},{xmlns:"http://www.w3.org/2000/svg"},e[0]],s={};for(let n=0;n<r.length;n+=1)s=i(s,r[n]);return{c(){t=E("svg"),o=E("path"),a=E("path"),this.h()},l(e){t=U(e,"svg",{width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0});var n=q(t);o=U(n,"path",{d:!0,stroke:!0,"stroke-width":!0,"stroke-miterlimit":!0}),q(o).forEach(O),a=U(n,"path",{d:!0,stroke:!0,"stroke-width":!0,"stroke-miterlimit":!0}),q(a).forEach(O),n.forEach(O),this.h()},h(){F(o,"d","M11.7605 17.3029L6.32422 12.1494L11.7605 6.99968"),F(o,"stroke","#161717"),F(o,"stroke-width","1.5"),F(o,"stroke-miterlimit","10"),F(a,"d","M6.42791 12.1494L18 12.1494"),F(a,"stroke","#161717"),F(a,"stroke-width","1.5"),F(a,"stroke-miterlimit","10"),M(t,s)},m(e,n){T(e,t,n),C(t,o),C(t,a)},p(e,[n]){M(t,s=xe(r,[{width:"24"},{height:"24"},{viewBox:"0 0 24 24"},{fill:"none"},{xmlns:"http://www.w3.org/2000/svg"},1&n&&e[0]]))},i:n,o:n,d(e){e&&O(t)}}}function Bn(e,t,n){return e.$$set=e=>{n(0,t=i(i({},t),v(e)))},t=v(t),[t]}class zn extends Pe{constructor(e){super(),Oe(this,e,Bn,qn,c,{})}}function Vn(e){let t,o,a=[{width:"20"},{height:"20"},{viewBox:"0 0 20 20"},{fill:"none"},{xmlns:"http://www.w3.org/2000/svg"},e[0]],r={};for(let n=0;n<a.length;n+=1)r=i(r,a[n]);return{c(){t=E("svg"),o=E("path"),this.h()},l(e){t=U(e,"svg",{width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0});var n=q(t);o=U(n,"path",{d:!0,fill:!0}),q(o).forEach(O),n.forEach(O),this.h()},h(){F(o,"d","M10 2C14.4183 2 18 5.58172 18 10C18 14.4183 14.4183 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2ZM10 3C6.13401 3 3 6.13401 3 10C3 13.866 6.13401 17 10 17C13.866 17 17 13.866 17 10C17 6.13401 13.866 3 10 3ZM10 12.5C10.4142 12.5 10.75 12.8358 10.75 13.25C10.75 13.6642 10.4142 14 10 14C9.58579 14 9.25 13.6642 9.25 13.25C9.25 12.8358 9.58579 12.5 10 12.5ZM10 6C10.2455 6 10.4496 6.17688 10.4919 6.41012L10.5 6.5V11C10.5 11.2761 10.2761 11.5 10 11.5C9.75454 11.5 9.55039 11.3231 9.50806 11.0899L9.5 11V6.5C9.5 6.22386 9.72386 6 10 6Z"),F(o,"fill","white"),M(t,r)},m(e,n){T(e,t,n),C(t,o)},p(e,[n]){M(t,r=xe(a,[{width:"20"},{height:"20"},{viewBox:"0 0 20 20"},{fill:"none"},{xmlns:"http://www.w3.org/2000/svg"},1&n&&e[0]]))},i:n,o:n,d(e){e&&O(t)}}}function Un(e,t,n){return e.$$set=e=>{n(0,t=i(i({},t),v(e)))},t=v(t),[t]}class Hn extends Pe{constructor(e){super(),Oe(this,e,Un,Vn,c,{})}}function Wn(e){let t,o,a=[{width:"16"},{height:"16"},{viewBox:"0 0 16 16"},{fill:"none"},{xmlns:"http://www.w3.org/2000/svg"},e[0]],r={};for(let n=0;n<a.length;n+=1)r=i(r,a[n]);return{c(){t=E("svg"),o=E("path"),this.h()},l(e){t=U(e,"svg",{width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0});var n=q(t);o=U(n,"path",{d:!0,fill:!0}),q(o).forEach(O),n.forEach(O),this.h()},h(){F(o,"d","M11.2452 0.817058C12.332 -0.269749 14.0941 -0.269749 15.1809 0.817058C16.2224 1.85858 16.2658 3.52026 15.3111 4.61346L15.1809 4.75273L5.57506 14.3586C5.36997 14.5636 5.12323 14.7212 4.85236 14.821L4.68708 14.8739L0.632111 15.9798C0.285522 16.0743 -0.0345414 15.7857 0.00300655 15.4452L0.0181704 15.3658L1.12407 11.3109C1.20039 11.031 1.33646 10.7718 1.52212 10.5508L1.63939 10.4229L11.2452 0.817058ZM10.385 3.09195L2.34649 11.13C2.2542 11.2223 2.18117 11.3314 2.13111 11.4511L2.08884 11.574L1.2122 14.7847L4.42397 13.9091C4.50791 13.8862 4.58815 13.8526 4.66278 13.8093L4.77028 13.7372L4.86796 13.6515L12.906 5.61295L10.385 3.09195ZM14.4738 1.52417C13.8162 0.866565 12.7727 0.830031 12.0722 1.41457L11.9523 1.52417L11.092 2.38495L13.613 4.90595L14.4738 4.04563C15.1314 3.38803 15.1679 2.34455 14.5834 1.64407L14.4738 1.52417Z"),F(o,"fill","#ffffff"),M(t,r)},m(e,n){T(e,t,n),C(t,o)},p(e,[n]){M(t,r=xe(a,[{width:"16"},{height:"16"},{viewBox:"0 0 16 16"},{fill:"none"},{xmlns:"http://www.w3.org/2000/svg"},1&n&&e[0]]))},i:n,o:n,d(e){e&&O(t)}}}function Kn(e,t,n){return e.$$set=e=>{n(0,t=i(i({},t),v(e)))},t=v(t),[t]}class Gn extends Pe{constructor(e){super(),Oe(this,e,Kn,Wn,c,{})}}function Qn(e){let t,n,i=(e[0].given_name&&e[0].surname?e[0].given_name.charAt(0)+e[0].surname.charAt(0):e[0].name?e[0].name.charAt(0):e[0].email?e[0].email.charAt(0):"?")+"";return{c(){t=A("p"),n=N(i),W(t,"margin","0")},m(e,i){S(e,t,i),k(t,n)},p(e,t){1&t&&i!==(i=(e[0].given_name&&e[0].surname?e[0].given_name.charAt(0)+e[0].surname.charAt(0):e[0].name?e[0].name.charAt(0):e[0].email?e[0].email.charAt(0):"?")+"")&&H(n,i)},d(e){e&&O(t)}}}function Yn(e){let t,n;return{c(){t=A("img"),F(t,"alt",""),W(t,"height",e[1]),W(t,"width",e[2]),W(t,"border-radius","50%"),d(t.src,n="data:image/jpg;base64,"+e[3])||F(t,"src",n)},m(e,n){S(e,t,n)},p(e,i){2&i&&W(t,"height",e[1]),4&i&&W(t,"width",e[2]),8&i&&!d(t.src,n="data:image/jpg;base64,"+e[3])&&F(t,"src",n)},d(e){e&&O(t)}}}function Zn(e){let t;function i(e,t){return e[3]?Yn:e[0]?Qn:void 0}let o=i(e),a=o&&o(e);return{c(){a&&a.c(),t=j(),this.c=n},m(e,n){a&&a.m(e,n),S(e,t,n)},p(e,[n]){o===(o=i(e))&&a?a.p(e,n):(a&&a.d(1),a=o&&o(e),a&&(a.c(),a.m(t.parentNode,t)))},i:n,o:n,d(e){a&&a.d(e),e&&O(t)}}}function Jn(e,t,n){let i,{contact:o}=t,{contact_query:a}=t,{height:r="32px"}=t,{width:s="32px"}=t;return J(async()=>{o&&o.picture_url?n(3,i=await Ht.getContactAvatar(a,o.id)):n(3,i=null)}),e.$$set=e=>{"contact"in e&&n(0,o=e.contact),"contact_query"in e&&n(4,a=e.contact_query),"height"in e&&n(1,r=e.height),"width"in e&&n(2,s=e.width)},n(3,i=null),[o,r,s,i,a]}class Xn extends me{constructor(e){super(),Oe(this,{target:this.shadowRoot,props:Q(this.attributes),customElement:!0},Jn,Zn,c,{contact:0,contact_query:4,height:1,width:2},null),e&&(e.target&&S(e.target,this,e.anchor),e.props&&(this.$set(e.props),de()))}static get observedAttributes(){return["contact","contact_query","height","width"]}get contact(){return this.$$.ctx[0]}set contact(e){this.$$set({contact:e}),de()}get contact_query(){return this.$$.ctx[4]}set contact_query(e){this.$$set({contact_query:e}),de()}get height(){return this.$$.ctx[1]}set height(e){this.$$set({height:e}),de()}get width(){return this.$$.ctx[2]}set width(e){this.$$set({width:e}),de()}}customElements.define("nylas-contact-image",Xn);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof t||"undefined"!=typeof self&&self;function ei(e,t,n){return n={path:t,exports:{},require:function(e,t){return ti(e,null==t?n.path:t)}},e(n,n.exports),n.exports}function ti(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var ni=ei((function(e,t){/*! @license DOMPurify 2.3.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.4/LICENSE */(function(t,n){e.exports=n()})(0,(function(){function e(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var t=Object.hasOwnProperty,n=Object.setPrototypeOf,i=Object.isFrozen,o=Object.getPrototypeOf,a=Object.getOwnPropertyDescriptor,r=Object.freeze,s=Object.seal,l=Object.create,c="undefined"!=typeof Reflect&&Reflect,u=c.apply,d=c.construct;u||(u=function(e,t,n){return e.apply(t,n)}),r||(r=function(e){return e}),s||(s=function(e){return e}),d||(d=function(t,n){return new(Function.prototype.bind.apply(t,[null].concat(e(n))))});var p=x(Array.prototype.forEach),h=x(Array.prototype.pop),f=x(Array.prototype.push),m=x(String.prototype.toLowerCase),v=x(String.prototype.match),g=x(String.prototype.replace),y=x(String.prototype.indexOf),b=x(String.prototype.trim),w=x(RegExp.prototype.test),_=k(TypeError);function x(e){return function(t){for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return u(e,t,i)}}function k(e){return function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];return d(e,n)}}function C(e,t){n&&n(e,null);for(var o=t.length;o--;){var a=t[o];if("string"==typeof a){var r=m(a);r!==a&&(i(t)||(t[o]=r),a=r)}e[a]=!0}return e}function S(e){var n=l(null),i=void 0;for(i in e)u(t,e,[i])&&(n[i]=e[i]);return n}function T(e,t){for(;null!==e;){var n=a(e,t);if(n){if(n.get)return x(n.get);if("function"==typeof n.value)return x(n.value)}e=o(e)}function i(e){return console.warn("fallback value for",e),null}return i}var O=r(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),P=r(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),A=r(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),E=r(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),N=r(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),D=r(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),j=r(["#text"]),$=r(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),L=r(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),I=r(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=r(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),M=s(/\{\{[\s\S]*|[\s\S]*\}\}/gm),R=s(/<%[\s\S]*|[\s\S]*%>/gm),q=s(/^data-[\-\w.\u00B7-\uFFFF]/),B=s(/^aria-[\-\w]+$/),z=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),V=s(/^(?:\w+script|data):/i),U=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function W(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var K=function(){return"undefined"==typeof window?null:window},G=function(e,t){if("object"!==("undefined"==typeof e?"undefined":H(e))||"function"!=typeof e.createPolicy)return null;var n=null,i="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(i)&&(n=t.currentScript.getAttribute(i));var o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:function(e){return e}})}catch(a){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function Q(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K(),t=function(e){return Q(e)};if(t.version="2.3.4",t.removed=[],!e||!e.document||9!==e.document.nodeType)return t.isSupported=!1,t;var n=e.document,i=e.document,o=e.DocumentFragment,a=e.HTMLTemplateElement,s=e.Node,l=e.Element,c=e.NodeFilter,u=e.NamedNodeMap,d=void 0===u?e.NamedNodeMap||e.MozNamedAttrMap:u,x=e.HTMLFormElement,k=e.DOMParser,Y=e.trustedTypes,Z=l.prototype,J=T(Z,"cloneNode"),X=T(Z,"nextSibling"),ee=T(Z,"childNodes"),te=T(Z,"parentNode");if("function"==typeof a){var ne=i.createElement("template");ne.content&&ne.content.ownerDocument&&(i=ne.content.ownerDocument)}var ie=G(Y,n),oe=ie&&Ie?ie.createHTML(""):"",ae=i,re=ae.implementation,se=ae.createNodeIterator,le=ae.createDocumentFragment,ce=ae.getElementsByTagName,ue=n.importNode,de={};try{de=S(i).documentMode?i.documentMode:{}}catch(kt){}var pe={};t.isSupported="function"==typeof te&&re&&"undefined"!=typeof re.createHTMLDocument&&9!==de;var he=M,fe=R,me=q,ve=B,ge=V,ye=U,be=z,we=null,_e=C({},[].concat(W(O),W(P),W(A),W(N),W(j))),xe=null,ke=C({},[].concat(W($),W(L),W(I),W(F))),Ce=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Se=null,Te=null,Oe=!0,Pe=!0,Ae=!1,Ee=!1,Ne=!1,De=!1,je=!1,$e=!1,Le=!1,Ie=!1,Fe=!0,Me=!0,Re=!1,qe={},Be=null,ze=C({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ve=null,Ue=C({},["audio","video","img","source","image","track"]),He=null,We=C({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",Ge="http://www.w3.org/2000/svg",Qe="http://www.w3.org/1999/xhtml",Ye=Qe,Ze=!1,Je=void 0,Xe=["application/xhtml+xml","text/html"],et="text/html",tt=void 0,nt=null,it=i.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},at=function(e){nt&&nt===e||((!e||"object"!==("undefined"==typeof e?"undefined":H(e)))&&(e={}),e=S(e),we="ALLOWED_TAGS"in e?C({},e.ALLOWED_TAGS):_e,xe="ALLOWED_ATTR"in e?C({},e.ALLOWED_ATTR):ke,He="ADD_URI_SAFE_ATTR"in e?C(S(We),e.ADD_URI_SAFE_ATTR):We,Ve="ADD_DATA_URI_TAGS"in e?C(S(Ue),e.ADD_DATA_URI_TAGS):Ue,Be="FORBID_CONTENTS"in e?C({},e.FORBID_CONTENTS):ze,Se="FORBID_TAGS"in e?C({},e.FORBID_TAGS):{},Te="FORBID_ATTR"in e?C({},e.FORBID_ATTR):{},qe="USE_PROFILES"in e&&e.USE_PROFILES,Oe=!1!==e.ALLOW_ARIA_ATTR,Pe=!1!==e.ALLOW_DATA_ATTR,Ae=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ee=e.SAFE_FOR_TEMPLATES||!1,Ne=e.WHOLE_DOCUMENT||!1,$e=e.RETURN_DOM||!1,Le=e.RETURN_DOM_FRAGMENT||!1,Ie=e.RETURN_TRUSTED_TYPE||!1,je=e.FORCE_BODY||!1,Fe=!1!==e.SANITIZE_DOM,Me=!1!==e.KEEP_CONTENT,Re=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||be,Ye=e.NAMESPACE||Qe,e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ce.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ce.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ce.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Je=Je=-1===Xe.indexOf(e.PARSER_MEDIA_TYPE)?et:e.PARSER_MEDIA_TYPE,tt="application/xhtml+xml"===Je?function(e){return e}:m,Ee&&(Pe=!1),Le&&($e=!0),qe&&(we=C({},[].concat(W(j))),xe=[],!0===qe.html&&(C(we,O),C(xe,$)),!0===qe.svg&&(C(we,P),C(xe,L),C(xe,F)),!0===qe.svgFilters&&(C(we,A),C(xe,L),C(xe,F)),!0===qe.mathMl&&(C(we,N),C(xe,I),C(xe,F))),e.ADD_TAGS&&(we===_e&&(we=S(we)),C(we,e.ADD_TAGS)),e.ADD_ATTR&&(xe===ke&&(xe=S(xe)),C(xe,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&C(He,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(Be===ze&&(Be=S(Be)),C(Be,e.FORBID_CONTENTS)),Me&&(we["#text"]=!0),Ne&&C(we,["html","head","body"]),we.table&&(C(we,["tbody"]),delete Se.tbody),r&&r(e),nt=e)},rt=C({},["mi","mo","mn","ms","mtext"]),st=C({},["foreignobject","desc","title","annotation-xml"]),lt=C({},P);C(lt,A),C(lt,E);var ct=C({},N);C(ct,D);var ut=function(e){var t=te(e);(!t||!t.tagName)&&(t={namespaceURI:Qe,tagName:"template"});var n=m(e.tagName),i=m(t.tagName);if(e.namespaceURI===Ge)return t.namespaceURI===Qe?"svg"===n:t.namespaceURI===Ke?"svg"===n&&("annotation-xml"===i||rt[i]):Boolean(lt[n]);if(e.namespaceURI===Ke)return t.namespaceURI===Qe?"math"===n:t.namespaceURI===Ge?"math"===n&&st[i]:Boolean(ct[n]);if(e.namespaceURI===Qe){if(t.namespaceURI===Ge&&!st[i]||t.namespaceURI===Ke&&!rt[i])return!1;var o=C({},["title","style","font","a","script"]);return!ct[n]&&(o[n]||!lt[n])}return!1},dt=function(e){f(t.removed,{element:e});try{e.parentNode.removeChild(e)}catch(n){try{e.outerHTML=oe}catch(i){e.remove()}}},pt=function(e,n){try{f(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch(i){f(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),"is"===e&&!xe[e])if($e||Le)try{dt(n)}catch(i){}else try{n.setAttribute(e,"")}catch(i){}},ht=function(e){var t=void 0,n=void 0;if(je)e="<remove></remove>"+e;else{var o=v(e,/^[\r\n\t ]+/);n=o&&o[0]}"application/xhtml+xml"===Je&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var a=ie?ie.createHTML(e):e;if(Ye===Qe)try{t=(new k).parseFromString(a,Je)}catch(s){}if(!t||!t.documentElement){t=re.createDocument(Ye,"template",null);try{t.documentElement.innerHTML=Ze?"":a}catch(s){}}var r=t.body||t.documentElement;return e&&n&&r.insertBefore(i.createTextNode(n),r.childNodes[0]||null),Ye===Qe?ce.call(t,Ne?"html":"body")[0]:Ne?t.documentElement:r},ft=function(e){return se.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},mt=function(e){return e instanceof x&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore)},vt=function(e){return"object"===("undefined"==typeof s?"undefined":H(s))?e instanceof s:e&&"object"===("undefined"==typeof e?"undefined":H(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},gt=function(e,n,i){!pe[e]||p(pe[e],(function(e){e.call(t,n,i,nt)}))},yt=function(e){var n=void 0;if(gt("beforeSanitizeElements",e,null),mt(e)||v(e.nodeName,/[\u0080-\uFFFF]/))return dt(e),!0;var i=tt(e.nodeName);if(gt("uponSanitizeElement",e,{tagName:i,allowedTags:we}),!vt(e.firstElementChild)&&(!vt(e.content)||!vt(e.content.firstElementChild))&&w(/<[/\w]/g,e.innerHTML)&&w(/<[/\w]/g,e.textContent)||"select"===i&&w(/<template/i,e.innerHTML))return dt(e),!0;if(!we[i]||Se[i]){if(Me&&!Be[i]){var o=te(e)||e.parentNode,a=ee(e)||e.childNodes;if(a&&o)for(var r=a.length,s=r-1;s>=0;--s)o.insertBefore(J(a[s],!0),X(e))}return!(!Se[i]&&wt(i)&&(Ce.tagNameCheck instanceof RegExp&&w(Ce.tagNameCheck,i)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(i)))&&(dt(e),!0)}return e instanceof l&&!ut(e)||("noscript"===i||"noembed"===i)&&w(/<\/no(script|embed)/i,e.innerHTML)?(dt(e),!0):(Ee&&3===e.nodeType&&(n=e.textContent,n=g(n,he," "),n=g(n,fe," "),e.textContent!==n&&(f(t.removed,{element:e.cloneNode()}),e.textContent=n)),gt("afterSanitizeElements",e,null),!1)},bt=function(e,t,n){if(Fe&&("id"===t||"name"===t)&&(n in i||n in it))return!1;if((!Pe||Te[t]||!w(me,t))&&(!Oe||!w(ve,t)))if(!xe[t]||Te[t]){if(!(wt(e)&&(Ce.tagNameCheck instanceof RegExp&&w(Ce.tagNameCheck,e)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(e))&&(Ce.attributeNameCheck instanceof RegExp&&w(Ce.attributeNameCheck,t)||Ce.attributeNameCheck instanceof Function&&Ce.attributeNameCheck(t))||"is"===t&&Ce.allowCustomizedBuiltInElements&&(Ce.tagNameCheck instanceof RegExp&&w(Ce.tagNameCheck,n)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))))return!1}else if(!He[t]&&!w(be,g(n,ye,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(n,"data:")||!Ve[e])&&(!Ae||w(ge,g(n,ye,"")))&&n)return!1;return!0},wt=function(e){return e.indexOf("-")>0},_t=function(e){var n=void 0,i=void 0,o=void 0,a=void 0;gt("beforeSanitizeAttributes",e,null);var r=e.attributes;if(r){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:xe};for(a=r.length;a--;){n=r[a];var l=n,c=l.name,u=l.namespaceURI;if(i=b(n.value),o=tt(c),s.attrName=o,s.attrValue=i,s.keepAttr=!0,s.forceKeepAttr=void 0,gt("uponSanitizeAttribute",e,s),i=s.attrValue,!s.forceKeepAttr&&(pt(c,e),s.keepAttr)){if(w(/\/>/i,i)){pt(c,e);continue}Ee&&(i=g(i,he," "),i=g(i,fe," "));var d=tt(e.nodeName);if(bt(d,o,i))try{u?e.setAttributeNS(u,c,i):e.setAttribute(c,i),h(t.removed)}catch(p){}}}gt("afterSanitizeAttributes",e,null)}},xt=function e(t){var n=void 0,i=ft(t);for(gt("beforeSanitizeShadowDOM",t,null);n=i.nextNode();)gt("uponSanitizeShadowNode",n,null),!yt(n)&&(n.content instanceof o&&e(n.content),_t(n));gt("afterSanitizeShadowDOM",t,null)};return t.sanitize=function(i,a){var r=void 0,l=void 0,c=void 0,u=void 0,d=void 0;if(Ze=!i,Ze&&(i="\x3c!--\x3e"),"string"!=typeof i&&!vt(i)){if("function"!=typeof i.toString)throw _("toString is not a function");if(i=i.toString(),"string"!=typeof i)throw _("dirty is not a string, aborting")}if(!t.isSupported){if("object"===H(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof i)return e.toStaticHTML(i);if(vt(i))return e.toStaticHTML(i.outerHTML)}return i}if(De||at(a),t.removed=[],"string"==typeof i&&(Re=!1),!Re)if(i instanceof s)r=ht("\x3c!----\x3e"),l=r.ownerDocument.importNode(i,!0),1===l.nodeType&&"BODY"===l.nodeName||"HTML"===l.nodeName?r=l:r.appendChild(l);else{if(!$e&&!Ee&&!Ne&&-1===i.indexOf("<"))return ie&&Ie?ie.createHTML(i):i;if(r=ht(i),!r)return $e?null:oe}r&&je&&dt(r.firstChild);for(var p=ft(Re?i:r);c=p.nextNode();)3===c.nodeType&&c===u||yt(c)||(c.content instanceof o&&xt(c.content),_t(c),u=c);if(u=null,Re)return i;if($e){if(Le)for(d=le.call(r.ownerDocument);r.firstChild;)d.appendChild(r.firstChild);else d=r;return xe.shadowroot&&(d=ue.call(n,d,!0)),d}var h=Ne?r.outerHTML:r.innerHTML;return Ee&&(h=g(h,he," "),h=g(h,fe," ")),ie&&Ie?ie.createHTML(h):h},t.setConfig=function(e){at(e),De=!0},t.clearConfig=function(){nt=null,De=!1},t.isValidAttribute=function(e,t,n){nt||at({});var i=tt(e),o=tt(t);return bt(i,o,n)},t.addHook=function(e,t){"function"==typeof t&&(pe[e]=pe[e]||[],f(pe[e],t))},t.removeHook=function(e){pe[e]&&h(pe[e])},t.removeHooks=function(e){pe[e]&&(pe[e]=[])},t.removeAllHooks=function(){pe={}},t}var Y=Q();return Y}))}));const ii=["message/delivery-status","message/rfc822","text/calendar"];function oi(e,t,n){const i=e.slice();return i[7]=t[n],i}function ai(e){let t,n,i=null!==typeof e[1]&&ri(e),o={ctx:e,current:null,token:null,hasCatch:!1,pending:di,then:li,catch:si,value:6};return we(e[3],o),{c(){i&&i.c(),t=D(),n=A("div"),o.block.c(),F(n,"class","attachment")},m(e,a){i&&i.m(e,a),S(e,t,a),S(e,n,a),o.block.m(n,o.anchor=null),o.mount=()=>n,o.anchor=null},p(n,a){e=n,null!==typeof e[1]?i?i.p(e,a):(i=ri(e),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null),_e(o,e,a)},d(e){i&&i.d(e),e&&O(t),e&&O(n),o.block.d(),o.token=null,o=null}}}function ri(e){let t,n,i=ni.sanitize(e[1])+"";return{c(){t=new G,n=j(),t.a=n},m(e,o){t.m(i,e,o),S(e,n,o)},p(e,n){2&n&&i!==(i=ni.sanitize(e[1])+"")&&t.p(i)},d(e){e&&O(n),e&&t.d()}}}function si(e){return{c:n,m:n,p:n,d:n}}function li(e){let t,n=e[6]&&Array.isArray(e[6])&&e[6].length>0,i=n&&ci(e);return{c(){i&&i.c(),t=j()},m(e,n){i&&i.m(e,n),S(e,t,n)},p(e,t){n&&i.p(e,t)},d(e){i&&i.d(e),e&&O(t)}}}function ci(e){let t,n=e[6],i=[];for(let o=0;o<n.length;o+=1)i[o]=ui(oi(e,n,o));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=j()},m(e,n){for(let t=0;t<i.length;t+=1)i[t].m(e,n);S(e,t,n)},p(e,o){if(12&o){let a;for(n=e[6],a=0;a<n.length;a+=1){const r=oi(e,n,a);i[a]?i[a].p(r,o):(i[a]=ui(r),i[a].c(),i[a].m(t.parentNode,t))}for(;a<i.length;a+=1)i[a].d(1);i.length=n.length}},d(e){P(i,e),e&&O(t)}}}function ui(e){let t,n,i,o,a,r=(e[7].filename||e[7].id)+"";function s(...t){return e[4](e[7],...t)}return{c(){t=A("button"),n=N(r),i=D()},m(e,r){S(e,t,r),k(t,n),k(t,i),o||(a=$(t,"click",I(s)),o=!0)},p(t,n){e=t},d(e){e&&O(t),o=!1,a()}}}function di(e){return{c:n,m:n,p:n,d:n}}function pi(e){let t,i=e[0]&&ai(e);return{c(){t=A("div"),i&&i.c(),this.c=n},m(e,n){S(e,t,n),i&&i.m(t,null)},p(e,[n]){e[0]?i?i.p(e,n):(i=ai(e),i.c(),i.m(t,null)):i&&(i.d(1),i=null)},i:n,o:n,d(e){e&&O(t),i&&i.d()}}}function hi(e,t,n){let{message:i}=t,{body:o}=t;const a=fn(Z());async function r(e,t){e.stopImmediatePropagation(),a("downloadClicked",{event:e,message:i,file:t})}let s=[];X(()=>{if(i&&i.files.length>0)for(const[e,t]of i.files.entries())"attachment"===t.content_disposition&&!t.content_id&&!ii.includes(t.content_type)&&s.push(i.files[e])});const l=(e,t)=>r(t,e);return e.$$set=e=>{"message"in e&&n(0,i=e.message),"body"in e&&n(1,o=e.body)},[i,o,r,s,l]}class fi extends me{constructor(e){super(),this.shadowRoot.innerHTML="<style>div{width:inherit}div div.attachment{margin:1rem 0 0 0;display:flex;gap:0.5rem}div div.attachment button{height:fit-content;width:max-content;padding:0.3rem 1rem;border:1px solid var(--grey);border-radius:30px;background:white;cursor:pointer}div div.attachment button:hover{background:var(--grey-light)}</style>",Oe(this,{target:this.shadowRoot,props:Q(this.attributes),customElement:!0},hi,pi,c,{message:0,body:1},null),e&&(e.target&&S(e.target,this,e.anchor),e.props&&(this.$set(e.props),de()))}static get observedAttributes(){return["message","body"]}get message(){return this.$$.ctx[0]}set message(e){this.$$set({message:e}),de()}get body(){return this.$$.ctx[1]}set body(e){this.$$set({body:e}),de()}}function mi(e){let t,n;return{c(){t=A("p"),n=N(e[3])},m(e,i){S(e,t,i),k(t,n)},p(e,t){8&t&&H(n,e[3])},d(e){e&&O(t)}}}function vi(e){let t,n,i;var o=e[2];function a(e){return{props:{"aria-hidden":"true"}}}return o&&(n=new o(a())),{c(){t=A("div"),n&&ke(n.$$.fragment),F(t,"class","icon-container"),K(t,"reverse-icon",e[2]&&e[4])},m(e,o){S(e,t,o),n&&Ce(n,t,null),i=!0},p(e,i){if(o!==(o=e[2])){if(n){ve();const e=n;be(e.$$.fragment,1,0,()=>{Se(e,1)}),ge()}o?(n=new o(a()),ke(n.$$.fragment),ye(n.$$.fragment,1),Ce(n,t,null)):n=null}20&i&&K(t,"reverse-icon",e[2]&&e[4])},i(e){i||(n&&ye(n.$$.fragment,e),i=!0)},o(e){n&&be(n.$$.fragment,e),i=!1},d(e){e&&O(t),n&&Se(n)}}}function gi(e){let t,n;return{c(){t=A("p"),n=N(e[0]),F(t,"id",e[1]),F(t,"role","tooltip"),F(t,"tabindex","0"),F(t,"class","tooltip")},m(e,i){S(e,t,i),k(t,n)},p(e,i){1&i&&H(n,e[0]),2&i&&F(t,"id",e[1])},d(e){e&&O(t)}}}function yi(e){let t,i,o,a,r,s,l,c,u,d,p=e[3]&&mi(e),h=e[2]&&vi(e),f=e[4]&&gi(e);return{c(){t=A("button"),p&&p.c(),i=D(),h&&h.c(),s=D(),f&&f.c(),l=j(),this.c=n,F(t,"class","tooltip-trigger"),F(t,"aria-expanded",o=e[4]?"true":"false"),F(t,"id",a=e[1]?"tooltip-trigger-"+e[1]:""),F(t,"aria-describedby",e[1]),F(t,"aria-label",r=e[4]?"hide email":"show email")},m(n,o){S(n,t,o),p&&p.m(t,null),k(t,i),h&&h.m(t,null),S(n,s,o),f&&f.m(n,o),S(n,l,o),c=!0,u||(d=$(t,"click",I(e[7])),u=!0)},p(e,[n]){e[3]?p?p.p(e,n):(p=mi(e),p.c(),p.m(t,i)):p&&(p.d(1),p=null),e[2]?h?(h.p(e,n),4&n&&ye(h,1)):(h=vi(e),h.c(),ye(h,1),h.m(t,null)):h&&(ve(),be(h,1,1,()=>{h=null}),ge()),(!c||16&n&&o!==(o=e[4]?"true":"false"))&&F(t,"aria-expanded",o),(!c||2&n&&a!==(a=e[1]?"tooltip-trigger-"+e[1]:""))&&F(t,"id",a),(!c||2&n)&&F(t,"aria-describedby",e[1]),(!c||16&n&&r!==(r=e[4]?"hide email":"show email"))&&F(t,"aria-label",r),e[4]?f?f.p(e,n):(f=gi(e),f.c(),f.m(l.parentNode,l)):f&&(f.d(1),f=null)},i(e){c||(ye(h),c=!0)},o(e){be(h),c=!1},d(e){e&&O(t),p&&p.d(),h&&h.d(),e&&O(s),f&&f.d(e),e&&O(l),u=!1,d()}}}function bi(e,t,n){let i;const o=fn(Z());let{current_tooltip_id:a}=t,{content:r}=t,{id:s}=t,{icon:l}=t,{text:c}=t;function u(){a!==s?o("toggleTooltip",{tooltipID:s}):n(4,i=!i)}const d=e=>u();return e.$$set=e=>{"current_tooltip_id"in e&&n(6,a=e.current_tooltip_id),"content"in e&&n(0,r=e.content),"id"in e&&n(1,s=e.id),"icon"in e&&n(2,l=e.icon),"text"in e&&n(3,c=e.text)},e.$$.update=()=>{66&e.$$.dirty&&n(4,i=!(!a||a!==s))},[r,s,l,c,i,u,a,d]}customElements.define("nylas-message-body",fi);class wi extends me{constructor(e){super(),this.shadowRoot.innerHTML="<style>button.tooltip-trigger{background:transparent;border:none;box-shadow:none;cursor:pointer;padding:0;height:auto;display:flex;flex-direction:row;align-items:center;align-content:center;justify-content:center}.icon-container{width:1rem}.icon-container.reverse-icon{transform:rotate(180deg)}p.tooltip{background:var(--grey-lightest);border-radius:2px;color:var(--grey-dark);box-shadow:0px 3px 2px rgba(0, 0, 0, 0.25);left:50%;padding:0.5rem;position:absolute;top:8px;transform:translate(-50%, 0);width:max-content;max-width:240px;max-height:240px;overflow-y:scroll;word-break:break-word;z-index:1}</style>",Oe(this,{target:this.shadowRoot,props:Q(this.attributes),customElement:!0},bi,yi,c,{current_tooltip_id:6,content:0,id:1,icon:2,text:3},null),e&&(e.target&&S(e.target,this,e.anchor),e.props&&(this.$set(e.props),de()))}static get observedAttributes(){return["current_tooltip_id","content","id","icon","text"]}get current_tooltip_id(){return this.$$.ctx[6]}set current_tooltip_id(e){this.$$set({current_tooltip_id:e}),de()}get content(){return this.$$.ctx[0]}set content(e){this.$$set({content:e}),de()}get id(){return this.$$.ctx[1]}set id(e){this.$$set({id:e}),de()}get icon(){return this.$$.ctx[2]}set icon(e){this.$$set({icon:e}),de()}get text(){return this.$$.ctx[3]}set text(e){this.$$set({text:e}),de()}}var _i,xi,ki;customElements.define("nylas-tooltip",wi),function(e){e.Label="label",e.Folder="folder"}(_i||(_i={})),function(e){e.RUNNING="running",e.PARTIAL="partial",e.STOPPED="stopped"}(xi||(xi={})),function(e){e.SELECTALL="selectall",e.DELETE="delete",e.STAR="star",e.UNREAD="unread"}(ki||(ki={}));const Ci=async e=>{const t=Ge(e.component_id)+"/labels";return await fetch(t,He(e)).then(e=>Ue(e)).then(e=>e.response).catch(t=>We(e.component_id,t))};var Si=Object.defineProperty,Ti=Object.getOwnPropertySymbols,Oi=Object.prototype.hasOwnProperty,Pi=Object.prototype.propertyIsEnumerable,Ai=(e,t,n)=>t in e?Si(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ei=(e,t)=>{for(var n in t||(t={}))Oi.call(t,n)&&Ai(e,n,t[n]);if(Ti)for(var n of Ti(t))Pi.call(t,n)&&Ai(e,n,t[n]);return e};function Ni(){const{subscribe:e,set:t,update:n}=Ne({}),i={};return{subscribe:e,getLabels:async(e,t=!1)=>{const o=JSON.stringify(e);return(!i[o]||t)&&(e.component_id||e.access_token)&&(i[o]=(await Ci(e)).map(e=>(e.toString=()=>e.id,e))),n(e=>(e[o]=i[o],Ei({},e))),i[o]},reset:()=>t({})}}const Di=Ni(),ji=async e=>{const t=Ge(e.component_id)+"/folders";return await fetch(t,He(e)).then(e=>Ue(e)).then(e=>e.response).catch(t=>We(e.component_id,t))};var $i=Object.defineProperty,Li=Object.getOwnPropertySymbols,Ii=Object.prototype.hasOwnProperty,Fi=Object.prototype.propertyIsEnumerable,Mi=(e,t,n)=>t in e?$i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ri=(e,t)=>{for(var n in t||(t={}))Ii.call(t,n)&&Mi(e,n,t[n]);if(Li)for(var n of Li(t))Fi.call(t,n)&&Mi(e,n,t[n]);return e};function qi(){const{subscribe:e,set:t,update:n}=Ne({}),i={};return{subscribe:e,getFolders:async(e,t=!1)=>{const o=JSON.stringify(e);return(!i[o]||t)&&(e.component_id||e.access_token)&&(i[o]=(await ji(e)).map(e=>(e.toString=()=>e.id,e))),n(e=>(e[o]=i[o],Ri({},e))),i[o]},reset:()=>t({})}}const Bi=qi();function zi(e){let t,o,a,r,s,l,c,u,d,p,h,f=[{id:"Capa_1"},{"enable-background":"new 0 0 497 497"},{height:"512"},{viewBox:"0 0 497 497"},{xmlns:"http://www.w3.org/2000/svg"},e[0]],m={};for(let n=0;n<f.length;n+=1)m=i(m,f[n]);return{c(){t=E("svg"),o=E("g"),a=E("circle"),r=E("circle"),s=E("circle"),l=E("ellipse"),c=E("ellipse"),u=E("ellipse"),d=E("ellipse"),p=E("ellipse"),h=E("circle"),this.h()},l(e){t=U(e,"svg",{id:!0,"enable-background":!0,height:!0,viewBox:!0,xmlns:!0});var n=q(t);o=U(n,"g",{});var i=q(o);a=U(i,"circle",{cx:!0,cy:!0,fill:!0,r:!0}),q(a).forEach(O),r=U(i,"circle",{cx:!0,cy:!0,fill:!0,r:!0}),q(r).forEach(O),s=U(i,"circle",{cx:!0,cy:!0,fill:!0,r:!0}),q(s).forEach(O),l=U(i,"ellipse",{cx:!0,cy:!0,fill:!0,rx:!0,ry:!0}),q(l).forEach(O),c=U(i,"ellipse",{cx:!0,cy:!0,fill:!0,rx:!0,ry:!0}),q(c).forEach(O),u=U(i,"ellipse",{cx:!0,cy:!0,fill:!0,rx:!0,ry:!0}),q(u).forEach(O),d=U(i,"ellipse",{cx:!0,cy:!0,fill:!0,rx:!0,ry:!0}),q(d).forEach(O),p=U(i,"ellipse",{cx:!0,cy:!0,fill:!0,rx:!0,ry:!0}),q(p).forEach(O),h=U(i,"circle",{cx:!0,cy:!0,fill:!0,r:!0}),q(h).forEach(O),i.forEach(O),n.forEach(O),this.h()},h(){F(a,"cx","98"),F(a,"cy","376"),F(a,"fill","#909ba6"),F(a,"r","53"),F(r,"cx","439"),F(r,"cy","336"),F(r,"fill","#c8d2dc"),F(r,"r","46"),F(s,"cx","397"),F(s,"cy","112"),F(s,"fill","#e9edf1"),F(s,"r","38"),F(l,"cx","56.245"),F(l,"cy","244.754"),F(l,"fill","#7e8b96"),F(l,"rx","56.245"),F(l,"ry","54.874"),F(c,"cx","217.821"),F(c,"cy","447.175"),F(c,"fill","#a2abb8"),F(c,"rx","51.132"),F(c,"ry","49.825"),F(u,"cx","349.229"),F(u,"cy","427.873"),F(u,"fill","#b9c3cd"),F(u,"rx","48.575"),F(u,"ry","47.297"),F(d,"cx","117.092"),F(d,"cy","114.794"),F(d,"fill","#5f6c75"),F(d,"rx","58.801"),F(d,"ry","57.397"),F(p,"cx","453.538"),F(p,"cy","216.477"),F(p,"fill","#dce6eb"),F(p,"rx","43.462"),F(p,"ry","42.656"),F(h,"cx","263"),F(h,"cy","62"),F(h,"fill","#4e5a61"),F(h,"r","62"),M(t,m)},m(e,n){T(e,t,n),C(t,o),C(o,a),C(o,r),C(o,s),C(o,l),C(o,c),C(o,u),C(o,d),C(o,p),C(o,h)},p(e,[n]){M(t,m=xe(f,[{id:"Capa_1"},{"enable-background":"new 0 0 497 497"},{height:"512"},{viewBox:"0 0 497 497"},{xmlns:"http://www.w3.org/2000/svg"},1&n&&e[0]]))},i:n,o:n,d(e){e&&O(t)}}}function Vi(e,t,n){return e.$$set=e=>{n(0,t=i(i({},t),v(e)))},t=v(t),[t]}class Ui extends Pe{constructor(e){super(),Oe(this,e,Vi,zi,c,{})}}function Hi(e,t,n){const i=e.slice();return i[94]=t[n],i[96]=n,i}function Wi(e,t,n){const i=e.slice();return i[90]=t[n],i}function Ki(e,t,n){const i=e.slice();return i[91]=t[n],i}function Gi(e,t,n){const i=e.slice();return i[90]=t[n],i}function Qi(e,t,n){const i=e.slice();return i[91]=t[n],i}function Yi(e,t,n){const i=e.slice();return i[2]=t[n],i[88]=t,i[89]=n,i}function Zi(e,t,n){const i=e.slice();return i[91]=t[n],i}function Ji(e,t,n){const i=e.slice();return i[94]=t[n],i[96]=n,i}function Xi(e){let t,i=Object.keys(e[4].message).length>0,o=i&&to(e);return{c(){o&&o.c(),t=j()},m(e,n){o&&o.m(e,n),S(e,t,n)},p(e,n){16&n[0]&&(i=Object.keys(e[4].message).length>0),i?o?o.p(e,n):(o=to(e),o.c(),o.m(t.parentNode,t)):o&&(o.d(1),o=null)},i:n,o:n,d(e){o&&o.d(e),e&&O(t)}}}function eo(e){let t,n,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:ma,then:ho,catch:po,value:3,blocks:[,,,]};return we(n=e[6],o),{c(){t=j(),o.block.c()},m(e,n){S(e,t,n),o.block.m(e,o.anchor=n),o.mount=()=>t.parentNode,o.anchor=t,i=!0},p(t,i){e=t,o.ctx=e,64&i[0]&&n!==(n=e[6])&&we(n,o)||_e(o,e,i)},i(e){i||(ye(o.block),i=!0)},o(e){for(let t=0;t<3;t+=1){const e=o.blocks[t];be(e)}i=!1},d(e){e&&O(t),o.block.d(e),o.token=null,o=null}}}function to(e){var t,n,i,o,a,r,s,l;let c,u,d,p,h,f,m,v,g,y,b,w,_,x,C,T,E,j,L,I,M,q,B,z,V=(null==(t=e[4].message)?void 0:t.subject)+"",U=(e[7]&&(null==(n=e[2])?void 0:n.from[0].email)===e[7]?"me":(null==(o=null==(i=e[4].message)?void 0:i.from[0])?void 0:o.name)||(null==(r=null==(a=e[4].message)?void 0:a.from[0])?void 0:r.email))+"",W=e[4].show_contact_avatar&&no(e),K=null==(s=e[2])?void 0:s.to.slice(0,ga),G=[];for(let k=0;k<K.length;k+=1)G[k]=ro(Hi(e,K,k));let Q=(null==(l=e[2].to)?void 0:l.length)>ga&&so(e),Y=e[4].show_received_timestamp&&lo(e);function Z(e,t){return e[4].clean_conversation&&e[2].conversation?uo:e[4].message?co:void 0}let J=Z(e),X=J&&J(e);return{c(){var t,n;c=A("div"),u=A("header"),d=N(V),p=D(),h=A("div"),f=A("div"),m=A("div"),v=A("div"),W&&W.c(),g=D(),y=A("div"),b=A("span"),w=N(U),_=D(),x=A("nylas-tooltip"),E=D(),j=A("div");for(let e=0;e<G.length;e+=1)G[e].c();L=D(),Q&&Q.c(),I=D(),Y&&Y.c(),M=D(),q=A("div"),X&&X.c(),F(b,"class","name"),R(x,"id",C=null==(t=e[4].message)?void 0:t.id),R(x,"current_tooltip_id",e[12]),R(x,"icon",On),R(x,"content",T=null==(n=e[4].message)?void 0:n.from[0].email),F(y,"class","message-from"),F(v,"class","avatar-from"),F(j,"class","message-to"),F(m,"class","message-from-to"),F(f,"class","message-head"),F(q,"class","message-body"),F(h,"class","individual-message expanded"),F(c,"class","email-row expanded singular")},m(t,n){S(t,c,n),k(c,u),k(u,d),k(c,p),k(c,h),k(h,f),k(f,m),k(m,v),W&&W.m(v,null),k(v,g),k(v,y),k(y,b),k(b,w),k(y,_),k(y,x),k(m,E),k(m,j);for(let e=0;e<G.length;e+=1)G[e].m(j,null);k(j,L),Q&&Q.m(j,null),k(f,I),Y&&Y.m(f,null),k(h,M),k(h,q),X&&X.m(q,null),B||(z=$(x,"toggleTooltip",e[25]),B=!0)},p(e,t){var n,i,o,a,r,s,l,c,u,p;if(16&t[0]&&V!==(V=(null==(n=e[4].message)?void 0:n.subject)+"")&&H(d,V),e[4].show_contact_avatar?W?W.p(e,t):(W=no(e),W.c(),W.m(v,g)):W&&(W.d(1),W=null),148&t[0]&&U!==(U=(e[7]&&(null==(i=e[2])?void 0:i.from[0].email)===e[7]?"me":(null==(a=null==(o=e[4].message)?void 0:o.from[0])?void 0:a.name)||(null==(s=null==(r=e[4].message)?void 0:r.from[0])?void 0:s.email))+"")&&H(w,U),16&t[0]&&C!==(C=null==(l=e[4].message)?void 0:l.id)&&R(x,"id",C),4096&t[0]&&R(x,"current_tooltip_id",e[12]),16&t[0]&&T!==(T=null==(c=e[4].message)?void 0:c.from[0].email)&&R(x,"content",T),20&t[0]){let n;for(K=null==(u=e[2])?void 0:u.to.slice(0,ga),n=0;n<K.length;n+=1){const i=Hi(e,K,n);G[n]?G[n].p(i,t):(G[n]=ro(i),G[n].c(),G[n].m(j,L))}for(;n<G.length;n+=1)G[n].d(1);G.length=K.length}(null==(p=e[2].to)?void 0:p.length)>ga?Q?Q.p(e,t):(Q=so(e),Q.c(),Q.m(j,null)):Q&&(Q.d(1),Q=null),e[4].show_received_timestamp?Y?Y.p(e,t):(Y=lo(e),Y.c(),Y.m(f,null)):Y&&(Y.d(1),Y=null),J===(J=Z(e))&&X?X.p(e,t):(X&&X.d(1),X=J&&J(e),X&&(X.c(),X.m(q,null)))},d(e){e&&O(c),W&&W.d(),P(G,e),Q&&Q.d(),Y&&Y.d(),X&&X.d(),B=!1,z()}}}function no(e){let t,n;return{c(){t=A("div"),n=A("nylas-contact-image"),R(n,"contact_query",e[11]),R(n,"contact",e[14]),F(t,"class","default-avatar")},m(e,i){S(e,t,i),k(t,n)},p(e,t){2048&t[0]&&R(n,"contact_query",e[11]),16384&t[0]&&R(n,"contact",e[14])},d(e){e&&O(t)}}}function io(e){let t;return{c(){t=N("Me")},m(e,n){S(e,t,n)},d(e){e&&O(t)}}}function oo(e){let t,n=e[94].email+"";return{c(){t=N(n)},m(e,n){S(e,t,n)},p(e,i){4&i[0]&&n!==(n=e[94].email+"")&&H(t,n)},d(e){e&&O(t)}}}function ao(e){var t;let n,i,o,a,r=(null!=(t=e[94].name)?t:e[4].you.name)+"",s=e[94].email+"";return{c(){n=N(r),i=N(" <"),o=N(s),a=N(">")},m(e,t){S(e,n,t),S(e,i,t),S(e,o,t),S(e,a,t)},p(e,t){var i;20&t[0]&&r!==(r=(null!=(i=e[94].name)?i:e[4].you.name)+"")&&H(n,r),4&t[0]&&s!==(s=e[94].email+"")&&H(o,s)},d(e){e&&O(n),e&&O(i),e&&O(o),e&&O(a)}}}function ro(e){var t;let n,i,o,a,r,s=0===e[96]?"to ":"",l=e[4].you&&(null==(t=e[94])?void 0:t.email)===e[4].you.email_address&&io();function c(e,t){return e[94].email&&e[94].name?ao:e[94].email&&!e[94].name?oo:void 0}let u=c(e),d=u&&u(e);return{c(){n=A("div"),i=A("span"),o=N(s),a=D(),l&&l.c(),r=D(),d&&d.c()},m(e,t){S(e,n,t),k(n,i),k(i,o),k(i,a),l&&l.m(i,null),k(i,r),d&&d.m(i,null)},p(e,t){var n;e[4].you&&(null==(n=e[94])?void 0:n.email)===e[4].you.email_address?l||(l=io(),l.c(),l.m(i,r)):l&&(l.d(1),l=null),u===(u=c(e))&&d?d.p(e,t):(d&&d.d(1),d=u&&u(e),d&&(d.c(),d.m(i,null)))},d(e){e&&O(n),l&&l.d(),d&&d.d()}}}function so(e){let t,n,i,o,a,r,s;return{c(){var r;t=A("div"),n=A("nylas-tooltip"),R(n,"id",i="show-more-participants-"+e[2].id),R(n,"current_tooltip_id",e[12]),R(n,"icon",On),R(n,"text",o=`And ${(null==(r=e[2].to)?void 0:r.length)-ga} more`),R(n,"content",a=""+e[2].to.map(Ta).join(", "))},m(i,o){S(i,t,o),k(t,n),r||(s=$(n,"toggleTooltip",e[25]),r=!0)},p(e,t){var r;4&t[0]&&i!==(i="show-more-participants-"+e[2].id)&&R(n,"id",i),4096&t[0]&&R(n,"current_tooltip_id",e[12]),4&t[0]&&o!==(o=`And ${(null==(r=e[2].to)?void 0:r.length)-ga} more`)&&R(n,"text",o),4&t[0]&&a!==(a=""+e[2].to.map(Ta).join(", "))&&R(n,"content",a)},d(e){e&&O(t),r=!1,s()}}}function lo(e){let t,n,i,o=e[24](new Date(1e3*e[4].message.date))+"";return{c(){t=A("div"),n=A("span"),i=N(o),F(t,"class","message-date")},m(e,o){S(e,t,o),k(t,n),k(n,i)},p(e,t){16&t[0]&&o!==(o=e[24](new Date(1e3*e[4].message.date))+"")&&H(i,o)},d(e){e&&O(t)}}}function co(e){let t,n,i,o,a;return{c(){t=A("nylas-message-body"),R(t,"message",n=e[4].message),R(t,"body",i=e[4].message.body)},m(n,i){S(n,t,i),o||(a=$(t,"downloadClicked",e[28]),o=!0)},p(e,o){16&o[0]&&n!==(n=e[4].message)&&R(t,"message",n),16&o[0]&&i!==(i=e[4].message.body)&&R(t,"body",i)},d(e){e&&O(t),o=!1,a()}}}function uo(e){var t,n;let i,o,a=ni.sanitize(null!=(n=null==(t=e[4].message)?void 0:t.conversation)?n:"")+"";return{c(){i=new G,o=j(),i.a=o},m(e,t){i.m(a,e,t),S(e,o,t)},p(e,t){var n,o;16&t[0]&&a!==(a=ni.sanitize(null!=(o=null==(n=e[4].message)?void 0:n.conversation)?o:"")+"")&&i.p(a)},d(e){e&&O(o),e&&i.d()}}}function po(e){return{c:n,m:n,p:n,i:n,o:n,d:n}}function ho(e){let t,n,i=e[3]&&e[6]&&fo(e);return{c(){i&&i.c(),t=j()},m(e,o){i&&i.m(e,o),S(e,t,o),n=!0},p(e,n){e[3]&&e[6]?i?(i.p(e,n),64&n[0]&&ye(i,1)):(i=fo(e),i.c(),ye(i,1),i.m(t.parentNode,t)):i&&(ve(),be(i,1,1,()=>{i=null}),ge())},i(e){n||(ye(i),n=!0)},o(e){be(i),n=!1},d(e){i&&i.d(e),e&&O(t)}}}function fo(e){let t,n,i,o;const a=[vo,mo],r=[];function s(e,t){return e[6].expanded?0:1}return t=s(e),n=r[t]=a[t](e),{c(){n.c(),i=j()},m(e,n){r[t].m(e,n),S(e,i,n),o=!0},p(e,o){let l=t;t=s(e),t===l?r[t].p(e,o):(ve(),be(r[l],1,1,()=>{r[l]=null}),ge(),n=r[t],n?n.p(e,o):(n=r[t]=a[t](e),n.c()),ye(n,1),n.m(i.parentNode,i))},i(e){o||(ye(n),o=!0)},o(e){be(n),o=!1},d(e){r[t].d(e),e&&O(i)}}}function mo(e){let t,n,i,o;const a=[yo,go],r=[];function s(e,t){return e[6]&&e[6].messages.length<=0?0:1}return n=s(e),i=r[n]=a[n](e),{c(){t=A("div"),i.c(),F(t,"class","email-row condensed"),K(t,"show_star",e[4].show_star),K(t,"unread",e[6].unread),K(t,"disable-click",e[6]&&e[6].messages.length<=0)},m(e,i){S(e,t,i),r[n].m(t,null),o=!0},p(e,o){let l=n;n=s(e),n===l?r[n].p(e,o):(ve(),be(r[l],1,1,()=>{r[l]=null}),ge(),i=r[n],i?i.p(e,o):(i=r[n]=a[n](e),i.c()),ye(i,1),i.m(t,null)),16&o[0]&&K(t,"show_star",e[4].show_star),64&o[0]&&K(t,"unread",e[6].unread),64&o[0]&&K(t,"disable-click",e[6]&&e[6].messages.length<=0)},i(e){o||(ye(i),o=!0)},o(e){be(i),o=!1},d(e){e&&O(t),r[n].d()}}}function vo(e){var t;let n,i,o,a,r,s,l,c,u,d,p,h,f,m,v=(null==(t=e[3])?void 0:t.subject)+"",g="mailbox"===e[4].click_action&&Vo(e),y=e[4].show_star&&Uo(e),b=e[4].show_thread_actions&&Ho(e);const w=[Qo,Go],_=[];function x(e,t){return e[6].messages.length?0:1}return p=x(e),h=_[p]=w[p](e),{c(){n=A("div"),i=A("header"),o=A("div"),g&&g.c(),a=D(),r=A("h1"),s=N(v),l=D(),c=A("div"),y&&y.c(),u=D(),b&&b.c(),d=D(),h.c(),F(c,"role","toolbar"),F(i,"class","subject-title"),K(i,"mailbox","mailbox"===e[4].click_action),F(n,"class",f="email-row expanded "+("mailbox"===e[4].click_action?"expanded-mailbox-thread":""))},m(e,t){S(e,n,t),k(n,i),k(i,o),g&&g.m(o,null),k(o,a),k(o,r),k(r,s),k(i,l),k(i,c),y&&y.m(c,null),k(c,u),b&&b.m(c,null),k(n,d),_[p].m(n,null),m=!0},p(e,t){var r;"mailbox"===e[4].click_action?g?(g.p(e,t),16&t[0]&&ye(g,1)):(g=Vo(e),g.c(),ye(g,1),g.m(o,a)):g&&(ve(),be(g,1,1,()=>{g=null}),ge()),(!m||64&t[0])&&v!==(v=(null==(r=e[3])?void 0:r.subject)+"")&&H(s,v),e[4].show_star?y?y.p(e,t):(y=Uo(e),y.c(),y.m(c,u)):y&&(y.d(1),y=null),e[4].show_thread_actions?b?(b.p(e,t),16&t[0]&&ye(b,1)):(b=Ho(e),b.c(),ye(b,1),b.m(c,null)):b&&(ve(),be(b,1,1,()=>{b=null}),ge()),16&t[0]&&K(i,"mailbox","mailbox"===e[4].click_action);let l=p;p=x(e),p===l?_[p].p(e,t):(ve(),be(_[l],1,1,()=>{_[l]=null}),ge(),h=_[p],h?h.p(e,t):(h=_[p]=w[p](e),h.c()),ye(h,1),h.m(n,null)),(!m||16&t[0]&&f!==(f="email-row expanded "+("mailbox"===e[4].click_action?"expanded-mailbox-thread":"")))&&F(n,"class",f)},i(e){m||(ye(g),ye(b),ye(h),m=!0)},o(e){be(g),be(b),be(h),m=!1},d(e){e&&O(n),g&&g.d(),y&&y.d(),b&&b.d(),_[p].d()}}}function go(e){var t,n,i,o;let a,r,s,l,c,u,d,p,h,f,m,v,g,y,b,w,_,x,C,T,P,E,j,$,L,I,M,R,q,B,z,V,U,W,G,Q=e[26](e[6].messages),Y=ka(e[6].messages,e[6].participants),Z=ka(e[6].messages,e[6].participants),J=(null==(t=e[3])?void 0:t.subject)+"",X=e[3].snippet+"",ee=Object.keys(e[13]).length>0,te=e[6].has_attachments&&Object.keys(e[13]).length>0,ne=(null==(n=e[3])?void 0:n.subject)+"",ie=e[3].snippet+"",oe=Object.keys(e[13]).length>0,ae=e[4].show_star&&bo(e),re=e[4].show_contact_avatar&&wo(e),se=Q&&_o(e),le=Y&&xo(e),ce=Z&&ko(e),ue=e[4].show_number_of_messages&&(null==(o=null==(i=e[6])?void 0:i.messages)?void 0:o.length)>0&&To(e),de=ee&&Oo(e),pe=te&&Eo();const he=[Do,No],fe=[];function me(e,t){return e[4].show_thread_actions?0:e[4].show_received_timestamp?1:-1}~(L=me(e))&&(I=fe[L]=he[L](e));let we=oe&&Lo(e);return{c(){a=A("div"),ae&&ae.c(),r=D(),s=A("div"),re&&re.c(),l=D(),c=A("div"),u=A("div"),se&&se.c(),d=D(),le&&le.c(),p=D(),h=A("div"),ce&&ce.c(),f=D(),ue&&ue.c(),v=D(),g=A("div"),y=A("div"),b=A("div"),w=A("span"),_=N(J),x=D(),C=A("span"),T=N(X),P=D(),de&&de.c(),E=D(),j=A("div"),pe&&pe.c(),$=D(),I&&I.c(),M=D(),R=A("div"),q=A("span"),B=N(ne),z=D(),V=A("span"),U=N(ie),W=D(),we&&we.c(),F(u,"class","participants-name"),K(u,"condensed",ka(e[6].messages,e[6].participants)),F(h,"class","participants-count"),F(c,"class","from-participants"),F(s,"class","from-message-count"),F(a,"class",m="from"+(e[4].show_star?"-star":"")),F(w,"class","subject"),F(C,"class","snippet"),F(b,"class","desktop-subject-snippet"),F(y,"class","snippet-attachment-container"),K(j,"date",e[4].show_received_timestamp),K(j,"action-icons",e[4].show_thread_actions),F(g,"class","subject-snippet-date"),F(q,"class","subject"),F(V,"class","snippet"),F(R,"class","mobile-subject-snippet")},m(e,t){S(e,a,t),ae&&ae.m(a,null),k(a,r),k(a,s),re&&re.m(s,null),k(s,l),k(s,c),k(c,u),se&&se.m(u,null),k(u,d),le&&le.m(u,null),k(c,p),k(c,h),ce&&ce.m(h,null),k(s,f),ue&&ue.m(s,null),S(e,v,t),S(e,g,t),k(g,y),k(y,b),k(b,w),k(w,_),k(b,x),k(b,C),k(C,T),k(y,P),de&&de.m(y,null),k(g,E),k(g,j),pe&&pe.m(j,null),k(j,$),~L&&fe[L].m(j,null),S(e,M,t),S(e,R,t),k(R,q),k(q,B),k(R,z),k(R,V),k(V,U),k(R,W),we&&we.m(R,null),G=!0},p(e,t){var n,i,o,c;e[4].show_star?ae?ae.p(e,t):(ae=bo(e),ae.c(),ae.m(a,r)):ae&&(ae.d(1),ae=null),e[4].show_contact_avatar?re?re.p(e,t):(re=wo(e),re.c(),re.m(s,l)):re&&(re.d(1),re=null),64&t[0]&&(Q=e[26](e[6].messages)),Q?se?se.p(e,t):(se=_o(e),se.c(),se.m(u,d)):se&&(se.d(1),se=null),64&t[0]&&(Y=ka(e[6].messages,e[6].participants)),Y?le?le.p(e,t):(le=xo(e),le.c(),le.m(u,null)):le&&(le.d(1),le=null),64&t[0]&&K(u,"condensed",ka(e[6].messages,e[6].participants)),64&t[0]&&(Z=ka(e[6].messages,e[6].participants)),Z?ce?ce.p(e,t):(ce=ko(e),ce.c(),ce.m(h,null)):ce&&(ce.d(1),ce=null),e[4].show_number_of_messages&&(null==(i=null==(n=e[6])?void 0:n.messages)?void 0:i.length)>0?ue?ue.p(e,t):(ue=To(e),ue.c(),ue.m(s,null)):ue&&(ue.d(1),ue=null),(!G||16&t[0]&&m!==(m="from"+(e[4].show_star?"-star":"")))&&F(a,"class",m),(!G||64&t[0])&&J!==(J=(null==(o=e[3])?void 0:o.subject)+"")&&H(_,J),(!G||64&t[0])&&X!==(X=e[3].snippet+"")&&H(T,X),8192&t[0]&&(ee=Object.keys(e[13]).length>0),ee?de?de.p(e,t):(de=Oo(e),de.c(),de.m(y,null)):de&&(de.d(1),de=null),8256&t[0]&&(te=e[6].has_attachments&&Object.keys(e[13]).length>0),te?pe?8256&t[0]&&ye(pe,1):(pe=Eo(),pe.c(),ye(pe,1),pe.m(j,$)):pe&&(ve(),be(pe,1,1,()=>{pe=null}),ge());let p=L;L=me(e),L===p?~L&&fe[L].p(e,t):(I&&(ve(),be(fe[p],1,1,()=>{fe[p]=null}),ge()),~L?(I=fe[L],I?I.p(e,t):(I=fe[L]=he[L](e),I.c()),ye(I,1),I.m(j,null)):I=null),16&t[0]&&K(j,"date",e[4].show_received_timestamp),16&t[0]&&K(j,"action-icons",e[4].show_thread_actions),(!G||64&t[0])&&ne!==(ne=(null==(c=e[3])?void 0:c.subject)+"")&&H(B,ne),(!G||64&t[0])&&ie!==(ie=e[3].snippet+"")&&H(U,ie),8192&t[0]&&(oe=Object.keys(e[13]).length>0),oe?we?we.p(e,t):(we=Lo(e),we.c(),we.m(R,null)):we&&(we.d(1),we=null)},i(e){G||(ye(pe),ye(I),G=!0)},o(e){be(pe),be(I),G=!1},d(e){e&&O(a),ae&&ae.d(),re&&re.d(),se&&se.d(),le&&le.d(),ce&&ce.d(),ue&&ue.d(),e&&O(v),e&&O(g),de&&de.d(),pe&&pe.d(),~L&&fe[L].d(),e&&O(M),e&&O(R),we&&we.d()}}}function yo(e){let t,n,i,o={ctx:e,current:null,token:null,hasCatch:!1,pending:zo,then:Ro,catch:Mo,value:97,blocks:[,,,]};return we(n=Ca(e[6]),o),{c(){t=j(),o.block.c()},m(e,n){S(e,t,n),o.block.m(e,o.anchor=n),o.mount=()=>t.parentNode,o.anchor=t,i=!0},p(t,i){e=t,o.ctx=e,64&i[0]&&n!==(n=Ca(e[6]))&&we(n,o)||_e(o,e,i)},i(e){i||(ye(o.block),i=!0)},o(e){for(let t=0;t<3;t+=1){const e=o.blocks[t];be(e)}i=!1},d(e){e&&O(t),o.block.d(e),o.token=null,o=null}}}function bo(e){let t,n,i,o,a,r,s,l,c;return{c(){t=A("div"),n=A("button"),F(n,"id",i="thread-star-"+e[4].thread_id),F(n,"class",o=e[6].starred?"starred":""),n.value=a=e[4].thread_id,F(n,"role","switch"),F(n,"aria-checked",r=e[6].starred),F(n,"aria-label",s="Star button for thread "+e[4].thread_id),F(t,"class","starred")},m(i,o){S(i,t,o),k(t,n),l||(c=$(n,"click",L(e[21])),l=!0)},p(e,t){16&t[0]&&i!==(i="thread-star-"+e[4].thread_id)&&F(n,"id",i),64&t[0]&&o!==(o=e[6].starred?"starred":"")&&F(n,"class",o),16&t[0]&&a!==(a=e[4].thread_id)&&(n.value=a),64&t[0]&&r!==(r=e[6].starred)&&F(n,"aria-checked",r),16&t[0]&&s!==(s="Star button for thread "+e[4].thread_id)&&F(n,"aria-label",s)},d(e){e&&O(t),l=!1,c()}}}function wo(e){let t,n;return{c(){t=A("div"),n=A("nylas-contact-image"),R(n,"contact_query",e[11]),R(n,"contact",e[8]),F(t,"class","default-avatar")},m(e,i){S(e,t,i),k(t,n)},p(e,t){2048&t[0]&&R(n,"contact_query",e[11]),256&t[0]&&R(n,"contact",e[8])},d(e){e&&O(t)}}}function _o(e){var t,n;let i,o,a=((null==(t=e[6].messages[e[6].messages.length-1])?void 0:t.from[0].name)||(null==(n=e[6].messages[e[6].messages.length-1])?void 0:n.from[0].email))+"";return{c(){i=A("span"),o=N(a),F(i,"class","from-sub-section")},m(e,t){S(e,i,t),k(i,o)},p(e,t){var n,i;64&t[0]&&a!==(a=((null==(n=e[6].messages[e[6].messages.length-1])?void 0:n.from[0].name)||(null==(i=e[6].messages[e[6].messages.length-1])?void 0:i.from[0].email))+"")&&H(o,a)},d(e){e&&O(i)}}}function xo(e){let t,n,i,o=(e[6].participants[0].name||e[6].participants[0].email)+"";return{c(){t=A("span"),n=N(", "),i=N(o),F(t,"class","from-sub-section second")},m(e,o){S(e,t,o),k(t,n),k(t,i)},p(e,t){64&t[0]&&o!==(o=(e[6].participants[0].name||e[6].participants[0].email)+"")&&H(i,o)},d(e){e&&O(t)}}}function ko(e){let t,n,i=e[6].participants.length>=2&&Co(e),o=e[6].participants.length>2&&So(e);return{c(){i&&i.c(),t=D(),o&&o.c(),n=j()},m(e,a){i&&i.m(e,a),S(e,t,a),o&&o.m(e,a),S(e,n,a)},p(e,a){e[6].participants.length>=2?i?i.p(e,a):(i=Co(e),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null),e[6].participants.length>2?o?o.p(e,a):(o=So(e),o.c(),o.m(n.parentNode,n)):o&&(o.d(1),o=null)},d(e){i&&i.d(e),e&&O(t),o&&o.d(e),e&&O(n)}}}function Co(e){let t,n,i,o=e[6].participants.length-ba+"";return{c(){t=A("span"),n=N(" +"),i=N(o),F(t,"class","show-on-mobile")},m(e,o){S(e,t,o),k(t,n),k(t,i)},p(e,t){64&t[0]&&o!==(o=e[6].participants.length-ba+"")&&H(i,o)},d(e){e&&O(t)}}}function So(e){let t,n,i,o=e[6].participants.length-ya+"";return{c(){t=A("span"),n=N("  + "),i=N(o),F(t,"class","show-on-desktop")},m(e,o){S(e,t,o),k(t,n),k(t,i)},p(e,t){64&t[0]&&o!==(o=e[6].participants.length-ya+"")&&H(i,o)},d(e){e&&O(t)}}}function To(e){let t,n,i=e[6].messages.length+"";return{c(){t=A("span"),n=N(i),F(t,"class","thread-message-count")},m(e,i){S(e,t,i),k(t,n)},p(e,t){64&t[0]&&i!==(i=e[6].messages.length+"")&&H(n,i)},d(e){e&&O(t)}}}function Oo(e){let t,n=Object.values(e[13]),i=[];for(let o=0;o<n.length;o+=1)i[o]=Ao(Gi(e,n,o));return{c(){t=A("div");for(let e=0;e<i.length;e+=1)i[e].c();F(t,"class","attachment desktop")},m(e,n){S(e,t,n);for(let o=0;o<i.length;o+=1)i[o].m(t,null)},p(e,o){if(134225920&o[0]){let a;for(n=Object.values(e[13]),a=0;a<n.length;a+=1){const r=Gi(e,n,a);i[a]?i[a].p(r,o):(i[a]=Ao(r),i[a].c(),i[a].m(t,null))}for(;a<i.length;a+=1)i[a].d(1);i.length=n.length}},d(e){e&&O(t),P(i,e)}}}function Po(e){let t,n,i,o,a,r=(e[91].filename||e[91].id)+"";function s(...t){return e[62](e[91],...t)}return{c(){t=A("button"),n=N(r),i=D()},m(e,r){S(e,t,r),k(t,n),k(t,i),o||(a=$(t,"click",s),o=!0)},p(t,i){e=t,8192&i[0]&&r!==(r=(e[91].filename||e[91].id)+"")&&H(n,r)},d(e){e&&O(t),o=!1,a()}}}function Ao(e){let t,n=e[90],i=[];for(let o=0;o<n.length;o+=1)i[o]=Po(Qi(e,n,o));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=j()},m(e,n){for(let t=0;t<i.length;t+=1)i[t].m(e,n);S(e,t,n)},p(e,o){if(134225920&o[0]){let a;for(n=e[90],a=0;a<n.length;a+=1){const r=Qi(e,n,a);i[a]?i[a].p(r,o):(i[a]=Po(r),i[a].c(),i[a].m(t.parentNode,t))}for(;a<i.length;a+=1)i[a].d(1);i.length=n.length}},d(e){P(i,e),e&&O(t)}}}function Eo(e){let t,n,i;return n=new Rn({}),{c(){t=A("span"),ke(n.$$.fragment)},m(e,o){S(e,t,o),Ce(n,t,null),i=!0},i(e){i||(ye(n.$$.fragment,e),i=!0)},o(e){be(n.$$.fragment,e),i=!1},d(e){e&&O(t),Se(n)}}}function No(e){let t,i,o=e[24](new Date(1e3*e[3].last_message_timestamp))+"";return{c(){t=A("span"),i=N(o)},m(e,n){S(e,t,n),k(t,i)},p(e,t){64&t[0]&&o!==(o=e[24](new Date(1e3*e[3].last_message_timestamp))+"")&&H(i,o)},i:n,o:n,d(e){e&&O(t)}}}function Do(e){let t,n,i,o,a,r,l,c,u,d,p,h,f;i=new En({});const m=[$o,jo],v=[];function g(e,t){return e[6].unread?0:1}return l=g(e),c=v[l]=m[l](e),{c(){t=A("div"),n=A("button"),ke(i.$$.fragment),o=D(),a=A("div"),r=A("button"),c.c(),F(n,"title","Delete thread"),F(n,"aria-label","Delete thread"),F(t,"class","delete"),F(r,"title",u=`Mark thread as ${e[6].unread?"":"un"}read`),F(r,"aria-label",d=`Mark thread as ${e[6].unread?"":"un"}read`),F(a,"class","read-status")},m(s,c){S(s,t,c),k(t,n),Ce(i,n,null),S(s,o,c),S(s,a,c),k(a,r),v[l].m(r,null),p=!0,h||(f=[$(n,"click",I(e[17])),$(r,"click",I(e[16]))],h=!0)},p(e,t){let n=l;l=g(e),l!==n&&(ve(),be(v[n],1,1,()=>{v[n]=null}),ge(),c=v[l],c||(c=v[l]=m[l](e),c.c()),ye(c,1),c.m(r,null)),(!p||64&t[0]&&u!==(u=`Mark thread as ${e[6].unread?"":"un"}read`))&&F(r,"title",u),(!p||64&t[0]&&d!==(d=`Mark thread as ${e[6].unread?"":"un"}read`))&&F(r,"aria-label",d)},i(e){p||(ye(i.$$.fragment,e),ye(c),p=!0)},o(e){be(i.$$.fragment,e),be(c),p=!1},d(e){e&&O(t),Se(i),e&&O(o),e&&O(a),v[l].d(),h=!1,s(f)}}}function jo(e){let t,n;return t=new In({props:{"aria-hidden":"true"}}),{c(){ke(t.$$.fragment)},m(e,i){Ce(t,e,i),n=!0},i(e){n||(ye(t.$$.fragment,e),n=!0)},o(e){be(t.$$.fragment,e),n=!1},d(e){Se(t,e)}}}function $o(e){let t,n;return t=new jn({props:{"aria-hidden":"true"}}),{c(){ke(t.$$.fragment)},m(e,i){Ce(t,e,i),n=!0},i(e){n||(ye(t.$$.fragment,e),n=!0)},o(e){be(t.$$.fragment,e),n=!1},d(e){Se(t,e)}}}function Lo(e){let t,n=Object.values(e[13]),i=[];for(let o=0;o<n.length;o+=1)i[o]=Fo(Wi(e,n,o));return{c(){t=A("div");for(let e=0;e<i.length;e+=1)i[e].c();F(t,"class","attachment mobile")},m(e,n){S(e,t,n);for(let o=0;o<i.length;o+=1)i[o].m(t,null)},p(e,o){if(134225920&o[0]){let a;for(n=Object.values(e[13]),a=0;a<n.length;a+=1){const r=Wi(e,n,a);i[a]?i[a].p(r,o):(i[a]=Fo(r),i[a].c(),i[a].m(t,null))}for(;a<i.length;a+=1)i[a].d(1);i.length=n.length}},d(e){e&&O(t),P(i,e)}}}function Io(e){let t,n,i,o,a,r=(e[91].filename||e[91].id)+"";function s(...t){return e[63](e[91],...t)}return{c(){t=A("button"),n=N(r),i=D()},m(e,r){S(e,t,r),k(t,n),k(t,i),o||(a=$(t,"click",s),o=!0)},p(t,i){e=t,8192&i[0]&&r!==(r=(e[91].filename||e[91].id)+"")&&H(n,r)},d(e){e&&O(t),o=!1,a()}}}function Fo(e){let t,n=e[90],i=[];for(let o=0;o<n.length;o+=1)i[o]=Io(Ki(e,n,o));return{c(){for(let e=0;e<i.length;e+=1)i[e].c();t=j()},m(e,n){for(let t=0;t<i.length;t+=1)i[t].m(e,n);S(e,t,n)},p(e,o){if(134225920&o[0]){let a;for(n=e[90],a=0;a<n.length;a+=1){const r=Ki(e,n,a);i[a]?i[a].p(r,o):(i[a]=Io(r),i[a].c(),i[a].m(t.parentNode,t))}for(;a<i.length;a+=1)i[a].d(1);i.length=n.length}},d(e){P(i,e),e&&O(t)}}}function Mo(e){return{c:n,m:n,p:n,i:n,o:n,d:n}}function Ro(e){let t,n,i,o,a,r,s,l,c,u=e[97]?"This is a draft email.":"Sorry, looks like this thread is currently unavailable. It may\n                  have been deleted in your provider inbox.";const d=[Bo,qo],p=[];function h(e,t){return e[97]?0:1}return i=h(e),o=p[i]=d[i](e),{c(){t=A("div"),n=A("div"),o.c(),r=D(),s=A("div"),l=N(u),F(n,"class","default-avatar"),K(n,"draft",e[97]),F(t,"class",a="no-message-avatar-container "+(e[4].show_star?"show-star":"")),F(s,"class","no-messages-warning-container"),K(s,"draft",e[97])},m(e,o){S(e,t,o),k(t,n),p[i].m(n,null),S(e,r,o),S(e,s,o),k(s,l),c=!0},p(e,r){let f=i;i=h(e),i!==f&&(ve(),be(p[f],1,1,()=>{p[f]=null}),ge(),o=p[i],o||(o=p[i]=d[i](e),o.c()),ye(o,1),o.m(n,null)),64&r[0]&&K(n,"draft",e[97]),(!c||16&r[0]&&a!==(a="no-message-avatar-container "+(e[4].show_star?"show-star":"")))&&F(t,"class",a),(!c||64&r[0])&&u!==(u=e[97]?"This is a draft email.":"Sorry, looks like this thread is currently unavailable. It may\n                  have been deleted in your provider inbox.")&&H(l,u),64&r[0]&&K(s,"draft",e[97])},i(e){c||(ye(o),c=!0)},o(e){be(o),c=!1},d(e){e&&O(t),p[i].d(),e&&O(r),e&&O(s)}}}function qo(e){let t,n;return t=new Hn({}),{c(){ke(t.$$.fragment)},m(e,i){Ce(t,e,i),n=!0},i(e){n||(ye(t.$$.fragment,e),n=!0)},o(e){be(t.$$.fragment,e),n=!1},d(e){Se(t,e)}}}function Bo(e){let t,n;return t=new Gn({}),{c(){ke(t.$$.fragment)},m(e,i){Ce(t,e,i),n=!0},i(e){n||(ye(t.$$.fragment,e),n=!0)},o(e){be(t.$$.fragment,e),n=!1},d(e){Se(t,e)}}}function zo(e){return{c:n,m:n,p:n,i:n,o:n,d:n}}function Vo(e){let t,i,o,a,r;return i=new zn({}),{c(){t=A("button"),ke(i.$$.fragment),F(t,"title","Return to Mailbox"),F(t,"aria-label","Return to Mailbox")},m(n,s){S(n,t,s),Ce(i,t,null),o=!0,a||(r=$(t,"click",I(e[19])),a=!0)},p:n,i(e){o||(ye(i.$$.fragment,e),o=!0)},o(e){be(i.$$.fragment,e),o=!1},d(e){e&&O(t),Se(i),a=!1,r()}}}function Uo(e){let t,n,i,o,a,r,s,l;return{c(){t=A("div"),n=A("button"),F(n,"class",i=e[3].starred?"starred":""),F(n,"title",o=e[3].starred?"Unstar thread":"Star thread"),F(n,"aria-label",a=e[3].starred?"Unstar thread":"Star thread"),F(n,"role","switch"),F(n,"aria-checked",r=e[3].starred),F(t,"class","starred")},m(i,o){S(i,t,o),k(t,n),s||(l=$(n,"click",I(e[21])),s=!0)},p(e,t){64&t[0]&&i!==(i=e[3].starred?"starred":"")&&F(n,"class",i),64&t[0]&&o!==(o=e[3].starred?"Unstar thread":"Star thread")&&F(n,"title",o),64&t[0]&&a!==(a=e[3].starred?"Unstar thread":"Star thread")&&F(n,"aria-label",a),64&t[0]&&r!==(r=e[3].starred)&&F(n,"aria-checked",r)},d(e){e&&O(t),s=!1,l()}}}function Ho(e){let t,n,i,o,a,r,l,c,u,d,p,h,f;i=new En({});const m=[Ko,Wo],v=[];function g(e,t){return e[6].unread?0:1}return l=g(e),c=v[l]=m[l](e),{c(){t=A("div"),n=A("button"),ke(i.$$.fragment),o=D(),a=A("div"),r=A("button"),c.c(),F(n,"title","Delete thread / Move to trash"),F(n,"aria-label","Delete thread (Move to trash)"),F(t,"class","delete"),F(r,"title",u=`Mark thread as ${e[6].unread?"":"un"}read`),F(r,"aria-label",d=`Mark thread as ${e[6].unread?"":"un"}read`),F(a,"class","read-status")},m(s,c){S(s,t,c),k(t,n),Ce(i,n,null),S(s,o,c),S(s,a,c),k(a,r),v[l].m(r,null),p=!0,h||(f=[$(n,"click",I(e[57])),$(r,"click",I(e[16]))],h=!0)},p(e,t){let n=l;l=g(e),l!==n&&(ve(),be(v[n],1,1,()=>{v[n]=null}),ge(),c=v[l],c||(c=v[l]=m[l](e),c.c()),ye(c,1),c.m(r,null)),(!p||64&t[0]&&u!==(u=`Mark thread as ${e[6].unread?"":"un"}read`))&&F(r,"title",u),(!p||64&t[0]&&d!==(d=`Mark thread as ${e[6].unread?"":"un"}read`))&&F(r,"aria-label",d)},i(e){p||(ye(i.$$.fragment,e),ye(c),p=!0)},o(e){be(i.$$.fragment,e),be(c),p=!1},d(e){e&&O(t),Se(i),e&&O(o),e&&O(a),v[l].d(),h=!1,s(f)}}}function Wo(e){let t,n;return t=new In({props:{"aria-hidden":"true"}}),{c(){ke(t.$$.fragment)},m(e,i){Ce(t,e,i),n=!0},i(e){n||(ye(t.$$.fragment,e),n=!0)},o(e){be(t.$$.fragment,e),n=!1},d(e){Se(t,e)}}}function Ko(e){let t,n;return t=new jn({props:{"aria-hidden":"true"}}),{c(){ke(t.$$.fragment)},m(e,i){Ce(t,e,i),n=!0},i(e){n||(ye(t.$$.fragment,e),n=!0)},o(e){be(t.$$.fragment,e),n=!1},d(e){Se(t,e)}}}function Go(e){let t,i,o=e[3].snippet+"";return{c(){t=A("span"),i=N(o),F(t,"class","snippet")},m(e,n){S(e,t,n),k(t,i)},p(e,t){64&t[0]&&o!==(o=e[3].snippet+"")&&H(i,o)},i:n,o:n,d(e){e&&O(t)}}}function Qo(e){let t,n,i=e[6].messages,o=[];for(let r=0;r<i.length;r+=1)o[r]=fa(Yi(e,i,r));const a=e=>be(o[e],1,1,()=>{o[e]=null});return{c(){for(let e=0;e<o.length;e+=1)o[e].c();t=j()},m(e,i){for(let t=0;t<o.length;t+=1)o[t].m(e,i);S(e,t,i),n=!0},p(e,n){if(314621170&n[0]){let r;for(i=e[6].messages,r=0;r<i.length;r+=1){const a=Yi(e,i,r);o[r]?(o[r].p(a,n),ye(o[r],1)):(o[r]=fa(a),o[r].c(),ye(o[r],1),o[r].m(t.parentNode,t))}for(ve(),r=i.length;r<o.length;r+=1)a(r);ge()}},i(e){if(!n){for(let e=0;e<i.length;e+=1)ye(o[e]);n=!0}},o(e){o=o.filter(Boolean);for(let t=0;t<o.length;t+=1)be(o[t]);n=!1},d(e){P(o,e),e&&O(t)}}}function Yo(e){var t,i,o;let a,r,s,l,c,u,d,p,h,f,m,v,g,y,b,w,_,x,C,T=(e[7]&&(null==(t=e[2])?void 0:t.from[0].email)===e[7]?"me":(null==(i=e[2])?void 0:i.from[0].name)||(null==(o=e[2])?void 0:o.from[0].email))+"",P=xa(new Date(1e3*e[2].date))+"",E=e[2].snippet+"",j=e[4].show_contact_avatar&&Jo(e);return{c(){var t,n;a=A("div"),r=A("div"),j&&j.c(),s=D(),l=A("div"),c=A("span"),u=N(T),d=D(),p=A("nylas-tooltip"),m=D(),v=A("div"),g=A("span"),y=N(P),b=D(),w=A("div"),_=N(E),F(c,"class","name"),R(p,"id",h=null==(t=e[2])?void 0:t.id.slice(0,3)),R(p,"current_tooltip_id",e[12]),R(p,"icon",On),R(p,"content",f=null==(n=e[2])?void 0:n.from[0].email),F(l,"class","message-from"),F(r,"class","avatar-from"),F(v,"class","message-date"),F(a,"class","message-head"),F(w,"class","snippet")},m(t,n){S(t,a,n),k(a,r),j&&j.m(r,null),k(r,s),k(r,l),k(l,c),k(c,u),k(l,d),k(l,p),k(a,m),k(a,v),k(v,g),k(g,y),S(t,b,n),S(t,w,n),k(w,_),x||(C=$(p,"toggleTooltip",e[25]),x=!0)},p(e,t){var n,i,o,a,l;e[4].show_contact_avatar?j?j.p(e,t):(j=Jo(e),j.c(),j.m(r,s)):j&&(j.d(1),j=null),192&t[0]&&T!==(T=(e[7]&&(null==(n=e[2])?void 0:n.from[0].email)===e[7]?"me":(null==(i=e[2])?void 0:i.from[0].name)||(null==(o=e[2])?void 0:o.from[0].email))+"")&&H(u,T),64&t[0]&&h!==(h=null==(a=e[2])?void 0:a.id.slice(0,3))&&R(p,"id",h),4096&t[0]&&R(p,"current_tooltip_id",e[12]),64&t[0]&&f!==(f=null==(l=e[2])?void 0:l.from[0].email)&&R(p,"content",f),64&t[0]&&P!==(P=xa(new Date(1e3*e[2].date))+"")&&H(y,P),64&t[0]&&E!==(E=e[2].snippet+"")&&H(_,E)},i:n,o:n,d(e){e&&O(a),j&&j.d(),e&&O(b),e&&O(w),x=!1,C()}}}function Zo(e){var t,n,i,o,a;let r,s,l,c,u,d,p,h,f,m,v,g,y,b,w,_,x,C,T,E,j,L,I,M,q,B=(e[7]&&(null==(t=e[2])?void 0:t.from[0].email)===e[7]?"me":(null==(n=e[2])?void 0:n.from[0].name)||(null==(i=e[2])?void 0:i.from[0].email))+"",z=xa(new Date(1e3*e[2].date))+"",V=e[4].show_contact_avatar&&Xo(e),U=null==(o=e[2])?void 0:o.to.slice(0,ga),W=[];for(let k=0;k<U.length;k+=1)W[k]=ia(Ji(e,U,k));let K=(null==(a=e[2].to)?void 0:a.length)>ga&&oa(e);const G=[la,sa,ra,aa],Q=[];function Y(e,t){return e[4].clean_conversation&&e[2].conversation?0:e[2]&&null!=e[2].body?1:e[4].thread&&!e[4].thread_id&&"mailbox"!=e[1]?2:3}return j=Y(e),L=Q[j]=G[j](e),{c(){var t,n;r=A("div"),s=A("div"),l=A("div"),V&&V.c(),c=D(),u=A("div"),d=A("span"),p=N(B),h=D(),f=A("nylas-tooltip"),g=D(),y=A("div");for(let e=0;e<W.length;e+=1)W[e].c();b=D(),K&&K.c(),w=D(),_=A("div"),x=A("span"),C=N(z),T=D(),E=A("div"),L.c(),F(d,"class","name"),R(f,"id",m=null==(t=e[2])?void 0:t.id.slice(0,3)),R(f,"current_tooltip_id",e[12]),R(f,"icon",On),R(f,"content",v=null==(n=e[2])?void 0:n.from[0].email),F(u,"class","message-from"),F(l,"class","avatar-from"),F(y,"class","message-to"),F(s,"class","message-from-to"),F(_,"class","message-date"),F(r,"class","message-head"),F(E,"class","message-body")},m(t,n){S(t,r,n),k(r,s),k(s,l),V&&V.m(l,null),k(l,c),k(l,u),k(u,d),k(d,p),k(u,h),k(u,f),k(s,g),k(s,y);for(let e=0;e<W.length;e+=1)W[e].m(y,null);k(y,b),K&&K.m(y,null),k(r,w),k(r,_),k(_,x),k(x,C),S(t,T,n),S(t,E,n),Q[j].m(E,null),I=!0,M||(q=$(f,"toggleTooltip",e[25]),M=!0)},p(e,t){var n,i,o,a,r,s,u;if(e[4].show_contact_avatar?V?V.p(e,t):(V=Xo(e),V.c(),V.m(l,c)):V&&(V.d(1),V=null),(!I||192&t[0])&&B!==(B=(e[7]&&(null==(n=e[2])?void 0:n.from[0].email)===e[7]?"me":(null==(i=e[2])?void 0:i.from[0].name)||(null==(o=e[2])?void 0:o.from[0].email))+"")&&H(p,B),(!I||64&t[0]&&m!==(m=null==(a=e[2])?void 0:a.id.slice(0,3)))&&R(f,"id",m),(!I||4096&t[0])&&R(f,"current_tooltip_id",e[12]),(!I||64&t[0]&&v!==(v=null==(r=e[2])?void 0:r.from[0].email))&&R(f,"content",v),80&t[0]){let n;for(U=null==(s=e[2])?void 0:s.to.slice(0,ga),n=0;n<U.length;n+=1){const i=Ji(e,U,n);W[n]?W[n].p(i,t):(W[n]=ia(i),W[n].c(),W[n].m(y,b))}for(;n<W.length;n+=1)W[n].d(1);W.length=U.length}(null==(u=e[2].to)?void 0:u.length)>ga?K?K.p(e,t):(K=oa(e),K.c(),K.m(y,null)):K&&(K.d(1),K=null),(!I||64&t[0])&&z!==(z=xa(new Date(1e3*e[2].date))+"")&&H(C,z);let d=j;j=Y(e),j===d?Q[j].p(e,t):(ve(),be(Q[d],1,1,()=>{Q[d]=null}),ge(),L=Q[j],L?L.p(e,t):(L=Q[j]=G[j](e),L.c()),ye(L,1),L.m(E,null))},i(e){I||(ye(L),I=!0)},o(e){be(L),I=!1},d(e){e&&O(r),V&&V.d(),P(W,e),K&&K.d(),e&&O(T),e&&O(E),Q[j].d(),M=!1,q()}}}function Jo(e){let t,n,i;return{c(){var o;t=A("div"),n=A("nylas-contact-image"),R(n,"contact_query",e[11]),R(n,"contact",i=e[5][null==(o=e[2])?void 0:o.from[0].email]),F(t,"class","default-avatar")},m(e,i){S(e,t,i),k(t,n)},p(e,t){var o;2048&t[0]&&R(n,"contact_query",e[11]),96&t[0]&&i!==(i=e[5][null==(o=e[2])?void 0:o.from[0].email])&&R(n,"contact",i)},d(e){e&&O(t)}}}function Xo(e){let t,n,i;return{c(){var o;t=A("div"),n=A("nylas-contact-image"),R(n,"contact_query",e[11]),R(n,"contact",i=e[5][null==(o=e[2])?void 0:o.from[0].email]),F(t,"class","default-avatar")},m(e,i){S(e,t,i),k(t,n)},p(e,t){var o;2048&t[0]&&R(n,"contact_query",e[11]),96&t[0]&&i!==(i=e[5][null==(o=e[2])?void 0:o.from[0].email])&&R(n,"contact",i)},d(e){e&&O(t)}}}function ea(e){let t;return{c(){t=N("Me")},m(e,n){S(e,t,n)},d(e){e&&O(t)}}}function ta(e){let t,n=e[94].email+"";return{c(){t=N(n)},m(e,n){S(e,t,n)},p(e,i){64&i[0]&&n!==(n=e[94].email+"")&&H(t,n)},d(e){e&&O(t)}}}function na(e){var t;let n,i,o,a,r=(null!=(t=e[94].name)?t:e[4].you.name)+"",s=e[94].email+"";return{c(){n=N(r),i=N(" <"),o=N(s),a=N(">")},m(e,t){S(e,n,t),S(e,i,t),S(e,o,t),S(e,a,t)},p(e,t){var i;80&t[0]&&r!==(r=(null!=(i=e[94].name)?i:e[4].you.name)+"")&&H(n,r),64&t[0]&&s!==(s=e[94].email+"")&&H(o,s)},d(e){e&&O(n),e&&O(i),e&&O(o),e&&O(a)}}}function ia(e){var t;let n,i,o,a,r,s=0===e[96]?"to ":"",l=e[4].you&&(null==(t=e[94])?void 0:t.email)===e[4].you.email_address&&ea();function c(e,t){return e[94].email&&e[94].name?na:e[94].email&&!e[94].name?ta:void 0}let u=c(e),d=u&&u(e);return{c(){n=A("div"),i=A("span"),o=N(s),a=D(),l&&l.c(),r=D(),d&&d.c()},m(e,t){S(e,n,t),k(n,i),k(i,o),k(i,a),l&&l.m(i,null),k(i,r),d&&d.m(i,null)},p(e,t){var n;e[4].you&&(null==(n=e[94])?void 0:n.email)===e[4].you.email_address?l||(l=ea(),l.c(),l.m(i,r)):l&&(l.d(1),l=null),u===(u=c(e))&&d?d.p(e,t):(d&&d.d(1),d=u&&u(e),d&&(d.c(),d.m(i,null)))},d(e){e&&O(n),l&&l.d(),d&&d.d()}}}function oa(e){let t,n,i,o,a,r,s;return{c(){var r;t=A("div"),n=A("nylas-tooltip"),R(n,"id",i="show-more-participants-"+e[2].id),R(n,"current_tooltip_id",e[12]),R(n,"icon",On),R(n,"text",o=`And ${(null==(r=e[2].to)?void 0:r.length)-ga} more`),R(n,"content",a=""+e[2].to.map(Sa).join(", "))},m(i,o){S(i,t,o),k(t,n),r||(s=$(n,"toggleTooltip",e[25]),r=!0)},p(e,t){var r;64&t[0]&&i!==(i="show-more-participants-"+e[2].id)&&R(n,"id",i),4096&t[0]&&R(n,"current_tooltip_id",e[12]),64&t[0]&&o!==(o=`And ${(null==(r=e[2].to)?void 0:r.length)-ga} more`)&&R(n,"text",o),64&t[0]&&a!==(a=""+e[2].to.map(Sa).join(", "))&&R(n,"content",a)},d(e){e&&O(t),r=!1,s()}}}function aa(e){let t,i,o,a;return i=new Ui({props:{class:"spinner"}}),{c(){t=A("div"),ke(i.$$.fragment),o=N("\n                          Loading..."),F(t,"class","email-loader")},m(e,n){S(e,t,n),Ce(i,t,null),k(t,o),a=!0},p:n,i(e){a||(ye(i.$$.fragment,e),a=!0)},o(e){be(i.$$.fragment,e),a=!1},d(e){e&&O(t),Se(i)}}}function ra(e){var t;let i,o,a,r,s=(null!=(t=e[2].body)?t:e[2].snippet)+"",l={ctx:e,current:null,token:null,hasCatch:!1,pending:ha,then:ua,catch:ca,value:90};return we(r=e[13][e[2].id],l),{c(){i=N(s),o=D(),a=j(),l.block.c()},m(e,t){S(e,i,t),S(e,o,t),S(e,a,t),l.block.m(e,l.anchor=t),l.mount=()=>a.parentNode,l.anchor=a},p(t,n){var o;e=t,64&n[0]&&s!==(s=(null!=(o=e[2].body)?o:e[2].snippet)+"")&&H(i,s),l.ctx=e,8256&n[0]&&r!==(r=e[13][e[2].id])&&we(r,l)||_e(l,e,n)},i:n,o:n,d(e){e&&O(i),e&&O(o),e&&O(a),l.block.d(e),l.token=null,l=null}}}function sa(e){let t,i,o,a,r;return{c(){t=A("nylas-message-body"),R(t,"message",i=e[2]),R(t,"body",o=e[2].body)},m(n,i){S(n,t,i),a||(r=$(t,"downloadClicked",e[28]),a=!0)},p(e,n){64&n[0]&&i!==(i=e[2])&&R(t,"message",i),64&n[0]&&o!==(o=e[2].body)&&R(t,"body",o)},i:n,o:n,d(e){e&&O(t),a=!1,r()}}}function la(e){let t,i,o=ni.sanitize(e[2].conversation)+"";return{c(){t=new G,i=j(),t.a=i},m(e,n){t.m(o,e,n),S(e,i,n)},p(e,n){64&n[0]&&o!==(o=ni.sanitize(e[2].conversation)+"")&&t.p(o)},i:n,o:n,d(e){e&&O(i),e&&t.d()}}}function ca(e){return{c:n,m:n,p:n,d:n}}function ua(e){let t,n=e[90]&&Array.isArray(e[90])&&e[90].length>0,i=n&&da(e);return{c(){i&&i.c(),t=j()},m(e,n){i&&i.m(e,n),S(e,t,n)},p(e,o){8256&o[0]&&(n=e[90]&&Array.isArray(e[90])&&e[90].length>0),n?i?i.p(e,o):(i=da(e),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(e){i&&i.d(e),e&&O(t)}}}function da(e){let t,n=e[90],i=[];for(let o=0;o<n.length;o+=1)i[o]=pa(Zi(e,n,o));return{c(){t=A("div");for(let e=0;e<i.length;e+=1)i[e].c();F(t,"class","attachment")},m(e,n){S(e,t,n);for(let o=0;o<i.length;o+=1)i[o].m(t,null)},p(e,o){if(41024&o[0]){let a;for(n=e[90],a=0;a<n.length;a+=1){const r=Zi(e,n,a);i[a]?i[a].p(r,o):(i[a]=pa(r),i[a].c(),i[a].m(t,null))}for(;a<i.length;a+=1)i[a].d(1);i.length=n.length}},d(e){e&&O(t),P(i,e)}}}function pa(e){let t,n,i,o,a,r=(e[91].filename||e[91].id)+"";function s(...t){return e[58](e[91],...t)}return{c(){t=A("button"),n=N(r),i=D()},m(e,r){S(e,t,r),k(t,n),k(t,i),o||(a=$(t,"click",I(s)),o=!0)},p(t,i){e=t,8256&i[0]&&r!==(r=(e[91].filename||e[91].id)+"")&&H(n,r)},d(e){e&&O(t),o=!1,a()}}}function ha(e){return{c:n,m:n,p:n,d:n}}function fa(e){let t,n,i,o,a,r,l,c,u=e[89];const d=[Zo,Yo],p=[];function h(e,t){return e[2].expanded||e[89]===e[6].messages.length-1?0:1}n=h(e),i=p[n]=d[n](e);const f=()=>e[59](t,u),m=()=>e[59](null,u);function v(...t){return e[60](e[89],...t)}function g(...t){return e[61](e[89],...t)}return{c(){t=A("div"),i.c(),o=D(),F(t,"class",a="individual-message "+(e[89]===e[6].messages.length-1||e[2].expanded?"expanded":"condensed")),K(t,"last-message",e[89]===e[6].messages.length-1)},m(e,i){S(e,t,i),p[n].m(t,null),k(t,o),f(),r=!0,l||(c=[$(t,"click",I(v)),$(t,"keypress",g)],l=!0)},p(s,l){e=s;let c=n;n=h(e),n===c?p[n].p(e,l):(ve(),be(p[c],1,1,()=>{p[c]=null}),ge(),i=p[n],i?i.p(e,l):(i=p[n]=d[n](e),i.c()),ye(i,1),i.m(t,o)),(!r||64&l[0]&&a!==(a="individual-message "+(e[89]===e[6].messages.length-1||e[2].expanded?"expanded":"condensed")))&&F(t,"class",a),u!==e[89]&&(m(),u=e[89],f()),64&l[0]&&K(t,"last-message",e[89]===e[6].messages.length-1)},i(e){r||(ye(i),r=!0)},o(e){be(i),r=!1},d(e){e&&O(t),p[n].d(),m(),l=!1,s(c)}}}function ma(e){let t;return{c(){t=N("Loading...")},m(e,n){S(e,t,n)},p:n,i:n,o:n,d(e){e&&O(t)}}}function va(e){let t,i,o,a,r,l,c,u;const d=[eo,Xi],p=[];function h(e,t){return e[4].thread||e[4].thread_id?0:e[4].message?1:-1}return~(a=h(e))&&(r=p[a]=d[a](e)),{c(){t=A("nylas-error"),i=D(),o=A("main"),r&&r.c(),this.c=n,R(t,"id",e[0]),F(o,"tabindex","0")},m(n,r){S(n,t,r),S(n,i,r),S(n,o,r),~a&&p[a].m(o,null),e[64](o),l=!0,c||(u=[$(o,"click",e[18]),$(o,"keypress",e[20])],c=!0)},p(e,n){(!l||1&n[0])&&R(t,"id",e[0]);let i=a;a=h(e),a===i?~a&&p[a].p(e,n):(r&&(ve(),be(p[i],1,1,()=>{p[i]=null}),ge()),~a?(r=p[a],r?r.p(e,n):(r=p[a]=d[a](e),r.c()),ye(r,1),r.m(o,null)):r=null)},i(e){l||(ye(r),l=!0)},o(e){be(r),l=!1},d(n){n&&O(t),n&&O(i),n&&O(o),~a&&p[a].d(),e[64](null),c=!1,s(u)}}}const ga=3,ya=2,ba=1,wa=20;function _a(e){e.stopImmediatePropagation()}function xa(e){return e.toLocaleDateString("en-US",{weekday:"short",month:"long",day:"numeric"})+", "+e.toLocaleTimeString("en-US",{hour12:!0,hour:"numeric",minute:"2-digit"})}function ka(e,t){var n,i;return e&&t&&e.length>1&&t.length>=2&&(null===(n=e[0])||void 0===n?void 0:n.from.length)&&t[0].email!==(null===(i=e[e.length-1])||void 0===i?void 0:i.from[0].email)}function Ca(e){var t;return e&&(null===(t=e.labels)||void 0===t?void 0:t.find(e=>"drafts"===e.name))}const Sa=e=>`${e.name} ${e.email}`,Ta=e=>`${e.name} ${e.email}`;function Oa(e,t,n){let o,a,r,s,l,c,u;m(e,zt,e=>n(71,s=e)),m(e,tn,e=>n(55,l=e)),m(e,on,e=>n(72,c=e)),m(e,$e,e=>n(56,u=e));var d,p,h,f,g,y,b,w=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i.throw(e))}catch(t){a(t)}}function l(e){e.done?n(e.value):o(e.value).then(r,s)}l((i=i.apply(e,t||[])).next())}))};const _=fn(Z());let{id:x=""}=t,{access_token:k=""}=t,{clean_conversation:C}=t,{click_action:S="default"}=t,{message_id:T}=t,{message:O}=t,{show_contact_avatar:P}=t,{show_expanded_email_view_onload:A}=t,{show_number_of_messages:E}=t,{show_received_timestamp:N}=t,{show_star:D}=t,{show_thread_actions:j}=t,{theme:$}=t,{thread_id:L}=t,{thread:I}=t,{you:F}=t;const M={clean_conversation:!1,click_action:"default",message_id:"",show_contact_avatar:!0,show_expanded_email_view_onload:!1,show_number_of_messages:!0,show_received_timestamp:!0,show_star:!1,show_thread_actions:!1,theme:"theme-1",thread_id:"",you:{}};let R,q={},B=mn({},{},M);X(()=>w(void 0,void 0,void 0,(function*(){var e,i,o,a;if(yield se(),n(48,q=(yield c[JSON.stringify({component_id:x,access_token:k})])||{}),n(4,B=mn(t,q,M)),V(),x&&!(null===(e=B.you)||void 0===e?void 0:e.id)&&!ne){n(4,B.you=yield st({component_id:Q.component_id,access_token:k}),B),n(7,R=null===(i=B.you)||void 0===i?void 0:i.email_address);const e={component_id:x,access_token:k};(null===(o=B.you)||void 0===o?void 0:o.organization_unit)===_i.Label?n(51,re=yield Di.getLabels(e)):(null===(a=B.you)||void 0===a?void 0:a.organization_unit)===_i.Folder&&n(52,le=yield Bi.getFolders(e))}})));let z=t;function V(){return w(this,void 0,void 0,(function*(){n(4,B.thread_id=I||T||O?"":B.thread_id,B),x&&!B.thread_id&&!B.thread&&B.message_id&&Ce(),(!J||z.thread_id!==B.thread_id)&&(yield ue())}))}let U={},H={},W=!1;function K(e){var t;return w(this,void 0,void 0,(function*(){const i=(null===(t=e.messages)||void 0===t?void 0:t.reduce((e,t)=>{const n=t.from[0];return e[n.email]=n,e},{}))||{},o=Array.from(Object.values(i))||[];for(const e of o){const t=e.email;!U[t]&&t&&n(5,U[t]=yield pe(e),U)}}))}let G,Q,Y,J,ee,ne,ie,oe=[],ae=[],re=[],le=[],ce=[];function ue(){var e,t;return w(this,void 0,void 0,(function*(){if(x&&B.thread_id&&!ee){ee=nt({component_id:x,thread_id:B.thread_id,access_token:k}).catch(Qe);const i=yield ee;if(ee=null,(null===(e=null==i?void 0:i.messages)||void 0===e?void 0:e.length)>0){const e=i.messages.length-1;i.messages[e].body=yield ke(e,i.messages[e].id)}i&&(i.expanded=null!==(t=null==J?void 0:J.expanded)&&void 0!==t?t:B.show_expanded_email_view_onload,n(6,J=i))}}))}function de(){J?lt({access_token:k,component_id:x,message_id:J.messages.slice(-wa).map(e=>e.id)}).then(e=>{e.forEach(e=>{let t=J.messages.find(t=>t.id===e.id);t&&(t.conversation=e.conversation)}),n(6,J),n(4,B),n(55,l),n(54,Y),n(45,g),n(3,I),n(46,y),n(47,b),n(73,w),n(49,z),n(87,t),n(48,q),n(53,Q),n(29,k),n(0,x)}):B.message&&lt({component_id:x,message_id:[B.message.id]}).then(e=>{e.forEach(e=>{B.message&&n(4,B.message.conversation=e.conversation,B)}),n(6,J),n(4,B),n(55,l),n(54,Y),n(45,g),n(3,I),n(46,y),n(47,b),n(73,w),n(49,z),n(87,t),n(48,q),n(53,Q),n(29,k),n(0,x)})}function pe(e){var t;return w(this,void 0,void 0,(function*(){if(n(11,ie.query="?email="+e.email,ie),x){let n=s[JSON.stringify(ie)];return n||(n=yield zt.addContact(ie)),null!==(t=n[0])&&void 0!==t?t:e}return e}))}function he(){return w(this,void 0,void 0,(function*(){J&&Q.component_id&&B.thread_id&&(yield it(Q,J).catch(Qe))}))}function fe(e){return w(this,void 0,void 0,(function*(){if(!(J.messages.length<=0)){if("default"===B.click_action||"mailbox"===B.click_action){J&&J.unread&&"mailbox"!==B.click_action&&(n(6,J.unread=!J.unread,J),yield he());const e=J.messages.length-1;n(6,J.messages[e].expanded=!J.messages[e].expanded,J),ne||J.messages[e].body||n(6,J.messages[e].body=yield ke(e,J.messages[e].id),J),n(6,J.expanded=!J.expanded,J),J.expanded&&"default"===B.click_action&&setTimeout(()=>{oe[e].scrollIntoView({behavior:"smooth",block:"start"})},50)}_("threadClicked",{event:e,thread:J}),n(12,Oe="")}}))}function me(e){return w(this,void 0,void 0,(function*(){if(J)return n(6,J=Object.assign(Object.assign({},J),{unread:!J.unread})),yield he(),void _("toggleThreadUnreadStatus",{event:e,thread:J})}))}function ve(e){var t;return w(this,void 0,void 0,(function*(){if("mailbox"!==B.click_action){if(a){const e=(null===(t=J.labels)||void 0===t?void 0:t.map(e=>e.id))||[];n(6,J.label_ids=[...e,a],J)}else r&&n(6,J.folder_id=r,J);yield he()}_("threadDeleted",{event:e,thread:J})}))}function ge(e){B.message&&(!B.thread_id||!B.thread)||"mailbox"===B.click_action&&J.expanded||(e.preventDefault(),fe(e))}function ye(e){_("returnToMailbox",{event:e,thread:J})}function be(e){B.message&&(!B.thread_id||!B.thread)||"mailbox"===B.click_action&&J.expanded||(e.preventDefault(),"Enter"===e.code&&fe(e))}function we(e){return w(this,void 0,void 0,(function*(){e.stopImmediatePropagation(),J&&(n(6,J=Object.assign(Object.assign({},J),{starred:!J.starred})),yield he()),_("threadStarred",{event:e,thread:J})}))}function _e(e,t){e.stopImmediatePropagation(),t===J.messages.length-1?_a(e):(n(6,J.messages[t].expanded=!J.messages[t].expanded,J),_("messageClicked",{event:e,message:J.messages[t],thread:J}),B.thread||ke(t,J.messages[t].id).then(e=>{n(6,J.messages[t].body=e,J)}))}function xe(e,t){e.stopImmediatePropagation(),"Enter"===e.code&&(t===J.messages.length-1?_a(e):n(6,J.messages[t].expanded=!J.messages[t].expanded,J))}function ke(e,t){return x?(ae[e]="loading",at(Q,t).then(t=>w(this,void 0,void 0,(function*(){return ae[e]="loaded",hn.hasInlineFiles(t)?(yield De(t)).body:t.body})))):new Promise(()=>null)}function Ce(){rt({access_token:k,component_id:x,message_id:B.message_id}).then(e=>w(this,void 0,void 0,(function*(){if(n(4,B.message=e,B),ae[0]="loaded",hn.hasInlineFiles(B.message)){const e=yield De(B.message);n(4,B.message=e,B)}})))}const Se=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function Te(e){const t=new Date((new Date).setHours(0,0,0,0)),n=new Date(t.getFullYear(),t.getMonth(),t.getDate()-1,0,0,0,0),i=new Date(t.getFullYear(),t.getMonth(),t.getDate()-6,0,0,0,0),o=new Date(t.getFullYear(),0,1);return e>=t?e.toLocaleTimeString("en-US",{hour12:!0,hour:"numeric",minute:"2-digit"}):e>=n?"Yesterday":e>=i?Se[e.getDay()]:e>=o?e.toLocaleDateString("en-US",{month:"long",day:"numeric"}):e.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})}let Oe="";function Pe(e){n(12,Oe=e.detail.tooltipID)}function Ae(e){var t;return e&&ce&&e.length>0&&(null===(t=e[e.length-1])||void 0===t?void 0:t.from.length)}let Ee={};function Ne(){var e;n(13,Ee=null===(e=J.messages)||void 0===e?void 0:e.reduce((e,t)=>{for(const[n,i]of t.files.entries())"attachment"===i.content_disposition&&!i.content_id&&!ii.includes(i.content_type)&&(e[t.id]||(e[t.id]=[]),e[t.id].push(t.files[n]));return e},{}))}function De(e){var t;return w(this,void 0,void 0,(function*(){const n=yield hn.getFilesForMessage(e,{component_id:x,access_token:k});for(const i of Object.values(n))e.body&&(e.body=null===(t=e.body)||void 0===t?void 0:t.replaceAll(`src="cid:${i.content_id}"`,`src="data:${i.content_type};base64,${i.data}"`));return e}))}function je(e,t){return w(this,void 0,void 0,(function*(){if(e.stopImmediatePropagation(),x&&(J&&B.thread_id||B.message_id)){const e=yield an({file_id:t.id,component_id:x,access_token:k});yn(e,t)}_("downloadClicked",{event:e,thread:J,file:t})}))}function Le(e){return w(this,void 0,void 0,(function*(){const t=e.detail.file;je(e,t)}))}const Ie=e=>ve(e),Fe=(e,t)=>_("fileClicked",{event:t,file:e});function Me(e,t){te[e?"unshift":"push"](()=>{oe[t]=e,n(10,oe)})}const Re=(e,t)=>_e(t,e),qe=(e,t)=>xe(t,e),Be=(e,t)=>je(t,e),ze=(e,t)=>je(t,e);function Ve(e){te[e?"unshift":"push"](()=>{G=e,n(9,G)})}return e.$$set=e=>{n(87,t=i(i({},t),v(e))),"id"in e&&n(0,x=e.id),"access_token"in e&&n(29,k=e.access_token),"clean_conversation"in e&&n(30,C=e.clean_conversation),"click_action"in e&&n(1,S=e.click_action),"message_id"in e&&n(31,T=e.message_id),"message"in e&&n(2,O=e.message),"show_contact_avatar"in e&&n(32,P=e.show_contact_avatar),"show_expanded_email_view_onload"in e&&n(33,A=e.show_expanded_email_view_onload),"show_number_of_messages"in e&&n(34,E=e.show_number_of_messages),"show_received_timestamp"in e&&n(35,N=e.show_received_timestamp),"show_star"in e&&n(36,D=e.show_star),"show_thread_actions"in e&&n(37,j=e.show_thread_actions),"theme"in e&&n(38,$=e.theme),"thread_id"in e&&n(39,L=e.thread_id),"thread"in e&&n(3,I=e.thread),"you"in e&&n(40,F=e.you)},e.$$.update=()=>{if(131072&e.$$.dirty[1]&&_("manifestLoaded",q),33554432&e.$$.dirty[1]&&Object.keys(u).length&&_("onError",u),(()=>{w(void 0,void 0,void 0,(function*(){JSON.stringify(z)!==JSON.stringify(t)&&(n(4,B=mn(t,q,M)),yield V(),n(49,z=t))}))})(),536870929&e.$$.dirty[0]&&n(53,Q={access_token:k,component_id:x,thread_id:B.thread_id}),4194304&e.$$.dirty[1]&&n(54,Y=JSON.stringify(Q)),24&e.$$.dirty[0]|25280512&e.$$.dirty[1]&&B.thread&&B.thread.id){const e=null!==n(46,y=null===n(45,g=l[Y])||void 0===g?void 0:g.find(e=>e&&e.id===(null==I?void 0:I.id)))&&void 0!==y?y:B.thread;if(B.show_expanded_email_view_onload){e.expanded=B.show_expanded_email_view_onload;const t=e.messages[e.messages.length-1];t.body=null!==n(47,b=t.body)&&void 0!==b?b:t.snippet}n(6,J=e)}120&e.$$.dirty[0]|524288&e.$$.dirty[1]&&(()=>{w(void 0,void 0,void 0,(function*(){if(W||!U)if(n(50,W=!1),I&&I.messages)yield K(I);else if(J)yield K(J);else if(B.message){const e=B.message.from[0];n(5,U[e.email]=yield pe(e),U)}}))})(),96&e.$$.dirty[0]|1024&e.$$.dirty[1]&&n(8,H=J&&U?U[null===n(41,d=J.messages[J.messages.length-1])||void 0===d?void 0:d.from[0].email]:{}),48&e.$$.dirty[0]|2048&e.$$.dirty[1]&&n(14,o=B.message&&U?U[null===n(42,p=B.message)||void 0===p?void 0:p.from[0].email]:{}),16&e.$$.dirty[0]&&(B.thread_id,n(50,W=!0)),1052672&e.$$.dirty[1]&&(a=re&&re.length?null===n(43,h=re.find(e=>"trash"===e.name))||void 0===h?void 0:h.id:null),2105344&e.$$.dirty[1]&&(r=le&&le.length?null===n(44,f=le.find(e=>"trash"===e.name))||void 0===f?void 0:f.id:null),64&e.$$.dirty[0]&&(ce=J?J.participants:[]),16&e.$$.dirty[0]&&(ne=!!B.thread),16&e.$$.dirty[0]&&B.clean_conversation&&(B.thread_id||B.message_id)&&de(),536870913&e.$$.dirty[0]&&n(11,ie={component_id:x,access_token:k,query:""}),64&e.$$.dirty[0]&&J&&Ne()},t=v(t),[x,S,O,I,B,U,J,R,H,G,oe,ie,Oe,Ee,o,_,me,ve,ge,ye,be,we,_e,xe,Te,Pe,Ae,je,Le,k,C,T,P,A,E,N,D,j,$,L,F,d,p,h,f,g,y,b,q,z,W,re,le,Q,Y,l,u,Ie,Fe,Me,Re,qe,Be,ze,Ve]}class Pa extends me{constructor(e){super(),this.shadowRoot.innerHTML='<style>@charset "UTF-8";*{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;list-style:none}.sr-only{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}main{--black:#161717;--grey-dark:#636671;--grey:#bdc0cb;--grey-lighter:#dfe1e8;--grey-dark-warm:#9fa4b5;--grey-lightest:#f7f7f8;--grey-background:#f0f1f5;--white:#ffffff;--blue:#002db4;--blue-lighter:#f0f3ff;--red:#ee3248;--red-lighter:#ffeef0;--fs-12:0.75rem;--fs-14:0.875rem;--fs-16:1rem;--black-90:#2c2e2e;--grey-light:#f7f7f8;--grey-warm:#cbcbcb}main{height:100%;width:100%;position:relative;display:grid;font-family:-apple-system, BlinkMacSystemFont, sans-serif}main .email-row{background:var(--nylas-email-background, var(--grey-lightest));border:var(--nylas-email-border-style, 1px solid var(--grey-lighter));border-left-width:var(--nylas-email-border-left-width, 1px)}main .email-row nylas-tooltip{position:relative}main .email-row .default-avatar{background:var(--nylas-default-avatar-background, var(--blue));border-radius:50%;color:var(--nylas-default-avatar-color, var(--white));font-family:sans-serif;font-size:1rem;font-weight:bold;height:31px;line-height:35px;text-align:center;text-transform:uppercase;width:32px}main .email-row header{font-size:1.2rem;font-weight:700;padding:0.5rem;padding-bottom:0}main .email-row.condensed{height:fit-content;padding:0.5rem;flex-wrap:wrap;display:grid;gap:0.5rem;align-items:center;grid-template-columns:fit-content(350px) 1fr}main .email-row.condensed.disable-click{cursor:not-allowed;display:grid;align-items:flex-start;background:var(--grey-lighter)}main .email-row.condensed .no-message-avatar-container{display:grid}main .email-row.condensed .no-message-avatar-container.show-star{margin-left:calc( 25px + 0.5rem )}main .email-row.condensed .no-message-avatar-container .default-avatar{background:var(--red);display:flex;justify-content:center;align-items:center}main .email-row.condensed .no-message-avatar-container .default-avatar.draft{background:var(--blue)}main .email-row.condensed .no-messages-warning-container{display:grid;color:var(--red);align-self:center}main .email-row.condensed .no-messages-warning-container.draft{color:var(--blue)}main .email-row.condensed .from-star{display:grid;grid-template-columns:25px auto;column-gap:0.5rem}main .email-row.condensed .mobile-subject-snippet{display:block;font-size:14px;margin-top:0.5rem;flex-basis:100%;grid-column-start:span 3}main .email-row.condensed .mobile-subject-snippet .subject{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:inherit;display:block;word-break:keep-all}main .email-row.condensed .mobile-subject-snippet .snippet{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;display:block;max-width:inherit;color:var(--nylas-email-snippet-color, var(--grey));margin-top:4px}main .email-row.condensed .mobile-subject-snippet .attachment{gap:1rem;display:flex;overflow-x:scroll}main .email-row.condensed .mobile-subject-snippet .attachment button{height:fit-content;width:max-content;padding:0.3rem 1rem;border:1px solid var(--grey);border-radius:30px;background:white;cursor:pointer}main .email-row.condensed .mobile-subject-snippet .attachment button:hover{background:var(--grey-light)}main .email-row.condensed .mobile-subject-snippet .attachment.mobile{display:flex}main .email-row.condensed .thread-message-count{color:var(--nylas-email-thread-message-count-color, var(--black));font-size:12px;align-self:center}main .email-row.condensed.unread{background:var(--nylas-email-unread-background, white)}main .email-row.condensed.unread .from-message-count,main .email-row.condensed.unread .date,main .email-row.condensed.unread .subject{font-weight:600;color:var(--nylas-email-subject-color, var(--black))}main .email-row.condensed.unread .from-message-count .thread-message-count,main .email-row.condensed.unread .date .thread-message-count,main .email-row.condensed.unread .subject .thread-message-count{color:var(--nylas-email-unread-thread-message-count-color, var(--blue))}main .email-row div.starred{position:relative;display:flex;justify-content:center;align-items:center}main .email-row div.starred button{background-color:transparent;cursor:pointer}main .email-row div.starred button:before{content:"★";display:inline-block;font-size:1.1em;color:var(--nylas-email-unstarred-star-button-color, #ccc);-webkit-user-select:none;-moz-user-select:none;user-select:none}main .email-row div.starred button.starred:before{color:var(--nylas-email-star-button-color, #ffc107)}main .email-row.expanded{background:var(--nylas-email-body-background, var(--white));padding:0}main .email-row.expanded .email-loader{height:3rem;display:flex;align-items:center;justify-content:center}main .email-row.expanded .email-loader .spinner{height:18px;animation:rotate 2s linear infinite;margin-right:10px}@keyframes rotate{to{transform:rotate(360deg)}}main .email-row.expanded header{outline:1px solid var(--grey-lighter);display:flex;align-items:center;padding:24px 16px;gap:8px;border-radius:4px 4px 0 0;font-weight:bold}main .email-row.expanded [role=toolbar]{outline:1px solid var(--grey-lighter);display:flex;align-items:center;padding:24px 16px;gap:8px;padding:0.7rem 1rem;gap:1rem}main .email-row.expanded .subject-title{justify-content:space-between}main .email-row.expanded .subject-title.mailbox{cursor:default}main .email-row.expanded .subject-title>div{display:flex;align-items:center;gap:1rem}main .email-row.expanded .subject-title>div button{background:none;display:flex;cursor:pointer}main .email-row.expanded .subject-title [role=toolbar]{outline:none}main .email-row.expanded .subject-title [role=toolbar] button *{width:1em;height:1em}main .email-row.expanded .icon-container,main .email-row.expanded .icon-container>*{pointer-events:none}main .email-row.expanded.expanded-mailbox-thread .message-from .name{font-weight:600}main .email-row.expanded div.individual-message{box-sizing:border-box;padding:0.5rem}main .email-row.expanded div.individual-message div.message-body{overflow:auto;display:inline-flex;flex-direction:column;width:100%}main .email-row.expanded div.individual-message div.message-body div.attachment{overflow-x:scroll}main .email-row.expanded div.individual-message div.message-body div.attachment button{margin:0.5rem;height:fit-content;padding:0.3rem 1rem;border:1px solid var(--grey);border-radius:30px;background:white;cursor:pointer}main .email-row.expanded div.individual-message div.message-body div.attachment button:hover{background:var(--grey-light)}main .email-row.expanded div.individual-message.condensed div.snippet{text-overflow:ellipsis;overflow:hidden;display:block;max-width:inherit;color:var(--nylas-email-snippet-color, var(--grey));margin-top:0.5rem}main .email-row.expanded div.individual-message.condensed div.message-head .avatar-from{display:flex;align-items:center;gap:0.7rem}main .email-row.expanded div.individual-message:not(:last-of-type){border-bottom:1px solid #eee}main .email-row.expanded div.individual-message:not(.last-message).expanded div.message-head:hover{cursor:n-resize}main .email-row.expanded div.individual-message.last-message .message-head:hover,main .email-row.expanded div.individual-message.last-message .message-body:hover{cursor:default}main .email-row.expanded div.individual-message div.message-head{display:flex;justify-content:space-between;align-items:baseline;gap:0.5rem}main .email-row.expanded div.individual-message div.message-date{display:flex;color:var(--nylas-email-message-date-color, var(--grey));font-size:12px}main .email-row.expanded div.individual-message div.message-from{display:flex;align-items:center}main .email-row.expanded div.individual-message div.message-from span.name{font-weight:600;margin-right:0.5rem}main .email-row.expanded.expanded div.message-head div.message-from-to{margin:0.5rem 0}main .email-row.expanded.expanded div.message-head div.message-from-to .avatar-from{display:flex;align-items:center;gap:0.7rem}main .email-row.expanded.expanded div.message-head div.message-from-to div.message-to{color:var(--nylas-email-message-to-color, var(--grey));max-width:150px;margin-left:calc(32px + 0.7rem)}main .email-row.expanded.expanded div.message-head div.message-from-to div.message-to div{display:grid;grid-template-columns:1fr 16px}main .email-row.expanded.expanded div.message-head div.message-from-to div.message-to div span{text-overflow:ellipsis;overflow:hidden}main .email-row.expanded.expanded.condensed{gap:1rem}main .email-row.expanded.expanded.condensed:hover,main .email-row.expanded.expanded.condensed:focus{cursor:s-resize;outline:none}main .email-row.expanded.expanded.condensed span.snippet{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--nylas-email-snippet-color, var(--grey))}main .email-row:hover{cursor:pointer}main .email-row .from-message-count{align-items:center;display:grid;grid-template-columns:repeat(3, auto);grid-gap:1rem;justify-content:flex-start;max-width:350px}main .email-row .from-message-count .from-participants{max-width:220px;display:grid;grid-template-columns:1fr fit-content(60px)}main .email-row .from-message-count .from-participants .participants-name .from-sub-section.second{display:none}main .email-row .from-message-count .from-participants .participants-count .show-on-mobile{display:inline-block}main .email-row .from-message-count .from-participants .participants-count .show-on-desktop{display:none}main .email-row .subject-snippet-date .desktop-subject-snippet{display:none}main .email-row .subject-snippet-date .attachment.desktop{display:none}main .email-row .subject-snippet-date div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}main .email-row .subject-snippet-date div span.snippet{color:var(--nylas-email-snippet-color, var(--grey))}main .email-row .subject-snippet-date div.date{display:flex;justify-content:flex-end;gap:0.5rem;width:100%;font-size:14px;color:var(--nylas-email-message-date-color, var(--grey))}main .email-row .subject-snippet-date div.action-icons{display:flex;justify-content:flex-end;align-items:center;width:100%;gap:1rem}main .email-row .subject-snippet-date div.action-icons>:last-child{padding-right:1rem}main .email-row .subject-snippet-date div.action-icons button{background:none;cursor:pointer;display:flex}main .email-row .subject-snippet-date div.action-icons button *{width:1em;height:1em}main .email-row.expanded.singular:hover{box-shadow:none;cursor:default}main .email-row.expanded.singular div.individual-message:not(.last-message).expanded .message-head:hover,main .email-row.expanded.singular div.individual-message:not(.last-message).expanded .message-body:hover{cursor:default}@media(min-width: 640px){main .email-row .from-message-count{max-width:350px}main .email-row .from-message-count .from-participants .participants-name{overflow:hidden;white-space:nowrap;position:relative}main .email-row .from-message-count .from-participants .participants-name .from-sub-section.second{display:inline-block}main .email-row .from-message-count .from-participants .participants-name.condensed::after{content:".";position:absolute;bottom:0;right:0;background:var(--nylas-email-body-background, var(--white))}main .email-row .from-message-count .from-participants .participants-count .show-on-mobile{display:none}main .email-row .from-message-count .from-participants .participants-count .show-on-desktop{display:inline-block}main .email-row.expanded.singular .individual-message.expanded{padding-top:0.5rem}main .email-row.condensed{display:grid;column-gap:1rem;grid-template-columns:fit-content(350px) 1fr;padding:0.5rem 0;justify-content:initial}main .email-row.condensed div.starred button:hover:before{color:var(--nylas-email-star-button-hover-color, #ffc107)}main .email-row.condensed .mobile-subject-snippet{display:none}main .email-row.expanded{display:flex;flex-direction:column;box-sizing:border-box;width:100%;overflow-x:hidden}main .email-row.expanded header{padding:1rem 2.5rem}main .email-row.expanded div.individual-message{display:flex;flex-direction:column;align-items:center;padding:1rem 0;width:inherit}main .email-row.expanded div.individual-message div.message-head,main .email-row.expanded div.individual-message div.message-body{width:100%;box-sizing:border-box;padding:0 2.5rem}main .email-row.expanded div.individual-message div.message-body{display:flex;flex-direction:column}main .email-row.expanded div.individual-message.condensed div.snippet{width:100%;box-sizing:border-box;padding:0 2.5rem;white-space:pre-wrap;max-width:95vw;align-self:flex-start}main .email-row.expanded div.individual-message div.message-date{font-size:14px;align-self:center}main .email-row.expanded div.individual-message.expanded div.message-head div.message-from-to{margin:0.5rem 0}main .email-row.expanded div.individual-message.expanded div.message-head div.message-from-to div.message-to{max-width:inherit;overflow:inherit}main .email-row.expanded div.individual-message.expanded div.message-head div.message-from-to div.message-to div{display:grid;grid-template-columns:1fr 16px;align-items:center}main .email-row.expanded div.individual-message.expanded div.message-head div.message-from-to div.message-to div span{text-overflow:ellipsis;overflow:hidden}main .email-row .subject-snippet-date{display:grid;grid-template-columns:1fr fit-content(120px);gap:1rem;padding:0.5rem}main .email-row .subject-snippet-date .desktop-subject-snippet{display:block}main .email-row .subject-snippet-date .desktop-subject-snippet .subject{margin-right:0.5rem}main .email-row .subject-snippet-date .snippet-attachment-container{display:flex;flex-direction:column;gap:0.5rem}main .email-row .subject-snippet-date .attachment{gap:1rem;display:flex;overflow-x:scroll}main .email-row .subject-snippet-date .attachment button{padding:0.3rem 1rem;border:1px solid var(--grey);border-radius:30px;background:white;cursor:pointer}main .email-row .subject-snippet-date .attachment button:hover{background:var(--grey-light)}main .email-row .subject-snippet-date .attachment.desktop{display:flex}main .email-row .subject-snippet-date .date{text-align:right}}</style>',Oe(this,{target:this.shadowRoot,props:Q(this.attributes),customElement:!0},Oa,va,c,{id:0,access_token:29,clean_conversation:30,click_action:1,message_id:31,message:2,show_contact_avatar:32,show_expanded_email_view_onload:33,show_number_of_messages:34,show_received_timestamp:35,show_star:36,show_thread_actions:37,theme:38,thread_id:39,thread:3,you:40},null,[-1,-1,-1,-1]),e&&(e.target&&S(e.target,this,e.anchor),e.props&&(this.$set(e.props),de()))}static get observedAttributes(){return["id","access_token","clean_conversation","click_action","message_id","message","show_contact_avatar","show_expanded_email_view_onload","show_number_of_messages","show_received_timestamp","show_star","show_thread_actions","theme","thread_id","thread","you"]}get id(){return this.$$.ctx[0]}set id(e){this.$$set({id:e}),de()}get access_token(){return this.$$.ctx[29]}set access_token(e){this.$$set({access_token:e}),de()}get clean_conversation(){return this.$$.ctx[30]}set clean_conversation(e){this.$$set({clean_conversation:e}),de()}get click_action(){return this.$$.ctx[1]}set click_action(e){this.$$set({click_action:e}),de()}get message_id(){return this.$$.ctx[31]}set message_id(e){this.$$set({message_id:e}),de()}get message(){return this.$$.ctx[2]}set message(e){this.$$set({message:e}),de()}get show_contact_avatar(){return this.$$.ctx[32]}set show_contact_avatar(e){this.$$set({show_contact_avatar:e}),de()}get show_expanded_email_view_onload(){return this.$$.ctx[33]}set show_expanded_email_view_onload(e){this.$$set({show_expanded_email_view_onload:e}),de()}get show_number_of_messages(){return this.$$.ctx[34]}set show_number_of_messages(e){this.$$set({show_number_of_messages:e}),de()}get show_received_timestamp(){return this.$$.ctx[35]}set show_received_timestamp(e){this.$$set({show_received_timestamp:e}),de()}get show_star(){return this.$$.ctx[36]}set show_star(e){this.$$set({show_star:e}),de()}get show_thread_actions(){return this.$$.ctx[37]}set show_thread_actions(e){this.$$set({show_thread_actions:e}),de()}get theme(){return this.$$.ctx[38]}set theme(e){this.$$set({theme:e}),de()}get thread_id(){return this.$$.ctx[39]}set thread_id(e){this.$$set({thread_id:e}),de()}get thread(){return this.$$.ctx[3]}set thread(e){this.$$set({thread:e}),de()}get you(){return this.$$.ctx[40]}set you(e){this.$$set({you:e}),de()}}return customElements.define("nylas-email",Pa),Pa}))}).call(this,n("c8ba"))},ea79:function(e,t,n){"use strict";n.r(t);var i=n("8336"),o=n("b0af"),a=n("99d9"),r=n("cc20"),s=n("62ad"),l=n("169a"),c=n("132d"),u=n("e449"),d=n("f774"),p=n("0fd9"),h=n("b974"),f=n("3129"),m=n("2fa4"),v=n("b73d"),g=function(){var e,t=this,n=t._self._c;return n("div",{staticClass:"bg-app",class:t.quickActionServiceActive?t.isMiniQuickActionsBar?"with-quick-actions-bar-mini":"with-quick-actions-bar":"h-100"},[t.shouldShowContactNavigation?n("contact-navigation"):t._e(),n("contact-view-header",{on:{"quick-scheduler-invite":function(e){return t.quickSchedulerInvite()},"toggle-auto-schedule-actions":function(e){return t.toggleAutoScheduleActions()},"quick-action-send-email":function(e){return t.emailNow(e,!0)},"open-symbo-calendar":t.openSymboCalendar}}),null!==(e=t.contact)&&void 0!==e&&e.id?n("prospect-status-bar",{staticClass:"mt-3 px-4",attrs:{tooltip:"Click to set status of the prospect",isContactView:"",initialStatus:t.contact.prospect_status},on:{"status-selected":t.updateContactStatus}}):n(f["a"],{staticClass:"status-bar-skeleton px-5",attrs:{type:"table-row"}}),n("div",{style:`height: calc(100% - ${t.shouldShowContactNavigation?"160":"120"}px)`},[n("page-title",{attrs:{title:t.contact.full_name?t.contact.full_name+" | Symbo":"Symbo"}}),n(p["a"],{staticClass:"mt-3 pt-0 pb-1 px-4 h-100",class:{" overflow-hidden":t.$vuetify.breakpoint.mdAndUp,"overflow-auto":t.$vuetify.breakpoint.smAndDown}},[n(s["a"],{staticClass:"py-0",class:{"h-100 overflow-hidden pr-0":t.$vuetify.breakpoint.mdAndUp,"overflow-auto":t.$vuetify.breakpoint.smAndDown},attrs:{md:"4",cols:"12",order:"1","order-md":"0"}},[n("prospect-info-content",{on:{"fetch-contact":function(e){return t.fetchContact(t.$route.params.id)}}})],1),n(s["a"],{staticClass:"py-0",class:{"h-100 overflow-hidden":t.$vuetify.breakpoint.mdAndUp,"mb-4 overflow-auto":t.$vuetify.breakpoint.smAndDown},attrs:{md:"8",cols:"12",order:"0","order-md":"1"}},[n("SkeletonLoader",{attrs:{applyClassToContent:"",isLoading:t.driveStatesLoading,loaderType:"article, list-item-two-line@4, actions"}},[n("quick-action-wrapper",{attrs:{quickAction:t.showQuickActionComponent,quickActionAttributes:t.quickActionComponentProp},on:{"call-now":t.callNow,"call-complete":t.callComplete,"email-now":function(e){return t.emailNow(e)},"complete-task":t.completeTask,"add-notes":t.addNotes,"add-notes-and-complete":t.addNotesAndComplete,"complete-drive":t.completeDriveShow,"display-email":t.displayEmail,"display-call":t.displayCall,"dispositioned-prospect":t.completeDisposition,"close-action":t.closeQuickActionComponent,completeAssignToDrive:t.completeAssignToDrive,"update-mailing":t.updateMailing,"pause-drive":t.pauseDrive,"paused-drive":t.pausedDrive,"open-create-disposition-dialog":function(e){t.createDispositionDialog=!0}}})],1)],1)],1),n(l["a"],{attrs:{"max-width":"350"},model:{value:t.quickActionSidekick.modal,callback:function(e){t.$set(t.quickActionSidekick,"modal",e)},expression:"quickActionSidekick.modal"}},[n("QuickActionModal",{attrs:{showNoAction:t.quickActionSidekick.showNoAction,bodyText:t.quickActionSidekick.text},on:{cancelAction:t.quickActionSidekickModalCancel,noAction:t.quickActionSidekickNegative,confirmAction:t.quickActionSidekickModalConfirm}})],1)],1),n(l["a"],{attrs:{"max-width":"600"},model:{value:t.createDispositionDialog,callback:function(e){t.createDispositionDialog=e},expression:"createDispositionDialog"}},[n(o["a"],[n(a["d"],[t._v("Add outcome")]),n(a["c"],[n("select-dispositions",{attrs:{outlined:""},on:{"add-disposition":t.addDisposition},model:{value:t.selectedDisposition,callback:function(e){t.selectedDisposition=e},expression:"selectedDisposition"}}),n(h["a"],{attrs:{dense:"",outlined:"","hide-details":"",label:"Sentiment","item-text":"text","item-value":"value",items:t.dispositionSentiments},model:{value:t.selectedSentiment,callback:function(e){t.selectedSentiment=e},expression:"selectedSentiment"}})],1),n(a["a"],{staticClass:"d-flex justify-end"},[n(i["a"],{attrs:{color:"primary",disabled:!t.selectedDisposition,loading:t.createdDispositionLoader},on:{click:t.addDisposition}},[t._v(" Save ")])],1)],1)],1),n(d["a"],{attrs:{value:t.isCalendarOpen,right:"",absolute:"",stateless:"","hide-overlay":"",width:t.calendarSecondaryTZ&&t.showSecondaryTZInCalendar?450:400}},[t.isCalendarOpen?[n(o["a"],{attrs:{height:"100%",width:"100%"}},[n(a["d"],{staticClass:"py-1 d-flex align-center",staticStyle:{height:"40px","overflow-y":"hidden"}},[t._v(" Schedule event "),n(m["a"]),n(u["a"],{attrs:{bottom:"","offset-y":"","max-width":"300","close-on-content-click":!1},scopedSlots:t._u([{key:"activator",fn:function({on:e}){return[n(r["a"],t._g({staticClass:"px-2 mr-2",attrs:{outlined:"",small:"",label:""}},e),[n(c["a"],{staticClass:"mr-2",attrs:{small:""}},[t._v("mdi-earth")]),n("div",{staticClass:"font-weight-medium"},[t._v("Timezones")])],1)]}}],null,!1,2908504141),model:{value:t.calendarTZMenu,callback:function(e){t.calendarTZMenu=e},expression:"calendarTZMenu"}},[n(o["a"],[n(a["d"],[t._v(" Timezone settings ")]),n(a["c"],{staticClass:"pb-3"},[t.viewingProspectDayInCalendar?n("div",{staticClass:"mb-4 mt-n2"},[t._v("Viewing prospect's day")]):n(v["a"],{staticClass:"mt-0 mb-4",attrs:{dense:"","hide-details":"",label:"Show prospect timezone"},model:{value:t.showSecondaryTZInCalendar,callback:function(e){t.showSecondaryTZInCalendar=e},expression:"showSecondaryTZInCalendar"}}),t.viewingProspectDayInCalendar?n("timezone-select",{attrs:{useString:"",prependIcon:"mdi-earth",label:"Prospect timezone",disabled:!t.showSecondaryTZInCalendar},model:{value:t.calendarPrimaryTZ,callback:function(e){t.calendarPrimaryTZ=e},expression:"calendarPrimaryTZ"}}):n("timezone-select",{attrs:{prependIcon:"mdi-earth",label:"Prospect timezone",disabled:!t.showSecondaryTZInCalendar},model:{value:t.calendarSecondaryTZ,callback:function(e){t.calendarSecondaryTZ=e},expression:"calendarSecondaryTZ"}})],1)],1)],1),n(i["a"],{staticClass:"pa-0",attrs:{small:"",icon:"","min-height":"18",height:"18",width:"18","min-width":"18"},on:{click:function(e){t.isCalendarOpen=!1}}},[n(c["a"],{attrs:{small:""}},[t._v("mdi-close")])],1)],1),n("div",{staticStyle:{height:"calc(100% - 40px)","overflow-y":"auto"}},[n("Calendar",{attrs:{currentProspect:t.contact,showSecondaryTimezone:t.showSecondaryTZInCalendar,secondaryTimezone:t.calendarSecondaryTZ,primaryTimezone:t.calendarPrimaryTZ},on:{"viewing-prospect-day":t.viewProspectDay,"update-secondary-timezone":function(e){t.calendarSecondaryTZ=e}}})],1)],1)]:t._e()],2)],1)},y=[],b=(n("14d9"),n("2f62")),w=n("a523"),_=n("ce87"),x=n("8860"),k=n("da13"),C=n("5d23"),S=n("34c3"),T=n("3a2f"),O=function(){var e=this,t=e._self._c;return t("div",{staticClass:"header"},[t(w["a"],{staticClass:"py-0 px-5 bg-white",attrs:{fluid:""}},[t("div",{staticClass:"d-flex align-center w-100"},[t("div",{staticClass:"d-flex"},[t(p["a"],{staticClass:"mt-1",attrs:{"no-gutters":""}},[t(s["a"],{attrs:{cols:"12"}},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"heading"}},[t("div",{staticClass:"d-flex align-center"},[t("span",{staticClass:"mr-2 text-h5 text-md-h4 secondary--text"},[e._v(" "+e._s(e.contact.full_name)+" ")]),t("span",{staticClass:"text-subtitle-2 font-weight-regular text--secondary",class:{"text-caption":e.$vuetify.breakpoint.smAndDown}},[e._v(" "+e._s(e.contact.title)+" "),e.contact.is_lead?[e.contact.title&&e.contact.lead_company?[e._v(" at ")]:e._e(),t("span",{class:{"text-caption":e.$vuetify.breakpoint.smAndDown}},[e._v(e._s(e.contact.lead_company))])]:[e.contact.title&&e._get(e.contact,"account.name")?[e._v(" at ")]:e._e(),e.contact.account?t("router-link",{class:{"text-caption":e.$vuetify.breakpoint.smAndDown},attrs:{to:{name:"AccountView",params:{id:e.contact.account.id}}}},[e._v(e._s(e._get(e.contact,"account.name")))]):e._e(),e._v("   "),t(T["a"],{attrs:{"open-delay":"300",top:""},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:i}){return[e._get(e.contact,"account.website_url")?t(c["a"],e._g(e._b({staticStyle:{"vertical-align":"baseline"},attrs:{"x-small":"",color:"primary"},on:{click:function(t){return e.openInTab(e.contact.account.website_url)}}},"v-icon",i,!1),n),[e._v(" mdi-open-in-new ")]):e._e()]}}])},[t("span",[e._v("Visit company website")])])]],2),e.isOrgAdmin&&e.contact.user&&e.contact.user.id!==e.user.id?t("owner-label",{attrs:{entity:"contact",chipClass:"ml-2",user:e.contact.user}}):e._e()],1)])],1),t(s["a"],{staticClass:"d-flex align-center",attrs:{cols:"12"}},[e.crmMissing?e._e():t(T["a"],{attrs:{"open-delay":"300","max-width":"250",top:"",right:""},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[e.contact&&!e.contact.crm_sync_error?t(i["a"],e._g({staticClass:"mr-2 mr-sm-3",attrs:{icon:"",small:"",color:e.crmManualSync.color},on:{click:function(t){return e.syncToCrm()}}},n),[t(c["a"],{attrs:{dense:"",size:"18"}},[e._v(" mdi-sync "+e._s(e.syncWithCrmInProgress?"mdi-spin":"")+" ")])],1):t(i["a"],e._g({staticClass:"mr-2 mr-sm-3",attrs:{icon:"",small:"",color:e.crmManualSync.color},on:{click:function(t){return e.showSyncErrorModal()}}},n),[t(c["a"],{attrs:{dense:"",size:"18"}},[e._v(" mdi-alert "+e._s(e.syncWithCrmInProgress?"mdi-spin":"")+" ")])],1)]}}],null,!1,3323278825)},[t("span",[e._v(e._s(e.crmManualSync.tooltip))])]),t(T["a"],{attrs:{top:"","open-delay":"300"},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:o}){return[t("span",e._g(e._b({staticStyle:{cursor:"inherit",display:"inline"}},"span",o,!1),{...n}),[t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:n}){return[t(i["a"],{attrs:{icon:"",small:"",color:n?"#FF9054":"primary",disabled:e.qaEmail.isDisabled,"x-small":e.$vuetify.breakpoint.smAndDown},on:{click:function(t){return e.$emit("quick-action-send-email")}}},[t(c["a"],{attrs:{dense:"",size:"18"}},[e._v(" mdi-email-outline ")])],1)]}}],null,!0)})],1)]}}])},[t("span",[e._v(e._s(e.qaEmail.tooltip))])]),t(T["a"],{attrs:{bottom:"","open-delay":"300"},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:o}){return[t("span",e._g(e._b({staticStyle:{cursor:"inherit"}},"span",o,!1),{...n}),[t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:n}){return[t(i["a"],{staticClass:"ml-2 ml-sm-3",attrs:{icon:"",small:"",color:n?"#46BCFF":"primary",disabled:e.qaPhone.isDisabled||e.getOnPhone},on:{click:e.callNow}},[t(c["a"],{attrs:{dense:"",size:"18"}},[e._v(" mdi-phone ")])],1)]}}],null,!0)})],1)]}}])},[t("span",[e._v(e._s(e.qaPhone.tooltip))])]),t(u["a"],{attrs:{light:"","offset-y":"",bottom:"",right:"","nudge-bottom":"8","max-width":"250"},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:o}){return[t(T["a"],{attrs:{"open-delay":"300",top:""},scopedSlots:e._u([{key:"activator",fn:function({on:a}){return[t("span",e._g({staticStyle:{cursor:"inherit"}},{...a}),[t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:a}){return[t(i["a"],e._g(e._b({staticClass:"ml-2 ml-sm-3",attrs:{icon:"",small:"",color:a?"#8364FF":"primary",disabled:e.qaCalendar.isDisabled}},"v-btn",o,!1),{...n}),[t(c["a"],{attrs:{dense:"",size:"18"}},[e._v(" mdi-calendar-outline ")])],1)]}}],null,!0)})],1)]}}],null,!0)},[t("span",[e._v(e._s(e.qaCalendar.tooltip))])])]}}])},[t(x["a"],{attrs:{light:"",dense:""}},[t(k["a"],{attrs:{dense:"",disabled:!e.contact},on:{click:function(t){return e.$emit("open-symbo-calendar")}}},[t(S["a"],[t(c["a"],{attrs:{dense:""}},[e._v("mdi-calendar-clock")])],1),t(C["b"],[t(C["d"],[e._v(" Symbo calendar ")]),t(C["c"],[e._v(" Schedule events according to availability by using Symbo calendar. ")])],1)],1),t(k["a"],{attrs:{dense:""},on:{click:function(t){return e.$emit("quick-scheduler-invite")}}},[t(S["a"],[t(c["a"],{attrs:{dense:""}},[e._v("mdi-send")])],1),t(C["b"],[t(C["d"],[e._v(" Quick Scheduler Invite ")]),t(C["c"],[e._v(" Send a pre-built email with a link to your scheduler page. ")])],1)],1)],1)],1),e._l(e.socialLinks,(function(n){return t(T["a"],{key:n.icon,attrs:{top:"","open-delay":"300"},scopedSlots:e._u([{key:"activator",fn:function({on:o,attrs:a}){return[t(i["a"],e._g(e._b({staticClass:"ml-2 ml-sm-3",attrs:{icon:"",small:"",color:n.color},on:{click:n.action}},"v-btn",a,!1),o),[t(c["a"],{attrs:{dense:"",size:"18"}},[e._v(" "+e._s(n.icon))])],1)]}}],null,!0)},[t("span",[e._v(e._s(n.tooltip))])])})),t("CrmLinkIcon",{attrs:{prospect:e.contact,size:"18"}}),e.contact.time_zone?[e.$vuetify.breakpoint.mdAndUp?t("prospect-time-component",{staticClass:"mt-n1 ml-2",attrs:{timezone:e.contact.time_zone,prospectFirstName:e.contact.first_name||e.contact.full_name}}):e._e()]:e._e()],2)],1)],1),t(m["a"]),t("div",{staticClass:"d-flex justify-end align-center"},[t("div",{staticClass:"mr-2"},[e.prospectOwner?t("user-avatar",{attrs:{disableTooltip:!e.canReAssignContact,readonly:!e.canReAssignContact,value:e.prospectOwner},on:{input:function(t){return e.assignToUser(t)}}}):e._e()],1),e.isNextBestActionsEnabled?t(T["a"],{attrs:{left:"","open-delay":"300","max-width":"250"},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t("span",e._g({},n),[t(v["a"],{attrs:{inset:"",dense:"","prepend-icon":"mdi-clock-star-four-points-outline",value:e.contact.auto_schedule,color:"symbo-pink"},on:{change:function(t){return e.$emit("toggle-auto-schedule-actions")}}})],1)]}}],null,!1,1703379369)},[t("span",[e._v("Auto Schedule Next Best Actions")])]):e._e()],1)],1)]),t(l["a"],{attrs:{"max-width":"350"},model:{value:e.syncErrorSidekick.modal,callback:function(t){e.$set(e.syncErrorSidekick,"modal",t)},expression:"syncErrorSidekick.modal"}},[t("QuickActionModal",{attrs:{showNoAction:e.syncErrorSidekick.showNoAction,bodyText:e.syncErrorSidekick.text},on:{cancelAction:e.syncErrorSidekickModalCancel,noAction:e.syncErrorSidekickNegative,confirmAction:e.syncErrorSidekickModalConfirm}})],1)],1)},P=[],A=n("6885"),E=n("d640"),N=n("8015"),D=n("b126"),j=n("a0a3"),$=n("1bcb"),L=n("b752"),I=n("ca2d"),F=n("fdac"),M=n("b59f"),R=n("de9a"),q=n("c752"),B=n("2fa3");const z=n("9b02");var V={components:{SkeletonLoader:A["a"],ProspectTimeComponent:E["default"],CrmLinkIcon:j["default"],QuickActionModal:()=>n.e("chunk-2d212f0a").then(n.bind(null,"ab0c")),OwnerLabel:N["a"],UserAvatar:D["default"]},data(){return{prospectOwner:null,syncErrorSidekick:{modal:!1,text:"",showNoAction:!1,selectedAction:""},syncWithCrmInProgress:!1}},methods:{...Object(b["b"])("contact",["fetchContact"]),_get:z,openInTab:B["S"],async syncToCrm(e=null){this.syncWithCrmInProgress=!0,await M["a"].syncProspectWithCrm(this.$route.params.id,e).then(()=>{}).catch(e=>{console.log(e),this.$store.commit("snackbar/setSnack",{snack:"Error syncing to CRM",snackType:"error"})}),setTimeout(()=>{this.syncWithCrmInProgress=!1},1e3)},showSyncErrorModal(){this.syncErrorSidekick.modal=!0,this.syncErrorSidekick.showNoAction=this.includeSyncErrorModalNegative,this.syncErrorSidekick.text=this.syncErrorBody},syncErrorSidekickModalCancel(){this.syncErrorSidekick.modal=!1},syncErrorSidekickModalConfirm(){this.syncErrorSidekick.modal=!1,this.syncToCrm({force_external_id:this.syncErrorObject.object.prospect.external_id})},syncErrorSidekickNegative(){this.syncErrorSidekick.modal=!1,this.syncToCrm({force_new_prospect_crm_record:!0})},callNow(){var e,t;const{phoneNumbers:n,full_name:i}=this.contact;$["a"].$emit("call-now",{number:null===(e=n[0])||void 0===e?void 0:e.number,id:null===(t=n[0])||void 0===t?void 0:t.id,prospect:this.contact,fullName:i})},assignToUser(e){var t;e.id!==(null===(t=this.prospectOwner)||void 0===t?void 0:t.id)&&q["a"].assignUser({body:{user:e.id,prospects:[this.contact.id]}}).then(t=>{t.errorCount?this.$store.commit("snackbar/setSnack",{snack:"There was a problem assigning the prospect.",snackType:"error"}):(this.$store.commit("snackbar/setSnack",{snack:"Prospect successfully assigned to "+e.first_name,snackType:"success"}),this.isOrgAdmin?this.fetchContact(this.$route.params.id):this.$router.push("/people"))})}},computed:{...R["a"],...L["c"],...I["a"],...F["g"],...Object(b["c"])("contact",["contact","contactLoading","contactTime"]),...Object(b["c"])("user",["user","isOrgAdmin","crm","crmMissing","phoneMissing","mailboxMissing","canReAssignContact","getSettingByKey"]),...Object(b["c"])("prospectFields",["customProspectFields"]),socialLinks(){const e=this.customProspectFields.filter(e=>"link"===e.type&&this.contact[e.key]).map(e=>({id:e.id,color:"secondary lighten-2",icon:"mdi-link-variant",tooltip:e.name,action:()=>this.openInTab(this.contact[e.key])}));return[...this.contact.facebook_url?[{id:"1",color:"#4267B2",icon:"mdi-facebook",tooltip:"Facebook Profile",action:()=>this.openInTab(this.contact.facebook_url)}]:[],...this.contact.linkedin_url?[{id:"2",color:"#0077b5",icon:"mdi-linkedin",tooltip:"Linkedin Profile",action:()=>this.openInTab(this.contact.linkedin_url)}]:[],...this.contact.twitter_url?[{id:"3",color:"#1DA1F2",icon:"mdi-twitter",tooltip:"Twitter Profile",action:()=>this.openInTab(this.contact.twitter_url)}]:[],...this.contact.website_url_1?[{id:"4",color:"secondary lighten-2",icon:"mdi-web",tooltip:"Personal Website",action:()=>this.openInTab(this.contact.website_url_1)}]:[],...e]},qaPhone(){var e;let t=!0,n="Upgrade your plan to unlock";return this.getSettingByKey("hasCalling")&&this.phoneMissing?n="Setup the phone connection to unlock":null!==(e=this.contact.phoneNumbers)&&void 0!==e&&e.length?this.getSettingByKey("hasCalling")&&!this.phoneMissing&&(t=!1,n="Call now"):n="Person does not have a phone number",{isDisabled:t,tooltip:n}},qaEmail(){var e;let t=!1,n="Send email";return(this.mailboxMissing||"unsubscribed"===(null===(e=this.contact)||void 0===e?void 0:e.emails_opt_status))&&(t=!0,n=this.mailboxMissing?"Setup the email connection to unlock":"Person marked do not email"),{isDisabled:t,tooltip:n}},qaCalendar(){let e=!1,t="Schedule meeting";return(this.mailboxMissing||"unsubscribed"===this.contact.emails_opt_status)&&(e=!0,t=this.mailboxMissing?"Setup the email connection to unlock":"Person marked do not email"),{isDisabled:e,tooltip:t}},crmManualSync(){let e="grey darken-1",t="Not synced with CRM",n="Sync to CRM";return this.contact&&this.contact.crm_sync_error?(e="error",t="CRM sync error",n="Click to resolve sync error"):this.contact&&this.contact.external_id&&(e="primary",t="Synced with CRM",n="Force sync to CRM"),{color:e,text:t,tooltip:n}},syncErrorBody(){var e,t,n;if(this.contact&&"DUPLICATE_DETECTED"===(null===(e=this.syncErrorObject)||void 0===e?void 0:e.code)&&null!==(t=this.syncErrorObject)&&void 0!==t&&null!==(n=t.object)&&void 0!==n&&n.prospect){var i,o,a,r,s=`Duplicate CRM Record Detected<br><br>Is this the same person?<br>Name: ${this.syncErrorObject.object.prospect.first_name} ${this.syncErrorObject.object.prospect.last_name}<br>`;return this.syncErrorObject.object.emailAddresses[0]&&(s+=`Email: ${null===(i=this.syncErrorObject.object)||void 0===i||null===(o=i.emailAddresses)||void 0===o?void 0:o[0].email}<br>`),this.syncErrorObject.object.phoneNumbers[0]&&(s+=`Phone: ${null===(a=this.syncErrorObject.object)||void 0===a||null===(r=a.phoneNumbers)||void 0===r?void 0:r[0].number}<br>`),s}return"There is a sync error that could not be identified. Please contact support."},syncErrorObject(){var e;return this.contact&&this.contact.crm_sync_error?null===(e=JSON.parse(this.contact.crm_sync_error))||void 0===e?void 0:e.payload:null},includeSyncErrorModalNegative(){return!(!this.crm||"salesforce"!==this.crm.crm_provider)}},watch:{contact:{handler(e){e&&(this.prospectOwner=e.user)},immediate:!0}}},U=V,H=(n("d66a4"),n("2877")),W=Object(H["a"])(U,O,P,!1,null,"461d81c5",null),K=W.exports,G=n("8654"),Q=function(){var e=this,t=e._self._c;return t("div",{staticClass:"h-100 overflow-auto pa-0"},[t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:n}){return[t(o["a"],{staticClass:"mb-3",attrs:{outlined:!e.hideCard,flat:e.hideCard}},[e.hideCard?e._e():t(a["d"],{staticClass:"d-flex align-center w-100 secondary--text py-2 border-b-1"},[e._v(" Prospect "),t(r["a"],{staticClass:"px-1 ml-2 font-weight-bold text-uppercase white--text",attrs:{label:"","x-small":"",color:e.contact.is_lead?"green":"blue lighten-2"}},[e._v(e._s(e.contact.is_lead?"Lead":"Contact")+" ")]),t(m["a"]),n?t(T["a"],{attrs:{"open-delay":"300",bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:o}){return[t(i["a"],e._g(e._b({attrs:{small:"",icon:""},on:{click:function(t){e.personalizeProspectFields=!0}}},"v-btn",o,!1),n),[t(c["a"],{attrs:{small:"",color:"grey darken-1"}},[e._v(" mdi-eye ")])],1)]}}],null,!0)},[t("span",[e._v("Personalize what you want to see")])]):e._e(),t(T["a"],{attrs:{"open-delay":"500",bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:o}){return[t(i["a"],e._g(e._b({attrs:{small:"",icon:""},on:{click:e.openEditPersonDialog}},"v-btn",o,!1),n),[t(c["a"],{attrs:{small:"",color:"grey darken-1"}},[e._v(" mdi-pencil ")])],1)]}}],null,!0)},[t("span",[e._v("Edit")])]),e.isOrgAdmin?t(i["a"],{staticClass:"px-2",attrs:{"x-small":"",outlined:""},on:{click:function(t){e.editFieldsDialog=!0}}},[t("span",{staticClass:"text-xs font-weight-bold"},[e._v("Custom fields")])]):e._e()],1),t(a["c"],{staticClass:"px-4 pt-4 pb-0"},[e.prospectAllFieldsHidden?t("div",{staticClass:"font-italic grey--text text--darken-2 mb-4"},[e._v(" All fields are hidden. You can unhide fields by clicking on personalize fields. ")]):e._e(),e._l(e.prospectFieldsConfig,(function(n){var o,a,s;return t("div",{key:n.id,staticClass:"d-flex align-start w-100",class:e.shouldAddBottomMargin(n)?"mb-4":"mb-0"},["emailAddresses"===n.value&&e.isFieldShown("emailAddresses","prospectFieldsConfig")?t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:o}){var a;return[t("div",{class:e.hasMergedFields(n)?"mr-2 w-50":"w-100"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{allowEdit:"",valuePlaceholder:"No address",icon:"mdi-email",id:"emailAddresses",value:e.contact.emailAddresses,hover:o,showValue:!(null===(a=e.contact.emailAddresses)||void 0===a||!a.length)},on:{"edit-clicked":function(t){return e.initTempEmails()},"save-clicked":function(t){return e.onValueSaved("emailAddresses",e.tempEmails)}},scopedSlots:e._u([{key:"label",fn:function(){return[t("div",[e._v(" Email"+e._s(e.contact.emailAddresses&&e.contact.emailAddresses.length>1?"s":"")+": "),t("span",{staticClass:"red--text"},[e._v(e._s(e.contactOptedOutEmails?"(Opted out)":""))])])]},proxy:!0},{key:"value",fn:function(){return e._l(e.contact.emailAddresses,(function(n,i){return t("email-address",{key:i,staticClass:"grey--text text--darken-4",attrs:{emailAddressObject:n,emailAddressString:n.email,prospect:e.contact}})}))},proxy:!0},{key:"editState",fn:function(){return[e._l(e.tempEmails,(function(n,o){return t("div",{key:o,staticClass:"d-flex align-center extra-dense-fields my-2"},[t(G["a"],{staticClass:"mr-2 w-75 text-body-2",attrs:{dense:"",outlined:"","hide-details":"",type:"email",placeholder:"Email#"+(o+1)},model:{value:e.tempEmails[o].email,callback:function(t){e.$set(e.tempEmails[o],"email",t)},expression:"tempEmails[index].email"}}),t(h["a"],{staticClass:"mr-2 w-25 text-caption",attrs:{dense:"",outlined:"","hide-details":"","item-text":"label","item-value":"value",items:e.getEmailTypes(o)},model:{value:e.tempEmails[o].email_type,callback:function(t){e.$set(e.tempEmails[o],"email_type",t)},expression:"tempEmails[index].email_type"}}),t(i["a"],{attrs:{icon:"","x-small":""}},[t(c["a"],{attrs:{color:"red",size:"15"},on:{click:function(t){return e.removeTempEmail(o)}}},[e._v(" mdi-trash-can ")])],1)],1)})),t("div",{staticClass:"d-flex justify-end mt-n1 mb-3 pr-7 w-100 link text-caption",on:{click:e.addTempEmail}},[e._v(" Add another ")])]},proxy:!0}],null,!0)})],1)],1)]}}],null,!0)}):"phoneNumbers"===n.value&&e.isFieldShown("phoneNumbers","prospectFieldsConfig")?t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:o}){return[t("div",{class:e.hasMergedFields(n)?"mr-2 w-50":"w-100"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{allowEdit:"",valuePlaceholder:"No phone",icon:"mdi-phone",id:"phoneNumbers",label:"Phone"+(e.contact.phoneNumbers&&e.contact.phoneNumbers.length>1?"s":""),hover:o,value:e.contact.phoneNumbers,showValue:!(!e.contact.phoneNumbers||!e.contact.phoneNumbers.length)},on:{"edit-clicked":function(t){return e.initTempPhones()},"save-clicked":function(t){return e.onValueSaved("phoneNumbers",e.tempPhones)}},scopedSlots:e._u([{key:"value",fn:function(){return e._l(e.contact.phoneNumbers,(function(n,i){return t("div",{key:i,staticClass:"grey--text text--darken-4"},[t("PhoneNumber",{attrs:{showFormattingAction:"",phoneNumberObject:n,prospect:e.contact},on:{"format-updated":function(t){return e.updatePhoneFormat(t,n)}}})],1)}))},proxy:!0},{key:"editState",fn:function(){return[e._l(e.tempPhones,(function(n,o){return t("div",{key:o,staticClass:"d-flex align-center extra-dense-fields my-2"},[t(G["a"],{staticClass:"mr-2 w-75 text-body-2",attrs:{dense:"",outlined:"","hide-details":"",placeholder:"Phone#"+(o+1)},model:{value:e.tempPhones[o].number,callback:function(t){e.$set(e.tempPhones[o],"number",t)},expression:"tempPhones[index].number"}}),t(h["a"],{staticClass:"mr-2 w-25 text-caption",attrs:{dense:"",outlined:"","hide-details":"","item-text":"label","item-value":"value",items:e.getPhoneTypes()},model:{value:e.tempPhones[o].phone_type,callback:function(t){e.$set(e.tempPhones[o],"phone_type",t)},expression:"tempPhones[index].phone_type"}}),t(i["a"],{attrs:{icon:"","x-small":""}},[t(c["a"],{attrs:{color:"red",size:"15"},on:{click:function(t){return e.removeTempPhone(o)}}},[e._v(" mdi-trash-can ")])],1)],1)})),t("div",{staticClass:"d-flex justify-end mt-n1 mb-3 pr-7 w-100 link text-caption",on:{click:e.addTempPhone}},[e._v(" Add another ")])]},proxy:!0}],null,!0)})],1)],1)]}}],null,!0)}):"prospect_status"===n.value&&e.isFieldShown("prospect_status","prospectFieldsConfig")?t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:i}){return[t("div",{class:e.hasMergedFields(n)?"mr-2 w-50":"w-100"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{allowEdit:"",id:"prospect-status",valuePlaceholder:"No status",icon:"mdi-clipboard-account",label:"Status",dataType:"enum",editComponent:"VSelect",editOptions:e.prospectStatuses,hover:i,value:e.contact.prospect_status,showValue:!!e.contact.prospect_status},on:{"save-clicked":function(t){return e.onValueSaved("prospect_status",t)}},scopedSlots:e._u([{key:"value",fn:function(){return[t(r["a"],{staticClass:"font-weight-medium",attrs:{"x-small":"",label:"",color:e.getProspectStatusColor(e.contact.prospect_status),"text-color":e.getTextColorFromBG(e.getProspectStatusColor(e.contact.prospect_status))}},[e._v(" "+e._s(e.getProspectStatusName(e.contact.prospect_status))+" ")])]},proxy:!0}],null,!0)})],1)],1)]}}],null,!0)}):"title"===n.value&&e.isFieldShown("title","prospectFieldsConfig")?t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:i}){return[t("div",{class:e.hasMergedFields(n)?"mr-2 w-50":"w-100"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{allowEdit:"",id:"title",valuePlaceholder:"No title",icon:"mdi-card-account-details",label:"Title",dataType:"string",editComponent:"VTextField",hover:i,value:e.contact.title,showValue:!!e.contact.title},on:{"save-clicked":function(t){return e.onValueSaved("title",t)}}})],1)],1)]}}],null,!0)}):"website_url_1"===n.value&&e.isFieldShown("website_url_1","prospectFieldsConfig")?t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:i}){return[t("div",{class:e.hasMergedFields(n)?"mr-2 w-50":"w-100"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{allowEdit:"",id:"website_url_1",valuePlaceholder:"No website",icon:"mdi-web",label:"Website",dataType:"link",editComponent:"URLInputField",hover:i,value:e.contact.website_url_1,showValue:!!e.contact.website_url_1},on:{"save-clicked":function(t){return e.onValueSaved("website_url_1",t)}},scopedSlots:e._u([{key:"value",fn:function(){return[t("div",{staticClass:"d-flex align-center w-100"},[t(T["a"],{attrs:{bottom:"","open-delay":"100"},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t("a",e._g({staticClass:"text-caption text-truncate",staticStyle:{"max-width":"calc(100% - 40px)"},attrs:{target:"_blank",href:e.contact.website_url_1}},n),[e._v(" "+e._s(e.contact.website_url_1)+" ")])]}}],null,!0)},[e._v(" "+e._s(e.contact.website_url_1)+" ")]),t("copy-icon",{staticClass:"ml-2",attrs:{url:e.contact.website_url_1}})],1)]},proxy:!0}],null,!0)})],1)],1)]}}],null,!0)}):"csvImport"===n.value&&e.isFieldShown("csvImport","prospectFieldsConfig")?t(_["a"],[t("div",{class:e.hasMergedFields(n)?"mr-2 w-50":"w-100"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{id:"csvImport",valuePlaceholder:"Not imported in CSV",icon:"mdi-file",label:"Import filename",dataType:"string",value:null===(o=e.contact.csvImport)||void 0===o?void 0:o.name,showValue:!!e.contact.csvImport}})],1)],1)]):"degree"===n.value&&e.isFieldShown("degree","prospectFieldsConfig")?t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:i}){return[t("div",{class:e.hasMergedFields(n)?"mr-2 w-50":"w-100"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{allowEdit:"",id:"degree",valuePlaceholder:"No degree",icon:"mdi-school",label:"Degree",dataType:"string",editComponent:"VTextField",hover:i,value:e.contact.degree,showValue:!!e.contact.degree},on:{"save-clicked":function(t){return e.onValueSaved("degree",t)}}})],1)],1)]}}],null,!0)}):"school"===n.value&&e.isFieldShown("school","prospectFieldsConfig")?t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:i}){return[t("div",{class:e.hasMergedFields(n)?"mr-2 w-50":"w-100"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{allowEdit:"",id:"school",valuePlaceholder:"No school",icon:"mdi-town-hall",label:"School attended",dataType:"string",editComponent:"VTextField",hover:i,value:e.contact.school,showValue:!!e.contact.school},on:{"save-clicked":function(t){return e.onValueSaved("school",t)}}})],1)],1)]}}],null,!0)}):"address"===n.value&&e.isFieldShown("address","prospectFieldsConfig")?t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:i}){return[t("div",{class:e.hasMergedFields(n)?"mr-2 w-50":"w-100"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{allowEdit:"",disableInlineEdit:"",valuePlaceholder:"No address",icon:"mdi-map-marker",label:"Address",hover:i,value:e.getContactFormattedAddress(e.contact),showValue:!!e.getContactFormattedAddress(e.contact).trim()},on:{"edit-clicked":function(t){return e.openEditPersonDialog(1)}}})],1)],1)]}}],null,!0)}):"date_of_birth"===n.value&&e.isFieldShown("date_of_birth","prospectFieldsConfig")?t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:i}){return[t("div",{class:e.hasMergedFields(n)?"mr-2 w-50":"w-100"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{allowEdit:"",id:"date_of_birth",valuePlaceholder:"No value",icon:"mdi-calendar",label:"Birthdate",dataType:"date",editComponent:"DateTimePicker",hover:i,value:e.contact.date_of_birth,showValue:!!e.contact.date_of_birth},on:{"save-clicked":function(t){return e.onValueSaved("date_of_birth",t,"date")}},scopedSlots:e._u([{key:"value",fn:function(){return[e._v(" "+e._s(e.formatToLocalDate(e.contact.date_of_birth))+" ")]},proxy:!0}],null,!0)})],1)],1)]}}],null,!0)}):"prospectTags"===n.value&&e.isFieldShown("prospectTags","prospectFieldsConfig")?t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:i}){return[t("div",{class:e.hasMergedFields(n)?"mr-2 w-50":"w-100"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{allowEdit:"",id:"prospectTags",valuePlaceholder:"No tags",icon:"mdi-tag",label:"Tags",hover:i,value:e.contact.prospectTags,showValue:!(!e.contact.prospectTags||!e.contact.prospectTags.length)},on:{"edit-clicked":e.initTempTags,"save-clicked":function(t){return e.onValueSaved("prospectTags",e.tempTags)}},scopedSlots:e._u([{key:"value",fn:function(){return e._l(e.contact.prospectTags,(function(e){return t("prospect-tag",{key:e.id,staticClass:"ma-1",attrs:{tag:e,size:"small"}})}))},proxy:!0},{key:"editState",fn:function(){return[t("assign-prospect-tags",{staticClass:"mt-2",attrs:{hideLabel:""},model:{value:e.tempTags,callback:function(t){e.tempTags=t},expression:"tempTags"}})]},proxy:!0}],null,!0)})],1)],1)]}}],null,!0)}):"crm_last_contacted_at"===n.value&&e.isFieldShown("crm_last_contacted_at","prospectFieldsConfig")?t("div",{class:e.hasMergedFields(n)?"mr-2 w-50":"w-100"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{id:"crm_last_contacted_at",valuePlaceholder:"No value",icon:"mdi-history",label:"CRM Last Contacted",dataType:"date",value:e.contact.crm_last_contacted_at,showValue:!!e.contact.crm_last_contacted_at},scopedSlots:e._u([{key:"value",fn:function(){return[e._v(" "+e._s(e.formatToLocalDate(e.contact.crm_last_contacted_at))+" ")]},proxy:!0}],null,!0)})],1)],1):e.isFieldShown(n.value,"prospectFieldsConfig")?t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:i}){var o,a,r,s,l,c;return[t("div",{class:e.hasMergedFields(n)?"mr-2 w-50":"w-100"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{allowEdit:"",valuePlaceholder:"No value",id:n.value,dataType:n.type||(null===(o=e.prospectFieldByKey(n.value))||void 0===o?void 0:o.type),editComponent:e.getProspectFieldComponent(n.type),editOptions:(null===(a=e.prospectFieldByKey(n.value))||void 0===a?void 0:a.options)||[],hover:i,value:"datetime"===n.type?e.convertToUserTimeZone(e.contact[n.value],!0):e.contact[n.value],displayWithCommas:!!(null!==(r=e.prospectFieldByKey(n.value))&&void 0!==r&&r.display_with_commas||n.displayWithCommas),showValue:"boolean"===n.type||("set"===n.type?!(null===(s=e.contact[n.value])||void 0===s||!s.length):!!e.contact[n.value]),icon:n.icon||e.getProspectFieldIcon(n.type),label:null===(l=e.prospectFieldByKey(n.value))||void 0===l?void 0:l.name},on:{"save-clicked":function(t){return e.onValueSaved(n.value,t,n.type)}},scopedSlots:e._u(["set"===n.type&&null!==(c=e.contact[n.value])&&void 0!==c&&c.length?{key:"value",fn:function(){return[t("ul",e._l(e.contact[n.value],(function(n,i){return t("li",{key:i,staticClass:"grey--text text--darken-4"},[e._v(" "+e._s(n)+" ")])})),0)]},proxy:!0}:null],null,!0)})],1)],1)]}}],null,!0)}):e._e(),null!==(a=n.mergedWith)&&void 0!==a&&a.length?["emailAddresses"===n.mergedWith[0].value&&e.isFieldShown("emailAddresses","prospectFieldsConfig")?t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:o}){var a;return[t("div",{class:n.show?"w-50":"w-100"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{allowEdit:"",valuePlaceholder:"No address",icon:"mdi-email",id:"emailAddresses",value:e.contact.emailAddresses,hover:o,showValue:!(null===(a=e.contact.emailAddresses)||void 0===a||!a.length)},on:{"edit-clicked":function(t){return e.initTempEmails()},"save-clicked":function(t){return e.onValueSaved("emailAddresses",e.tempEmails)}},scopedSlots:e._u([{key:"label",fn:function(){return[t("div",[e._v(" Email"+e._s(e.contact.emailAddresses&&e.contact.emailAddresses.length>1?"s":"")+": "),t("span",{staticClass:"red--text"},[e._v(e._s(e.contactOptedOutEmails?"(Opted out)":""))])])]},proxy:!0},{key:"value",fn:function(){return e._l(e.contact.emailAddresses,(function(n,i){return t("email-address",{key:i,staticClass:"grey--text text--darken-4",attrs:{emailAddressObject:n,emailAddressString:n.email,prospect:e.contact}})}))},proxy:!0},{key:"editState",fn:function(){return[e._l(e.tempEmails,(function(n,o){return t("div",{key:o,staticClass:"d-flex align-center extra-dense-fields my-2"},[t(G["a"],{staticClass:"mr-2 w-75 text-body-2",attrs:{dense:"",outlined:"","hide-details":"",type:"email",placeholder:"Email#"+(o+1)},model:{value:e.tempEmails[o].email,callback:function(t){e.$set(e.tempEmails[o],"email",t)},expression:"tempEmails[index].email"}}),t(h["a"],{staticClass:"mr-2 w-25 text-caption",attrs:{dense:"",outlined:"","hide-details":"","item-text":"label","item-value":"value",items:e.getEmailTypes(o)},model:{value:e.tempEmails[o].email_type,callback:function(t){e.$set(e.tempEmails[o],"email_type",t)},expression:"tempEmails[index].email_type"}}),t(i["a"],{attrs:{icon:"","x-small":""}},[t(c["a"],{attrs:{color:"red",size:"15"},on:{click:function(t){return e.removeTempEmail(o)}}},[e._v("mdi-trash-can")])],1)],1)})),t("div",{staticClass:"d-flex justify-end mt-n1 mb-3 pr-7 w-100 link text-caption",on:{click:e.addTempEmail}},[e._v(" Add another ")])]},proxy:!0}],null,!0)})],1)],1)]}}],null,!0)}):"phoneNumbers"===n.mergedWith[0].value&&e.isFieldShown("phoneNumbers","prospectFieldsConfig")?t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:o}){return[t("div",{class:n.show?"w-50":"w-100"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{allowEdit:"",valuePlaceholder:"No phone",icon:"mdi-phone",id:"phoneNumbers",label:"Phone"+(e.contact.phoneNumbers&&e.contact.phoneNumbers.length>1?"s":""),hover:o,value:e.contact.phoneNumbers,showValue:!(!e.contact.phoneNumbers||!e.contact.phoneNumbers.length)},on:{"edit-clicked":function(t){return e.initTempPhones()},"save-clicked":function(t){return e.onValueSaved("phoneNumbers",e.tempPhones)}},scopedSlots:e._u([{key:"value",fn:function(){return e._l(e.contact.phoneNumbers,(function(n,i){return t("div",{key:i,staticClass:"grey--text text--darken-4"},[t("PhoneNumber",{attrs:{showFormattingAction:"",phoneNumberObject:n,prospect:e.contact},on:{"format-updated":function(t){return e.updatePhoneFormat(t,n)}}})],1)}))},proxy:!0},{key:"editState",fn:function(){return[e._l(e.tempPhones,(function(n,o){return t("div",{key:o,staticClass:"d-flex align-center extra-dense-fields my-2"},[t(G["a"],{staticClass:"mr-2 w-75 text-body-2",attrs:{dense:"",outlined:"","hide-details":"",placeholder:"Phone#"+(o+1)},model:{value:e.tempPhones[o].number,callback:function(t){e.$set(e.tempPhones[o],"number",t)},expression:"tempPhones[index].number"}}),t(h["a"],{staticClass:"mr-2 w-25 text-caption",attrs:{dense:"",outlined:"","hide-details":"","item-text":"label","item-value":"value",items:e.getPhoneTypes()},model:{value:e.tempPhones[o].phone_type,callback:function(t){e.$set(e.tempPhones[o],"phone_type",t)},expression:"tempPhones[index].phone_type"}}),t(i["a"],{attrs:{icon:"","x-small":""}},[t(c["a"],{attrs:{color:"red",size:"15"},on:{click:function(t){return e.removeTempPhone(o)}}},[e._v(" mdi-trash-can ")])],1)],1)})),t("div",{staticClass:"d-flex justify-end mt-n1 mb-3 pr-7 w-100 link text-caption",on:{click:e.addTempPhone}},[e._v(" Add another ")])]},proxy:!0}],null,!0)})],1)],1)]}}],null,!0)}):"prospect_status"===n.mergedWith[0].value&&e.isFieldShown("prospect_status","prospectFieldsConfig")?t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:i}){return[t("div",{class:n.show?"w-50":"w-100"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{allowEdit:"",id:"prospect-status",valuePlaceholder:"No status",icon:"mdi-clipboard-account",label:"Status",dataType:"enum",editComponent:"VSelect",editOptions:e.prospectStatuses,hover:i,value:e.contact.prospect_status,showValue:!!e.contact.prospect_status},on:{"save-clicked":function(t){return e.onValueSaved("prospect_status",t)}},scopedSlots:e._u([{key:"value",fn:function(){return[t(r["a"],{staticClass:"font-weight-medium",attrs:{"x-small":"",label:"",color:e.getProspectStatusColor(e.contact.prospect_status),"text-color":e.getTextColorFromBG(e.getProspectStatusColor(e.contact.prospect_status))}},[e._v(" "+e._s(e.getProspectStatusName(e.contact.prospect_status))+" ")])]},proxy:!0}],null,!0)})],1)],1)]}}],null,!0)}):"title"===n.mergedWith[0].value&&e.isFieldShown("title","prospectFieldsConfig")?t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:i}){return[t("div",{class:n.show?"w-50":"w-100"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{allowEdit:"",id:"title",valuePlaceholder:"No title",icon:"mdi-card-account-details",label:"Title",dataType:"string",editComponent:"VTextField",hover:i,value:e.contact.title,showValue:!!e.contact.title},on:{"save-clicked":function(t){return e.onValueSaved("title",t)}}})],1)],1)]}}],null,!0)}):"website_url_1"===n.mergedWith[0].value&&e.isFieldShown("website_url_1","prospectFieldsConfig")?t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:i}){return[t("div",{class:n.show?"w-50":"w-100"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{allowEdit:"",id:"website_url_1",valuePlaceholder:"No website",icon:"mdi-web",label:"Website",dataType:"link",editComponent:"URLInputField",hover:i,value:e.contact.website_url_1,showValue:!!e.contact.website_url_1},on:{"save-clicked":function(t){return e.onValueSaved("website_url_1",t)}},scopedSlots:e._u([{key:"value",fn:function(){return[t("div",{staticClass:"d-flex align-center w-100"},[t(T["a"],{attrs:{bottom:"","open-delay":"100"},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t("a",e._g({staticClass:"text-caption text-truncate",staticStyle:{"max-width":"calc(100% - 40px)"},attrs:{target:"_blank",href:e.contact.website_url_1}},n),[e._v(" "+e._s(e.contact.website_url_1)+" ")])]}}],null,!0)},[e._v(" "+e._s(e.contact.website_url_1)+" ")]),t("copy-icon",{staticClass:"ml-2",attrs:{url:e.contact.website_url_1}})],1)]},proxy:!0}],null,!0)})],1)],1)]}}],null,!0)}):"csvImport"===n.mergedWith[0].value&&e.isFieldShown("csvImport","prospectFieldsConfig")?t(_["a"],[t("div",{class:n.show?"w-50":"w-100"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{id:"csvImport",valuePlaceholder:"Not imported in CSV",icon:"mdi-file",label:"Import filename",dataType:"string",value:null===(s=e.contact.csvImport)||void 0===s?void 0:s.name,showValue:!!e.contact.csvImport}})],1)],1)]):"degree"===n.mergedWith[0].value&&e.isFieldShown("degree","prospectFieldsConfig")?t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:i}){return[t("div",{class:n.show?"w-50":"w-100"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{allowEdit:"",id:"degree",valuePlaceholder:"No degree",icon:"mdi-school",label:"Degree",dataType:"string",editComponent:"VTextField",hover:i,value:e.contact.degree,showValue:!!e.contact.degree},on:{"save-clicked":function(t){return e.onValueSaved("degree",t)}}})],1)],1)]}}],null,!0)}):"school"===n.mergedWith[0].value&&e.isFieldShown("school","prospectFieldsConfig")?t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:i}){return[t("div",{class:n.show?"w-50":"w-100"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{allowEdit:"",id:"school",valuePlaceholder:"No school",icon:"mdi-town-hall",label:"School attended",dataType:"string",editComponent:"VTextField",hover:i,value:e.contact.school,showValue:!!e.contact.school},on:{"save-clicked":function(t){return e.onValueSaved("school",t)}}})],1)],1)]}}],null,!0)}):"address"===n.mergedWith[0].value&&e.isFieldShown("address","prospectFieldsConfig")?t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:i}){return[t("div",{class:n.show?"w-50":"w-100"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{allowEdit:"",disableInlineEdit:"",valuePlaceholder:"No address",icon:"mdi-map-marker",label:"Address",hover:i,value:e.getContactFormattedAddress(e.contact),showValue:!!e.getContactFormattedAddress(e.contact).trim()},on:{"edit-clicked":function(t){return e.openEditPersonDialog(1)}}})],1)],1)]}}],null,!0)}):"date_of_birth"===n.mergedWith[0].value&&e.isFieldShown("date_of_birth","prospectFieldsConfig")?t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:i}){return[t("div",{class:n.show?"w-50":"w-100"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{allowEdit:"",id:"date_of_birth",valuePlaceholder:"No value",icon:"mdi-calendar",label:"Birthdate",dataType:"date",editComponent:"DateTimePicker",hover:i,value:e.contact.date_of_birth,showValue:!!e.contact.date_of_birth},on:{"save-clicked":function(t){return e.onValueSaved("date_of_birth",t,"date")}},scopedSlots:e._u([{key:"value",fn:function(){return[e._v(" "+e._s(e.formatToLocalDate(e.contact.date_of_birth))+" ")]},proxy:!0}],null,!0)})],1)],1)]}}],null,!0)}):"prospectTags"===n.mergedWith[0].value&&e.isFieldShown("prospectTags","prospectFieldsConfig")?t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:i}){return[t("div",{class:n.show?"w-50":"w-100"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{allowEdit:"",id:"prospectTags",valuePlaceholder:"No tags",icon:"mdi-tag",label:"Tags",hover:i,value:e.contact.prospectTags,showValue:!(!e.contact.prospectTags||!e.contact.prospectTags.length)},on:{"edit-clicked":e.initTempTags,"save-clicked":function(t){return e.onValueSaved("prospectTags",e.tempTags)}},scopedSlots:e._u([{key:"value",fn:function(){return e._l(e.contact.prospectTags,(function(e){return t("prospect-tag",{key:e.id,staticClass:"ma-1",attrs:{tag:e,size:"small"}})}))},proxy:!0},{key:"editState",fn:function(){return[t("assign-prospect-tags",{staticClass:"mt-2",attrs:{hideLabel:""},model:{value:e.tempTags,callback:function(t){e.tempTags=t},expression:"tempTags"}})]},proxy:!0}],null,!0)})],1)],1)]}}],null,!0)}):"crm_last_contacted_at"===n.mergedWith[0].value&&e.isFieldShown("crm_last_contacted_at","prospectFieldsConfig")?t("div",{class:n.show?"w-50":"w-100"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{id:"crm_last_contacted_at",valuePlaceholder:"No value",icon:"mdi-history",label:"CRM Last Contacted",dataType:"date",value:e.contact.crm_last_contacted_at,showValue:!!e.contact.crm_last_contacted_at},scopedSlots:e._u([{key:"value",fn:function(){return[e._v(" "+e._s(e.formatToLocalDate(e.contact.crm_last_contacted_at))+" ")]},proxy:!0}],null,!0)})],1)],1):e.isFieldShown(n.mergedWith[0].value,"prospectFieldsConfig")?t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:i}){var o,a,r,s;return[t("div",{class:n.show?"w-50":"w-100"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{allowEdit:"",valuePlaceholder:"No value",id:n.mergedWith[0].value,dataType:n.mergedWith[0].type,editComponent:e.getProspectFieldComponent(n.mergedWith[0].type),editOptions:(null===(o=e.prospectFieldByKey(n.mergedWith[0].value))||void 0===o?void 0:o.options)||[],hover:i,value:"datetime"===n.mergedWith[0].type?e.convertToUserTimeZone(e.contact[n.mergedWith[0].value],!0):e.contact[n.mergedWith[0].value],displayWithCommas:!!(null!==(a=e.prospectFieldByKey(n.value))&&void 0!==a&&a.display_with_commas||n.displayWithCommas),showValue:"boolean"===n.mergedWith[0].type||("set"===n.mergedWith[0].type?!(null===(r=e.contact[n.mergedWith[0].value])||void 0===r||!r.length):!!e.contact[n.mergedWith[0].value]),icon:n.mergedWith[0].icon||e.getProspectFieldIcon(n.mergedWith[0].type),label:n.mergedWith[0].text},on:{"save-clicked":function(t){return e.onValueSaved(n.mergedWith[0].value,t,n.mergedWith[0].type)}},scopedSlots:e._u(["set"===n.mergedWith[0].type&&null!==(s=e.contact[n.mergedWith[0].value])&&void 0!==s&&s.length?{key:"value",fn:function(){return[t("ul",e._l(e.contact[n.mergedWith[0].value],(function(n,i){return t("li",{key:i,staticClass:"grey--text text--darken-4"},[e._v(" "+e._s(n)+" ")])})),0)]},proxy:!0}:null],null,!0)})],1)],1)]}}],null,!0)}):e._e()]:e._e()],2)}))],2)],1)]}}])}),e.contact.is_lead||e.hideAccount?e._e():t("account-card",{attrs:{showContactsInAccount:"",isContactPage:"",contact:e.contact,account:e.contact.account,allFieldsHidden:e.accountAllFieldsHidden,isFieldShown:e.isFieldShown,dataLoading:e.contactLoading},on:{"account-updated":e.onAccountUpdated,"personalize-fields":function(t){e.personalizeAccountFields=!0},"edit-account":e.openEditAccountDialog,"switch-account":function(t){e.switchAccount=!0}}}),e.contact.is_lead?t(o["a"],{attrs:{id:"account-card",outlined:""}},[t(a["d"],{staticClass:"secondary--text py-2 border-b-1"},[e._v("Company Details "),t(m["a"]),[t(T["a"],{attrs:{"open-delay":"500",bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:o}){return[t(i["a"],e._g(e._b({attrs:{small:"",icon:""},on:{click:function(t){return e.openEditPersonDialog(3)}}},"v-btn",o,!1),n),[t(c["a"],{attrs:{small:"",color:"grey darken-1"}},[e._v(" mdi-pencil ")])],1)]}}],null,!1,1689342478)},[t("span",[e._v("Edit")])])]],2),t(a["c"],{staticClass:"px-4 pt-4 pb-0"},[e.accountAllFieldsHidden?t("div",{staticClass:"font-italic grey--text text--darken-2 mb-4"},[e._v(" All fields are hidden. You can unhide fields by clicking on personalize fields. ")]):e._e(),e.isFieldShown("Name","leadCompanyFieldsConfig")?t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:n}){return[t("div",{staticClass:"mb-4"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{allowEdit:"",valuePlaceholder:"No account",icon:"mdi-office-building",label:"Name",hover:n,value:e.contact.lead_company,showValue:!!e.contact.lead_company}})],1)],1)]}}],null,!1,1558833982)}):e._e(),e.isFieldShown("Industry","leadCompanyFieldsConfig")?t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:n}){return[t("div",{staticClass:"mb-4"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{allowEdit:"",valuePlaceholder:"No industry",icon:"mdi-factory",label:"Industry",hover:n,showValue:!!e.contact.lead_industry},scopedSlots:e._u([{key:"value",fn:function(){return[t("read-more",{attrs:{text:e.contact.lead_industry}})]},proxy:!0}],null,!0)})],1)],1)]}}],null,!1,576896216)}):e._e(),e.isFieldShown("Annual revenue","leadCompanyFieldsConfig")?t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:n}){return[t("div",{staticClass:"mb-4"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{allowEdit:"",id:"lead_annual_revenue",valuePlaceholder:"No value",icon:"mdi-currency-usd",label:"Annual revenue",dataType:"string",editComponent:"VTextField",hover:n,showValue:!!e.contact.lead_annual_revenue,value:e.contact.lead_annual_revenue},on:{"save-clicked":function(t){return e.onValueSaved("lead_annual_revenue",t)}}})],1)],1)]}}],null,!1,1514174842)}):e._e(),e.isFieldShown("Number of employees","leadCompanyFieldsConfig")?t(_["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:n}){return[t("div",{staticClass:"mb-4"},[t("SkeletonLoader",{attrs:{isLoading:e.contactLoading,loaderType:"sentences",styleClass:"mr-4"}},[t("icon-label-value",{attrs:{allowEdit:"",id:"lead_number_of_employees",dataType:"string",editComponent:"VTextField",valuePlaceholder:"No value",icon:"mdi-account-group",label:"Number of employees",hover:n,showValue:!!e.contact.lead_number_of_employees,value:e.contact.lead_number_of_employees},on:{"save-clicked":function(t){return e.onValueSaved("lead_number_of_employees",t)}}})],1)],1)]}}],null,!1,3358809337)}):e._e()],1)],1):e._e(),t(l["a"],{attrs:{scrollable:"","max-width":"650"},on:{"click:outside":function(t){e.personalizeProspectFields=!1}},model:{value:e.personalizeProspectFields,callback:function(t){e.personalizeProspectFields=t},expression:"personalizeProspectFields"}},[t("personalize-fields",{attrs:{configName:"prospectCardFieldsConfig",allowOrderingAndMerging:!0},model:{value:e.prospectFieldsConfig,callback:function(t){e.prospectFieldsConfig=t},expression:"prospectFieldsConfig"}})],1),t(l["a"],{attrs:{scrollable:"","max-width":"650"},on:{"click:outside":function(t){e.personalizeAccountFields=!1}},model:{value:e.personalizeAccountFields,callback:function(t){e.personalizeAccountFields=t},expression:"personalizeAccountFields"}},[t("personalize-fields",{attrs:{configName:"accountCardFieldsConfig"},model:{value:e.accountFieldsConfig,callback:function(t){e.accountFieldsConfig=t},expression:"accountFieldsConfig"}})],1),t(l["a"],{attrs:{scrollable:"","max-width":"750"},on:{"click:outside":function(t){e.editFieldsDialog=!1}},model:{value:e.editFieldsDialog,callback:function(t){e.editFieldsDialog=t},expression:"editFieldsDialog"}},[t(o["a"],[t(a["d"],{staticClass:"border-b-1"},[e._v(" Customize fields ")]),t(a["c"],{staticClass:"py-3",staticStyle:{height:"600px"}},[e.editFieldsDialog?t("customize-prospect-fields"):e._e()],1)],1)],1)],1)},Y=[],Z=n("fc88"),J=n("4324"),X=n("1d51"),ee=n("df61"),te=n("ee49"),ne=n("ec42"),ie=n("76d9"),oe=function(){var e=this,t=e._self._c;return t(T["a"],{attrs:{bottom:"","open-delay":"200"},scopedSlots:e._u([{key:"activator",fn:function({on:n,attrs:o}){return[t(i["a"],e._g(e._b({attrs:{color:"primary lighten-2",text:"",icon:"","x-small":""},on:{click:function(t){return e.copyToClipboard()}}},"v-btn",o,!1),n),[t(c["a"],{attrs:{"x-small":"",color:e.isCopied?"green":""}},[e._v(" "+e._s(e.isCopied?"mdi-check":"mdi-content-copy")+" ")])],1)]}}])},[t("span",[e._v(e._s(e.copyText))])])},ae=[],re={name:"CopyIcon",data:()=>({isCopied:!1}),props:{url:{type:String,required:!0}},computed:{copyText(){return this.isCopied?"Copied":"Copy"}},methods:{copyToClipboard(){navigator.clipboard.writeText(this.url),this.isCopied=!0,setTimeout(()=>this.isCopied=!1,2e3)}}},se=re,le=Object(H["a"])(se,oe,ae,!1,null,null,null),ce=le.exports,ue=n("0131"),de=n("431c"),pe=n("e9f8"),he=n("e8e0"),fe=n("5a50");const me=n("63ea"),ve=n("0644"),ge=n("a8fc"),ye=[{text:"Email",value:"emailAddresses",show:!0,default_field:!0},{text:"Phone",value:"phoneNumbers",show:!0,default_field:!0},{text:"Address",value:"address",show:!0,default_field:!0},{text:"Title",value:"title",show:!0,default_field:!0},{text:"Website",value:"website_url_1",show:!0,default_field:!0},{text:"Lead annual revenue",value:"lead_annual_revenue",show:!1,default_field:!0,icon:"mdi-currency-usd"},{text:"Import filename",value:"csvImport",show:!0,default_field:!0},{text:"Degree",value:"degree",show:!1,default_field:!0},{text:"School attended",value:"school",show:!0,default_field:!0},{text:"Birthdate",value:"date_of_birth",show:!1,default_field:!0},{text:"Tags",value:"prospectTags",show:!1,default_field:!0},{text:"Status",value:"prospect_status",show:!1,default_field:!0},{text:"CRM Last Contacted",value:"crm_last_contacted_at",show:!1,default_field:!0}],be=[{text:"Name",show:!0},{text:"Description",show:!0},{text:"Phone",show:!0},{text:"Industry",show:!0},{text:"Founded on",show:!0},{text:"Number of employees",show:!0},{text:"SIC code",show:!0}],we=[{text:"Name",show:!0},{text:"Industry",show:!0},{text:"Annual revenue",show:!0},{text:"Number of employees",show:!0}];var _e={mixins:[he["a"]],props:{hideCard:{type:Boolean,default:!1},hideAccount:{type:Boolean,default:!1}},data:()=>({personalizeAccountFields:!1,personalizeProspectFields:!1,editFieldsDialog:!1,switchAccount:!1,leadCompanyFieldsConfig:we,accountFieldsConfig:be,prospectFieldsConfig:ye,tempTags:[],tempEmails:[],tempPhones:[]}),components:{SkeletonLoader:A["a"],ReadMore:Z["a"],IconLabelValue:J["default"],PersonalizeFields:ee["a"],ProspectTag:X["default"],PhoneNumber:te["default"],AccountCard:ue["a"],EmailAddress:ne["default"],CustomizeProspectFields:ie["a"],AssignProspectTags:de["default"],CopyIcon:ce},watch:{customProspectFields(){this.setProspectFieldsConfig()},personalizeProspectFields(e,t){!e&&t&&this.saveCurrentProspectFieldsConfig()},personalizeAccountFields(e,t){!e&&t&&this.updateSetting({userId:this.user.id,settings:{settings_key:fe["n"].ACCOUNT_CARD_FIELDS_CONFIG,settings_value:this.accountFieldsConfig}})}},methods:{...Object(b["b"])("user",["updateSetting"]),...Object(b["b"])("contact",["updateContact"]),...Object(b["d"])("contact",["setContact"]),...Object(b["b"])("prospectFields",["fetchProspectFields"]),_isEqual:me,openInTab:B["S"],convertToUserTimeZone:pe["i"],getProspectFieldIcon:fe["I"],getTextColorFromBG:B["L"],getProspectFieldComponent:fe["H"],getContactFormattedAddress:B["u"],updatePhoneFormat(e,t){const n=this.contact.phoneNumbers.findIndex(e=>e.id===t.id);if(-1===n)return;const i={id:t.id,phone_type:t.phone_type,number:e},o=[...this.contact.phoneNumbers.slice(0,n),i,...this.contact.phoneNumbers.slice(n+1)];this.updateContact({prospect:{phoneNumbers:o},prospectId:this.contact.id,hideLoader:!0})},getProspectStatusName(e){var t;if(!e)return"";const n=null===(t=this.prospectStatuses)||void 0===t?void 0:t.find(t=>t.value===e);return(null===n||void 0===n?void 0:n.name)||e},getProspectStatusColor(e){var t;if(!e)return"";const n=null===(t=this.prospectStatuses)||void 0===t?void 0:t.find(t=>t.value===e);return null===n||void 0===n?void 0:n.color},setAccountFieldsConfig(){const e=this.getSettingByKey(fe["n"].ACCOUNT_CARD_FIELDS_CONFIG);e&&e.length&&(this.accountFieldsConfig=ve(e))},setProspectFieldsConfig(){const e=this.getSettingByKey(fe["n"].PROSPECT_CARD_FIELDS_CONFIG)||[];let t=[];var n;e.length?e.forEach(e=>{var n;const i=ye.find(t=>t.value===e.value),o=this.customProspectFields.find(t=>t.key===e.value);if(i||o){var a;const n=i||o;let r=[];null!==(a=e.mergedWith)&&void 0!==a&&a.length&&e.mergedWith.forEach(e=>{const t=ye.find(t=>t.value===e.value),n=this.customProspectFields.find(t=>t.key===e.value);(t||n)&&r.push(e)}),t.push({...e,name:n.name,mergedWith:r})}else null!==(n=e.mergedWith)&&void 0!==n&&n.length&&e.mergedWith.forEach(e=>{const n=ye.find(t=>t.value===e.value),i=this.customProspectFields.find(t=>t.key===e.value);(n||i)&&t.push(e)})}):t=[...ye,...null===(n=this.customProspectFields)||void 0===n?void 0:n.map(e=>({text:e.name,value:e.key,show:!0,type:e.type,displayWithCommas:e.display_with_commas,mergedWith:[]}))];this.customProspectFields.forEach(e=>{const n=t.findIndex(t=>t.value===e.key||(t.mergedWith||[]).some(t=>t.value===e.key));-1===n?t.push({name:e.name,text:e.name,value:e.key,show:!0,type:e.type,displayWithCommas:e.display_with_commas,mergedWith:[]}):t[n]={...t[n],name:e.name,text:e.name}}),ye.forEach(e=>{const n=t.find(t=>t.value===e.value||(t.mergedWith||[]).some(t=>t.value===e.value));n||t.push({text:e.text,name:e.text,value:e.value,show:!0,type:e.type,default_field:!0,mergedWith:[],icon:e.icon})}),this.prospectFieldsConfig=ge(t,"value"),this.saveCurrentProspectFieldsConfig()},hasMergedFields(e){return(e.mergedWith||[]).some(e=>e.show)},shouldAddBottomMargin(e){var t;return e.show||(null===(t=e.mergedWith)||void 0===t?void 0:t.some(e=>!!e.show))},saveCurrentProspectFieldsConfig(){this.updateSetting({userId:this.user.id,settings:{settings_key:fe["n"].PROSPECT_CARD_FIELDS_CONFIG,settings_value:this.prospectFieldsConfig}})},openEditAccountDialog(){$["a"].$emit("open-create-account",{accountToEdit:this.contact.account,editMode:!0})},openEditPersonDialog(e=0){$["a"].$emit("open-create-person",{personToEdit:this.contact,editMode:!0,selectedEditProspectSection:e})},initTempTags(){this.tempTags=ve(this.contact.prospectTags)||[]},initTempEmails(){var e;this.tempEmails=null!==(e=this.contact.emailAddresses)&&void 0!==e&&e.length?ve(this.contact.emailAddresses):[{email:"",email_type:"other"}]},getEmailTypes(e){let t=[{label:"Work",value:"work"},{label:"Other",value:"other"}];const n=(this.tempEmails||[]).some((t,n)=>n!==e&&"work"===t.email_type);return n&&(t=t.filter(e=>"work"!==e.value)),t},addTempEmail(){this.tempEmails=[...this.tempEmails,{email:"",email_type:"other"}]},removeTempEmail(e){this.tempEmails=[...this.tempEmails.slice(0,e),...this.tempEmails.slice(e+1)]},initTempPhones(){this.tempPhones=this.contact.phoneNumbers.length?ve(this.contact.phoneNumbers):[{number:"",phone_type:this.contact.is_lead?"work":"other"}]},getPhoneTypes(){return this.contact.is_lead?[{label:"Mobile",value:"mobile"},{label:"Work",value:"work"}]:[{label:"Home",value:"home"},{label:"Mobile",value:"mobile"},{label:"Work",value:"work"},{label:"Other",value:"other"}]},addTempPhone(){this.tempPhones=[...this.tempPhones,{number:"",phone_type:this.contact.is_lead?"work":"other"}]},removeTempPhone(e){this.tempPhones=[...this.tempPhones.slice(0,e),...this.tempPhones.slice(e+1)]},onValueSaved(e,t,n){if("date"===n){if(t){const e=Object(pe["o"])(t+" 12:00",!1,this.timezone);t=Object(pe["h"])(e).toFormat(pe["b"])}}else if("datetime"===n&&t){const e=Object(pe["o"])(t,!1,this.timezone);t=Object(pe["h"])(e).toFormat(pe["b"])}this.updateContact({prospect:{[e]:t},prospectId:this.contact.id,hideLoader:!0}).then(()=>{$["a"].$emit("clear-icon-label-edit",e),this.tempEmails=[],this.tempPhones=[],this.tempTags=[]})},onAccountUpdated(e){this.setContact({...this.contact,account:e})},onCompleteCreatePerson(e){e.refresh&&this.$emit("fetch-contact")},isFieldShown(e,t){var n;const i=null===(n=this[t])||void 0===n?void 0:n.map(e=>{var t;return null!==(t=e.mergedWith)&&void 0!==t&&t.length?[e,...e.mergedWith]:[e]}).flat(),o=i.findIndex(t=>t.value===e||t.text===e);return-1!==o&&i[o].show}},computed:{...Object(b["c"])("contact",["contact","contactOptedOutEmails","contactLoading"]),...Object(b["c"])("prospectFields",["customProspectFields","prospectFieldByKey"]),...Object(b["c"])("user",["user","getSettingByKey","isOrgAdmin"]),prospectStatuses(){var e;return(null===(e=this.getSettingByKey(fe["n"].PROSPECT_STATUSES))||void 0===e?void 0:e.map(e=>({...e,text:e.name})))||[]},timezone(){return this.getSettingByKey("timezone")},prospectAllFieldsHidden(){return this.prospectFieldsConfig.every(e=>!e.show)},accountAllFieldsHidden(){return this.accountFieldsConfig.every(e=>!e.show)},customFieldsInConfig(){return this.prospectFieldsConfig.filter(e=>!!e.isCustomField||!e.default_field)}},async created(){await this.fetchProspectFields(),this.setProspectFieldsConfig(),this.setAccountFieldsConfig(),$["a"].$on("create-person-completed",this.onCompleteCreatePerson),$["a"].$on("create-account-completed",()=>this.$emit("fetch-contact"))}},xe=_e,ke=Object(H["a"])(xe,Q,Y,!1,null,null,null),Ce=ke.exports,Se=n("71a3"),Te=n("fe57"),Oe=function(){var e=this,t=e._self._c;return t("div",{staticClass:"h-100 overflow-hidden"},[t(o["a"],{staticClass:"rounded-b-0 border-b-none",attrs:{outlined:"",height:"50px"}},[t(Te["a"],{staticClass:"border-b-grey-1",attrs:{"show-arrows":e.$vuetify.breakpoint.smAndDown},model:{value:e.selectedTab,callback:function(t){e.selectedTab=t},expression:"selectedTab"}},e._l(e.tabs,(function(n){return t(Se["a"],{key:n.label,attrs:{disabled:!!n.disabled}},[t(c["a"],{staticClass:"mr-2",attrs:{small:""}},[e._v(e._s(n.icon))]),e._v(" "+e._s(n.label)+" "),n.disabled?t("span",[t("i",[e._v(" (disabled)")])]):e._e()],1)})),1)],1),e.isDriveTab||e.quickActionSelected?t(e.quickAction,e._g(e._b({tag:"component",staticStyle:{height:"calc(100% - 50px)"},attrs:{selectedTab:e.selectedTab}},"component",e.quickActionAttributes,!1),e.$listeners)):e.isActionsTab?t("contact-actions",e._g({staticStyle:{height:"calc(100% - 50px)"},on:{"change-tab":function(t){e.selectedTab=t}}},e.$listeners)):e.isNoteTab?t("create-note",{staticStyle:{height:"calc(100% - 50px)"}}):e.isHistoryTab?t("history-timeline"):t("nylas-inbox",{attrs:{height:"calc(100% - 35px)",prospectId:e.$route.params.id,prospect:e.contact}})],1)},Pe=[],Ae=n("8212"),Ee=n("adda"),Ne=n("490a"),De=n("90a2"),je=function(){var e=this,t=e._self._c;return t(o["a"],{staticClass:"pa-0 inbox-container",class:e.selectedThread?"overflow-hidden":"overflow-scroll",attrs:{height:e.height,outlined:""}},[e.pageLoading&&!e.allThreads.length?t("div",{staticClass:"w-100 h-100 d-flex align-center justify-center"},[t(Ne["a"],{attrs:{size:"30",width:"2",indeterminate:"",color:"primary"}})],1):[e.selectedThread?t("div",{staticClass:"w-100 h-100 overflow-hidden"},[t("div",{staticClass:"py-1 px-3 d-flex align-center"},[t(c["a"],{attrs:{size:"20"},on:{click:function(t){e.selectedThread=null}}},[e._v(" mdi-arrow-left ")]),t("span",{staticClass:"ml-2 font-weight-bold grey--text text-h5 text--darken-2 py-2"},[e._v(" "+e._s(e.selectedThread.subject)+" ")]),t(m["a"]),t(i["a"],{attrs:{icon:""},on:{click:e.replyInThread}},[t(T["a"],{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t(c["a"],e._g({},n),[e._v("mdi-reply")])]}}])},[e._v(" Reply in this thread ")])],1)],1),t("div",{staticClass:"d-flex align-center justify-center",staticStyle:{position:"absolute",top:"50%",left:"50%"}},[t(Ne["a"],{attrs:{indeterminate:"",width:"2",color:"primary"}})],1),t("nylas-email",{attrs:{id:e.nylasThreadComponentId,access_token:e.mailbox.auth_id,thread_id:e.selectedThread.id,show_expanded_email_view_onload:!0,click_action:"custom"},on:{manifestLoaded:e.setStyles}})],1):t(x["a"],{staticClass:"h-100"},[e.allThreads.length?e._l(e.allThreads,(function(n){return t(_["a"],{key:n.id,scopedSlots:e._u([{key:"default",fn:function({hover:o}){var a,r;return[t(k["a"],{staticClass:"d-flex align-center w-100 border-b-1 bg-selected",class:n.unread?"bg-white":"bg-grey",on:{click:function(t){e.selectedThread=n,e.updateReadStatus(n,!1)}}},[t(Ae["a"],{staticClass:"mr-2",attrs:{color:"primary",size:"30"}},[t("span",{staticClass:"text-uppercase white--text",class:n.unread?"font-weight-bold":"font-weight-medium"},[e._v(" "+e._s(null===(a=n.participants[0])||void 0===a?void 0:a.name[0])+" ")])]),t("div",{staticClass:"d-flex align-center",staticStyle:{width:"calc(100% - 40px)"}},[t("h4",{staticClass:"text-truncate text-body-2",class:n.unread?"font-weight-bold":"font-weight-medium",staticStyle:{width:"23%"}},[e._v(" "+e._s(null===(r=n.participants[0])||void 0===r?void 0:r.name)+" ")]),t("span",{staticClass:"text-truncate font-weight-medium pl-2 text-body-2",class:n.unread?"font-weight-medium":"",staticStyle:{width:"17%"}},[e._v(" "+e._s(n.subject)+" ")]),t("span",{staticClass:"text-truncate text-caption pl-2",staticStyle:{width:"50%"}},[e._v(" "+e._s(n.snippet)+" ")]),t(T["a"],{attrs:{bottom:"","open-delay":"300"},scopedSlots:e._u([{key:"activator",fn:function({on:i}){return[t("span",e._g({staticClass:"text-truncate text-body-2 grey--text pl-1",class:n.unread?"font-weight-bold":"font-weight-medium",staticStyle:{width:"10%"}},i),[e._v(" "+e._s(n.date)+" ")])]}}],null,!0)},[t("span",[e._v(e._s(n.date))])]),t("div",{directives:[{name:"visible",rawName:"v-visible",value:o,expression:"hover"}]},[e.readStatusLoader!==n.id?t(T["a"],{attrs:{bottom:""},scopedSlots:e._u([{key:"activator",fn:function({on:o}){return[t(i["a"],e._g({attrs:{icon:"",size:"20"},on:{click:function(t){return t.stopPropagation(),e.updateReadStatus(n)}}},o),[t(c["a"],{attrs:{size:"18"}},[e._v(" mdi-email"+e._s(n.unread?"-open":"")+" ")])],1)]}}],null,!0)},[e._v(" Mark as "+e._s(n.unread?"read":"unread")+" ")]):e.readStatusLoader==n.id?t(Ne["a"],{attrs:{indeterminate:"",width:"2",color:"primary",size:"18"}}):e._e()],1)],1)],1)]}}],null,!0)})})):t("div",{staticClass:"h-100 w-100 overflow-hidden d-flex flex-column align-center justify-center"},[t(Ee["a"],{staticClass:"mb-n6",attrs:{src:n("d043"),width:"300","max-height":"300"}}),t("div",{staticClass:"d-flex align-center font-weight-medium grey--text justify-center",staticStyle:{"z-index":"100"}},[e._v(" Nothing here yet, "),t("div",{staticClass:"cursor-pointer"},[1===e.prospect.emailAddresses.length?t("div",{staticClass:"primary--text mx-1",on:{click:function(t){return e.emailNow(e.prospect.emailAddresses[0])}}},[e._v(" draft ")]):t(u["a"],{attrs:{"offset-y":""},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t("div",e._g({staticClass:"primary--text mx-1"},n),[e._v("draft")])]}}],null,!1,41365492)},[t(x["a"],{attrs:{dense:""}},e._l(e.prospect.emailAddresses,(function(n){return t(k["a"],{key:n.id,on:{click:function(t){return e.emailNow(n)}}},[e._v(" "+e._s(n.email)+" ")])})),1)],1)],1),e._v(" your first email. ")])],1)],2),e.pageLoading?t("div",{staticClass:"w-100 my-4 d-flex align-center justify-center"},[t(Ne["a"],{attrs:{indeterminate:"",size:"30",width:"2",color:"primary"}})],1):t(o["a"],{directives:[{def:De["a"],name:"intersect",rawName:"v-intersect.quiet",value:e.getNextPage,expression:"getNextPage",modifiers:{quiet:!0}}],staticStyle:{background:"transparent"},attrs:{height:"1",flat:""}})]],2)},$e=[],Le=(n("33d1"),n("ea98"),n("e1fc"),n("3269"));const Ie=n("0644"),Fe=n("8718");var Me={props:{prospect:{type:Object},prospectId:{type:String},height:{type:String}},data:()=>({readStatusLoader:!1,pageLoading:!1,selectedThread:null,inboxPagination:{itemsPerPage:50,page:1},allThreads:[]}),computed:{...Object(b["c"])("user",["mailbox"]),nylasThreadComponentId(){return"6583b279-54de-42d1-b4d6-530296be22ff"}},mixins:[he["a"]],methods:{emailNow(e){$["a"].$emit("email-now",{prospect:this.prospect,checkForDriveState:!0,shouldPromptForSidekick:!0,emailAddressObj:e})},replyInThread(){var e,t;let n;const i=this.selectedThread.participants.find(e=>e.email!==this.mailbox.email);this.prospect&&(n=this.prospect.emailAddresses.find(e=>e.email===(null===i||void 0===i?void 0:i.email)));const o=this.selectedThread.messages.at(-1);$["a"].$emit("email-now",{subject:this.selectedThread.subject,prospect:this.prospect,emailAddressObj:n,emailAddress:null===(e=n)||void 0===e?void 0:e.email,replyToThreadObj:{...this.selectedThread,emailAddress:n,latest_mailing_delivered_at:o&&Object(pe["o"])(o.date,!0),prospectSummary:this.prospect,latest_mailing_body_html:null===o||void 0===o?void 0:o.snippet,latest_message_id:null===(t=this.selectedThread.messages.at(-1))||void 0===t?void 0:t.id,thread_id:this.selectedThread.id}})},updateReadStatus(e,t){this.readStatusLoader=e.id,Le["a"].updateThread({mailboxId:this.mailbox.id,thread:{id:e.id,unread:void 0!==t?t:!e.unread}}).then(()=>{const n=this.allThreads.findIndex(t=>t.id===e.id);-1!==n&&(this.allThreads=[...this.allThreads.slice(0,n),{...e,unread:void 0!==t?t:!e.unread},...this.allThreads.slice(n+1)])}).finally(()=>this.readStatusLoader=!1)},setStyles(e){const t=document.querySelector(".inbox-container").clientHeight-80,n=new MutationObserver(e=>{e.forEach(e=>{var n,i,o,a,r,s,l,c,u,d;const p="string"===typeof(null===(n=e.addedNodes)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.className)&&(null===(o=e.addedNodes)||void 0===o||null===(a=o[0])||void 0===a||null===(r=a.className)||void 0===r?void 0:r.includes("subject-title"));p&&e.addedNodes[0].remove();const h="string"===typeof(null===(s=e.addedNodes)||void 0===s||null===(l=s[0])||void 0===l?void 0:l.className)&&(null===(c=e.addedNodes)||void 0===c||null===(u=c[0])||void 0===u||null===(d=u.className)||void 0===d?void 0:d.includes("email-row"));h&&e.addedNodes[0].setAttribute("style",`height: ${t}px !important; overflow: scroll`)})});n.observe(e.target.shadowRoot.childNodes[3],{subtree:!0,childList:!0,computed:!0})},getNextPage(){this.selectedThread||(this.inboxPagination.page++,this.pageLoading=!0,this.fetchEmails())},fetchEmails(e=!1){e&&(this.allThreads=[]),Le["a"].getInboxEmails({mailboxId:this.mailbox.id,filtersQuery:this.prospectId?"prospectId="+this.prospectId:"",...this.inboxPagination}).then(e=>{const t=e.threads.map(e=>({...e,date:this.dayMonthYearFormat(1e3*(e.last_message_received_timestamp||e.last_message_timestamp),!0)}));this.allThreads=Fe(this.allThreads,t)}).finally(()=>this.pageLoading=!1)}},created(){this.pageLoading=!0,this.fetchEmails(!0),$["a"].$on("refresh-inbox",()=>{setTimeout(()=>{const e=Ie(this.selectedThread);this.selectedThread=null,setTimeout(()=>this.selectedThread=Ie(e),10)},2e3)})}},Re=Me,qe=Object(H["a"])(Re,je,$e,!1,null,null,null),Be=qe.exports,ze={props:{quickAction:{type:String,default:"DriveTimeline"},quickActionAttributes:{type:Object,default:()=>{}}},data:()=>({selectedTab:0,tabData:[{label:"Actions",icon:"mdi-check"},{label:"Sequence",icon:"$vuetify.icons.symboDrive"},{label:"New note",icon:"mdi-note-text-outline"},{label:"Activity",icon:"mdi-history"},{label:"Inbox",icon:"mdi-email"}]}),components:{HistoryTimeline:()=>n.e("chunk-736c8260").then(n.bind(null,"4cdc")),DriveTimeline:()=>Promise.all([n.e("chunk-c01aa7b6"),n.e("chunk-3ac4e506")]).then(n.bind(null,"d57b")),ContactActions:()=>Promise.all([n.e("chunk-c01aa7b6"),n.e("chunk-0a5012aa")]).then(n.bind(null,"ab08")),SendEmail:()=>Promise.all([n.e("chunk-aa595824"),n.e("chunk-923980ac")]).then(n.bind(null,"dfd5")),DriveSelect:()=>Promise.all([n.e("chunk-8d106526"),n.e("chunk-6d1522c8")]).then(n.bind(null,"7d15")),CompleteDrive:()=>n.e("chunk-af0a21d4").then(n.bind(null,"6c34")),EmailPreview:()=>Promise.all([n.e("chunk-aa595824"),n.e("chunk-040146ed")]).then(n.bind(null,"7b51")),CallPreview:()=>Promise.all([n.e("chunk-aa595824"),n.e("chunk-093d3714"),n.e("chunk-0d8a5994")]).then(n.bind(null,"a0d7")),PauseDrive:()=>n.e("chunk-c6d481e6").then(n.bind(null,"55d2")),CreateNote:()=>n.e("chunk-ee01149c").then(n.bind(null,"e299")),NylasInbox:Be},computed:{...Object(b["c"])("contact",["contact"]),...Object(b["c"])("user",["user"]),isActionsTab(){return 0===this.selectedTab},isDriveTab(){return 1===this.selectedTab},isNoteTab(){return 2===this.selectedTab},isHistoryTab(){return 3===this.selectedTab},quickActionSelected(){return"DriveTimeline"!=this.quickAction&&"DriveSelect"!=this.quickAction},tabs(){return this.tabData.map(e=>{var t,n,i;return{...e,disabled:"Sequence"===e.label&&(null===(t=this.contact)||void 0===t?void 0:t.auto_schedule)||"Inbox"===e.label&&!(null!==(n=this.contact)&&void 0!==n&&null!==(i=n.emailAddresses)&&void 0!==i&&i.length)}})}},created(){$["a"].$on("quick-action-send-email",()=>{this.isDriveTab||(this.selectedTab=0)})}},Ve=ze,Ue=(n("5847"),Object(H["a"])(Ve,Oe,Pe,!1,null,null,null)),He=Ue.exports,We=n("cca1"),Ke=n("66e6"),Ge=function(){var e,t,n=this,o=n._self._c;return n.shouldShowContactNavigation?o("div",{staticClass:"w-100 d-flex align-center px-3 border-b-1",staticStyle:{height:"40px",background:"white"}},[o(i["a"],{staticClass:"d-flex align-center px-2",attrs:{text:"",small:"",color:"primary",loading:n.loadingPrevPage,disabled:n.shouldDisablePreviousBtn},on:{click:n.goToPrevContact}},[o(c["a"],{staticClass:"mr-1",attrs:{size:"18"}},[n._v("mdi-chevron-left")]),o("span",{staticClass:"font-weight-bold"},[n._v("Previous ")])],1),n.shouldDisablePreviousBtn?n._e():o("div",{staticClass:"text-caption ml-2"},[n._v(" "+n._s(n.isFirstInCurrentPage?"Previous page":null===(e=n.allContacts[n.currentProspectIndex-1])||void 0===e?void 0:e.full_name)+" ")]),o(m["a"]),n.shouldDisableNextBtn?n._e():o("div",{staticClass:"text-caption mr-2"},[n._v(" "+n._s(n.isLastInCurrentPage?"Next page":null===(t=n.allContacts[n.currentProspectIndex+1])||void 0===t?void 0:t.full_name)+" ")]),o(i["a"],{staticClass:"d-flex align-center px-2",attrs:{text:"",small:"",color:"primary",loading:n.loadingNextPage,disabled:n.shouldDisableNextBtn},on:{click:n.goToNextContact}},[o("span",{staticClass:"font-weight-bold"},[n._v("Next ")]),o(c["a"],{staticClass:"ml-1",attrs:{size:"18"}},[n._v("mdi-chevron-right")])],1)],1):n._e()},Qe=[],Ye=n("cb08"),Ze=n("86e8"),Je=n("2284"),Xe=n("4360");const et=Xe["a"].getters["user/getSettingByKey"],tt=et(fe["n"].PROSPECT_STATUSES);var nt={data:()=>({peopleTableFilterQuery:"",loadingNextPage:!1,loadingPrevPage:!1}),computed:{...Object(b["c"])("contacts",["allContacts","contactsPagination","selectedProspectStatus"]),...Object(b["c"])("prospectFields",["customProspectFields"]),peopleTableOps:{get(){return Ze["a"].get("contacts")},set(e){return Ze["a"].set({tableName:"contacts",ops:e})}},currentProspectIndex(){return this.allContacts.findIndex(e=>e.id===this.$route.params.id)},shouldDisablePreviousBtn(){var e;return this.isFirstInCurrentPage&&1===(null===(e=this.peopleTableOps)||void 0===e?void 0:e.page)},shouldDisableNextBtn(){var e,t;return this.isLastInCurrentPage&&(null===(e=this.contactsPagination)||void 0===e?void 0:e.lastPage)===(null===(t=this.peopleTableOps)||void 0===t?void 0:t.page)},shouldShowContactNavigation(){var e;return!(null===(e=this.allContacts)||void 0===e||!e.length)&&-1!==this.currentProspectIndex},isFirstInCurrentPage(){return 0===this.currentProspectIndex},isLastInCurrentPage(){return this.currentProspectIndex===this.allContacts.length-1},selectedUsersInPeopleTable(){return et(fe["n"].PROSPECTS_TEAM_SELECTION)||[]}},methods:{...Object(b["b"])("contacts",["fetchContacts"]),setupPeopleTableFilterQuery(){var e;this.peopleTableFilterQuery=Object(Je["a"])(Je["b"].get(),Object(Ye["d"])("contacts",this.customProspectFields))||"";let t=this.peopleTableFilterQuery.split("&").filter(e=>!e.includes("status")).join("&");this.selectedProspectStatus?(t+=t?"&":"",t+="status="+this.selectedProspectStatus.value):(t+=t?"&":"",t+="statusExclusions="+tt.filter(e=>e.closed).map(e=>e.value).join(",")),this.peopleTableFilterQuery=t,t=null===(e=this.peopleTableFilterQuery)||void 0===e?void 0:e.split("&").filter(e=>!e.includes("owner")).join("&"),t+=t?"&":"",t+="owner="+this.selectedUsersInPeopleTable.join(","),this.peopleTableFilterQuery=t},goToPrevContact(){this.isFirstInCurrentPage?(this.peopleTableOps={...this.peopleTableOps,page:this.peopleTableOps.page-1},this.loadingPrevPage=!0,this.fetchContacts({...this.peopleTableOps,filtersQuery:this.peopleTableFilterQuery}).then(()=>{this.loadingPrevPage=!1,this.$router.push({name:"ContactView",params:{id:this.allContacts.at(-1).id}})}).finally(()=>this.loadingPrevPage=!1)):this.$router.push({name:"ContactView",params:{id:this.allContacts[this.currentProspectIndex-1].id}})},goToNextContact(){this.isLastInCurrentPage?(this.peopleTableOps={...this.peopleTableOps,page:this.peopleTableOps.page+1},this.loadingNextPage=!0,this.fetchContacts({...this.peopleTableOps,filtersQuery:this.peopleTableFilterQuery}).then(()=>{this.loadingNextPage=!1,this.$router.push({name:"ContactView",params:{id:this.allContacts[0].id}})}).finally(()=>this.loadingNextPage=!1)):this.$router.push({name:"ContactView",params:{id:this.allContacts[this.currentProspectIndex+1].id}})}},created(){this.setupPeopleTableFilterQuery()}},it=nt,ot=Object(H["a"])(it,Ge,Qe,!1,null,null,null),at=ot.exports,rt=n("adfc"),st=n("b9ae"),lt=n("6f16"),ct=n("b965"),ut={name:"ContactView",mixins:[he["a"],ct["a"]],components:{ContactViewHeader:K,SkeletonLoader:A["a"],ProspectInfoContent:Ce,QuickActionWrapper:He,QuickActionModal:()=>n.e("chunk-2d212f0a").then(n.bind(null,"ab0c")),SelectDispositions:We["a"],ProspectStatusBar:Ke["default"],ContactNavigation:at,TimezoneSelect:rt["a"]},props:{initialQuickAction:{type:String,default:"DriveTimeline"}},data:()=>({activeQuickAction:"DriveTimeline",quickActionSidekick:{modal:!1,text:"",showNoAction:!1,associateWithActiveAction:!0,selectedAction:""},emailType:"drive",emailPreview:{bodyHtml:"",status:"",sendDate:"",subjectLine:"",files:[]},callPreview:{call:null},createdDispositionLoader:!1,createDispositionDialog:!1,selectedDisposition:null,selectedSentiment:"neutral",isCalendarOpen:!1,calendarTZMenu:!1,showSecondaryTZInCalendar:!1,viewingProspectDayInCalendar:!1,calendarSecondaryTZ:null,calendarPrimaryTZ:null}),methods:{fetchQuickActions:F["a"],...Object(b["b"])("driveStates",["fetchDriveStatesByProspectId"]),...Object(b["b"])("contact",["fetchContact","toggleAutoScheduleActions","updateContact"]),...Object(b["d"])("contact",["setContact"]),...Object(b["d"])("appModal",["showModal"]),...Object(b["d"])("driveStates",["addDriveDispositions"]),updateContactStatus(e){this.updateContact({prospectId:this.contact.id,prospect:{...this.contact,prospect_status:e?e.value:null}})},dispositionExists(e){return!!this.driveStates&&this.driveStates[0].drive.dispositions.find(t=>t.name&&t.name.toLowerCase()==e.name.toLowerCase())},addDisposition(e){var t;this.dispositionExists(e)?this.$store.commit("snackbar/setSnack",{snack:"Outcome already added, try a new one",snackType:"error"}):(this.createdDispositionLoader=!0,lt["a"].bulkCreateDispositions({dispositions:[{name:e.name,sentiment:e.sentiment||this.selectedSentiment,drive_id:null===(t=this.driveStates[0])||void 0===t?void 0:t.drive.id}]}).then(e=>{const t=e[0];this.addDriveDispositions(e),$["a"].$emit("select-disposition",t)}).finally(()=>{this.createdDispositionLoader=!1,this.createDispositionDialog=!1}))},addNotes(e){const{id:t,note:n}=e;st["a"].updateAction(t,{note:n}).then(()=>{this.$store.commit("snackbar/setSnack",{snack:"Note updated successfully",snackType:"success"})}).catch(()=>{this.$store.commit("snackbar/setSnack",{snack:"Something went wrong",snackType:"error"})}).finally(()=>{this.fetchDriveState()})},addNotesAndComplete(e){const{id:t,note:n}=e;st["a"].markComplete(t,{note:n}).then(()=>{this.$store.commit("snackbar/setSnack",{snack:"Action completed with note",snackType:"success"}),$["a"].$emit("actions-fetch"),Object(F["d"])(t),this.fetchDriveState(this.$route.params.id,!0)}).catch(()=>{this.$store.commit("snackbar/setSnack",{snack:"Something went wrong",snackType:"error"})}).finally(()=>{this.fetchDriveState()})},callNow({id:e,number:t,actionId:n,callImmediately:i}){var o;n||(this.quickActionSidekick.associateWithActiveAction=!0);const{id:a,number:r}={...this.contact.phoneNumbers[0]};$["a"].$emit("call-now",{actionId:n||(null===(o=this.activeAction)||void 0===o?void 0:o.id),number:t&&e?t:r,id:t&&e?e:a,prospect:this.contact,fullName:this.contact.full_name,callImmediately:i})},callComplete(){this.fetchDriveState()},displayEmail(e){e.mailing?(this.emailPreview.bodyHtml=e.mailing.body_html,this.emailPreview.subjectLine=e.mailing.subject,"delivered"===e.mailing.state?(this.emailPreview.sendDate=e.mailing.delivered_at,this.emailPreview.status="delivered"):(this.emailPreview.sendDate=e.mailing.scheduled_at,this.emailPreview.status="scheduled")):(this.emailPreview.bodyHtml=e.body_html,this.emailPreview.subjectLine=e.subject,this.emailPreview.files=e.files,this.emailPreview.sendDate=e.dueDate,this.emailPreview.status="future_step"),this.activeQuickAction="EmailPreview"},displayCall(e){this.callPreview.call=e,this.activeQuickAction="CallPreview"},emailNow(e,t){var n,i;const o=null===e||void 0===e||null===(n=e.action)||void 0===n||null===(i=n.driveStep)||void 0===i?void 0:i.reply_to_previous_thread_id;this.quickActionSidekick.associateWithActiveAction=!0,$["a"].$emit("email-now",{...e,prospect:this.contact,replyToThreadObj:o&&{thread_id:o,subject:e.subject.replace("Re: ",""),emailAddress:e.emailAddressObj,prospectSummary:this.contact},checkForDriveState:t,shouldPromptForSidekick:t})},updateMailing(){this.quickActionSidekick.associateWithActiveAction=!0,this.emailType="mailing-update",this.activeQuickAction="SendEmail"},pauseDrive(){this.activeQuickAction="PauseDrive"},pausedDrive(){$["a"].$emit("actions-fetch"),this.activeQuickAction="DriveTimeline"},quickSchedulerInvite(){this.quickActionSidekick.associateWithActiveAction=!1,this.emailType="scheduler-template",this.activeQuickAction="SendEmail"},completeTask(e){st["a"].markComplete(e||this.activeAction.id).then(()=>{this.$store.commit("snackbar/setSnack",{snack:"Step completed",snackType:"success"}),$["a"].$emit("actions-fetch"),Object(F["d"])(e||this.activeAction.id),this.fetchDriveState(this.$route.params.id,!0)}).catch(e=>{console.log(e),this.$store.commit("snackbar/setSnack",{snack:"Error completing step",snackType:"error"})})},fetchDriveState(e=null,t){return new Promise((n,i)=>{this.fetchDriveStatesByProspectId({id:e||this.$route.params.id,hideLoader:t}).catch(e=>{console.log("err",e),i(e)}).finally(()=>{const e=this.driveStates[0];e?(this.getInitialQuickAction(),this.driveCompletionCheck()):this.activeQuickAction="DriveSelect",n()})})},driveCompletionCheck(){const e=this.driveStates[0];if(e){let t=e.actions.filter(e=>"completed"===e.state).length;t===e.drive.driveSteps.length&&this.showModal({title:"Sequence complete!",text:"All steps are complete, would you like to end the sequence?",doIfConfirmed:this.completeDriveShow})}},completeAssignToDrive(){this.fetchDriveState(this.$route.params.id)},getInitialQuickAction(){this.activeQuickAction=this.initialQuickAction},quickActionSelected(e){if(this.driveStates.length){const t=this.activeDriveStep;"PhoneDialer"==e?"call"==t.step_type?(this.quickActionSidekick.text="Do you want to associate this call with your active sequence step?",this.quickActionSidekick.showNoAction=!0):this.quickActionSidekick.text="This action is not the same as the active sequence step, would you like to perform this outside of the sequence?":"SendEmail"==e&&($["a"].$emit("quick-action-send-email"),"manual_email"==t.step_type?(this.quickActionSidekick.text="Do you want to associate this email with your active sequence step?",this.quickActionSidekick.showNoAction=!0):"auto_email"==t.step_type?this.quickActionSidekick.text=`An automated email is scheduled for ${this.activeAction.dueDate}, do you want to perform this outside of the sequence?`:this.quickActionSidekick.text="This action is not the same as the active sequence step, would you like to perform this outside of the sequence?"),this.quickActionSidekick.modal=!0}else this.activeQuickAction=e,this.quickActionSidekick.associateWithActiveAction=!1,"SendEmail"==e&&(this.emailType="one-off");this.quickActionSidekick.selectedAction=e},quickActionSidekickModalConfirm(){const e=this.activeDriveStep,t=this.quickActionSidekick.selectedAction;"SendEmail"==t&&("manual_email"==e.step_type?(this.quickActionSidekick.associateWithActiveAction=!0,this.emailType="drive"):(e.step_type,this.quickActionSidekick.associateWithActiveAction=!1,this.emailType="one-off")),this.activeQuickAction=this.quickActionSidekick.selectedAction,this.quickActionSidekick.modal=!1,this.quickActionSidekick.text="",this.selectedQuickAction="",this.quickActionSidekick.showNoAction=!1},quickActionSidekickNegative(){const e=this.activeDriveStep,t=this.quickActionSidekick.selectedAction;"SendEmail"==t&&"manual_email"==e.step_type&&(this.quickActionSidekick.associateWithActiveAction=!1,this.emailType="one-off"),this.activeQuickAction=this.quickActionSidekick.selectedAction,this.quickActionSidekick.modal=!1,this.quickActionSidekick.text="",this.selectedQuickAction="",this.quickActionSidekick.showNoAction=!1},quickActionSidekickModalCancel(){this.quickActionSidekick.modal=!1,this.quickActionSidekick.text="",this.selectedQuickAction="",this.quickActionSidekick.showNoAction=!1},completeDriveShow(){this.activeQuickAction="CompleteDrive"},completeDisposition(){if(this.fetchDriveState(),this.quickActionServiceActive){const e=this.plannedActions.findIndex(e=>{var t;return e.driveState&&(null===(t=e.prospect)||void 0===t?void 0:t.id)===this.$route.params.id});-1!==e&&Object(F["h"])(e),this.executingSelectedActions||this.fetchQuickActions()}this.activeQuickAction="DriveTimeline"},bindPusherObserver(){this.channel.bind("mailing:queued",this.pusherMailingQueued),this.channel.bind("mailing:delivered",this.pusherMailingQueued),this.channel.bind("prospect:synced",this.prospectSyncedToCrm),this.channel.bind("prospect:duplicate",this.prospectDuplicate),this.channel.bind("prospect:updated",this.prospectUpdated)},async pusherMailingQueued(e){var t;this.quickActionServiceActive&&Object(F["a"])(!1,null===(t=e.prospect)||void 0===t?void 0:t.id),this.activeAction&&this.activeAction.mailing&&this.activeAction.mailing.id==e.mailing.id&&(await this.fetchDriveStatesByProspectId({id:this.$route.params.id,hideLoader:!0}),this.driveCompletionCheck())},prospectSyncedToCrm(e){this.$route.params.id==e.prospect.id&&(this.fetchContact(this.$route.params.id),this.$store.commit("snackbar/setSnack",{snack:"Synced to CRM",snackType:"success"}))},prospectDuplicate(e){this.$route.params.id==e.prospect.id&&(this.fetchContact(this.$route.params.id),this.$store.commit("snackbar/setSnack",{snack:"Duplicate prospect found in CRM",snackType:"warning"}))},prospectUpdated(e){console.log("prospect:updated",e),e.prospect.id===this.$route.params.id&&this.fetchContact(this.$route.params.id)},closeQuickActionComponent(){this.driveStates.length?this.activeQuickAction="DriveTimeline":this.activeQuickAction="DriveSelect"},showDeleteMessage(){this.$store.commit("appModal/showModal",{title:"Delete person?",text:"Will be moved to the trash for 30 days and then deleted.",dangerModal:!0,doIfConfirmed:this.deletePerson})},deletePerson(){M["a"].deleteProspect(this.$route.params.id).then(()=>{this.$store.commit("snackbar/setSnack",{snack:"Person deleted",snackType:"success"});const e=this.nextQuickActionExists,t=this.isViewingActiveAction;this.quickActionServiceActive&&t?e?Object(F["i"])():(Object(F["j"])(),this.$router.push("/people")):this.$router.push("/people")}).catch(e=>{console.log(e),this.$store.commit("snackbar/setSnack",{snack:"Error deleting person",snackType:"error"})})},openSymboCalendar(){this.isCalendarOpen=!0},viewProspectDay(e){e&&!this.showSecondaryTZInCalendar&&(this.showSecondaryTZInCalendar=!0,this.calendarTZMenu=!0),this.viewingProspectDayInCalendar=e;const t={label:this.calendarPrimaryTZ,value:this.calendarPrimaryTZ};this.calendarPrimaryTZ=this.calendarSecondaryTZ.value,this.calendarSecondaryTZ=t}},computed:{...F["g"],...I["a"],...Object(b["c"])("pusher",["channel"]),...Object(b["c"])("user",["crm","getSettingByKey"]),...Object(b["c"])("contact",["contact","contactLoading"]),...Object(b["c"])("contacts",["allContacts","contactsPagination","selectedProspectStatus"]),...Object(b["c"])("driveStates",["driveStates","driveStatesLoading","activeDriveStep","activeAction"]),userTimezone(){return this.getSettingByKey("timezone")},shouldShowContactNavigation(){var e;return!(null===(e=this.allContacts)||void 0===e||!e.length)&&this.allContacts.some(e=>e.id===this.$route.params.id)},dispositionSentiments(){return[{text:"Positive",value:"positive"},{text:"Neutral",value:"neutral"},{text:"Negative",value:"negative"}]},showQuickActionComponent(){switch(this.activeQuickAction){case"SendEmail":return"SendEmail";case"DriveTimeline":return"DriveTimeline";case"PauseDrive":return"PauseDrive";case"CompleteDrive":return"CompleteDrive";case"EmailPreview":return"EmailPreview";case"CallPreview":return"CallPreview";default:return"DriveSelect"}},quickActionComponentProp(){var e;switch(this.activeQuickAction){case"SendEmail":return{emailType:this.emailType,associateWithActiveAction:this.quickActionSidekick.associateWithActiveAction,emailAddresses:this.contact.emailAddresses,symboSuggestions:null===(e=this.contact.symboSuggestions)||void 0===e?void 0:e.filter(e=>"email_address"===e.data_type)};case"DriveTimeline":return{};case"EmailPreview":return{bodyHtml:this.emailPreview.bodyHtml,subjectLine:this.emailPreview.subjectLine,files:this.emailPreview.files,status:this.emailPreview.status,sendDate:this.emailPreview.sendDate};case"CallPreview":return this.callPreview;default:return{contacts:[this.contact]}}}},watch:{selectedDisposition(e){e&&(this.selectedSentiment=e.sentiment)},channel:{handler(e){null!=e&&this.bindPusherObserver()},immediate:!0},contact:{handler(e){if(!e)return;const{time_zone:t}=e;t?this.calendarSecondaryTZ={label:t,value:t}:this.calendarPrimaryTZ&&(this.calendarSecondaryTZ={label:this.calendarPrimaryTZ,value:this.calendarPrimaryTZ})}},immediate:!0,deep:!0},created(){$["a"].$on("fetch-drive-states",(e=!0)=>{this.fetchDriveState(this.$route.params.id,e)}),$["a"].$on("call-action-completed",()=>{this.fetchDriveState()}),this.calendarPrimaryTZ=this.userTimezone,this.fetchContact(this.$route.params.id)},beforeRouteUpdate(e,t,n){this.fetchContact(e.params.id),this.fetchDriveState(e.params.id),n()},beforeDestroy(){$["a"].$off("call-action-completed"),this.setContact(null)},mounted(){this.fetchDriveState().then(()=>{const{action:e}=this.$route.params;e&&this.quickActionSelected(e)})}},dt=ut,pt=(n("1896"),Object(H["a"])(dt,g,y,!1,null,"7e0cb32f",null));t["default"]=pt.exports},ea98:function(e,t,n){"use strict";var i=n("23e7"),o=n("e330"),a=n("1d80"),r=n("5926"),s=n("577e"),l=n("d039"),c=o("".charAt),u=l((function(){return"\ud842"!=="𠮷".at(-2)}));i({target:"String",proto:!0,forced:u},{at:function(e){var t=s(a(this)),n=t.length,i=r(e),o=i>=0?i:n+i;return o<0||o>=n?void 0:c(t,o)}})},eb86:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i["throw"](e))}catch(t){a(t)}}function l(e){e.done?n(e.value):o(e.value).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=2&a[0]?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(s){a=[6,s],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var r=a(n("97e1")),s="/synonyms",l=function(){function e(e,t){this.collectionName=e,this.apiCall=t}return e.prototype.upsert=function(e,t){return i(this,void 0,void 0,(function(){return o(this,(function(n){return[2,this.apiCall.put(this.endpointPath(e),t)]}))}))},e.prototype.retrieve=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.apiCall.get(this.endpointPath())]}))}))},e.prototype.endpointPath=function(t){return"".concat(r.default.RESOURCEPATH,"/").concat(this.collectionName).concat(e.RESOURCEPATH).concat(void 0===t?"":"/"+t)},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return s},enumerable:!1,configurable:!0}),e}();t.default=l},ec42:function(e,t,n){"use strict";n.r(t);var i=n("8336"),o=n("ce87"),a=n("132d"),r=n("3a2f"),s=function(){var e=this,t=e._self._c;return e.emailAddress?t("span",[t(o["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:n}){return[t("div",{staticClass:"d-flex align-center flex-wrap"},[e.hideEmailStatus?e._e():t(r["a"],{attrs:{bottom:"","open-delay":"200"},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t(a["a"],e._g({staticClass:"mr-1",attrs:{"x-small":"",color:e.emailStatusColor}},n),[e._v(e._s(e.emailStatusIcon))])]}}],null,!0)},[e._v(" "+e._s(e.emailStatusTooltip)+" ")]),t(r["a"],{attrs:{bottom:"","open-delay":"200",disabled:e.disableLink},scopedSlots:e._u([{key:"activator",fn:function({on:i}){return[t("div",e._g({class:[!e.disableLink&&n?"text-decoration-underline":"",e.disableLink?"":"primary--text text-body-2"].join(" "),style:e.disableLink?"":"cursor: pointer",on:{click:function(t){t.stopPropagation(),!e.disableLink&&(e.mailbox?e.emailNow():e.connectEmail())}}},i),[e._v(" "+e._s(e.emailAddress)+" ")])]}}],null,!0)},[t("span",[e._v(e._s(e.mailbox?"Click to write email":"Connect your email id to write an email from Symbo"))])]),e.type?t("div",{staticClass:"ml-1 text-capitalize text-caption font-weight-light"},[e._v(" ("+e._s(e.type)+") ")]):e._e(),t("div",{staticStyle:{"min-width":"25px"}},[t(i["a"],{directives:[{name:"visible",rawName:"v-visible",value:n,expression:"hover"}],attrs:{"x-small":"",icon:""}},["main"!==e.isCopied?t(a["a"],{attrs:{"x-small":""},on:{click:function(t){return t.stopPropagation(),e.copyToClipboard(e.emailAddress,"main")}}},[e._v(" mdi-content-copy ")]):t(a["a"],{attrs:{"x-small":"",color:"green"}},[e._v("mdi-check")])],1)],1)],1)]}}],null,!1,551215129)})],1):e._e()},l=[],c=(n("14d9"),n("2f62")),u=n("1bcb"),d=n("5a50"),p={name:"EmailAddress",props:{account:{type:Object},prospect:{type:Object},emailAddressObject:{type:Object},emailAddressString:{type:String},hideEmailStatus:{type:Boolean},disableLink:{type:Boolean,default:!1}},data:()=>({isCopied:null}),computed:{...Object(c["c"])("user",["mailbox"]),emailStatusIcon(){var e;return null===(e=Object(d["F"])(this.emailAddressObject.status))||void 0===e?void 0:e.icon},emailStatusColor(){var e;return null===(e=Object(d["F"])(this.emailAddressObject.status))||void 0===e?void 0:e.color},emailStatusTooltip(){var e;return null===(e=Object(d["F"])(this.emailAddressObject.status))||void 0===e?void 0:e.tooltip},emailAddress(){var e;return this.emailAddressObject?null===(e=this.emailAddressObject)||void 0===e?void 0:e.email:this.emailAddressString},type(){return this.emailAddressObject?this.emailAddressObject.email_type:null}},methods:{connectEmail(){this.$router.push("/settings?type=email-connection")},copyToClipboard(e,t){navigator.clipboard.writeText(e),this.isCopied=t,setTimeout(()=>this.isCopied=null,2e3)},emailNow(){u["a"].$emit("email-now",{prospect:this.prospect||null,checkForDriveState:!0,shouldPromptForSidekick:!0,emailAddressObj:this.emailAddressObject})}}},h=p,f=n("2877"),m=Object(f["a"])(h,s,l,!1,null,null,null);t["default"]=m.exports},edd2:function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=this.constructor,i=e.call(this,t)||this;return i.name=n.name,Object.setPrototypeOf(i,n.prototype),i}return i(t,e),t}(Error);t.default=o},ee49:function(e,t,n){"use strict";n.r(t);var i=n("8336"),o=n("b0af"),a=n("99d9"),r=n("ce87"),s=n("132d"),l=n("8860"),c=n("da13"),u=n("e449"),d=n("2fa4"),p=n("8654"),h=n("3a2f"),f=function(){var e=this,t=e._self._c;return t("div",[t("span",[t(r["a"],{scopedSlots:e._u([{key:"default",fn:function({hover:n}){var r;return[t("div",{staticClass:"d-flex align-center flex-wrap"},[t(h["a"],{attrs:{bottom:"","max-width":"180"},scopedSlots:e._u([e.isDNC?{key:"activator",fn:function({on:n}){return[t(s["a"],e._g({staticClass:"mr-1",attrs:{"x-small":"",color:"red"}},n),[e._v(" mdi-phone-classic-off ")])]}}:null],null,!0)},[t("div",{staticClass:"font-weight-bold"},[e._v("DNC (Do not call)")]),t("div",[e._v("This number was found on the national DNC list.")])]),t(h["a"],{attrs:{bottom:"","open-delay":"200",disabled:e.clickToCallDisabled},scopedSlots:e._u([{key:"activator",fn:function({on:i}){return[t("div",e._g({class:[e.clickToCallDisabled||e.isDNCBlocked||!n||e.notANumber?"":"text-decoration-underline",e.clickToCallDisabled||e.isDNCBlocked||e.notANumber?"":"primary--text",e.sm?"text-caption":"text-body-2"],style:e.clickToCallDisabled||e.isDNCBlocked||e.notANumber?"":"cursor: pointer",on:{click:function(t){t.stopPropagation(),e.isDNCBlocked||e.notANumber||e.callNow(e.formattedNumber)}}},i),[e._v(" "+e._s(e.formattedNumber)+" ")])]}}],null,!0)},[t("span",[e._v(e._s(e.isDNCBlocked?"You are not allowed to call a DNC number":e.isDNC?"Avoid calling numbers on DNC list":e.notANumber?"Not a number":e.hasCalling?"Call":"Upgrade plan to call"))])]),t("div",{directives:[{name:"show",rawName:"v-show",value:!!e.type,expression:"!!type"}],staticClass:"ml-1 text-capitalize text-caption font-weight-light"},[e._v(" ("+e._s(e.type)+") ")]),e.isValid?e._e():t(h["a"],{attrs:{bottom:"","open-delay":"200","max-width":"250"},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t(s["a"],e._g({staticClass:"ml-1",attrs:{color:"amber",small:""}},n),[e._v(" mdi-alert-circle-outline ")])]}}],null,!0)},[t("span",[t("strong",[e._v("Invalid format. ")]),e._v(" "),t("br"),e._v(" Dialer searching & filtering is unavailable for this number. ")])]),e.showFormattingAction?t(u["a"],{attrs:{right:"","offset-x":"","close-on-content-click":!1},scopedSlots:e._u([{key:"activator",fn:function({on:o}){return[t(i["a"],{directives:[{name:"visible",rawName:"v-visible",value:n||e.formatMenu,expression:"hover || formatMenu"}],staticClass:"ml-1",attrs:{icon:"","x-small":""}},[t(s["a"],e._g({attrs:{size:"14"}},o),[e._v("mdi-tools")])],1)]}}],null,!0),model:{value:e.formatMenu,callback:function(t){e.formatMenu=t},expression:"formatMenu"}},[t(o["a"],[t(a["d"],[e._v(" Apply formatting ")]),t(a["c"],[t("div",{staticClass:"d-flex align-center"},[t("country-code-select",{model:{value:e.selectedCountryCode,callback:function(t){e.selectedCountryCode=t},expression:"selectedCountryCode"}}),t(p["a"],{staticClass:"ml-2",attrs:{outlined:"",dense:"",readonly:"","hide-details":"",placeholder:"Formatted number",type:"tel"},model:{value:e.newFormatToSave,callback:function(t){e.newFormatToSave=t},expression:"newFormatToSave"}})],1),t("div",{staticClass:"text-caption mt-1 ml-1 font-weight-bold",class:e.isNewFormatValid?"green--text":"red--text"},[e._v(" "+e._s(e.isNewFormatValid?"Validated":"Wrong format or incorrect number")+" ")]),null!==(r=e.validationPossibleNumbers)&&void 0!==r&&r.length&&!e.isNewFormatValid?[t("div",{staticClass:"text-h6 black--text mt-3"},[e._v(" Possible valid numbers ")]),t(l["a"],{staticClass:"mt-0 pt-0",attrs:{dense:""}},e._l(e.validationPossibleNumbers,(function(n,o){return t(c["a"],{key:o,staticClass:"d-flex align-center px-0",attrs:{dense:""}},[t("div",{staticClass:"d-flex align-start"},[t("div",{staticClass:"text-h6 mr-2 mt-n1 d-flex align-start",staticStyle:{height:"20px"}},[e._v(" "+e._s(e.getFlagFromCountryCode(n.country_code))+" ")]),t("div",{staticClass:"d-flex flex-column"},[e._v(" "+e._s(n.formatted_number)+" "),t("div",{staticClass:"text-xs font-weight-medium mt-n2"},[e._v(" "+e._s(e.getNameFromCountryCode(n.country_code))+" ")])])]),t(d["a"]),t(i["a"],{staticClass:"px-2 mr-1 text-xs white--text",attrs:{color:"call-blue","x-small":"",height:"16"},on:{click:function(t){t.stopPropagation(),e.selectedCountryCode=n.country_code}}},[e._v(" Apply ")]),t(i["a"],{attrs:{icon:"","x-small":""},on:{click:function(t){return t.stopPropagation(),e.copyToClipboard(n.formatted_number,"list-item-"+o)}}},[e.isCopied!=="list-item-"+o?t(s["a"],{attrs:{"x-small":""}},[e._v(" mdi-content-copy ")]):t(s["a"],{attrs:{"x-small":"",color:"green"}},[e._v("mdi-check")])],1)],1)})),1)]:e._e()],2),t(a["a"],{staticClass:"d-flex align-center justify-end pt-0 pb-3"},[t(h["a"],{attrs:{bottom:"",disabled:e.isNewFormatValid,"max-width":"200"},scopedSlots:e._u([{key:"activator",fn:function({on:n}){return[t("div",e._g({staticClass:"d-flex",staticStyle:{height:"20px"}},n),[t(i["a"],{staticClass:"white--text px-2 mr-0",attrs:{"x-small":"",color:"primary",disabled:!e.isNewFormatValid},on:{click:function(t){e.$emit("format-updated",e.newFormatToSave),e.formatMenu=!1}}},[e._v(" Save ")])],1)]}}],null,!0)},[e._v(" Please correct the format by choosing the right country code. ")]),t(i["a"],{staticClass:"white--text px-2",attrs:{"x-small":"",color:"grey"},on:{click:function(t){e.formatMenu=!1}}},[e._v(" Cancel ")])],1)],1)],1):e._e(),t(i["a"],{directives:[{name:"visible",rawName:"v-visible",value:n,expression:"hover"}],staticClass:"ml-1",attrs:{"x-small":"",icon:""}},["main"!==e.isCopied?t(s["a"],{attrs:{"x-small":""},on:{click:function(t){return t.stopPropagation(),e.copyToClipboard(e.formattedNumber,"main")}}},[e._v(" mdi-content-copy ")]):t(s["a"],{attrs:{"x-small":"",color:"green"}},[e._v("mdi-check")])],1)],1)]}}])})],1)])},m=[],v=n("2f62"),g=n("bfff"),y=n("3f2c"),b=n("d069");function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){x(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(){var e=Object(y["a"])(arguments),t=e.text,n=e.options,i=e.metadata;n=_(_({},n),{},{extract:!1});var o=Object(b["a"])(t,n,i);return o&&o.isValid()||!1}function C(){return Object(g["a"])(k,arguments)}var S=n("4534"),T=n("661c"),O=n("4037"),P=n("1bcb"),A=n("5a50"),E=n("2fa3"),N=n("48c7");const D=n("a9b7").countries,j=n("c707");var $={components:{CountryCodeSelect:N["a"]},name:"PhoneNumber",props:{account:{type:Object},prospect:{type:Object},phoneNumberObject:{type:Object},phoneNumberString:{type:String},clickToCallDisabled:{type:Boolean,default:!1},sm:{type:Boolean},showFormattingAction:{type:Boolean}},data:()=>({notANumber:!1,formatMenu:!1,countryCodeMenu:!1,selectedCountryCode:"",newFormatToSave:"",countryOpts:[],isCopied:null}),watch:{formatMenu(e){var t;e&&(this.selectedCountryCode=(null===(t=this.phoneNumberObject)||void 0===t?void 0:t.country_code)||this.defaultCountryCode,this.newFormatToSave=this.formatWithCountry(this.unformattedNumber,this.selectedCountryCode))},selectedCountryCode(e){e&&(this.newFormatToSave=this.formatWithCountry(this.unformattedNumber,e))}},computed:{...Object(v["c"])("user",["getSettingByKey","hasCalling"]),isDNCBlocked(){return this.isDNC&&this.blockCallingDNCNumbers},blockCallingDNCNumbers(){return this.getSettingByKey(A["n"].BLOCK_CALLING_DNC_NUMBERS)},oneClickCallEnabled(){return this.getSettingByKey(A["n"].ONE_CLICK_DIAL_ENABLED)},isDNC(){var e;return null===(e=this.phoneNumberObject)||void 0===e?void 0:e.dnc},isValid(){return this.phoneNumberObject?"valid"===this.phoneNumberObject.status:!!this.phoneNumberString&&C(this.phoneNumberString,this.defaultCountryCode)},validationPossibleNumbers(){var e,t;return(null===(e=this.phoneNumberObject)||void 0===e||null===(t=e.validation_data)||void 0===t?void 0:t.possible_valid_numbers)||[]},formattedNumber(){var e,t;return(this.phoneNumberObject?null===(e=this.phoneNumberObject)||void 0===e?void 0:e.formatted_number:Object(E["p"])(this.phoneNumberString))||this.phoneNumberString||(null===(t=this.phoneNumberObject)||void 0===t?void 0:t.number)},unformattedNumber(){var e,t;let n=(null===(e=this.phoneNumberObject)||void 0===e?void 0:e.number)||this.phoneNumberString;if(null!==(t=this.phoneNumberObject)&&void 0!==t&&t.country_code&&this.isValid){var i,o;const e=null===(i=this.getCallingCodeForCountry(null===(o=this.phoneNumberObject)||void 0===o?void 0:o.country_code))||void 0===i?void 0:i.callingCode;n=n.replace(e,"")}return n},type(){return this.phoneNumberObject?this.phoneNumberObject.phone_type:null},isNewFormatValid(){return!(!this.newFormatToSave||!this.selectedCountryCode)&&C(this.newFormatToSave,this.selectedCountryCode)}},methods:{formattedInternationalPhoneNumber:E["p"],formatWithCountry(e,t){if(!e)return this.notANumber=!0,"invalid";try{var n,i;return null===(n=Object(S["a"])(e,t))||void 0===n||null===(i=n.formatInternational)||void 0===i?void 0:i.call(n)}catch{return this.notANumber=!0,"invalid"}},getCallingCodeForCountry(e){return this.countryOpts.find(t=>t.code===e)},copyToClipboard(e,t){navigator.clipboard.writeText(e),this.isCopied=t,setTimeout(()=>this.isCopied=null,2e3)},callNow(e){var t,n,i,o;!this.clickToCallDisabled&&this.hasCalling&&P["a"].$emit("call-now",{number:e,id:null===(t=this.phoneNumberObject)||void 0===t?void 0:t.id,prospect:this.prospect||null,account:this.account||null,externalId:null===(n=this.prospect)||void 0===n?void 0:n.external_id,fullName:(null===(i=this.prospect)||void 0===i?void 0:i.full_name)||(null===(o=this.account)||void 0===o?void 0:o.name)||null,callImmediately:this.oneClickCallEnabled})},getFlagFromCountryCode(e){return D[e].emoji},getNameFromCountryCode(e){return D[e].name}},mounted(){this.countryOpts=j(Object(T["a"])().map(e=>({code:e,flag:this.getFlagFromCountryCode(e),name:this.getNameFromCountryCode(e),callingCode:"+"+Object(O["a"])(e)})).filter(e=>!!e.flag),"name"),this.selectedCountryCode=this.getSettingByKey(A["n"].ISO_COUNTRY_CODE)}},L=$,I=n("2877"),F=Object(I["a"])(L,f,m,!1,null,null,null);t["default"]=F.exports},f3b2:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e["default"]=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Errors=t.SearchClient=t.Client=void 0;var s=r(n("8f5b"));t.Client=s.default;var l=r(n("7bd7"));t.SearchClient=l.default;var c=a(n("bd7c"));t.Errors=c,t.default={Client:s.default,SearchClient:l.default,Errors:c}},f589:function(e,t,n){},f58d:function(e,t,n){"use strict";(function(e){var i=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{l(i.next(e))}catch(t){a(t)}}function s(e){try{l(i["throw"](e))}catch(t){a(t)}}function l(e){e.done?n(e.value):o(e.value).then(r,s)}l((i=i.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,i,o,a,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(o=2&a[0]?i["return"]:a[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(s){a=[6,s],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),r="/keys",s=function(){function t(e){this.apiCall=e,this.apiCall=e}return t.prototype.create=function(e){return i(this,void 0,void 0,(function(){return o(this,(function(n){return[2,this.apiCall.post(t.RESOURCEPATH,e)]}))}))},t.prototype.retrieve=function(){return i(this,void 0,void 0,(function(){return o(this,(function(e){return[2,this.apiCall.get(r)]}))}))},t.prototype.generateScopedSearchKey=function(t,n){var i=JSON.stringify(n),o=e.from((0,a.createHmac)("sha256",t).update(i).digest("base64")),r=t.substr(0,4),s="".concat(o).concat(r).concat(i);return e.from(s).toString("base64")},Object.defineProperty(t,"RESOURCEPATH",{get:function(){return r},enumerable:!1,configurable:!0}),t}();t.default=s}).call(this,n("b639").Buffer)},f93e:function(e,t,n){"use strict";(function(t){var i=n("3a0b"),o=n("6c3a"),a=n("0123"),r=n("02ae"),s={"Content-Type":"application/x-www-form-urlencoded"};function l(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function c(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof t&&"[object process]"===Object.prototype.toString.call(t))&&(e=n("96a3")),e}function u(e,t,n){if(i.isString(e))try{return(t||JSON.parse)(e),i.trim(e)}catch(o){if("SyntaxError"!==o.name)throw o}return(n||JSON.stringify)(e)}var d={transitional:r,adapter:c(),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(l(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)||t&&"application/json"===t["Content-Type"]?(l(t,"application/json"),u(e)):e}],transformResponse:[function(e){var t=this.transitional||d.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,r=!n&&"json"===this.responseType;if(r||o&&i.isString(e)&&e.length)try{return JSON.parse(e)}catch(s){if(r){if("SyntaxError"===s.name)throw a(s,this,"E_JSON_PARSE");throw s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(e){d.headers[e]={}})),i.forEach(["post","put","patch"],(function(e){d.headers[e]=i.merge(s)})),e.exports=d}).call(this,n("4362"))},fc7f:function(e,t,n){"use strict";var i=n("3a0b");function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(i.isURLSearchParams(t))a=t.toString();else{var r=[];i.forEach(t,(function(e,t){null!==e&&"undefined"!==typeof e&&(i.isArray(e)?t+="[]":e=[e],i.forEach(e,(function(e){i.isDate(e)?e=e.toISOString():i.isObject(e)&&(e=JSON.stringify(e)),r.push(o(t)+"="+o(e))})))})),a=r.join("&")}if(a){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},fc88:function(e,t,n){"use strict";var i=function(){var e=this,t=e._self._c;return e.readMoreNecessary?t("span",[e.readMoreActive?[e.respectLineBreak?t("span",{staticStyle:{"white-space":"pre-wrap"},domProps:{textContent:e._s(e.text)}}):t("span",[e._v(e._s(e.text)+" ")]),t("a",{staticClass:"text-decoration-underline",on:{click:function(t){t.stopPropagation(),e.readMoreActive=!1}}},[e._v(" show less.. ")])]:[e.respectLineBreak?t("span",{staticStyle:{"white-space":"pre-wrap"},domProps:{textContent:e._s(e.text.slice(0,e.charLimit-10))}}):t("span",[e._v(e._s(e.text.slice(0,e.charLimit-10))+" ")]),t("a",{staticClass:"text-decoration-underline",on:{click:function(t){t.stopPropagation(),e.readMoreActive=!0}}},[e._v(" show more.. ")])]],2):e.respectLineBreak?t("span",{staticStyle:{"white-space":"pre-wrap"},domProps:{textContent:e._s(e.text)}}):t("span",[e._v(" "+e._s(e.text)+" ")])},o=[],a={props:{text:{type:String,default:""},charLimit:{type:Number,default:200},respectLineBreak:{type:Boolean,default:!1}},data:()=>({readMoreActive:!1,readMoreNecessary:!1}),created(){this.text&&this.text.length>this.charLimit&&(this.readMoreNecessary=!0)}},r=a,s=n("2877"),l=Object(s["a"])(r,i,o,!1,null,null,null);t["a"]=l.exports},fda0:function(e,t,n){}}]);
//# sourceMappingURL=ContactView.bf835d7c.js.map