HEX
Server: LiteSpeed
System: Linux s3604.bom1.stableserver.net 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User: dmstechonline (1480)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/dmstechonline/whatsapp.dmstech.online/public/build/assets/Index-1ab2e8f2.js
import X from"./App-b545302c.js";import{r as d,T,O as Y,o as n,c as i,a as e,w as ee,v as te,u as a,b as m,d as se,F as N,e as E,t as l,f as y,g as V,h as oe,i as le,j as p,k as C,n as h,l as ae}from"./app-884e4ce3.js";import{d as ne}from"./debounce-42603f74.js";import{_ as re}from"./AlertModal-7204a9e7.js";import{u as ie}from"./useAlertModal-e78cf661.js";import{_ as I}from"./Modal-a947e544.js";import{_ as D}from"./FormInput-ab713954.js";import{_ as de}from"./FormSelect-1f27a419.js";import{_ as F}from"./FormToggleSwitch-5613ae6f.js";import{P as ue}from"./Pagination-6803fb76.js";import{t as W}from"./index-d349a931.js";import"./Sidebar-98023fef.js";import"./Menu-53693ad4.js";import"./ProfileModal-268f6e59.js";import"./FormPhoneInput-8c055c19.js";/* empty css                      */import"./transition-15fedc5d.js";import"./hidden-733404a0.js";import"./use-outside-click-1c7dcbeb.js";import"./micro-task-89dcd6af.js";import"./tabs-3ad99d3f.js";import"./use-resolve-button-type-261165f4.js";import"./LangToggle-54d6b98e.js";import"./MobileSidebar-2775c42f.js";import"./index-ff0eb693.js";/* empty css              */import"./useRtl-295d8c04.js";import"./_baseGetTag-0b0c5108.js";import"./use-text-value-48384026.js";import"./_plugin-vue_export-helper-c27b6911.js";const ce={class:"md:bg-white flex items-center border border-primary md:border-none md:shadow-sm h-12 md:h-10 w-full md:w-80 rounded-[0.5rem] mb-6 text-xl md:text-sm"},me=["placeholder"],pe={key:1,class:"pr-2"},fe={class:"grid md:grid-cols-3 gap-x-5 gap-y-4"},ve={class:"flex items-center gap-x-3 pb-2 bg-slate-50 px-4 pt-4 rounded-tr-[0.5rem] rounded-tl-[0.5rem]"},ge=["src"],he={class:"text-[16px]"},be={class:"text-slate-500 border-b px-4 text-xs pt-2 pb-4"},xe={class:"flex justify-between items-center px-4 pb-4 text-xs"},ye={key:0,class:"py-1 px-3 rounded-md text-slate-600 bg-red-600 text-white"},we={key:1,class:"py-1 px-3 rounded-md text-slate-600 bg-slate-50"},_e=["onClick"],ke=["onClick"],$e={class:"grid grid-cols-1 gap-x-6 gap-y-4"},Ce={class:"bg-slate-50 mx-[-30px] px-6 mt-[-25px] py-4 border-b"},Ve={class:"flex items-center gap-x-3"},Se=["src"],Ae={class:"text-[16px]"},Me={class:"text-slate-500 font-light text-xs pt-4"},Te={class:"grid gap-x-6 gap-y-4 sm:grid-cols-2"},Ne={key:1},Oe={class:"text-sm mb-2"},je={key:3},Ue={class:"text-[11px] text-gray-500"},Be={class:"text-sm mb-2"},Ze={key:0,class:"bg-orange-100 p-2 rounded-md shadow-sm mb-1 col-span-2"},Le={class:"flex items-center gap-x-1 border-b border-slate-500 pb-2 mb-2"},Ee={class:"text-sm"},Ie={class:"text-sm leading-6 break-all"},De={class:"text-sm leading-6 break-all"},Fe={class:"mt-5 border-t pt-5 flex"},We=["disabled"],ze={key:0,xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},Re={key:1},qe={class:"grid grid-cols-1 gap-x-6 gap-y-4"},Je={class:"bg-slate-50 mx-[-30px] px-6 mt-[-25px] py-4 border-b"},Pe={class:"flex items-center gap-x-3"},Ke=["src"],Ge={class:"text-[16px]"},He={class:"text-slate-500 font-light text-xs pt-4"},Qe={class:"grid gap-x-6 sm:grid-cols-2"},Xe={class:"text-sm"},Ye={class:"col-span-2 text-xs text-slate-600 mb-2"},et={class:"mt-5 border-t pt-5 flex"},tt=["disabled"],st={key:0,xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},ot={key:1},lt={__name:"AddonTable",props:{rows:{type:Object,required:!0},filters:{type:Object},config:{type:Array}},emits:["edit","delete"],setup(f,{emit:S}){const b=f,{isOpenAlert:v,openAlert:ut,confirmAlert:z}=ie(),w=d(!1),_=d(!1);d(!1);const R=d(window.location.origin);d(!1);const q=T({test:null}),r=T({uuid:null,settings:{},is_active:null}),c=T({uuid:null,purchase_code:null,addon:null}),J=s=>{q.delete("/admin/faqs/"+s)},x=d({search:b.filters.search}),A=d(!1),P=()=>{x.value.search=null,j()},O=ne(()=>{A.value=!0,j()},1e3),j=()=>{const s=window.location.pathname;Y.visit(s,{method:"get",data:x.value})},U=d(null),k=d(null),g=d(null),$=d(null),B=d(null),Z=d([]),K=s=>{var u;k.value=s.logo,g.value=s.name,$.value=s.description;const o=((u=JSON.parse(s.metadata))==null?void 0:u.input_fields)||[];Z.value=o,r.settings={};let t=g.value.toLowerCase().replace(/ /g,"-");U.value="/admin/addons/setup/"+t,r.is_active=s.is_active,r.uuid=s.uuid,o.forEach(M=>{r.settings[M.name]=L(M.name,M.element)}),w.value=!0},G=(s,o)=>{const t=s.metadata?JSON.parse(s.metadata):null;k.value=s.logo,g.value=s.name,$.value=s.description,B.value=o=="extended"?W("Enter your extended license to install"):W("Enter the addon license to install"),c.uuid=s.uuid,c.addon=(t==null?void 0:t.name)||s.name,_.value=!0},L=(s,o=null)=>{const t=b.config.find(u=>u.key===s);return t?t.value:o=="toggle"?0:""},H=()=>{r.post(U.value,{preserveScroll:!0,onSuccess:()=>{w.value=!1}})},Q=()=>{c.post("/admin/addons/install",{preserveScroll:!0,onSuccess:()=>{_.value=!1}})};return(s,o)=>(n(),i(N,null,[e("div",ce,[o[12]||(o[12]=e("span",{class:"pl-3"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},[e("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m15 15l6 6m-11-4a7 7 0 1 1 0-14a7 7 0 0 1 0 14Z"})])],-1)),ee(e("input",{onInput:o[0]||(o[0]=(...t)=>a(O)&&a(O)(...t)),"onUpdate:modelValue":o[1]||(o[1]=t=>x.value.search=t),type:"text",class:"outline-none px-4 w-full",placeholder:s.$t("Search")},null,40,me),[[te,x.value.search]]),A.value===!1&&x.value.search?(n(),i("button",{key:0,onClick:P,type:"button",class:"pr-2"},o[10]||(o[10]=[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[e("path",{fill:"currentColor",d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10s10-4.5 10-10S17.5 2 12 2zm3.7 12.3c.4.4.4 1 0 1.4c-.4.4-1 .4-1.4 0L12 13.4l-2.3 2.3c-.4.4-1 .4-1.4 0c-.4-.4-.4-1 0-1.4l2.3-2.3l-2.3-2.3c-.4-.4-.4-1 0-1.4c.4-.4 1-.4 1.4 0l2.3 2.3l2.3-2.3c.4-.4 1-.4 1.4 0c.4.4.4 1 0 1.4L13.4 12l2.3 2.3z"})],-1)]))):m("",!0),A.value?(n(),i("span",pe,o[11]||(o[11]=[se('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="3.5" r="1.5" fill="currentColor" opacity="0"><animateTransform attributeName="transform" calcMode="discrete" dur="2.4s" repeatCount="indefinite" type="rotate" values="0 12 12;90 12 12;180 12 12;270 12 12"></animateTransform><animate attributeName="opacity" dur="0.6s" keyTimes="0;0.5;1" repeatCount="indefinite" values="1;1;0"></animate></circle><circle cx="12" cy="3.5" r="1.5" fill="currentColor" opacity="0"><animateTransform attributeName="transform" begin="0.2s" calcMode="discrete" dur="2.4s" repeatCount="indefinite" type="rotate" values="30 12 12;120 12 12;210 12 12;300 12 12"></animateTransform><animate attributeName="opacity" begin="0.2s" dur="0.6s" keyTimes="0;0.5;1" repeatCount="indefinite" values="1;1;0"></animate></circle><circle cx="12" cy="3.5" r="1.5" fill="currentColor" opacity="0"><animateTransform attributeName="transform" begin="0.4s" calcMode="discrete" dur="2.4s" repeatCount="indefinite" type="rotate" values="60 12 12;150 12 12;240 12 12;330 12 12"></animateTransform><animate attributeName="opacity" begin="0.4s" dur="0.6s" keyTimes="0;0.5;1" repeatCount="indefinite" values="1;1;0"></animate></circle></svg>',1)]))):m("",!0)]),e("div",fe,[(n(!0),i(N,null,E(f.rows.data,t=>(n(),i("div",{key:t.id,class:"bg-white rounded-[0.5rem] shadow-md text-sm space-y-3"},[e("div",ve,[e("div",null,[e("img",{class:"h-8 w-8",src:"/images/"+t.logo,alt:"Whatsapp Logo"},null,8,ge)]),e("div",he,l(s.$t(t.name)),1)]),e("div",be,l(t.description),1),e("div",xe,[e("div",null,[t.status==0?(n(),i("span",ye,l(s.$t("Not installed")),1)):t.status==1&&t.update_available==0?(n(),i("span",we,l(s.$t("Installed")),1)):t.status==1&&t.update_available==1?(n(),y(a(le),{key:2,href:"/admin/updates",class:"py-1 px-3 rounded-md text-slate-600 bg-green-600 text-white"},{default:V(()=>[oe(l(s.$t("Update available")),1)]),_:1})):m("",!0)]),e("div",null,[t.status==0?(n(),i("button",{key:0,onClick:u=>G(t,t.license),class:"rounded-full border-2 w-full px-10 py-2 hover:border-secondary hover:bg-secondary hover:text-white text-secondary"},l(s.$t("Install")),9,_e)):(n(),i("button",{key:1,onClick:u=>K(t),class:"rounded-full border-2 w-full px-10 py-2 hover:border-secondary hover:bg-secondary hover:text-white text-secondary"},l(s.$t("Setup")),9,ke))])])]))),128))]),p(ue,{class:"mt-3",pagination:f.rows.meta},null,8,["pagination"]),p(I,{isOpen:w.value},{default:V(()=>[e("div",$e,[e("div",Ce,[e("div",Ve,[e("div",null,[e("img",{class:"h-8 w-8",src:"/images/"+k.value,alt:"Whatsapp Logo"},null,8,Se)]),e("div",Ae,l(s.$t(g.value)),1)]),e("div",Me,l($.value),1)]),e("form",{onSubmit:o[4]||(o[4]=C(t=>H(),["prevent"]))},[e("div",Te,[(n(!0),i(N,null,E(Z.value,t=>(n(),i("div",{class:h(t.class)},[t.element=="input"?(n(),y(D,{key:0,modelValue:a(r).settings[t.name],"onUpdate:modelValue":u=>a(r).settings[t.name]=u,error:a(r).errors[`settings.${t.name}`],name:s.$t(t.label),type:t.type,class:h(t.class)},null,8,["modelValue","onUpdate:modelValue","error","name","type","class"])):m("",!0),t.element=="toggle"?(n(),i("div",Ne,[e("div",Oe,l(s.$t(t.label)),1),t.element=="toggle"?(n(),y(F,{key:0,modelValue:a(r).settings[t.name],"onUpdate:modelValue":u=>a(r).settings[t.name]=u},null,8,["modelValue","onUpdate:modelValue"])):m("",!0)])):m("",!0),t.element=="select"?(n(),y(de,{key:2,modelValue:a(r).settings[t.name],"onUpdate:modelValue":u=>a(r).settings[t.name]=u,name:s.$t(t.label),type:"text",options:t.options,error:a(r).errors[`settings.${t.name}`],class:h(t.class)},null,8,["modelValue","onUpdate:modelValue","name","options","error","class"])):m("",!0),t.description?(n(),i("div",je,[e("span",Ue,l(t.description),1)])):m("",!0)],2))),256)),e("div",null,[e("div",Be,l(s.$t("Enable/disable addon")),1),p(F,{modelValue:a(r).is_active,"onUpdate:modelValue":o[2]||(o[2]=t=>a(r).is_active=t)},null,8,["modelValue"])]),g.value=="Embedded Signup"?(n(),i("div",Ze,[e("div",Le,[o[13]||(o[13]=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24"},[e("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 11v5m0 5a9 9 0 1 1 0-18a9 9 0 0 1 0 18Zm.05-13v.1h-.1V8h.1Z"})],-1)),e("p",Ee,l(s.$t("Webhook setup")),1)]),e("span",null,[e("p",Ie,l(s.$t("Callback URL"))+": "+l(R.value+"/webhook/waba"),1),e("p",De,l(s.$t("Verify token"))+": "+l(L("whatsapp_callback_token")),1)])])):m("",!0)]),e("div",Fe,[e("button",{type:"button",onClick:o[3]||(o[3]=C(t=>w.value=!1,["self"])),class:"inline-flex justify-center rounded-md border border-transparent bg-slate-50 px-4 py-2 text-sm text-slate-500 hover:bg-slate-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 mr-4"},l(s.$t("Cancel")),1),e("button",{class:h(["inline-flex justify-center rounded-md border border-transparent bg-primary px-4 py-2 text-sm text-white focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2",{"opacity-50":a(r).processing}]),disabled:a(r).processing},[a(r).processing?(n(),i("svg",ze,o[14]||(o[14]=[e("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:".5"},null,-1),e("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z"},[e("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})],-1)]))):(n(),i("span",Re,l(s.$t("Save")),1))],10,We)])],32)])]),_:1},8,["isOpen"]),p(I,{isOpen:_.value},{default:V(()=>[e("div",qe,[e("div",Je,[e("div",Pe,[e("div",null,[e("img",{class:"h-8 w-8",src:"/images/"+k.value,alt:"Whatsapp Logo"},null,8,Ke)]),e("div",Ge,l(s.$t(g.value)),1)]),e("div",He,l($.value),1)]),e("form",{onSubmit:o[7]||(o[7]=C(t=>Q(),["prevent"]))},[e("div",Qe,[e("h4",Xe,l(s.$t("Envato purchase code")),1),e("span",Ye,l(B.value),1),p(D,{modelValue:a(c).purchase_code,"onUpdate:modelValue":o[5]||(o[5]=t=>a(c).purchase_code=t),error:a(c).errors.purchase_code,name:"",type:"text",class:h("col-span-2")},null,8,["modelValue","error"])]),e("div",et,[e("button",{type:"button",onClick:o[6]||(o[6]=C(t=>_.value=!1,["self"])),class:"inline-flex justify-center rounded-md border border-transparent bg-slate-50 px-4 py-2 text-sm text-slate-500 hover:bg-slate-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 mr-4"},l(s.$t("Cancel")),1),e("button",{class:h(["inline-flex justify-center rounded-md border border-transparent bg-primary px-4 py-2 text-sm text-white focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2",{"opacity-50":a(c).processing}]),disabled:a(c).processing},[a(c).processing?(n(),i("svg",st,o[15]||(o[15]=[e("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:".5"},null,-1),e("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z"},[e("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})],-1)]))):(n(),i("span",ot,l(s.$t("Save")),1))],10,tt)])],32)])]),_:1},8,["isOpen"]),p(re,{modelValue:a(v),"onUpdate:modelValue":o[8]||(o[8]=t=>ae(v)?v.value=t:null),onConfirm:o[9]||(o[9]=()=>a(z)(J)),label:s.$t("Delete row"),description:s.$t("Are you sure you want to delete this row? This action can not be undone")},null,8,["modelValue","label","description"])],64))}},at={class:"bg-white md:bg-inherit pt-10 px-4 md:pt-8 md:p-8 rounded-[5px] text-[#000] h-full md:overflow-y-auto"},nt={class:"flex justify-between"},rt={class:"text-xl mb-1"},it={class:"mb-6 flex items-center text-sm leading-6 text-gray-600"},dt={class:"ml-1 mt-1"},Ft={__name:"Index",props:{title:String,rows:Object,filters:Object,config:Array},setup(f){const S=f;return(b,v)=>(n(),y(X,null,{default:V(()=>[e("div",at,[e("div",nt,[e("div",null,[e("h1",rt,l(b.$t("Explore Add-ons Marketplace")),1),e("p",it,[v[0]||(v[0]=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24"},[e("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 11v5m0 5a9 9 0 1 1 0-18a9 9 0 0 1 0 18Zm.05-13v.1h-.1V8h.1Z"})],-1)),e("span",dt,l(b.$t("Select an addon that you want to install on your platform")),1)])])]),p(lt,{rows:S.rows,filters:S.filters,config:f.config},null,8,["rows","filters","config"])])]),_:1}))}};export{Ft as default};