1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2003],{39727:function(e,t,r){"use strict";r.d(t,{o:function(){return o}});var n=r(66536);function o(e){return void 0===e&&(e={}),function(t,r){n.m.addExcludeMetadata({target:t instanceof Function?t:t.constructor,propertyName:r,options:e})}}},59594:function(e,t,r){"use strict";r.d(t,{W:function(){return i}});var n=r(94184),o=r.n(n),a=r(85893);function i(e){var t=e.children,r=e.className;return(0,a.jsx)("div",{className:o()("max-w-[1166px] w-full flex-1 mx-auto desktop-tablet:py-[20px] tablet:px-[15px] mobile:pt-[20px] mobile:pb-[30px]",r),children:t})}},75118:function(e,t,r){"use strict";r.d(t,{Z:function(){return f}});var n=r(59499),o=r(4730),a=(r(67294),r(94184)),i=r.n(a),c=r(85893),s=["checked","disabled"];function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var p,f=(p=function(e){var t=e.checked,r=e.disabled,n=void 0!==r&&r,a=(0,o.Z)(e,s);return(0,c.jsx)("label",{className:"cursor-pointer",children:(0,c.jsxs)("div",{className:i()("toggle-switch relative",{"cursor-no-drop opacity-40":n}),children:[(0,c.jsx)("input",l({type:"checkbox",checked:t,disabled:n,className:"sr-only"},a)),(0,c.jsx)("div",{className:i()("block w-11 h-6 rounded-3xl",{"bg-primary":t,"bg-gray-3 dark:bg-dark-10":!t})}),(0,c.jsx)("div",{className:"dot absolute left-[2px] top-[2px] bg-white dark:bg-white-2 w-5 h-5 rounded-full transition"})]})})},function(e){return(0,c.jsx)(p,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e))})},60909:function(e,t,r){"use strict";r.d(t,{Y:function(){return i}});var n=r(67294);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}var a=function(e){return n.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),n.createElement("g",{"data-name":"Group 23243"},n.createElement("path",{style:{fill:"transparent"},d:"M0 0h24v24H0z"}),n.createElement("path",{"data-name":"Path 2604",d:"M11.833 7 6 12.6m0 0 5.833 5.6M6 12.6h14",transform:"translate(-1.334 -1)",style:{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2}})))},i=(0,r(27449).J)(a)},21090:function(e,t,r){"use strict";r.d(t,{d:function(){return i}});var n=r(67294);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}var a=function(e){return n.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},e),n.createElement("path",{transform:"translate(.001)",style:{fill:"transparent"},d:"M0 0h20v20H0z"}),n.createElement("path",{"data-name":"Path 17713",d:"m10.645 4.392 2.21 2.208m-1.273-3.144a1.561 1.561 0 0 1 2.21 2.206L5.188 14.25H3v-2.228z",transform:"translate(1.376 1.375)",style:{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5px"}}))},i=(0,r(27449).J)(a)},67027:function(e,t,r){"use strict";r.d(t,{O:function(){return i}});var n=r(67294);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
1for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},o.apply(this,arguments)}var a=function(e){return n.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},e),n.createElement("g",{"data-name":"Group 24254"},n.createElement("path",{"data-name":"Path 17918",d:"M4 6h16M4 12h16M4 18h16",transform:"translate(.5 .5)",style:{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,fill:"none"}}),n.createElement("path",{"data-name":"Rectangle 20266",style:{fill:"none"},d:"M0 0h24v24H0z"})))},i=(0,r(27449).J)(a)},1158:function(e,t,r){"use strict";r.d(t,{B:function(){return i}});var n=r(94184),o=r.n(n),a=r(85893);function i(e){var t=e.className;return(0,a.jsxs)("section",{className:o()("card p-[30px] mobile:p-0 animate-pulse dark:border-purple",t),children:[(0,a.jsxs)("div",{className:"desktop-tablet:flex w-full space-x-[30px] mobile:sapce-x-0",children:[(0,a.jsx)("div",{className:"w-[372px] mobile:w-full h-[533px] bg-gray dark:bg-dark-9 rounded-[8px]"}),(0,a.jsxs)("div",{className:"desktop:flex-1 mobile:p-5",children:[(0,a.jsx)("div",{className:"w-[80%] h-[16px] bg-gray dark:bg-dark-9"}),(0,a.jsxs)("div",{className:"flex items-center mt-[20px]",children:[(0,a.jsx)("div",{className:"bg-gray dark:bg-dark-9 w-[40px] h-[40px] rounded-full"}),(0,a.jsx)("div",{className:"w-[100px] h-[12px] bg-gray dark:bg-dark-9 ml-[10px]"})]}),(0,a.jsx)("div",{className:"w-full h-[12px] bg-gray dark:bg-dark-9 mt-[20px]"}),(0,a.jsx)("div",{className:"w-[60%] h-[12px] bg-gray dark:bg-dark-9 mt-[10px]"}),(0,a.jsx)("div",{className:"grid grid-cols-3 mobile:grid-cols-2 gap-x-[50px] gap-y-[20px] mt-[80px] mobile:mt-[20px]",children:Array.from({length:3}).map((function(e,t){return(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"w-[100px] h-[10px] bg-gray dark:bg-dark-9"}),(0,a.jsx)("div",{className:"h-[12px] bg-gray dark:bg-dark-9 mt-1.5",style:{width:"".concat(80*Math.random()+20,"%")}})]},"info-".concat(t))}))}),(0,a.jsx)("div",{className:"flex mt-[40px] space-x-[20px] divide-x divide-gray dark:divide-purple",children:Array.from({length:4}).map((function(e,t){return(0,a.jsx)("div",{className:"flex items-center h-[20px]",children:(0,a.jsx)("div",{className:o()("w-[100px] h-[14px] bg-gray dark:bg-dark-9 mobile:max-w-[50px]",{"ml-[20px]":t>0}),style:{width:60*Math.random()+60}})},"count-".concat(t))}))}),(0,a.jsx)("div",{className:"flex border-b border-gray dark:border-purple my-10 mobile:my-5"}),(0,a.jsx)("div",{className:"flex flex-row items-center justify-start space-x-[40px]",children:Array.from({length:3}).map((function(e,t){return(0,a.jsx)("div",{className:"w-[80px] h-[14px] bg-gray dark:bg-dark-9"},t)}))}),(0,a.jsx)("div",{className:"desktop:hidden flex border-b border-gray dark:border-purple my-10"})]})]}),(0,a.jsxs)("div",{className:"w-full mobile:flex justify-center ",children:[(0,a.jsx)("hr",{className:"bg-gray dark:bg-dark-9 h-[1px] my-8 border-0"}),(0,a.jsx)("div",{className:"flex justify-center mobile:justify-start flex-wrap mobile:flex-nowrap overflow-x-scroll scrollbar-none scrollbar-none::-webkit-scrollbar space-x-[10px]",children:Array.from({length:5}).map((function(e,t){return(0,a.jsx)("div",{className:"bg-gray dark:bg-dark-9 px-[10px] py-[4px] rounded-[8px] h-[30px]",style:{width:80*Math.random()+20}},"tag-".concat(t))}))})]})]})}},90669:function(e,t,r){"use strict";r.d(t,{FR:function(){return p},rB:function(){return f}});var n=r(50029),o=r(87794),a=r.n(o),i=r(67294),c=r(88767),s=r(15099),u=r(80841),l=r(85893),d=(0,i.createContext)({data:void 0,charactersData:void 0,isLoading:!1,isCharactersLoading:!1,refetchStory:function(){var e=(0,n.Z)(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),refetchCharacters:function(){var e=(0,n.Z)(a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),bookId:0});function p(e){var t=e.children,r=e.bookId,n=(0,s.useAuthentication)().isAuthenticated,o=(0,u.Y)(),a=o.getStoryDetail,i=o.getCharacters,p=(0,c.useQuery)(["story-detail",r],(function(){return a(r)}),{enabled:!!r&&n}),f=p.data,x=p.isLoading,h=p.refetch,b=(0,c.useQuery)(["characters",r],(function(){return i(r)}),{enabled:!!r&&n}),m={data:f,charactersData:b.data,isLoading:x,isCharactersLoading:b.isLoading,refetchStory:h,refetchCharacters:b.refetch,bookId:r};return(0,l.jsx)(d.Provider,{value:m,children:t})}function f(){return(0,i.useContext)(d)}},96926:function(e,t,r){"use strict";r.d(t,{TJ:function(){return l},Vf:function(){return d},xN:function(){return u}});var n=r(59499),o=r(67294),a=r(49939),i=r(85893);function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?c(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var u=function(){var e=(0,o.useRef)(null),t=(0,o.useState)(!1),r=t[0],n=t[1];return(0,o.useEffect)((function(){function t(t){e.current&&!e.current.contains(t.target)&&r&&n(!1)}return document.addEventListener("click",t),function(){document.removeEventListener("click",t)}}),[r]),{dropdownRef:e,isShowDropdown:r,toggleDropdown:function(){n((function(e){return!e}))}}},l=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=(0,o.useRef)(null),r=(0,o.useState)(e),n=r[0],a=r[1],i=function(){a(!n)};return(0,o.useEffect)((function(){var e=function(e){t.current&&!t.current.contains(e.target)&&a(!1)};return n&&window.addEventListener("click",e),function(){window.removeEventListener("click",e)}}),[n]),{dropdownRef:t,isShowDropdown:n,toggleDropdown:i}},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.initialDefaultOpen,r=void 0!==t&&t,n=e.placement,c=void 0===n?"left":n,u=e.autoDropdownWidth,l=void 0!==u&&u,d=e.onScrollHidden,p=void 0!==d&&d,f=(0,a.v)(),x=f.Portal,h=f.portalRef,b=f.targetRef,m=(0,o.useState)(r),g=m[0],v=m[1],y=function(e){!b.current&&e.currentTarget&&e.currentTarget!==document&&(b.current=e.currentTarget),v((function(e){return!e}))},w=function(){v(!1)},j=function(){var e=h.current.style.position,t=h.current,r=t.clientWidth,n=t.clientHeight,o=b.current,a=o.getBoundingClientRect(),i=a.top,s=a.left,u=a.right,d=s,p=u-r,f=i+o.clientHeight;f="absolute"===e?f+window.scrollY:f;var x=window.innerWidth<s+r,m=p<0,g=window.innerHeight<i+n;x&&(d=window.innerWidth-(u-s+o.offsetWidth)-r),m&&(p=0),g&&(f=window.scrollY+(i-n)),h.current.style.top="".concat(f,"px"),h.current.style.left="".concat("left"===c?d:p,"px"),l&&(h.current.style.width="".concat(b.current.offsetWidth,"px"))};(0,o.useEffect)((function(){function e(){b.current&&h.current&&g&&!p?j():v(!1)}function t(e){b.current&&!b.current.contains(e.target)&&v(!1)}return g&&(j(),window.addEventListener("click",t)),window.addEventListener("scroll",e),window.addEventListener("resize",e),function(){window.removeEventListener("scroll",e),window.removeEventListener("click",t),window.removeEventListener("resize",e)}}),[g]);var k=(0,o.useCallback)((function(e){return(0,i.jsx)(x,s({},e))}),[x]);return{Dropdown:k,isShowDropdown:g,toggleDropdown:y,hideDropdown:w}}},72609:function(e,t,r){"use strict";var n;r.d(t,{w:function(){return n}}),function(e){e.PUBLISHED="PUBLISHED",e.DRAFT="DRAFT"}(n||(n={}))},47908:function(e,t,r){"use strict";r.d(t,{x:function(){return u}});var n=r(59499),o=r(67294),a=r(11163),i=r(15099),c=r(85893);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){return function(t){var r=(0,i.useAuthentication)(),u=r.isUserLoading,l=r.isAuthenticated,d=(0,a.useRouter)().push;return(0,o.useEffect)((function(){u||l||d("/")}),[u,l,d]),l?(0,c.jsx)(e,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t)):null}}},44019:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDomainLocale=function(e,t,r,n){return!1};("function"===typeof t.default||"object"===typeof t.default&&null!==t.default)&&"undefined"===typeof t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7942:function(e,t,r){"use strict";var n=r(85696);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;
1var o=r(92648).Z,a=r(17273).Z,i=o(r(67294)),c=r(64957),s=r(57995),u=r(30647),l=r(51992),d=r(90639),p=r(44019),f=r(70227),x="undefined"!==typeof i.default.useTransition,h={};function b(e,t,r,n){if(e&&c.isLocalURL(t)){e.prefetch(t,r,n).catch((function(e){0}));var o=n&&"undefined"!==typeof n.locale?n.locale:e&&e.locale;h[t+"%"+r+(o?"%"+o:"")]=!0}}var m=i.default.forwardRef((function(e,t){var r,o=e.href,m=e.as,g=e.children,v=e.prefetch,y=e.passHref,w=e.replace,j=e.soft,k=e.shallow,O=e.scroll,P=e.locale,N=e.onClick,E=e.onMouseEnter,L=e.onTouchStart,D=e.legacyBehavior,C=void 0===D?!0!==Boolean(!1):D,_=a(e,["href","as","children","prefetch","passHref","replace","soft","shallow","scroll","locale","onClick","onMouseEnter","onTouchStart","legacyBehavior"]);r=g,!C||"string"!==typeof r&&"number"!==typeof r||(r=i.default.createElement("a",null,r));var R=!1!==v,M=x?i.default.useTransition():[],S=n(M,2)[1],T=i.default.useContext(u.RouterContext),Z=i.default.useContext(l.AppRouterContext);Z&&(T=Z);var B,W=i.default.useMemo((function(){var e=c.resolveHref(T,o,!0),t=n(e,2),r=t[0],a=t[1];return{href:r,as:m?c.resolveHref(T,m):a||r}}),[T,o,m]),H=W.href,A=W.as,I=i.default.useRef(H),F=i.default.useRef(A);C&&(B=i.default.Children.only(r));var G=C?B&&"object"===typeof B&&B.ref:t,z=d.useIntersection({rootMargin:"200px"}),U=n(z,3),V=U[0],Q=U[1],Y=U[2],J=i.default.useCallback((function(e){F.current===A&&I.current===H||(Y(),F.current=A,I.current=H),V(e),G&&("function"===typeof G?G(e):"object"===typeof G&&(G.current=e))}),[A,G,H,Y,V]);i.default.useEffect((function(){var e=Q&&R&&c.isLocalURL(H),t="undefined"!==typeof P?P:T&&T.locale,r=h[H+"%"+A+(t?"%"+t:"")];e&&!r&&b(T,H,A,{locale:t})}),[A,H,Q,P,R,T]);var K={ref:J,onClick:function(e){C||"function"!==typeof N||N(e),C&&B.props&&"function"===typeof B.props.onClick&&B.props.onClick(e),e.defaultPrevented||function(e,t,r,n,o,a,i,s,u,l){if("A"!==e.currentTarget.nodeName.toUpperCase()||!function(e){var t=e.currentTarget.target;return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)&&c.isLocalURL(r)){e.preventDefault();var d=function(){"softPush"in t&&"softReplace"in t?t[a?o?"softReplace":"softPush":o?"replace":"push"](r):t[o?"replace":"push"](r,n,{shallow:i,locale:u,scroll:s})};l?l(d):d()}}(e,T,H,A,w,j,k,O,P,Z?S:void 0)},onMouseEnter:function(e){C||"function"!==typeof E||E(e),C&&B.props&&"function"===typeof B.props.onMouseEnter&&B.props.onMouseEnter(e),c.isLocalURL(H)&&b(T,H,A,{priority:!0})},onTouchStart:function(e){C||"function"!==typeof L||L(e),C&&B.props&&"function"===typeof B.props.onTouchStart&&B.props.onTouchStart(e),c.isLocalURL(H)&&b(T,H,A,{priority:!0})}};if(!C||y||"a"===B.type&&!("href"in B.props)){var X="undefined"!==typeof P?P:T&&T.locale,q=T&&T.isLocaleDomain&&p.getDomainLocale(A,X,T.locales,T.domainLocales);K.href=q||f.addBasePath(s.addLocale(A,X,T&&T.defaultLocale))}return C?i.default.cloneElement(B,K):i.default.createElement("a",Object.assign({},_,K),r)}));t.default=m,("function"===typeof t.default||"object"===typeof t.default&&null!==t.default)&&"undefined"===typeof t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},51992:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalLayoutRouterContext=t.LayoutRouterContext=t.AppRouterContext=void 0;var n=(0,r(92648).Z)(r(67294)),o=n.default.createContext(null);t.AppRouterContext=o;var a=n.default.createContext(null);t.LayoutRouterContext=a;var i=n.default.createContext(null);t.GlobalLayoutRouterContext=i},64051:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return z},default:function(){return U}});var n=r(5152),o=r.n(n),a=r(94184),i=r.n(a),c=r(11163),s=r(75118),u=r(96926),l=r(60909),d=r(21090),p=r(67027),f=r(85893);var x=r(59499),h=r(50029),b=r(87794),m=r.n(b),g=r(67294),v=r(88767),y=r(90669),w=r(83520),j=r(79122),k=r(72609);function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?O(Object(r),!0).forEach((function(t){(0,x.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var N,E=(N=function(e){var t=e.title,r=e.myWritingOptions,n=e.isEnded,o=e.handleFetchNextPage,a=e.handleManageWriting,x=e.handleEditWriting,h=e.handleManageChapter,b=e.handleToggleIsEnded,m=e.previousPage,g=(0,u.xN)(),v=g.dropdownRef,y=g.isShowDropdown,w=g.toggleDropdown,j=(0,c.useRouter)().push;return(0,f.jsx)(f.Fragment,{children:(0,f.jsxs)("section",{className:"flex sticky top-[60px] z-20 items-center bg-white dark:bg-dark-8 shadow-dropdown w-full desktop-tablet:px-[20px] py-[10px] mobile:flex-wrap mobile:justify-center",children:[(0,f.jsx)("button",{type:"button",className:"desktop:hidden border-[1px] mr-[20px] border-gray-3 dark:border-dark-10 w-[40px] h-[40px] p-[8px] bg-white dark:bg-dark-9 rounded-full",onClick:m,children:(0,f.jsx)(l.Y,{className:"w-[24px] h-[24px] text-secondary dark:text-dark-10"})}),(0,f.jsx)("button",{type:"button",className:"flex justify-center items-center my-[10px] mr-[20px] rounded-[20px] bg-primary dark:bg-purple shrink-0 w-[121px] h-[40px] mobile:w-[133px]",onClick:a,children:(0,f.jsx)("span",{className:"text-[14px] font-mitr font-medium text-white dark:text-white-2 whitespace-nowrap",children:"\u0e08\u0e31\u0e14\u0e01\u0e32\u0e23\u0e07\u0e32\u0e19\u0e40\u0e02\u0e35\u0e22\u0e19"})}),(0,f.jsxs)("div",{ref:v,className:"mobile:order-4 my-[10px] mr-[20px]",children:[(0,f.jsxs)("button",{className:i()("flex text-sm bg-gray-4 dark:bg-transparent dark:border dark:border-dark-10 text-secondary dark:text-dark-10 whitespace-nowrap items-center px-[20px] h-[40px] rounded-[20px] font-mitr font-medium"),type:"button",onClick:w,children:[(0,f.jsx)(p.O,{width:"24",height:"24",className:"mr-[10px]"}),"\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e40\u0e23\u0e37\u0e48\u0e2d\u0e07"]}),(0,f.jsx)("div",{className:i()("bg-white dark:bg-dark-9 border-gray-4 dark:border-purple max-h-[350px] overflow-y-auto fixed top-[120px] left-[160px] py-2.5 w-[269px] z-10 rounded-[10px] shadow border tablet:left-[220px] mobile:w-full mobile:!left-0 mobile:top-[180px]",{hidden:!y}),onScroll:function(e){e.target.scrollHeight-10<=e.target.scrollTop+e.target.offsetHeight&&o()},children:null===r||void 0===r?void 0:r.map((function(e){return(0,f.jsx)("div",{className:"max-h-[310px] overflow-y-auto",children:(0,f.jsx)("div",{className:i()("px-[25px] py-[8.5px] text-sm font-light truncate break-word text-left text-secondary dark:text-dark-10 hover:text-primary dark:hover:text-dark-10 hover:bg-blue-2 dark:hover:bg-dark cursor-pointer"),onClick:function(){w(),j("/my-writing/".concat(e.value))},children:e.label})},e.value)}))})]}),t&&(0,f.jsxs)("span",{className:"font-light text-[14px] truncate ml-[18px] tablet-mobile:hidden dark:text-white-2",children:["\u0e40\u0e23\u0e37\u0e48\u0e2d\u0e07 ",t]}),(0,f.jsx)("div",{className:"desktop-tablet:flex-1"}),(0,f.jsxs)("button",{type:"button",className:"shrink-0 flex items-center justify-center mr-[20px] space-x-[5px] bg-primary dark:bg-purple rounded-[20px] w-[95px] h-[40px] mobile:w-[40px] mobile:order-5",onClick:x,children:[(0,f.jsx)(d.d,{className:"text-white dark:text-white-2",width:"20",height:"20"}),(0,f.jsx)("span",{className:"font-mitr text-[14px] font-medium text-white dark:text-white-2 mobile:hidden",children:"\u0e41\u0e01\u0e49\u0e44\u0e02"})]}),(0,f.jsx)("button",{type:"button",className:"bg-white dark:bg-transparent border border-primary dark:border-dark-10 my-[10px] mr-[20px] w-[94px] h-[40px] rounded-[20px] shrink-0 mobile:order-6 mobile:w-[135px]",onClick:h,children:(0,f.jsx)("span",{className:"text-[14px] font-medium font-mitr text-primary dark:text-dark-10 whitespace-nowrap",children:"\u0e08\u0e31\u0e14\u0e01\u0e32\u0e23\u0e15\u0e2d\u0e19"})}),(0,f.jsxs)("div",{className:"bg-white dark:bg-transparent border mobile:mr-[20px] border-gray-3 dark:border-dark-10 rounded-[20px] flex space-x-[10px] items-center justify-center w-[127px] h-[40p
1x] shrink-0 mobile:w-[134px]",children:[(0,f.jsx)("p",{className:"text-primary dark:text-dark-10 font-light text-[14px]",children:"\u0e08\u0e1a\u0e41\u0e25\u0e49\u0e27"}),(0,f.jsx)(s.Z,{checked:!!n,onChange:b})]})]})})},function(){var e,t=(0,w.V)(),r=(0,j.z)(),n=(0,v.useQueryClient)(),o=(0,c.useRouter)(),a=o.push,i=o.back,s=(0,y.rB)().data;function u(){return(u=(0,h.Z)(m().mark((function e(o){var a;return m().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!s){e.next=7;break}return a=o.target.checked,e.next=5,r.updateBookIsEnded(s.id,a);case 5:n.setQueryData(["story-detail",s.id],(function(e){return e?P(P({},e),{},{isEnded:a}):e})),t.success("\u0e41\u0e01\u0e49\u0e44\u0e02\u0e2a\u0e16\u0e32\u0e19\u0e30\u0e07\u0e32\u0e19\u0e40\u0e02\u0e35\u0e22\u0e19\u0e2a\u0e33\u0e40\u0e23\u0e47\u0e08");case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),t.error("\u0e40\u0e01\u0e34\u0e14\u0e02\u0e49\u0e2d\u0e1c\u0e34\u0e14\u0e1e\u0e25\u0e32\u0e14 \u0e41\u0e01\u0e49\u0e44\u0e02\u0e2a\u0e16\u0e32\u0e19\u0e30\u0e07\u0e32\u0e19\u0e40\u0e02\u0e35\u0e22\u0e19\u0e44\u0e21\u0e48\u0e2a\u0e33\u0e40\u0e23\u0e47\u0e08");case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))).apply(this,arguments)}var l=(0,v.useInfiniteQuery)("my-writing-options",(function(e){var t=e.pageParam,n=void 0===t?1:t;return r.getMyWritingOptions(n)}),{getNextPageParam:function(e){if(e&&e.data.length)return e.page+1}}),d=l.data,p=l.fetchNextPage,x=l.isFetchingNextPage,b=(0,g.useMemo)((function(){var e,t;return null!==(e=null===d||void 0===d||null===(t=d.pages)||void 0===t?void 0:t.flatMap((function(e){return e.data})))&&void 0!==e?e:[]}),[d]),O={title:null!==(e=null===s||void 0===s?void 0:s.title)&&void 0!==e?e:"",isPublished:(null===s||void 0===s?void 0:s.status)===k.w.PUBLISHED&&(null===s||void 0===s?void 0:s.isVisible),isEnded:null===s||void 0===s?void 0:s.isEnded,isVisible:null===s||void 0===s?void 0:s.isVisible,myWritingOptions:b,handleFetchNextPage:function(){x||p()},handleManageWriting:function(){a("/my-writing")},handleEditWriting:function(){a("/my-writing/".concat(null===s||void 0===s?void 0:s.id,"/edit"))},handleManageChapter:function(){a("#manage_chapters")},handleToggleIsEnded:function(e){return u.apply(this,arguments)},previousPage:function(){i()}};return(0,f.jsx)(N,P({},O))}),L=r(59594),D=r(1158);function C(){return(0,f.jsxs)("div",{className:"grid p-[20px] shadow bg-white dark:bg-dark-9 gap-y-[20px] w-[260px] card z-[1] animate-pulse dark:border-purple",children:[(0,f.jsx)("div",{className:"w-[220px] h-[220px] bg-gray dark:bg-dark-9 rounded-full"}),(0,f.jsx)("div",{className:"w-full h-[10px] bg-gray dark:bg-dark-9 mt-[20px] ",style:{width:"".concat(50*Math.random()+30,"%")}}),(0,f.jsxs)("div",{className:"flex justify-between",children:[(0,f.jsx)("div",{className:"h-[12px] bg-gray dark:bg-dark-9",style:{width:60*Math.random()+20}}),(0,f.jsx)("div",{className:"w-[40px] h-[10px] bg-gray dark:bg-dark-9"})]}),(0,f.jsxs)("div",{className:"flex justify-between",children:[(0,f.jsx)("div",{className:"w-[80px] h-[12px] bg-gray dark:bg-dark-9"}),(0,f.jsx)("div",{className:"w-[60px] h-[10px] bg-gray dark:bg-dark-9"})]}),(0,f.jsx)("div",{className:"w-full h-[4px] bg-gray dark:bg-dark-9"}),(0,f.jsx)("div",{className:"w-[100px] h-[10px] bg-gray dark:bg-dark-9"})]})}function _(e){var t=e.className;return(0,f.jsx)("section",{className:i()("card p-[30px] mobile:p-0 dark:border-purple",t),children:(0,f.jsx)("div",{className:"flex space-x-[20px] py-[20px] overflow-x-auto",children:Array.from({length:4}).map((function(e,t){return(0,f.jsx)(C,{},t)}))})})}var R=o()((function(){return Promise.all([r.e(8494),r.e(925)]).then(r.bind(r,60925)).then((function(e){return e.Cover}))}),{loadableGenerated:{webpack:function(){return[60925]}}}),M=o()((function(){return Promise.all([r.e(3465),r.e(8494),r.e(810)]).then(r.bind(r,20810)).then((function(e){return e.Character}))}),{loadableGenerated:{webpack:function(){return[20810]}}}),S=o()((function(){return Promise.all([r.e(8494),r.e(615)]).then(r.bind(r,60615)).then((function(e){return e.PayRank}))}),{loadableGenerated:{webpack:function(){return[60615]}}}),T=o()((function(){return Promise.all([r.e(6911),r.e(1875),r.e(5503),r.e(4070)]).then(r.bind(r,14070)).then((function(e){return e.Introduction}))}),{loadableGenerated:{webpack:function(){return[14070]}}}
1),Z=o()((function(){return r.e(5410).then(r.bind(r,55410)).then((function(e){return e.BookLink}))}),{loadableGenerated:{webpack:function(){return[55410]}}}),B=o()((function(){return r.e(1997).then(r.bind(r,91997)).then((function(e){return e.StoryField}))}),{loadableGenerated:{webpack:function(){return[91997]}}}),W=o()((function(){return Promise.all([r.e(3465),r.e(1735),r.e(8138)]).then(r.bind(r,61918)).then((function(e){return e.ManageChapters}))}),{loadableGenerated:{webpack:function(){return[61918]}}});var H=r(15099);function A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var I=function(e){return function(){var t=(0,w.V)(),r=(0,c.useRouter)(),n=(0,y.rB)(),o=n.data,a=n.isLoading,i=(0,H.useAuthentication)().user.id;if(o&&i!==(null===o||void 0===o?void 0:o.penName.user.id))return t.error("\u0e02\u0e2d\u0e2d\u0e20\u0e31\u0e22 \u0e04\u0e38\u0e13\u0e44\u0e21\u0e48\u0e43\u0e0a\u0e48\u0e40\u0e08\u0e49\u0e32\u0e02\u0e2d\u0e07\u0e40\u0e23\u0e37\u0e48\u0e2d\u0e07\u0e19\u0e35\u0e49"),setTimeout((function(){r.push("/my-writing")}),500),null;var s={isLoading:a};return(0,f.jsx)(e,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?A(Object(r),!0).forEach((function(t){(0,x.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},s))}}((function(e){var t=e.isLoading;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(E,{}),(0,f.jsx)(L.W,{className:"mobile:my-0 mobile:!py-0 !pt-[30px] pb-[80px]",children:t?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(D.B,{}),(0,f.jsx)(_,{className:"mt-[20px]"})]}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(R,{}),(0,f.jsx)(M,{}),(0,f.jsx)(S,{}),(0,f.jsx)(T,{}),(0,f.jsx)(Z,{}),(0,f.jsx)(B,{}),(0,f.jsx)(W,{})]})})]})})),F=r(47908),G=r(1822);var z=!0,U=(0,F.x)((function(e){var t=e.bookId;return(0,f.jsx)(G.L,{children:(0,f.jsx)(y.FR,{bookId:t,children:(0,f.jsx)(I,{})})})}))},99629:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/my-writing/[id]",function(){return r(64051)}])},41664:function(e,t,r){e.exports=r(7942)},4298:function(e,t,r){e.exports=r(72189)},10748:function(e,t,r){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{Z:function(){return n}})},37247:function(e,t,r){"use strict";
1function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}r.d(t,{Z:function(){return n}})},45959:function(e,t,r){"use strict";function n(e,t){return n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(e,t)}function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}r.d(t,{Z:function(){return o}})},63553:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(14027),o=r(10748);function a(e,t){if(t&&("object"===n(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}}},function(e){e.O(0,[131,3087,5675,556,1822,1678,7533,841,9122,9774,2888,179],(function(){return t=99629,e(e.s=t);var t}));var t=e.O();_N_E=t}]); 2//# sourceMappingURL=[id]-9e23d5b169b5fd8d.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.