PageSourceSearch

https://app.beventi.co/_nuxt/DRh6511T.js

js beventi.co collected 2026-10-02 16:31:20 UTC 6,537 bytes, 2 lines download raw bytes

1import{bv as U,bH as V,bw as $,bF as w,br as P,aZ as I,a_ as q,bX as D,bd as z,aQ as a,aR as u,b7 as g,b8 as p,aX as i,by as F,aT as t,aY as Q,aS as s,be as l,aV as x,bi as R,bA as X,bJ as Y}from"./CN4ZE-vz.js";import{_ as j}from"./B5m8rn9-.js";import{u as G,P as H}from"./0yhlMm6q.js";import{c as J}from"./DO5TtIb4.js";import{u as Z}from"./CY77eD3e.js";import"./ZgeSzSrW.js";const K={class:"max-w-2xl mx-auto px-4 pb-12"},W={class:"bg-white rounded-2xl border border-gray-200/80 shadow-sm overflow-hidden"},ee={class:"px-6 py-5 border-b border-gray-100"},te={class:"flex items-center gap-4"},ae={class:"w-12 h-12 rounded-xl bg-blue-50 flex items-center justify-center"},se={class:"flex-1"},ne={class:"flex items-center gap-3"},oe={class:"font-semibold text-gray-900"},re={key:0,class:"text-sm text-gray-500 mt-0.5"},ie={class:"p-6"},le={key:0,class:"bg-gray-50 p-4 rounded-xl"},ce={class:"flex items-center gap-3"},de={key:1,class:"space-y-3"},ue={class:"bg-gray-50 p-4 rounded-xl"},me={class:"flex items-center gap-3"},ye={key:0,class:"mt-3 text-sm text-red-600 pl-8"},pe={class:"bg-gray-50 p-4 rounded-xl"},fe={class:"flex items-center gap-3"},ge={key:0,class:"mt-3 text-sm text-red-600 pl-8"},xe={class:"bg-gray-50 p-4 rounded-xl"},_e={class:"flex items-center gap-3"},ve={key:0,class:"px-6 py-4 border-t border-gray-100 flex items-center gap-3"},he=3e3,be=6e4,Be={__name:"paypal",async setup(we){let c,d;const _=Y(),{isAccountOwner:N}=Z(),v=U(),h=G(),{account:n,merchantId:B}=V(h),T=$(),k=v.query.merchantIdInPayPal,m=Array.isArray(k)?k[0]:k,S=async()=>{if(B.value=null,!("merchantIdInPayPal"in v.query))return;const o={...v.query};delete o.merchantIdInPayPal,await P({path:v.path,query:o},{replace:!0})};m&&(B.value=m);try{[c,d]=w(()=>h.fetch(!!m)),await c,d(),m&&(n.value?.active&&([c,d]=w(()=>S()),await c,d()),[c,d]=w(()=>T.refresh()),await c,d())}catch(o){m||(_.error(o.data?.message??o.message),[c,d]=w(()=>P("/account/payments")),await c,d())}const y=I(!!m&&!n.value?.active),L=J({intervalMs:he,timeoutMs:be,check:async()=>(await h.fetch(!0),!!n.value?.active),onSuccess:async()=>{y.value=!1,await S(),await T.refresh()},onTimeout:async()=>{y.value=!1,await S()}});q(()=>{y.value&&L.start()}),D(L.stop);const A=I(!1),C=I(!1),O=async()=>{A.value=!0;try{const e=`${`${window.location.protocol}//${window.location.hostname}${window.location.port?":"+window.location.port:""}`}/account/payments/paypal`,r=await H.generateOnboardingUrl(e,e);if(!r.links||!Array.isArray(r.links))throw new Error("Invalid response format");const b=r.links.find(f=>f.rel==="action_url")?.href;if(!b)throw new Error("Action URL not found in the response");await P(b,{external:!0})}catch(o){A.value=!1,_.error(o.data?.message??o.message)}},E=async()=>{if(C.value=!0,!confirm(`Disconnecting your PayPal account will prevent you from offering PayPal services and products on your
2website. Do you wish to continue?`))return!1;try{await h.disconnect(),await P("/account/payments"),_.success("PayPal disconnected successfully"),n.value=null}catch(o){C.value=!1,_.error(o.data?.message??o.message)}};return(o,e)=>{const r=z("font-awesome-icon"),b=F,f=j,M=X;return a(),u("div",K,[g(b,{to:"/account/payments",class:"inline-flex items-center gap-2 text-sm text-gray-500 hover:text-gray-900 transition-colors mb-6"},{default:p(()=>[g(r,{icon:["fal","fa-arrow-left"],class:"text-xs"}),e[0]||(e[0]=i(" Back to Payments ",-1))]),_:1}),e[13]||(e[13]=t("div",{class:"mb-8"},[t("h1",{class:"text-2xl font-semibold text-gray-900 tracking-tight"},"PayPal Settings"),t("p",{class:"text-gray-500 mt-1"},"Manage your PayPal payment integration")],-1)),t("div",W,[t("div",ee,[t("div",te,[t("div",ae,[g(r,{icon:"fa-brands fa-paypal",class:"text-blue-500 text-xl"})]),t("div",se,[t("div",ne,[t("h2",oe,Q(s(n)?.legal_name||"PayPal Account"),1),s(n)?.active?(a(),l(f,{key:0,color:"green",rounded:""},{default:p(()=>[...e[1]||(e[1]=[i("Connected",-1)])]),_:1})):s(y)?(a(),l(f,{key:1,color:"grey",rounded:""},{default:p(()=>[...e[2]||(e[2]=[i("Finishing setup",-1)])]),_:1})):(a(),l(f,{key:2,color:"red",rounded:""},{default:p(()=>[...e[3]||(e[3]=[i("Not Connected",-1)])]),_:1}))]),s(n)?.active?(a(),u("p",re,"Accept payments via PayPal")):x("",!0)])])]),t("div",ie,[s(y)?(a(),u("div",le,[t("div",ce,[g(r,{icon:["fal","spinner-third"],class:"animate-spin text-blue-500 text-lg"}),e[4]||(e[4]=t("span",{class:"text-sm font-medium text-gray-900"},"Finishing your connection",-1))]),e[5]||(e[5]=t("p",{class:"text-sm text-gray-500 mt-2 pl-8"},"PayPal is confirming your account. This usually takes under a minute.",-1))])):(a(),u("div",de,[t("div",ue,[t("div",me,[s(n)?.primary_email_confirmed?(a(),l(r,{key:0,icon:["fal","circle-check"],class:"text-emerald-500 text-lg"})):(a(),l(r,{key:1,icon:["fal","circle-x"],class:"text-red-500 text-lg"})),e[6]||(e[6]=t("span",{class:"text-sm font-medium text-gray-900"},"PayPal Email Confirmed",-1))]),s(n)?.primary_email_confirmed?x("",!0):(a(),u("div",ye,[...e[7]||(e[7]=[i(" Please confirm your email address on ",-1),t("a",{href:"https://www.paypal.com/businessprofile/settings",class:"underline hover:no-underline"}
2,"PayPal Business Settings",-1),i(" to receive payments. ",-1)])]))]),t("div",pe,[t("div",fe,[s(n)?.payments_receivable?(a(),l(r,{key:0,icon:["fal","circle-check"],class:"text-emerald-500 text-lg"})):(a(),l(r,{key:1,icon:["fal","circle-x"],class:"text-red-500 text-lg"})),e[8]||(e[8]=t("span",{class:"text-sm font-medium text-gray-900"},"Payments Receivable",-1))]),s(n)?.payments_receivable?x("",!0):(a(),u("div",ge,[...e[9]||(e[9]=[i(" Your PayPal account has restrictions. Contact ",-1),t("a",{href:"https://www.paypal.com",class:"underline hover:no-underline"},"PayPal Support",-1),i(" for assistance. ",-1)])]))]),t("div",xe,[t("div",_e,[s(n)?.oauth_integrations[0]?.oauth_third_party&&s(n)?.oauth_integrations[0].oauth_third_party.length>0?(a(),l(r,{key:0,icon:["fal","circle-check"],class:"text-emerald-500 text-lg"})):(a(),l(r,{key:1,icon:["fal","circle-x"],class:"text-red-500 text-lg"})),e[10]||(e[10]=t("span",{class:"text-sm font-medium text-gray-900"},"Permissions Granted",-1))])])]))]),s(N)&&!s(y)?(a(),u("div",ve,[s(n)?.active?x("",!0):(a(),l(M,{key:0,"btn-style":"primary",size:"md",onClick:R(O,["prevent"]),loading:s(A)},{default:p(()=>[...e[11]||(e[11]=[i("Try Connect Again",-1)])]),_:1},8,["loading"])),g(M,{"btn-style":"secondary",size:"md",onClick:R(E,["prevent"]),loading:s(C)},{default:p(()=>[...e[12]||(e[12]=[i("Disconnect",-1)])]),_:1},8,["loading"])])):x("",!0)])])}}};export{Be as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.