PageSourceSearch

https://class101.net/_next/static/chunks/pages/[lang]/business/cha…/quiz/[quizId]-0c20f01318e54aca.js

js class101.net collected 2026-10-01 10:13:48 UTC 11,938 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[14563],{11834:(e,n,i)=>{"use strict";function t(e){return e.graphQLErrors.map(e=>{var n;return null==(n=e.extensions)?void 0:n.code})}i.d(n,{f:()=>t})},20248:(e,n,i)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/[lang]/business/challenge/[companySlug]/quiz/[quizId]",function(){return i(81509)}])},44226:(e,n,i)=>{"use strict";i.d(n,{S:()=>s});var t=i(4930),l=i(65162),r=i(47952),o=i(36607);let s=Object.assign((0,l.memo)(e=>{let{size:n=24,fill:i="onColor",linearGradient:l,testId:s="check-fill",...u}=e;return(0,t.jsx)(o.z,{viewBox:"0 0 24 24",size:n,fill:i,linearGradient:l,testId:s,...u,children:(0,t.jsx)(r.B.Path,{d:"M1.565 10.621a1 1 0 0 1 0-1.414l.142-.142a1 1 0 0 1 1.414 0L10 15.944 20.879 5.065a1 1 0 0 1 1.414 0l.141.142a1 1 0 0 1 0 1.414L10.707 18.348a1 1 0 0 1-1.414 0z"})})}),{iconType:"Fill"});s.displayName="CheckFill"},81509:(e,n,i)=>{"use strict";i.r(n),i.d(n,{default:()=>ee});var t=i(4930),l=i(30483),r=i(71242),o=i(54991),s=i(71188),u=i(71646),d=i(30448),a=i(86739),c=i(56392),h=i(78975),x=i(23725),p=i(65162);function f(){let e=(0,a._)(["\n    fragment QuizAnswerResultOnQuizSolve on QuizAnswerResult {\n  isCorrect\n  awardedPoint\n  totalPoint\n  correctChoiceNo\n  correctChoiceContent\n  explanation\n  progress {\n    total\n    completed\n    remaining\n  }\n}\n    "]);return f=function(){return e},e}function z(){let e=(0,a._)(["\n    query QuizOnQuizSolve($companySlug: ID!, $quizId: ID!) {\n  quiz(companySlug: $companySlug, quizId: $quizId) {\n    id\n    openAt\n    question\n    choices {\n      no\n      content\n    }\n    myResult {\n      isCorrect\n      selectedChoiceNo\n      explanation\n    }\n  }\n}\n    "]);return z=function(){return e},e}function g(){let e=(0,a._)(["\n    query QuizResultOnQuizSolve($companySlug: ID!, $quizId: ID!) {\n  quizResult(companySlug: $companySlug, quizId: $quizId) {\n    ...QuizAnswerResultOnQuizSolve\n  }\n}\n    ",""]);return g=function(){return e},e}function w(){let e=(0,a._)(["\n    mutation AnswerQuizOnQuizSolve($input: AnswerQuizInput!) {\n  answerQuiz(input: $input) {\n    ...QuizAnswerResultOnQuizSolve\n  }\n}\n    ",""]);return w=function(){return e},e}let v={},m=(0,c.J1)(f()),b=(0,c.J1)(z());function j(e){let n={...v,...e},i=h.I(b,n);return p.useMemo(()=>{let{data:e,loading:n,error:t,called:l,refetch:r,fetchMore:o,...s}=i;return{quizData:null==e?void 0:e.quiz,isQuizLoading:n,quizError:t,isQuizCalled:l,refetchQuiz:r,fetchMoreQuiz:o,...s}},[i])}let C=(0,c.J1)(g(),m),y=(0,c.J1)(w(),m),Q=(0,s.o)(()=>{let{companySlug:e,quizId:n}=(0,d.g)(),{localizeDate:i}=(0,u.B)(),{quizData:t}=j({variables:{companySlug:e,quizId:n}});return{openDateLabel:t?i(new Date(t.openAt),{month:"long",day:"numeric"}):void 0}},e=>{let{openDateLabel:n}=e;
1return n?(0,t.jsx)(o.V,{defaultMessage:"{openDateLabel} 데일리 퀴즈",id:"mh4UsN3HmWwC",values:{openDateLabel:n}}):(0,t.jsx)(o.V,{defaultMessage:"데일리 퀴즈",id:"zpxyBYV7ry5e"})});var k=i(37886),M=i(27919),q=i(77519),_=i(61044),R=i(24419),S=i(16615),V=i(13248),I=i(58693);let T={default:{backgroundColor:"background",edgeColor:"neutralSoft"},correct:{backgroundColor:"blueMuted",edgeColor:"blueVibrant"},wrong:{backgroundColor:"redMuted",edgeColor:"redVibrant"}},O=(0,p.memo)(e=>{let{choices:n,isLocked:i,onChoiceClick:l}=e;return(0,t.jsx)(M.T,{width:"100%",gap:8,children:n.map(e=>{let{backgroundColor:n,edgeColor:r}=T[e.variant],o=(0,t.jsx)(V.t,{width:"100%",backgroundColor:r,rounded:"lg",pb:4,children:(0,t.jsx)(V.t,{width:"100%",backgroundColor:n,rounded:"lg",borderColor:r,borderStyle:"solid",borderWidth:2,p:18,children:(0,t.jsx)(_.n,{level:1,weight:"medium",color:"onView1",children:e.content})})});return i?(0,t.jsx)(M.T,{width:"100%",children:o},e.no):(0,t.jsx)(I.o,{"data-class101-target-id":"216dfd96c87d",width:"100%",onClick:()=>l(e.no),children:o},e.no)})})});var P=i(22712),E=i(26821),L=i(65168),D=i(15531),N=i(44226),A=i(99382);let W={colors:["transparent","background"],locations:[0,12],degree:180};function $(e){return(0,t.jsx)(V.t,{backgroundColor:e?"blueVibrant":"redVibrant",borderColor:e?"blueMuted":"redMuted",borderStyle:"solid",borderWidth:8,rounded:"full",p:10,position:"relative",zIndex:2,mb:-36,children:e?(0,t.jsx)(N.S,{size:36,fill:"onPrimary"}):(0,t.jsx)(A.S,{size:36,fill:"onPrimary"})})}function B(e,n,i){return(0,t.jsx)(L.a,{position:"absolute",top:i,left:0,right:0,zIndex:0,pointerEvents:"none",children:(0,t.jsx)(P.z,{width:"100%",alignHorizontal:"center",children:(0,t.jsx)(D._,{src:"/images/challenge/quiz-confetti.gif",alt:"",width:e,height:n,sizes:e,objectFit:"cover"})})})}function F(e,n,i){return(0,t.jsxs)(M.T,{width:"100%",gap:12,children:[(0,t.jsx)(S.h,{level:4,weight:"bold",color:e?"blueVibrant":"redVibrant",children:e?(0,t.jsx)(o.V,{defaultMessage:"정답이에요!",id:"o26AdoeozSTo"}):(0,t.jsx)(o.V,{defaultMessage:"오답이에요!",id:"0wwSyP7TuIYY"})}),(0,t.jsxs)(M.T,{width:"100%",gap:8,children:[e?null:(0,t.jsx)(_.n,{level:1,weight:"bold",color:"onView1",children:(0,t.jsx)(o.V,{defaultMessage:"정답: {correctChoiceContent}",id:"sZFaMbuke7OV",values:{correctChoiceContent:n}})}),i?(0,t.jsx)(_.n,{level:1,color:"onView1",children:i}):null]})]})}function H(e,n){return e?(0,t.jsx)(o.V,{defaultMessage:"+{awardedPoint, number} P 적립",id:"3h/lE5M+Wim/",values:{awardedPoint:n}}):(0,t.jsx)(o.V,{defaultMessage:"확인",id:"q2DcHj0lRoOP"})}let G=(0,p.memo)(e=>{let{visible:n,isJustAnswered:i,isCorrect:l,awardedPoint:r,correctChoiceContent:o,explanation:s,onConfirmClick:u}=e;return(0,t.jsxs)(L.a,{role:"status",position:"fixed",bottom:0,left:0,right:0,zIndex:100,display:n?"flex":"none",children:[(0,t.jsx)(L.a,{display:["flex","flex","none"],width:"100%",children:(0,t.jsxs)(M.T,{width:"100%",alignHorizontal:"center",position:"relative",children:[l?B(375,304,-173):null,$(l),(0,t.jsx)(V.t,{width:"100%",backgroundColor:l?"blueMuted":"redMuted",roundedTopLeft:"2xl",roundedTopRight:"2xl",position:"relative",zIndex:1,children:(0,t.jsxs)(M.T,{width:"100%",px:20,pt:24,pb:20,gap:20,children:[F(l,o,s),(0,t.jsx)(E.W,{"data-class101-target-id":"a9bf0a0a3d96",kind:"secondary",size:"xl",full:!0,onClick:u,children:H(i,r)})]})})]})}),(0,t.jsx)(L.a,{display:["none","none","flex"],width:"100%",children:(0,t.jsx)(V.t,{width:"100%",linearGradient:W,overflow:"visible",children:(0,t.jsxs)(M.T,{width:"100%",maxWidth:k.yj,mx:"auto",px:20,py:40,alignHorizontal:"center",position:"relative",children:[l?B(419,340,-155):null,$(l),(0,t.jsx)(V.t,{width:"100%",backgroundColor:l?"blueMuted":"redMuted",rounded:"2xl",position:"relative",zIndex:1,children:(0,t.jsxs)(P.z,{width:"100%",px:20,py:32,gap:20,alignVertical:"center",children:[(0,t.jsx)(M.T,{flex:1,children:F(l,o,s)}),(0,t.jsx)(E.W,{"data-class101-target-id":"71015641338a",kind:"secondary",size:"xl",onClick:u,children:H(i,r)})]})})]})})})]})});var J=i(37902),Y=i(11834),U=i(6259),X=i(41908),Z=i(35545);let K=(0,s.o)(()=>{var e,n,i,t,l,r;let{companySlug:o,quizId:s}=(0,d.g)(),{getUrl:a}=(0,J.h)(),{push:c,replace:f}=(0,X.W)(),{showToast:z}=(0,Z.hs)(),{localizeText:g}=(0,u.B)(),w=a(k.Sv,{companySlug:o}),{quizData:m,quizError:b}=j({variables:{companySlug:o,quizId:s}}),Q=null!=(e=null==m?void 0:m.myResult)?e:null,{quizResultData:M,quizResultError:q}=function(e){let n={...v,...e},i=h.I(C,n);return p.useMemo(()=>{let{data:e,loading:n,error:t,called:l,refetch:r,fetchMore:o,...s}=i;return{quizResultData:null==e?void 0:e.quizResult,isQuizResultLoading:n,quizResultError:t,isQuizResultCalled:l,refetchQuizResult:r,fetchMoreQuizResult:o,...s}},[i])}({variables:{companySlug:o,quizId:s},skip:!Q}),[_,{answerQuizData:R,isAnswerQuizLoading:S}]=function(e){let n={...v,...void 0},i=x.n(y,n);return p.useMemo(()=>{let{data:e,loading:n,error:t,called:l,...r}=i[1];return[i[0],{answerQuizData:null==e?void 0:e.answerQuiz,isAnswerQuizLoading:n,answerQuizError:t,isAnswerQuizCalled:l,...r}]},[i])}(),V=null!=b?b:q;(0,p.useEffect)(()=>
1{if(!V)return;let e=(0,Y.f)(V);e.includes("notOpen")||e.includes("notFound")?z({title:g({defaultMessage:"지금은 풀 수 없는 퀴즈예요.",id:"ONNMQaIRD3Wf"}),kind:"error"}):z({title:g({defaultMessage:"퀴즈를 불러오지 못했어요. 잠시 후 다시 시도해주세요.",id:"eh6zddOwriK2"}),kind:"error"}),f(w)},[V,w,g,f,z]);let I=(0,p.useCallback)(e=>{_({variables:{input:{companySlug:o,quizId:s,selectedChoiceNo:e}},update:(n,i)=>{let{data:t}=i,l=null==t?void 0:t.answerQuiz;if(!l)return;n.writeQuery({query:C,variables:{companySlug:o,quizId:s},data:{quizResult:l}}),n.modify({id:n.identify({__typename:"QuizDetail",id:s}),fields:{myResult:()=>{var n;return{__typename:"QuizMyResult",isCorrect:l.isCorrect,selectedChoiceNo:e,explanation:null!=(n=l.explanation)?n:null}}}}),n.modify({id:n.identify({__typename:"QuizView",id:s}),fields:{status:()=>l.isCorrect?U.Lr0.COMPLETED_CORRECT:U.Lr0.COMPLETED_WRONG}});let r=e=>e.includes('"'.concat(o,'"'));n.modify({fields:{quizzes:(e,n)=>{let{storeFieldName:i}=n;return r(i)?{...e,overview:{__typename:"QuizOverview",...l.progress}}:e},myGamificationStatus:(e,n)=>{let{storeFieldName:i}=n;return r(i)?{...e,totalPoint:l.totalPoint,quiz:{...e.quiz,completed:l.progress.completed}}:e}}})},onError:e=>{if((0,Y.f)(e).includes("alreadyAnswered")){z({title:g({defaultMessage:"이미 참여한 퀴즈예요.",id:"W+L64WNt1ni1"}),kind:"error"}),f(w);return}z({title:e.message,kind:"error"})}})},[_,o,s,w,g,f,z]),T=(0,p.useMemo)(()=>{var e;return(null!=(e=null==m?void 0:m.choices)?e:[]).map(e=>({no:e.no,content:e.content,variant:function(e,n){return n&&n.selectedChoiceNo===e?n.isCorrect?"correct":"wrong":"default"}(e.no,Q)}))},[m,Q]),O=null!=(n=null==M?void 0:M.awardedPoint)?n:0,P=(0,p.useCallback)(()=>{R&&z({title:g({defaultMessage:"+{point, number} P 적립됐어요.",id:"0FGWpGzyjUk/"},{point:O}),kind:"success"}),c(w)},[R,O,w,g,c,z]);return{hasQuiz:!!m,question:null!=(i=null==m?void 0:m.question)?i:"",choices:T,isChoiceLocked:!!Q||S,handleChoiceClick:I,isResultVisible:!!M,isJustAnswered:!!R,isCorrect:null!=(t=null==M?void 0:M.isCorrect)&&t,awardedPoint:O,correctChoiceContent:null!=(l=null==M?void 0:M.correctChoiceContent)?l:"",explanation:null!=(r=null==M?void 0:M.explanation)?r:void 0,handleConfirmClick:P}},e=>{let{hasQuiz:n,question:i,choices:l,isChoiceLocked:r,handleChoiceClick:s,isResultVisible:u,isJustAnswered:d,isCorrect:a,awardedPoint:c,correctChoiceContent:h,explanation:x,handleConfirmClick:p}=e;return n?(0,t.jsxs)(M.T,{px:[20,20,40],pt:40,pb:u?280:28,children:[(0,t.jsx)(_.n,{level:1,color:"onView3",children:(0,t.jsx)(o.V,{defaultMessage:"보기 중에서 정답을 고르세요",id:"Hvros2WBs5sV"})}),(0,t.jsx)(R.$,{height:8}),(0,t.jsx)(S.h,{level:5,weight:"bold",color:"onView1",children:i}),(0,t.jsx)(R.$,{height:20}),(0,t.jsx)(O,{choices:l,isLocked:r,onChoiceClick:s}),(0,t.jsx)(G,{visible:u,isJustAnswered:d,isCorrect:a,awardedPoint:c,correctChoiceContent:h,explanation:x,onConfirmClick:p})]}):(0,t.jsx)(M.T,{width:"100%",py:80,alignHorizontal:"center",children:(0,t.jsx)(q.y,{size:"md"})})}),ee=()=>{let{companySlug:e}=(0,l.Z)(),{getUrl:n}=(0,J.h)();return(0,t.jsx)(r.Q,{title:(0,t.jsx)(Q,{}),backHref:n(k.Sv,{companySlug:e}),children:(0,t.jsx)(K,{})})}},99382:(e,n,i)=>{"use strict";i.d(n,{S:()=>s});var t=i(4930),l=i(65162),r=i(47952),o=i(36607);let s=Object.assign((0,l.memo)(e=>{let{size:n=24,fill:i="onColor",linearGradient:l,testId:s="close-fill",...u}=e;return(0,t.jsx)(o.z,{viewBox:"0 0 24 24",size:n,fill:i,linearGradient:l,testId:s,...u,children:(0,t.jsx)(r.B.Path,{d:"m12 13.556-6.38 6.378a1 1 0 0 1-1.414 0l-.142-.141a1 1 0 0 1 0-1.414l6.379-6.38-6.379-6.378a1 1 0 0 1 0-1.414l.142-.142a1 1 0 0 1 1.414 0L12 10.444l6.379-6.379a1 1 0 0 1 1.414 0l.141.142a1 1 0 0 1 0 1.414L13.556 12l6.378 6.379a1 1 0 0 1 0 1.414l-.141.141a1 1 0 0 1-1.414 0z"})})}),{iconType:"Fill"});s.displayName="CloseFill"}},e=>{e.O(0,[71242,90636,46593,38792],()=>e(e.s=20248)),_N_E=e.O()}]);
2//# sourceMappingURL=[quizId]-0c20f01318e54aca.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.