PageSourceSearch

https://fossilsketch.org/_next/static/chunks/8054.e3bcd3dc9c85cdf5.js

js fossilsketch.org collected 2026-10-09 00:42:28 UTC 6,328 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8054],{888:function(e,n,s){var i=s(2322),t=s(2784),o=s(3232),l=s(2589);n.Z=function(e){var n=e.id,s=e.enable,r=e.classroomName,d=e.selectType,a=e.onUpdateSubmodules,c=e.module_id,u=e.readOnly,m=void 0!==u&&u,x=(0,t.useState)(s),v=x[0],p=x[1];(0,t.useEffect)((function(){p(s)}),[s]);var f=l.S.useMutation(["classroom.enableFossils"]).mutate;return(0,i.jsx)(o.r,{checked:v,onChange:function(e){if(!m){var s=e.currentTarget.checked;p(s),"modules"===d&&a&&a(n,s),f({classroomId:r,enabled_id:n,newEnabled:e.currentTarget.checked,selectType:d,module_id:c})}},disabled:m})}},8054:function(e,n,s){s.r(n);var i=s(7842),t=s(865),o=s(6670),l=s(2322),r=s(2784),d=s(888),a=s(7973),c=s(1552),u=s.n(c),m=s(3232),x=s(7841),v=s(5117),p=s(8090),f=s(50),h=s(61),j=s(5078),b=s(3575),C=s(8986),_=s(4756),k=s(6930),y=s(2589),g={consent_form:"",consent_form_video:"",pre_survey:"",post_survey:""};n.default=function(e){var n,s=e.readOnly,c=void 0!==s&&s,S=(0,r.useContext)(a.Z),Z=(0,r.useState)(),w=Z[0],L=Z[1],F=(0,r.useState)(),N=F[0],E=F[1],T=(0,r.useState)(!1),I=T[0],O=T[1],z=(0,r.useState)(""),M=z[0],V=z[1],P=(0,r.useState)(g),H=P[0],R=P[1],U=(0,r.useState)(g),B=U[0],D=U[1],K=(0,r.useState)(!0),Q=K[0],q=K[1],A=y.S.useQuery(["classroom.getContent",{classroomId:null!==(n=S.currentClass)&&void 0!==n?n:"",contentType:k.Fm}],{onSuccess:function(e){var n,s;L(null===e||void 0===e?void 0:e.modules),E(null===e||void 0===e?void 0:e.subModules),R((0,t.Z)({},g,null!==(n=null===e||void 0===e?void 0:e.links)&&void 0!==n?n:{})),q(null===(s=null===e||void 0===e?void 0:e.consentFormVideoEnabled)||void 0===s||s)}}).refetch,G=y.S.useMutation(["classroom.updateConsentFormVideoEnabled"]).mutate,J=y.S.useMutation(["classroom.updateModules"]).mutate,W=y.S.useMutation(["classroom.updateFormLinks"],{onSuccess:function(){(0,b.c0)({id:"saveLinkSuccess",title:"Link Saved",message:"Link has been successfully saved",color:"green",autoClose:4e3}),A()}}).mutate,X=function(e){O(!0),V(e)},Y=function(e,n){var s;c||L((function(i){return null!==(s=null===i||void 0===i?void 0:i.map((function(s){return s.id===e?(0,o.Z)((0,t.Z)({},s),{enabled:n}):s})))&&void 0!==s?s:[]}))},$=function(){return null===w||void 0===w?void 0:w.map((function(e,n){var s=null===N||void 0===N?void 0:N.filter((function(n){return n.module_id===e.id}));return(0,l.jsx)(_._l,{draggableId:e.title,index:n,children:function(n){return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("tr",(0,o.Z)((0,t.Z)({ref:n.innerRef},n.draggableProps),{children:[(0,l.jsx)("td",{children:(0,l.jsx)("div",{className:u().select_component_switch,children:(0,l.jsx)(d.Z,{id:e.id,enable:e.enabled,classroomName:S.currentClass,selectType:"modules",onUpdateSubmodules:Y,readOnly:c})})}),(0,l.jsx)("td",{children:(0,l.jsxs)("div",{className:u().module_row,children:[(0,l.jsxs)("div",{className:u().module_title,children:[e.type,": ",e.title]}),(0,l.jsx)("div",{className:u().module_description,children:e.description})]})}),(0,l.jsx)("td",{style:{whiteSpace:"nowrap"},children:"Survey"===e.type?(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,justifyContent:"flex-end"},children:["Consent Form"===e.title&&(0,l.jsx)(m.r,{checked:Q,onChange:function(e){return n=e.currentTarget.checked,void(c||(q(n),G({classroomId:S.currentClass,enabled:n})));var n},color:"teal",size:"md",label:"Show video",disabled:c,styles:{label:{color:"#fff"}}}),(0,l.jsx)(x.z,{disabled:c,onClick:function(){return X("Consent Form"===e.title?"Consent Form":e.title)},children:"Consent Form"===e.title?"Edit Form Link":"Edit Link"}),"Consent Form"===e.title&&(0,l.jsx)(x.z,{disabled:c,onClick:function(){return X("Consent Form Video")},children:"Edit Video Link"})]}):(0,l.jsx)(l.Fragment,{})}),(0,l.jsx)("td",(0,o.Z)((0,t.Z)({},c?{}:n.dragHandleProps),{style:{paddingTop:"15px",cursor:c?"default":"grab",opacity:c?.4:1},children:(0,l.jsx)(C.Z,{})}))]})),e.enabled&&s&&s.map((function(n){var s,i=null===(s=e.linkInfo)||void 0===s?void 0:s.find((function(e){return e.link_id===n.link_id}));return(0,l.jsxs)("tr",{className:u().submodule_row,children:[(0,l.jsx)("td",{children:(0,l.jsx)(d.Z,{id:n.link_id,module_id:n.module_id,enable:n.enabled,classroomName:S.currentClass,selectType:"submodules",readOnly:c})}),(0,l.jsx)("td",{children:(0,l.jsx)("div",{className:u().submodule,style:{paddingLeft:"30px"},children:(0,l.jsxs)(v.x,{color:"#eee",size:"sm",children:[" ",null===i||void 0===i?void 0:i.title]})})}),(0,l.jsx)("td",{}),(0,l.jsx)("td",{})]},n.link_id)}))]})}},e.id)}))};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(p.u,{opened:I,onClose:function(){return O(!I)},centered:!0,title:"Edit ".concat(M," Link"),overlayOpacity:.3,classNames:{title:u().modal_title},children:[(0,l.jsxs)(v.x,{style:{marginBottom:"2%"},children:["Current Link:"," ",H[M.toLowerCase().split(" ").join("_")]&&H[M.toLowerCase().split(" ").join("_")].length>0?(0,l.jsx)("a",{className:u().link,children:H[M.toLowerCase().split(" ").join("_")]}):(0,l.jsx)("span",{style:{color:"#0be4e4"},children:"--"})]}),(0,l.jsx)(v.x,{children:"New link"}),(0,l.jsxs)(f.r,{children:[(0,l.jsx)(f.r.Col,{span:9,children:(0,l.jsx)(h.o,{value:B[M.toLowerCase().split(" ").join("_")],onChange:function(e){return D((0,o.Z)((0,t.Z)({},B),(0,i.Z)({},M.toLowerCase().split(" ").join("_"),e.target.value)))}})}),(0,l.jsx)(f.r.Col,{span:3,children:(0,l.jsx)(x.z,{color:"green",onClick:function(){return function(e){var n=e.toLowerCase().split(" ").join("_");W({classroomId:S.currentClass,linkType:M,link:B[n]}),B[n]=""}(M)},children:"Save"})})]})]}
1),(0,l.jsx)(_.Z5,{onDragEnd:function(e){var n,s,i,t;if(!c&&e.destination&&void 0!=w){var o=w.slice(e.source.index,e.source.index+1);e.source.index<e.destination.index?(s=w.slice(0,e.source.index),t=w.slice(e.destination.index+1),i=w.slice(e.source.index+1,e.destination.index+1),n=s.concat(i,o,t)):(s=w.slice(0,e.destination.index),t=w.slice(e.source.index+1),i=w.slice(e.destination.index,e.source.index),n=s.concat(o,i,t)),L(n),J({classroomId:S.currentClass,exerciseOrder:n})}},children:(0,l.jsx)(j.i,{className:u().table,highlightOnHover:!0,fontSize:"xl",children:(0,l.jsx)(_.bK,{droppableId:"droppable-1",children:function(e){return(0,l.jsxs)("tbody",(0,o.Z)((0,t.Z)({ref:e.innerRef},e.droppableProps),{children:[$(),e.placeholder]}))}})})})]})}}}]);

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.