Files
gnommoplayer/public/glitch/glitch_gallery/assets/index-DOdpM0HQ.js
T

2 lines
6.2 KiB
JavaScript
Raw Normal View History

2026-04-11 09:21:22 +02:00
import{r as s,j as t}from"./index-CEeZxcxj.js";const b="_container_18jex_3",B="_grid_18jex_18",C="_textBlock_18jex_34",f="_mainText_18jex_41",k="_delayed_18jex_50",I="_sphere_18jex_63",M="_glitching_18jex_82",S="_voxelOverlay_18jex_113",w="_visible_18jex_122",$="_voxel_18jex_113",A="_rebelText_18jex_137",G="_enterButton_18jex_146",O="_migrationContent_18jex_168",D="_tagline_18jex_175",F="_notList_18jex_183",E="_notItem_18jex_190",L="_isText_18jex_212",R="_ruleBox_18jex_221",W="_ruleTitle_18jex_231",U="_ruleContent_18jex_238",z="_continueButton_18jex_244",H="_agreementContent_18jex_265",P="_agreementTitle_18jex_272",Y="_pledgeText_18jex_280",q="_signatureArea_18jex_293",J="_paper_18jex_302",K="_signatureMark_18jex_313",Q="_pencil_18jex_339",V="_animating_18jex_346",X="_signButton_18jex_365",Z="_navigationContent_18jex_390",ee="_welcomeText_18jex_397",te="_choiceButtons_18jex_405",ne="_choiceButton_18jex_405",se="_choiceTitle_18jex_434",ie="_choiceDesc_18jex_440",ae="_arrow_18jex_445",oe="_screenFadeIn_18jex_463",e={container:b,grid:B,textBlock:C,mainText:f,delayed:k,sphere:I,glitching:M,voxelOverlay:S,visible:w,voxel:$,rebelText:A,enterButton:G,migrationContent:O,tagline:D,notList:F,notItem:E,isText:L,ruleBox:R,ruleTitle:W,ruleContent:U,continueButton:z,agreementContent:H,agreementTitle:P,pledgeText:Y,signatureArea:q,paper:J,signatureMark:K,pencil:Q,animating:V,signButton:X,navigationContent:Z,welcomeText:ee,choiceButtons:te,choiceButton:ne,choiceTitle:se,choiceDesc:ie,arrow:ae,screenFadeIn:oe};function me({onComplete:l,onProgress:d,theme:n,className:h}){const[a,c]=s.useState("disorientation"),[x,m]=s.useState(!1),[_,j]=s.useState(!1),[u,p]=s.useState(!1),o=n?{"--gc-primary":n.primary,"--gc-accent":n.accent,"--gc-bg":n.bg,"--gc-bgSecondary":n.bgSecondary,"--gc-text":n.text,"--gc-textMuted":n.textMuted,"--gc-border":n.border}:{};s.useEffect(()=>{d?.({disorientation:25,migration:50,agreement:75,navigation:100}[a])},[a,d]),s.useEffect(()=>{if(a!=="disorientation")return;const i=()=>{m(!0),setTimeout(()=>m(!1),150)},r=setTimeout(i,4e3),T=setInterval(()=>{const y=Math.random()*3e3+3e3;setTimeout(i,y)},6e3);return()=>{clearTimeout(r),clearInterval(T)}},[a]);const v=s.useCallback(()=>{j(!0),setTimeout(()=>{p(!0),setTimeout(()=>{c("navigation")},1e3)},800)},[]),g=s.useCallback(i=>{l({success:!0,data:{choice:i,agreedToTerms:!0},rewards:{achievements:["onboarding_complete"],unlocks:i==="lesson"?["tech_tree"]:["character_builder"]}})},[l]),N={disorientation:()=>t.jsxs("div",{className:`${e.container} ${e.screenFadeIn}`,style:o,children:[t.jsx("div",{className:e.grid}),t.jsxs("div",{className:e.textBlock,children:[t.jsx("p",{className:e.mainText,children:"You are standing on a smooth sphere. It looks continuous. It feels continuous."}),t.jsx("div",{className:e.sphere+(x?` ${e.glitching}`:""),children:t.jsx("div",{className:e.voxelOverlay+(x?` ${e.visible}`:""),children:Array.from({length:36}).map((i,r)=>t.jsx("div",{className:e.voxel,style:{opacity:Math.random()>.5?.8:0}},r))})}),t.jsx("p",{className:`${e.mainText} ${e.delayed}`,children:"But what if it isn't?"}),t.jsxs("p",{className:e.rebelText,children:["Most people assume the universe is continuous.",t.jsx("br",{}),"We're not most people."]}),t.jsx("button",{className:e.enterButton,onClick:()=>c("migration"),children:"Enter the Glitch"})]})]}),migration:()=>t.jsxs("div",{className:`${e.container} ${e.screenFadeIn}`,style:o,children:[t.jsx("div",{className:e.grid}),t.jsxs("div",{className:e.migrationContent,children:[t.jsx("p",{className:e.tagline,children:"A migration project for physics. That might fail. Or not."}),t.jsxs("ul",{className:e.notList,children:[t.jsx("li",{className:e.notItem,children:"This is not a fringe physics forum."}),t.jsx("li",{className:e.notItem,children:"This is not an online RPG."}),t.jsx("li",{className:e.notItem,children:"This is not a lecture series in philosophy, physics and computer science."})]}),t.jsx("p",{className:e.isText,children:"It's all of those things."}),t.jsxs("div",{className:e.ruleBox,children:[t.jsx("div",{className:e.ruleTitle,child