"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@aplus-frontend/antdv"),l=require("lodash-unified");function c(e){return typeof e=="object"&&typeof e.then=="function"?e:!1}const f=(e,n)=>typeof e=="function"&&c(e?.(n)),u=(e,n="0.7")=>{try{let t=e?.toLowerCase();if(t&&/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(t)){if(t.length===4){let o="#";for(let s=1;s<4;s+=1)o+=t.slice(s,s+1).concat(t.slice(s,s+1));t=o}const r=[];for(let o=1;o<7;o+=2)r.push(parseInt("0x"+t.slice(o,o+2)));return"rgba("+r.join(",")+","+n+")"}if(t&&t.startsWith("rgb")){let r=t.match(/(\d(\.\d+)?)+/g);return r=r?.slice(0,3)?.concat(n),"rgba("+r.join(",")+")"}return t}catch{return}},h=e=>{const{onOk:n=()=>({})}=e;return new Promise((t,i)=>{a.Modal.confirm({onOk:async()=>{try{await n(),t(!0)}catch(r){i(r)}},onCancel:()=>{t(!1)},...l.omit(e,["onOk"])})})};exports.confirmHandle=h;exports.isAsynchronous=f;exports.isPromise=c;exports.transferOpacityColor=u;
