1import{d as b,r as p,o as w,h as T,i as y,au as I,J as f,aD as l}from"./DWByBbqu.js";import{s as W}from"./C-wOCzGQ.js";import"./DApSuyjl.js";const H=b({__name:"ASumsubVerification",props:{isTestMode:{type:Boolean,default:!0},reason:{default:""},config:{default:()=>({uiConf:{customCssStr:".iframe2.min-height {min-height:300px;}.sumsub-logo {display:none;}"}})},options:{},accessToken:{default:""}},emits:["init","reviewPending"],setup(m,{emit:h}){const i=h,e=m,s=p(e.accessToken),c=p(),r=async()=>{const t=await I({path:"/rest/player/verification/token/",method:"get",options:{query:{reason:e.reason}}});return s.value=t.token||"",s.value},k=({accessToken:t,email:u,phone:S,i18n:C})=>{let a=W.init(t,()=>r());e.isTestMode&&(a=a.onTestEnv()),a.withConf({lang:"en",email:u,phone:S,i18n:C,uiConf:{},...e.config}).withOptions({addViewportTag:!1,adaptIframeHeight:!0,...e.options}).on("idCheck.onStepCompleted",()=>{}).on("idCheck.onApplicantStatusChanged",o=>{(o==null?void 0:o.reviewStatus)==="pending"&&i("reviewPending")}).on("idCheck.onError",()=>{}).on("idCheck.onApplicantLoaded",()=>{i("init")}).onMessage((o,E)=>{const{reviewStatus:g,reviewResult:n}=E,d=g==="completed",_=(n==null?void 0:n.reviewAnswer)==="RED",v=(n==null?void 0:n.reviewAnswer)==="GREEN";_&&d&&(f("SHOW_FAILED_VERIFY"),l("SHOW_FAILED_VERIFY",()=>{})),v&&d&&(f("SHOW_SUCCESS_VERIFY"),l(["SHOW_SUCCESS_VERIFY"],()=>{}))}).build().launch(c.value)};return w(async()=>{e.accessToken||await r(),k({accessToken:s.value})}),(t,u)=>(T(),y("div",{ref_key:"sumsubWebsdkContainer",ref:c},null,512))}});export{H 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.