3 lines
8.4 KiB
JavaScript
3 lines
8.4 KiB
JavaScript
module.exports=[36313,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored.contexts.HooksClientContext},18341,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored.contexts.ServerInsertedHtml},18622,(a,b,c)=>{b.exports=a.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},20635,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},32319,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},42602,(a,b,c)=>{"use strict";b.exports=a.r(18622)},87924,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactJsxRuntime},72131,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].React},9270,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored.contexts.AppRouterContext},46058,(a,b,c)=>{"use strict";function d(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(d=function(a){return a?c:b})(a)}c._=function(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=d(b);if(c&&c.has(a))return c.get(a);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in a)if("default"!==g&&Object.prototype.hasOwnProperty.call(a,g)){var h=f?Object.getOwnPropertyDescriptor(a,g):null;h&&(h.get||h.set)?Object.defineProperty(e,g,h):e[g]=a[g]}return e.default=a,c&&c.set(a,e),e}},39118,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={DEFAULT_SEGMENT_KEY:function(){return l},NOT_FOUND_SEGMENT_KEY:function(){return m},PAGE_SEGMENT_KEY:function(){return k},addSearchParamsIfPageSegment:function(){return i},computeSelectedLayoutSegment:function(){return j},getSegmentValue:function(){return f},getSelectedLayoutSegmentPath:function(){return function a(b,c,d=!0,e=[]){let g;if(d)g=b[1][c];else{let a=b[1];g=a.children??Object.values(a)[0]}if(!g)return e;let h=f(g[0]);return!h||h.startsWith(k)?e:(e.push(h),a(g,c,!1,e))}},isGroupSegment:function(){return g},isParallelRouteSegment:function(){return h}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});function f(a){return Array.isArray(a)?a[1]:a}function g(a){return"("===a[0]&&a.endsWith(")")}function h(a){return a.startsWith("@")&&"@children"!==a}function i(a,b){if(a.includes(k)){let a=JSON.stringify(b);return"{}"!==a?k+"?"+a:k}return a}function j(a,b){if(!a||0===a.length)return null;let c="children"===b?a[0]:a[a.length-1];return c===l?null:c}let k="__PAGE__",l="__DEFAULT__",m="/_not-found"},85170,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(50944);function e(){let a=(0,c.useRef)(null);return(0,c.useEffect)(()=>{let b,c=a.current,d=c.getContext("2d"),e=Array.from({length:180},()=>({x:Math.random()*window.innerWidth,y:Math.random()*window.innerHeight,z:Math.random()*window.innerWidth,pz:0})),f=()=>{c.width=window.innerWidth,c.height=window.innerHeight};f(),window.addEventListener("resize",f);let g=()=>{d.fillStyle="rgba(5,3,15,0.25)",d.fillRect(0,0,c.width,c.height),e.forEach(a=>{a.pz=a.z,a.z-=4,a.z<=0&&(a.x=Math.random()*c.width,a.y=Math.random()*c.height,a.z=c.width,a.pz=a.z);let b=(a.x-c.width/2)*(c.width/a.z)+c.width/2,e=(a.y-c.height/2)*(c.width/a.z)+c.height/2,f=(a.x-c.width/2)*(c.width/a.pz)+c.width/2,g=(a.y-c.height/2)*(c.width/a.pz)+c.height/2,h=Math.max(.3,(1-a.z/c.width)*2.5),i=1-a.z/c.width;d.strokeStyle=`rgba(200,190,255,${i})`,d.lineWidth=h,d.beginPath(),d.moveTo(f,g),d.lineTo(b,e),d.stroke()}),b=requestAnimationFrame(g)};return g(),()=>{cancelAnimationFrame(b),window.removeEventListener("resize",f)}},[]),(0,b.jsx)("canvas",{ref:a,className:"fixed inset-0 z-0",style:{background:"#05030f"}})}function f({text:a,visible:c,className:d=""}){return(0,b.jsx)("div",{className:`transition-all duration-1000 ${d}`,style:{opacity:+!!c,transform:c?"translateY(0)":"translateY(12px)"},children:a})}function g({onDone:a}){let[d,e]=(0,c.useState)(0);return(0,c.useEffect)(()=>{let a=[setTimeout(()=>e(1),600),setTimeout(()=>e(2),2200),setTimeout(()=>e(3),3e3),setTimeout(()=>e(4),4800),setTimeout(()=>e(5),5600)];return()=>a.forEach(clearTimeout)},[]),(0,b.jsxs)("div",{className:"relative z-10 flex h-screen h-dvh flex-col items-center justify-center px-8 text-center",children:[(0,b.jsx)(f,{text:"灵镜",visible:1===d||2===d,className:"text-5xl font-light tracking-[0.3em] text-white/90"}),(0,b.jsx)(f,{text:"一场温柔但有穿透力的对话",visible:3===d||4===d,className:"text-lg font-light tracking-widest text-white/60"}),(0,b.jsx)("div",{className:"transition-all duration-1000",style:{opacity:+(d>=5),transform:d>=5?"translateY(0)":"translateY(12px)"},children:(0,b.jsx)("button",{onClick:a,style:{color:"white",textDecoration:"underline",textUnderlineOffset:"4px",fontSize:"0.875rem",letterSpacing:"0.2em",background:"none",border:"none",cursor:"pointer"},children:"开始探索"})})]})}function h({question:a,onAnswer:d,questionIndex:e,total:f}){let[g,h]=(0,c.useState)(!1),[i,j]=(0,c.useState)(""),[k,l]=(0,c.useState)(!1),m=(0,c.useRef)(null);(0,c.useEffect)(()=>{h(!1),j(""),l(!1);let a=setTimeout(()=>{h(!0),setTimeout(()=>m.current?.focus(),600)},100);return()=>clearTimeout(a)},[a]);let n=()=>{i.trim()&&(l(!0),setTimeout(()=>d(i.trim()),800))};return(0,b.jsx)("div",{className:"chat-page relative z-10 flex h-screen h-dvh flex-col items-center justify-center px-8",children:(0,b.jsxs)("div",{className:"w-full max-w-md space-y-8",children:[(0,b.jsx)("div",{className:"text-center text-lg font-light leading-relaxed tracking-wide text-white/85 transition-all duration-700",style:{opacity:g&&!k?1:0,transform:g&&!k?"translateY(0)":k?"translateY(-16px)":"translateY(16px)"},children:a}),(0,b.jsxs)("div",{className:"transition-all duration-700",style:{opacity:g&&!k?1:0,transform:g&&!k?"translateY(0)":"translateY(16px)"},children:[(0,b.jsx)("textarea",{ref:m,rows:3,value:i,onChange:a=>j(a.target.value),onKeyDown:a=>{"Enter"!==a.key||a.shiftKey||(a.preventDefault(),n())},placeholder:"输入你的回答,或输入 跳过",className:"w-full resize-none rounded-2xl border border-white/10 bg-white/5 px-5 py-4 text-sm text-white/80 placeholder-white/20 outline-none focus:border-white/25 transition-colors"}),(0,b.jsx)("div",{className:"mt-4 flex justify-center",children:(0,b.jsx)("button",{type:"button",onClick:n,disabled:!i.trim(),className:"continue-btn !text-white underline underline-offset-4 text-sm tracking-widest disabled:opacity-100",style:{color:"#fff",background:"none",border:"none",cursor:i.trim()?"pointer":"not-allowed",letterSpacing:"0.1em"},children:"继续 →"})})]})]})})}function i(){let[a,f]=(0,c.useState)("intro"),[i,j]=(0,c.useState)(""),[k,l]=(0,c.useState)(0),[m,n]=(0,c.useState)(30),[o,p]=(0,c.useState)(""),q=(0,d.useRouter)(),r=async()=>{f("loading");try{let a=await fetch("/api/session/new",{method:"POST"}),b=await a.json();p(b.sessionId),localStorage.setItem("lingjing_sid",b.sessionId),j(b.opening),l(1),n(b.total||30),f("chat")}catch{f("chat"),j("开始前,我想先简单认识你一下。就像朋友聊天,想到什么说什么就行,没有标准答案。咱们先从几个轻松的小问题开始,可以吗?"),l(1)}},s=async a=>{try{let b=await fetch("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:o,answer:a})}),c=await b.json();if(c.done){f("done"),setTimeout(()=>q.push("/waiting"),1200);return}j(c.reply),l(a=>a+1)}catch{j("网络有点问题,我们继续。你刚才的回答我已经记住了。"),l(a=>a+1)}};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(e,{}),"intro"===a&&(0,b.jsx)(g,{onDone:r}),"loading"===a&&(0,b.jsx)("div",{className:"relative z-10 flex h-screen h-dvh items-center justify-center",children:(0,b.jsx)("div",{className:"text-sm tracking-widest text-white/30 animate-pulse",children:"正在连接..."})}),"chat"===a&&(0,b.jsx)(h,{question:i,onAnswer:s,questionIndex:k,total:m}),"done"===a&&(0,b.jsx)("div",{className:"relative z-10 flex h-screen h-dvh items-center justify-center",children:(0,b.jsx)("div",{className:"text-sm tracking-widest text-white/30 animate-pulse",children:"正在生成你的报告..."})})]})}a.s(["default",()=>i])}];
|
|
|
|
//# sourceMappingURL=%5Broot-of-the-server%5D__ded7f4b3._.js.map
|