PageSourceSearch

https://mindcapital.co/_next/static/chunks/pages/invest/user-portal/account/security/sms-427b2ade04fbe2f3.js

js mindcapital.co collected 2026-10-09 21:56:13 UTC 14,852 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9425],{5130:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var n=r(53441);function s(e,t){void 0===t&&(t={});var r,n,s=(r=e)&&"j"===r[0]&&":"===r[1]?r.substr(2):r;if(void 0===(n=t.doNotParse)&&(n=!s||"{"!==s[0]&&"["!==s[0]&&'"'!==s[0]),!n)try{return JSON.parse(s)}catch(e){}return e}var o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)};let i=function(){function e(e,t){var r=this;this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.cookies="string"==typeof e?n.q(e,t):"object"==typeof e&&null!==e?e:{},new Promise(function(){r.HAS_DOCUMENT_COOKIE="object"==typeof document&&"string"==typeof document.cookie}).catch(function(){})}return e.prototype._updateBrowserValues=function(e){this.HAS_DOCUMENT_COOKIE&&(this.cookies=n.q(document.cookie,e))},e.prototype._emitChange=function(e){for(var t=0;t<this.changeListeners.length;++t)this.changeListeners[t](e)},e.prototype.get=function(e,t,r){return void 0===t&&(t={}),this._updateBrowserValues(r),s(this.cookies[e],t)},e.prototype.getAll=function(e,t){void 0===e&&(e={}),this._updateBrowserValues(t);var r={};for(var n in this.cookies)r[n]=s(this.cookies[n],e);return r},e.prototype.set=function(e,t,r){var s;"object"==typeof t&&(t=JSON.stringify(t)),this.cookies=o(o({},this.cookies),((s={})[e]=t,s)),this.HAS_DOCUMENT_COOKIE&&(document.cookie=n.l(e,t,r)),this._emitChange({name:e,value:t,options:r})},e.prototype.remove=function(e,t){var r=t=o(o({},t),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=o({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=n.l(e,"",r)),this._emitChange({name:e,value:void 0,options:t})},e.prototype.addChangeListener=function(e){this.changeListeners.push(e)},e.prototype.removeChangeListener=function(e){var t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1)},e}()},8732:(e,t,r)=>{"use strict";r.d(t,{O:()=>y}),r(14232);var n=r(89890),s=r(34846),o=r(48230),i=r.n(o),a=r(89099),c=r(65470),u=r(16839),l=r(21882),d=r(46863),p=r(46989),m=r(20520),h=r(37876),f=[{name:"profile",link:"profile",kycRequire:!1,elkremRequire:!1},{name:"security",link:"security",kycRequire:!1,elkremRequire:!1},{name:"pdpa_form",link:"pdpa",kycRequire:!1,elkremRequire:!1},{name:"link_merkle_account",link:"transfer-merkle-account",kycRequire:!1,elkremRequire:!0}];function v(e){return"/invest/user-portal/account/".concat(e)}function y(e){var t,r,o=e.children,y=e.sidebar,b=(0,n.Ay)("/kyc",u.GO).data,g=(0,a.useRouter)(),k=(0,m.A)().user,x=(0,s.Bd)(["tab","my-account"]).t,O=(0,c.x)("useMerkleToElkremParse2");return(0,h.jsxs)(d.Y,{sidebar:void 0!==y&&y,children:[(0,h.jsxs)("div",{className:"grid grid-cols-1 space-y-5",children:[(0,h.jsx)("div",{children:(0,h.jsxs)("button",{type:"button",onClick:function(){return g.replace("/invest/user-portal/overall")},className:"cursor-pointer focus:outline-none",children:[(0,h.jsx)(l.A.ArrowLeft,{className:"inline mr-3"})," ",x("overview",{ns:"tab"})]})}),(0,h.jsx)("div",{className:"text-3xl text-left font-semibold",children:x("settings",{ns:"my-account"})}),k&&(null==(t=k.allowInvest)?void 0:t.status)===p.HX.REJECTED&&(0,h.jsx)("div",{className:"border border-failure p-4 bg-failure bg-opacity-30 text-black-override mb-3 my-4","data-cy":"allow-invest-reject-reason",children:null==(r=k.allowInvest)?void 0:r.rejectReason})]}),(0,h.jsxs)("div",{className:"grid grid-cols-1 space-y-5",children:[(0,h.jsx)("div",{className:"space-x-10 mt-7",children:f.map(function(e){var t=e.name,r=e.link,n=e.kycRequire,s=e.elkremRequire;return(n&&b||!n)&&(s&&O||!s)?(0,h.jsx)(i(),{href:v(r),className:"inline-block focus:outline-none ".concat(g.pathname.match(RegExp("".concat(v(r)),"g"))?"border-success border-b":""),children:x(t,{ns:"tab"})},t):""})}),(0,h.jsx)("div",{className:"bg-gray-100-override rounded-md mt-5 text-gray-200 text-sm w-auto",children:o})]})]})}},13025:(e,t,r)=>{"use strict";r.r(t),r.d(t,{SMS:()=>y,default:()=>b});
1var n=r(63857),s=r(43081),o=r.n(s),i=r(14232),a=r(37983),c=r(89890),u=r(34846),l=r(16839),d=r(80846),p=r(20520),m=r(40341),h=r(80318),f=r(20924),v=r(37876);function y(){var e,t=(0,p.A)().user,r=(0,u.Bd)(["my-account"]).t,s=(0,i.useState)(!1),m=s[0],y=s[1],b=(0,c.Ay)(t?"/security/".concat(t.uuid,"/otpPhoneNumber"):null,l.GO).data;function g(){return(g=(0,n.A)(o().mark(function e(){return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:y(!0);case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function k(){return(k=(0,n.A)(o().mark(function e(n){return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,l.FH.post("/security/".concat(t.uuid,"/sms-activate"),{otp:n.sms});case 4:a.oR.success(r("sms_activate_success",{ns:"my-account"})),(0,c.Tk)("/security/".concat(t.uuid,"/otpPhoneNumber"));case 6:case"end":return e.stop()}},e)}))).apply(this,arguments)}return(0,v.jsx)(v.Fragment,{children:(0,v.jsx)(d._,{subHeader:r("sms_authentication",{ns:"my-account"}),children:null!=b&&b.number?(0,v.jsxs)("div",{className:"flex flex-wrap justify-between px-10 items-center gap-x-7",children:[(0,v.jsxs)("div",{className:"space-y-2",children:[(0,v.jsx)("div",{className:"text-black-override font-bold",children:r("sms_authentication",{ns:"my-account"})}),(0,v.jsx)("div",{children:r("sms_for_number",{ns:"my-account",phone:(0,f.LB)(b.number)})})]}),(0,v.jsx)("div",{className:"text-success",children:r("sms_enable",{ns:"my-account"})})]}):null!=t&&null!=(e=t.authentication)&&e.phoneNumber?(0,v.jsxs)("div",{className:"px-10",children:[(0,v.jsx)(h.A,{action:"add-phone",callback:function(e){return k.apply(this,arguments)},open:m,closeModal:function(){return y(!1)},challengePhoneNumber:t.authentication.phoneNumber,autoSendSMSOTP:!0,disableEmail:!0}),(0,v.jsxs)("div",{className:"space-y-5",children:[(0,v.jsx)("div",{className:"text-black-override font-bold",children:r("sms_registered_phone",{ns:"my-account",phone:(0,f.LB)(t.authentication.phoneNumber)})}),(0,v.jsx)("button",{type:"button",className:"btn btn-primary-green w-64 max-w-full",onClick:function(){return g.apply(this,arguments)},children:r("sms_enable_authentication",{ns:"my-account"})})]})]}):(0,v.jsx)("div",{className:"px-10",children:(0,v.jsx)("p",{className:"text-gray-400",children:r("sms_no_phone_registered",{ns:"my-account"})})})})})}let b=(0,m.ru)(y)},22538:(e,t,r)=>{"use strict";r.d(t,{k5:()=>c});var n=r(14232),s={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},o=n.createContext&&n.createContext(s),i=function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},a=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)0>t.indexOf(n[s])&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r};function c(e){return function(t){return n.createElement(u,i({attr:i({},e.attr)},t),function e(t){return t&&t.map(function(t,r){return n.createElement(t.tag,i({key:r},t.attr),e(t.child))})}(e.child))}}function u(e){var t=function(t){var r,s=e.attr,o=e.size,c=e.title,u=a(e,["attr","size","title"]),l=o||t.size||"1em";return t.className&&(r=t.className),e.className&&(r=(r?r+" ":"")+e.className),n.createElement("svg",i({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,s,u,{className:r,style:i(i({color:e.color||t.color},t.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),c&&n.createElement("title",null,c),e.children)};return void 0!==o?n.createElement(o.Consumer,null,function(e){return t(e)}):t(s)}},22948:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/invest/user-portal/account/security/sms",function(){return r(13025)}])},40341:(e,t,r)=>{"use strict";r.d(t,{ru:()=>w});var n=r(63857),s=r(42969),o=r(43081),i=r.n(o);r(14232);var a=r(89099),c=r.n(a),u=r(60072),l=r.n(u),d=r(26757),p=r(33191),m=r.n(p),h=r(88488),f=r(99536),v=r(66763),y=r(94706),b=r(54902),g=r(37876);function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?k(Object(r),!0).forEach(function(t){(0,s.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function O(e,t){c().push(e)}var _=function(e,t){var r=l()(e)[h.T],n=t.reverse,s=r?(0,d.A)(r):null;return{token:r,user:s,reverse:void 0!==n&&n}},w=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=function(t){return(0,g.jsx)(e,x({},t))};return t=(0,n.A)(i().mark(function t(n){var s,o,a,c,u,l,p,g,k,w,N,j,E,A;return i().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(o=_(n,r).token,a=null,c=_(n,r).reverse,y.v.debug("withAuth headers",null==(s=n.req)?void 0:s.headers),u=function(e){var t,r,n,s,o,i;return b._.TRUE_MONEY_DEV_ACCESS_TOKEN?(y.v.debug("get tmnToken from ENV TRUE_MONEY_DEV_ACCESS_TOKEN: ".concat(b._.TRUE_MONEY_DEV_ACCESS_TOKEN)),b._.TRUE_MONEY_DEV_ACCESS_TOKEN):null!=e&&null!=(t=e.query)&&t.tmnAccessToken?(y.v.debug("get tmnToken from query params ".concat(null==e||null==(o=e.query)?void 0:o.tmnAccessToken)),null==e||null==(i=e.query)?void 0:i.tmnAccessToken):m().get(h.cr)?(y.v.debug("get tmnToken from cookie: ".concat(m().get(h.cr))),m().get(h.cr)):(y.v.debug("get tmnToken from header: ".concat(null==(r=e.req)?void 0:r.headers["tmn-access-token"])),null!=(n=null==(s=e.req)?void 0:s.headers["tmn-access-token"])?n:null)}(n),l=null,u&&(n.tmnAccessToken=u),(p=function(e){var t,r,n,s,o;return null!=e&&null!=(t=e.query)&&t.scbsAccessToken?(y.v.debug("get scbsToken from query params ".concat(null==e||null==(s=e.query)?void 0:s.scbsAccessToken)),null==e||null==(o=e.query)?void 0:o.scbsAccessToken):m().get(h.T)?m().get(h.T):null!=(r=null==(n=e.req)?void 0:n.headers["scbs-access-token"])?r:null}(n))&&(n.scbsAccessToken=p),!o){t.next=14;break}n.token=o,a=(0,d.A)(o),t.next=33;break;case 14:if(!(!o&&n.tmnAccessToken)){t.next=32;break}return t.next=17,(0,f.F)(u?{accessToken:u}:{});case 17:if(g=t.sent,y.v.debug("withAuth tmnUser: ".concat(JSON.stringify(g))),k=g.public_profile,w=g.email,N=g.tmn_id,!k){t.next=30;break}return t.next=23,(0,v.ds)(w,N);case 23:n.token=o=(j=t.sent).token,n.tmnUserId=l=N,a=o?(0,d.A)(o):null,n.res&&j.setCookie?(y.v.debug("Forwarding Set-Cookie to client: ".concat(j.setCookie)),n.res.setHeader("Set-Cookie",j.setCookie)):y.v.warn("No Set-Cookie header received from API response");case 30:t.next=33;break;case 32:!o&&n.scbsAccessToken&&(n.token=o=p,a=o?(0,d.A)(o):null);case 33:if(y.v.debug("withAuth merkle token: ".concat(o)),y.v.debug("withAuth tmnAccessToken: ".concat(u)),y.v.debug("withAuth user: ".concat(a?a.uuid:"null")),y.v.debug("reverse: ".concat(c)),!(!o&&!c)){t.next=43;break}O("/"!==(E=n.asPath||"/")?"/invest/login?redirect=".concat(encodeURIComponent(E)):"/invest/login",n),t.next=50;break;case 43:if(!(a&&!a.isVerified&&!a.trueMoneyId&&!a.scbsId)){t.next=49;break}return t.next=46,(0,v.ri)("/invest/login");case 46:O("/",n),t.next=50;break;case 49:o&&c&&O("/invest/user-portal",n);case 50:if(t.t0=e.getInitialProps,!t.t0){t.next=55;break}return t.next=54,e.getInitialProps(n);case 54:t.t0=t.sent;case 55:return A=t.t0,t.abrupt("return",x(x({},A),{},{token:o,user:a,tmnAccessToken:u,tmnUserId:l}));case 57:case"end":return t.stop()}},t)})),s.getInitialProps=function(e){return t.apply(this,arguments)},s}},53441:(e,t)=>{"use strict";t.q=function(e,t){if("string"!=typeof e)throw TypeError("argument str must be a string");for(var n={},o=e.split(s),i=(t||{}).decode||r,a=0;a<o.length;a++){var c=o[a],u=c.indexOf("=");if(!(u<0)){var l=c.substr(0,u).trim(),d=c.substr(++u,c.length).trim();'"'==d[0]&&(d=d.slice(1,-1)),void 0==n[l]&&(n[l]=function(e,t){try{return t(e)}catch(t){return e}}(d,i))}}return n},t.l=function(e,t,r){var s=r||{},i=s.encode||n;if("function"!=typeof i)throw TypeError("option encode is invalid");if(!o.test(e))throw TypeError("argument name is invalid");var a=i(t);if(a&&!o.test(a))throw TypeError("argument val is invalid");var c=e+"="+a;if(null!=s.maxAge){var u=s.maxAge-0;if(isNaN(u)||!isFinite(u))throw TypeError("option maxAge is invali
1d");c+="; Max-Age="+Math.floor(u)}if(s.domain){if(!o.test(s.domain))throw TypeError("option domain is invalid");c+="; Domain="+s.domain}if(s.path){if(!o.test(s.path))throw TypeError("option path is invalid");c+="; Path="+s.path}if(s.expires){if("function"!=typeof s.expires.toUTCString)throw TypeError("option expires is invalid");c+="; Expires="+s.expires.toUTCString()}if(s.httpOnly&&(c+="; HttpOnly"),s.secure&&(c+="; Secure"),s.sameSite)switch("string"==typeof s.sameSite?s.sameSite.toLowerCase():s.sameSite){case!0:case"strict":c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;case"none":c+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return c};var r=decodeURIComponent,n=encodeURIComponent,s=/; */,o=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/},58103:(e,t)=>{var r;!function(){"use strict";var n={}.hasOwnProperty;function s(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)&&r.length){var i=s.apply(null,r);i&&e.push(i)}else if("object"===o)for(var a in r)n.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}e.exports?(s.default=s,e.exports=s):void 0===(r=(function(){return s}).apply(t,[]))||(e.exports=r)}()},60072:(e,t,r)=>{var n=r(5130);n=n.default||n,e.exports=function(e,t){var r=e.req&&e.req.headers&&e.req.headers.cookie;return new n(r).getAll(t)}},80846:(e,t,r)=>{"use strict";r.d(t,{_:()=>i}),r(14232);var n=r(34846),s=r(8732),o=r(37876),i=function(e){var t=e.children,r=e.subHeader,i=void 0===r?"":r,a=(0,n.Bd)(["tab"]).t;return(0,o.jsx)(s.O,{children:(0,o.jsxs)("div",{className:"grid grid-cols-1 py-10 ",children:[(0,o.jsxs)("div",{className:"px-10",children:[(0,o.jsx)("div",{className:"text-black-override text-3xl font-bold",children:a("security",{ns:"tab"})}),i&&(0,o.jsx)("div",{className:"text-lg",children:i})]}),(0,o.jsx)("div",{className:"border-b border-gray-30 my-6"}),t]})})}}},e=>{e.O(0,[6497,8306,8230,1146,1882,6863,318,636,6593,8792],()=>e(e.s=22948)),_N_E=e.O()}]);

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.