1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[893],{4174:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/courses/[id]",function(){return n(9566)}])},5728:function(e,t,n){"use strict";n.d(t,{A1:function(){return c},uH:function(){return l},x6:function(){return u}});var r=n(9729),a=n.n(r),s=n(6803),i=n.n(s);a()({projectId:"znoznjjh",dataset:"production",useCdn:!0});let o=i()({projectId:"znoznjjh",dataset:"production"}),l=e=>o.image(e),c=e=>["January","February","March","April","May","June","July","August","September","October","November","December"][e.getMonth()];function u(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}},4648:function(e,t,n){"use strict";var r=n(5893),a=n(7294),s=n(5814);t.Z=e=>{let{content:t}=e,[n,i]=(0,a.useState)(!1);return(0,r.jsxs)("div",{children:[(0,r.jsx)(s.YI,{value:n?t:t.slice(0,1)}),t.length>1&&(0,r.jsx)("button",{onClick:()=>{i(!n)},className:"border-0 text-info bg-dark",children:n?"Read Less":"Read More"})]})}},9331:function(e,t,n){"use strict";var r=n(5893),a=n(7066),s=n(7294),i=n(6501),o=n(1312);t.Z=e=>{let{isMyCourse:t,course_id:n,reviews:l,isAdmin:c}
1=e,[u,d]=(0,s.useState)(""),[f,h]=(0,s.useState)(5),m=async e=>{e.preventDefault(),a.Z.post("/api/courses/reviews/submit-review",{content:u,course_id:n,rating:f}).then(e=>{i.Am.success("Review submitted successfully!"),window.location.reload()}).catch(e=>{i.Am.error("Error in submitting review!")})},v=async(e,t)=>{e.preventDefault(),a.Z.post("/api/courses/reviews/delete-review",{review_id:t}).then(e=>{i.Am.success("Review deleted successfully!"),window.location.reload()}).catch(e=>{i.Am.error("Error in deleting review!")})};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h2",{className:"mb-4 mt-4 pt-4 text-white",children:"Reviews"}),(0,r.jsxs)("div",{className:"row",children:[(0,r.jsx)("div",{className:"col-lg-4 mb-4 mb-lg-0",children:(0,r.jsxs)("form",{onSubmit:m,children:[(0,r.jsx)("textarea",{placeholder:"Write a review...",rows:"10",className:"p-3 bg-dark rounded text-white w-100",disabled:!t,value:u,onChange:e=>d(e.target.value)}),(0,r.jsx)(o.Z,{count:5,value:f,onChange:e=>h(e),size:18,activeColor:"#ffd700",color:"rgb(255, 255, 255, 60%)"}),(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)("button",{type:"submit",className:"btn btn-outline-warning w-100",disabled:!t||""===u,children:"Submit"})})]})}),(0,r.jsx)("div",{className:"col-lg-8",children:l.length?(0,r.jsxs)("div",{className:"overflow-scroll position-relative reviews-scroll",style:{height:325},children:[l.map((e,t)=>{let{user:n,rating:a,content:s,review_id:i}=e;return(0,r.jsxs)("div",{className:"mb-0 ".concat(0===t?"":"pt-4"),children:[(0,r.jsx)("p",{className:"m-0 text-muted",children:n.name}),(0,r.jsx)("div",{children:(0,r.jsx)(o.Z,{count:5,value:a,size:18,activeColor:"#ffd700",color:"rgb(255, 255, 255, 60%)",edit:!1})}),(0,r.jsx)("p",{children:s}),c&&(0,r.jsx)("button",{className:"btn btn-danger",onClick:e=>v(e,i),children:"Delete"})]},t)}),(0,r.jsx)("div",{className:"scroll-indicator"})]}):(0,r.jsx)("h4",{children:"No Reviews"})})]})]})}},9566:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return y},default:function(){return b}});var r=n(5893),a=n(7294),s=n(798),i=n(2972),o=n(5728);n(1664);var l=n(7066),c=n(3299),u=n(923),d=n(4648);let f=e=>{let{lesson:t,isMyCourse:n,index:s,setPlayingLessonId:i,playingLessonId:o}=e,[c,u]=(0,a.useState)(null),[f,h]=(0,a.useState)(0),[m,v]=(0,a.useState)(!1),p=t._key,g=(0,a.useRef)(),x=async()=>l.Z.get("/api/courses/lesson/".concat(p)),y=async()=>{await x(p).then(e=>{u(e.data),v(!0)}).catch(e=>console.error(e))};return(0,a.useEffect)(()=>{o!==p||m||y()},[o,m,p]),(0,a.useEffect)(()=>{c&&(g.current.currentTime=f,g.current.play())},[c]),(0,r.jsx)("div",{className:"position-relative",children:(0,r.jsxs)("div",{className:"bg-dark py-3 mb-4 row",children:[(0,r.jsx)("div",{className:"col-lg-4 position-relative",children:o===p?(0,r.jsx)("div",{className:"video-wrapper",children:(0,r.jsx)("video",{ref:g,onSeeking:e=>{h(g.current.currentTime)},width:"400",height:"240",style:{maxWidth:"100%"},controls:!0,controlsList:"nodownload",src:c,children:"Your browser does not support the video tag."})}):(0,r.jsxs)("div",{children:[n?(0,r.jsx)("div",{className:"play-btn-wrapper",children:(0,r.jsx)("button",{className:"btn btn-warning",onClick:()=>{i(p)},children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",viewBox:"0 0 16 16",children:(0,r.jsx)("path",{d:"m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z"})})})}):null,(0,r.jsx)("img",{src:t.imageURL,alt:t.title})]})}),(0,r.jsxs)("div",{className:"col-lg-8 mt-4 mt-lg-0",children:[(0,r.jsxs)("div",{className:"d-flex align-items-center text-muted",children:["Lesson ",s+1," | ",t.duration," mins"]}),(0,r.jsx)("h4",{className:"text-white mt-3",style:{fontSize:20,fontWeight:300},children:t.title}),(0,r.jsx)("div",{className:"mb-3 text-muted",children:(0,r.jsx)(d.Z,{content:t.description})})]})]})})};var h=e=>{let{lessons:t,isMyCourse:n}=e,[s,i]=(0,a.useState)(null);return(0,r.jsx)("div",{children:t.map((e,t)=>(0,r.jsx)(f,{index:t,lesson:e,isMyCourse:n,setPlayingLessonId:i,playingLessonId:s},t))})},m=n(2962),v=n(6501),p=n(9331),g=n(3454);let x=()=>new Promise(e=>{let t=document.createElement("script");
1t.src="https://checkout.razorpay.com/v1/checkout.js",t.onload=()=>{e(!0)},t.onerror=()=>{e(!1)},document.body.appendChild(t)});var y=!0,b=e=>{let{services:t,course:n,isMyCourse:f,reviews:y,isAdmin:b}=e,{data:w}=(0,c.useSession)(),[j,N]=(0,a.useState)(!1);n.lessons.forEach(e=>{e.imageURL=(0,o.uH)(e.thumbnail).width(600).url()}),n.imageURL=(0,o.uH)(n.thumbnail).width(600).url();let S=async()=>{var e,t;if(N(!0),!await x()){alert("Razorpay SDK Failed to load");return}let{data:r}=await l.Z.post("/api/razorpay/create-order",{course_id:n._id});N(!1);let{id:a}=r,s=async e=>{let{razorpay_payment_id:t,razorpay_order_id:n,razorpay_signature:r}=e;window.location.reload()},i={key:g.env.RAZROPAY_KEY_ID,amount:100*n.price,currency:"INR",name:"Godrik",order_id:a,handler:s,prefill:{name:null==w?void 0:null===(e=w.user)||void 0===e?void 0:e.name,email:null==w?void 0:null===(t=w.user)||void 0===t?void 0:t.email,method:"upi"},theme:{color:"#ffc107"}},o=new window.Razorpay(i);o.on("payment.failed",function(e){console.log(e.error.code),console.log(e.error.description),console.log(e.error.source),console.log(e.error.step),console.log(e.error.reason),console.log(e.error.metadata.order_id),console.log(e.error.metadata.payment_id)}),o.open()};return(0,r.jsxs)("div",{className:"text-light",children:[(0,r.jsx)(m.PB,{title:n.title,description:n.seo_description||"".concat(n.title," Course by Amisha Singh Dyma"),openGraph:{type:"website",url:"https://www.godrik.in/courses/".concat(n._id),title:n.seo_title||n.title,description:n.seo_description||"".concat(n.title," Course by Amisha Singh Dyma"),images:[{url:n.imageURL,width:800,height:600,alt:n.title}]}}),(0,r.jsx)(s.Z,{services:t}),(0,r.jsxs)("div",{className:"container",children:[(0,r.jsx)("div",{className:"container mt-4",children:(0,r.jsxs)("div",{className:"bg-dark py-3 row",children:[(0,r.jsx)("div",{className:"col-lg-4 mb-3 mb-lg-0",children:(0,r.jsx)("img",{src:n.imageURL,alt:n.title})}),(0,r.jsxs)("div",{className:"col-lg-8",children:[(0,r.jsx)("h2",{className:"text-warning",style:{fontWeight:300},children:n.title}),(0,r.jsxs)("div",{className:"mb-3",children:[(0,r.jsx)("div",{className:"d-flex align-items-center ls-wide mb-3 text-muted",children:(0,r.jsxs)("div",{style:{fontWeight:200,fontSize:"0.9rem"},children:[(0,u.g)(n.duration)," | ",n.lessons.length," lessons | ",n.language," by Amisha Singh Dyma"]})}),!f&&(0,r.jsx)("p",{className:"text-white mb-3",children:"500+ Students"}),!f&&(0,r.jsxs)("div",{className:"d-flex align-items-center",children:[(0,r.jsx)("button",{className:"btn btn-success",disabled:j,onClick:e=>{e.preventDefault(),w?S():v.Am.error("You need to login first.")},children:j?"loading...":"Buy now"}),(0,r.jsxs)("div",{className:"d-flex align-items-center",children:[(0,r.jsxs)("p",{className:"m-0 ps-4 lead",style:{color:"#e03535",fontWeight:"bold"},children:["â¹ ",(0,o.x6)(n.price)]}),(0,r.jsxs)("p",{className:"m-0 ps-4 lead text-muted",style:{fontSize:"1rem",textDecoration:"line-through"},children:["â¹ ",100*Math.ceil(2*n.price/100)]})]})]})]}),(0,r.jsx)("div",{className:"text-muted",children:(0,r.jsx)(d.Z,{content:n.description})})]})]})}),(0,r.jsx)("h2",{className:"mb-4 mt-4 pt-4 text-white",children:"Lessons"}),(0,r.jsx)("div",{className:"container mt-4",children:(0,r.jsx)(h,{lessons:n.lessons,isMyCourse:f})}),(0,r.jsx)(p.Z,{isMyCourse:f,course_id:n._id,reviews:y,isAdmin:b})]}),(0,r.jsx)(i.Z,{})]})}},923:function(e,t,n){"use strict";n.d(t,{g:function(){return a},k:function(){return r}});let r=e=>e.trim().split(" ").map(e=>e.toLowerCase()).join("-");function a(e){let t=parseInt(e,10);if(isNaN(t))return"Invalid input";let n=Math.floor(t/60),r=String(t%60).padStart(2,"0");return"".concat(n," hr").concat(n>1?"s":""," ").concat(r," mins")}},4955:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,s=void 0;try{for(var i,o=e[Symbol.iterator]();!(r=(i=o.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,s=e}finally{try{!r&&o.return&&o.return()}finally{if(a)throw s}}return n}(e,t);
1throw TypeError("Invalid attempt to destructure non-iterable instance")};t.default=function(e){var t=r((0,a.useState)(e.count),2),n=t[0],s=t[1],i=r((0,a.useState)(e.size),2),o=i[0],l=i[1],c=r((0,a.useState)(e.char),2),u=c[0],d=c[1],f=r((0,a.useState)(e.color),2),h=f[0],m=f[1],v=r((0,a.useState)(e.activeColor),2),p=v[0],g=v[1],x=r((0,a.useState)(e.isHalf),2),y=x[0],b=x[1],w=r((0,a.useState)(e.edit),2),j=w[0],N=w[1],S=r((0,a.useState)(e.emptyIcon),2),_=S[0],I=S[1],C=r((0,a.useState)(e.halfIcon),2),k=C[0],M=C[1],A=r((0,a.useState)(e.filledIcon),2),z=A[0],E=A[1],H=r((0,a.useState)(e.a11y),2),R=H[0],L=H[1];return[{count:n,size:o,char:u,color:h,activeColor:p,isHalf:y,edit:j,emptyIcon:_,halfIcon:k,filledIcon:z,a11y:R},function(e){s(e.count),l(e.size),d(e.char),m(e.color),g(e.activeColor),b(e.isHalf),N(e.edit),I(e.emptyIcon),M(e.halfIcon),E(e.filledIcon),L(e.a11y)}]};var a=n(7294)},1312:function(e,t,n){"use strict";var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,a=!1,s=void 0;try{for(var i,o=e[Symbol.iterator]();!(r=(i=o.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,s=e}finally{try{!r&&o.return&&o.return()}finally{if(a)throw s}}return n}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},a=n(7294),s=c(a),i=c(n(5697)),o=c(n(4955)),l=c(n(7719));function c(e){return e&&e.__esModule?e:{default:e}}var u={overflow:"hidden",position:"relative"};function d(e){var t=r((0,a.useState)(""),2),n=t[0],i=t[1],c=r((0,a.useState)(0),2),d=c[0],f=c[1],h=r((0,a.useState)([]),2),m=h[0],v=h[1],p=r((0,a.useState)(!1),2),g=p[0],x=p[1],y=r((0,o.default)(e),2),b=y[0],w=y[1],j=r((0,a.useState)(0),2),N=j[0],S=j[1],_=r((0,a.useState)(!1),2),I=_[0],C=_[1],k=r((0,a.useState)(""),2),M=k[0],A=k[1];function z(e){void 0===e&&(e=b.isHalf?Math.floor(d):Math.round(d));for(var t=[],n=0;n<b.count;n++)t.push({active:n<=e-1});return t}function E(e){if(b.edit){var t,n=Number(e.currentTarget.getAttribute("data-index"));if(b.isHalf){var r=H(e);C(r),r&&(n+=1),S(n)}else n+=1;(t=n)!==m.filter(function(e){return e.active}).length&&v(z(t))}}function H(e){var t=e.target.getBoundingClientRect(),n=e.clientX-t.left;return(n=Math.round(Math.abs(n)))>t.width/2}function R(){b.edit&&(L(d),v(z()))}function L(e){b.isHalf&&(C(e%1==0),S(Math.floor(e)))}function D(e){if(b.edit){var t=Number(e.currentTarget.getAttribute("data-index")),n=void 0;if(b.isHalf){var r=H(e);C(r),r&&(t+=1),n=r?t:t+.5,S(t)}else n=t+=1;Z(n)}}function Z(t){t!==d&&(v(z(t)),f(t),e.onChange(t))}return(0,a.useEffect)(function(){var t,n;A(e.classNames+" react-stars"),t=e.value,n=e.count,t<0||t>n?f(0):f(t),v(z(e.value)),w(e),i((Math.random()+"").replace(".","")),x(!e.isHalf&&e.emptyIcon&&e.filledIcon||e.isHalf&&e.emptyIcon&&e.halfIcon&&e.filledIcon),S(Math.floor(e.value)),C(e.isHalf&&e.value%1<.5)},[]),s.default.createElement("div",{className:"react-stars-wrapper-"+n,style:{display:"flex"}},s.default.createElement("div",{tabIndex:b.a11y&&b.edit?0:null,"aria-label":"add rating by typing an integer from 0 to 5 or pressing arrow keys",onKeyDown:function(e){if(b.a11y||b.edit){var t=e.key,n=d,r=Number(t);r?Number.isInteger(r)&&r>0&&r<=b.count&&(n=r):("ArrowUp"===t||"ArrowRight"===t)&&n<b.count?(e.preventDefault(),n+=b.isHalf?.5:1):("ArrowDown"===t||"ArrowLeft"===t)&&n>.5&&(e.preventDefault(),n-=b.isHalf?.5:1),L(n),Z(n)}},className:M,style:u},b.isHalf&&s.default.createElement("style",{dangerouslySetInnerHTML:{__html:g?"\n span.react-stars-half > * {\n color: "+b.activeColor+";\n }":"\n .react-stars-"+n+":before {\n position: absolute;\n overflow: hidden;\n display: block;\n z-index: 1;\n top: 0; left: 0;\n width: 50%;\n content: attr(data-forhalf);\n color: "+b.activeColor+";\n }"}}),m.map(function(e,t){return s.default.createElement(l.default,{key:t,index:t,active:e.active,config:b,onMouseOver:E,onMouseLeave:R,onClick:D,halfStarHidden:I,halfStarAt:N,isUsingIcons:g,uniqueness:n})}),s.default.createElement("p",{style:{position:"absolute",left:"-200rem"},role:"status"},d)))}d.propTypes={classNames:i.default.string,edit:i.default.bool,half:i.default.bool,value:i.default.number,count:i.default.number,char:i.default.string,size:i.default.number,color:i.default.string,activeColor:i.default.string,emptyIcon:i.default.element,halfIcon:i.default.element,filledIcon:i.default.element,a11y:i.default.bool},d.defaultProps={edit:!0,half:!1,value:0,count:5,char:"â
",size:15,color:"gray",activeColor:"#ffd700",a11y:!0,onChange:function(){}},t.Z=d},7719:function(e,t,n){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0});var r,a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.default=function(e){var t=e.index,n=e.active,r=e.config,o=e.onMouseOver,l=e.onMouseLeave,c=e.onClick,u=e.halfStarHidden,d=e.halfStarAt,f=e.isUsingIcons,h=e.uniqueness,m=r.color,v=r.activeColor,p=r.size,g=r.char,x=r.isHalf,y=r.edit,b=r.halfIcon,w=r.emptyIcon,j=r.filledIcon,N="",S=!1;x&&!u&&d===t&&(N=f?"react-stars-half":"react-stars-"+h,S=!0);var _=a({},i,{color:n?v:m,cursor:y?"pointer":"default",fontSize:p+"px"});return s.default.createElement("span",{className:N,style:_,key:t,"data-index":t,"data-forhalf":j?t:g,onMouseOver:o,onMouseMove:o,onMouseLeave:l,onClick:c},f?n?j:!n&&S?b:w:g)};var s=(r=n(7294))&&r.__esModule?r:{default:r},i={position:"relative",overflow:"hidden",cursor:"pointer",display:"block",float:"left"}}},function(e){e.O(0,[664,755,400,814,66,962,917,888,774,179],function(){return e(e.s=4174)}),_N_E=e.O()}]);
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.