1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5406],{60403:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/earnings",function(){return r(87333)}])},40570:function(e,n,r){"use strict";var t=r(26042),a=r(69396),i=r(99534),s=r(85893),c=r(67294),o=r(86002),l=r(4662),u=r(282),d=r(71344),h=c.forwardRef((function(e,n){var r=e.color,h=(0,i.Z)(e,["color"]),x=(0,l.Z)(),m=c.useMemo((function(){switch(r){case"default":case"inherit":case"primary":case"secondary":case void 0:return x;case"warning":return(0,a.Z)((0,t.Z)({},x),{palette:(0,a.Z)((0,t.Z)({},x.palette),{primary:(0,t.Z)({},x.palette.warning)})});case"error":return(0,a.Z)((0,t.Z)({},x),{palette:(0,a.Z)((0,t.Z)({},x.palette),{primary:(0,t.Z)({},x.palette.error)})});default:return(0,o.default)((0,a.Z)((0,t.Z)({},x),{palette:{primary:{main:r}}}))}}),[r,x]);return"default"===r||"inherit"===r||"primary"===r||"secondary"===r||void 0===r?(0,s.jsx)(u.Z,(0,t.Z)({ref:n,color:r},h)):(0,s.jsx)(d.Z,{theme:m,children:(0,s.jsx)(u.Z,(0,t.Z)({ref:n,color:"primary"},h))})}));n.Z=h},62284:function(e,n,r){"use strict";var t=r(14924),a=r(26042),i=r(85893),s=r(67294),c=r(32427),o=r(43832),l=(0,c.Z)((function(e){return{root:(0,t.Z)({},e.breakpoints.down("xs"),{paddingRight:"8px",paddingLeft:"8px"})}})),u=s.forwardRef((function(e,n){var r=l();return(0,i.jsx)(o.Z,(0,a.Z)({ref:n,classes:r,fixed:!0,maxWidth:"sm"},e))}));n.Z=u},86263:function(e,n,r){"use strict";var t=r(14924),a=r(26042),i=r(85893),s=r(67294),c=r(32427),o=r(41749),l=(0,c.Z)((function(e){return{root:(0,t.Z)({width:"calc(100% + 16px)",margin:"-8px"},e.breakpoints.down("xs"),{width:"calc(100% + 8px)",margin:"-4px"})}})),u=s.forwardRef((function(e,n){var r=l();return(0,i.jsx)(o.Z,(0,a.Z)({ref:n,classes:r,container:!0,justifyContent:"center"},e))}));n.Z=u},73844:function(e,n,r){"use strict";var t=r(14924),a=r(26042),i=r(85893),s=r(67294),c=r(32427),o=r(41749),l=(0,c.Z)((function(e){return{root:(0,t.Z)({padding:"8px"},e.breakpoints.down("xs"),{padding:"4px"})}})),u=s.forwardRef((function(e,n){var r=l();return(0,i.jsx)(o.Z,(0,a.Z)({ref:n,classes:r,item:!0,xs:12},e))}));n.Z=u},46117:function(e,n,r){"use strict";var t=r(47568),a=r(828),i=r(20414),s=r(67294),c=r(29379),o=r(92674);n.Z=function(){var e=(0,o.Z)(),n=(0,a.Z)(s.useState((function(){var n=function(){var n=(0,t.Z)((function(){var n;return(0,i.__generator)(this,(function(r){switch(r.label){case 0:return[4,e("/auth/stripe-account-session")];case 1:if(!(n=r.sent()))throw new Error("response is null");return[2,n.ClientSecret]}}))}));return function(){return n.apply(this,arguments)}}();return(0,c.loadConnectAndInitialize)({publishableKey:"pk_live_51JlNQrBgBWAqLUreSsnfu4ekOlQKXrk3G4YEfjDKa62949Cs4CazwZiFZIMRw2iv9gUzpvC2PrNuYyQezs1triHV00EscMbAUK",fetchClientSecret:n,appearance:{overlays:"dialog",variables:{colorPrimary:"#625afa"}}})})),1);return n[0]}},87333:function(e,n,r){"use strict";r.r(n),r.d(n,{__N_SSG:function(){return re},default:function(){return te}});var t=r(47568),a=r(20414),i=r(85893),s=r(67294),c=r(9008),o=r.n(c),l=r(60253),u=r(7885),d=r(828),h=r(11163),x=r(72091),m=r(18463),Z=r(51907),p=r(79912),j=r(52663),f=r(66856),g=r(29525),y=r(7212),b=r(66083),v=r(64436),w=r(30585),C=r(96394),S=r(85639),k=r(7089),_=r(22318),N=r(49384),U=r(92674),E=r(40570),L=r(57308),I=[{name:"Australia",code:"AU"},{name:"Austria",code:"AT"},{name:"Belgium",code:"BE"},{name:"Bulgaria",code:"BG"},{name:"Canada",code:"CA"},{name:"Croatia",code:"HR"},{name:"Cyprus",code:"CY"},{name:"Czech Republic",code:"CZ"},{name:"Denmark",code:"DK"},{name:"Estonia",code:"EE"},{name:"Finland",code:"FI"},{name:"France",code:"FR"},{name:"Germany",code:"DE"},{name:"Gibraltar",code:"GI"},{name:"Greece",code:"GR"},{name:"Hong Kong",code:"HK"},{name:"Hungary",code:"HU"},{name:"Ireland",code:"IE"},{name:"Italy",code:"IT"},{name:"Japan",code:"JP"},{name:"Latvia",code:"LV"},{name:"Liechtenstein",code:"LI"},{name:"Lithuania",code:"LT"},{name:"Luxembourg",code:"LU"},{name:"Malaysia",code:"MY"},{name:"Malta",code:"MT"},{name:"Mexico ",code:"MX"},{name:"Netherlands",code:"NL"},{name:"New Zealand",code:"NZ"},{name:"Norway",code:"NO"},{name:"Poland",code:"PL"},{name:"Portugal",code:"PT"},{name:"Romania",code:"RO"},{name:"Singapore",code:"SG"},{name:"Slovakia",code:"SK"},{name:"Slovenia",code:"SI"},{name:"Spain",code:"ES"},{name:"Sweden",code:"SE"},{name:"Switzerland",code:"CH"},{name:"Thailand",code:"TH"},{name:"United Arab Emirates",code:"AE"},{name:"United Kingdom",code:"GB"},{name:"United States",code:"US"}],P=function(e){var n,r,c=e.onUserUpdate,o=(0,h.useRouter)().locale,u=(0,l.$G)().t,P=(0,x.Ds)().enqueueSnackbar,R=(0,U.Z)(),A=(0,d.Z)(s.useState(!1),2),B=A[0],F=A[1],T=(0,d.Z)(s.useState(""),2),D=T[0],G=T[1],O=(0,d.Z)(s.useState(!1),2),H=O[0],z=O[1],K=(0,d.Z)(s.useState(""),2),M=K[0],W=K[1];if("ja"===o)n="\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u53ce\u76ca\u5316\u3059\u308b\u306b\u306f\u3001\u307e\u305a\u304a\u5ba2\u69d8\u304c\u6240\u5728\u3059\u308b\u56fd\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u73fe\u5728".concat(I.length,"\u304b\u56fd\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002"),r="/help/ja/351000000000";else n="First, select your country to monetize your account. We currently support ".concat(I.length," countries. "),r="/help/en/251000000000";var q=s.useCallback((function(e){W(e.target.value),e.target.value&&G("")}),[]),J=s.useCallback((function(){M?z(!0):G(u("country-is-required"))}),[u,M]),Y=s.useCallback((function(){return z(!1)}),[]),Q=s.useCallback((0,t.Z)((function(){var e,n,r;return(0,a.__generator)(this,(function(t){switch(t.label){case 0:F(!0),z(!1),t.label=1;case 1:return t.trys.push([1,3,,4]),e=JSON.stringify({country:I[Number(M)].code}),[4,R("/auth/user/stripe-id",{method:"PUT",body:e})];case 2:if(!(n=t.sent()))throw new Error("newUser is null");return c(n),[3,4];case 3:return r=t.sent(),(0,N.kg)(r),P(u("failed-to-send-data"),{variant:"error"}),F(!1),[3,4];case 4:return[2]}}
1))})),[P,R,c,u,M]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(m.Z,{children:[(0,i.jsxs)(p.Z,{children:[(0,i.jsx)(_.Z,{variant:"h6",style:{marginBottom:"16px"},children:u("select-your-country")}),(0,i.jsxs)(_.Z,{variant:"body1",style:{marginBottom:"24px"},children:[n,(0,i.jsx)(L.Z,{href:r,textLink:!0,children:u("how-to-earn-on-baskadia?")})]}),(0,i.jsxs)(v.Z,{disabled:B,fullWidth:!0,variant:"outlined",children:[(0,i.jsx)(C.Z,{id:"country",children:u("country")}),(0,i.jsx)(k.Z,{error:!!D,label:"Country",labelId:"country",required:!0,value:M,onChange:q,children:I.map((function(e,n){var r=e.name,t=e.code;return(0,i.jsxs)(S.Z,{value:n,children:[(0,i.jsx)("img",{alt:"",loading:"lazy",src:"https://flagcdn.com/w20/".concat(t.toLowerCase(),".png"),srcSet:"https://flagcdn.com/w40/".concat(t.toLowerCase(),".png 2x"),width:"20",style:{marginRight:"16px",verticalAlign:"middle"}}),r]},t)}))}),(0,i.jsx)(w.Z,{color:"error",children:D})]})]}),(0,i.jsx)(Z.Z,{children:(0,i.jsx)(E.Z,{color:"primary",disabled:B,variant:"contained",style:{marginLeft:"auto"},onClick:J,children:u("continue")})})]}),(0,i.jsxs)(j.Z,{open:H,onClose:Y,children:[(0,i.jsx)(b.Z,{children:u("confirm-your-country")}),(0,i.jsxs)(g.Z,{children:[(0,i.jsx)(y.Z,{children:u("this-action-cannot-be-undone")}),(0,i.jsxs)(y.Z,{color:"secondary",variant:"h6",style:{marginTop:"16px",fontWeight:"bold"},children:[(0,i.jsx)("img",{alt:"",loading:"lazy",src:"https://flagcdn.com/w20/".concat(I[Number(M)].code.toLowerCase(),".png"),srcSet:"https://flagcdn.com/w40/".concat(I[Number(M)].code.toLowerCase(),".png 2x"),width:"28",style:{marginRight:"16px",verticalAlign:"middle"}}),I[Number(M)].name]})]}),(0,i.jsxs)(f.Z,{children:[(0,i.jsx)(E.Z,{onClick:Y,children:u("cancel")}),(0,i.jsx)(E.Z,{onClick:Q,children:u("confirm")})]})]})]})},R=r(62284),A=r(86263),B=r(73844),F=r(26042),T=r(69396),D=r(94536),G=r(46117),O=r(13048),H=r(7397),z=r(39803),K=r(22284),M=function(e){var n,r,c=e.product,o=e.onProductUpdate,u=(0,h.useRouter)().locale,v=(0,l.$G)().t,w=(0,x.Ds)().enqueueSnackbar,C=(0,U.Z)(),S=(0,d.Z)(s.useState(!1),2),k=S[0],L=S[1],I=(0,d.Z)(s.useState(!1),2),P=I[0],R=I[1],A=(0,d.Z)(s.useState(""),2),B=A[0],D=A[1],G=(0,d.Z)(s.useState(""),2),O=G[0],M=G[1],W=(0,d.Z)(s.useState(!1),2),q=W[0],J=W[1],Y=(null===(n=c.Prices)||void 0===n?void 0:n[0].Amount)||0,Q=s.useCallback((function(){return R(!0)}),[]),X=s.useCallback((function(){return R(!1)}),[]);if("ja"===u)r="\u304a\u5ba2\u69d8\u306e\u30d7\u30ec\u30df\u30a2\u30e0\u30b3\u30f3\u30c6\u30f3\u30c4\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u305f\u3081\u306b\u8cfc\u8aad\u8005\u304c\u652f\u6255\u3046\u6708\u984d\u6599\u91d1\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044";else r="Set the amount your subscribers will pay each month to access your premium content";var $=s.useCallback((function(e){M(e.target.value),e.target.value&&D("")}),[]),V=s.useCallback((function(){O?Number(O)<1?D(v("amount-must-be-1-usd-or-more")):J(!0):D(v("amount-is-required"))}),[v,O]),ee=s.useCallback((function(){return J(!1)}),[]),ne=s.useCallback((0,t.Z)((function(){var e,n,r;return(0,a.__generator)(this,(function(t){switch(t.label){case 0:L(!0),J(!1),t.label=1;case 1:if(t.trys.push([1,3,4,5]),!c.ID)throw Error("product.ID is undefined");return e=JSON.stringify({amount:100*Number(O)}),[4,C("/auth/product/".concat(c.ID,"/price"),{method:"POST",body:e})];case 2:if(!(n=t.sent()))throw new Error("newPrice is null");return o((0,T.Z)((0,F.Z)({},c),{Prices:[n]})),R(!1),[3,5];case 3:return r=t.sent(),(0,N.kg)(r),w(v("failed-to-send-data"),{variant:"error"}),[3,5];case 4:return L(!1),[7];case 5:return[2]}}
1))})),[w,C,o,c,v,O]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(m.Z,{children:[(0,i.jsxs)(p.Z,{children:[(0,i.jsx)(_.Z,{variant:"h6",style:{marginBottom:"16px"},children:v("your-subscription-fee")}),(0,i.jsx)(_.Z,{variant:"body2",style:{marginBottom:"16px"},children:r}),(0,i.jsxs)(_.Z,{variant:"h6",style:{display:"flex",justifyContent:"space-between"},children:[(0,i.jsxs)("span",{children:[v("current-monthly-fee"),": "]}),(0,i.jsxs)("span",{children:[(Y/100).toLocaleString()," USD"]})]})]}),!P&&(0,i.jsx)(Z.Z,{children:(0,i.jsx)(E.Z,{color:"primary",disabled:k,startIcon:(0,i.jsx)(K.Z,{}),style:{marginLeft:"auto"},onClick:Q,children:v("edit")})}),P&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p.Z,{children:(0,i.jsx)(z.Z,{value:O,label:v("new-monthly-fee"),helperText:B,error:!!B,autoComplete:"off",disabled:k,fullWidth:!0,InputProps:{endAdornment:(0,i.jsx)(H.Z,{position:"end",children:"USD"})},required:!0,type:"number",variant:"outlined",onChange:$})}),(0,i.jsxs)(Z.Z,{children:[(0,i.jsx)(E.Z,{disabled:k,variant:"outlined",style:{marginLeft:"auto"},onClick:X,children:v("cancel")}),(0,i.jsx)(E.Z,{color:"primary",disabled:k,variant:"contained",onClick:V,children:v("change")})]})]})]}),(0,i.jsxs)(j.Z,{open:q,onClose:ee,children:[(0,i.jsx)(b.Z,{children:v("confirm-monthly-fee")}),(0,i.jsx)(g.Z,{children:(0,i.jsxs)(y.Z,{color:"secondary",variant:"h6",children:[Number(O).toLocaleString()," USD"]})}),(0,i.jsxs)(f.Z,{children:[(0,i.jsx)(E.Z,{onClick:ee,children:v("cancel")}),(0,i.jsx)(E.Z,{onClick:ne,children:v("confirm")})]})]})]})},W=r(58365),q=function(){var e=(0,l.$G)().t;return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(m.Z,{children:(0,i.jsxs)(p.Z,{children:[(0,i.jsx)(_.Z,{variant:"h6",style:{marginBottom:"16px"},children:e("your-subscription-fee")}),(0,i.jsx)(_.Z,{variant:"body1",style:{marginBottom:"8px"},children:(0,i.jsx)(W.Z,{variant:"text"})}),(0,i.jsx)(_.Z,{variant:"body1",style:{marginBottom:"8px"},children:(0,i.jsx)(W.Z,{variant:"text"})}),(0,i.jsx)(_.Z,{variant:"body1",children:(0,i.jsx)(W.Z,{variant:"text"})})]})})})},J=function(){var e,n,r=(0,O.Z)("/auth/product"),c=r.data,o=r.mutate,l=s.useCallback(function(){var e=(0,t.Z)((function(e){var n;return(0,a.__generator)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,o(e,!1)];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),(0,N.kg)(n),[3,3];case 3:return[2]}}
1))}));return function(n){return e.apply(this,arguments)}}(),[o]);return(0,i.jsxs)(i.Fragment,{children:[!(null===c||void 0===c||null===(e=c.Prices)||void 0===e?void 0:e.length)&&(0,i.jsx)(q,{}),!!(null===c||void 0===c||null===(n=c.Prices)||void 0===n?void 0:n.length)&&(0,i.jsx)(M,{product:c,onProductUpdate:l})]})},Y=function(e){var n,r,t,a=e.user,c=e.onUserUpdate,o=(0,h.useRouter)().locale,l=(0,G.Z)(),u=(0,d.Z)(s.useState(!1),2),x=u[0],Z=u[1];if("ja"===o)n="\u30a2\u30ab\u30a6\u30f3\u30c8\u306f\u5be9\u67fb\u4e2d\u3067\u3059",r="\u5be9\u67fb\u306b\u306f\u901a\u5e38\u6570\u6642\u9593\u304b\u3089\u6570\u65e5\u304b\u304b\u308a\u307e\u3059\u3002",t="\u5be9\u67fb\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001\u304a\u77e5\u3089\u305b\u3057\u307e\u3059\u3002";else n="Your account is under review",r="This process typically takes a few hours to a few days.",t="We will notify you once the review is complete.";var j=s.useCallback((function(e){Z(e.total>0)}),[]),f=s.useCallback((function(){c((0,T.Z)((0,F.Z)({},a),{StripeOnboardingComplete:!0}))}),[c,a]);return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(D.AW,{connectInstance:l,children:[(0,i.jsx)(B.Z,{style:{display:x?"block":"none"},children:(0,i.jsx)(m.Z,{children:(0,i.jsx)(D.WA,{onNotificationsChange:j})})}),!a.StripeOnboardingComplete&&(0,i.jsx)(B.Z,{children:(0,i.jsx)(m.Z,{style:{minHeight:"200px"},children:(0,i.jsx)(D.Nc,{onExit:f})})}),a.StripeOnboardingComplete&&(0,i.jsxs)(i.Fragment,{children:[!a.StripeChargesEnabled&&(0,i.jsx)(B.Z,{children:(0,i.jsx)(m.Z,{children:(0,i.jsxs)(p.Z,{children:[(0,i.jsx)(_.Z,{variant:"h6",children:n}),(0,i.jsxs)(_.Z,{variant:"body1",style:{marginTop:"16px"},children:[r,(0,i.jsx)("br",{}),t]})]})})}),a.StripeChargesEnabled&&(0,i.jsx)(B.Z,{children:(0,i.jsx)(m.Z,{children:(0,i.jsx)(J,{})})}),(0,i.jsx)(B.Z,{children:(0,i.jsx)(m.Z,{style:{minHeight:"200px",padding:"8px"},children:(0,i.jsx)(D.gQ,{})})})]})]})})},Q=r(33681),X=r(62822),$=r(50998),V=r(95757),ee=r(96837),ne=r(79895),re=!0,te=function(){var e=(0,l.$G)().t,n=(0,O.Z)("/auth/user"),r=n.data,c=n.mutate,d=s.useCallback(function(){var e=(0,t.Z)((function(e){var n;return(0,a.__generator)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,c(e,!1)];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),(0,N.kg)(n),[3,3];case 3:return[2]}}
1))}));return function(n){return e.apply(this,arguments)}}(),[c]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o(),{children:(0,i.jsx)("title",{children:"Baskadia"})}),!r&&(0,i.jsx)(Q.Z,{}),r&&(0,i.jsx)(R.Z,{style:{margin:"16px auto"},children:(0,i.jsxs)(A.Z,{children:[(0,i.jsx)(B.Z,{children:(0,i.jsxs)(u.Z,{style:{padding:"0 8px"},children:[(0,i.jsx)(L.Z,{href:"/home",textLink:!0,children:e("home")}),(0,i.jsx)(_.Z,{children:e("earnings")})]})}),!r.StripeID&&(0,i.jsx)(B.Z,{children:(0,i.jsx)(P,{onUserUpdate:d})}),r.StripeID&&(0,i.jsx)(Y,{user:r,onUserUpdate:d}),(0,i.jsx)(B.Z,{children:(0,i.jsx)(ne.Z,{children:(0,i.jsxs)(X.Z,{component:"nav",dense:!0,subheader:(0,i.jsx)(ee.Z,{children:e("other-settings")}),children:[r.StripeOnboardingComplete&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(L.Z,{href:"/auth/earnings/subscribers",children:(0,i.jsx)($.Z,{button:!0,children:(0,i.jsx)(V.Z,{primary:e("subscribers")})})}),(0,i.jsx)(L.Z,{href:"/auth/earnings/payments",children:(0,i.jsx)($.Z,{button:!0,children:(0,i.jsx)(V.Z,{primary:e("payments")})})}),(0,i.jsx)(L.Z,{href:"/auth/earnings/payouts",children:(0,i.jsx)($.Z,{button:!0,children:(0,i.jsx)(V.Z,{primary:e("payouts-list")})})}),(0,i.jsx)(L.Z,{href:"/auth/earnings/documents",children:(0,i.jsx)($.Z,{button:!0,children:(0,i.jsx)(V.Z,{primary:e("documents")})})}),(0,i.jsx)(L.Z,{href:"/auth/earnings/tax",children:(0,i.jsx)($.Z,{button:!0,children:(0,i.jsx)(V.Z,{primary:e("tax")})})}),(0,i.jsx)(L.Z,{href:"/auth/earnings/account",children:(0,i.jsx)($.Z,{button:!0,children:(0,i.jsx)(V.Z,{primary:e("account-management")})})})]}),(0,i.jsx)(L.Z,{href:"/auth/earnings/legacy",children:(0,i.jsx)($.Z,{button:!0,children:(0,i.jsx)(V.Z,{primary:e("legacy-payment")})})})]})})})]})})]})}}},function(e){e.O(0,[8652,3138,2387,4794,9803,3322,1980,9134,9774,2888,179],(function(){return n=60403,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
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.