PageSourceSearch

https://fossilsketch.org/_next/static/chunks/7464-0b5a31421c9068f7.js

js fossilsketch.org collected 2026-10-09 00:42:06 UTC 31,631 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7464],{7444:function(e,t,n){"use strict";var a=n(2322),r=(n(2784),n(9094)),i=n(6577),o=n.n(i);t.Z=function(e){var t=e.width,n=void 0===t?400:t,i=e.height,s=void 0===i?140:i,l=e.link,c=void 0===l?"/":l;return(0,a.jsx)(r.M,{children:(0,a.jsx)("a",{href:c,children:(0,a.jsx)(o(),{src:"/logos/logo.png",alt:"FossilSketch logo",width:n,height:s})})})}},6759:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var a=n(2322),r=n(2784),i=n(8655),o=n.n(i),s=n(4188),l=n.n(s),c=n(4761),u=n(7841),d=n(3575),p=n(6335),h=n(7082),f=n(7996),_=n.n(f);var v=function(e){var t=e.rulerWidth,n=e.rulerSize,i=(0,r.useRef)(null),o=(0,r.useState)("url('/rulerRotated_large.svg')"),s=o[0],l=o[1];return(0,r.useEffect)((function(){l("medium"===n?"url('/rulerRotated.svg')":"large"===n?"url('/rulerRotated_large.svg')":"url('/rulerRotated_small.svg')")}),[n]),(0,r.useEffect)((function(){!function(e){var t=0,n=0,a=0,r=0;function i(t){var n,i;if((t=t||window.event).preventDefault(),"touchstart"==t.type||"touchmove"==t.type||"touchend"==t.type||"touchcancel"==t.type){var l="undefined"===typeof t.originalEvent?t:t.originalEvent,c=l.touches[0]||l.changedTouches[0];n=c.pageX,i=c.pageY}else"mousedown"!=t.type&&"mouseup"!=t.type&&"mousemove"!=t.type&&"mouseover"!=t.type&&"mouseout"!=t.type&&"mouseenter"!=t.type&&"mouseleave"!=t.type||(n=t.clientX,i=t.clientY);a=n,r=i,document.onmouseup=s,document.onmousemove=o,e&&(e.addEventListener("touchend",s,!1),e.addEventListener("touchmove",o,!1))}function o(i){var o,s;if((i=i||window.event).preventDefault(),"touchstart"==i.type||"touchmove"==i.type||"touchend"==i.type||"touchcancel"==i.type){var l="undefined"===typeof i.originalEvent?i:i.originalEvent,c=l.touches[0]||l.changedTouches[0];o=c.pageX,s=c.pageY}else"mousedown"!=i.type&&"mouseup"!=i.type&&"mousemove"!=i.type&&"mouseover"!=i.type&&"mouseout"!=i.type&&"mouseenter"!=i.type&&"mouseleave"!=i.type||(o=i.clientX,s=i.clientY);t=a-o,n=r-s,a=o,r=s,e&&(e.style.top=e.offsetTop-n+"px",e.style.left=e.offsetLeft-t+"px")}function s(){document.onmouseup=null,document.ontouchcancel=null,document.onmousemove=null,document.removeEventListener("touchend",s,!1),document.removeEventListener("touchmove",o,!1)}e&&(e.onmousedown=i,e.ontouchstart=i)}(i.current)}),[]),(0,a.jsx)("div",{className:_().ruler,draggable:"true",id:"ruler",ref:i,style:{display:"block",width:t.toString()+"px",backgroundImage:s}})},m=function(e,t,n,a,r){var i=new(l().Point)(0,0),o=r/t,s=a/n;return[(e.x-i.x)*o,(e.y-i.y)*s]},g=(0,r.forwardRef)((function(e,t){var n,i=e.points,s=e.fossilFilePath,f=e.originalCanvasWidth,_=e.originalCanvasHeight,g=e.sketchHandler,y=e.canvasSizeHandler,x=e.sketchTab,C=e.editMode,b=e.updateStep,w=e.incrementTries,k=e.rulerVisible,T=void 0!==k&&k,j=e.rulerWidth,A=void 0===j?0:j,S=e.rulerSize,P=void 0===S?"medium":S,W=function(e){e.target.id.includes("pencil")?("max_length"===x||"max_height"===x?de.activate():"aperture_area"===x?pe.activate():"none"==x?he.activate():ce.activate(),le("pencil")):(le("eraser"),ue.activate())},N=function(e){"positive"===e?(0,d.c0)({id:"CorrectGuess",message:"Correct!",disallowClose:!1,autoClose:2500,icon:(0,a.jsx)(p.Z,{})}):(0,d.c0)({id:"IncorrectGuess",message:"Incorrect!",disallowClose:!1,autoClose:2500,icon:(0,a.jsx)(h.Z,{}),color:"red"})},Z=function(e){var t=function(e){for(var t=0,n=0;n<e.length-1;n++){var a=e[n+1].x-e[n].x,r=e[n+1].y-e[n].y;t+=Math.sqrt(a*a+r*r)}return t}(e)/64,n=[];n.push(e[0]);for(var a=0,r=1;r<e.length;r++){var i=H(new(l().Point)(e[r]),new(l().Point)(e[r-1]));(a+=i)>t&&(a=i,n.push(e[r]))}return n},H=function(e,t){var n=t.x-e.x,a=t.y-e.y;return Math.sqrt(n*n+a*a)},O=function(e){return e.map((function(e){return{x:e.point.x,y:e.point.y}}))},M=(0,c.rZ)(),I=(0,r.useRef)(null),E=(0,r.useRef)(null),z=(0,r.useRef)(null),F=(0,r.useRef)([]),L=(0,r.useRef)([]),D=(0,r.useRef)([]),R=(0,r.useState)(void 0),U=R[0],B=R[1],V=(0,r.useState)(void 0),X=V[0],Y=V[1],J=(0,r.useState)(0),q=J[0],G=J[1],K=(0,r.useState)(0),Q=K[0],$=K[1],ee=(0,r.useState)(1),te=ee[0],ne=ee[1],ae=(0,r.useState)(!1),re=ae[0],ie=ae[1],oe=(0,r.useState)("pencil"),se=oe[0],le=oe[1],ce=new(l().Tool),ue=new(l().Tool),de=new(l().Tool),pe=new(l().Tool),he=new(l().Tool),fe=(0,r.useCallback)((function(e){if(E.current){var t=e.naturalHeight||e.height,n=e.naturalWi
1dth||e.width;if(n&&t){var a=E.current.offsetHeight,r=E.current.offsetWidth,i=function(e,t,n,a){return Math.min(a/t,n/e)}(t,n,a,r),o=(r-n*i)/2,s=Math.max(0,(a-t*i)/2);ne(i),B(t*i),Y(n*i),G(o),$(s)}}}),[]);(0,r.useEffect)((function(){if(C){var e=E.current;if(e){var t=new ResizeObserver((function(){var e=z.current;e&&(e.naturalWidth||e.width)&&fe(e)}));return t.observe(e),function(){return t.disconnect()}}}}),[C,fe]);var _e=function(){for(var e,t=[],n=[],a=0;a<L.current.length;a++){n=[];for(var r=0;r<L.current[a].segments.length;r++)e=L.current[a].segments[r].point,n.push({x:e.x,y:e.y});t.push(n)}return t};ce.onMouseDown=function(e){if(n=new(l().Path),C)n.strokeColor=new(l().Color)(M.colors.cyan[7]);else{n.strokeColor=new(l().Color)("white");var t={x:e.point.x,y:e.point.y};F.current.push(t)}n.strokeWidth=4,n.strokeCap="round",n.add(e.point)},ce.onMouseDrag=function(e){if(n&&n.add(e.point),!C){var t={x:e.point.x,y:e.point.y};F.current.push(t)}},ce.onMouseUp=function(){n&&(n.smooth(),C?L.current.push(n):(n.strokeColor=new(l().Color)(M.colors.cyan[7]),D.current.push(n)),g&&g(_e()),y&&y(l().view.size.height,l().view.size.width,x))},de.onMouseDown=function(e){(n=new(l().Path)).add(e.point),n.add(e.point),n.strokeColor=C?new(l().Color)(M.colors.cyan[7]):new(l().Color)("white"),n.strokeWidth=4,n.strokeCap="round",n.dashArray=[20,10]},de.onMouseDrag=function(e){n&&(n.segments[1].point=e.point)},de.onMouseUp=function(){C?L.current.push(n):n&&function(e){w&&w(x);for(var t=0,n=0;n<L.current[0].segments.length;n++){for(var a=9999,r=0;r<e.segments.length;r++){var i=H(L.current[0].segments[r].point,e.segments[n].point);i<a&&(a=i)}t+=a}var o=t/2;o>l().view.size.width/30?(L.current[0].visible=!0,N("negative"),e.strokeColor=new(l().Color)("#ff0000"),setTimeout((function(){l().project.clear(),ie(!re)}),2e3)):o<l().view.size.width/30&&e.length>100&&(N("positive"),e.strokeColor=new(l().Color)("#00aaaa"),L.current[0].visible=!1,setTimeout((function(){l().project.clear(),ie(!re)}),2e3),b())}(n),g&&g(_e()),y&&y(l().view.size.height,l().view.size.width,x)},pe.onMouseDown=function(e){if(C){l().project.clear();var t=new(l().Path.Circle)({center:new(l().Point)(e.point.x,e.point.y),radius:50,strokeWidth:12,strokeColor:"orange"});L.current=[],L.current.push(new(l().Path)({x:t.position.x,y:t.position.y})),L.current[0].visible=!0}else{l().project.clear(),ie(!re);var n=new(l().Path.Circle)({center:new(l().Point)(e.point.x,e.point.y),radius:50,strokeWidth:12,strokeColor:"orange"}),a={x:n.position.x,y:n.position.y};D.current=[],D.current.push(new(l().Path)({x:n.position.x,y:n.position.y})),F.current=[],F.current.push(a)}g&&g(_e()),y&&y(l().view.size.height,l().view.size.width,x)};var ve=function(e){var t=l().project.hitTestAll(e.point,{segments:!0,fill:!0,class:l().Path,tolerance:5,stroke:!0});if(t.length)for(var n=0;n<t.length;n++){var a=t[n];L.current.splice(L.current.indexOf(a.item),1),a.item.remove()}for(var r=0;r<L.current.length;r++)L.current[r].getLocationOf(e.point)&&L.current.splice(r,1)};return ue.onMouseDown=ve,ue.onMouseDrag=ve,ue.onMouseUp=function(){g&&g(_e())},he.onMouseDown=function(){},he.onMouseDrag=function(){},he.onMouseUp=function(){},(0,r.useImperativeHandle)(t,(function(){return{evaluateSketch:function(){if(w&&w(x),0!==F.current.length){for(var e=Z(F.current),t=Z(O(L.current[0].segments)),a=0,r=0;r<t.length;r++){for(var i=9999,o=0;o<e.length;o++){var s=H(new(l().Point)(t[r]),new(l().Point)(e[o]));s<i&&(i=s)}a+=i}a/e.length<l().view.size.width/70?(N("positive"),n&&(n.strokeColor=new(l().Color)("#00aaaa")),L.current.forEach((function(e){e.visible=!1})),setTimeout((function(){l().project.clear(),ie(!re),F.current=[]}),2e3),void 0!==b&&b()):(L.current.forEach((function(e){e.visible=!0})),N("negative"),D.current.forEach((function(e){e.strokeColor=new(l().Color)("#ff0000")})),setTimeout((function(){l().project.clear(),ie(!re),F.current=[]}),2e3))}D.current=[]},evaluateAreaPoint:function(){if(void 0!==F.current[0]){for(var e=F.current[0].x,t=F.current[0].y,n=Z(O(L.current[0].segments)),a=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,s=0;s<n.length;s++)a=Math.min(a,n[s].x),r=Math.max(r,n[s].x),i=Math.min(i,n[s].y),o=Math.max(o,n[s].y);e>a&&e<r&&t>i&&t<o?(N("positive"),L.current[0].visible=!1,setTimeout((function(){l().project.clear(),ie(!re),b()}),2e3)):(L.current[0].visible=!0,new(l().Path.Circle)({center:new(l().Point)(D.current[0].segments[0].point.x,D.current[0].segments[0].point.y),radius:50,strokeWidth:12,strokeColor:"#ff0000"}),N("negative"),setTimeout((function(){l().project.clear(),ie(!re)}),2e3))}}}})),(0,r.useEffect)((function(){if(I.current&&void 0!==U){l().setup(I.current);var e=l().view.size.height,t=l().view.size.width;if(L.current=[],void 0!=i)for(var n=0;n<i.length;n++){var a;if("aperture_area"===x){var r=m(i[0][0],f,_,e,t);a=new(l().Path.Circle)({center:new(l().Point)(r[0],r[1]),radius:50,strokeWidth:12,strokeColor:"orange"})}else a=new(l().Path)({segments:i[n].map((function(n){return m(n,f,_,e,t)})),strokeColor:M.colors.cyan[7],strokeWidth:4});a.visible=!!C,"max_length"!==x&&"max_height"!==x||(a.dashArray=[20,10]),(null===a||void 0===a?void 0:a.length)>0&&L.current.push(a)}"max_length"===x||"max_height"===x?de.activate():"aperture_area"===x?pe.activate():"none"===x?he.activate():ce.activate(),"eraser"===se&&ue.activate(),l().view.update()}}),[i,U,X,x,re,_,f,C]),(0,a.jsxs)("div",{style:{height:C?"55vh":"calc(100vh - 400px)",position:C?"relative":void 0},ref:E,children:[null!=s&&/\.(jpe?g|png|webp|gif|bmp)(\?|#|$)/i.test(s)&&(0,a.jsx)("img",{onLoad:function(e){var t=e.target;fe(t)},src:s,ref:z,height:U,width:X,style:{zIndex:0,left:q,top:C?Q:void 0,position:C?"absolute":"fixed"}}),(0,a.jsx)("canvas",{id:"sketchCanvas",className:"".concat(o().sketch_canvas," ").concat(C?o().sketch_canvas_editor:o().sketch_canvas_viewport),"data-paper-hidpi":"off","data-paper-resize":"true",ref:I,style:{width:X,height:U,left:q,top:C?Q:void 0}}),T&&(0,a.jsx)(v,{rulerWidth:A*te,rulerSize:P}),(0,a.jsxs)("div",{className:"".concat(o().button_container," ").concat(C?o().button_container_editor:o().button_container_viewport),children:[(0,a.jsx)(u.z,{id:o().pencil,size:"lg",radiu
1s:"xl",onClick:W,style:{marginBottom:"30%",backgroundColor:"pencil"===se?"#00aaaa":"transparent"}}),(0,a.jsx)(u.z,{id:o().eraser,size:"lg",radius:"xl",onClick:W,style:{backgroundColor:"eraser"===se?"#00aaaa":"transparent"}})]})]})}))},1783:function(e,t,n){"use strict";var a=n(2322),r=n(2784),i=n(7001),o=n(4736),s=n(7973),l=n(7648),c=n(5092),u=n(3341),d=n(8454),p=n(2183),h=n(5166),f=n(8890),_=n(7444),v=n(4621),m=n.n(v),g=n(9097),y=n.n(g),x=n(5632),C=[{path:"/home",text:"Home",icon:l.Z,visibleTo:[0,1,2]},{path:"/database",text:"Database",icon:c.Z,visibleTo:[0,1,2]},{path:"/progress",text:"Progress",icon:u.Z,visibleTo:[0]}],b=[{path:"/instructor/student_stats",text:"Student Statistics",icon:d.Z,visibleTo:[1,2]},{path:"/instructor/game_builder",text:"Game Builder",icon:p.Z,visibleTo:[2]},{path:"/instructor/new_fossil",text:"New Microfossil",icon:d.Z,visibleTo:[1,2]},{path:"/instructor/new_class",text:"New Class",icon:d.Z,visibleTo:[1,2]},{path:"/instructor/game_builder?tab=matching",text:"Matching Games",icon:d.Z,visibleTo:[2]},{path:"/instructor/add_instructor",text:"Add Instructor",icon:d.Z,visibleTo:[2]},{path:"/instructor/select_content",text:"Select Content",icon:d.Z,visibleTo:[1,2]}];t.Z=function(e){var t=e.handleLogout,n=(0,x.useRouter)(),l=(0,r.useContext)(s.Z),c=l.role,u=l.currentClass,d=l.setRole,p=(0,r.useState)(null!==c&&void 0!==c?c:-1),v=p[0],g=p[1];(0,r.useEffect)((function(){var e=localStorage.getItem("role");if(null!==e){var t=parseInt(e,10);if(!Number.isNaN(t))return g(t),void d(t)}void 0!==c&&null!==c&&c>=0&&g(c)}),[c,d]);var w=(0,r.useState)(!1),k=w[0],T=w[1],j=function(e){var t=e.split("?")[0];return n.pathname===t?"".concat(m().link_icon," ").concat(m().active):m().link_icon},A=function(e){var t=e.split("?")[0];return n.pathname===t?"".concat(m().link," ").concat(m().active):m().link};return(0,a.jsxs)("div",{children:[(0,a.jsxs)(i.d,{opened:k,onClose:function(){return T(!1)},size:"md",padding:"xl",overlayOpacity:.3,classNames:{drawer:m().drawer},children:[(0,a.jsx)("div",{className:m().logo,children:(0,a.jsx)(_.Z,{width:270,height:100,link:"/home"})}),C.map((function(e){return e.visibleTo.includes(v)&&(0,a.jsxs)("div",{className:m().link_container,children:[(0,a.jsx)(e.icon,{className:j(e.path)}),(0,a.jsx)(y(),{href:e.path,children:(0,a.jsx)("a",{className:A(e.path),children:e.text})})]},e.path)})),v>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:m().link_container,children:[(0,a.jsx)(h.Z,{className:m().link_icon}),(0,a.jsx)("div",{className:m().link,style:{cursor:"default"},children:"Manage"})]}),(0,a.jsx)("div",{className:m().instructor_container,children:b.filter((function(e){return"/instru
1ctor/add_instructor"!==e.path||"47"!==u&&"48"!==u})).map((function(e){return e.visibleTo.includes(v)&&(0,a.jsxs)("div",{className:"".concat(m().link_container," ").concat(m().manage_link),children:[(0,a.jsx)(e.icon,{className:j(e.path)}),(0,a.jsx)(y(),{href:e.path,children:(0,a.jsx)("a",{className:A(e.path),children:e.text})})]},e.path)}))})]}),(0,a.jsxs)("div",{className:m().link_container,children:[(0,a.jsx)(f.Z,{className:m().link_icon}),(0,a.jsx)("a",{className:m().link,onClick:function(){return t()},children:"Logout"})]})]}),(0,a.jsx)(o.k,{onClick:function(){return T(!0)},children:(0,a.jsx)("div",{className:m().toggle_menu})})]})}},5056:function(e,t,n){"use strict";n.d(t,{EA:function(){return c},vy:function(){return l}});var a=n(865),r=n(6670),i=n(2784),o=n(3575),s=n(2589),l={id:0,fossilType:"",genus:"",species:"",imagePath:"",width:0,height:0,outline:[],ecology:"",outlineCanvasWidth:0,outlineCanvasHeight:0,createdBy:-1,shellType:"",numberChambers:"",apertureLocation:"",apertureShape:"",morphotype:"",morphoImage:"",modelPath:"",imageType:"",environment:"",overallShape:[],chamberShape:[],chamberArrangement:[],largestChamberCanvasWidth:0,largestChamberCanvasHeight:0,centerOutlineCanvasWidth:0,centerOutlineCanvasHeight:0,apertureAreaCanvasWidth:0,apertureAreaCanvasHeight:0,largestChamber:[],centerOutline:[],apertureArea:[],funFact:"",notes:"",ornamentation:[],size:[],shape:"",smoothOrnamented:"",otherFeatures:[],mmScale:-1,widthInMm:0,variation:"",majorAxisCanvasWidth:0,majorAxisCanvasHeight:0,minorAxisCanvasWidth:0,minorAxisCanvasHeight:0,majorAxis:[],minorAxis:[]},c=function(){var e=s.S.useMutation(["classroom.saveFossil"],{onSuccess:function(e){(0,o.c0)({id:"saveFossilData",title:"Data saved",message:"Data saved for "+e.fossilName,autoClose:5e3,color:"green"})},onError:function(e){(0,o.c0)({id:"saveFossilDataError",title:"Failed to save fossil",message:e.message||"Could not save fossil data",autoClose:8e3,color:"red"})}}).mutate,t=s.S.useMutation(["classroom.saveSketch"],{onSuccess:function(e){(0,o.c0)({id:"saveFossilSketchData",title:"Sketch data saved",message:"Sketch data saved for "+e.fossilName,autoClose:5e3,color:"green"})}}).mutate,n=(0,i.useReducer)((function(n,i){switch(i.type){case"initialLoadForam":var o;return(0,r.Z)((0,a.Z)({},n,i.payload),{fossilType:"Foraminifera",imagePath:i.payload.imagePath,modelPath:null!==(o=i.payload.modelPath)&&void 0!==o?o:"",outline:i.payload.outline.map((function(e){return e.map((function(e){return{x:e.x,y:e.y}}))})),largestChamber:i.payload.largestChamber.map((function(e){return e.map((function(e){return{x:e.x,y:e.y}}))})),centerOutline:i.payload.centerOutline.map((function(e){return e.map((function(e){return{x:e.x,y:e.y}}))})),apertureArea:i.payload.apertureArea.map((function(e){return e.map((function(e){return{x:e.x,y:e.y}}))}))});case"initialLoadOstracod":return(0,r.Z)((0,a.Z)({},n,i.payload),{fossilType:"Ostracoda",outline:i.payload.outline.map((function(e){return e.map((function(e){return{x:e.x,y:e.y}}))})),majorAxis:i.payload.majorAxis.map((function(e){return e.map((function(e){return{x:e.x,y:e.y}}))})),minorAxis:i.payload.minorAxis.map((function(e){return e.map((function(e){return{x:e.x,y:e.y}}))}))});case"updateCanvasSize":switch(i.payload.sketchTab){case"max_length":return(0,r.Z)((0,a.Z)({},n),{majorAxisCanvasHeight:i.payload.canvasHeight,majorAxisCanvasWidth:i.payload.canvasWidth});case"max_height":return(0,r.Z)((0,a.Z)({},n),{minorAxisCanvasHeight:i.payload.canvasHeight,minorAxisCanvasWidth:i.payload.canvasWidth});case"outline":return(0,r.Z)((0,a.Z)({},n),{outlineCanvasHeight:i.payload.canvasHeight,outlineCanvasWidth:i.payload.canvasWidth});case"last_chamber":return(0,r.Z)((0,a.Z)({},n),{largestChamberCanvasHeight:i.payload.canvasHeight,largestChamberCanvasWidth:i.payload.canvasWidth});case"center_outline":return(0,r.Z)((0,a.Z)({},n),{centerOutlineCanvasHeight:i.payload.canvasHeight,centerOutlineCanvasWidth:i.payload.canvasWidth});case"aperture_area":return(0,r.Z)((0,a.Z)({},n),{apertureAreaCanvasHeight:i.payload.canvasHeight,apertureAreaCanvasWidth:i.payload.canvasWidth});default:return(0,a.Z)({},n)}
1case"saveFossil":var s,l,c,u=(0,a.Z)({},n,null!=(null===(s=i.payload)||void 0===s?void 0:s.imagePath)?{imagePath:i.payload.imagePath}:{},null!=(null===(l=i.payload)||void 0===l?void 0:l.id)?{id:i.payload.id}:{},null!=(null===(c=i.payload)||void 0===c?void 0:c.modelPath)?{modelPath:i.payload.modelPath}:{});if(u.id<=0)return console.warn("saveFossil skipped: fossil id is not loaded yet"),n;var d=u.genus.toLowerCase();d=(d=d.trim()).charAt(0).toUpperCase()+d.slice(1);var p,h=u.species.toLowerCase();(h=h.trim()).length>0&&(h=h.charAt(0)+h.slice(1));for(var f=(0,r.Z)((0,a.Z)({},u),{genus:d,species:h,modelPath:null!==(p=u.modelPath)&&void 0!==p?p:""}),_=["outline","largestChamber","majorAxis","minorAxis","apertureArea","centerOutline","notes","ecology","funFact","outlineCanvasWidth","outlineCanvasHeight","largestChamberCanvasWidth","largestChamberCanvasHeight","centerOutlineCanvasWidth","centerOutlineCanvasHeight","apertureAreaCanvasWidth","apertureAreaCanvasHeight","majorAxisCanvasWidth","majorAxisCanvasHeight","minorAxisCanvasWidth","minorAxisCanvasHeight"],v=0;v<_.length;v++)delete f[_[v]];return e({fossilState:f}),(0,r.Z)((0,a.Z)({},u),{genus:d,species:h});case"saveSketch":var m=[],g=0,y=0;switch(i.payload.sketchType){case"outline":m=n.outline,g=n.outlineCanvasHeight,y=n.outlineCanvasWidth;break;case"largestChamber":var x,C,b;m=null!==(x=n.largestChamber)&&void 0!==x?x:[],g=null!==(C=n.largestChamberCanvasHeight)&&void 0!==C?C:0,y=null!==(b=n.largestChamberCanvasWidth)&&void 0!==b?b:0;break;case"majorAxis":var w,k,T;m=null!==(w=n.majorAxis)&&void 0!==w?w:[],g=null!==(k=n.majorAxisCanvasHeight)&&void 0!==k?k:0,y=null!==(T=n.majorAxisCanvasWidth)&&void 0!==T?T:0;break;case"minorAxis":var j,A,S;m=null!==(j=n.minorAxis)&&void 0!==j?j:[],g=null!==(A=n.minorAxisCanvasHeight)&&void 0!==A?A:0,y=null!==(S=n.minorAxisCanvasWidth)&&void 0!==S?S:0;break;case"apertureArea":var P,W,N;m=null!==(P=n.apertureArea)&&void 0!==P?P:[],g=null!==(W=n.apertureAreaCanvasHeight)&&void 0!==W?W:0,y=null!==(N=n.apertureAreaCanvasWidth)&&void 0!==N?N:0;break;case"centerOutline":var Z,H,O;m=null!==(Z=n.centerOutline)&&void 0!==Z?Z:[],g=null!==(H=n.centerOutlineCanvasHeight)&&void 0!==H?H:0,y=null!==(O=n.centerOutlineCanvasWidth)&&void 0!==O?O:0}return t({id:n.id,genus:n.genus,species:n.species,canvasHeight:g,canvasWidth:y,fossilType:n.fossilType,sketchType:i.payload.sketchType,sketch:m}),(0,a.Z)({},n);case"load":return(0,a.Z)({},n,i.payload);case"clear":return(0,r.Z)((0,a.Z)({},n),{id:0,fossilType:"",genus:"",species:"",shellType:"",overallShape:[],chamberShape:[],chamberArrangement:[],apertureLocation:"",apertureShape:"",morphotype:"",numberChambers:"",smoothOrnamented:"",otherFeatures:[],outline:[],imagePath:"",morphoImage:"",modelPath:"",imageType:"",environment:"",largestChamber:[],centerOutline:[],apertureArea:[],outlineCanvasHeight:0,outlineCanvasWidth:0,largestChamberCanvasWidth:0,largestChamberCanvasHeight:0,centerOutlineCanvasWidth:0,centerOutlineCanvasHeight:0,apertureAreaCanvasWidth:0,apertureAreaCanvasHeight:0,majorAxisCanvasWidth:0,majorAxisCanvasHeight:0,minorAxisCanvasWidth:0,minorAxisCanvasHeight:0,majorAxis:[],minorAxis:[],ornamentation:[],size:[],shape:"",variation:"",widthInMm:0});default:return(0,a.Z)({},n)}}),l),c=n[0],u=n[1],d={setVariation:function(e){u({type:"load",payload:{variation:e}})},setShape:function(e){u({type:"load",payload:{shape:e}})},setSmoothOrnamented:function(e){u({type:"load",payload:{smoothOrnamented:e}})}},p={setWidthInMm:function(e){u({type:"load",payload:{widthInMm:e}})}},h={setSize:function(e){u({type:"load",payload:{size:e}})},setOrnamentation:function(e){u({type:"load",payload:{ornamentation:e}})},setOtherFeatures:function(e){u({type:"load",payload:{otherFeatures:e}})}},f={setShellType:function(e){u({type:"load",payload:{shellType:e}})},setNumberChambers:function(e){u({type:"load",payload:{numberChambers:e}})},setApertureLocation:function(e){u({type:"load",payload:{apertureLocation:e}})},setApertureShape:function(e){u({type:"load",payload:{apertureShape:e}})},setMorphotype:function(e){u({type:"load",payload:{morphotype:e}}
1)},setImageType:function(e){u({type:"load",payload:{imageType:e}})}},_={setOverallShape:function(e){u({type:"load",payload:{overallShape:e}})},setChamberShape:function(e){u({type:"load",payload:{chamberShape:e}})},setChamberArrangement:function(e){u({type:"load",payload:{chamberArrangement:e}})}};return{fossilState:c,fossilDispatch:u,ostracodaRadio:d,ostracodaCheckbox:h,ostracodaInput:p,validateFossilFields:function(e){return"Foraminifera"===e.fossilType?e.shellType&&e.overallShape&&e.overallShape.length>0&&e.chamberShape&&e.chamberShape.length>0&&e.numberChambers&&e.chamberArrangement&&e.chamberArrangement.length>0&&e.apertureLocation&&e.apertureShape&&e.morphotype:"Ostracoda"===e.fossilType&&(e.variation&&e.shape&&e.size&&e.size.length>0&&e.widthInMm&&e.widthInMm>0&&e.smoothOrnamented)},foraminiferaRadio:f,foraminiferaCheckbox:_,setFossilType:function(e){u({type:"load",payload:{fossilType:e}})},setFossilFilePath:function(e){u({type:"load",payload:{imagePath:e}})},setSpecies:function(e){u({type:"load",payload:{species:e}})},setCreatedBy:function(e){u({type:"load",payload:{createdBy:e}})}}}},9454:function(e,t,n){"use strict";n.d(t,{DE:function(){return m},Ix:function(){return l},JF:function(){return h},Kk:function(){return g},NO:function(){return d},a9:function(){return v},ao:function(){return f},h0:function(){return o},yk:function(){return y}});var a=n(8788),r=n(2838),i=n(2970);function o(e,t,n){return s.apply(this,arguments)}function s(){return(s=(0,a.Z)((function(e,t,n){return(0,i.__generator)(this,(function(a){return(0,r.Z)(e,File)?[2,new Promise((function(a,r){var i=new FormData;i.append("image",e),i.append("fossilType",t);var o=new XMLHttpRequest;o.upload.addEventListener("progress",(function(e){if(e.lengthComputable){var t=Math.round(e.loaded/e.total*100);n({percentage:t,status:"uploading"})}})),o.addEventListener("load",(function(){if(o.status>=200&&o.status<300)try{var e=JSON.parse(o.responseText);e.imagePath?(n({percentage:100,status:"success"}),a(e.imagePath)):(n({percentage:100,status:"error",error:"No image path in response"}),r(new Error("No image path in response")))}catch(t){n({percentage:100,status:"error",error:"Failed to parse response"}),r(new Error("Failed to parse response"))}else n({percentage:100,status:"error",error:"Upload failed: ".concat(o.status)}),r(new Error("Upload failed with status ".concat(o.status)))})),o.addEventListener("error",(function(){n({percentage:0,status:"error",error:"Network error"}),r(new Error("Network error"))})),o.open("POST","/api/uploadImage"),o.send(i)}))]:[2]}))}))).apply(this,arguments)}function l(e,t){return c.apply(this,arguments)}function c(){return(c=(0,a.Z)((function(e,t){var n,a,o,s;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return(0,r.Z)(e,File)?((n=new FormData).append("image",e),n.append("fossilType",t),o={},[4,fetch("/api/uploadImage",(o.method="POST",o.body=n,o))]):[2];case 1:return[4,(a=i.sent()).json().catch((function(){return{}}))];case 2:if(s=i.sent(),!a.ok)throw new Error("string"===typeof s.error?s.error:"Upload failed (".concat(a.status,")"));if(s.imagePath)return[2,s.imagePath];throw new Error("Server did not return an image path")}}))}))).apply(this,arguments)}function u(){var e=window.location,t=e.hostname,n=e.protocol;return"localhost"===t||"127.0.0.1"===t?"".concat(n,"//").concat(t,":8000/api/uploadImage"):"/api/uploadImage"}function d(e,t){return p.apply(this,arguments)}function p(){return(p=(0,a.Z)((function(e,t){return(0,i.__generator)(this,(function(n){if(!(0,r.Z)(e,File))throw new Error("Invalid file");return[2,new Promise((function(n,a){var r=new FormData;r.append("image",e),r.append("fossilType","3D_models");var i=new XMLHttpRequest;i.withCredentials=!0,i.upload.addEventListener("progress",(function(e){if(e.lengthComputable){var n=Math.min(99,Math.round(e.loaded/e.total*100));null===t||void 0===t||t({percentage:n,status:"uploading"})}})),i.addEventListener("load",(function(){var e={};try{e=JSON.parse(i.responseText||"{}")}catch(o){}if(i.status>=200&&i.status<300&&e.imagePath)return null===t||void 0===t||t({percentage:100,status:"success"}),void n(e.imagePath);var r="string"===typeof e.error?e.error:"Upload failed (".concat(i.status||"network",")");null===t||void 0===t||t({percentage:0,status:"error",error:r}),a(new Error(r))})),i.addEventListener("error",(function(){null===t||void 0===t||t({percentage:0,status:"error",error:"Network error"}),a(new Error("Network error during model upload"))})),i.addEventListener("timeout",(function(){a(new Error("Upload timed out"))})),i.open("POST",u()),i.timeout=6e5,null===t||void 0===t||t({percentage:0,status:"uploading"}),i.send(r)}))]}))}))).apply(this,arguments)}function h(e,t){if(!(null===e||void 0===e?void 0:e.trim()))return null;var n=e.trim(),a=n.startsWith("{")||/sketchfab\.com/i.test(n);if(!a&&/\.(glb|gltf)$/i.test(n))return/^https?:\/\//i.test(n)||n.startsWith("/")?n:v(n.startsWith("/")?n.slice(1):n);if(null===t||void 0===t?void 0:t.trim()){var r=t.toLowerCase().replace(/^fossil\s+/,"").trim(),i="trifarina"===r?"trifarina_angulosa":r.replace(/ /g,"_");
1return"https://storage.googleapis.com/fossilsketch/3D_models/".concat(i,".glb")}return null}function f(e,t){return _.apply(this,arguments)}function _(){return(_=(0,a.Z)((function(e,t){var n;return(0,i.__generator)(this,(function(a){switch(a.label){case 0:return""===e?[3,2]:(n={},[4,fetch("/api/deleteImage",(n.method="POST",n.headers={"Content-Type":"application/json"},n.body=JSON.stringify({fileName:e,fossilType:t.toLowerCase()}),n)).then((function(e){return e.json()}))]);case 1:a.sent(),a.label=2;case 2:return[2]}}))}))).apply(this,arguments)}function v(e){if(e.startsWith("http"))return e;return"https://storage.googleapis.com/".concat("fossilsketch","/").concat(e.startsWith("/")?e.substring(1):e)}function m(e){var t=e.toLowerCase();return"foraminifera"===t||"forams"===t||"morphotype"===t||"morphotypes"===t?"foraminifera":"ostracoda"===t?"ostracoda":t}function g(e,t){if(!(null===e||void 0===e?void 0:e.trim()))return null;var n=e.trim();if(/^https?:\/\//i.test(n))return n;if(n.startsWith("/api/uploads/"))return n;var a=m(t),r=n.replaceAll(" ","");return r.includes("/")||(r="".concat(a,"/").concat(r)),"localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname?"/api/uploads/".concat(r):v(r)}function y(e){return x.apply(this,arguments)}function x(){return(x=(0,a.Z)((function(e){var t,n;return(0,i.__generator)(this,(function(a){switch(a.label){case 0:return""===e?[3,2]:(n={},[4,fetch("/api/fetchImageNames",(n.method="POST",n.headers={"Content-Type":"application/json"},n.body=JSON.stringify({folderName:e}),n)).then((function(e){return e.json()}))]);case 1:return(t=a.sent()).imagePaths?[2,t.imagePaths]:[2,[]];case 2:return[2]}}
1))}))).apply(this,arguments)}},8655:function(e){e.exports={sketch_canvas:"canvas_sketch_canvas__PI9JM",sketch_canvas_viewport:"canvas_sketch_canvas_viewport__gsu4z",sketch_canvas_editor:"canvas_sketch_canvas_editor__oL6t4",button_container:"canvas_button_container__0zi_K",button_container_viewport:"canvas_button_container_viewport__1gZCJ",button_container_editor:"canvas_button_container_editor__WiEDN",pencil:"canvas_pencil__xj1fu",eraser:"canvas_eraser__UAghl"}},7996:function(e){e.exports={background:"identify_fossil_background__6Hw51",step_select_container:"identify_fossil_step_select_container__FD4YQ",step_select_container_fixed:"identify_fossil_step_select_container_fixed__2_vyn",step_select_top:"identify_fossil_step_select_top__jv803",step:"identify_fossil_step__S784J",step_text:"identify_fossil_step_text__pk6Of",step_text_container:"identify_fossil_step_text_container__hQuy_",progressBar:"identify_fossil_progressBar__WbiM1",choice_panel_container:"identify_fossil_choice_panel_container__fC_Pj",choice_panel:"identify_fossil_choice_panel__lvjMH",panel_container:"identify_fossil_panel_container__joPzr",panel_image_container:"identify_fossil_panel_image_container__AhR2f",panel_image:"identify_fossil_panel_image__gBqJD",panel_image_compact:"identify_fossil_panel_image_compact__CLhe9",panel_button_compact:"identify_fossil_panel_button_compact__extZz",ruler:"identify_fossil_ruler__asfYO",panel_button:"identify_fossil_panel_button__7sPwj",panel_button_text_only:"identify_fossil_panel_button_text_only__MlHQT",finish_button:"identify_fossil_finish_button__9f301",helper_text:"identify_fossil_helper_text__K8x9m",sidebar:"identify_fossil_sidebar__sL4H_",observations:"identify_fossil_observations__Qh8II",obseration_list:"identify_fossil_obseration_list__M9vOw",observation:"identify_fossil_observation___u7NR",fossil_select_container:"identify_fossil_fossil_select_container__inzMw",fossil_select_container_spaced:"identify_fossil_fossil_select_container_spaced___Pfzy",inner_fossil_select_container:"identify_fossil_inner_fossil_select_container__dQWO0",options_card:"identify_fossil_options_card__TV5SN",options_card_title:"identify_fossil_options_card_title__6UFaa",options_card_properties:"identify_fossil_options_card_properties__Pze62",options_card_property:"identify_fossil_options_card_property__a9gmZ",correct:"identify_fossil_correct__N9qC9",options_card_button_container:"identify_fossil_options_card_button_container__tfBUr",options_card_button:"identify_fossil_options_card_button__LM8ZV",final_modal:"identify_fossil_final_modal__5m_PO","mantine-Modal-modal":"identify_fossil_mantine-Modal-modal___9jb5",stars:"identify_fossil_stars__GX3tH",final_feedback:"identify_fossil_final_feedback__1jSfz",funfact:"identify_fossil_funfact__jbse2",database_button:"identify_fossil_database_button__V2Zy1",traitLine:"identify_fossil_traitLine__bT9c7",checkWrapper:"identify_fossil_checkWrapper__Zo01W",emptyIcon:"identify_fossil_emptyIcon__zq2TT"}},4621:function(e){e.exports={drawer:"sidebar_drawer__KpNLV",logo:"sidebar_logo__3EwEr",link_container:"sidebar_link_container__pZwwX",link_icon:"sidebar_link_icon___D4fO",active:"sidebar_active__zubOB",link:"sidebar_link__gXfrl",instructor_container:"sidebar_instructor_container__K4glu",manage_link:"sidebar_manage_link__MXySh",toggle_menu:"sidebar_toggle_menu__dg0Az"}},1611:function(){},8413:function(){}}]);

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.