1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a11442-ea1d-7d83-b3aa-ffe939dbb63f")}catch(e){}}();(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,927267,e=>{"use strict";let t;var a=e.i(843476),r=e.i(271645),s=e.i(30030),i=e.i(820783),l=e.i(326999),o=e.i(981140),n=Symbol("radix.slottable"),d="AlertDialog",[c,u]=(0,s.createContextScope)(d,[l.createDialogScope]),p=(0,l.createDialogScope)(),m=e=>{let{__scopeAlertDialog:t,...r}=e,s=p(t);return(0,a.jsx)(l.Root,{...s,...r,modal:!0})};m.displayName=d;var f=r.forwardRef((e,t)=>{let{__scopeAlertDialog:r,...s}=e,i=p(r);return(0,a.jsx)(l.Trigger,{...i,...s,ref:t})});f.displayName="AlertDialogTrigger";var h=e=>{let{__scopeAlertDialog:t,...r}=e,s=p(t);return(0,a.jsx)(l.Portal,{...s,...r})};h.displayName="AlertDialogPortal";var y=r.forwardRef((e,t)=>{let{__scopeAlertDialog:r,...s}=e,i=p(r);return(0,a.jsx)(l.Overlay,{...i,...s,ref:t})});y.displayName="AlertDialogOverlay";var g="AlertDialogContent",[x,v]=c(g),j=((t=({children:e})=>(0,a.jsx)(a.Fragment,{children:e})).displayName="AlertDialogContent.Slottable",t.__radixId=n,t),b=r.forwardRef((e,t)=>{let{__scopeAlertDialog:s,children:n,...d}=e,c=p(s),u=r.useRef(null),m=(0,i.useComposedRefs)(t,u),f=r.useRef(null);return(0,a.jsx)(l.WarningProvider,{contentName:g,titleName:k,docsSlug:"alert-dialog",children:(0,a.jsx)(x,{scope:s,cancelRef:f,children:(0,a.jsxs)(l.Content,{role:"alertdialog",...c,...d,ref:m,onOpenAutoFocus:(0,o.composeEventHandlers)(d.onOpenAutoFocus,e=>{e.preventDefault(),f.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,a.jsx)(j,{children:n}),(0,a.jsx)(R,{contentRef:u})]})})})});b.displayName=g;var k="AlertDialogTitle",w=r.forwardRef((e,t)=>{let{__scopeAlertDialog:r,...s}=e,i=p(r);return(0,a.jsx)(l.Title,{...i,...s,ref:t})});w.displayName=k;var D="AlertDialogDescription",A=r.forwardRef((e,t)=>{let{__scopeAlertDialog:r,...s}=e,i=p(r);return(0,a.jsx)(l.Description,{...i,...s,ref:t})});A.displayName=D;var M=r.forwardRef((e,t)=>{let{__scopeAlertDialog:r,...s}=e,i=p(r);return(0,a.jsx)(l.Close,{...i,...s,ref:t})});M.displayName="AlertDialogAction";var N="AlertDialogCancel",C=r.forwardRef((e,t)=>{let{__scopeAlertDialog:r,...s}=e,{cancelRef:o}=v(N,r),n=p(r),d=(0,i.useComposedRefs)(t,o);return(0,a.jsx)(l.Close,{...n,...s,ref:d})});C.displayName=N;var R=({contentRef:e})=>{let t=`\`${g}\` requires a description for the component to be accessible for screen reader users. 2 3You can add a description to the \`${g}\` by passing a \`${D}\` component as a child, which also benefits sighted users by adding visible context to the dialog. 4 5Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${g}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. 6 7For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return r.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},T=e.i(551292),S=e.i(647163);let I=({className:e,ref:t,...r})=>(0,a.jsx)(y,{className:(0,S.cn)("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80 data-[state=closed]:animate-out data-[state=open]:animate-in",e),"data-radix-alert-dialog-overlay":!0,...r,ref:t});I.displayName=y.displayName;let P=({className:e,withOverlay:t=!0,ref:r,...s})=>(0,a.jsxs)(h,{children:[t&&(0,a.jsx)(I,{}),(0,a.jsx)(b,{className:(0,S.cn)((0,S.cn)("fixed bottom-2 left-[50%] z-50 grid w-full max-w-[95vw] translate-x-[-50%] sm:top-[50%] sm:bottom-auto sm:translate-y-[-50%]","gap-4 rounded-3xl border bg-background p-6 shadow-lg duration-200","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[state=closed]:slide-out-to-bottom-[5px] data-[state=closed]:slide-out-to-left-1/2 sm:data-[state=closed]:slide-out-to-top-[48%]","data-[state=open]:slide-in-from-bottom-[5px] data-[state=open]:slide-in-from-left-1/2 sm:data-[state=open]:slide-in-from-top-[48%]","sm:max-w-lg"),e),"data-radix-alert-dialog-content":!0,ref:r,...s})]});P.displayName=b.displayName;let F=({className:e,...t})=>(0,a.jsx)("div",{className:(0,S.cn)("flex flex-col space-y-2 text-center sm:text-left",e),...t});F.displayName="AlertDialogHeader";let E=({className:e,...t})=>(0,a.jsx)("div",{className:(0,S.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});E.displayName="AlertDialogFooter";let O=({className:e,ref:t,...r})=>(0,a.jsx)(w,{className:(0,S.cn)("font-semibold text-2xl",e),ref:t,...r});O.displayName=w.displayName;let U=({className:e,ref:t,...r})=>(0,a.jsx)(A,{className:(0,S.cn)("text-base text-muted-foreground",e),ref:t,...r});
7U.displayName=A.displayName;let $=({className:e,ref:t,variant:r="default",...s})=>(0,a.jsx)(M,{className:(0,S.cn)((0,T.buttonVariants)({size:"sm",variant:r}),e),ref:t,...s});$.displayName=M.displayName;let z=({className:e,ref:t,variant:r="secondary",size:s="sm",...i})=>(0,a.jsx)(C,{className:(0,S.cn)((0,T.buttonVariants)({variant:r,size:s}),"mt-2 sm:mt-0",e),ref:t,...i});z.displayName=C.displayName,e.s(["AlertDialog",0,m,"AlertDialogAction",0,$,"AlertDialogCancel",0,z,"AlertDialogContent",0,P,"AlertDialogDescription",0,U,"AlertDialogFooter",0,E,"AlertDialogHeader",0,F,"AlertDialogTitle",0,O,"AlertDialogTrigger",0,f],927267)},114584,e=>{"use strict";var t=e.i(843476),a=e.i(912598),r=e.i(365971);let s=(0,e.i(475254).default)("archive-restore",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]]);var i=e.i(373488),i=i,l=e.i(678078),o=e.i(812479),n=e.i(691888),d=e.i(618566),c=e.i(271645),u=e.i(846696),p=e.i(927267),m=e.i(477952),f=e.i(987911),h=e.i(225893);let y={material:"This material will be permanently deleted.",lesson:"This lesson and all of its materials will be permanently deleted.",sequence:"This sequence and all of its lessons and materials will be permanently deleted."};e.s(["ResourceCardMenu",0,function({resourceType:e,resourceId:g,resourceName:x,sensitive:v,archived:j,isAuthor:b=!0,"data-testid":k="resource-card-menu"}){let w=(0,a.useQueryClient)(),D=(0,d.useRouter)(),A=(0,h.useSetResourceSensitivityMutation)(),M=(0,h.useSetResourceArchivedMutation)(),N=(0,h.useDeleteResourceMutation)(),[C,R]=(0,c.useState)(!1),T=e=>({onSuccess:t=>{t.error?u.toast.error(t.error):(u.toast.success(e),(0,h.invalidateResourceControlQueries)(w),D.refresh())},onError:()=>{u.toast.error("Something went wrong. Please try again.")}}),S=A.isPending||M.isPending||N.isPending;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(f.DropdownMenu,{modal:!1,children:[(0,t.jsx)(f.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsx)(m.Button,{"aria-label":"Resource actions",className:"size-8 rounded-full bg-card/90 text-foreground shadow-sm backdrop-blur-sm hover:bg-card","data-testid":k,disabled:S,onClick:e=>{e.preventDefault(),e.stopPropagation()},size:"icon-xs",variant:"secondary",children:(0,t.jsx)(i.default,{className:"size-4"})})}),(0,t.jsxs)(f.DropdownMenuContent,{align:"end",side:"bottom",sideOffset:4,children:[b&&(0,t.jsxs)(f.DropdownMenuItem,{"data-testid":"resource-card-menu-sensitivity",onSelect:()=>{let t=!v;A.mutate({resourceType:e,resourceId:g,sensitive:t},T(t?`"${x}" is now private â only you can see it`:`"${x}" is now visible to your workspace`))},children:[v?(0,t.jsx)(l.EyeIcon,{}):(0,t.jsx)(o.LockIcon,{}),v?"Make public":"Make private"]}),(0,t.jsxs)(f.DropdownMenuItem,{"data-testid":"resource-card-menu-archive",onSelect:()=>{let t=!j;M.mutate({resourceType:e,resourceId:g,archived:t},T(t?`"${x}" archived`:`"${x}" restored`))},children:[j?(0,t.jsx)(s,{}):(0,t.jsx)(r.ArchiveIcon,{}),j?"Restore":"Archive"]}),(0,t.jsx)(f.DropdownMenuSeparator,{}),(0,t.jsxs)(f.DropdownMenuItem,{"data-testid":"resource-card-menu-delete",onSelect:()=>R(!0),variant:"destructive",children:[(0,t.jsx)(n.Trash2Icon,{className:"text-destructive"}),"Delete"]})]})]}),(0,t.jsx)(p.AlertDialog,{onOpenChange:R,open:C,children:(0,t.jsxs)(p.AlertDialogContent,{onClick:e=>{e.preventDefault(),e.stopPropagation()},children:[(0,t.jsxs)(p.AlertDialogHeader,{children:[(0,t.jsxs)(p.AlertDialogTitle,{children:['Delete "',x,'"?']}),(0,t.jsxs)(p.AlertDialogDescription,{children:[y[e]," This can't be undone. If you just want it out of the way, archive it instead."]})]}),(0,t.jsxs)(p.AlertDialogFooter,{className:"mt-4 w-full sm:justify-between",children:[(0,t.jsx)(p.AlertDialogCancel,{children:"Cancel"}),(0,t.jsx)(p.AlertDialogAction,{"data-testid":"resource-card-menu-delete-confirm",onClick:()=>{N.mutate({resourceType:e,resourceId:g},T(`"${x}" deleted`)),R(!1)},variant:"destructive",children:"Delete"})]})]})})]})}],114584)},657017,e=>{"use strict";var t=e.i(271645),a=e.i(846696),r=e.i(242695),s=e.i(706021);e.s(["useFileAttachments",0,function(e){let i=e?.maxAttachments??r.MAX_ATTACHMENTS,l=e?.maxFileSize??r.MAX_FILE_SIZE,[o,n]=(0,t.useState)([]),[d,c]=(0,t.useState)(!1),u=(0,t.useRef)({}),p=(0,t.useRef)(null),m=(0,s.useLog)(),f=(0,t.useCallback)(e=>{let t=i-o.length;if(t<=0)return void a.toast.error(`Maximum ${i} attachments allowed`);let s=e.slice(0,t);for(let t of(e.length>s.length&&a.toast.error(`Only ${s.length} file(s) added. Maximum ${i} attachments allowed.`),s)){if(!(0,r.isValidFileType)(t)){a.toast.error(`${t.name}: Only images and PDFs are allowed`);continue}if(t.size>l){a.toast.error(`${t.name}: File size exceeds ${r.MAX_FILE_SIZE_MB}MB limit`);continue}let e=t.type.startsWith("image/")?URL.createObjectURL(t):void 0,s=Math.random().toString(36).substring(7),i={id:s,file:t,previewUrl:e,progress:0,status:"uploading"};n(e=>[...e,i]);let{promise:o,abort:d}=(0,r.uploadFile)(t,e=>{n(t=>t.map(t=>
7t.id===s?{...t,progress:e}:t))});u.current[s]=d,o.then(e=>{n(t=>t.map(t=>t.id===s?{...t,status:"completed",remoteUrl:e}:t)),delete u.current[s]}).catch(async e=>{e instanceof Error&&e.message.includes("abort")||(await m.mutateAsync({scope:"use-file-attachments",message:"Upload failed",severity:"error",attributes:{error:e}}),n(t=>t.map(t=>t.id===s?{...t,status:"error",error:e instanceof Error?e.message:"Upload failed"}:t)),delete u.current[s])})}},[o.length,i,l]),h=(0,t.useCallback)(e=>{n(t=>{let a=t.find(t=>t.id===e);return a?.previewUrl&&URL.revokeObjectURL(a.previewUrl),t.filter(t=>t.id!==e)});let t=u.current[e];t&&(t(),delete u.current[e])},[]),y=(0,t.useCallback)(()=>{for(let e of o)e.previewUrl&&URL.revokeObjectURL(e.previewUrl);for(let e of Object.values(u.current))e();u.current={},n([])},[o]),g=(0,t.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),c(!0)},[]),x=(0,t.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),e.currentTarget.contains(e.relatedTarget)||c(!1)},[]),v=(0,t.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),c(!1),e.dataTransfer.files?.length&&f(Array.from(e.dataTransfer.files))},[f]),j=(0,t.useCallback)(e=>{e.target.files?.length&&(f(Array.from(e.target.files)),e.target.value="")},[f]),b=(0,t.useCallback)(()=>{p.current?.click()},[]),k=o.some(e=>"uploading"===e.status),w=o.some(e=>"completed"===e.status);return{attachments:o,isDragging:d,hasUploading:k,hasCompletedAttachments:w,fileInputRef:p,addFiles:f,removeAttachment:h,clearAttachments:y,handleDragOver:g,handleDragLeave:x,handleDrop:v,handleFileChange:j,openFileDialog:b,acceptedTypes:r.ACCEPTED_FILE_TYPES,maxAttachments:i,maxFileSize:l}}])},365971,e=>{"use strict";let t=(0,e.i(475254).default)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);e.s(["ArchiveIcon",0,t],365971)},373488,e=>{"use strict";let t=(0,e.i(475254).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["default",0,t])},932609,e=>{"use strict";let t=(0,e.i(475254).default)("languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);e.s(["LanguagesIcon",0,t],932609)},397882,e=>{"use strict";let t=(0,e.i(475254).default)("loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]);e.s(["LoaderIcon",0,t],397882)},244894,e=>{"use strict";let t=(0,e.i(475254).default)("share-2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);e.s(["Share2Icon",0,t],244894)},691888,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2Icon",0,t],691888)}]); 8 9//# chunkId=01a11442-ea1d-7d83-b3aa-ffe939dbb63f
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.