1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6301],{45237:function(e,t,r){r.d(t,{Z:function(){return _}});var n=r(11719),l=r(26015),o=r(77804);r(88661);var a=r(46153),i=r(28733),s=r(42873),c=r(3726),u=r(72390),d=r(29116),h=r(34426),f=r(54491),x=r(89461);async function p(e){let{inviteCode:t}=e,{data:r}=await x.default.get("/public/v1/api/promotion/info",{params:{promotionCode:t}});return r.data}async function m(e){let{inviteCode:t}=e,{data:r}=await x.default.post("/v1/api/promotion/bind",{promotionCode:t});return r.data}var g=r(93340),_=()=>{let e=(0,a.I0)(),t=(0,i.T)(),r=(0,a.oR)(),{navToSubscribe:x}=(0,c.Z)(),_=()=>{e((0,f.ht)({}))},v=n=>{let{userName:l,userId:a,errText:i}=n,c=r.getState().user.isLogin;(0,g.I)({id:"invitation_result",login_status:c?1:0,result_type:0,fail_reason:i,inviter_id:a});let u=s.Z.info({size:"s",colorMode:"dark",icon:null,wrapClassName:"invite-fail-confirm-modal",title:t("invitation_fail_notice"),okText:t("confirm_button"),maskClosable:!0,content:(0,o.jsxs)("div",{children:[l&&(0,o.jsxs)("div",{className:"text-hl_text_01 mb-4 flex flex-row text-[13px] font-normal",children:[(0,o.jsx)("span",{children:t("inviter_prefix")}),"\xa0\xa0",(0,o.jsx)("span",{children:l})]}),(0,o.jsx)("div",{className:"text-hl_text_02 text-[15px]",children:i||t("invitation_fail_reason_invalid")})]}),onOk:()=>{u.destroy(),_(),e((0,h.zz)(!0))}})},b=()=>{_(),x({trackSource:"invite"})},y=async function(){let{successCb:t,failCb:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{inviteCode:l,user:o}=r.getState().layout.inviteUserInfo;if(!l)return;r.getState().layout.showInviteModal&&e((0,f.cX)(!1));let a=r.getState().user.isLogin;try{await m({inviteCode:l}),b(),null==t||t(),(0,g.I)({id:"invitation_result",login_status:a?1:0,result_type:1,inviter_id:null==o?void 0:o.userID})}catch(e){v({userName:null==o?void 0:o.name,errText:null==e?void 0:e.message,userId:null==o?void 0:o.userID}),null==n||n(e)}},N=async t=>{if(t)try{let r=await p({inviteCode:t});e((0,f.ht)((0,l._)((0,n._)({},r),{inviteCode:t}))),e((0,u.OL)({shareUrl:t,sourceScene:d.z6.invite,socialMedia:null})),e((0,f.cX)(!0))}catch(e){v({errText:null==e?void 0:e.message})}else e((0,h.zz)(!0))};return{onInviteSuccess:b,onClearInviteState:_,onShowInviteFailModal:v,onInviteBindCurrentUser:y,handleInviteOnFirstIn:N}}},86301:function(e,t,r){r.r(t),r.d(t,{default:function(){return T}});var n=r(77804),l=r(88661),o=r(91818),a=r(36587),i=r(46153),s=r(71596),c=r(62148),u=r(97194),d=r(17271),h=r(75460),f=r(79444),x=r(35966),p=r(28733),m=r(77269),g=r(45929),_=r(55914),v=r(33196),b=r(39869),y=r(45237),N=r(37090),w=r(39162),k=r(4290),E=function(){let e=(0,i.I0)(),t=(0,i.oR)(),r=(0,p.T)(),{getUserInfo:n}=(0,b.Z)(),{onInviteBindCurrentUser:o}=(0,y.Z)(),[h,f]=(0,l.useState)("phone"),[x,E]=(0,l.useState)(""),[T,C]=(0,l.useState)(""),[j,I]=(0,l.useState)(!1),[P,L]=(0,l.useState)(!1),[O,H]=(0,l.useState)(!1),[R,S]=(0,l.useState)(N.gb),z=(0,i.v9)(e=>{var t;return null==e?void 0:null===(t=e.user)||void 0===t?void 0:t.showLoginModal}),Z=(0,l.useRef)(!1),M=(0,l.useRef)(null),A=(0,l.useCallback)(()=>{a.Z.confirm({title:"è´¦æ·ç¶æå¼å¸¸",icon:null,width:280,className:"appeal-modal",content:"æ¨çè´¦æ·å¯è½è¿åäºç¨æ·åè®®ï¼è¢«æå访é®ï¼å¦æçé®è¯·è¿è¡ç³è¯",cancelText:"åæ¶",okText:"ç³è¯",onOk:async()=>{try{await (0,u.CO)(x),s.Z.success("å·²ç»æäº¤ç³è¯ï¼è¯·èå¿çå¾
")}catch(e){(0,c.k0)(e)&&s.Z.error(e.message)}}})},[x]),{sendCode:D,countdown:G,sending:Y}=(0,k.Z)({countryCode:u.ss,loginType:u.Ez.LOGINTYPEPHONE,onAppealNeeded:A}),U=(0,l.useCallback)(()=>D(x),[D,x]),F=(0,l.useCallback)(e=>{(0,_.Kq)({device_id:t.getState().user.realUserID,hailuo_user_id:t.getState().user.realUserID}),(0,_.Ej)({id:g.Cv.LOGIN_RESULT,params:{result_type:g.dT.SUCCESS,login_type:e===u.Ez.LOGINTYPETHIRDPART?g.Ez.WECHAT:g.Ez.MOBILE,page:g.Cv.LOGIN_POPUP_PAGE}})},[t]),W=(0,l.useCallback)((e,t)=>{(0,_.Ej)({id:g.Cv.LOGIN_RESULT,params:{result_type:g.dT.FAIL,fail_reason:t,page:g.Cv.LOGIN_POPUP_PAGE,login_type:e===u.Ez.LOGINTYPETHIRDPART?g.Ez.WECHAT:g.Ez.MOBILE}})},[]),V=(0,l.useCallback)((t,r)=>{let n=g.z5.OTHER;(0,c.k0)(t)&&(1200036===t.code?A():1200044===t.code?e((0,d.SQ)(!0)):s.Z.warn(t.message),n=g.z5.SERVER_ERROR),W(r,n)},[e,A,W]),B=(0,l.useCallback)(e=>{s.Z.success(r("toast_login_success")),E(""),C(""),I(!1),F(e)},[r,F]),X=(0,l.useCallback)(async()=>{try{let e=(0,v._n)();if(!e)return;L(!0);let{isRegister:t}=await (0,u.vg)({unionId:e,loginType:u.Ez.LOGINTYPETHIRDPART});await n(t),B(u.Ez.LOGINTYPETHIRDPART),o()}catch(e){V(e,u.Ez.LOGINTYPETHIRDPART)}finally{L(!1)}},[n,V,o,B]),q=(0,l.useCallback)(async e=>{let{phone:t,code:r,loginType:l}=e;
1(0,_.I)({id:"before_login_fetch",loginType:l}),L(!0);try{var a;let e=l===u.Ez.LOGINTYPETHIRDPART&&null!==(a=(0,v._n)())&&void 0!==a?a:void 0,{isRegister:i}=await (0,u.uX)({phone:t,code:r,unionId:e,loginType:l,countryCode:u.ss});l!==u.Ez.LOGINTYPETHIRDPART&&(0,v.j1)(),await n(i),B(l),o()}catch(e){V(e,l)}finally{L(!1)}},[n,V,o,B]),K=(0,l.useCallback)(async()=>{if(!P){if(!x){s.Z.error("请è¾å
¥ææºå·");return}if(!(0,w.OH)(x,u.ss)){s.Z.error("请è¾å
¥æ£ç¡®çææºå·");return}if(!T){s.Z.error("请è¾å
¥éªè¯ç ");return}if(!(0,w.Pw)(T)){s.Z.error("请è¾å
¥æ£ç¡®çéªè¯ç ");return}if(!j){M.current={phone:x,code:T,loginType:u.Ez.LOGINTYPEPHONE},H(!0);return}await q({phone:x,code:T,loginType:u.Ez.LOGINTYPEPHONE})}},[j,T,q,P,x]),Q=(0,l.useCallback)(()=>{let e=M.current;H(!1),e&&(I(!0),M.current=null,q(e))},[q]),J=(0,l.useCallback)(()=>{H(!1)},[]),$=(0,l.useCallback)(async e=>{P||await q(e)},[q,P]),ee=(0,l.useCallback)(async e=>{var t;if(m.BB&&!N.D_.includes(null==e?void 0:e.origin))return;let r=null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.hailuoWebLoginCode;if(r&&"string"==typeof r)try{S("æ«ç æå");let e=await (0,u.M7)({code:r});(0,v.Hh)(e.unionID),(0,v.Ly)(e.openID),await X()}catch(e){s.Z.error("ç»å½å¤±è´¥ï¼è¯·éè¯"),W(u.Ez.LOGINTYPETHIRDPART,g.z5.CANCEL)}finally{S(N.gb)}},[X,W]),et=(0,l.useCallback)(()=>{document.querySelector("#wxcode")&&window.WxLogin&&(Z.current||(new window.WxLogin(N.NK),window.addEventListener("message",ee,!1),Z.current=!0))},[ee]);return(0,l.useEffect)(()=>()=>{Z.current&&(window.removeEventListener("message",ee,!1),Z.current=!1)},[ee]),(0,l.useEffect)(()=>{if("wx"!==h)return;let e=window.setTimeout(et,0);return()=>window.clearTimeout(e)},[et,h]),(0,l.useEffect)(()=>{z||(0,v.j1)()},[z]),{loginTab:h,setLoginTab:f,phone:x,setPhone:E,code:T,setCode:C,agreed:j,setAgreed:I,sendCode:U,countdown:G,sending:Y,loginByPhone:K,loginByValues:$,initWechatQR:et,isLoading:P,confirmModalOpen:O,onSecondConfirm:Q,onSecondCancel:J,wxTip:R,countryCode:u.ss,agreementUrl:"/doc/zh/user-agreement.html",privacyUrl:"/doc/zh/privacy-policy.html"}},T=function(){let e=(0,i.I0)(),[t]=o.Z.useForm(),[r,p]=(0,l.useState)(!1),{loginTab:m,setLoginTab:g,phone:_,setPhone:v,code:b,setCode:y,agreed:N,setAgreed:w,sendCode:k,countdown:T,sending:C,loginByPhone:j,loginByValues:I,isLoading:P,confirmModalOpen:L,onSecondConfirm:O,onSecondCancel:H,wxTip:R,countryCode:S,agreementUrl:z,privacyUrl:Z}=E(),M=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"mb-10 flex flex-col items-center",children:[(0,n.jsx)(x.RY,{className:"text-hilo-foreground mb-3 h-12 w-auto"}),(0,n.jsxs)("h1",{className:"text-hilo-foreground",style:{fontSize:40,lineHeight:1.2,fontWeight:400},children:[(0,n.jsx)("span",{style:{fontFamily:"'Outfit', sans-serif"},children:"MiniMax"})," ",(0,n.jsx)("span",{className:"text-hilo-brand-accent",style:{fontFamily:"'Pixelify Sans', monospace",fontWeight:400},children:"Hub"})]}),(0,n.jsx)("p",{className:"cl_hl_H5_M text-hilo-muted-foreground mt-1",children:"ç¨AIè§£æ¾ä½ çåé å"})]}),(0,n.jsxs)("div",{className:"flex justify-center gap-10",children:[(0,n.jsx)("button",{type:"button",onClick:()=>g("phone"),className:"cl_hl_H5_M pb-1 ".concat("phone"===m?"text-hilo-foreground border-hilo-foreground border-b-2":"text-hilo-muted-foreground"),children:"ææºç»å½"}),(0,n.jsx)("button",{type:"button",onClick:()=>g("wx"),className:"cl_hl_H5_M pb-1 ".concat("wx"===m?"text-hilo-foreground border-hilo-foreground border-b-2":"text-hilo-muted-foreground"),children:"微信ç»å½"})]})]});return(0,n.jsxs)("div",{className:"hilo-theme bg-hilo-background fixed inset-0 flex",children:[(0,n.jsx)("div",{className:"flex flex-1 px-6 sm:px-10",children:(0,n.jsxs)("div",{className:"m-auto w-full max-w-[400px]",children:[M,(0,n.jsxs)("div",{className:"relative mt-6 min-h-[280px]",children:[(0,n.jsxs)("div",{className:"phone"===m?"":"hidden",children:[(0,n.jsxs)("div",{className:"bg-hilo-muted mb-4 flex items-center rounded-none px-4 py-3",children:[(0,n.jsx)("span",{className:"text-hilo-foreground cl_hl_H5_M mr-3",children:S}),(0,n.jsx)("span",{className:"bg-hilo-border mr-3 h-4 w-px"}),(0,n.jsx)("input",{type:"text",inputMode:"numeric",maxLength:11,value:_,onCh
1ange:e=>v(e.target.value.replace(/\D/g,"")),placeholder:"请è¾å
¥ææºå·",className:"cl_hl_H5_M text-hilo-foreground placeholder:text-hilo-muted-foreground flex-1 bg-transparent outline-none"})]}),(0,n.jsxs)("div",{className:"bg-hilo-muted mb-4 flex items-center rounded-none px-4 py-3",children:[(0,n.jsx)("input",{type:"text",inputMode:"numeric",maxLength:6,value:b,onChange:e=>y(e.target.value.replace(/\D/g,"")),placeholder:"请è¾å
¥éªè¯ç ",className:"cl_hl_H5_M text-hilo-foreground placeholder:text-hilo-muted-foreground flex-1 bg-transparent outline-none"}),(0,n.jsx)("button",{type:"button",onClick:k,disabled:C,className:"cl_hl_H7_M ml-3 whitespace-nowrap ".concat(C?"text-hilo-muted-foreground/60 cursor-not-allowed":"text-hilo-brand-accent hover:opacity-80"),children:C?"éæ°åé ".concat(T,"s"):"è·åéªè¯ç "})]}),(0,n.jsxs)("label",{className:"mb-6 flex cursor-pointer items-start gap-2",children:[(0,n.jsxs)("span",{className:"relative mt-1 inline-block h-4 w-4 shrink-0",children:[(0,n.jsx)("input",{type:"checkbox",checked:N,onChange:e=>w(e.target.checked),className:"border-hilo-border bg-hilo-background checked:border-hilo-primary checked:bg-hilo-primary focus-visible:ring-hilo-ring peer absolute inset-0 m-0 h-full w-full cursor-pointer appearance-none rounded-none border focus-visible:ring-2"}),(0,n.jsx)("span",{className:"text-hilo-primary-foreground pointer-events-none absolute inset-0 flex items-center justify-center text-[10px] leading-none opacity-0 peer-checked:opacity-100",children:"â"})]}),(0,n.jsxs)("span",{className:"cl_hl_H8_M text-hilo-muted-foreground",children:["æå·²é
读并åæ"," ",(0,n.jsx)("a",{href:z,target:"_blank",rel:"noopener noreferrer",className:"text-hilo-foreground hover:text-hilo-foreground underline",onClick:e=>e.stopPropagation(),children:"ç¨æ·åè®®"})," ","ä¸"," ",(0,n.jsx)("a",{href:Z,target:"_blank",rel:"noopener noreferrer",className:"text-hilo-foreground hover:text-hilo-foreground underline",onClick:e=>e.stopPropagation(),children:"éç§æ¿ç"})]})]}),(0,n.jsx)("button",{type:"button",onClick:j,disabled:P,className:"cl_hl_H5_M text-hilo-primary-foreground bg-hilo-primary hover:bg-hilo-primary/90 h-12 w-full rounded-none transition-colors ".concat(P?"cursor-not-allowed opacity-60":""),children:P?"ç»å½ä¸...":"ç«å³ç»å½"})]}),(0,n.jsxs)("div",{className:"flex flex-col items-center ".concat("wx"===m?"":"hidden"),children:[(0,n.jsx)("div",{id:"wxcode",className:"border-hilo-border flex h-[140px] w-[140px] items-center justify-center overflow-hidden rounded-none border"}),(0,n.jsx)("p",{className:"cl_hl_H7_M text-hilo-muted-foreground mb-6 mt-4",children:R}),(0,n.jsxs)("p",{className:"cl_hl_H8_M text-hilo-muted-foreground text-center",children:["ç»å½å³ä»£è¡¨åæ"," ",(0,n.jsx)("a",{href:z,target:"_blank",rel:"noopener noreferrer",className:"text-hilo-foreground hover:text-hilo-foreground underline",children:"ç¨æ·åè®®"})," ","ä¸"," ",(0,n.jsx)("a",{href:Z,target:"_blank",rel:"noopener noreferrer",className:"text-hilo-foreground hover:text-hilo-foreground underline",children:"éç§æ¿ç"})]})]})]})]})}),(0,n.jsxs)("p",{className:"cl_hl_H8_M text-hilo-muted-foreground absolute bottom-8 left-0 right-0 text-center",children:["*å½åè´¦å·ä¸",(0,n.jsx)("a",{href:"/",target:"_blank",rel:"noopener noreferrer",className:"text-hilo-foreground hover:text-hilo-foreground underline",children:"æµ·èºAI"}),"æé"]}),(0,n.jsx)(h.Z,{form:t,checked:r,setChecked:p,onClose:()=>{e((0,d.SQ)(!1)),t.setFieldValue("phone",""),t.setFieldValue("code",""),p(!1)},onFinish:e=>{let{phone:n,code:l}=t.getFieldsValue();if(n&&l){if(!r){s.Z.warn("请å
å¾éå¹¶åæç¨æ·åè®®ä¸éç§æ¿ç");return}I({phone:n,code:l,loginType:e})}},openAppealModal:()=>{a.Z.confirm({title:"è´¦æ·ç¶æå¼å¸¸",icon:null,width:280,className:"appeal-modal",content:"æ¨çè´¦æ·å¯è½è¿åäºç¨æ·åè®®ï¼è¢«æå访é®ï¼å¦æçé®è¯·è¿è¡ç³è¯",cancelText:"åæ¶",okText:"ç³è¯",onOk:async()=>{try{await (0,u.CO)(t.getFieldValue("phone")),s.Z.success("å·²ç»æäº¤ç³è¯ï¼è¯·èå¿çå¾
")}catch(e){(0,c.k0)(e)&&s.Z.error(e.message)}}})}}),(0,n.jsx)(f.Z,{open:L,onConfirm:O,onCancel:H})]})}},4290:function(e,t,r){var n=r(88661),l=r(28733),o=r(71596),a=r(62148),i=r(33196),s=r(97194),c=r(39162);
1t.Z=function(e){let{countryCode:t,loginType:r=s.Ez.LOGINTYPEPHONE,onAppealNeeded:u}=e,d=(0,l.T)(),[h,f]=(0,n.useState)(0),[x,p]=(0,n.useState)(!1),m=(0,n.useRef)(!1),g=(0,n.useRef)(void 0);(0,n.useEffect)(()=>{if(h<=0){g.current&&(clearInterval(g.current),g.current=void 0);return}return g.current=window.setInterval(()=>{f(e=>e<=1?(g.current&&(clearInterval(g.current),g.current=void 0),0):e-1)},1e3),()=>{g.current&&(clearInterval(g.current),g.current=void 0)}},[h]);let _=(0,n.useCallback)(async(e,n)=>{try{let l={phone:e,countryCode:t,ticket:null==n?void 0:n.ticket,randStr:null==n?void 0:n.randStr},a=(0,i._n)();r===s.Ez.LOGINTYPETHIRDPART&&a&&(l.unionID=a),await (0,s.Hy)(l),p(!0),f(60),o.Z.success(d("toast_verification_code_sent"))}catch(e){(0,a.k0)(e)&&(1200036===e.code?null==u||u():o.Z.error(e.message)),p(!1),f(0)}finally{m.current=!1}},[t,r,u,d]),v=(0,n.useCallback)(async e=>{if(!x&&!m.current){if(m.current=!0,!e){o.Z.error(d("login_enter_phone_number")),m.current=!1;return}if(!(0,c.OH)(e,t)){o.Z.error(d("login_enter_valid_phone_number")),m.current=!1;return}try{let{needCaptcha:r,aid:n,aidEncrypted:l}=await (0,s.sJ)({phone:e,countryCode:t});if(!r){await _(e);return}try{new TencentCaptcha(n,t=>{if(2===t.ret){m.current=!1;return}0===t.ret&&!t.errorCode&&t.ticket&&t.randstr?_(e,{ticket:t.ticket,randStr:t.randstr}):_(e)},{aidEncrypted:l,userLanguage:navigator.language}).show()}catch(t){await _(e)}}catch(e){m.current=!1}}},[t,_,x,d]);return(0,n.useEffect)(()=>{0===h&&x&&p(!1)},[h,x]),{sendCode:v,countdown:h,sending:x}}}}]);
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.