PageSourceSearch

https://edupark.ai/static/js/5071.d42a13f9.chunk.js

js edupark.ai collected 2026-10-05 12:16:08 UTC 9,112 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkedupark_client||=[]).push([[5071],{5904(e,t,n){n.d(t,{y:()=>v});var r=n(58878),o=n(71813),s=n(89500),i=n(65140),c=n(22215),a=n(54079),u=n(4329),d=n(90782);const l={success:{chip:"bg-success-50 text-success-800 ring-success-200",icon:(0,d.jsx)(c.A,{size:16})},warning:{chip:"bg-warning-50 text-warning-800 ring-warning-200",icon:(0,d.jsx)(i.A,{size:16})},error:{chip:"bg-error-50 text-error-800 ring-error-200",icon:(0,d.jsx)(s.A,{size:16})}};function v(e){let{toast:t,onDismiss:n,onHoldChange:s}=e;const{t:i}=(0,o.B)(),c=(0,r.useRef)(null),v=(0,r.useRef)(s);v.current=s;const f=(0,r.useRef)({hover:!1,focus:!1}),g=e=>{var t;const n=f.current.hover||f.current.focus;f.current=e;const r=e.hover||e.focus;n!==r&&(null===(t=v.current)||void 0===t||t.call(v,r))};return(0,r.useEffect)(()=>{var e;t?!f.current.focus||null!==(e=c.current)&&void 0!==e&&e.contains(document.activeElement)||g({...f.current,focus:!1}):g({hover:!1,focus:!1})},[t]),(0,r.useEffect)(()=>()=>{var e;(f.current.hover||f.current.focus)&&(null===(e=v.current)||void 0===e||e.call(v,!1))},[]),(0,d.jsx)("div",{role:"status","aria-live":"error"===(null===t||void 0===t?void 0:t.type)?"off":"polite",className:"fixed top-4 right-4 z-50",children:t&&(0,d.jsxs)("div",{ref:c,role:"error"===t.type?"alert":void 0,className:`fixed top-4 right-4 z-50 flex items-center gap-2 rounded-xl px-4 py-3 text-sm font-medium shadow-elevation-lg ring-1 ${l[t.type].chip}`,onMouseEnter:()=>g({...f.current,hover:!0}),onMouseLeave:()=>g({...f.current,hover:!1}),onFocus:()=>g({...f.current,focus:!0}),onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||g({...f.current,focus:!1})},children:[l[t.type].icon,t.message,t.action&&(0,d.jsx)(u.$,{variant:"ghost",size:"xs",className:"ml-2 -my-2 min-h-[40px]",onClick:t.action.onClick,children:t.action.label}),(0,d.jsx)("button",{type:"button",onClick:n,"aria-label":i("Dismiss"),className:"ml-2 text-current opacity-60 transition-opacity hover:opacity-100",children:(0,d.jsx)(a.A,{size:14})})]},t.type)})}},19342(e,t,n){n.d(t,{Z:()=>f});var r=n(58878),o=n(71813),s=n(94239),i=n(65852),c=n(1060),a=n(589),u=n(16108),d=n(94731),l=n(98639),v=n(72097);function f(e){const{orgId:t,classId:n,canManage:f}=e,{t:g}=(0,o.B)(),m=!!t&&f,{data:p,error:h}=(0,c.IT)(a.ISn,{...(0,l.X)("volatile"),variables:{orgId:t},skip:!m}),I=(0,r.useMemo)(()=>{const e=new Map;for(const n of null!==(t=null===p||void 0===p?void 0:p.getOrgGrantStatus)&&void 0!==t?t:[]){var t;e.set(n.userId,n)}return e},[p]),A=(0,r.useMemo)(()=>{const e=new Set;for(const t of Array.from(I.values()))t.reason===u.R9.REVOKED&&e.add(t.userId);return e},[I]),[w,S]=(0,r.useState)(new Set),[y,k]=(0,r.useState)(null),[x]=(0,i.n)(a.kAY,{update:d.Kr}),[E]=(0,i.n)(a.ueT,{update:d.Kr}),b=(0,s.m)(),C=(0,r.useCallback)(async(e,r,o)=>{if(!t||0===r.length)return!1;k(null),S(e=>new Set([...Array.from(e),...r]));const s=(s,i)=>
1{"revoke"===e?v.zS.orgStudentAccessRevoked({orgId:t,classId:n,studentCount:r.length,revokedCount:i,source:o,outcome:s}):v.zS.orgStudentAccessRestored({orgId:t,classId:n,studentCount:r.length,restoredCount:i,source:o,outcome:s})};try{var i,c;const n="revoke"===e?x:E,o=await n({variables:{orgId:t,userIds:r}}),a="revoke"===e?null===(i=o.data)||void 0===i?void 0:i.revokeStudentAccess:null===(c=o.data)||void 0===c?void 0:c.restoreStudentAccess;return s("success","number"===typeof a?a:null),!0}catch(l){var a,u;const e=null===l||void 0===l||null===(a=l.graphQLErrors)||void 0===a?void 0:a[0],t=!0===(null===e||void 0===e||null===(u=e.extensions)||void 0===u?void 0:u.userFacing)?e.message:null;return k(t||g("Something went wrong. Please check your connection and try again.")),(0,d.Kr)(b.cache),s("error",null),!1}finally{S(e=>{const t=new Set(e);for(const n of r)t.delete(n);return t})}},[t,n,x,E,b,g]),D=(0,r.useCallback)((e,t)=>C("revoke",e,t),[C]),L=(0,r.useCallback)((e,t)=>C("restore",e,t),[C]);return{available:m,revokedUserIds:A,grantStatusByUserId:I,stateUnknown:f&&!!t&&m&&void 0===p,stateError:m&&h&&h.message||null,pendingUserIds:w,error:y,clearError:(0,r.useCallback)(()=>k(null),[]),revoke:D,restore:L}}},59461(e,t,n){n.d(t,{B_:()=>a,CF:()=>f,E9:()=>T,Ei:()=>v,Go:()=>w,Jt:()=>m,Ko:()=>u,NL:()=>d,Oe:()=>b,R_:()=>L,YC:()=>A,YZ:()=>h,al:()=>S,ed:()=>D,fd:()=>x,q2:()=>g,q7:()=>l,rY:()=>p,s:()=>C,tM:()=>y,tO:()=>E,xu:()=>k,yP:()=>M,yn:()=>R,zm:()=>I});var r=n(27880),o=n(16108),s=n(67702),i=n(86133);const c=["invited","undeliverable","neverPracticed","inactive","active"];function a(e){return!!e&&c.includes(e)}function u(e){return"invited"===e||"undeliverable"===e}function d(e,t){switch(e){case"invited":return t("Invited, not joined");case"undeliverable":return t("Undeliverable");case"neverPracticed":return t("Never practiced");case"inactive":return t("Inactive 7+ days");case"active":return t("Active this week")}}function l(e,t){return"student"===t.role&&("neverPracticed"===e?!t.lastActivityAt:"active"===e?!!t.isActiveStudent:!!t.lastActivityAt&&!t.isActiveStudent)}function v(e,t,n){return"invited"===t.status&&("undeliverable"===e?n:!n)}function f(e){return e.hasError||e.searchPending?"none":e.accessFilterActive?"no-match-filters":e.activeFilter?"no-match":"empty-org"}function g(e,t,n){if("all"===e)return!0;const r=!!t&&(0,s.rg)(n.get(t));return"lost"===e?r:!r}function m(e,t,n){return"lost"===e&&t>=n}function p(e){return e.replace(/[^a-zA-Z0-9\s-]/g,"").toLowerCase().trim()}function h(e,t,n){return!n||((e||"").toLowerCase().includes(n)||(t||"").toLowerCase().includes(n))}function I(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e;return e.searchActive?t("Your search may not reflect the latest roster."):e.hasVisibleRows?t("Showing the last known list."):t("Please try again.")}function A(e){return"premium"===e.subscriptionStatus?"premium":e.accessRevoked?"free":e.selfServe?void 0===e.selfServeWindowLive?"tutor_plan":e.selfServeWindowLive&&e.orgActive?"premium":"free":e.orgPays&&(0,r.kE)({orgTrialActive:e.orgTrialActive,orgActive:e.orgActive,hasLiveSeat:e.hasLiveSeat})?"premium":"free"}function w(e){if(e)return e.reason===o.R9.SEAT_EXPIRED||e.reason===o.R9.SEAT_RELEASED||e.reason===o.R9.NO_SEAT?e:void 0}function S(e,t){if(e&&(!t.accessSurfaceShowsSeatStory||!w(e)))return e}function y(e){var t;return e.liveSeatExpiresAt?{kind:"live",expiresAt:e.liveSeatExpiresAt,isLegacyGrace:!!e.liveSeatIsLegacyGrace}:e.isDesignated?{kind:"reserved",contractIsEffective:!!e.contractIsEffective}:w(e.status)?{kind:"chipOwns"}:null!==(t=e.status)&&void 0!==t&&t.seatEndedAt?{kind:"ended",endedAt:e.status.seatEndedAt}:e.lastEndedSeatAt?{kind:"ended",endedAt:e.lastEndedSeatAt}:{kind:"none"}}function k(e,t){const{t:n,formatGrantDate:r,formatGraceDate:o}=t;if("live"===e.kind){const t=r(e.expiresAt);return t?e.isLegacyGrace?n("Free until {{date}}",{date:o(e.expiresAt)}):n("Seat until {{date}}",{date:t}):null}if("reserved"===e.kind)return e.contractIsEffective?n("Reserved \u2014 not yet assigned"):n("Seat reserved \u2014 starts when your plan starts");if("ended"===e.kind){const t=r(e.endedAt);return t?n("Seat expired {{date}}",{date:t}):null}return"none"===e.kind?n("No seat assigned"):null}function x(e){const t=new Set,n=(null===e||void 0===e?void 0:e.contract)||(null===e||void 0===e?void 0:e.upcomingContract)||(null===e||void 0===e?void 0:e.draftContract);for(const r of(null===n||void 0===n?void 0:n.lineItems)||[])r.isLegacyGrace&&t.add(r.lineItemId);return t}function E(e){const t=new Map;for(const n of e||[]){if(!n.isActive)continue;const e=t.get(n.userId);(!e||new Date(n.expiresAt)>new Date(e.expiresAt))&&t.set(n.userId,{lineItemId:n.lineItemId,expiresAt:n.expiresAt,isLegacyGrace:n.isLegacyGrace})}return t}function b(e){const t=new Map;for(const n of e||[]){if(n.isActive)continue;const e=n.releasedAt||n.expiresAt;if(!e)continue;const r=t.get(n.userId);(!r||new Date(e)>new Date(r))&&t.set(n.userId,e)}return t}function C(e){const t=new Map;for(const n of e||[]){const e=t.get(n.userId);(!e||new Date(n.offeredAt).getTime()>
1new Date(e.offeredAt).getTime())&&t.set(n.userId,n)}return t}function D(e){const t=new Map;for(const r of e||[]){const e=r.releasedAt||r.expiresAt,n=t.get(r.userId);(!n||new Date(e).getTime()>new Date(n.endedAt).getTime())&&t.set(r.userId,{lineItemId:r.lineItemId,endedAt:e})}const n=new Map;return t.forEach((e,t)=>n.set(t,e.lineItemId)),n}function L(e){const t=new Set,n=[];for(const s of[...(0,i.hI)((null===e||void 0===e||null===(r=e.contract)||void 0===r?void 0:r.lineItems)||[]),...(0,i.hI)((null===e||void 0===e||null===(o=e.upcomingContract)||void 0===o?void 0:o.lineItems)||[])]){var r,o;t.has(s.lineItemId)||(t.add(s.lineItemId),n.push(s))}return n}function M(e,t,n){const r=t.get(e);return r&&n.has(r)?r:null}function R(e){const t=new Map;for(const n of[null===e||void 0===e?void 0:e.contract,null===e||void 0===e?void 0:e.upcomingContract,null===e||void 0===e?void 0:e.draftContract])for(const e of(null===n||void 0===n?void 0:n.lineItems)||[])t.set(e.lineItemId,e.accessDurationMonths);return t}function T(e){const t=new Map;for(const n of e||[])t.set(n.lineItemId,n.accessDurationMonths);return t}}}]);

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.