PageSourceSearch

https://www.excelrs.dev/_next/static/chunks/app/my-tasks/page-020ab571b0d51cbc.js

js excelrs.dev collected 2026-09-24 15:02:16 UTC 15,932 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3237],{10497:function(e,t,r){Promise.resolve().then(r.bind(r,72189))},20357:function(e,t,r){"use strict";var a,n;e.exports=(null==(a=r.g.process)?void 0:a.env)&&"object"==typeof(null==(n=r.g.process)?void 0:n.env)?r.g.process:r(88081)},88081:function(e){!function(){var t={229:function(e){var t,r,a,n=e.exports={};function l(){throw Error("setTimeout has not been defined")}function s(){throw Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===l||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:l}catch(e){t=l}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var i=[],c=!1,u=-1;function d(){c&&a&&(c=!1,a.length?i=a.concat(i):u=-1,i.length&&f())}function f(){if(!c){var e=o(d);c=!0;for(var t=i.length;t;){for(a=i,i=[];++u<t;)a&&a[u].run();u=-1,t=i.length}a=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}n.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];i.push(new h(e,t)),1!==i.length||c||o(f)},h.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=m,n.addListener=m,n.once=m,n.off=m,n.removeListener=m,n.removeAllListeners=m,n.emit=m,n.prependListener=m,n.prependOnceListener=m,n.listeners=function(e){return[]},n.binding=function(e){throw Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw Error("process.chdir is not supported")},n.umask=function(){return 0}}},r={};function a(e){var n=r[e];if(void 0!==n)return n.exports;var l=r[e]={exports:{}},s=!0;try{t[e](l,l.exports,a),s=!1}finally{s&&delete r[e]}return l.exports}a.ab="//";var n=a(229);e.exports=n}()},72189:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return u}});var a=r(57437),n=r(2265),l=r(16463),s=r(7824),o=r(36392),i=r(96450),c=r(48185);function u(){let{user:e,isHydrated:t}=(0,i.useAuthStore)(),r=(0,l.useRouter)(),[u,d]=(0,n.useState)([]),[f,h]=(0,n.useState)(!0),[m,v]=(0,n.useState)("");return(0,n.useEffect)(()=>{let r=async()=>{if(!(null==e?void 0:e._id)){h(!1);return}try{let e=await (0,o.eM)();d(e)}catch(e){v((null==e?void 0:e.message)||"Failed to load my tasks")}finally{h(!1)}};t&&r()},[e,t]),(0,a.jsx)(s.default,{currentPath:"/my-tasks",children:(0,a.jsx)("main",{className:"py-8",children:(0,a.jsx)("div",{className:"mx-auto max-w-2xl px-6 lg:px-8",children:f?(0,a.jsx)("div",{className:"flex items-center justify-center min-h-[300px]",children:(0,a.jsx)("div",{className:"flex items-center justify-center h-screen",children:(0,a.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-teal-600"})})}):m?(0,a.jsx)("div",{className:"text-red-600 bg-red-50 border border-red-200 rounded-lg p-4",children:m}):0===u.length?(0,a.jsx)("div",{className:"text-center text-gray-500 mt-20",children:(0,a.jsxs)("div",{className:"flex flex-col items-center space-y-4",children:[(0,a.jsx)("div",{className:"w-24 h-24 bg-gray-200 rounded-full flex items-center justify-center",children:(0,a.jsx)("svg",{className:"w-12 h-12 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 5H7a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})}),(0,a.jsx)("h3",{className:"text-xl font-semibold text-gray-600",children:"No tasks found"}),(0,a.jsx)("p",{className:"text-gray-500 max-w-md",children:"You haven't enrolled in any tasks yet. Enroll from task board to see them here."})]})}):(0,a.jsx)("div",{className:"flex flex-col gap-6",children:u.map(e=>(0,a.jsx)(c.Zb,{className:"rounded-2xl shadow-lg overflow-hidden cursor-pointer hover:scale-[1.01] transition",onClick:()=>r.push("/tasks/".concat(e.id)),children:(0,a.jsxs)(c.aY,{className:"p-0",children:[(0,a.jsx)("div",{className:"w-full h-48 bg-gray-200 flex items-center justify-center overflow-hidden",children:e.image?(0,a.jsx)("img",{src:e.image,alt:e.title,className:"object-cover w-full h-full"}):(0,a.jsx)("div",{className:"w-full h-full bg-gradient-to-r from-blue-100 to-teal-100"})}),(0,a.jsxs)("div",{className:"flex justify-between items-center p-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("div",{className:"font-bold text-lg text-gray-800",children:e.title}),(0,a.jsxs)("div",{className:"inline-flex items-center gap-2 w-fit flex-wrap",children:[(0,a.jsx)("span",{className:"inline-block px-3 py-1 bg-blue-100 text-blue-800 text-sm font-semibold rounded-full",children:"Enrolled ✓"}),(0,a.jsxs)("span",{className:"inline-block px-3 py-1 bg-amber-100 text-amber-800 text-sm font-semibold rounded-full border border-amber-300",children:["Score: ",Number(e.score||0)]}),(0,a.jsx)("span",{className:"inline-block px-3 py-1 bg-purple-100 text-purple-800 text-sm font-semibold rounded-full",children:e.visibility||"public"}),(0,a.jsx)("span",{className:"inline-block px-3 py-1 bg-emerald-100 text-emerald-800 text-sm font-semibold rounded-full",children:e.status||"open"})]})]}),(0,a.jsx)("div",{className:"text-gray-500 font-semibold text-base",children:e.deadline||"-"})]})]})},e.id))})})})})}},48185:function(e,t,r){"use strict";r.d(t,{Ol:function(){return o},Zb:function(){return s},aY:function(){return c},ll:function(){return i}});var a=r(57437),n=r(2265),l=r(49354);let s=n.forwardRef((e,t)=>
1{let{className:r,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,l.cn)("rounded-xl border border-neutral-200 bg-white text-neutral-950 shadow dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",r),...n})});s.displayName="Card";let o=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,l.cn)("flex flex-col space-y-1.5 p-6",r),...n})});o.displayName="CardHeader";let i=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,l.cn)("font-semibold leading-none tracking-tight",r),...n})});i.displayName="CardTitle",n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,l.cn)("text-sm text-neutral-500 dark:text-neutral-400",r),...n})}).displayName="CardDescription";let c=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,l.cn)("p-6 pt-0",r),...n})});c.displayName="CardContent",n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)("div",{ref:t,className:(0,l.cn)("flex items-center p-6 pt-0",r),...n})}).displayName="CardFooter"},58357:function(e,t,r){"use strict";r.d(t,{CT:function(){return a},bz:function(){return l},nL:function(){return n}});let a=(r(20357).env.NEXT_PUBLIC_CLOUD_API_URL||"https://excelrs-cloud-new-1069037816864.asia-south1.run.app").replace(/\/+$/,""),n="https://powr-api.lawazia.tech";function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=String(e||"").replace(/^\/+/,"");return t?"".concat(n,"/").concat(t):n}},36392:function(e,t,r){"use strict";r.d(t,{Hq:function(){return i},eM:function(){return d},qI:function(){return u},u_:function(){return o},yD:function(){return c}});var a=r(96450);let n=r(58357).CT,l=()=>{try{let e=a.useAuthStore.getState().token;if(e)return e;return localStorage.getItem("auth-token")||""}catch(e){return""}},s=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t={"Content-Type":"application/json"};if(e){let e=l();e&&(t.Authorization="Bearer ".concat(e))}return t},o=async(e,t)=>{let r=t?"?shareToken=".concat(encodeURIComponent(t)):"",a=await fetch("".concat(n,"/tasks/").concat(e).concat(r),{method:"GET",headers:s(!0)});if(!a.ok){if(403===a.status)throw Error("Private task access denied");if(401===a.status)throw Error("Unauthorized");throw Error("Failed to fetch task details")}return(await a.json()).data},i=async e=>{let t=await fetch("".concat(n,"/tasks/").concat(e,"/enrollment-status"),{method:"GET",headers:s(!0)});if(!t.ok){if(401===t.status)throw Error("Unauthorized");throw Error("Failed to fetch enrollment status")}return(await t.json()).data},c=async(e,t)=>{let r=await fetch("".concat(n,"/tasks/").concat(e,"/enroll"),{method:"POST",headers:s(!0),body:JSON.stringify({shareToken:t||""})});if(!r.ok)throw Error((await r.json().catch(()=>({}))).message||"Failed to enroll");return r.json()},u=async(e,t)=>{let r=await fetch("".concat(n,"/tasks/").concat(e,"/contributions"),{method:"POST",headers:s(!0),body:JSON.stringify(t)});if(!r.ok)throw Error((await r.json().catch(()=>({}))).message||"Failed to submit contribution");return r.json()},d=async()=>{let e=await fetch("".concat(n,"/tasks/my-tasks"),{method:"GET",headers:s(!0)});if(!e.ok){if(401===e.status)throw Error("Unauthorized");throw Error("Failed to fetch my tasks")}return(await e.json()).data||[]}},90047:function(e,t,r){"use strict";var a=r(2265);let n=a.forwardRef(function(e,t){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),a.createElement("path",{d:"M10.394 2.08a1 1 0 00-.788 0l-7 3a1 1 0 000 1.84L5.25 8.051a.999.999 0 01.356-.257l4-1.714a1 1 0 11.788 1.838L7.667 9.088l1.94.831a1 1 0 00.787 0l7-3a1 1 0 000-1.838l-7-3zM3.31 9.397L5 10.12v4.102a8.969 8.969 0 00-1.05-.174 1 1 0 01-.89-.89 11.115 11.115 0 01.25-3.762zM9.3 16.573A9.026 9.026 0 007 14.935v-3.957l1.818.78a3 3 0 002.364 0l5.508-2.361a11.026 11.026 0 01.25 3.762 1 1 0 01-.89.89 8.968 8.968 0 00-5.35 2.524 1 1 0 01-1.4 0zM6 18a1 1 0 001-1v-2.065a8.935 8.935 0 00-2-.712V17a1 1 0 001 1z"}))});t.Z=n},99493:function(e,t,r){"use strict";var a=r(2265);let n=a.forwardRef(function(e,t){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),a.createElement("path",{fillRule:"evenodd",d:"M6.267 3.455a3.066 3.066 0 001.745-.723 3.066 3.066 0 013.976 0 3.066 3.066 0 001.745.723 3.066 3.066 0 012.812 2.812c.051.643.304 1.254.723 1.745a3.066 3.066 0 010 3.976 3.066 3.066 0 00-.723 1.745 3.066 3.066 0 01-2.812 2.812 3.066 3.066 0 00-1.745.723 3.066 3.066 0 01-3.976 0 3.066 3.066 0 00-1.745-.723 3.066 3.066 0 01-2.812-2.812 3.066 3.066 0 00-.723-1.745 3.066 3.066 0 010-3.976 3.066 3.066 0 00.723-1.745 3.066 3.066 0 012.812-2.812zm7.44 5.252a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"}))});t.Z=n},41395:function(e,t,r){"use strict";var a=r(2265);let n=a.forwardRef(function(e,t){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),a.createElement("path",{fillRule:"evenodd",d:"M6 6V5a3 3 0 013-3h2a3 3 0 013 3v1h2a2 2 0 012 2v3.57A22.952 22.952 0 0110 13a22.95 22.95 0 01-8-1.43V8a2 2 0 012-2h2zm2-1a1 1 0 011-1h2a1 1 0 011 1v1H8V5zm1 5a1 1 0 011-1h.01a1 1 0 110 2H10a1 1 0 01-1-1z",clipRule:"evenodd"}),a.createElement("path",{d:"M2 13.692V16a2 2 0 002 2h12a2 2 0 002-2v-2.308A24.974 24.974 0 0110 15c-2.796 0-5.487-.46-8-1.308z"}))});t.Z=n},26945:function(e,t,r){"use strict";var a=r(2265);let n=a.forwardRef(function(e,t){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),a.createElement("path",{d:"M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"}),a.createElement("path",{fillRule:"evenodd",d:"M4 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v11a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm3 4a1 1 0 000 2h.01a1 1 0 100-2H7zm3 0a1 1 0 000 2h3a1 1 0 100-2h-3zm-3 4a1 1 0 100 2h.01a1 1 0 100-2H7zm3 0a1 1 0 100 2h3a1 1 0 100-2h-3z",clipRule:"evenodd"}))});t.Z=n},62818:function(e,t,r){"use strict";var a=r(2265);let n=a.forwardRef(function(e,t){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),a.createElement("path",{fillRule:"evenodd",d:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z",clipRule:"evenodd"}))});t.Z=n},18256:function(e,t,r){"use strict";var a=r(2265);let n=a.forwardRef(function(e,t){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),a.createElement("path",{d:"M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z"}))});t.Z=n},5607:function(e,t,r){"use strict";var a=r(2265);let n=a.forwardRef(function(e,t){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),a.createElement("path",{d:"M11 3a1 1 0 10-2 0v1a1 1 0 102 0V3zM15.657 5.757a1 1 0 00-1.414-1.414l-.707.707a1 1 0 001.414 1.414l.707-.707zM18 10a1 1 0 01-1 1h-1a1 1 0 110-2h1a1 1 0 011 1zM5.05 6.464A1 1 0 106.464 5.05l-.707-.707a1 1 0 00-1.414 1.414l.707.707zM5 10a1 1 0 01-1 1H3a1 1 0 110-2h1a1 1 0 011 1zM8 16v-1h4v1a2 2 0 11-4 0zM12 14c.015-.34.208-.646.477-.859a4 4 0 10-4.954 0c.27.213.462.519.476.859h4.002z"}))});t.Z=n},89633:function(e,t,r){"use strict";var a=r(2265);let n=a.forwardRef(function(e,t){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),a.createElement("path",{fillRule:"evenodd",d:"M3 3a1 1 0 00-1 1v12a1 1 0 102 0V4a1 1 0 00-1-1zm10.293 9.293a1 1 0 001.414 1.414l3-3a1 1 0 000-1.414l-3-3a1 1 0 10-1.414 1.414L14.586 9H7a1 1 0 100 2h7.586l-1.293 1.293z",clipRule:"evenodd"}))});t.Z=n},95438:function(e,t,r){"use strict";var a=r(2265);let n=a.forwardRef(function(e,t){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),a.createElement("path",{fillRule:"evenodd",d:"M2.166 4.999A11.954 11.954 0 0010 1.944 11.954 11.954 0 0017.834 5c.11.65.166 1.32.166 2.001 0 5.225-3.34 9.67-8 11.317C5.34 16.67 2 12.225 2 7c0-.682.057-1.35.166-2.001zm11.541 3.708a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"}))});t.Z=n},9968:function(e,t,r){"use strict";var a=r(2265);let n=a.forwardRef(function(e,t){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),a.createElement("path",{fillRule:"evenodd",d:"M2 5a2 2 0 012-2h12a2 2 0 012 2v10a2 2 0 01-2 2H4a2 2 0 01-2-2V5zm3.293 1.293a1 1 0 011.414 0l3 3a1 1 0 010 1.414l-3 3a1 1 0 01-1.414-1.414L7.586 10 5.293 7.707a1 1 0 010-1.414zM11 12a1 1 0 100 2h3a1 1 0 100-2h-3z",clipRule:"evenodd"}))});t.Z=n},28490:function(e,t,r){"use strict";var a=r(2265);let n=a.forwardRef(function(e,t){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",ref:t},e),a.createElement("path",{d:"M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 
10 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"}))});t.Z=n}},function(e){e.O(0,[231,4868,6575,7824,2971,7023,1744],function(){return e(e.s=10497)}),_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.