PageSourceSearch

https://fem.encar.com/assets/JoinMarketingTermPage-C5YK1Bgi.js

js encar.com collected 2026-09-24 10:22:51 UTC 5,421 bytes, 2 lines download raw bytes

1import{j as e,T as V,r as a,d as w}from"./vendor-DwqyO6tt.js";import{s as B,U as P,cK as v,w as S,H as Y}from"./shared-common-B8pQ-JOC.js";import{T as D,B as J,L as q,M as H,c as U}from"./shared-pkg-design-BeKqofsw.js";import{a as C,b as p,u as $,D as R,ig as k,c_ as Z,ih as W,q as z}from"./app-DdpwV99Z.js";import"./shared-uuid-CtRu48qb.js";import"./shared-react-dom-CmklxwTn.js";import"./shared-lodash-BnL5DpsI.js";import"./shared-body-scroll-lock-8S235wFy.js";import"./shared-react-tooltip-lite-0SXEhCzN.js";const Q="PxMUEt2c-O",X="-DriZzD1tG",ee="s6ktWVN61-",se="LVG5TYdPQC",te="JZusJvJ6gq",ae="-PA4ZGtj8b",ne={pc:Q,mobile:X,title:ee,desc:se,btn_later:te,submit_btn:ae},m=V.bind(ne);function oe({handleTermsAgree:c,handleSubmit:i,handleLater:o,checkAll:l,handleCheckAll:N,termsAgree:E}){const I=C();return e.jsxs("div",{className:m(I().isPc?"pc":"mobile"),children:[e.jsxs("h3",{className:m("title"),children:["놓치고 있는",e.jsx("br",{}),"맞춤 혜택이 있어요!"]}),e.jsx("p",{className:m("desc"),children:"아직 마케팅 약관 동의를 하지 않으셨어요."}),e.jsx(D.V2,{allCheckLabel:"마케팅 정보 수신 및 활용 동의",descText:"동의를 거부할 수 있습니다. 단, 미동의시 엔카가 제공하는 혜택 알림을 받으실 수 없습니다.",onChange:c,customAction:{checkAll:l,handleCheckAll:()=>{N()},originTerms:E},termsList:[{name:"MARKETING_COLLECTION_INFORMATION",label:"마케팅 목적의 개인정보 수집 및 이용",link:`${window.location.origin}/policy/marketing`,target:"_blank",isRequired:!1},{name:"MARKETING_RECEIVE_INFORMATION",label:"광고성 정보 수신 동의",link:`${window.location.origin}/policy/marketing`,target:"_blank",isRequired:!1},{name:"MARKETING_NONMEMBER",label:"비회원 수집 데이터 활용 동의",link:`${window.location.origin}/policy/marketing`,target:"_blank",isRequired:!1}]}),e.jsxs(B,{children:[e.jsx(J.V2,{domType:"button",color:"primary",className:I().isPc&&m("submit_btn"),onClick:i,children:"동의"}),e.jsx("button",{type:"button",className:m("btn_later"),onClick:o,children:"3일간 보지 않기"})]})]})}function re({handleClose:c}){const i=C(),{setCookie:o}=p(),{userInfo:l}=P(),[N,E]=a.useState(!1),[I,h]=a.useState(!0),[u,f]=a.useState(!1),[T,b]=a.useState(!1),[x,j]=a.useState(""),[t,g]=a.useState({MARKETING_COLLECTION_INFORMATION:!1,MARKETING_RECEIVE_INFORMATION:!1,MARKETING_NONMEMBER:!1}),{MARKETING_COLLECTION_INFORMATION:d,MARKETING_RECEIVE_INFORMATION:A,MARKETING_NONMEMBER:O}=t,{enloggingJsonData:_}=$(),{isPopup:G}=v(),K=s=>{if(s.name==="MARKETING_COLLECTION_INFORMATION"){g(n=>({...n,MARKETING_COLLECTION_INFORMATION:s.checked,MARKETING_RECEIVE_INFORMATION:s.checked}));return}s.name==="MARKETING_RECEIVE_INFORMATION"&&s.checked&&g(n=>({...n,MARKETING_COLLECTION_INFORMATION:s.checked,MARKETING_RECEIVE_INFORMATION:s.checked})),g(n=>({...n,[s.name]:s.checked}))},L=()=>{i().isApp?Z().goMarketingAgreePopup():(o("marketing_terms_close","true",3),G?window.close():window.history.back())},F=()=>{g(s=>Object.keys(s).reduce((n,M)=>({...n,[M]:!N}),{})),E(!N)},y=async()=>{const s={agreements:Object.keys(t).map(r=>({agreementType:r,agreed:t[r]})),terms:{sms:t.MARKETING_RECEIVE_INFORMATION,email:t.MARKETING_RECEIVE_INFORMATION,appPush:t.MARKETING_RECEIVE_INFORMATION}},n=Object.values({MARKETING_COLLECTION_INFORMATION:d,MARKETING_RECEIVE_INFORMATION:A,MARKETING_NONMEMBER:O}).some(Boolean);f(n),o("marketing_terms_click","true");try{await W(s);const{data:r}=await k(l?.id);j(r.terms[0].agreedAt),b(!0)}catch(r){console.log(r),z(r)}const M={eventType:"ACTION",eventName:"마케팅약관동의항목",param:{marketing_collection_use:t.MARKETING_COLLECTION_INFORMATION?"Y":"N",marketing_recieve_information:t.MARKETING_RECEIVE_INFORMATION?"Y":"N",marketing_nonmember:t.MARKETING_NONMEMBER?"Y":"N"}};_({dataTalkCustom:M})};return a.useEffect(()=>{if(!l?.id){R();return}(async()=>{try{const{data:s}=await k(l?.id);if(s.hasMarketingV2){R();return}h(!1)}catch(s){console.log(s)}})()},[l]),a.useEffect(()=>{T&&_({dataTalkViewSingle:{eventtype:"VIEW",eventnamegroup:`마케팅약관${u?"동의":"미동의"}`}})},[_,u,T]),a.useEffect(()=>{const s=Object.values({MARKETING_COLLECTION_INFORMATION:d,MARKETING_RECEIVE_INFORMATION:A,MARKETING_NONMEMBER:O}).every(Boolean);E(s)},[d,O,A]),I?e.jsx(q,{}):e.jsxs(e.Fragment,{children:[e.jsx(oe,{handleTermsAgree:K,handleSubmit:y,handleLater:L,checkAll:N,handleCheckAll:F,termsAgree:t}),e.jsx(H,{isOpen:T,title:e.jsxs(e.Fragment,{children:["마케팅 정보 수신 및 활용 동의에",e.jsx("br",{}),u?"동의":"미동의","하셨습니다."]}),subtitle:e.jsxs(e.Fragment,{children:["수신",u?" 동의":" 미동의",": ",w(x).format("YYYY년 MM월 DD일 HH:mm:ss"),e.jsx("br",{}),"* 수신 동의는 마이페이지 > 회원 정보 관리",e.jsx("br",{}),"페이지에서 수정하실 수 있습니다."]}),hasCloseBtn:!1,dimClosable:!1,okText:"확인",onClickOk:c,useCloseBtn:!0})]})}function Te(){const{handleCheckPrevPageClose:c}=U(),{setCookie:i}=p(),o=()=>{c()};return a.useEffect(()=>{i("marketing_terms_view","true",0,0,30)},[i]),e.jsxs(S,{title:"",checkAuth:!0,usePc:!0,htmlClass:"height_full",useCloseBtn:"left",onClose:o,enlogConfig:{dataTalkView:{screenname:"마케팅약관동의확인"}},children:[e.jsx(Y,{headTitle:"마케팅약관동의"}),e.jsx(re,{handleClose:o})]})}export{Te as default};
2//# sourceMappingURL=JoinMarketingTermPage-C5YK1Bgi.js.map

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.