(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0cfee2"],{"668d":function(e,t,i){"use strict";i.r(t);var o=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("custom-element-loader",{attrs:{"element-name":"disburse-ui"}},[i("disburse-ui",{attrs:{user:e.formattedUserInfo,"access-token":e.accessToken,"service-url":e.serviceUrl,"env-mode":e.environmentMode,"create-single-payout-account-id":e.state.createSinglePayoutAccountId,"request-id":e.state.requestId,"cc-back-route":e.state.backRoute,locale:e.locale}})],1)},s=[],r=i("4903"),n=i("e98f"),a=i("3882"),c=i("3617"),u=i("93f3"),d=i("b5c1"),p=i("ebe2");const b=Object(a["a"])("auth"),l=Object(a["a"])("disburse"),h=Object(a["a"])("usermgm"),m=Object(a["a"])("config");let v=class extends n["f"]{constructor(){super(...arguments),this.state={createSinglePayoutAccountId:"",requestId:"",backRoute:""}}created(){document.addEventListener(u["n"].Redirect,this._onWebComponentRedirect),this.isRequestIdAtSandbox&&this.forceSwitchLiveENV()}mounted(){this.$nextTick(()=>{this.isRequestIdAtSandbox||this.setMiniAppQueries({[d["c"]]:this.$route.query[d["c"]]}),this.handleMiniAppQueries()})}destroyed(){document.removeEventListener(u["n"].Redirect,this._onWebComponentRedirect)}_onWebComponentRedirect(e){var t;(null===(t=e.detail)||void 0===t?void 0:t.path)&&this.$router.push(e.detail.path)}get accessToken(){return this.user.accessToken}get formattedUserInfo(){return JSON.stringify({...this.userInfo,country:this.orgdetails.country,permissions:this.permissions})}get isRequestIdAtSandbox(){return this.$route.query[d["c"]]&&!this.$route.query[d["b"]]&&this.isSandboxMode}handleMiniAppQueries(){this.state.createSinglePayoutAccountId=this.miniAppQueries[d["b"]],this.state.requestId=this.miniAppQueries[d["c"]],this.state.backRoute=this.miniAppQueries[d["a"]],this.resetMiniAppQueries()}resetMiniAppQueries(){this.setMiniAppQueries({[d["b"]]:"",[d["c"]]:"",[d["a"]]:""}),history.pushState({},"",this.$route.fullPath)}forceSwitchLiveENV(){this.setEnvironmentMode(p["e"].LIVE),location.reload()}};Object(r["a"])([b.State("user")],v.prototype,"user",void 0),Object(r["a"])([l.Getter("getAPIUrl")],v.prototype,"serviceUrl",void 0),Object(r["a"])([l.State("miniAppQueries")],v.prototype,"miniAppQueries",void 0),Object(r["a"])([m.State("environmentMode")],v.prototype,"environmentMode",void 0),Object(r["a"])([h.State("userInfo")],v.prototype,"userInfo",void 0),Object(r["a"])([h.State("permissions")],v.prototype,"permissions",void 0),Object(r["a"])([h.State("orgdetails")],v.prototype,"orgdetails",void 0),Object(r["a"])([m.Getter("isSandboxMode")],v.prototype,"isSandboxMode",void 0),Object(r["a"])([m.State("lang")],v.prototype,"locale",void 0),Object(r["a"])([l.Mutation("setMiniAppQueries")],v.prototype,"setMiniAppQueries",void 0),Object(r["a"])([m.Mutation("setEnvironmentMode")],v.prototype,"setEnvironmentMode",void 0),Object(r["a"])([h.Getter("getOrgAgreement")],v.prototype,"orgAgreement",void 0),v=Object(r["a"])([Object(n["a"])({components:{CustomElementLoader:c["b"]}})],v);var y=v,A=y,O=i("d8ae"),f=Object(O["a"])(A,o,s,!1,null,null,null);t["default"]=f.exports}}]); //# sourceMappingURL=chunk-2d0cfee2.73129eb8.js.map