import{z as e}from"./utils-lib.js?v=20260328163632";import{u as a,h as o,i as s}from"./index.vue_vue_type_script_setup_true_lang9.js?v=20260328163632";import{bZ as t}from"./site.js?v=20260328163632";import{c as l,r as u}from"./base-lib.js?v=20260328163632";const{isRefreshSSL:r,productInfo:n,orderInfo:i,pollingPopup:c}=a();l((()=>n.value.totalPrice>5e3));const v=u(0),m=u(!1),I=u(!1),p=async()=>{const{data:{success:e}}=await t({order_no:i.value.order_no});m.value=!e},d=async()=>{await p(),m.value&&(v.value&&clearTimeout(v.value),v.value=setTimeout((()=>{T()}),3e3))},f=async()=>{c.value.close()},S=()=>{s({productInfo:n.value,orderInfo:i.value})},T=async a=>{I.value=!1,a&&sessionStorage.setItem("PAY-VIEW-SSL-TIME","".concat(a));const s=sessionStorage.getItem("PAY-VIEW-SSL-TIME");if(s){if(parseInt("".concat((new Date).getTime()/1e3-Number(s)),10)>600&&c.value)return sessionStorage.removeItem("PAY-VIEW-SSL-TIME"),e({title:"支付超时",icon:"warning",content:"由于您长时间未操作，支付超时，请刷新网页重新购买！",onConfirm:()=>{f(),window.location.reload()},onCancel:()=>{f(),window.location.reload()}});c.value||sessionStorage.removeItem("PAY-VIEW-SSL-TIME")}await p(),m.value?(v.value&&clearTimeout(v.value),v.value=setTimeout((()=>{T()}),3e3)):(n.value.isRenew&&(r.value=!0),(async()=>{var e;o({productInfo:n.value,orderInfo:i.value}),r.value=!0,null==(e=c.value)||e.close(),clearTimeout(v.value)})())},w=()=>{m.value=!1,I.value=!1,v.value&&clearTimeout(v.value)};export{T as a,d as b,w as c,S as p,I as s};
