1import{r as n,j as t}from"./vendor-react-CYOoHjOf.js";import{u as A,j as I}from"./vendor-redux-BXotTMQH.js";import{T as g,L as H,U as K,V as lt,K as ct,W as pt,N as dt,c as ut,i as mt,X as gt,h as ht,Y as xt,b as bt,Z as ft,o as St,_ as Pt,$ as Et,a0 as At,a1 as V,P as d,a2 as It,a3 as yt,a4 as X,a5 as y,a6 as Y,C as Ct,a7 as Tt,a8 as jt,v as Ft,E as wt,a9 as vt,aa as Rt,ab as Mt,ac as Dt,I as $t,ad as Lt,ae as kt}from"./index-NXCSpy0w.js";import{aH as Q,aR as Nt,aX as Bt,aY as _t,aS as Ut,aT as zt,aU as Wt,aV as C,aK as c,aI as D}from"./vendor-mui-A_M4pNO3.js";import{S as Ot,H as Gt}from"./HTMLContentsDisplay-BJfEUeJb.js";import{O as Ht}from"./OpgDetailPage-DxDfUVeJ.js";import{P as Vt}from"./PlanPurchaseDialog-Du43a7js.js";import{u as Xt}from"./usePutLastAccessContents-C1fqCmqV.js";import{C as Yt}from"./CustomMuiChip-L0C1e7hp.js";import"./vendor-lodash-Cp5T_Ztg.js";import"./vendor-axios-BLlBCaos.js";import"./vendor-auth-DXBuXNeD.js";import"./vendor-motion-CwbUqb9k.js";const $="ConfirmEmailDialog",m={noPlanPaper:`${$}-noPlanPaper`,dialogContent:`${$}-dialogContent`,dialogActions:`${$}-dialogActions`},Kt=Q(Nt)(({theme:e})=>({[`& .${m.noPlanPaper}`]:{width:"100%",maxWidth:490,margin:e.spacing(6)},[`& .${m.dialogContent}`]:{padding:e.spacing(0,6)},[`& .${m.dialogActions}`]:{gridGap:8,padding:e.spacing(4,6),"& > a":{padding:e.spacing(2,2.75),lineHeight:"26px",fontSize:"15px",letterSpacing:"0.46px",[e.breakpoints.down("sm")]:{width:"100%"}},"& > :not(:first-of-type)":{marginLeft:0,padding:e.spacing(2,5.5)},[e.breakpoints.down("sm")]:{flexDirection:"column-reverse"}}})),Qt=({open:e,onClose:r,urlPath:h})=>{const x=Bt(),b=_t(x.breakpoints.down("sm"));return t.jsxs(Kt,{fullWidth:!0,open:e,onClose:r,PaperProps:{className:m.noPlanPaper},children:[t.jsx(Ut,{children:t.jsx(g,{variant:"h6",fontSize:b?18:20,lineHeight:b?"24px":"32px",fontWeight:700,children:"ãå©ç¨ã®ã¢ã«ã¦ã³ãã«ã¯ãã¡ã¼ã«ã¢ãã¬ã¹ãç»é²ããã¦ããã¾ãã"})}),t.jsx(zt,{className:m.dialogContent,children:t.jsxs(g,{variant:"body1",color:"textSecondary",children:["ã¡ã¼ã«ã¢ãã¬ã¹ã®ç»é²ããªãå ´åãå¿åããå
容ãå¾ã§ç¢ºèªãããã¨ãã§ãã¾ããã",t.jsx("br",{}),"ã¾ããã¡ã¼ã«ã§å½é¸éç¥ãè¡ããããªå ´åã«ã¯ãå½é¸éç¥ãåãåããã¨ãã§ãã¾ããã"]})}),t.jsxs(Wt,{className:m.dialogActions,children:[t.jsx(C,{color:"primary",variant:"text",component:H,to:K.APPLY.replace(/:urlPath/,h),children:"ãã®ã¾ã¾å¿å"}),t.jsx(C,{color:"primary",variant:"contained",component:H,to:lt.NEW_EMAIL,children:"ã¡ã¼ã«ã¢ãã¬ã¹ãç»é²ãã¦å¿å"})]})]})},Zt=n.memo(Qt),p="ApplicationFormScreen",s={wrapper:`${p}-wrapper`,img:`${p}-img`,icon:`${p}-icon`,desc:`${p}-desc`,btnGroup:`${p}-btnGroup`,note:`${p}-note`,...ct[p]},qt=e=>({[`& .${s.wrapper}`]:{width:"calc(100% - 48px)",margin:e.spacing(4,"auto",20),[e.breakpoints.up("sm")]:{width:"calc(100% - 96px)",marginBottom:e.spacing(40)},[e.breakpoints.up("md")]:{maxWidth:784},[e.breakpoints.up("lg")]:{maxWidth:768}},[`& .${s.img}`]:{width:"100%",margin:"auto",[e.breakpoints.up("md")]:{maxWidth:784},[e.breakpoints.up("lg")]:{maxWidth:768}},[`& .${s.icon}`]:{width:15,height:12,marginLeft:"6px !important",marginRight:"-6px !important"},[`& .${s.desc}`]:{marginBottom:e.spacing(40),[e.breakpoints.up("sm")]:{marginBottom:e.spacing(10)},"& img":{maxWidth:"100%",height:"auto"},"& blockquote":{marginLeft:e.spacing(6),paddingLeft:e.spacing(4),borderLeft:"2px solid #ccc"}},[`& .${s.btnGroup}`]:{position:"fixed",bottom:0,left:0,right:0,zIndex:1,boxShadow:e.shadows[24],borderRadius:"16px 16px 0 0",background:e.palette.background.default,padding:e.spacing(6),[e.breakpoints.up("sm")]:{background:"unset",position:"static",boxShadow:"none",borderRadius:0,padding:0,marginBottom:e.spacing(10)}},[`& .${s.note}`]:{marginRight:e.spacing(2)}}),Jt=dt(qt,ut[p]),te=Q(pt)(({theme:e,...r})=>({...Jt(e,r)})),ee=()=>{const e=new URLSearchParams(window.location.search).get("preview");return{previewQuery:e,isPreviewMode:!!e}},ae={[d.PREPARED]:"åä»å",[d.RECEIVED]:"åä»çµäº",[d.RECEIVING]:"åä»ä¸"},xe=()=>{const e=mt(),{urlPath:r}=gt(),h=ht(),{loginWithRedirect:x}=n.useContext(xt),[b,Z]=n.useState(!0),[q,T]=n.useState(!1),[J,L]=n.useState(!1),[j,tt]=n.useState(null),[et,at]=n.useState(null),[f,k]=n.useState(null),{previewQuery:F,isPreviewMode:N}=ee(),it=n.useMemo(()=>f?.filter(i=>i.enabledFanclubBillingPlanSetting)||[],[f]),[a,B]=n.useState(null),{fanclubMemberId:S,signed:w,isFreeMember:_,isSuperUser:U}=bt(),v=A(i=>i.auth.fanclubMemberSetting),P=A(i=>i.app.fanclubSiteInfo),z=A(i=>i.app.appPath),W=A(i=>i.app.fanclubSiteUserInfo?.fanclubSite?.fanclubMember?.mailAddress);Xt(),n.useEffect(()=>{const i=F?`?preview=${F}`:"";e(ft({urlPath:`${r}${i}`,fanclubSiteId:St()})).then(I).then(o=>{B(o);const u=[];
1if(P){const{fanclubSiteId:R}=P;u.push(e(Pt({fanclubSiteId:R,formCode:o.applicationFormCode})).then(I).then(k).catch(()=>k(null))),S&&u.push(e(Et({fanclubMemberId:S.toString(),fanclubSiteId:R})).then(I).then(M=>{const O=M.fanclubSpecificProfile?.activeFanclubMembership?.fanclubBillingPlan,st=M.fanclubSpecificProfile?.activeFanclubMembership?.memberNo,rt=M.fanclubSpecificProfile?.activeFanclubMembership?.expireBufferingEndAt;O?tt(O):st&&rt&&e(At({fanclubSiteId:R,fanclubMemberId:S.toString()})).then(I).then(G=>{G&&at(G)})}))}return Promise.all(u)}).catch(()=>B(null)).finally(()=>Z(!1))},[e,r,P,S,F]);const{receptionStart:nt,receptionEnd:ot,receptionStatus:E}=n.useMemo(()=>{const i=a?V(a.receptionStart):null,o=a?.receptionEnd?V(a.receptionEnd):null;let u=d.RECEIVING;return o&&It(o)?u=d.RECEIVED:i&&yt(i)&&(u=d.PREPARED),{receptionStart:i&&X(i)||"",receptionEnd:o&&X(o)||"ç¡æé",receptionStatus:u}},[a]),l=n.useMemo(()=>{if(E===d.PREPARED)return{text:"åä»å",buttonText:"å¿åæç¶ãã¸",disable:!0};if(E===d.RECEIVED)return{text:w&&a?.haveApplicationFormAnswers?"å¿åæ¸ã¿":"åä»çµäº",buttonText:"å¿åæç¶ãã¸",disable:!0};if(!w||!v)return{text:"å¿åããã«ã¯ä¼å¡ç»é²ãã¦ãã ããã",disable:!1,buttonText:"å¿åæç¶ãã¸",handler:()=>{const o=a?.applicationFormAuthorizationType?.id;o&&(o===y.ALL_USERS?x({prompt:"login"}):T(!0))}};if(a?.haveApplicationFormAnswers)return{text:"å¿åæ¸ã¿",buttonText:"å¿åæç¶ãã¸",disable:!0};const i=_&&a?.applicationFormAuthorizationType?.id!==y.ALL_USERS;return!U&&!v.allPublishedContentsAccessible&&(i||a?.applicationFormAuthorizationType?.id===y.LIMITED_PLAN&&!f?.find(o=>o.id===j?.id))?{text:"å¿åããã«ã¯ä¼å¡ç»é²ãã¦ãã ããã",buttonText:"ä¼å¡ãã©ã³ãè³¼å
¥ãã¦å¿å",disable:!1,hideText:i,handler:()=>{a?.applicationFormAuthorizationType&&T(!0)}}:{text:t.jsxs(t.Fragment,{children:[t.jsx(Ct,{withFixedColor:!0,href:`${z||""}${Tt.STATIC_CONTENT}?content_type=${jt.APPLICATION_FORM_TERMS_OF_SERVICE}&application_form_code=${a?.applicationFormCode}`,target:"_blank",children:"å¿åè¦ç´"}),"ã«åæãã¦"]}),buttonText:"å¿åæç¶ãã¸",disable:a?.applicationFormStatusId!==Y.PUBLIC,handler:()=>{a?.applicationFormAuthorizationType&&a?.applicationFormStatusId===Y.PUBLIC&&(W?h.push(K.APPLY.replace(/:urlPath/,r)):L(!0))}}},[E,w,v,a?.haveApplicationFormAnswers,a?.applicationFormAuthorizationType,a?.applicationFormCode,a?.applicationFormStatusId,_,U,f,z,x,j?.id,W,h,r]);return b?t.jsx(Ft,{isFullScreen:!0}):a?t.jsxs(t.Fragment,{children:[t.jsx(Ot,{}),t.jsx(Ht,{image:a.thumbnailImageUrl,title:a.title,description:a.description||void 0,platformId:P?.platformId}),t.jsx(vt,{}),t.jsxs(te,{children:[t.jsx(c,{className:s.img,children:t.jsx(Rt,{src:a.thumbnailImageUrl,block:!0,aspectRatio:Mt.SIXTEEN_TO_NINE})}),t.jsxs(c,{className:s.wrapper,mt:4,children:[t.jsxs(c,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[t.jsx(Yt,{icon:t.jsx(Dt,{className:s.icon}),label:"ä¼å¡éå®",size:"small",color:"white",fontWeight:"fontWeightMedium",customColor:"gradient.main",style:{visibility:a.applicationFormAuthorizationType?.id===y.ALL_USERS?"hidden":"visible"}}),t.jsx($t,{breakpoints:"sm",breakDirection:"down",children:t.jsxs(c,{display:"flex",alignItems:"center",children:[!l.hideText&&t.jsx(D,{variant:"body2",className:s.note,children:l.text}),t.jsx(C,{variant:"contained",color:"primary",size:"large",disabled:l.disable||N||!a.applicationFormAuthorizationType,onClick:l.handler,children:l.buttonText})]})})]}),t.jsx(D,{sx:{wordBreak:"break-all"},variant:"h6",fontWeight:"fontWeightBold",children:a.title}),t.jsxs(c,{display:"flex",alignItems:"center",my:5,children:[t.jsx(c,{display:"flex",px:2.5,color:"secondary.darkText",children:t.jsx(Lt,{iconKey:"ScheduleIcon",color:"inherit"})}),t.jsxs(c,{children:[t.jsx(g,{fontSize:14,children:ae[E]}),t.jsxs(D,{variant:"caption",color:"textSecondary",children:["å仿éï¼",nt," ~ ",ot]})]})]}),a.description&&t.jsx(g,{variant:"body2",wordBreak:"break-all",className:s.desc,children:t.jsx(Gt,{content:a.description})}),t.jsxs(c,{className:s.btnGroup,children:[t.jsx(c,{mb:4,children:t.jsx(g,{variant:"body2",textAlign:"center",children:l.text})}),t.jsx(C,{variant:"contained",color:"primary",size:"large",fullWidth:!0,disabled:l.disable||N||!a.applicationFormAuthorizationType,onClick:l.handler,children:l.buttonText})]})]})]}),t.jsx(Vt,{open:q,onClose:()=>T(!1),availablePlans:it,userBillingPlan:j,userExpiredBilling:et,contentCode:r,contentType:kt.APPLICATION}),t.jsx(Zt,{open:J,onClose:()=>L(!1),urlPath:r})]}):t.jsx(wt,{notFound:!0})};export{xe 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.