1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3051],{41609:function(e,n,t){var o=t(280),r=t(64160),i=t(35694),s=t(1469),c=t(98612),a=t(44144),u=t(25726),d=t(36719),l=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(c(e)&&(s(e)||"string"==typeof e||"function"==typeof e.splice||a(e)||d(e)||i(e)))return!e.length;var n=r(e);if("[object Map]"==n||"[object Set]"==n)return!e.size;if(u(e))return!o(e).length;for(var t in e)if(l.call(e,t))return!1;return!0}},92550:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/class-material/math/commercial-books/[id]",function(){return t(62824)}])},37885:function(e,n,t){"use strict";t.d(n,{ZP:function(){return u}});var o=t(26042),r=t(69396),i=t(85893),s=t(41489),c=t(67294),a=t(76434);function u(e){var n=e.books,t=void 0===n?[]:n,s=e.selectedBookId,u=e.onSelectBook,f=e.getBookId,C=(0,c.useMemo)((function(){return t.map((function(e){var n=a.Z.CONST.DRAW_TEXTBOOK_TYPE_ARRAY["\uc218\ud559\uc30d\ub465\uc774\ubb38\uc81c\uc9d1"].includes(e.textbookTypeCd)?" AI \ub9de\ucda4\ucc98\ubc29 \ubb38\uc81c":"",t=n?"[".concat(e.dpNm,"]")+n:e.dpNm;return(0,r.Z)((0,o.Z)({},e),{textbookDpTitle:t})}))}),[t]),p=(0,c.useState)(!1),m=p[0],v=p[1],k=(0,c.useState)(),D=k[0],b=k[1],x=function(){v(!m)};return(0,c.useEffect)((function(){b(C.find((function(e){return f(e)===s}))||C[0])}),[C,f,s]),(0,c.useEffect)((function(){if(m){var e=document.querySelector(".contentGroup"),n=function(e){v(!1)},t=function(e){v(!1)};return document.addEventListener("click",n),e.addEventListener("mouseleave",t),function(){document.removeEventListener("click",n),e.removeEventListener("mouseleave",t)}}}),[m]),(0,i.jsxs)("div",{className:"materialDropDown".concat(m?" active":""),style:{zIndex:11},children:[(0,i.jsx)(d,{title:null===D||void 0===D?void 0:D.textbookDpTitle,onActive:x}),m&&(0,i.jsx)(l,{books:C,selectedBookId:s,onSelectBook:function(e){u(e),v(!1)},onActive:x})]})}function d(e){var n=e.title,t=e.onActive;return(0,i.jsx)("button",{type:"button",className:"materialDropDownTitle",onClick:t,children:(0,i.jsx)("span",{children:n})})}function l(e){var n=e.books,t=e.selectedBookId,r=e.onSelectBook,c=e.onActive;return(0,i.jsx)("div",{className:"materialDropDownCont",children:(0,i.jsx)(s.E,{className:"scrollBox customScroll",children:(0,i.jsx)("ul",{className:"materialDropDownlist",children:n.map((function(e){return(0,i.jsx)("li",{children:(0,i.jsx)("button",{type:"button",className:"materialDropDownBtnBox",style:(0,o.Z)({},t===e.dpDetailId?{color:"#1f78ff"}:{}),onClick:function(){r(e),c()},children:(0,i.jsx)("span",{children:e.textbookDpTitle})})},e.dpDetailId)}))})})})}},75371:function(e,n,t){"use strict";t.d(n,{Z:function(){return c}});var o=t(26042),r=t(69396),i=t(67294),s=t(70787);function c(e){var n=e.subjectCd,t=e.courseCd,c=e.gradeCd,a=e.semesterCd,u=e.dpScreenTypeCd,d=void 0===u?"CD13419":u,l=(0,s.w6c)({courseCd:t,gradeCd:c,semesterCd:a,subjectCd:n,dpScreenTypeCd:d,dpTypeCd:"CD13201"},"CD10012"!==c&&"CD10013"!==c),f=l.data,C=l.isLoading,p=(0,i.useMemo)((function(){return null===f||void 0===f?void 0:f.list.filter((function(e){return"Y"===e.dpYn&&"CD11535"===e.textbookTypeGroupCd}))}),[f]),m=(0,i.useMemo)((function(){return C||!p}),[C,p]),v=(0,i.useMemo)((function(){return p||[]}),[p]),k=(0,i.useCallback)((function(e){if(![v,n,t,c,a].some((function(e){return!e}))){var i,s=v.find((function(n){return(n.textbookId||n.dpDetailId)===e}));if(v&&!(v.length<1))return(0,r.Z)((0,o.Z)({},s?(0,o.Z)({},s):(0,o.Z)({},null!==(i=v[1])&&void 0!==i?i:v[0])),{courseCd:t,gradeCd:c,semesterCd:a,subjectCd:n})}}),[v,n,t,c,a]);return{commercialBooks:v,isPageLoading:m,getCommercialBookById:k}}},62824:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return h}});var o=t(85893),r=t(67294),i=t(11163),s=t(95853),c=t(52122),a=t(59982),u=t(37885),d=a.tt.reverse();function l(e){var n=e.isDisplayRevisionYear,t=e.dpScreenTypeCd,s=e.books,c=e.onSelectBook,a=e.onDpScreenTypeCdClick,l=(0,i.useRouter)().query.id,f=(0,r.useCallback)((function(e){return e.textId||e.textbookId||e.dpDetailId||e.classMaterialsId}),[]),C=(0,r.useState)(),p=C[0],m=C[1],v=(0,r.useCallback)((function(e){c&&c(e),m(f(e))}),[c,f]);return(0,r.useEffect)((function(){if(Array.isArray(s)&&!(s.length<1)){var e,n=null!==(e=s[1])&&void 0!==e?e:s[0],t=l&&s.find((function(e){return l===f(e)}
1))||n;m(f(t))}}),[s,l,f]),(0,o.jsxs)("div",{className:"sectionBox boxTextbookFilter",style:{backgroundColor:"unset",padding:"unset"},children:[n&&(0,o.jsx)("div",{className:"tabRoundBox typeBookClassification",children:(0,o.jsx)("div",{className:"tabBox",children:(0,o.jsx)("ul",{className:"tabBtns",children:d.map((function(e){return(0,o.jsx)("li",{className:e.dpScreenTypeCd===t?"on":"",children:(0,o.jsx)("button",{type:"button",className:"tabBtn",onClick:function(){return n=e.dpScreenTypeCd,void(a&&a(n));var n},children:(0,o.jsx)("span",{children:e.title+" \uac1c\uc815"})})},e.id)}))})})}),p&&(0,o.jsx)(u.ZP,{books:s,selectedBookId:p,onSelectBook:v,getBookId:f})]})}var f=r.memo(l),C=t(60524),p=t(79558),m=t(32296),v=t(48207),k=t(64194),D=t(75371),b=t(60758),x=t(69480);var h=(0,c.Z)(s.Z,{guide:{contents:["\ud559\uc0dd\uc5d0\uac8c \uc628\ub77c\uc778 \uacfc\uc81c \uc804\uc1a1 \uc2dc, \uc790\ub3d9 \ucc44\uc810 \ubc0f \ubb34\uc81c\ud55c \uc624\ub2f5 \ucc98\ubc29\uc774 \uc81c\uacf5\ub429\ub2c8\ub2e4."],buttons:{onTheRightSide:[p.Z]},hasCatsTag:!0}})((function(e){var n,t=e.session,s=e.selectedClassSubject,c=e.selectedCurriculum,a=e.selectedGrade,u=e.selectedSemester,d=(0,r.useMemo)((function(){var e="CD10006"===s,n="CD10009"===c&&["CD10014","CD10015","CD10016","CD10017"].includes(a)&&["CD10029","CD10030","CD10031","CD10032","CD10033","CD10034","CD10035","CD10036"].includes(u),t="CD10010"===c&&["CD10018","CD10019"].includes(a)&&["CD10037","CD10038","CD10039","CD10040"].includes(u);return!(!e||!n&&!t)}),[s,c,a,u]);(0,x.Z)(b.fm.MATH);var l=(0,i.useRouter)(),p=(0,r.useState)(),h=p[0],y=p[1],g=(0,v.Z)(),B=g.hasLoggedIn,j=g.openNonLoginUserConfirmModal,T=(0,m.ZP)(),S=T.hasPermissionOfClassMaterials,I=T.openHasNotPermissionsUserConfirmModal,N=(0,D.Z)({subjectCd:s,courseCd:c,gradeCd:a,semesterCd:u,dpScreenTypeCd:h}),w=N.commercialBooks,Z=N.isPageLoading,E=N.getCommercialBookById,_=(0,k.Z)(w,null===(n=l.query)||void 0===n?void 0:n.id),M=_.selectedBookIndex,P=_.changeBook,A=(0,r.useMemo)((function(){var e;return E(null===(e=l.query)||void 0===e?void 0:e.id)}),[l,E]),L=(0,r.useCallback)((function(e){if(B)if(S(s)){var n=new URLSearchParams({isMarketTextbook:"Y",revisionYear:e.revisionYear,detailTextId:e.textbookId||e.dpDetailId});window.open("".concat(window.location.origin,"/textbook-previewer?").concat(n.toString()),"_blank")}else I();else j()}),[B,s,j,S,I]);return(0,r.useEffect)((function(){y(d?"CD15151":"CD13419")}),[d]),(0,r.useEffect)((function(){"/"===l.asPath&&l.push("/class-material/math/commercial-books/details",void 0,{shallow:!0})}),[l]),Z||w.length<1?null:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(f,{isDisplayRevisionYear:d,dpScreenTypeCd:h,books:w,onSelectBook:P,onDpScreenTypeCdClick:function(e){l.replace({pathname:"/class-material/math/commercial-books/details/",query:{courseCd:c,gradeCd:a,semesterCd:u}}),y(e)}}),A&&(0,o.jsx)(C.Z,{dpScreenTypeCd:h,session:t,book:A,selectedBookIndex:M,openTextbookViewer:L})]})}))}},function(e){e.O(0,[9412,5675,935,5454,1013,5853,2005,7005,451,905,2044,8274,9558,9480,6577,9774,2888,179],(function(){return n=92550,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
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.