PageSourceSearch

https://fossilsketch.org/_next/static/chunks/pages/games/bug_cat-bb287e293f4df269.js

js fossilsketch.org collected 2026-10-09 00:41:14 UTC 13,714 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7880],{4519:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/games/bug_cat",function(){return r(5485)}])},2835:function(e,t,r){"use strict";var n=r(2322),o=r(449),a=r.n(o),i=r(4761);t.Z=function(e){var t=e.imgPath,r="url(/icons/"+t+".svg)",o=(0,i.rZ)();return(0,n.jsx)("div",{className:a().icon,style:{backgroundImage:r,backgroundColor:"checkLarge"===t?o.colors.cyan[7]:"xLarge"===t?"#bb1717":"transparent"}})}},5485:function(e,t,r){"use strict";r.r(t);var n=r(2322),o=r(6766),a=r.n(o),i=r(1783),s=r(7030),c=r(3750);t.default=function(e){var t=e.handleLogout;return(0,n.jsxs)("div",{className:a().background,children:[(0,n.jsx)(i.Z,{handleLogout:t}),(0,n.jsx)(s.Z,{titles:["Distinguish between ostracoda and foraminifera","Distinguish between benthic and planktonic foraminifera"],numCards:15,categoriesArr:[["ostracoda","foraminifera","Other"],["benthic foram","planktonic foram"]],foldersArr:[["distinguishGame/ostracoda","distinguishGame/foraminifera","distinguishGame/others"],["distinguishGame/foraminifera","distinguishGame/planktonics"]],gameName:"bug_sorting",gameEnd:!0,multiLevel:!0,surveyConfig:c.C})]})}},9454:function(e,t,r){"use strict";r.d(t,{DE:function(){return v},Ix:function(){return c},JF:function(){return p},Kk:function(){return w},NO:function(){return d},a9:function(){return g},ao:function(){return h},h0:function(){return i},yk:function(){return y}});var n=r(8788),o=r(2838),a=r(2970);function i(e,t,r){return s.apply(this,arguments)}function s(){return(s=(0,n.Z)((function(e,t,r){return(0,a.__generator)(this,(function(n){return(0,o.Z)(e,File)?[2,new Promise((function(n,o){var a=new FormData;a.append("image",e),a.append("fossilType",t);var i=new XMLHttpRequest;i.upload.addEventListener("progress",(function(e){if(e.lengthComputable){var t=Math.round(e.loaded/e.total*100);r({percentage:t,status:"uploading"})}})),i.addEventListener("load",(function(){if(i.status>=200&&i.status<300)try{var e=JSON.parse(i.responseText);e.imagePath?(r({percentage:100,status:"success"}),n(e.imagePath)):(r({percentage:100,status:"error",error:"No image path in response"}),o(new Error("No image path in response")))}catch(t){r({percentage:100,status:"error",error:"Failed to parse response"}),o(new Error("Failed to parse response"))}else r({percentage:100,status:"error",error:"Upload failed: ".concat(i.status)}),o(new Error("Upload failed with status ".concat(i.status)))})),i.addEventListener("error",(function(){r({percentage:0,status:"error",error:"Network error"}),o(new Error("Network error"))})),i.open("POST","/api/uploadImage"),i.send(a)}))]:[2]}))}))).apply(this,arguments)}function c(e,t){return l.apply(this,arguments)}function l(){return(l=(0,n.Z)((function(e,t){var r,n,i,s;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return(0,o.Z)(e,File)?((r=new FormData).append("image",e),r.append("fossilType",t),i={},[4,fetch("/api/uploadImage",(i.method="POST",i.body=r,i))]):[2];case 1:return[4,(n=a.sent()).json().catch((function(){return{}}))];case 2:if(s=a.sent(),!n.ok)throw new Error("string"===typeof s.error?s.error:"Upload failed (".concat(n.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,r=e.protocol;return"localhost"===t||"127.0.0.1"===t?"".concat(r,"//").concat(t,":8000/api/uploadImage"):"/api/uploadImage"}function d(e,t){return f.apply(this,arguments)}function f(){return(f=(0,n.Z)((function(e,t){return(0,a.__generator)(this,(function(r){if(!(0,o.Z)(e,File))throw new Error("Invalid file");return[2,new Promise((function(r,n){var o=new FormData;o.append("image",e),o.append("fossilType","3D_models");var a=new XMLHttpRequest;a.withCredentials=!0,a.upload.addEventListener("progress",(function(e){if(e.lengthComputable){var r=Math.min(99,Math.round(e.loaded/e.total*100));null===t||void 0===t||t({percentage:r,status:"uploading"})}})),a.addEventListener("load",(function(){var e={};try{e=JSON.parse(a.responseText||"{}")}catch(i){}if(a.status>=200&&a.status<300&&e.imagePath)return null===t||void 0===t||t({percentage:100,status:"success"}),void r(e.imagePath);var o="string"===typeof e.error?e.error:"Upload failed (".concat(a.status||"network",")");null===t||void 0===t||t({percentage:0,status:"error",error:o}),n(new Error(o))})),a.addEventListener("error",(function(){null===t||void 0===t||t({percentage:0,status:"error",error:"Network error"}),n(new Error("Network error during model upload"))})),a.addEventListener("timeout",(function(){n(new Error("Upload timed out"))})),a.open("POST",u()),a.timeout=6e5,null===t||void 0===t||t({percentage:0,status:"uploading"}),a.send(o)}))]}))}))).apply(this,arguments)}function p(e,t){if(!(null===e||void 0===e?void 0:e.trim()))return null;var r=e.trim(),n=r.startsWith("{")||/sketchfab\.com/i.test(r);if(!n&&/\.(glb|gltf)$/i.test(r))return/^https?:\/\//i.test(r)||r.startsWith("/")?r:g(r.startsWith("/")?r.slice(1):r);if(null===t||void 0===t?void 0:t.trim()){var o=t.toLowerCase().replace(/^fossil\s+/,"").trim(),a="trifarina"===o?"trifarina_angulosa":o.replace(/ /g,"_");
1return"https://storage.googleapis.com/fossilsketch/3D_models/".concat(a,".glb")}return null}function h(e,t){return m.apply(this,arguments)}function m(){return(m=(0,n.Z)((function(e,t){var r;return(0,a.__generator)(this,(function(n){switch(n.label){case 0:return""===e?[3,2]:(r={},[4,fetch("/api/deleteImage",(r.method="POST",r.headers={"Content-Type":"application/json"},r.body=JSON.stringify({fileName:e,fossilType:t.toLowerCase()}),r)).then((function(e){return e.json()}))]);case 1:n.sent(),n.label=2;case 2:return[2]}}))}))).apply(this,arguments)}function g(e){if(e.startsWith("http"))return e;return"https://storage.googleapis.com/".concat("fossilsketch","/").concat(e.startsWith("/")?e.substring(1):e)}function v(e){var t=e.toLowerCase();return"foraminifera"===t||"forams"===t||"morphotype"===t||"morphotypes"===t?"foraminifera":"ostracoda"===t?"ostracoda":t}function w(e,t){if(!(null===e||void 0===e?void 0:e.trim()))return null;var r=e.trim();if(/^https?:\/\//i.test(r))return r;if(r.startsWith("/api/uploads/"))return r;var n=v(t),o=r.replaceAll(" ","");return o.includes("/")||(o="".concat(n,"/").concat(o)),"localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname?"/api/uploads/".concat(o):g(o)}function y(e){return b.apply(this,arguments)}function b(){return(b=(0,n.Z)((function(e){var t,r;return(0,a.__generator)(this,(function(n){switch(n.label){case 0:return""===e?[3,2]:(r={},[4,fetch("/api/fetchImageNames",(r.method="POST",r.headers={"Content-Type":"application/json"},r.body=JSON.stringify({folderName:e}),r)).then((function(e){return e.json()}))]);case 1:return(t=n.sent()).imagePaths?[2,t.imagePaths]:[2,[]];case 2:return[2]}}
1))}))).apply(this,arguments)}},449:function(e){e.exports={icon:"round_button_icon__wOxvf"}},6335:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(8409),o=r(2784),a=["size","color"];function i(e){var t=e.size,r=void 0===t?24:t,i=e.color,s=void 0===i?"currentColor":i,c=(0,n.Kd)(e,a);return o.createElement("svg",(0,n.gY)({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-check",width:r,height:r,viewBox:"0 0 24 24",stroke:s,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},c),o.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),o.createElement("path",{d:"M5 12l5 5l10 -10"}))}},7082:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(8409),o=r(2784),a=["size","color"];function i(e){var t=e.size,r=void 0===t?24:t,i=e.color,s=void 0===i?"currentColor":i,c=(0,n.Kd)(e,a);return o.createElement("svg",(0,n.gY)({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-x",width:r,height:r,viewBox:"0 0 24 24",stroke:s,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},c),o.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),o.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))}},2870:function(e,t,r){"use strict";r.d(t,{E:function(){return S}});var n=r(2784),o=r(4761),a=r(7048),i=Object.defineProperty,s=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,u=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;function d(e){return n.createElement("svg",((e,t)=>{for(var r in t||(t={}))c.call(t,r)&&u(e,r,t[r]);if(s)for(var r of s(t))l.call(t,r)&&u(e,r,t[r]);return e})({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),n.createElement("path",{d:"M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}var f=r(6817),p=Object.defineProperty,h=Object.defineProperties,m=Object.getOwnPropertyDescriptors,g=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,y=(e,t,r)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b=(e,t)=>{for(var r in t||(t={}))v.call(t,r)&&y(e,r,t[r]);if(g)for(var r of g(t))w.call(t,r)&&y(e,r,t[r]);return e},E=(e,t)=>h(e,m(t)),k=(0,f.k)(((e,{radius:t})=>({root:{},imageWrapper:{position:"relative"},figure:{margin:0},image:E(b({},e.fn.fontStyles()),{display:"block",width:"100%",height:"100%",border:0,borderRadius:e.fn.size({size:t,sizes:e.radius})}),caption:{color:"dark"===e.colorScheme?e.colors.dark[2]:e.colors.gray[7],marginTop:e.spacing.xs},placeholder:E(b({},e.fn.cover()),{display:"flex",alignItems:"center",justifyContent:"center",color:"dark"===e.colorScheme?e.colors.dark[2]:e.colors.gray[6],backgroundColor:"dark"===e.colorScheme?e.colors.dark[8]:e.colors.gray[0],borderRadius:e.fn.size({size:t,sizes:e.radius})})}))),C=r(4459),N=r(5117),O=Object.defineProperty,P=Object.getOwnPropertySymbols,L=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable,x=(e,t,r)=>t in e?O(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,j=(e,t)=>{for(var r in t||(t={}))L.call(t,r)&&x(e,r,t[r]);if(P)for(var r of P(t))_.call(t,r)&&x(e,r,t[r]);return e};const Z={fit:"cover",width:"100%",height:"auto",radius:0},S=(0,n.forwardRef)(((e,t)=>{const r=(0,o.N4)("Image",Z,e),{className:i,alt:s,src:c,fit:l,width:u,height:f,radius:p,imageProps:h,withPlaceholder:m,placeholder:g,imageRef:v,classNames:w,styles:y,caption:b,unstyled:E,style:O}=r,x=((e,t)=>{var r={};for(var n in e)L.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&P)for(var n of P(e))t.indexOf(n)<0&&_.call(e,n)&&(r[n]=e[n]);return r})(r,["className","alt","src","fit","width","height","radius","imageProps","withPlaceholder","placeholder","imageRef","classNames","styles","caption","unstyled","style"]),{classes:S,cx:I}
1=k({radius:p},{classNames:w,styles:y,unstyled:E,name:"Image"}),[T,M]=(0,n.useState)(!1),[z,F]=(0,n.useState)(!c),W=m&&(!T||z);return(0,a.l)((()=>{M(!1),F(!1)}),[c]),n.createElement(C.x,j({className:I(S.root,i),ref:t,style:j({width:u,height:f},O)},x),n.createElement("figure",{className:S.figure},n.createElement("div",{className:S.imageWrapper},n.createElement("img",j({className:S.image,src:c,alt:s,style:{objectFit:l,width:u,height:f},ref:v,onLoad:e=>{M(!0),"function"===typeof(null==h?void 0:h.onLoad)&&h.onLoad(e)},onError:e=>{F(!0),"function"===typeof(null==h?void 0:h.onError)&&h.onError(e)}},h)),W&&n.createElement("div",{className:S.placeholder,title:s},g||n.createElement(d,{style:{width:40,height:40}}))),!!b&&n.createElement(N.x,{component:"figcaption",size:"sm",align:"center",className:S.caption},b)))}));S.displayName="@mantine/core/Image"},8788:function(e,t,r){"use strict";function n(e,t,r,n,o,a,i){try{var s=e[a](i),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,o)}function o(e){return function(){var t=this,r=arguments;return new Promise((function(o,a){var i=e.apply(t,r);function s(e){n(i,o,a,s,c,"next",e)}function c(e){n(i,o,a,s,c,"throw",e)}s(void 0)}))}}r.d(t,{Z:function(){return o}})},2838:function(e,t,r){"use strict";function n(e,t){return null!=t&&"undefined"!==typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}r.d(t,{Z:function(){return n}})},930:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(630);var o=r(8366);var a=r(5459);function i(e){return function(e){if(Array.isArray(e))return(0,n.Z)(e)}(e)||(0,o.Z)(e)||(0,a.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}}},function(e){e.O(0,[4185,6577,443,9341,256,6943,7030,9774,2888,179],(function(){return t=4519,e(e.s=t);var t}));var t=e.O();_N_E=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.