Files
perler-lab/competitor-analysis/js/148vkvkqm_decoded.txt
T
Sisyphus (主代理) 02762400fb chore: 项目基线提交 - 拼豆图纸生成器 V1.0 核心代码
- 前端: React+Vite 首页/AI专区, 算法库(MARD色板/量化/背景去除), API对接
- 后端: Express+SQLite, 兑换码/订单/支付/chibi生成, 风控+云端同步
- CI/CD: GitHub Actions + Docker + nginx 配置
- 文档: PRD/DESIGN/LAUNCH/ROADMAP/E2E/竞品对照等 15 份
- 工程: 任务看板(taskboard) + 健康巡检(agent-health) + Git流程(gitflow)
2026-08-13 21:40:27 +08:00

4 lines
42 KiB
Plaintext

(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18581,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"useMergedRef",{enumerable:!0,get:function(){return i}});let r=e.r(71645);function i(e,t){let n=(0,r.useRef)(null),i=(0,r.useRef)(null);return(0,r.useCallback)(r=>{if(null===r){let e=n.current;e&&(n.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(n.current=s(e,r)),t&&(i.current=s(t,r))},[e,t])}function s(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let n=e(t);return"function"==typeof n?n:()=>e(null)}}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},95057,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={formatUrl:function(){return l},formatWithValidation:function(){return c},urlObjectKeys:function(){return o}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let s=e.r(90809)._(e.r(98183)),a=/https?|ftp|gopher|file/;function l(e){let{auth:t,hostname:n}=e,r=e.protocol||"",i=e.pathname||"",l=e.hash||"",o=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:n&&(c=t+(~n.indexOf(":")?`[${n}]`:n),e.port&&(c+=":"+e.port)),o&&"object"==typeof o&&(o=String(s.urlQueryToSearchParams(o)));let d=e.search||o&&`?${o}`||"";return r&&!r.endsWith(":")&&(r+=":"),e.slashes||(!r||a.test(r))&&!1!==c?(c="//"+(c||""),i&&"/"!==i[0]&&(i="/"+i)):c||(c=""),l&&"#"!==l[0]&&(l="#"+l),d&&"?"!==d[0]&&(d="?"+d),i=i.replace(/[?#]/g,encodeURIComponent),d=d.replace("#","%23"),`${r}${c}${i}${d}${l}`}let o=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return l(e)}},73668,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isLocalURL",{enumerable:!0,get:function(){return s}});let r=e.r(18967),i=e.r(52817);function s(e){if(!(0,r.isAbsoluteUrl)(e))return!0;try{let t=(0,r.getLocationOrigin)(),n=new URL(e,t);return n.origin===t&&(0,i.hasBasePath)(n.pathname)}catch(e){return!1}}},84508,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"errorOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},22016,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return b},useLinkStatus:function(){return j}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let s=e.r(90809),a=e.r(43476),l=s._(e.r(71645)),o=e.r(95057),c=e.r(8372),d=e.r(18581),u=e.r(18967),f=e.r(5550);e.r(33525);let p=e.r(88540),h=e.r(91949),m=e.r(73668),g=e.r(9396);function b(t){var n,r;let i,s,b,[j,v]=(0,l.useOptimistic)(h.IDLE_LINK_STATUS),y=(0,l.useRef)(null),{href:w,as:S,children:_,prefetch:C=null,passHref:O,replace:R,shallow:E,scroll:P,onClick:N,onMouseEnter:k,onTouchStart:I,legacyBehavior:L=!1,onNavigate:T,transitionTypes:M,ref:U,unstable_dynamicOnHover:$,...z}=t;i=_,L&&("string"==typeof i||"number"==typeof i)&&(i=(0,a.jsx)("a",{children:i}));let A=l.default.useContext(c.AppRouterContext),D=!1!==C,B=!1!==C?null===(r=C)||"auto"===r?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,F="string"==typeof(n=S||w)?n:(0,o.formatUrl)(n);if(L){if(i?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});s=l.default.Children.only(i)}let W=L?s&&"object"==typeof s&&s.ref:U,X=l.default.useCallback(e=>(null!==A&&(y.current=(0,h.mountLinkInstance)(e,F,A,B,D,v)),()=>{y.current&&((0,h.unmountLinkForCurrentNavigation)(y.current),y.current=null),(0,h.unmountPrefetchableInstance)(e)}),[D,F,A,B,v]),q={ref:(0,d.useMergedRef)(X,W),onClick(t){L||"function"!=typeof N||N(t),L&&s.props&&"function"==typeof s.props.onClick&&s.props.onClick(t),!A||t.defaultPrevented||function(t,n,r,i,s,a,o){if("u">typeof window){let c,{nodeName:d}=t.currentTarget;if("A"===d.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(n)){i&&(t.preventDefault(),location.replace(n));return}if(t.preventDefault(),a){let e=!1;if(a({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:u}=e.r(99781);l.default.startTransition(()=>{u(n,i?"replace":"push",!1===s?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,r.current,o)})}}(t,F,y,R,P,T,M)},onMouseEnter(e){L||"function"!=typeof k||k(e),L&&s.props&&"function"==typeof s.props.onMouseEnter&&s.props.onMouseEnter(e),A&&D&&(0,h.onNavigationIntent)(e.currentTarget,!0===$)},onTouchStart:function(e){L||"function"!=typeof I||I(e),L&&s.props&&"function"==typeof s.props.onTouchStart&&s.props.onTouchStart(e),A&&D&&(0,h.onNavigationIntent)(e.currentTarget,!0===$)}};return(0,u.isAbsoluteUrl)(F)?q.href=F:L&&!O&&("a"!==s.type||"href"in s.props)||(q.href=(0,f.addBasePath)(F)),b=L?l.default.cloneElement(s,q):(0,a.jsx)("a",{...z,...q,children:i}),(0,a.jsx)(x.Provider,{value:j,children:b})}e.r(84508);let x=(0,l.createContext)(h.IDLE_LINK_STATUS),j=()=>(0,l.useContext)(x);("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},88143,(e,t,n)=>{"use strict";function r({widthInt:e,heightInt:t,blurWidth:n,blurHeight:i,blurDataURL:s,objectFit:a}){let l=n?40*n:e,o=i?40*i:t,c=l&&o?`viewBox='0 0 ${l} ${o}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${c}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${c?"none":"contain"===a?"xMidYMid":"cover"===a?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${s}'/%3E%3C/svg%3E`}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getImageBlurSvg",{enumerable:!0,get:function(){return r}})},87690,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={VALID_LOADERS:function(){return s},imageConfigDefault:function(){return a}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let s=["default","imgix","cloudinary","akamai","custom"],a={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumDiskCacheSize:void 0,maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1,customCacheHandler:!1}},8927,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getImgProps",{enumerable:!0,get:function(){return c}}),e.r(33525);let r=e.r(43369),i=e.r(88143),s=e.r(87690),a=["-moz-initial","fill","none","scale-down",void 0];function l(e){return void 0!==e.default}function o(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function c({src:e,sizes:t,unoptimized:n=!1,priority:d=!1,preload:u=!1,loading:f,className:p,quality:h,width:m,height:g,fill:b=!1,style:x,overrideSrc:j,onLoad:v,onLoadingComplete:y,placeholder:w="empty",blurDataURL:S,fetchPriority:_,decoding:C="async",layout:O,objectFit:R,objectPosition:E,lazyBoundary:P,lazyRoot:N,...k},I){var L;let T,M,U,{imgConf:$,showAltText:z,blurComplete:A,defaultLoader:D}=I,B=$||s.imageConfigDefault;if("allSizes"in B)T=B;else{let e=[...B.deviceSizes,...B.imageSizes].sort((e,t)=>e-t),t=B.deviceSizes.sort((e,t)=>e-t),n=B.qualities?.sort((e,t)=>e-t);T={...B,allSizes:e,deviceSizes:t,qualities:n}}if(void 0===D)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let F=k.loader||D;delete k.loader,delete k.srcSet;let W="__next_img_default"in F;if(W){if("custom"===T.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop.
Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=F;F=t=>{let{config:n,...r}=t;return e(r)}}if(O){"fill"===O&&(b=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[O];e&&(x={...x,...e});let n={responsive:"100vw",fill:"100vw"}[O];n&&!t&&(t=n)}let X="",q=o(m),G=o(g);if((L=e)&&"object"==typeof L&&(l(L)||void 0!==L.src)){let t=l(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(M=t.blurWidth,U=t.blurHeight,S=S||t.blurDataURL,X=t.src,!b)if(q||G){if(q&&!G){let e=q/t.width;G=Math.round(t.height*e)}else if(!q&&G){let e=G/t.height;q=Math.round(t.width*e)}}else q=t.width,G=t.height}let V=!d&&!u&&("lazy"===f||void 0===f);(!(e="string"==typeof e?e:X)||e.startsWith("data:")||e.startsWith("blob:"))&&(n=!0,V=!1),T.unoptimized&&(n=!0),W&&!T.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(n=!0);let H=o(h),K=Object.assign(b?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:R,objectPosition:E}:{},z?{}:{color:"transparent"},x),J=A||"empty"===w?null:"blur"===w?`url("data:image/svg+xml;charset=utf-8,${(0,i.getImageBlurSvg)({widthInt:q,heightInt:G,blurWidth:M,blurHeight:U,blurDataURL:S||"",objectFit:K.objectFit})}")`:`url("${w}")`,Q=a.includes(K.objectFit)?"fill"===K.objectFit?"100% 100%":"cover":K.objectFit,Y=J?{backgroundSize:Q,backgroundPosition:K.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:J}:{},Z=function({config:e,src:t,unoptimized:n,width:i,quality:s,sizes:a,loader:l}){if(n){if(t.startsWith("/")&&!t.startsWith("//")){let e=(0,r.getDeploymentId)();if(e){let n=t.indexOf("?");if(-1!==n){let r=new URLSearchParams(t.slice(n+1));r.get("dpl")||(r.append("dpl",e),t=t.slice(0,n)+"?"+r.toString())}else t+=`?dpl=${e}`}}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:o,kind:c}=function({deviceSizes:e,allSizes:t},n,r){if(r){let n=/(^|\s)(1?\d?\d)vw/g,i=[];for(let e;e=n.exec(r);)i.push(parseInt(e[2]));if(i.length){let n=.01*Math.min(...i);return{widths:t.filter(t=>t>=e[0]*n),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof n?{widths:e,kind:"w"}:{widths:[...new Set([n,2*n].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,i,a),d=o.length-1;return{sizes:a||"w"!==c?a:"100vw",srcSet:o.map((n,r)=>`${l({config:e,src:t,quality:s,width:n})} ${"w"===c?n:r+1}${c}`).join(", "),src:l({config:e,src:t,quality:s,width:o[d]})}}({config:T,src:e,unoptimized:n,width:q,quality:H,sizes:t,loader:F}),ee=V?"lazy":f;return{props:{...k,loading:ee,fetchPriority:_,width:q,height:G,decoding:C,className:p,style:{...K,...Y},sizes:Z.sizes,srcSet:Z.srcSet,src:j||Z.src},meta:{unoptimized:n,preload:u||d,placeholder:w,fill:b}}}},98879,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return l}});let r=e.r(71645),i="u"<typeof window,s=i?()=>{}:r.useLayoutEffect,a=i?()=>{}:r.useEffect;function l(e){let{headManager:t,reduceComponentsToState:n}=e;function l(){if(t&&t.mountedInstances){let e=r.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(n(e))}}return i&&(t?.mountedInstances?.add(e.children),l()),s(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),s(()=>(t&&(t._pendingUpdate=l),()=>{t&&(t._pendingUpdate=l)})),a(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},25633,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return m},defaultHead:function(){return u}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let s=e.r(55682),a=e.r(90809),l=e.r(43476),o=a._(e.r(71645)),c=s._(e.r(98879)),d=e.r(42732);function u(){return[(0,l.jsx)("meta",{charSet:"utf-8"},"charset"),(0,l.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function f(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===o.default.Fragment?e.concat(o.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}e.r(33525);let p=["name","httpEquiv","charSet","itemProp"];function h(e){let t,n,r,i;return e.reduce(f,[]).reverse().concat(u().reverse()).filter((t=new Set,n=new Set,r=new Set,i={},e=>{let s=!0,a=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){a=!0;let n=e.key.slice(e.key.indexOf("$")+1);t.has(n)?s=!1:t.add(n)}switch(e.type){case"title":case"base":n.has(e.type)?s=!1:n.add(e.type);break;case"meta":for(let t=0,n=p.length;t<n;t++){let n=p[t];if(e.props.hasOwnProperty(n))if("charSet"===n)r.has(n)?s=!1:r.add(n);else{let t=e.props[n],r=i[n]||new Set;("name"!==n||!a)&&r.has(t)?s=!1:(r.add(t),i[n]=r)}}}return s})).reverse().map((e,t)=>{let n=e.key||t;return o.default.cloneElement(e,{key:n})})}let m=function({children:e}){let t=(0,o.useContext)(d.HeadManagerContext);return(0,l.jsx)(c.default,{reduceComponentsToState:h,headManager:t,children:e})};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},18556,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ImageConfigContext",{enumerable:!0,get:function(){return s}});let r=e.r(55682)._(e.r(71645)),i=e.r(87690),s=r.default.createContext(i.imageConfigDefault)},65856,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"RouterContext",{enumerable:!0,get:function(){return r}});let r=e.r(55682)._(e.r(71645)).default.createContext(null)},70965,(e,t,n)=>{"use strict";function r(e,t){let n=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-n)<Math.abs(e-n)?t:e,t.qualities[0]):n}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"findClosestQuality",{enumerable:!0,get:function(){return r}})},1948,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return a}});let r=e.r(70965),i=e.r(43369);function s({config:e,src:t,width:n,quality:a}){let l=(0,i.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//")){let e=t.indexOf("?");if(-1!==e){let n=new URLSearchParams(t.slice(e+1)),r=n.get("dpl");if(r){l=r,n.delete("dpl");let i=n.toString();t=t.slice(0,e)+(i?"?"+i:"")}}}if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns.
Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let o=(0,r.findClosestQuality)(a,e);return`${e.path}?url=${encodeURIComponent(t)}&w=${n}&q=${o}${t.startsWith("/")&&l?`&dpl=${l}`:""}`}s.__next_img_default=!0;let a=s},5500,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Image",{enumerable:!0,get:function(){return v}});let r=e.r(55682),i=e.r(90809),s=e.r(43476),a=i._(e.r(71645)),l=r._(e.r(74080)),o=r._(e.r(25633)),c=e.r(8927),d=e.r(87690),u=e.r(18556);e.r(33525);let f=e.r(65856),p=r._(e.r(1948)),h=e.r(18581),m={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function g(e,t,n,r,i,s,a){let l=e?.src;e&&e["data-loaded-src"]!==l&&(e["data-loaded-src"]=l,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&i(!0),n?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let r=!1,i=!1;n.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>r,isPropagationStopped:()=>i,persist:()=>{},preventDefault:()=>{r=!0,t.preventDefault()},stopPropagation:()=>{i=!0,t.stopPropagation()}})}r?.current&&r.current(e)}}))}function b(e){return a.use?{fetchPriority:e}:{fetchpriority:e}}"u"<typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let x=(0,a.forwardRef)(({src:e,srcSet:t,sizes:n,height:r,width:i,decoding:l,className:o,style:c,fetchPriority:d,placeholder:u,loading:f,unoptimized:p,fill:m,onLoadRef:x,onLoadingCompleteRef:j,setBlurComplete:v,setShowAltText:y,sizesInput:w,onLoad:S,onError:_,...C},O)=>{let R=(0,a.useCallback)(e=>{e&&(_&&(e.src=e.src),e.complete&&g(e,u,x,j,v,p,w))},[e,u,x,j,v,_,p,w]),E=(0,h.useMergedRef)(O,R);return(0,s.jsx)("img",{...C,...b(d),loading:f,width:i,height:r,decoding:l,"data-nimg":m?"fill":"1",className:o,style:c,sizes:n,srcSet:t,src:e,ref:E,onLoad:e=>{g(e.currentTarget,u,x,j,v,p,w)},onError:e=>{y(!0),"empty"!==u&&v(!0),_&&_(e)}})});function j({isAppRouter:e,imgAttributes:t}){let n={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...b(t.fetchPriority)};return e&&l.default.preload?(l.default.preload(t.src,n),null):(0,s.jsx)(o.default,{children:(0,s.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...n},"__nimg-"+t.src+t.srcSet+t.sizes)})}let v=(0,a.forwardRef)((e,t)=>{let n=(0,a.useContext)(f.RouterContext),r=(0,a.useContext)(u.ImageConfigContext),i=(0,a.useMemo)(()=>{let e=m||r||d.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),n=e.deviceSizes.sort((e,t)=>e-t),i=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:n,qualities:i,localPatterns:"u"<typeof window?r?.localPatterns:e.localPatterns}},[r]),{onLoad:l,onLoadingComplete:o}=e,h=(0,a.useRef)(l);(0,a.useEffect)(()=>{h.current=l},[l]);let g=(0,a.useRef)(o);(0,a.useEffect)(()=>{g.current=o},[o]);let[b,v]=(0,a.useState)(!1),[y,w]=(0,a.useState)(!1),{props:S,meta:_}=(0,c.getImgProps)(e,{defaultLoader:p.default,imgConf:i,blurComplete:b,showAltText:y});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(x,{...S,unoptimized:_.unoptimized,placeholder:_.placeholder,fill:_.fill,onLoadRef:h,onLoadingCompleteRef:g,setBlurComplete:v,setShowAltText:w,sizesInput:e.sizes,ref:t}),_.preload?(0,s.jsx)(j,{isAppRouter:!n,imgAttributes:S}):null]})});("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},94909,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={default:function(){return d},getImageProps:function(){return c}};for(var i in r)Object.defineProperty(n,i,{enumerable:!0,get:r[i]});let s=e.r(55682),a=e.r(8927),l=e.r(5500),o=s._(e.r(1948));function c(e){let{props:t}=(0,a.getImgProps)(e,{defaultLoader:o.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,n]of Object.entries(t))void 0===n&&delete t[e];return{props:t}}let d=l.Image},57688,(e,t,n)=>{t.exports=e.r(94909)},8429,e=>{"use strict";async function t(e){if(e instanceof Blob)return e;let t=await fetch(e);if(!t.ok)throw Error("鍥剧墖璇诲彇澶辫触");return t.blob()}function n(e,t){let n=URL.createObjectURL(e),r=document.createElement("div");r.setAttribute("role","dialog"),r.setAttribute("aria-label","淇濆瓨鍥剧墖"),Object.assign(r.style,{position:"fixed",inset:"0",zIndex:"99999",background:"rgba(16,16,14,.94)",display:"flex",flexDirection:"column",alignItems:"center",padding:"max(18px,env(safe-area-inset-top)) 16px max(18px,env(safe-area-inset-bottom))",overflow:"auto",color:"#fff",WebkitOverflowScrolling:"touch"});let i=document.createElement("div");Object.assign(i.style,{width:"min(100%,720px)",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"12px",marginBottom:"12px"});let s=document.createElement("div");s.innerHTML='<b style="font-size:18px">闀挎寜涓嬫柟鍥剧墖淇濆瓨鍒版墜鏈?</b><div style="font-size:13px;opacity:.72;margin-top:4px">iPhone 閫夋嫨鈥滃瓨鍌ㄥ埌鐓х墖鈥濓紱寰俊鍐呰闀挎寜鍥剧墖锛屾垨鐐瑰彸涓婅鍦ㄦ祻瑙堝櫒鎵撳紑</div>';let a=document.createElement("button");a.textContent="鍏抽棴",Object.assign(a.style,{border:"0",borderRadius:"999px",padding:"10px 16px",fontWeight:"700",background:"#d7ff39",color:"#151511"}),i.append(s,a);let l=document.createElement("img");l.src=n,l.alt=t,Object.assign(l.style,{display:"block",width:"min(100%,720px)",height:"auto",maxHeight:"calc(100vh - 150px)",objectFit:"contain",background:"#fff",borderRadius:"14px",WebkitTouchCallout:"default",userSelect:"auto"});let o=document.createElement("div");o.textContent=t,Object.assign(o.style,{fontSize:"12px",opacity:".6",marginTop:"10px",wordBreak:"break-all"});let c=()=>{r.remove(),window.setTimeout(()=>URL.revokeObjectURL(n),1e3)};return a.onclick=c,r.onclick=e=>{e.target===r&&c()},r.append(i,l,o),document.body.appendChild(r),"preview"}async function r(e,r){let i=await t(e),s=r.toLowerCase().endsWith(".png")?r:r+".png",a=new File([i],s,{type:i.type||"image/png"}),l=navigator.userAgent.toLowerCase();if((/iphone|ipad|ipod|android|mobile/.test(l)||navigator.maxTouchPoints>1&&window.innerWidth<1024)&&"function"==typeof navigator.share)try{if(!navigator.canShare||navigator.canShare({files:[a]}))return await navigator.share({files:[a],title:"淇濆瓨鍥剧墖"}),"shared"}catch(e){return e instanceof DOMException&&"AbortError"===e.name||console.warn("绯荤粺鍒嗕韩涓嶅彲鐢紝宸插垏鎹㈠埌鍥剧墖棰勮淇濆瓨",e),n(i,s)}if(/micromessenger|weibo|qq\/|iphone|ipad|ipod/.test(l))return n(i,s);let o=URL.createObjectURL(i),c=document.createElement("a");return c.href=o,c.download=s,c.rel="noopener",c.style.display="none",document.body.appendChild(c),c.click(),c.remove(),window.setTimeout(()=>URL.revokeObjectURL(o),3e4),"downloaded"}e.s(["saveImageOnDevice",0,r])},31017,e=>{"use strict";var t=e.i(43476),n=e.i(57688),r=e.i(22016),i=e.i(8429),s=e.i(71645);let a=[{id:"landscape",name:"椋庢櫙",beforeImage:"/chibi-comparisons/landscape-original.png",image:"/chibi-comparisons/landscape-pixel.jpg",badge:"SCENE",note:"灞卞窛銆佸煄甯傚拰鏃呰绾康",subtypes:[{id:"nature",name:"娌绘剤鑷劧",note:"灞辨箹銆佹.鏋椼?佹棩钀?"},{id:"city",name:"鍩庡競澶滄櫙",note:"闇撹櫣銆佽鏅?佸ぉ闄呯嚎"},{id:"landmark",name:"寤虹瓚鍦版爣",note:"鏃呰寤虹瓚涓庣邯蹇靛湴"}],tags:["淇濈暀澶╃┖灞傛","绐佸嚭涓讳綋寤虹瓚","鍑忓皯闆剁绾圭悊","淇濈暀鍏夊奖姘涘洿","绾壊杈规","楂樺姣旇疆寤?"]},{id:"person",name:"浜虹墿",beforeImage:"/chibi-comparisons/person-original.png",image:"/chibi-comparisons/person-pixel.jpg",badge:"PORTRAIT",note:"浜斿畼銆佸彂鍨嬪拰绌挎惌娓呮",subtypes:[{id:"big-eye",name:"钀岀郴澶х溂",note:"澶х溂銆佸渾鑴搞?佺矖杞粨"},{id:"youth",name:"娓呯埥灏戝勾",note:"鑷劧浜斿畼銆佸埄钀界┛鎼?"},{id:"retro",name:"澶嶅彜鍍忕礌",note:"鎬?鏃ч厤鑹层?佹父鎴忔劅"}],tags:["浜斿畼鏇存竻妤?","淇濈暀琛f湇缁嗚妭","淇濈暀鍙戝瀷","淇濈暀閰嶉グ","鍖呭惈瀹犵墿","绾壊鑳屾櫙"]},{id:"pet",name:"瀹犵墿",beforeImage:"/chibi-comparisons/pet-original.png",image:"/chibi-comparisons/pet-pixel.jpg",badge:"PET",note:"姣涜壊銆佽〃鎯呭拰鍝佺鐗瑰緛",subtypes:[{id:"cat",name:"鐚挭澶村儚",note:"鍦嗘鼎鑴稿瀷涓庤姳绾?"},{id:"dog",name:"鐙楃嫍鍏ㄨ韩",note:"鑰虫湹銆佸洓鑲㈠拰姣涜壊"},{id:"duo",name:"鍙屽疇浜掑姩",note:"涓ゅ彧瀹犵墿鍚屾"}],tags:["鐪肩潧鏇存湁绁?","淇濈暀姣涜壊鑺辩汗","绐佸嚭鑰虫湹杞粨","淇濈暀椤瑰湀閰嶉グ","瀹屾暣鍥涜偄","绾壊鑳屾櫙"]},{id:"object",name:"鐗╁搧",beforeImage:"/chibi-comparisons/object-original.png",image:"/chibi-comparisons/object-pixel.jpg",badge:"OBJECT",note:"鎵嬪姙銆佺ぜ鐗╁拰绾康鐗?",subtypes:[{id:"toy",name:"鎵嬪姙鐜╁叿",note:"閫犲瀷杞粨浼樺厛"},{id:"daily",name:"鐢熸椿鐢ㄥ搧",note:"淇濈暀缁撴瀯涓庢潗璐?"},{id:"gift",name:"绀肩墿绾康",note:"绐佸嚭鍖呰鍜岃楗?"}],tags:["淇濈暀鍝佺墝澶栧舰","绐佸嚭缁撴瀯杞粨","鍑忓皯鍙嶅厜娓愬彉","淇濈暀灏忛厤浠?","灞呬腑鏋勫浘","绾壊鑳屾櫙"]},{id:"food",name:"椋熺墿",beforeImage:"/chibi-comparisons/food-original.png",image:"/chibi-comparisons/food-pixel.jpg",badge:"FOOD",note:"鐢滃搧銆侀ギ鍝佸拰鐗硅壊缇庨",subtypes:[{id:"dessert",name:"鐢滃搧铔嬬硶",note:"濂舵补涓庤楗版竻妤?"},{id:"drink",name:"鍜栧暋楗搧",note:"鏉瀷銆佸垎灞傚拰閰嶆枡"},{id:"meal",name:"瀹跺父缇庨",note:"涓婚鏉愭竻鏅板彲杈?"}],tags:["绐佸嚭椋熺墿涓讳綋","淇濈暀椋熸潗灞傛","鍑忓皯缁嗙瑁呴グ","澧炲己鑹插僵瀵规瘮","淇媿鏋勫浘","绾壊鑳屾櫙"]}],l=[48,64,80,96],o=[16,24,32,40],c=["涓讳綋鐗瑰啓","鍗婂箙鏋勫浘","瀹屾暣鏋勫浘"];e.s(["default",0,function(){let[e,d]=(0,s.useState)(a[2]),[u,f]=(0,s.useState)(a[2].subtypes[0]),[p,h]=(0,s.useState)(64),[m,g]=(0,s.useState)(24),[b,x]=(0,s.useState)("涓讳綋鐗瑰啓"),[j,v]=(0,s.useState)(a[2].tags.slice(0,3)),[y,w]=(0,s.useState)(""),[S,_]=(0,s.useState)(null),[C,O]=(0,s.useState)(null),[R,E]=(0,s.useState)(null),[P,N]=(0,s.useState)(!0),[k,I]=(0,s.useState)(!1),[L,T]=(0,s.useState)(""),[M,U]=(0,s.useState)(null),[$,z]=(0,s.useState)(""),[A,D]=(0,s.useState)(""),[B,F]=(0,s.useState)(!1),W=(0,s.useRef)(null),X=(0,s.useRef)(null),q=(0,s.useRef)(null),G=!!(R&&!P),V=(0,s.useMemo)(()=>Math.round(p*p*("涓讳綋鐗瑰啓"===b?.7:"鍗婂箙鏋勫浘"===b?.6:.48)),[p,b]);async function H(e,t=!1){try{let t=await fetch("/api/codes/redeem",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e})}),n=await t.json();if(!t.ok||!n.access)throw Error(n.error||"鍏戞崲澶辫触");U(n.access),z(n.access.code),localStorage.setItem("perler-download-code",n.access.code),F(!1),D("")}catch(e){t||D(e instanceof Error?e.message:"鍏戞崲澶辫触")}}function K(e,t){if(!e||!e.type.startsWith("image/"))return;if(e.size>0xc00000)return void T("鍥剧墖涓嶈兘瓒呰繃 12MB");let n=URL.createObjectURL(e),r=new window.Image;r.onload=()=>{let e=Math.min(1,("source"===t?1400:1200)/Math.max(r.width,r.height)),i=document.createElement("canvas");i.width=Math.round(r.width*e),i.height=Math.round(r.height*e);let s=i.getContext("2d");if(!s){URL.revokeObjectURL(n),T("鍥剧墖璇诲彇澶辫触锛岃鎹竴寮犻噸璇?");return}s.drawImage(r,0,0,i.width,i.height),URL.revokeObjectURL(n);let a=i.toDataURL("image/jpeg","source"===t?.88:.82);"source"===t?_(a):O(a),E(null),N(!0),T("")},r.onerror=()=>{URL.revokeObjectURL(n),T("鍥剧墖璇诲彇澶辫触锛岃鎹竴寮犻噸璇?")},r.src=n}async function J(){if(!S||!M||k||G){M||F(!0);return}I(!0),T(""),E(null);try{let t=await fetch("/api/chibi/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:M.code,image:S,referenceImage:C,category:e.id,subtype:u.id,gridSize:p,colorCount:m,composition:b,detailTags:j,customPrompt:y.trim()})}),n=await t.json();if(!t.ok||!n.image||!n.access)throw Error(n.error||"鐢熸垚澶辫触锛岃绋嶅悗閲嶈瘯");E(n.image),N(!1),U(n.access),n.downloadGrant&&(sessionStorage.setItem("perler-ai-download-grant",n.downloadGrant),sessionStorage.setItem("perler-ai-download-code",n.access.code))}catch(e){T(e instanceof Error?e.message:"鐢熸垚澶辫触锛岃绋嶅悗閲嶈瘯")}finally{I(!1)}}async function Q(){if(R)try{await (0,i.saveImageOnDevice)(R,`${e.name}-${u.name}-${p}鏍?-鐢熸垚鍥?.png`),N(!0)}catch(e){T(e instanceof Error?e.message:"鍥剧墖淇濆瓨澶辫触锛岃閲嶈瘯")}}function Y(e){G&&(e.preventDefault(),document.querySelector(".saveGuard")?.scrollIntoView({behavior:"smooth",block:"center"}))}return(0,s.useEffect)(()=>{let e=localStorage.getItem("perler-download-code");e&&H(e,!0)},[]),(0,s.useEffect)(()=>{let e=e=>{G&&(e.preventDefault(),e.returnValue="")};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[G]),(0,s.useEffect)(()=>{if(!R)return;let e=window.setTimeout(()=>q.current?.scrollIntoView({behavior:"smooth",block:"start"}),120);return()=>window.clearTimeout(e)},[R]),(0,t.jsxs)("main",{className:"chibiPage beadChibiPage",children:[(0,t.jsxs)("nav",{className:"nav",children:[(0,t.jsxs)(r.default,{onClick:Y,className:"brand brandLink",href:"/",children:[(0,t.jsx)("span",{className:"brandMark",children:"P"}),(0,t.jsxs)("span",{children:["PERLER ",(0,t.jsx)("b",{children:"LAB"})]})]}),(0,t.jsxs)("div",{className:"navLinks",children:[(0,t.jsx)(r.default,{onClick:Y,href:"/",children:"鍥剧墖杞嫾璞?"}),(0,t.jsxs)(r.default,{className:"active",href:"/chibi",children:["AI鎷艰眴涓撳尯 ",(0,t.jsx)("span",{children:"PRO"})]})]}),(0,t.jsxs)("div",{className:"chibiNavActions",children:[(0,t.jsx)(r.default,{onClick:Y,className:`mobileBackLink ${G?"needsSave":""}`,href:"/",children:G?"鍏堜繚瀛樺浘鐗?":"鈫? 鏅?氭嫾璞?"}),(0,t.jsxs)("div",{className:"navRight",children:[(0,t.jsx)("span",{className:"liveDot"})," 姣忔鐢熸垚娑堣?? 1 娆℃潈鐩?"]})]})]}),(0,t.jsxs)("section",{className:"beadHero",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"eyebrow",children:"IMAGE TO PERLER"}),(0,t.jsxs)("h1",{children:["鍏堥?夊ぇ绫伙紝鍐嶅畾缁嗚妭锛?",(0,t.jsx)("br",{}),(0,t.jsx)("em",{children:"鐢熸垚缁撴灉鍏堜繚瀛樸??"})]})]}),(0,t.jsx)("p",{children:"姣忔 AI 鎴愬姛鐢熸垚鎵? 1 娆★紱璇ヤ綔鍝佽浆鎴愭寮忔嫾璞嗗浘绾稿苟棣栨涓嬭浇鍏嶈垂銆傚彧鏈夐噸鏂扮敓鎴愭柊浣滃搧鎵嶅啀娆℃墸璐广??"})]}),G&&(0,t.jsxs)("div",{className:"saveGuard",children:[(0,t.jsx)("strong",{children:"鈿? 褰撳墠鐢熸垚鍥剧墖灏氭湭淇濆瓨"}),(0,t.jsx)("span",{children:"鍒嗙被銆侀鏍笺?佸弬鏁板拰涓婁紶鎸夐挳宸查攣瀹氥?傝鍏堝埌涓嬫柟鐐瑰嚮鈥滀繚瀛樺浘鐗囧苟瑙i攣鈥濄??"})]}),(0,t.jsxs)("section",{className:`beadBuilder ${G?"settingsLocked":""}`,children:[(0,t.jsxs)("div",{className:"beadConfig panel",children:[(0,t.jsxs)("div",{className:"configHead",children:[(0,t.jsx)("span",{children:"01"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("b",{children:"閫夋嫨鎷艰眴澶х被"}),(0,t.jsx)("small",{children:"鍏堥?夌敤閫旓紝鍐嶉?夋嫨鏇村叿浣撶殑鎴愬搧鏂瑰悜"})]})]}),(0,t.jsx)("div",{className:"categoryTabs",children:a.map(n=>(0,t.jsxs)("button",{disabled:G,className:e.id===n.id?"selected":"",onClick:()=>{!G&&(d(n),f(n.subtypes[0]),v(n.tags.slice(0,3)),E(null))},children:[(0,t.jsx)("span",{children:n.name}),(0,t.jsx)("small",{children:n.note})]},n.id))}),(0,t.jsxs)("div",{className:"categoryShowcase",children:[e.beforeImage?(0,t.jsxs)("div",{className:"categoryCompare",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(n.default,{src:e.beforeImage,alt:`${e.name}鍘熷浘`,fill:!0,sizes:"(max-width:720px) 42vw, 360px"}),(0,t.jsx)("span",{children:"鍘熷浘"})]}),(0,t.jsx)("b",{children:"鈫?"}),(0,t.jsxs)("div",{children:[(0,t.jsx)(n.default,{src:e.image,alt:`${e.name}鍍忕礌鎷艰眴鏁堟灉`,fill:!0,sizes:"(max-width:720px) 42vw, 360px"}),(0,t.jsx)("span",{children:"鍍忕礌鎷艰眴"})]})]}):(0,t.jsxs)("div",{className:"categorySingle",children:[(0,t.jsx)(n.default,{src:e.image,alt:`${e.name}鍍忕礌鎷艰眴绀轰緥`,fill:!0,sizes:"(max-width:720px) 90vw, 720px"}),(0,t.jsx)("span",{children:"鍍忕礌鎷艰眴绀轰緥"})]}),(0,t.jsxs)("section",{children:[(0,t.jsxs)("b",{children:[e.name," 路 榛樿鍍忕礌鎷艰眴椋?"]}),(0,t.jsx)("small",{children:e.beforeImage?"鐪熷疄鍘熷浘涓庤浆鎹㈠悗鏁堟灉瀵规瘮":"閫夋嫨涓?涓粏鍒嗙被鍒?"}),(0,t.jsx)("div",{children:e.subtypes.map(e=>(0,t.jsxs)("button",{disabled:G,className:u.id===e.id?"active":"",onClick:()=>{f(e),E(null)},children:[(0,t.jsx)("b",{children:e.name}),(0,t.jsx)("span",{children:e.note})]},e.id))})]})]}),(0,t.jsxs)("div",{className:"configSection",children:[(0,t.jsxs)("div",{className:"configLabel",children:[(0,t.jsx)("b",{children:"鍥剧焊鏍兼暟"}),(0,t.jsxs)("span",{children:[p," 脳 ",p]})]}),(0,t.jsx)("p",{children:"鏍兼暟瓒婂ぇ缁嗚妭瓒婃竻妤氾紝瀹為檯鍒朵綔鏃堕棿涔熸洿闀裤??"}),(0,t.jsx)("div",{className:"optionRow four",children:l.map(e=>(0,t.jsxs)("button",{disabled:G,className:p===e?"active":"",onClick:()=>{h(e),E(null)},children:[e,(0,t.jsx)("small",{children:48===e?"绠?鍗?":64===e?"鎺ㄨ崘":80===e?"绮剧粏":"楂樻竻"})]},e))})]}),(0,t.jsxs)("div",{className:"configSection",children:[(0,t.jsxs)("div",{className:"configLabel",children:[(0,t.jsx)("b",{children:"鏈?澶ч鑹叉暟"}),(0,t.jsxs)("span",{children:[m," 鑹?"]})]}),(0,t.jsx)("p",{children:"棰滆壊瓒婂杩樺師搴﹁秺楂橈紱棰滆壊瓒婂皯锛屽璞嗘洿绠?鍗曘??"}),(0,t.jsx)("div",{className:"optionRow four",children:o.map(e=>(0,t.jsxs)("button",{disabled:G,className:m===e?"active":"",onClick:()=>{g(e),E(null)},children:[e,(0,t.jsx)("small",{children:16===e?"鐪佽眴":24===e?"鍧囪 ":32===e?"缁嗚吇":"楂樿繕鍘?"})]},e))})]}),(0,t.jsxs)("div",{className:"configSection",children:[(0,t.jsxs)("div",{className:"configLabel",children:[(0,t.jsx)("b",{children:"涓讳綋鏋勫浘"}),(0,t.jsx)("span",{children:b})]}),(0,t.jsx)("div",{className:"optionRow three",children:c.map(e=>(0,t.jsx)("button",{disabled:G,className:b===e?"active":"",onClick:()=>{x(e),E(null)},children:e},e))})]}),(0,t.jsxs)("div",{className:"configSection",children:[(0,t.jsxs)("div",{className:"configLabel",children:[(0,t.jsx)("b",{children:"缁嗚妭鎻愮ず璇?"}),(0,t.jsx)("span",{children:"鏈?澶氶?? 5 椤?"})]}),(0,t.jsx)("div",{className:"promptTags",children:e.tags.map(e=>(0,t.jsxs)("button",{disabled:G,className:j.includes(e)?"active":"",onClick:()=>{!G&&(v(t=>t.includes(e)?t.filter(t=>t!==e):t.length<5?[...t,e]:t),E(null))},children:[j.includes(e)?"鉁? ":"+ ",e]},e))}),(0,t.jsx)("textarea",{disabled:G,maxLength:160,value:y,onChange:e=>{w(e.target.value),E(null)},placeholder:"琛ュ厖甯屾湜淇濈暀鐨勯鑹层?佺粏鑺傘?佸Э鍔裤?佽儗鏅?︹??"}),(0,t.jsxs)("small",{className:"promptCount",children:[y.length,"/160"]}),(0,t.jsxs)("div",{className:"referenceUploadRow",children:[(0,t.jsxs)("button",{disabled:G,className:C?"hasReference":"",onClick:()=>X.current?.click(),children:[C?(0,t.jsx)("img",{src:C,alt:"椋庢牸绀轰緥鍥?"}):(0,t.jsx)("strong",{children:"锛?"}),(0,t.jsxs)("span",{children:[(0,t.jsx)("b",{children:C?"宸叉坊鍔犻鏍肩ず渚嬪浘":"涓婁紶椋庢牸绀轰緥鍥撅紙鍙?夛級"}),(0,t.jsx)("small",{children:C?"鍙傝?冪敾椋庛?侀厤鑹插拰鎷艰眴璐ㄦ劅":"涓嶄細鐓ф惉绀轰緥涓讳綋"})]}),C&&(0,t.jsx)("i",{children:"鏇存崲"})]}),C&&(0,t.jsx)("button",{disabled:G,className:"removeReference",onClick:()=>{O(null),E(null)},children:"绉婚櫎"})]}),(0,t.jsx)("input",{ref:X,className:"hiddenFileInput",type:"file",accept:"image/jpeg,image/png,image/webp",onChange:e=>K(e.target.files?.[0],"reference")})]})]}),(0,t.jsxs)("aside",{className:"beadPreview panel",children:[(0,t.jsxs)("div",{className:"previewTitle",children:[(0,t.jsx)("span",{children:"02"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("b",{children:"鐢熸垚鍓嶇‘璁?"}),(0,t.jsxs)("small",{children:[e.name," 路 ",u.name]})]})]}),(0,t.jsxs)("div",{className:"selectedSample",children:[(0,t.jsx)(n.default,{src:e.image,alt:`${e.name}绀轰緥`,fill:!0,sizes:"(max-width:720px) 90vw, 420px"}),(0,t.jsx)("span",{children:"榛樿鍍忕礌鏁堟灉"})]}),(0,t.jsxs)("div",{className:"specSummary",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{children:"绫诲埆"}),(0,t.jsx)("b",{children:e.name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{children:"缁嗗垎"}),(0,t.jsx)("b",{children:u.name})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{children:"鍥剧焊"}),(0,t.jsxs)("b",{children:[p,"脳",p]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{children:"棰勮"}),(0,t.jsxs)("b",{children:["绾? ",V," 棰?"]})]})]}),(0,t.jsxs)("button",{disabled:G,className:`portraitMini ${S?"hasImage":""}`,onClick:()=>W.current?.click(),children:[S?(0,t.jsx)("img",{src:S,alt:"宸蹭笂浼犲師鍥?"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("strong",{children:"锛?"}),(0,t.jsx)("b",{children:"涓婁紶闇?瑕佽浆鎹㈢殑鍘熷浘"}),(0,t.jsx)("small",{children:"涓讳綋娓呮銆佸厜绾胯嚜鐒舵晥鏋滄洿濂?"})]}),S&&(0,t.jsx)("i",{children:"鐐瑰嚮鏇存崲"})]}),(0,t.jsx)("input",{ref:W,className:"hiddenFileInput",type:"file",accept:"image/jpeg,image/png,image/webp",onChange:e=>K(e.target.files?.[0],"source")}),(0,t.jsxs)("div",{className:"paidGenerateNote",children:[(0,t.jsx)("b",{children:M?`鍓╀綑 ${M.remainingUses} 娆$敓鎴愭潈鐩奰:"AI 鐢熸垚灞炰簬浠樿垂鍔熻兘"}),(0,t.jsx)("span",{children:"鎴愬姛鐢熸垚鎵? 1 娆★紱鏈綔鍝佽浆鍥剧焊鍜岄娆′笅杞藉厤璐癸紝澶辫触涓嶆墸銆?"})]}),(0,t.jsx)("button",{className:"generateBeadPreview",disabled:!S||k||G,onClick:J,children:k?"姝e湪鐢熸垚锛岃鍕跨寮?椤甸潰鈥?":M?S?"娑堣?? 1 娆★紝寮?濮嬬敓鎴? 鈫?":"璇峰厛涓婁紶鍘熷浘":"鍏戞崲鍚庣敓鎴? 鈫?"}),L&&(0,t.jsx)("p",{className:"chibiError",children:L})]})]}),R&&(0,t.jsxs)("section",{ref:q,className:`beadResult panel ${!P?"unsaved":"saved"}`,children:[(0,t.jsxs)("div",{className:"resultImage",children:[(0,t.jsx)("img",{src:R,alt:"AI鐢熸垚鐨勬嫾璞嗛瑙?"}),(0,t.jsx)("span",{children:P?"宸蹭繚瀛?":"寰呬繚瀛?"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"resultEyebrow",children:"YOUR PERLER RESULT"}),(0,t.jsx)("h2",{children:P?"鍥剧墖宸蹭繚瀛橈紝鍙互缁х画鎿嶄綔":"鍏堜繚瀛橈紝鍐嶅垏鎹换浣曡缃?"}),(0,t.jsx)("p",{children:P?"鐜板湪鍙互杞崲鎴愭寮忓浘绾革紝鎴栧洖鍒颁笂鏂规洿鎹㈠垎绫诲拰鍙傛暟銆?":"娴忚鍣ㄤ笉浼氶暱鏈熶繚瀛樼敓鎴愮粨鏋溿?備负閬垮厤鍥剧墖涓㈠け锛屽垎绫汇?佸弬鏁板拰瀵艰埅宸茬粡閿佸畾銆?"}),(0,t.jsxs)("div",{className:"resultSpecs",children:[(0,t.jsx)("span",{children:e.name}),(0,t.jsx)("span",{children:u.name}),(0,t.jsxs)("span",{children:[p,"脳",p]}),(0,t.jsxs)("span",{children:[m," 鑹?"]})]}),P?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:function(){if(R&&P)try{sessionStorage.setItem("perler-chibi-image",R),sessionStorage.setItem("perler-chibi-name",`${e.name}-${u.name}-${p}鏍糮),sessionStorage.setItem("perler-chibi-size",String(p)),sessionStorage.setItem("perler-chibi-colors",String(m)),location.href="/"}catch{T("鍥剧墖鏆傛椂鏃犳硶浼犲埌鎷艰眴鍖猴紝璇峰厛涓嬭浇鍚庡啀涓婁紶")}},children:"杞崲鎴愭寮忔嫾璞嗗浘绾? 鈫?"}),(0,t.jsx)("button",{className:"retryButton",onClick:()=>{E(null),N(!0)},children:"缁х画璋冩暣璁剧疆"})]}):(0,t.jsx)("button",{className:"saveResultButton",onClick:Q,children:"鈫? 淇濆瓨鍥剧墖骞惰В閿佽皟鏁?"})]})]}),R&&(0,t.jsx)("button",{className:"mobileResultJump",onClick:()=>q.current?.scrollIntoView({behavior:"smooth",block:"start"}),children:"鏌ョ湅鐢熸垚鏁堟灉 鈫?"}),(0,t.jsxs)("section",{className:"beadPromise",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("b",{children:"鍒嗙被鏇村噯纭?"}),(0,t.jsx)("span",{children:"涓嶅悓涓讳綋浣跨敤涓嶅悓鎻愮ず璇嶏紝椋庢櫙銆佸疇鐗╁拰椋熺墿涓嶅啀濂楃敤浜虹墿瑙勫垯銆?"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("b",{children:"鐢熸垚鎸夋璁¤垂"}),(0,t.jsx)("span",{children:"姣忔鎴愬姛鐢熸垚鎵? 1 娆℃潈鐩婏紝澶辫触涓嶆墸锛岄伩鍏嶆棤闄愭秷鑰楁ā鍨嬭垂鐢ㄣ??"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("b",{children:"缁撴灉闃蹭涪澶?"}),(0,t.jsx)("span",{children:"鏈繚瀛樻椂閿佷綇鎵?鏈夊垏鎹㈡搷浣滐紝骞跺湪鍏抽棴椤甸潰鍓嶅啀娆℃彁閱掋??"})]})]}),(0,t.jsxs)("footer",{children:[(0,t.jsx)("span",{children:"PERLER LAB 路 AI 鎷艰眴涓撳尯"}),(0,t.jsx)(r.default,{onClick:Y,href:"/",children:"杩斿洖鍥剧墖杞嫾璞? 鈫?"})]}),B&&(0,t.jsx)("div",{className:"generationUnlockOverlay",children:(0,t.jsxs)("section",{children:[(0,t.jsx)("button",{onClick:()=>F(!1),children:"脳"}),(0,t.jsx)("span",{className:"eyebrow",children:"GENERATION ACCESS"}),(0,t.jsx)("h2",{children:"鍏戞崲鍚庢墠鑳界敓鎴?"}),(0,t.jsx)("p",{children:"姣忔垚鍔熺敓鎴? 1 寮犲浘鐗囨秷鑰? 1 娆′娇鐢ㄦ潈鐩婏紱鐢熸垚澶辫触涓嶆墸娆℃暟銆?"}),(0,t.jsx)("input",{value:$,onChange:e=>z(e.target.value.toUpperCase()),placeholder:"杈撳叆鍏戞崲鐮侊紝渚嬪 PB-XXXXX-XXXXX"}),(0,t.jsx)("button",{className:"unlockSubmit",disabled:!$.trim(),onClick:()=>void H($),children:"绔嬪嵆鍏戞崲"}),A&&(0,t.jsx)("small",{children:A}),(0,t.jsx)(r.default,{href:"/",children:"娌℃湁鍏戞崲鐮侊紵杩斿洖棣栭〉璐拱濂楅"})]})})]})}])}]);