igiveup 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/bin/cli.js +1 -1
  2. package/dist/404.html +1 -1
  3. package/dist/__next.__PAGE__.txt +4 -4
  4. package/dist/__next._full.txt +14 -14
  5. package/dist/__next._head.txt +5 -7
  6. package/dist/__next._index.txt +6 -6
  7. package/dist/__next._tree.txt +2 -2
  8. package/dist/_next/static/chunks/04bbf605c3700867.js +1 -0
  9. package/dist/_next/static/chunks/1cef3016144862be.js +376 -0
  10. package/dist/_next/static/chunks/1efc01f481163e91.js +119 -0
  11. package/dist/_next/static/chunks/{dc366463edc1a494.js → 24a51584ddecda70.js} +1 -1
  12. package/dist/_next/static/chunks/30354d30990146bb.js +1 -0
  13. package/dist/_next/static/chunks/3e42928c4dc2d62f.js +5 -0
  14. package/dist/_next/static/chunks/469a4c9638da951a.css +1 -0
  15. package/dist/_next/static/chunks/{89bc7afe2c734bd3.js → 483a12865e0bba97.js} +1 -1
  16. package/dist/_next/static/chunks/5ebc2a48b7ca078f.js +1 -0
  17. package/dist/_next/static/chunks/a6dad97d9634a72d.js.map +1 -0
  18. package/dist/_next/static/chunks/c1ac1f762ec479f5.js +1 -0
  19. package/dist/_next/static/chunks/cdf507442310f591.js +1 -0
  20. package/dist/_next/static/chunks/{ff0c2750fd49f4ea.js → e26fcdfd9c1534c4.js} +1 -1
  21. package/dist/_next/static/chunks/turbopack-7b159edc0c7126c8.js +4 -0
  22. package/dist/_not-found/__next._full.txt +16 -16
  23. package/dist/_not-found/__next._head.txt +5 -7
  24. package/dist/_not-found/__next._index.txt +6 -6
  25. package/dist/_not-found/__next._not-found.__PAGE__.txt +2 -2
  26. package/dist/_not-found/__next._not-found.txt +3 -3
  27. package/dist/_not-found/__next._tree.txt +2 -2
  28. package/dist/_not-found.html +1 -1
  29. package/dist/_not-found.txt +16 -16
  30. package/dist/index.html +1 -1
  31. package/dist/index.txt +14 -14
  32. package/dist/manifest.webmanifest +1 -1
  33. package/dist/sitemap.xml +1 -1
  34. package/package.json +30 -21
  35. package/dist/_next/static/chunks/23efa3561aec501d.js +0 -1
  36. package/dist/_next/static/chunks/6410fba97b570c28.js +0 -342
  37. package/dist/_next/static/chunks/71718d23f8e494fe.js +0 -13
  38. package/dist/_next/static/chunks/7715b02b19bcf642.js +0 -1
  39. package/dist/_next/static/chunks/8b1c561b940ebca7.css +0 -1
  40. package/dist/_next/static/chunks/a8d93294ae937c94.js +0 -4
  41. package/dist/_next/static/chunks/ab73b4c4bccc3b0a.js +0 -1
  42. package/dist/_next/static/chunks/afe4b73b6f0c57df.js +0 -2
  43. package/dist/_next/static/chunks/e031ffe7bd8babaa.js +0 -1
  44. package/dist/_next/static/chunks/turbopack-51dd591fe12787c1.js +0 -3
  45. /package/dist/_next/static/{jk33PhUVfNqpboKg_ZfFi → JWenEG9mAVBaGVUjBEBPo}/_buildManifest.js +0 -0
  46. /package/dist/_next/static/{jk33PhUVfNqpboKg_ZfFi → JWenEG9mAVBaGVUjBEBPo}/_clientMiddlewareManifest.json +0 -0
  47. /package/dist/_next/static/{jk33PhUVfNqpboKg_ZfFi → JWenEG9mAVBaGVUjBEBPo}/_ssgManifest.js +0 -0
@@ -0,0 +1,119 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,34813,(e,t,r)=>{},68599,(e,t,r)=>{var s=e.i(27171);e.r(34813);var a=e.r(778),i=a&&"object"==typeof a&&"default"in a?a:{default:a},l=void 0!==s.default&&s.default.env&&!0,n=function(e){return"[object String]"===Object.prototype.toString.call(e)},o=function(){function e(e){var t=void 0===e?{}:e,r=t.name,s=void 0===r?"stylesheet":r,a=t.optimizeForSpeed,i=void 0===a?l:a;d(n(s),"`name` must be a string"),this._name=s,this._deletedRulePlaceholder="#"+s+"-deleted-rule____{}",d("boolean"==typeof i,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=i,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var o="undefined"!=typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=o?o.getAttribute("content"):null}var t,r=e.prototype;return r.setOptimizeForSpeed=function(e){d("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),d(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},r.isOptimizeForSpeed=function(){return this._optimizeForSpeed},r.inject=function(){var e=this;if(d(!this._injected,"sheet already injected"),this._injected=!0,"undefined"!=typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(l||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,r){return"number"==typeof r?e._serverSheet.cssRules[r]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),r},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},r.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},r.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},r.insertRule=function(e,t){if(d(n(e),"`insertRule` accepts only strings"),"undefined"==typeof window)return"number"!=typeof t&&(t=this._serverSheet.cssRules.length),this._serverSheet.insertRule(e,t),this._rulesCount++;if(this._optimizeForSpeed){var r=this.getSheet();"number"!=typeof t&&(t=r.cssRules.length);try{r.insertRule(e,t)}catch(t){return l||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var s=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,s))}return this._rulesCount++},r.replaceRule=function(e,t){if(this._optimizeForSpeed||"undefined"==typeof window){var r="undefined"!=typeof window?this.getSheet():this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!r.cssRules[e])return e;r.deleteRule(e);try{r.insertRule(t,e)}catch(s){l||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),r.insertRule(this._deletedRulePlaceholder,e)}}else{var s=this._tags[e];d(s,"old rule at index `"+e+"` not found"),s.textContent=t}return e},r.deleteRule=function(e){if("undefined"==typeof window)return void this._serverSheet.deleteRule(e);if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];d(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},r.flush=function(){this._injected=!1,this._rulesCount=0,"undefined"!=typeof window?(this._tags.forEach(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]):this._serverSheet.cssRules=[]},r.cssRules=function(){var e=this;return"undefined"==typeof window?this._serverSheet.cssRules:this._tags.reduce(function(t,r){return r?t=t.concat(Array.prototype.map.call(e.getSheetForTag(r).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},r.makeStyleTag=function(e,t,r){t&&d(n(t),"makeStyleTag accepts only strings as second parameter");var s=document.createElement("style");this._nonce&&s.setAttribute("nonce",this._nonce),s.type="text/css",s.setAttribute("data-"+e,""),t&&s.appendChild(document.createTextNode(t));var a=document.head||document.getElementsByTagName("head")[0];return r?a.insertBefore(s,r):a.appendChild(s),s},t=[{key:"length",get:function(){return this._rulesCount}}],function(e,t){for(var r=0;r<t.length;r++){var s=t[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}(e.prototype,t),e}();function d(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var c=function(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return t>>>0},u={};function h(e,t){if(!t)return"jsx-"+e;var r=String(t),s=e+r;return u[s]||(u[s]="jsx-"+c(e+"-"+r)),u[s]}function m(e,t){"undefined"==typeof window&&(t=t.replace(/\/style/gi,"\\/style"));var r=e+t;return u[r]||(u[r]=t.replace(/__jsx-style-dynamic-selector/g,e)),u[r]}var p=function(){function e(e){var t=void 0===e?{}:e,r=t.styleSheet,s=void 0===r?null:r,a=t.optimizeForSpeed,i=void 0!==a&&a;this._sheet=s||new o({name:"styled-jsx",optimizeForSpeed:i}),this._sheet.inject(),s&&"boolean"==typeof i&&(this._sheet.setOptimizeForSpeed(i),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),"undefined"==typeof window||this._fromServer||(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var r=this.getIdAndRules(e),s=r.styleId,a=r.rules;if(s in this._instancesCounts){this._instancesCounts[s]+=1;return}var i=a.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[s]=i,this._instancesCounts[s]=1},t.remove=function(e){var t=this,r=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(r in this._instancesCounts,"styleId: `"+r+"` not found"),this._instancesCounts[r]-=1,this._instancesCounts[r]<1){var s=this._fromServer&&this._fromServer[r];s?(s.parentNode.removeChild(s),delete this._fromServer[r]):(this._indices[r].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[r]),delete this._instancesCounts[r]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],r=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return r[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,r;return t=this.cssRules(),void 0===(r=e)&&(r={}),t.map(function(e){var t=e[0],s=e[1];return i.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:r.nonce?r.nonce:void 0,dangerouslySetInnerHTML:{__html:s}})})},t.getIdAndRules=function(e){var t=e.children,r=e.dynamic,s=e.id;if(r){var a=h(s,r);return{styleId:a,rules:Array.isArray(t)?t.map(function(e){return m(a,e)}):[m(a,t)]}}return{styleId:h(s),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),x=a.createContext(null);function g(){return new p}function b(){return a.useContext(x)}x.displayName="StyleSheetContext";var f=i.default.useInsertionEffect||i.default.useLayoutEffect,y="undefined"!=typeof window?g():void 0;function v(e){var t=y||b();return t&&("undefined"==typeof window?t.add(e):f(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)])),null}v.dynamic=function(e){return e.map(function(e){return h(e[0],e[1])}).join(" ")},r.StyleRegistry=function(e){var t=e.registry,r=e.children,s=a.useContext(x),l=a.useState(function(){return s||t||g()})[0];return i.default.createElement(x.Provider,{value:l},r)},r.createStyleRegistry=g,r.style=v,r.useStyleRegistry=b},13907,(e,t,r)=>{t.exports=e.r(68599).style},24207,(e,t,r)=>{"use strict";function s(e){let{widthInt:t,heightInt:r,blurWidth:s,blurHeight:a,blurDataURL:i,objectFit:l}=e,n=s?40*s:t,o=a?40*a:r,d=n&&o?`viewBox='0 0 ${n} ${o}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${d}%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='${d?"none":"contain"===l?"xMidYMid":"cover"===l?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${i}'/%3E%3C/svg%3E`}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImageBlurSvg",{enumerable:!0,get:function(){return s}})},2965,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={VALID_LOADERS:function(){return i},imageConfigDefault:function(){return l}};for(var a in s)Object.defineProperty(r,a,{enumerable:!0,get:s[a]});let i=["default","imgix","cloudinary","akamai","custom"],l={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"],maximumRedirects:3,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1}},1852,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"getImgProps",{enumerable:!0,get:function(){return d}}),e.r(43946);let s=e.r(40824),a=e.r(24207),i=e.r(2965),l=["-moz-initial","fill","none","scale-down",void 0];function n(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 d(e,t){var r;let d,c,u,{src:h,sizes:m,unoptimized:p=!1,priority:x=!1,preload:g=!1,loading:b,className:f,quality:y,width:v,height:j,fill:w=!1,style:N,overrideSrc:k,onLoad:_,onLoadingComplete:S,placeholder:C="empty",blurDataURL:E,fetchPriority:T,decoding:L="async",layout:R,objectFit:P,objectPosition:I,lazyBoundary:$,lazyRoot:z,...O}=e,{imgConf:A,showAltText:M,blurComplete:D,defaultLoader:U}=t,F=A||i.imageConfigDefault;if("allSizes"in F)d=F;else{let e=[...F.deviceSizes,...F.imageSizes].sort((e,t)=>e-t),t=F.deviceSizes.sort((e,t)=>e-t),r=F.qualities?.sort((e,t)=>e-t);d={...F,allSizes:e,deviceSizes:t,qualities:r}}if(void 0===U)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 W=O.loader||U;delete O.loader,delete O.srcSet;let B="__next_img_default"in W;if(B){if("custom"===d.loader)throw Object.defineProperty(Error(`Image with src "${h}" is missing "loader" prop.
2
+ Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=W;W=t=>{let{config:r,...s}=t;return e(s)}}if(R){"fill"===R&&(w=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[R];e&&(N={...N,...e});let t={responsive:"100vw",fill:"100vw"}[R];t&&!m&&(m=t)}let K="",H=o(v),G=o(j);if((r=h)&&"object"==typeof r&&(n(r)||void 0!==r.src)){let e=n(h)?h.default:h;if(!e.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(e)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!e.height||!e.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(e)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(c=e.blurWidth,u=e.blurHeight,E=E||e.blurDataURL,K=e.src,!w)if(H||G){if(H&&!G){let t=H/e.width;G=Math.round(e.height*t)}else if(!H&&G){let t=G/e.height;H=Math.round(e.width*t)}}else H=e.width,G=e.height}let q=!x&&!g&&("lazy"===b||void 0===b);(!(h="string"==typeof h?h:K)||h.startsWith("data:")||h.startsWith("blob:"))&&(p=!0,q=!1),d.unoptimized&&(p=!0),B&&!d.dangerouslyAllowSVG&&h.split("?",1)[0].endsWith(".svg")&&(p=!0);let V=o(y),Y=Object.assign(w?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:P,objectPosition:I}:{},M?{}:{color:"transparent"},N),Z=D||"empty"===C?null:"blur"===C?`url("data:image/svg+xml;charset=utf-8,${(0,a.getImageBlurSvg)({widthInt:H,heightInt:G,blurWidth:c,blurHeight:u,blurDataURL:E||"",objectFit:Y.objectFit})}")`:`url("${C}")`,X=l.includes(Y.objectFit)?"fill"===Y.objectFit?"100% 100%":"cover":Y.objectFit,J=Z?{backgroundSize:X,backgroundPosition:Y.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:Z}:{},Q=function(e){let{config:t,src:r,unoptimized:a,width:i,quality:l,sizes:n,loader:o}=e;if(a){let e=(0,s.getDeploymentId)();if(r.startsWith("/")&&!r.startsWith("//")&&e){let t=r.includes("?")?"&":"?";r=`${r}${t}dpl=${e}`}return{src:r,srcSet:void 0,sizes:void 0}}let{widths:d,kind:c}=function(e,t,r){let{deviceSizes:s,allSizes:a}=e;if(r){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let s;s=e.exec(r);)t.push(parseInt(s[2]));if(t.length){let e=.01*Math.min(...t);return{widths:a.filter(t=>t>=s[0]*e),kind:"w"}}return{widths:a,kind:"w"}}return"number"!=typeof t?{widths:s,kind:"w"}:{widths:[...new Set([t,2*t].map(e=>a.find(t=>t>=e)||a[a.length-1]))],kind:"x"}}(t,i,n),u=d.length-1;return{sizes:n||"w"!==c?n:"100vw",srcSet:d.map((e,s)=>`${o({config:t,src:r,quality:l,width:e})} ${"w"===c?e:s+1}${c}`).join(", "),src:o({config:t,src:r,quality:l,width:d[u]})}}({config:d,src:h,unoptimized:p,width:H,quality:V,sizes:m,loader:W}),ee=q?"lazy":b;return{props:{...O,loading:ee,fetchPriority:T,width:H,height:G,decoding:L,className:f,style:{...Y,...J},sizes:Q.sizes,srcSet:Q.srcSet,src:k||Q.src},meta:{unoptimized:p,preload:g||x,placeholder:C,fill:w}}}},31324,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return n}});let s=e.r(778),a="undefined"==typeof window,i=a?()=>{}:s.useLayoutEffect,l=a?()=>{}:s.useEffect;function n(e){let{headManager:t,reduceComponentsToState:r}=e;function n(){if(t&&t.mountedInstances){let e=s.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(e))}}return a&&(t?.mountedInstances?.add(e.children),n()),i(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),i(()=>(t&&(t._pendingUpdate=n),()=>{t&&(t._pendingUpdate=n)})),l(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},93529,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={default:function(){return x},defaultHead:function(){return u}};for(var a in s)Object.defineProperty(r,a,{enumerable:!0,get:s[a]});let i=e.r(81258),l=e.r(44066),n=e.r(80506),o=l._(e.r(778)),d=i._(e.r(31324)),c=e.r(37e3);function u(){return[(0,n.jsx)("meta",{charSet:"utf-8"},"charset"),(0,n.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function h(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(43946);let m=["name","httpEquiv","charSet","itemProp"];function p(e){let t,r,s,a;return e.reduce(h,[]).reverse().concat(u().reverse()).filter((t=new Set,r=new Set,s=new Set,a={},e=>{let i=!0,l=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){l=!0;let r=e.key.slice(e.key.indexOf("$")+1);t.has(r)?i=!1:t.add(r)}switch(e.type){case"title":case"base":r.has(e.type)?i=!1:r.add(e.type);break;case"meta":for(let t=0,r=m.length;t<r;t++){let r=m[t];if(e.props.hasOwnProperty(r))if("charSet"===r)s.has(r)?i=!1:s.add(r);else{let t=e.props[r],s=a[r]||new Set;("name"!==r||!l)&&s.has(t)?i=!1:(s.add(t),a[r]=s)}}}return i})).reverse().map((e,t)=>{let r=e.key||t;return o.default.cloneElement(e,{key:r})})}let x=function(e){let{children:t}=e,r=(0,o.useContext)(c.HeadManagerContext);return(0,n.jsx)(d.default,{reduceComponentsToState:p,headManager:r,children:t})};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},71807,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ImageConfigContext",{enumerable:!0,get:function(){return i}});let s=e.r(81258)._(e.r(778)),a=e.r(2965),i=s.default.createContext(a.imageConfigDefault)},94220,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"RouterContext",{enumerable:!0,get:function(){return s}});let s=e.r(81258)._(e.r(778)).default.createContext(null)},51836,(e,t,r)=>{"use strict";function s(e,t){let r=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-r)<Math.abs(e-r)?t:e,0):r}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"findClosestQuality",{enumerable:!0,get:function(){return s}})},5656,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return l}});let s=e.r(51836),a=e.r(40824);function i(e){let{config:t,src:r,width:i,quality:l}=e;if(r.startsWith("/")&&r.includes("?")&&t.localPatterns?.length===1&&"**"===t.localPatterns[0].pathname&&""===t.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${r}" is using a query string which is not configured in images.localPatterns.
3
+ Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let n=(0,s.findClosestQuality)(l,t),o=(0,a.getDeploymentId)();return`${t.path}?url=${encodeURIComponent(r)}&w=${i}&q=${n}${r.startsWith("/")&&o?`&dpl=${o}`:""}`}i.__next_img_default=!0;let l=i},4357,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return a}});let s=e.r(778);function a(e,t){let r=(0,s.useRef)(null),a=(0,s.useRef)(null);return(0,s.useCallback)(s=>{if(null===s){let e=r.current;e&&(r.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(r.current=i(e,s)),t&&(a.current=i(t,s))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},72039,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"Image",{enumerable:!0,get:function(){return v}});let s=e.r(81258),a=e.r(44066),i=e.r(80506),l=a._(e.r(778)),n=s._(e.r(50919)),o=s._(e.r(93529)),d=e.r(1852),c=e.r(2965),u=e.r(71807);e.r(43946);let h=e.r(94220),m=s._(e.r(5656)),p=e.r(4357),x={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,r,s,a,i,l){let n=e?.src;e&&e["data-loaded-src"]!==n&&(e["data-loaded-src"]=n,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&a(!0),r?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let s=!1,a=!1;r.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>s,isPropagationStopped:()=>a,persist:()=>{},preventDefault:()=>{s=!0,t.preventDefault()},stopPropagation:()=>{a=!0,t.stopPropagation()}})}s?.current&&s.current(e)}}))}function b(e){return l.use?{fetchPriority:e}:{fetchpriority:e}}"undefined"==typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let f=(0,l.forwardRef)((e,t)=>{let{src:r,srcSet:s,sizes:a,height:n,width:o,decoding:d,className:c,style:u,fetchPriority:h,placeholder:m,loading:x,unoptimized:f,fill:y,onLoadRef:v,onLoadingCompleteRef:j,setBlurComplete:w,setShowAltText:N,sizesInput:k,onLoad:_,onError:S,...C}=e,E=(0,l.useCallback)(e=>{e&&(S&&(e.src=e.src),e.complete&&g(e,m,v,j,w,f,k))},[r,m,v,j,w,S,f,k]),T=(0,p.useMergedRef)(t,E);return(0,i.jsx)("img",{...C,...b(h),loading:x,width:o,height:n,decoding:d,"data-nimg":y?"fill":"1",className:c,style:u,sizes:a,srcSet:s,src:r,ref:T,onLoad:e=>{g(e.currentTarget,m,v,j,w,f,k)},onError:e=>{N(!0),"empty"!==m&&w(!0),S&&S(e)}})});function y(e){let{isAppRouter:t,imgAttributes:r}=e,s={as:"image",imageSrcSet:r.srcSet,imageSizes:r.sizes,crossOrigin:r.crossOrigin,referrerPolicy:r.referrerPolicy,...b(r.fetchPriority)};return t&&n.default.preload?(n.default.preload(r.src,s),null):(0,i.jsx)(o.default,{children:(0,i.jsx)("link",{rel:"preload",href:r.srcSet?void 0:r.src,...s},"__nimg-"+r.src+r.srcSet+r.sizes)})}let v=(0,l.forwardRef)((e,t)=>{let r=(0,l.useContext)(h.RouterContext),s=(0,l.useContext)(u.ImageConfigContext),a=(0,l.useMemo)(()=>{let e=x||s||c.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),r=e.deviceSizes.sort((e,t)=>e-t),a=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:r,qualities:a,localPatterns:"undefined"==typeof window?s?.localPatterns:e.localPatterns}},[s]),{onLoad:n,onLoadingComplete:o}=e,p=(0,l.useRef)(n);(0,l.useEffect)(()=>{p.current=n},[n]);let g=(0,l.useRef)(o);(0,l.useEffect)(()=>{g.current=o},[o]);let[b,v]=(0,l.useState)(!1),[j,w]=(0,l.useState)(!1),{props:N,meta:k}=(0,d.getImgProps)(e,{defaultLoader:m.default,imgConf:a,blurComplete:b,showAltText:j});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f,{...N,unoptimized:k.unoptimized,placeholder:k.placeholder,fill:k.fill,onLoadRef:p,onLoadingCompleteRef:g,setBlurComplete:v,setShowAltText:w,sizesInput:e.sizes,ref:t}),k.preload?(0,i.jsx)(y,{isAppRouter:!r,imgAttributes:N}):null]})});("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},58956,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={default:function(){return c},getImageProps:function(){return d}};for(var a in s)Object.defineProperty(r,a,{enumerable:!0,get:s[a]});let i=e.r(81258),l=e.r(1852),n=e.r(72039),o=i._(e.r(5656));function d(e){let{props:t}=(0,l.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,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let c=n.Image},59325,(e,t,r)=>{t.exports=e.r(58956)},31713,e=>{"use strict";var t,r=e.i(80506),s=e.i(778);e.i(27171);let a=["image/png","image/jpeg","image/webp","image/gif","image/heic","image/heif"];async function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"image/webp",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.92;return new Promise((s,a)=>{let i=new Image;i.onload=()=>{try{let e=document.createElement("canvas");e.width=i.naturalWidth,e.height=i.naturalHeight;let l=e.getContext("2d");if(!l)return void a(Error("Failed to get canvas context"));l.drawImage(i,0,0);let n=e.toDataURL(t,r);s(n)}catch(e){a(e)}},i.onerror=()=>{a(Error("Failed to load image for conversion"))},i.src=e})}async function l(e){var t;let r=n(e);if(!r)throw Error("Invalid image format");return(t=r.mimeType,a.includes(t.toLowerCase()))?e:(console.log(`Converting unsupported format ${r.mimeType} to WebP`),i(e,"image/webp",.92))}function n(e){if(!e)return null;let t=e.match(/^data:(image\/[a-zA-Z+]+);base64,(.+)$/);return t?{mimeType:t[1],data:t[2]}:null}function o(e,t){if(!e.startsWith("data:"))return void window.open(e,"_blank");try{let t=n(e);if(!t)return void console.error("Failed to parse image format");let r=atob(t.data),s=new Uint8Array(r.length);for(let e=0;e<r.length;e++)s[e]=r.charCodeAt(e);let a=new Blob([s],{type:t.mimeType}),i=URL.createObjectURL(a);window.open(i,"_blank"),setTimeout(()=>URL.revokeObjectURL(i),6e4)}catch(e){console.error("Failed to open image:",e)}}let d={zh:{cannotReadImage:"無法讀取圖片",staticModeApiKeyRequired:"靜態版本需要提供 API 金鑰"},en:{cannotReadImage:"Cannot read image",staticModeApiKeyRequired:"Static mode requires API key"}};function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en";return d[t][e]}let u=async e=>new Promise((t,r)=>{let s=new FileReader;s.onloadend=async()=>{try{let e=s.result,r=await l(e);t(r)}catch(e){r(e)}},s.onerror=r,s.readAsDataURL(e)}),h=null;async function m(){h||(h=await e.A(28292))}let p=async()=>!1,x=async(e,t,r,s,a,i)=>{let l=n(await u(e));if(!l)throw Error(c("cannotReadImage",i));if(await m(),!a)throw Error(c("staticModeApiKeyRequired",i));return h.analyzeProductImageClient({imageBase64:l.data,imageMimeType:l.mimeType,productName:t,productInfo:r,productUrl:s,apiKey:a,locale:i})},g=async(e,t,r,s,a,i)=>{if(await m(),!a)throw Error(c("staticModeApiKeyRequired",i));return h.generateContentPlanClient({route:e,analysis:t,referenceCopy:r,selectedSizes:s,apiKey:a,locale:i})},b=async function(e,t,r){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"1:1",a=arguments.length>4?arguments[4]:void 0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"2k",l=arguments.length>6?arguments[6]:void 0;if(await m(),!t)throw Error(c("staticModeApiKeyRequired",l));return h.generateMarketingImageClient({prompt:e,referenceImageBase64:r,aspectRatio:s,secondaryImageBase64:a,resolution:i,apiKey:t})},f=async(e,t,r,s,a,i,l)=>{if(await m(),!a)throw Error(c("staticModeApiKeyRequired",l));return h.regenerateVisualPromptClient({titleZh:e,copyZh:t,ratio:r,sizeLabel:s,visualSummaryZh:i,apiKey:a})},y=async function(e,t,r,s){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"1:1",i=arguments.length>5?arguments[5]:void 0,l=arguments.length>6?arguments[6]:void 0,n=arguments.length>7?arguments[7]:void 0,o=arguments.length>8?arguments[8]:void 0,d=arguments.length>9?arguments[9]:void 0,u=arguments.length>10?arguments[10]:void 0,p=arguments.length>11?arguments[11]:void 0,x=arguments.length>12&&void 0!==arguments[12]?arguments[12]:"4k",g=arguments.length>13?arguments[13]:void 0;if(await m(),!s)throw Error(c("staticModeApiKeyRequired",g));return h.generateImageFromReferenceClient({productImageBase64:e,referenceImageBase64:t,similarity:r,aspectRatio:a,brandLogoBase64:i,titleText:l,copyText:n,showText:o,titleWeight:d,copyWeight:u,secondaryProductBase64:p,resolution:x,apiKey:s})};var v=((t={})[t.IDLE=0]="IDLE",t[t.ANALYZING=1]="ANALYZING",t[t.RESULTS=2]="RESULTS",t[t.SIZE_SELECTION=3]="SIZE_SELECTION",t[t.PLANNING=4]="PLANNING",t[t.SUITE_READY=5]="SUITE_READY",t[t.ERROR=6]="ERROR",t),j=e.i(29712);let w=e=>{let{analysis:t,imageSrc:s}=e,{t:a}=(0,j.useLocale)();return(0,r.jsxs)("div",{className:"bg-[#1e1e24] border border-white/10 rounded-xl p-6 mb-8 flex flex-col md:flex-row gap-6 shadow-2xl shadow-black/50",children:[(0,r.jsx)("div",{className:"w-full md:w-1/3 shrink-0",children:(0,r.jsxs)("div",{className:"aspect-square rounded-lg overflow-hidden bg-black/20 relative group",children:[(0,r.jsx)("img",{src:s,alt:t.name,className:"w-full h-full object-contain"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-linear-to-t from-black/60 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-end p-4",children:(0,r.jsx)("span",{className:"text-xs text-white/80",children:a("productCard.originalImage")})})]})}),(0,r.jsxs)("div",{className:"flex flex-col justify-center w-full",children:[(0,r.jsx)("div",{className:"uppercase tracking-widest text-xs text-blue-400 font-bold mb-2",children:a("productCard.analysisReport")}),(0,r.jsx)("h2",{className:"text-3xl font-bold text-white serif mb-1",children:t.name}),(0,r.jsx)("p",{className:"text-gray-400 text-sm mb-4 italic",children:t.visual_description}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold text-white/80 uppercase tracking-wider border-b border-blue-500/30 pb-1 inline-block",children:a("productCard.keyFeatures")}),(0,r.jsx)("p",{className:"text-gray-300 leading-relaxed",children:t.key_features})]})]})]})},N=e=>{let{isOpen:t,onClose:s}=e,{t:a,locale:i,messages:l}=(0,j.useLocale)();if(!t)return null;let n=l.guideV2;if(!n?.step1?.title||!n?.step2?.title)return console.error("Missing guideV2 data in locale messages"),null;let o="zh"===i?":":": ";return(0,r.jsxs)("div",{className:"fixed inset-0 z-100 flex items-center justify-center p-4",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/80 backdrop-blur-sm transition-opacity",onClick:s}),(0,r.jsxs)("div",{className:"relative bg-[#1a1a1f] border border-white/10 rounded-2xl max-w-3xl w-full max-h-[90vh] overflow-y-auto shadow-2xl shadow-purple-900/20 animate-in fade-in zoom-in duration-300",children:[(0,r.jsx)("button",{onClick:s,className:"absolute top-4 right-4 text-gray-400 hover:text-white transition-colors p-2",children:(0,r.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,r.jsxs)("div",{className:"p-8",children:[(0,r.jsx)("h2",{className:"text-3xl font-bold serif text-white mb-8",children:a("guideModal.title")}),(0,r.jsx)("div",{className:"mb-8 p-4 bg-blue-900/20 border border-blue-500/30 rounded-xl",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"text-blue-400 text-xl",children:"🔑"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-blue-300 font-semibold mb-1",children:a("guideModal.apiKeyNotice")}),(0,r.jsxs)("p",{className:"text-gray-400 text-sm leading-relaxed",children:[a("guideModal.apiKeyDesc")," ",(0,r.jsx)("a",{href:"https://aistudio.google.com/app/apikey",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300 underline",children:a("guideModal.apiKeyLink")})," ",a("guideModal.apiKeyDesc2")]})]})]})}),(0,r.jsxs)("div",{className:"space-y-8",children:[(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("div",{className:"shrink-0 w-10 h-10 rounded-full bg-purple-600/20 text-purple-400 flex items-center justify-center font-bold text-lg border border-purple-600/30",children:"1"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-lg font-bold text-white mb-2",children:n.step1.title}),(0,r.jsx)("p",{className:"text-gray-400 text-sm leading-relaxed mb-3",children:n.step1.desc}),(0,r.jsx)("ul",{className:"list-disc list-inside text-sm text-gray-400 space-y-1.5 ml-1",children:n.step1.items.map((e,t)=>(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{className:"text-white",children:e.label}),o,e.desc]},t))}),(0,r.jsx)("p",{className:"text-gray-500 text-xs mt-3",children:n.step1.tip})]})]}),(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("div",{className:"shrink-0 w-10 h-10 rounded-full bg-blue-600/20 text-blue-400 flex items-center justify-center font-bold text-lg border border-blue-600/30",children:"2"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-lg font-bold text-white mb-2",children:n.step2.title}),(0,r.jsxs)("p",{className:"text-gray-400 text-sm leading-relaxed mb-2",children:[n.step2.desc," ",(0,r.jsx)("strong",{className:"text-white",children:n.step2.descHighlight}),n.step2.descSuffix]}),(0,r.jsx)("ul",{className:"list-disc list-inside text-sm text-gray-400 space-y-1 ml-1 mb-3",children:n.step2.items.map((e,t)=>(0,r.jsx)("li",{children:e},t))}),(0,r.jsx)("p",{className:"text-gray-400 text-sm leading-relaxed",children:n.step2.tip})]})]}),(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("div",{className:"shrink-0 w-10 h-10 rounded-full bg-pink-600/20 text-pink-400 flex items-center justify-center font-bold text-lg border border-pink-600/30",children:"3"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-lg font-bold text-white mb-2",children:n.step3.title}),(0,r.jsx)("p",{className:"text-gray-400 text-sm leading-relaxed mb-2",children:n.step3.desc}),(0,r.jsx)("ul",{className:"list-disc list-inside text-sm text-gray-400 space-y-1 ml-1 mb-3",children:n.step3.items.map((e,t)=>(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{className:"text-white",children:e.label}),o,e.desc]},t))}),(0,r.jsx)("p",{className:"text-gray-400 text-sm leading-relaxed",children:n.step3.tip})]})]}),(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("div",{className:"shrink-0 w-10 h-10 rounded-full bg-green-600/20 text-green-400 flex items-center justify-center font-bold text-lg border border-green-600/30",children:"4"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-lg font-bold text-white mb-2",children:n.step4.title}),(0,r.jsx)("p",{className:"text-gray-400 text-sm leading-relaxed mb-3",children:n.step4.desc}),(0,r.jsx)("ul",{className:"list-disc list-inside text-sm text-gray-400 space-y-1.5 ml-1",children:n.step4.items.map((e,t)=>(0,r.jsxs)("li",{children:[(0,r.jsx)("strong",{className:"text-white",children:e.label}),o,e.desc]},t))})]})]}),(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("div",{className:"shrink-0 w-10 h-10 rounded-full bg-yellow-600/20 text-yellow-400 flex items-center justify-center font-bold text-lg border border-yellow-600/30",children:"5"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-lg font-bold text-white mb-2",children:n.step5.title}),(0,r.jsx)("p",{className:"text-gray-400 text-sm leading-relaxed mb-3",children:n.step5.desc}),(0,r.jsx)("ul",{className:"list-disc list-inside text-sm text-gray-400 space-y-1.5 ml-1",children:n.step5.items.map((e,t)=>(0,r.jsx)("li",{children:e},t))})]})]}),(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("div",{className:"shrink-0 w-10 h-10 rounded-full bg-orange-600/20 text-orange-400 flex items-center justify-center font-bold text-lg border border-orange-600/30",children:"6"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-lg font-bold text-white mb-2",children:n.step6.title}),(0,r.jsx)("p",{className:"text-gray-400 text-sm leading-relaxed mb-2",children:n.step6.desc}),(0,r.jsx)("div",{className:"space-y-3",children:n.step6.sections.map((e,t)=>(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-white text-sm font-semibold mb-1.5",children:e.title}),(0,r.jsx)("ul",{className:"list-disc list-inside text-sm text-gray-400 space-y-1 ml-1",children:e.items.map((e,t)=>(0,r.jsx)("li",{children:e},t))})]},t))})]})]})]})]})]})]})},k=(e,t)=>{if("en"===t){let t="Clean solid color background #f6f6f6, professional product photography composition, emphasize product details, no clutter";switch(e){case"single":return`${t}, single product centered, product as absolute focal point`;case"fan":return`${t}, multiple products in fan-shaped spread, showcase product series`;case"grid":return`${t}, products arranged in neat rows, display rhythmic aesthetics`;case"stack":return`${t}, products naturally stacked, showcase richness`;case"custom":return"Describe your desired composition, background color, arrangement...";default:return t}}let r="乾淨的純色背景,色號#f6f6f6,專業商品攝影構圖,強調產品細節,無雜亂元素";switch(e){case"single":return`${r},單一產品置中展示,讓產品成為絕對焦點`;case"fan":return`${r},多片產品呈扇形展開排列,展現產品系列感`;case"grid":return`${r},產品整齊並排展示,呈現規律美感`;case"stack":return`${r},產品自然層疊堆放,展現豐富感`;case"custom":return"請自由描述您想要的構圖方式、背景色、排列方式等...";default:return r}},_=e=>{switch(e){case"1:1":return"bg-blue-500";case"9:16":return"bg-purple-500";case"4:5":return"bg-pink-500";case"16:9":return"bg-green-500";case"1:1-commercial":return"bg-amber-500";default:return"bg-orange-500"}},S=s.default.memo(e=>{let{className:t=""}=e;return(0,r.jsxs)("svg",{className:`animate-spin ${t}`,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,r.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})});S.displayName="Spinner";let C=e=>{switch(e){case"1:1":return"bg-blue-500/20 text-blue-300 border-blue-500/30";case"1:1-commercial":return"bg-amber-500/20 text-amber-300 border-amber-500/30";case"9:16":return"bg-purple-500/20 text-purple-300 border-purple-500/30";case"4:5":return"bg-pink-500/20 text-pink-300 border-pink-500/30";case"16:9":return"bg-green-500/20 text-green-300 border-green-500/30";default:return"bg-gray-500/20 text-gray-300 border-gray-500/30"}},E=e=>{switch(e){case"1:1":case"1:1-commercial":default:return"aspect-square";case"9:16":return"aspect-[9/16]";case"4:5":return"aspect-[4/5]";case"16:9":return"aspect-[16/9]"}},T=s.default.memo(e=>{let{contentSet:t,onChange:s,onRegeneratePrompt:a,isRegenerating:i,t:l,locale:n}=e,o="en"===n?[{value:"single",label:"Single",description:"Single product centered"},{value:"fan",label:"Fan",description:"Fan-shaped arrangement"},{value:"grid",label:"Grid",description:"Organized grid layout"},{value:"stack",label:"Stack",description:"Natural stacking"},{value:"custom",label:"Custom",description:"Use visual summary"}]:[{value:"single",label:"單品特寫",description:"單一產品置中展示"},{value:"fan",label:"扇形展開",description:"多產品呈扇形排列"},{value:"grid",label:"整齊並排",description:"產品整齊排列成行"},{value:"stack",label:"自然堆疊",description:"產品自然層疊擺放"},{value:"custom",label:"自訂",description:"使用構圖摘要描述"}];return(0,r.jsxs)("div",{className:"bg-[#1e1e24] border border-white/5 rounded-xl p-4 sm:p-5 lg:p-6",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,r.jsx)("div",{className:"flex items-center gap-2",children:(0,r.jsxs)("span",{className:`text-[10px] font-bold uppercase tracking-wider px-2 py-1 rounded ${C(t.ratio)}`,children:[l("contentSuite.plan")," ",t.set_number]})}),(0,r.jsx)("button",{onClick:()=>a(t.id),disabled:i,className:"text-xs px-2 py-1 bg-linear-to-r from-green-600 to-emerald-600 hover:opacity-90 text-white font-bold rounded-full transition-opacity disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-1",title:l("contentSuite.regeneratePrompt"),children:i?(0,r.jsx)(S,{className:"w-3 h-3"}):(0,r.jsx)("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})})]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-xs text-gray-400 mb-1",children:l("contentSuite.titleLabel")}),(0,r.jsx)("textarea",{value:t.title,onChange:e=>s(t.id,"title",e.target.value),className:"w-full bg-black/30 border border-white/10 rounded-lg px-3 py-2 text-sm text-white focus:border-blue-500 focus:outline-none resize-none h-16 sm:h-20"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-xs text-gray-400 mb-1",children:l("contentSuite.copyLabel")}),(0,r.jsx)("textarea",{value:t.copy,onChange:e=>s(t.id,"copy",e.target.value),className:"w-full bg-black/30 border border-white/10 rounded-lg px-3 py-2 text-sm text-white focus:border-blue-500 focus:outline-none resize-none h-20 sm:h-24"})]}),"1:1-commercial"===t.ratio&&(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-xs text-amber-400 mb-1",children:l("contentSuite.arrangement")}),(0,r.jsx)("div",{className:"grid grid-cols-5 gap-1",children:o.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>s(t.id,"arrangement_style",e.value),className:`px-1 py-1 text-[9px] rounded transition-all ${(t.arrangement_style||"single")===e.value?"bg-amber-500 text-black font-bold":"bg-black/30 text-gray-400 hover:bg-amber-500/20 hover:text-amber-300 border border-white/10"}`,title:e.description,children:e.label},e.value))})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-xs text-gray-400 mb-1",children:l("contentSuite.visualSummary")}),(0,r.jsx)("textarea",{value:t.visual_summary,onChange:e=>s(t.id,"visual_summary",e.target.value),placeholder:"1:1-commercial"===t.ratio?k(t.arrangement_style||"single",n):l("contentSuite.visualSummaryPlaceholder"),className:`w-full bg-black/30 border rounded-lg px-3 py-2 text-xs focus:outline-none resize-none h-20 sm:h-24 ${"1:1-commercial"===t.ratio?"border-amber-500/30 text-amber-200 focus:border-amber-500 placeholder:text-amber-500/50":"border-white/10 text-gray-300 focus:border-blue-500 placeholder:text-gray-600"}`})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-xs text-gray-400 mb-1",children:l("contentSuite.visualPrompt")}),(0,r.jsx)("textarea",{value:t.visual_prompt_en,onChange:e=>s(t.id,"visual_prompt_en",e.target.value),className:"w-full bg-black/30 border border-white/10 rounded-lg px-3 py-2 text-[10px] text-gray-300 focus:border-blue-500 focus:outline-none font-mono resize-none h-36 sm:h-44"})]})]})]})});T.displayName="ScriptEditorRow";let L=e=>{let{isOpen:t,onClose:a,sourceImage:i,sourceRatio:l,productImage:n,brandLogo:d,secondaryProduct:c,marketingRoute:u,contentTitle:h,contentCopy:m,apiKey:p,t:x}=e,g=[{ratio:"1:1",label:x("extend.sizeLabels.fb"),description:x("extend.sizeDescriptions.square")},{ratio:"9:16",label:x("extend.sizeLabels.story"),description:x("extend.sizeDescriptions.vertical")},{ratio:"4:5",label:x("extend.sizeLabels.ig"),description:x("extend.sizeDescriptions.portrait")},{ratio:"16:9",label:x("extend.sizeLabels.landscape"),description:x("extend.sizeDescriptions.horizontal")},{ratio:"1:1-commercial",label:x("extend.sizeLabels.commercial"),description:x("extend.sizeDescriptions.commercial")}],b=g.filter(e=>e.ratio!==l),[f,v]=(0,s.useState)([]),[j,w]=(0,s.useState)([]),[N,k]=(0,s.useState)(()=>{let e,t;return e=u.route_name.replace(/\s/g,""),t=[`#${e}`,x("extend.hashtags.newProduct"),x("extend.hashtags.recommended"),x("extend.hashtags.mustBuy"),x("extend.hashtags.quality")],[{platform:x("extend.socialTemplates.instagram"),title:u.headline,content:`${u.headline}
4
+
5
+ ${m}
6
+
7
+ ───
8
+
9
+ ${u.subhead}
10
+
11
+ ${u.style_brief?`${x("extendTemplates.styleLabel")}${u.style_brief}
12
+ `:""}${u.target_audience?`${x("extendTemplates.suitableFor")}${u.target_audience}
13
+ `:""}
14
+ ${x("extendTemplates.clickToLearnMore")}
15
+ ${x("extendTemplates.dmForDiscount")}
16
+
17
+ ${t.join(" ")}`,hashtags:t},{platform:x("extend.socialTemplates.facebook"),title:u.headline,content:`【${h}】
18
+ ${u.headline}
19
+
20
+ ${m}
21
+
22
+ ━━━━━━━━━━
23
+
24
+ ${u.subhead}
25
+
26
+ ${u.style_brief?`${x("extendTemplates.styleFeature")}${u.style_brief}
27
+ `:""}${u.target_audience?`${x("extendTemplates.targetAudience")}${u.target_audience}
28
+ `:""}
29
+ ${x("extendTemplates.limitedOffer")}
30
+ ${x("extendTemplates.freeShipping")}
31
+
32
+ ${x("extendTemplates.comment1ForDm")}
33
+ ${x("extendTemplates.learnMoreLink")}
34
+
35
+ ${t.slice(0,4).join(" ")}`,hashtags:t.slice(0,4)},{platform:x("extend.socialTemplates.story"),title:h,content:`${u.headline}
36
+
37
+ ${x("extendTemplates.swipeUpToLearnMore")}
38
+
39
+ ${u.subhead}`,hashtags:t.slice(0,2)}]}),[_,C]=(0,s.useState)(null),[T,L]=(0,s.useState)(!1),[R,P]=(0,s.useState)("select"),I=(e,t)=>{navigator.clipboard.writeText(e),C(t),setTimeout(()=>C(null),2e3)},$=async()=>{if(0===f.length)return;L(!0),P("generating");let e=f.map(e=>{let t=g.find(t=>t.ratio===e);return{ratio:e,label:t.label,image:null,loading:!0,error:null}});w(e);let t=[...e];for(let e=0;e<f.length;e++){let r=f[e];try{let s=await y(n,i,85,p,r,d,h,m,!1,"bold","regular",c);t[e]={...t[e],image:s,loading:!1}}catch(r){t[e]={...t[e],loading:!1,error:r instanceof Error?r.message:x("extend.generationFailed")}}w([...t])}k(z(u,h,m)),L(!1),P("results")},z=(e,t,r)=>{let s=e.route_name.replace(/\s/g,""),a=[`#${s}`,x("extend.hashtags.newProduct"),x("extend.hashtags.recommended"),x("extend.hashtags.mustBuy"),x("extend.hashtags.quality")];return[{platform:x("extend.socialTemplates.instagram"),title:e.headline,content:`${e.headline}
40
+
41
+ ${r}
42
+
43
+ ───
44
+
45
+ ${e.subhead}
46
+
47
+ ${e.style_brief?`風格:${e.style_brief}
48
+ `:""}${e.target_audience?`適合:${e.target_audience}
49
+ `:""}
50
+ 點擊連結了解更多
51
+ 私訊小編享專屬優惠
52
+
53
+ ${a.join(" ")}`,hashtags:a},{platform:x("extend.socialTemplates.facebook"),title:e.headline,content:`【${t}】
54
+ ${e.headline}
55
+
56
+ ${r}
57
+
58
+ ━━━━━━━━━━
59
+
60
+ ${e.subhead}
61
+
62
+ ${e.style_brief?`▸ 風格特色:${e.style_brief}
63
+ `:""}${e.target_audience?`▸ 適合對象:${e.target_audience}
64
+ `:""}
65
+ ▸ 限時優惠進行中
66
+ ▸ 全館滿額免運
67
+
68
+ 留言 +1 小編私訊您
69
+ 立即了解更多:[連結]
70
+
71
+ ${a.slice(0,4).join(" ")}`,hashtags:a.slice(0,4)},{platform:x("extend.socialTemplates.story"),title:t,content:`${e.headline}
72
+
73
+ 上滑了解更多
74
+
75
+ ${e.subhead}`,hashtags:a.slice(0,2)}]},O=()=>{v([]),w([]),k([]),P("select"),a()};return t?(0,r.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/80 backdrop-blur-sm",onClick:"select"===R?O:void 0}),(0,r.jsxs)("div",{className:"relative w-full max-w-4xl max-h-[90vh] overflow-y-auto bg-[#0a0a0f] border border-white/10 rounded-2xl shadow-2xl m-4",children:[(0,r.jsxs)("div",{className:"sticky top-0 z-10 flex items-center justify-between p-4 border-b border-white/10 bg-[#0a0a0f]",children:[(0,r.jsx)("h2",{className:"text-lg font-bold text-white",children:x("extend.title")}),"generating"!==R&&(0,r.jsx)("button",{onClick:O,className:"p-2 text-gray-400 hover:text-white transition-colors",title:x("common.close"),children:(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,r.jsxs)("div",{className:"p-6",children:["select"===R&&(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"flex items-start gap-4",children:[(0,r.jsx)("div",{className:"w-24 h-24 rounded-lg overflow-hidden border border-white/20 shrink-0",children:(0,r.jsx)("img",{src:i,alt:x("alt.source"),className:"w-full h-full object-cover",loading:"lazy"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm text-gray-400 mb-1",children:x("extend.sourceImage")}),(0,r.jsx)("p",{className:"text-white font-medium",children:h}),(0,r.jsxs)("p",{className:"text-xs text-gray-500 mt-1",children:[g.find(e=>e.ratio===l)?.label," (",l,")"]})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm text-gray-400 mb-3",children:x("extend.selectRatios")}),(0,r.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:b.map(e=>(0,r.jsxs)("button",{onClick:()=>{var t;return t=e.ratio,void v(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:`p-3 rounded-lg border text-left transition-all ${f.includes(e.ratio)?"border-white bg-white/10 text-white":"border-white/10 bg-white/5 text-gray-400 hover:border-white/30"}`,children:[(0,r.jsx)("p",{className:"font-medium text-sm",children:e.label}),(0,r.jsx)("p",{className:"text-xs opacity-70",children:e.description})]},e.ratio))})]}),(0,r.jsxs)("button",{onClick:$,disabled:0===f.length||!n,className:"w-full py-3 bg-white text-black font-bold rounded-lg hover:bg-gray-200 transition-colors disabled:opacity-30 disabled:cursor-not-allowed",children:[x("extend.startExtend")," (",f.length,")"]}),(0,r.jsxs)("div",{className:"pt-6 border-t border-white/10",children:[(0,r.jsxs)("h3",{className:"text-sm font-bold text-white mb-4 flex items-center gap-2",children:[(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})}),x("extend.socialCopy")]}),(0,r.jsxs)("div",{className:"mb-4 p-4 bg-white/5 rounded-lg border border-white/10",children:[(0,r.jsx)("p",{className:"text-xs text-gray-500 mb-1",children:x("extend.headline")}),(0,r.jsx)("p",{className:"text-white font-bold text-lg mb-3",children:u.headline}),(0,r.jsx)("p",{className:"text-xs text-gray-500 mb-1",children:x("extend.subhead")}),(0,r.jsx)("p",{className:"text-gray-300",children:u.subhead})]}),(0,r.jsx)("div",{className:"space-y-3",children:N.map((e,t)=>(0,r.jsxs)("div",{className:"p-4 bg-white/5 rounded-lg border border-white/10",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,r.jsx)("span",{className:"text-sm font-bold text-white",children:e.platform}),(0,r.jsx)("button",{onClick:()=>I(`${e.title}
76
+
77
+ ${e.content}`,t),className:`text-xs transition-colors ${_===t?"text-green-400":"text-gray-400 hover:text-white"}`,children:_===t?x("extend.copied"):x("extend.copy")})]}),(0,r.jsx)("p",{className:"text-sm text-white font-medium mb-1",children:e.title}),(0,r.jsx)("p",{className:"text-xs text-gray-300 whitespace-pre-wrap",children:e.content})]},t))})]})]}),"generating"===R&&(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"text-center py-8",children:[(0,r.jsx)(S,{className:"w-12 h-12 text-white mx-auto mb-4"}),(0,r.jsx)("p",{className:"text-white font-medium",children:x("extend.generating")}),(0,r.jsxs)("p",{className:"text-sm text-gray-400 mt-1",children:[j.filter(e=>!e.loading).length," / ",j.length]})]}),(0,r.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:j.map((e,t)=>(0,r.jsxs)("div",{className:"p-3 rounded-lg border border-white/10 bg-white/5",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[e.loading?(0,r.jsx)(S,{className:"w-4 h-4 text-white"}):e.error?(0,r.jsx)("span",{className:"text-red-400",children:"✕"}):(0,r.jsx)("span",{className:"text-green-400",children:"✓"}),(0,r.jsx)("span",{className:"text-sm text-white",children:e.label})]}),e.image&&(0,r.jsx)("div",{className:"w-full aspect-square rounded overflow-hidden",children:(0,r.jsx)("img",{src:e.image,alt:e.label,className:"w-full h-full object-cover"})})]},e.ratio))})]}),"results"===R&&(0,r.jsxs)("div",{className:"space-y-8",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("h3",{className:"text-sm font-bold text-white mb-4 flex items-center gap-2",children:[(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),x("extend.generatedImages")]}),(0,r.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:j.map((e,t)=>(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)("div",{className:`relative rounded-lg overflow-hidden border border-white/10 bg-[#15151a] ${E(e.ratio)}`,children:e.loading?(0,r.jsx)("div",{className:"w-full h-full flex items-center justify-center",children:(0,r.jsx)(S,{className:"w-8 h-8 text-white"})}):e.error?(0,r.jsxs)("div",{className:"w-full h-full flex flex-col items-center justify-center p-4",children:[(0,r.jsx)("p",{className:"text-xs text-red-400 text-center mb-2",children:e.error}),(0,r.jsx)("button",{onClick:()=>{let e;return e=j[t].ratio,void(w(e=>{let r=[...e];return r[t]={...r[t],loading:!0,error:null},r}),y(n,i,85,p,e,d,h,m,!1,"bold","regular",c).then(e=>{w(r=>{let s=[...r];return s[t]={...s[t],image:e,loading:!1},s})}).catch(e=>{w(r=>{let s=[...r];return s[t]={...s[t],loading:!1,error:e instanceof Error?e.message:x("extend.generationFailed")},s})}))},className:"text-xs text-white underline",children:x("extend.retry")})]}):e.image?(0,r.jsxs)("div",{className:"relative w-full h-full group/card",children:[(0,r.jsx)("img",{src:e.image,alt:e.label,className:"w-full h-full object-cover cursor-pointer",onClick:()=>o(e.image,e.label)}),(0,r.jsx)("div",{className:"absolute inset-0 bg-black/50 opacity-100 md:opacity-0 md:group-hover/card:opacity-100 transition-opacity flex items-center justify-center pointer-events-none",children:(0,r.jsx)("a",{href:e.image,download:`${e.ratio.replace(":","x")}.png`,className:"p-2 bg-white/20 hover:bg-white/40 rounded-full text-white pointer-events-auto",title:x("production.download"),onClick:e=>e.stopPropagation(),children:(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})})})})]}):null}),(0,r.jsxs)("p",{className:"text-xs text-center text-gray-400",children:[e.label," (",e.ratio,")"]})]},e.ratio))})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("h3",{className:"text-sm font-bold text-white mb-4 flex items-center gap-2",children:[(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})}),x("extend.socialCopy")]}),(0,r.jsxs)("div",{className:"mb-4 p-4 bg-white/5 rounded-lg border border-white/10",children:[(0,r.jsx)("p",{className:"text-xs text-gray-500 mb-1",children:x("extend.headline")}),(0,r.jsx)("p",{className:"text-white font-bold text-lg mb-3",children:u.headline}),(0,r.jsx)("p",{className:"text-xs text-gray-500 mb-1",children:x("extend.subhead")}),(0,r.jsx)("p",{className:"text-gray-300",children:u.subhead})]}),(0,r.jsx)("div",{className:"space-y-3",children:N.map((e,t)=>(0,r.jsxs)("div",{className:"p-4 bg-white/5 rounded-lg border border-white/10",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,r.jsx)("span",{className:"text-sm font-bold text-white",children:e.platform}),(0,r.jsx)("button",{onClick:()=>I(`${e.title}
78
+
79
+ ${e.content}`,t),className:`text-xs transition-colors ${_===t?"text-green-400":"text-gray-400 hover:text-white"}`,children:_===t?x("extend.copied"):x("extend.copy")})]}),(0,r.jsx)("p",{className:"text-sm text-white font-medium mb-1",children:e.title}),(0,r.jsx)("p",{className:"text-xs text-gray-300 whitespace-pre-wrap",children:e.content})]},t))})]}),(0,r.jsxs)("div",{className:"flex gap-3",children:[(0,r.jsx)("button",{onClick:()=>{P("select"),v([])},className:"flex-1 py-3 bg-white/10 text-white font-bold rounded-lg hover:bg-white/20 transition-colors",children:x("extend.addMore")}),(0,r.jsx)("button",{onClick:O,className:"flex-1 py-3 bg-white text-black font-bold rounded-lg hover:bg-gray-200 transition-colors",children:x("extend.done")})]})]})]})]})]}):null},R={regular:"Regular (400)",medium:"Medium (500)",bold:"Bold (700)",black:"Black (900)"},P=e=>{let{contentSet:t,apiKey:a,productImage:i,secondaryProduct:l,brandLogo:n,onContentChange:d,t:c,globalSettings:h,marketingRoute:m}=e,[p,x]=(0,s.useState)(null),[g,f]=(0,s.useState)(!1),[v,j]=(0,s.useState)(null),[w,N]=(0,s.useState)(!1),[k,_]=(0,s.useState)(!1),[T,P]=(0,s.useState)("prompt"),[I,$]=(0,s.useState)(null),{showText:z,titleWeight:O,copyWeight:A,similarityLevel:M,resolution:D}=h,U=async()=>{if(!i)return void j(c("production.uploadProductFirst"));if("reference"===T&&!I)return void j(c("production.uploadReferenceFirst"));f(!0),j(null);try{let e;if("reference"===T&&I)e=await y(i,I,"low"===M?20:"medium"===M?55:85,a,t.ratio,n,t.title,t.copy,z,O,A,l,D);else{let r=`CRITICAL: The product in the reference image is SACRED and MUST NOT be altered. Preserve EXACT packaging, colors, labels, text, shape. ONLY modify: background, lighting, props AROUND the product. ${t.visual_prompt_en}`;n&&(r+=" Place brand logo in corner subtly."),z&&(r+=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"bold",s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"regular",a=R[r]||"Bold (700)",i=R[s]||"Regular (400)";return`
80
+
81
+ 【TEXT OVERLAY - CRITICAL INSTRUCTIONS】
82
+ Overlay the following Traditional Chinese text on the image:
83
+ - Title: "${e}" (Font: Noto Sans TC ${a})
84
+ - Copy: "${t}" (Font: Noto Sans TC ${i})
85
+
86
+ CRITICAL TEXT RENDERING RULES:
87
+ 1. Render EXACT characters as provided - do NOT approximate, substitute, or hallucinate any characters
88
+ 2. Each Chinese character must be pixel-perfect with correct strokes
89
+ 3. Use proper Traditional Chinese (繁體中文) character forms, NOT Simplified Chinese
90
+ 4. Typography must be clean, sharp, and legible at 4K resolution
91
+ 5. Position text with appropriate contrast against background
92
+ 6. Maintain consistent character spacing and line height`}(t.title,t.copy,O,A)),r+=" AVOID: distorted product, modified packaging, wrong text/labels, simplified Chinese, blurry details, unnatural proportions, extra watermarks, low quality.",e=await b(r,a,i,t.ratio,l,D)}x(e)}catch(e){j(e instanceof Error?e.message:c("production.generateFailed"))}finally{f(!1)}};return(0,r.jsxs)("div",{className:`flex flex-col gap-2 group relative ${v?"ring-2 ring-red-500/30 rounded-xl":""}`,children:[(0,r.jsxs)("div",{className:`relative rounded-xl overflow-hidden bg-[#15151a] border border-white/10 shadow-lg w-full ${E(t.ratio)}`,children:[g?(0,r.jsxs)("div",{className:"w-full h-full flex flex-col items-center justify-center p-4 bg-linear-to-br from-white/5 to-white/10",children:[(0,r.jsx)(S,{className:"w-10 h-10 text-white mb-3"}),(0,r.jsx)("p",{className:"text-sm text-white font-medium",children:c("production.generating")}),(0,r.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:c("production.pleaseWait")})]}):p?(0,r.jsxs)("div",{className:"relative w-full h-full",children:[(0,r.jsx)("img",{src:p,alt:t.title,className:"w-full h-full object-cover cursor-pointer",onClick:()=>o(p,t.title)}),(0,r.jsxs)("div",{className:"absolute inset-0 bg-black/50 hidden md:flex opacity-0 group-hover:opacity-100 transition-opacity items-center justify-center gap-2",children:[(0,r.jsx)("button",{onClick:e=>{e.stopPropagation(),o(p,t.title)},className:"p-2 bg-white/20 hover:bg-white/40 rounded-full text-white backdrop-blur-sm",title:c("extend.openInNewTab"),children:(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})}),(0,r.jsx)("a",{href:p,download:`${t.id}.png`,className:"p-2 bg-white/20 hover:bg-white/40 rounded-full text-white backdrop-blur-sm",title:c("production.download"),onClick:e=>e.stopPropagation(),children:(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})})}),(0,r.jsx)("button",{onClick:U,disabled:g,className:"p-2 bg-white/20 hover:bg-white/40 rounded-full text-white backdrop-blur-sm disabled:opacity-50 disabled:cursor-not-allowed",title:c("production.redraw"),children:(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}),(0,r.jsx)("button",{onClick:()=>_(!0),className:"p-2 bg-white/20 hover:bg-white/40 rounded-full text-white backdrop-blur-sm",title:c("extend.extendButton"),children:(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"})})})]}),(0,r.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 md:hidden flex justify-center gap-3 p-2 bg-gradient-to-t from-black/80 to-transparent",children:[(0,r.jsx)("button",{onClick:e=>{e.stopPropagation(),o(p,t.title)},className:"p-2.5 bg-white/20 active:bg-white/40 rounded-full text-white backdrop-blur-sm",children:(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})}),(0,r.jsx)("a",{href:p,download:`${t.id}.png`,className:"p-2.5 bg-white/20 active:bg-white/40 rounded-full text-white backdrop-blur-sm",onClick:e=>e.stopPropagation(),children:(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})})}),(0,r.jsx)("button",{onClick:U,disabled:g,className:"p-2.5 bg-white/20 active:bg-white/40 rounded-full text-white backdrop-blur-sm disabled:opacity-50",children:(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}),(0,r.jsx)("button",{onClick:()=>_(!0),className:"p-2.5 bg-white/20 active:bg-white/40 rounded-full text-white backdrop-blur-sm",children:(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"})})})]})]}):(0,r.jsxs)("div",{className:"w-full h-full flex flex-col items-center justify-center p-4 text-center relative",children:[i&&(0,r.jsx)("div",{className:"absolute inset-0 opacity-20",children:(0,r.jsx)("img",{src:i,className:"w-full h-full object-cover blur-sm",alt:c("alt.productBackground"),loading:"lazy"})}),(0,r.jsx)("button",{onClick:U,disabled:!i,className:"w-12 h-12 rounded-full bg-white/5 flex items-center justify-center hover:bg-white hover:text-black transition-all text-gray-500 border border-white/10 relative z-10 disabled:opacity-30 disabled:cursor-not-allowed",children:(0,r.jsxs)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})]})})]}),(0,r.jsxs)("div",{className:`absolute top-2 left-2 px-2 py-1 rounded text-[10px] font-bold uppercase tracking-wider border backdrop-blur-sm z-20 ${C(t.ratio)}`,children:[c("contentSuite.plan")," ",t.set_number]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("p",{className:"text-xs text-gray-400 truncate flex-1 pr-2",title:t.title,children:t.title}),(0,r.jsxs)("button",{onClick:()=>N(!w),className:"text-[10px] text-gray-500 hover:text-white transition-colors flex items-center gap-1",children:[w?c("production.collapse"):c("production.expand"),(0,r.jsx)("svg",{className:`w-3 h-3 transition-transform ${w?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),w&&(0,r.jsxs)("div",{className:"space-y-4 p-4 sm:p-5 bg-white/5 rounded-xl border border-white/10 animate-in fade-in slide-in-from-top-2 duration-200",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-[10px] text-gray-500 mb-1.5 block",children:c("production.generationMode")}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("button",{onClick:()=>P("prompt"),className:`flex-1 py-1.5 px-2 rounded text-xs font-bold transition-all ${"prompt"===T?"bg-white/10 text-white border border-white":"bg-white/5 text-gray-400 border border-transparent hover:bg-white/10 hover:text-white"}`,children:c("production.promptMode")}),(0,r.jsx)("button",{onClick:()=>P("reference"),className:`flex-1 py-1.5 px-2 rounded text-xs font-bold transition-all ${"reference"===T?"bg-white/10 text-white border border-white":"bg-white/5 text-gray-400 border border-transparent hover:bg-white/10 hover:text-white"}`,children:c("production.referenceMode")})]})]}),"reference"===T&&(0,r.jsxs)("div",{className:"pt-2 border-t border-white/10",children:[(0,r.jsx)("label",{className:"text-[10px] text-gray-500 mb-1.5 block",children:c("production.uploadReference")}),(0,r.jsxs)("label",{className:"flex items-center justify-center w-full h-20 border border-dashed border-white/30 rounded-lg cursor-pointer hover:border-white hover:bg-white/5 transition-all relative overflow-hidden",children:[I?(0,r.jsxs)("div",{className:"w-full h-full relative group",children:[(0,r.jsx)("img",{src:I,alt:c("alt.reference"),className:"w-full h-full object-contain",loading:"lazy"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-black/60 flex items-center justify-center opacity-100 md:opacity-0 md:group-hover:opacity-100 transition-opacity",children:(0,r.jsx)("span",{className:"text-white text-[10px]",children:c("production.changeReference")})})]}):(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-2",children:[(0,r.jsx)("svg",{className:"w-5 h-5 mb-1 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),(0,r.jsx)("p",{className:"text-[10px] text-gray-400",children:c("contentSuite.clickToUpload")})]}),(0,r.jsx)("input",{type:"file",className:"hidden",accept:"image/*",onChange:async e=>{e.target.files&&e.target.files[0]&&$(await u(e.target.files[0]))}})]})]}),"prompt"===T&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"pt-2 border-t border-white/10",children:[(0,r.jsx)("label",{className:"text-[10px] text-gray-500 mb-1 block",children:c("production.titleInput")}),(0,r.jsx)("input",{type:"text",value:t.title,onChange:e=>d(t.id,"title",e.target.value),className:"w-full px-2 py-1.5 text-sm font-bold text-white bg-black/30 border border-white/10 rounded focus:border-white focus:outline-none",placeholder:c("production.titlePlaceholder")})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-[10px] text-gray-500 mb-1 block",children:c("production.copyInput")}),(0,r.jsx)("textarea",{value:t.copy,onChange:e=>d(t.id,"copy",e.target.value),className:"w-full px-2 py-1.5 text-xs text-gray-300 bg-black/30 border border-white/10 rounded focus:border-white focus:outline-none resize-none",rows:2,placeholder:c("production.copyPlaceholder")})]})]}),v&&(0,r.jsxs)("div",{className:"flex items-center gap-2 p-2 bg-red-500/10 border border-red-500/30 rounded-lg",children:[(0,r.jsx)("svg",{className:"w-4 h-4 text-red-400 shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,r.jsx)("p",{className:"text-xs text-red-400",children:v})]})]}),!w&&v&&(0,r.jsxs)("div",{className:"flex items-center gap-2 p-2 bg-red-500/10 border border-red-500/30 rounded-lg",children:[(0,r.jsx)("svg",{className:"w-4 h-4 text-red-400 shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,r.jsx)("p",{className:"text-xs text-red-400",children:v})]}),p&&(0,r.jsx)(L,{isOpen:k,onClose:()=>_(!1),sourceImage:p,sourceRatio:t.ratio,productImage:i,brandLogo:n,secondaryProduct:l,marketingRoute:m,contentTitle:t.title,contentCopy:t.copy,apiKey:a,t:c})]})},I=s.default.memo(e=>{let{file:t,previewUrl:s,onFileChange:a,label:i,emptyText:l,changeText:n,hint:o,borderColor:d,iconColor:c}=e;return(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("label",{className:`block text-sm font-bold mb-2 ${"white"===c?"text-white/80":"text-indigo-200"}`,children:i}),(0,r.jsxs)("label",{className:`flex flex-col items-center justify-center w-full h-40 border-2 border-dashed rounded-xl cursor-pointer transition-all relative overflow-hidden bg-black/20 ${"white"===d?"border-white/20 hover:border-white/40 hover:bg-white/5":"indigo"===d?"border-indigo-500/30 hover:border-indigo-400 hover:bg-indigo-500/5":"border-pink-500/30 hover:border-pink-400 hover:bg-pink-500/5"}`,children:[t&&s?(0,r.jsxs)("div",{className:"w-full h-full relative group",children:[(0,r.jsx)("img",{src:s,alt:i,className:"w-full h-full object-contain p-2"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-black/60 flex items-center justify-center opacity-100 md:opacity-0 md:group-hover:opacity-100 transition-opacity",children:(0,r.jsx)("span",{className:"text-white text-sm",children:n})})]}):(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-4",children:[(0,r.jsx)("svg",{className:`w-8 h-8 mb-2 ${"white"===c?"text-white/60":"indigo"===c?"text-indigo-400":"text-pink-400"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),(0,r.jsx)("p",{className:`text-xs ${"white"===c?"text-white/70":"indigo"===c?"text-indigo-300":"text-pink-300"}`,children:l}),o&&(0,r.jsx)("p",{className:"text-[10px] text-gray-500 mt-1",children:o})]}),(0,r.jsx)("input",{type:"file",className:"hidden",onChange:e=>{e.target.files&&e.target.files[0]&&a(e.target.files[0])},accept:"image/*"})]}),t&&(0,r.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),a(null)},className:"absolute top-8 right-2 w-6 h-6 bg-red-500/80 hover:bg-red-500 rounded-full flex items-center justify-center transition-colors z-10",children:(0,r.jsx)("svg",{className:"w-4 h-4 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})});function $(e){let[t,r]=(0,s.useState)(null),[a,i]=(0,s.useState)(null);return(0,s.useEffect)(()=>{let t=!0,s=null;return e?(i(s=URL.createObjectURL(e)),u(e).then(e=>{t&&r(e)})):(r(null),i(null)),()=>{t=!1,s&&URL.revokeObjectURL(s)}},[e]),{base64:t,previewUrl:a}}I.displayName="ImageUploader";let z=e=>{let{plan:t,onContentUpdate:a,apiKey:i,productImage:l,secondaryProduct:n,brandLogo:o,onProductImageChange:d,onSecondaryProductChange:c,onBrandLogoChange:u,marketingRoute:h}=e,{t:m,locale:p}=(0,j.useLocale)(),[x,g]=(0,s.useState)("review"),[b,y]=(0,s.useState)(t.content_sets),[v,w]=(0,s.useState)(null),[N,S]=(0,s.useState)({showText:!1,titleWeight:"bold",copyWeight:"regular",similarityLevel:"medium",resolution:"4k"}),C=$(l),E=$(n),L=$(o);(0,s.useEffect)(()=>{y(t.content_sets),g("review")},[t]);let R=(e,t,r)=>{let s=b.map(s=>s.id===e?{...s,[t]:r}:s);y(s),a(s)},z=async e=>{w(e);let t=b.find(t=>t.id===e);if(t)try{let r=t.visual_summary;if("1:1-commercial"===t.ratio){let e=t.arrangement_style||"single",s=(e=>{switch(e){case"single":return"single product centered, hero shot composition";case"fan":return"multiple products arranged in elegant fan spread pattern, radiating outward";case"grid":return"products neatly arranged in organized grid or row, symmetrical layout";case"stack":return"products naturally stacked or layered, casual elegant arrangement";case"custom":return"";default:return"single product centered"}})(e);if(r?.trim()||(r=k(e,p)),s){let e="en"===p?"【Product Arrangement - Highest Priority】":"【產品排列方式 - 最高優先級】";r=`${e}${s}。
93
+
94
+ ${r}`}}let s=await f(t.title,t.copy,t.ratio,t.size_label,i,r);R(e,"visual_prompt_en",s)}catch(t){let e=t instanceof Error?t.message:m("common.unknownError");alert(`${m("contentSuite.regeneratePromptFailed")}${e}`)}finally{w(null)}},O=(e,t)=>{S(r=>({...r,[e]:t}))},A=t.selected_sizes.map(e=>({ratio:e,label:b.find(t=>t.ratio===e)?.size_label||e,sets:b.filter(t=>t.ratio===e)}));return(0,r.jsxs)("div",{className:"w-full animate-in fade-in slide-in-from-bottom-8 duration-700",children:[(0,r.jsxs)("div",{className:"mb-8 p-6 bg-white/5 border border-white/10 rounded-xl",children:[(0,r.jsx)("div",{className:"flex items-center gap-3 mb-4",children:(0,r.jsx)("span",{className:"text-xs font-mono text-white bg-white/10 px-2 py-1 rounded-md border border-white/20",children:m("stepIndicator.step04")})}),(0,r.jsxs)("h4",{className:"text-lg font-bold text-white mb-2 flex items-center gap-2",children:[(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),m("contentSuite.settingsTitle")]}),(0,r.jsx)("p",{className:"text-sm text-gray-400 mb-6",children:m("contentSuite.settingsDescription")}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-6",children:[(0,r.jsx)(I,{file:l,previewUrl:C.previewUrl,onFileChange:d,label:m("contentSuite.mainProduct"),emptyText:m("contentSuite.clickToUploadMain"),changeText:m("contentSuite.changeImage"),borderColor:"white",iconColor:"white"}),(0,r.jsx)(I,{file:n,previewUrl:E.previewUrl,onFileChange:c,label:m("contentSuite.secondaryProduct"),emptyText:m("contentSuite.clickToUploadSecondary"),changeText:m("contentSuite.changeImage"),hint:m("contentSuite.secondaryProductHint"),borderColor:"white",iconColor:"white"}),(0,r.jsx)(I,{file:o,previewUrl:L.previewUrl,onFileChange:u,label:m("contentSuite.brandLogo"),emptyText:m("contentSuite.clickToUploadLogo"),changeText:m("contentSuite.changeLogo"),borderColor:"white",iconColor:"white"})]})]}),(0,r.jsxs)("div",{className:"flex flex-col md:flex-row items-center justify-between mb-8 gap-4 border-b border-white/10 pb-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-2xl font-bold text-white serif mb-1",children:t.plan_name}),(0,r.jsx)("p",{className:"text-gray-400 text-sm",children:t.selected_sizes.map(e=>{let t=b.filter(t=>t.ratio===e).length,r=b.find(t=>t.ratio===e)?.size_label||e;return`${r} ${t}${m("contentSuite.sets")}`}).join(" | ")})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("button",{onClick:()=>g("review"),className:`px-4 py-2 rounded-md text-sm font-bold transition-all ${"review"===x?"bg-white/10 text-white border border-white":"bg-white/5 text-gray-400 border border-transparent hover:text-white hover:bg-white/10"}`,children:m("contentSuite.reviewMode")}),(0,r.jsx)("button",{onClick:()=>g("production"),className:`px-4 py-2 rounded-md text-sm font-bold transition-all ${"production"===x?"bg-white/10 text-white border border-white":"bg-white/5 text-gray-400 border border-transparent hover:text-white hover:bg-white/10"}`,children:m("contentSuite.productionMode")})]})]}),"review"===x&&(0,r.jsxs)("div",{className:"space-y-8",children:[(0,r.jsxs)("div",{className:"bg-blue-900/20 border border-blue-500/30 p-4 rounded-lg mb-6 flex items-start gap-3",children:[(0,r.jsx)("svg",{className:"w-5 h-5 text-blue-400 shrink-0 mt-0.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-blue-200 text-sm font-bold mb-1",children:m("contentSuite.reviewInfoTitle")}),(0,r.jsx)("p",{className:"text-blue-300/70 text-xs",children:m("contentSuite.reviewInfoDescription")})]})]}),A.map(e=>(0,r.jsxs)("div",{children:[(0,r.jsxs)("h3",{className:"text-lg font-bold text-white mb-4 flex items-center gap-2",children:[(0,r.jsx)("span",{className:`w-2 h-6 rounded-full ${_(e.ratio)}`}),e.label," (",e.ratio,") - ",e.sets.length," ",m("contentSuite.sets")]}),(0,r.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:e.sets.map(e=>(0,r.jsx)(T,{contentSet:e,onChange:R,onRegeneratePrompt:z,isRegenerating:v===e.id,t:m,locale:p},e.id))})]},e.ratio))]}),"production"===x&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-8 p-4 sm:p-6 bg-white/5 border border-white/10 rounded-xl",children:[(0,r.jsxs)("h4",{className:"text-sm font-bold text-white mb-4 flex items-center gap-2",children:[(0,r.jsxs)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),m("production.globalSettings")]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-4",children:[(0,r.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,r.jsx)("input",{type:"checkbox",checked:N.showText,onChange:e=>O("showText",e.target.checked),className:"w-4 h-4 rounded border-gray-500 bg-black/50 text-white focus:ring-white focus:ring-offset-0"}),(0,r.jsx)("span",{className:"text-xs text-gray-300",children:m("production.showContent")})]}),N.showText&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("label",{className:"text-xs text-gray-400",children:m("production.titleWeight")}),(0,r.jsxs)("select",{value:N.titleWeight,onChange:e=>O("titleWeight",e.target.value),className:"px-2 py-1 text-xs bg-white/5 border border-white/10 rounded text-white focus:border-white focus:outline-none",children:[(0,r.jsx)("option",{value:"regular",children:m("fontWeights.regular")}),(0,r.jsx)("option",{value:"medium",children:m("fontWeights.medium")}),(0,r.jsx)("option",{value:"bold",children:m("fontWeights.bold")}),(0,r.jsx)("option",{value:"black",children:m("fontWeights.black")})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("label",{className:"text-xs text-gray-400",children:m("production.copyWeight")}),(0,r.jsxs)("select",{value:N.copyWeight,onChange:e=>O("copyWeight",e.target.value),className:"px-2 py-1 text-xs bg-white/5 border border-white/10 rounded text-white focus:border-white focus:outline-none",children:[(0,r.jsx)("option",{value:"regular",children:m("fontWeights.regular")}),(0,r.jsx)("option",{value:"medium",children:m("fontWeights.medium")}),(0,r.jsx)("option",{value:"bold",children:m("fontWeights.bold")}),(0,r.jsx)("option",{value:"black",children:m("fontWeights.black")})]})]})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-xs text-gray-400 mb-2 block",children:m("production.referenceSimilarity")}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:["low","medium","high"].map(e=>(0,r.jsxs)("button",{onClick:()=>O("similarityLevel",e),className:`flex-1 min-w-[100px] max-w-[140px] min-h-[44px] py-2 px-3 text-xs rounded-lg transition-colors ${N.similarityLevel===e?"bg-white/10 text-white border border-white":"bg-white/5 text-gray-400 border border-transparent hover:bg-white/10 hover:text-white"}`,children:[(0,r.jsx)("div",{className:"font-bold",children:m(`production.similarity${e.charAt(0).toUpperCase()+e.slice(1)}`)}),(0,r.jsx)("div",{className:"text-[10px] opacity-70 mt-0.5",children:m(`production.similarity${e.charAt(0).toUpperCase()+e.slice(1)}Desc`)})]},e))})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-xs text-gray-400 mb-2 block",children:m("production.resolution")}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:["1k","2k","4k"].map(e=>(0,r.jsxs)("button",{onClick:()=>O("resolution",e),className:`flex-1 min-w-[100px] max-w-[140px] min-h-[44px] py-2 px-3 text-xs rounded-lg transition-colors ${N.resolution===e?"bg-white/10 text-white border border-white":"bg-white/5 text-gray-400 border border-transparent hover:bg-white/10 hover:text-white"}`,children:[(0,r.jsx)("div",{className:"font-bold",children:m(`production.resolution${e.toUpperCase()}`)}),(0,r.jsx)("div",{className:"text-[10px] opacity-70 mt-0.5",children:m(`production.resolution${e.toUpperCase()}Desc`)})]},e))})]})]}),(0,r.jsx)("p",{className:"text-[10px] text-gray-500 mt-3",children:m("production.perCardModeHint")})]}),A.map((e,t)=>(0,r.jsxs)("div",{className:t>0?"mt-12":"",children:[(0,r.jsxs)("h3",{className:"text-lg font-semibold text-white mb-4 flex items-center gap-2",children:[(0,r.jsx)("span",{className:`w-2 h-6 rounded-full ${_(e.ratio)}`}),e.label," (",e.ratio,")"]}),(0,r.jsx)("div",{className:`grid gap-6 ${(e.ratio,"grid-cols-1 lg:grid-cols-3")}`,children:e.sets.map(e=>(0,r.jsx)(P,{contentSet:e,apiKey:i,productImage:C.base64,secondaryProduct:E.base64,brandLogo:L.base64,onContentChange:R,t:m,globalSettings:N,marketingRoute:h},e.id))})]},e.ratio))]})]})},O="gemini_api_key";function A(){return localStorage.getItem(O)}let M=e=>{let{isOpen:t,onClose:a,onSave:i,serverHasKey:l=!1}=e,{t:n}=(0,j.useLocale)(),[o,d]=(0,s.useState)("");return((0,s.useEffect)(()=>{let e=A();e&&d(e)},[t]),t)?(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm animate-in fade-in duration-200",children:(0,r.jsxs)("div",{className:"bg-[#1e1e24] border border-white/10 rounded-2xl p-8 max-w-md w-full shadow-2xl transform transition-all scale-100",children:[(0,r.jsx)("h3",{className:"text-xl font-bold text-white mb-4 serif",children:n("apiKeyModal.title")}),l&&(0,r.jsxs)("div",{className:"mb-6 p-4 bg-green-900/20 border border-green-500/30 rounded-lg",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,r.jsx)("svg",{className:"w-5 h-5 text-green-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,r.jsx)("span",{className:"text-green-300 font-bold text-sm",children:n("apiKeyModal.freeMode")})]}),(0,r.jsxs)("p",{className:"text-green-300/70 text-xs",children:[n("apiKeyModal.freeModeDesc"),(0,r.jsx)("br",{}),n("apiKeyModal.freeModeDesc2")]})]}),(0,r.jsx)("p",{className:"text-gray-400 text-sm mb-6",children:l?(0,r.jsxs)(r.Fragment,{children:[n("apiKeyModal.enterKeyOptional"),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-xs text-gray-500",children:n("apiKeyModal.enterKeyOptionalDesc")})]}):(0,r.jsxs)(r.Fragment,{children:[n("apiKeyModal.enterKeyRequired"),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-xs text-gray-500",children:n("apiKeyModal.enterKeyRequiredDesc")})]})}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-xs font-bold text-gray-500 uppercase tracking-wider mb-2",children:[n("apiKeyModal.labelOptional")," ",l&&(0,r.jsxs)("span",{className:"text-gray-600 normal-case",children:["(",n("common.optional"),")"]})]}),(0,r.jsx)("input",{type:"password",value:o,onChange:e=>d(e.target.value),placeholder:"AIzaSy...",className:"w-full bg-black/30 border border-white/10 rounded-lg px-4 py-3 text-white placeholder-gray-600 focus:border-blue-500 focus:outline-none transition-colors font-mono text-sm"})]}),(0,r.jsxs)("div",{className:"flex gap-3 pt-4",children:[(0,r.jsx)("button",{onClick:a,className:"flex-1 px-4 py-2 rounded-lg border border-white/10 text-gray-400 hover:bg-white/5 hover:text-white transition-colors text-sm font-medium",children:n(l?"common.close":"common.cancel")}),o.trim()&&(0,r.jsx)("button",{onClick:()=>{if(o.trim()){var e;e=o.trim(),localStorage.setItem(O,e),i(o.trim()),a()}},className:"flex-1 px-4 py-2 rounded-lg bg-blue-600 text-white font-bold hover:bg-blue-500 transition-colors text-sm",children:n("apiKeyModal.saveButton")}),A()&&(0,r.jsx)("button",{onClick:()=>{localStorage.removeItem(O),d(""),i(""),a()},className:"flex-1 px-4 py-2 rounded-lg bg-red-600 text-white font-bold hover:bg-red-500 transition-colors text-sm",children:n("apiKeyModal.clearKey")})]}),(0,r.jsx)("div",{className:"text-center pt-2",children:(0,r.jsx)("a",{href:"https://aistudio.google.com/app/apikey",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-400 hover:text-blue-300 underline",children:n("apiKeyModal.getApiKey")})})]})]})}):null},D=()=>{let{locale:e,toggleLocale:t,t:s}=(0,j.useLocale)();return(0,r.jsx)("button",{onClick:t,className:"text-gray-400 hover:text-white text-xs sm:text-sm font-bold transition-colors",title:s("zh"===e?"language.switchToEnglish":"language.switchToChinese"),children:s(`language.${e}`)})};function U(e){let{imagePreview:t,productName:s,productInfo:a,productUrl:i,refCopy:l,showAnalyzeButton:n,onFileChange:o,onClearImage:d,onProductNameChange:c,onProductInfoChange:u,onProductUrlChange:h,onRefCopyChange:m,onAnalyze:p}=e,{t:x}=(0,j.useLocale)(),g=!!t;return(0,r.jsx)("div",{className:`
95
+ w-full max-w-4xl mx-auto mt-6 sm:mt-8 animate-fade-in-up
96
+ p-4 sm:p-6 rounded-2xl sm:rounded-3xl border-2 transition-all duration-500
97
+ ${g?"border-white/40 bg-white/5":"border-gray-600/50 bg-black/20"}
98
+ `,children:(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 sm:gap-6",children:[(0,r.jsx)("div",{className:"order-2 md:order-1",children:(0,r.jsxs)("label",{className:`flex flex-col items-center justify-center w-full h-full min-h-[280px] sm:min-h-[320px] border-2 border-dashed rounded-xl sm:rounded-2xl cursor-pointer transition-all duration-500 relative overflow-hidden group ${g?"border-white/30 bg-black/30":"border-gray-600/50 hover:border-gray-500/70 bg-black/20"}`,children:[t?(0,r.jsxs)("div",{className:"w-full h-full relative",children:[(0,r.jsx)("img",{src:t,alt:x("alt.preview"),className:"w-full h-full object-contain p-4 transition-transform duration-500 group-hover:scale-105"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent flex items-center justify-center opacity-100 md:opacity-0 md:group-hover:opacity-100 transition-all duration-300 backdrop-blur-[2px]",children:(0,r.jsx)("span",{className:"text-white font-bold text-sm px-4 py-2 rounded-full bg-white/10 border border-white/20 backdrop-blur-md",children:x("input.changeImage")})}),(0,r.jsx)("button",{type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),d()},className:"absolute top-2 right-2 p-2 bg-black/60 hover:bg-red-500/80 rounded-full text-white transition-colors z-10",title:x("input.clearImage"),children:(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}):(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 px-4 text-center",children:[(0,r.jsx)("div",{className:"w-16 h-16 sm:w-20 sm:h-20 rounded-2xl bg-gray-700/30 border border-gray-600/50 flex items-center justify-center mb-4 group-hover:scale-110 group-hover:border-gray-500/70 transition-all duration-300",children:(0,r.jsxs)("svg",{className:"w-8 h-8 sm:w-10 sm:h-10 text-gray-500 group-hover:text-gray-400 transition-colors",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"}),(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 13a3 3 0 11-6 0 3 3 0 016 0z"})]})}),(0,r.jsx)("p",{className:"mb-2 text-sm sm:text-base font-medium text-gray-400 group-hover:text-gray-300 transition-colors",children:x("input.uploadOrTakePhoto")}),(0,r.jsx)("p",{className:"text-xs text-gray-600",children:x("input.supportedFormats")})]}),(0,r.jsx)("input",{type:"file",className:"hidden",onChange:o,accept:"image/*"})]})}),(0,r.jsxs)("div",{className:"order-1 md:order-2 flex flex-col gap-3 sm:gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:`block text-xs sm:text-sm font-bold uppercase tracking-wider mb-1.5 sm:mb-2 text-center md:text-left transition-colors ${g?"text-white":"text-gray-500"}`,children:x("input.productName")}),(0,r.jsx)("input",{type:"text",value:s,onChange:e=>c(e.target.value),placeholder:x("input.productNamePlaceholder"),className:`w-full border rounded-lg sm:rounded-xl px-3 sm:px-4 py-2.5 sm:py-3 text-white placeholder-gray-600 focus:outline-none transition-all duration-300 text-sm sm:text-base ${g?"bg-black/30 border-white/20 focus:border-white/40":"bg-black/20 border-gray-600/30 focus:border-gray-500/50"}`})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:`block text-xs sm:text-sm font-bold uppercase tracking-wider mb-1.5 sm:mb-2 text-center md:text-left transition-colors ${g?"text-gray-400":"text-gray-600"}`,children:x("input.productInfo")}),(0,r.jsx)("textarea",{value:a,onChange:e=>u(e.target.value),placeholder:x("input.productInfoPlaceholder"),className:`w-full border rounded-lg sm:rounded-xl px-3 sm:px-4 py-2.5 sm:py-3 text-white placeholder-gray-600 focus:outline-none transition-all duration-300 h-20 sm:h-24 resize-none text-xs sm:text-sm leading-relaxed ${g?"bg-black/30 border-white/20 focus:border-white/40":"bg-black/20 border-gray-600/30 focus:border-gray-500/50"}`})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:`block text-xs sm:text-sm font-bold uppercase tracking-wider mb-1.5 sm:mb-2 text-center md:text-left transition-colors ${g?"text-gray-400":"text-gray-600"}`,children:x("input.productUrl")}),(0,r.jsx)("input",{type:"url",value:i,onChange:e=>h(e.target.value),placeholder:x("input.productUrlPlaceholder"),className:`w-full border rounded-lg sm:rounded-xl px-3 sm:px-4 py-2.5 sm:py-3 text-white placeholder-gray-600 focus:outline-none transition-all duration-300 text-sm sm:text-base ${g?"bg-black/30 border-white/20 focus:border-white/40":"bg-black/20 border-gray-600/30 focus:border-gray-500/50"}`})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:`block text-xs sm:text-sm font-bold uppercase tracking-wider mb-1.5 sm:mb-2 text-center md:text-left transition-colors ${g?"text-gray-400":"text-gray-600"}`,children:x("input.refCopy")}),(0,r.jsx)("textarea",{value:l,onChange:e=>m(e.target.value),placeholder:x("input.refCopyPlaceholder"),className:`w-full border rounded-lg sm:rounded-xl px-3 sm:px-4 py-2.5 sm:py-3 text-white placeholder-gray-600 focus:outline-none transition-all duration-300 h-20 sm:h-24 resize-none text-xs sm:text-sm leading-relaxed ${g?"bg-black/30 border-white/20 focus:border-white/40":"bg-black/20 border-gray-600/30 focus:border-gray-500/50"}`})]}),n&&(0,r.jsxs)("button",{onClick:p,className:`btn-primary mt-2 sm:mt-auto w-full py-3 sm:py-4 font-bold text-xs sm:text-sm uppercase tracking-widest rounded-lg sm:rounded-xl transition-all duration-300 flex items-center justify-center gap-2 ${g?"bg-white text-black hover:bg-gray-200 hover:scale-[1.02]":"bg-gray-700 text-gray-400 cursor-not-allowed"}`,disabled:!g,children:[(0,r.jsx)("span",{children:x("input.startButton")}),(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14 5l7 7m0 0l-7 7m7-7H3"})})]})]})]})})}function F(e){let{routes:t,activeRouteIndex:s,routeSupplements:a,onSelectRoute:i,onUpdateRoute:l,onUpdateSupplement:n}=e,{t:o}=(0,j.useLocale)(),d=["from-white/10 to-white/5","from-white/10 to-white/5","from-white/10 to-white/5"],c=["border-white/30","border-white/30","border-white/30"],u=["text-white","text-white","text-white"];return(0,r.jsxs)("div",{className:"mb-8 sm:mb-10 animate-fade-in-up",children:[(0,r.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between mb-4 sm:mb-6 border-b border-white/5 pb-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"flex items-center gap-3 mb-2",children:(0,r.jsx)("span",{className:"text-xs font-mono text-white bg-white/10 px-2 py-1 rounded-md border border-white/20",children:o("stepIndicator.step01")})}),(0,r.jsx)("h3",{className:"text-xl sm:text-2xl font-bold text-white",children:o("phase1.title")})]}),(0,r.jsx)("span",{className:"text-xs text-gray-500 mt-2 sm:mt-0",children:o("phase1.selectHint")})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4 sm:gap-6",children:t.map((e,t)=>{let h=s===t;return(0,r.jsxs)("div",{onClick:()=>i(t),className:"card-hover glass-panel p-5 sm:p-6 lg:p-8 rounded-xl sm:rounded-2xl transition-all duration-500 cursor-pointer flex flex-col group relative",style:{border:h?"1px solid rgba(255, 255, 255, 0.3)":"1px solid rgba(255, 255, 255, 0.05)"},children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-3 sm:mb-4",children:[h?(0,r.jsxs)("span",{className:"text-xs font-mono text-white px-2 py-1 rounded-md",style:{backgroundColor:"rgba(255, 255, 255, 0.1)",border:"1px solid rgba(255, 255, 255, 0.4)"},children:[o("phase1.routeLabel")," ",String.fromCharCode(65+t)]}):(0,r.jsxs)("span",{className:"text-xs font-mono text-gray-500 px-2 py-1",children:[o("phase1.routeLabel")," ",String.fromCharCode(65+t)]}),(0,r.jsx)("div",{className:`
99
+ w-6 h-6 sm:w-7 sm:h-7 rounded-full flex items-center justify-center transition-all duration-300
100
+ ${h?"bg-white/10 text-white shadow-lg scale-100":"bg-white/5 border border-white/10 scale-90 opacity-0 group-hover:opacity-50"}
101
+ `,children:(0,r.jsx)("svg",{className:"w-3.5 h-3.5 sm:w-4 sm:h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})})]}),(0,r.jsxs)("div",{className:"space-y-4 sm:space-y-5 flex-grow",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-xs font-bold uppercase tracking-wider text-gray-400 mb-1.5 block",children:o("phase1.routeName")}),(0,r.jsx)("input",{type:"text",value:e.route_name,onChange:r=>{r.stopPropagation(),l(t,{...e,route_name:r.target.value})},onClick:e=>e.stopPropagation(),className:`w-full bg-black/30 border border-white/10 rounded-lg px-3 py-2.5 sm:py-3 text-base sm:text-lg font-bold text-white focus:border-[var(--accent-primary)]/50 focus:outline-none transition-colors ${h?u[t%3]:""}`})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-xs font-bold uppercase tracking-wider text-gray-400 mb-1.5 block",children:o("phase1.headline")}),(0,r.jsx)("textarea",{value:e.headline,onChange:r=>{r.stopPropagation(),l(t,{...e,headline:r.target.value})},onClick:e=>e.stopPropagation(),className:`w-full bg-black/30 border border-white/10 rounded-lg px-3 py-2.5 sm:py-3 text-sm sm:text-base focus:border-[var(--accent-primary)]/50 focus:outline-none font-medium resize-none h-16 sm:h-20 ${h?"text-white":"text-gray-300"}`})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-xs font-bold uppercase tracking-wider text-gray-400 mb-1.5 block",children:o("phase1.subhead")}),(0,r.jsx)("textarea",{value:e.subhead,onChange:r=>{r.stopPropagation(),l(t,{...e,subhead:r.target.value})},onClick:e=>e.stopPropagation(),className:"w-full bg-black/30 border border-white/10 rounded-lg px-3 py-2.5 sm:py-3 text-sm text-gray-300 focus:border-[var(--accent-primary)]/50 focus:outline-none resize-none h-16 sm:h-20"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-xs font-bold uppercase tracking-wider text-gray-400 mb-1.5 block",children:o("phase1.styleDescription")}),(0,r.jsx)("textarea",{value:e.style_brief,onChange:r=>{r.stopPropagation(),l(t,{...e,style_brief:r.target.value})},onClick:e=>e.stopPropagation(),className:"w-full bg-black/30 border border-white/10 rounded-lg px-3 py-2.5 sm:py-3 text-sm text-gray-300 focus:border-[var(--accent-primary)]/50 focus:outline-none resize-none h-24 sm:h-28"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"text-xs font-bold uppercase tracking-wider text-gray-400 mb-1.5 block",children:o("phase1.targetAudience")}),(0,r.jsx)("textarea",{value:e.target_audience,onChange:r=>{r.stopPropagation(),l(t,{...e,target_audience:r.target.value})},onClick:e=>e.stopPropagation(),className:"w-full bg-black/30 border border-white/10 rounded-lg px-3 py-2.5 sm:py-3 text-sm text-gray-300 focus:border-[var(--accent-primary)]/50 focus:outline-none resize-none h-20 sm:h-24"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:`text-[10px] font-bold uppercase tracking-wider mb-1 block ${u[t%3]}`,children:o("phase1.supplement")}),(0,r.jsx)("textarea",{value:a[t],onChange:e=>{e.stopPropagation(),n(t,e.target.value)},onClick:e=>e.stopPropagation(),placeholder:o("phase1.supplementPlaceholder"),className:`w-full bg-gradient-to-br ${d[t%3]} border ${c[t%3]} rounded-lg px-3 py-2 sm:py-2.5 text-xs text-gray-300 placeholder-gray-600 focus:outline-none resize-none h-16 sm:h-20`})]})]}),(0,r.jsx)("div",{className:`absolute inset-0 rounded-xl sm:rounded-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none bg-gradient-to-br ${d[t%3]} blur-xl -z-10`})]},t)})})]})}let W={blue:{border:"border-blue-400/40",bg:"bg-blue-500/15",glow:"shadow-[0_0_20px_rgba(59,130,246,0.15)]",checkbox:"bg-blue-400",text:"text-blue-100",accent:"text-blue-300"},purple:{border:"border-purple-400/40",bg:"bg-purple-500/15",glow:"shadow-[0_0_20px_rgba(139,92,246,0.15)]",checkbox:"bg-purple-400",text:"text-purple-100",accent:"text-purple-300"},pink:{border:"border-pink-400/40",bg:"bg-pink-500/15",glow:"shadow-[0_0_20px_rgba(236,72,153,0.15)]",checkbox:"bg-pink-400",text:"text-pink-100",accent:"text-pink-300"},green:{border:"border-green-400/40",bg:"bg-green-500/15",glow:"shadow-[0_0_20px_rgba(16,185,129,0.15)]",checkbox:"bg-green-400",text:"text-green-100",accent:"text-green-300"},amber:{border:"border-amber-400/40",bg:"bg-amber-500/15",glow:"shadow-[0_0_20px_rgba(245,158,11,0.15)]",checkbox:"bg-amber-400",text:"text-amber-100",accent:"text-amber-300"}},B=s.default.memo(e=>{let{checked:t,onChange:s,name:a,ratioLabel:i,description:l,color:n}=e,o=W[n];return(0,r.jsxs)("label",{className:`
102
+ relative cursor-pointer p-3 sm:p-4 rounded-xl sm:rounded-2xl border transition-all duration-300 flex flex-col items-center justify-center gap-1.5 sm:gap-2 group h-28 sm:h-36
103
+ ${t?`${o.bg} ${o.border} ${o.glow}`:"bg-black/20 border-white/5 hover:border-white/20 hover:bg-white/5"}
104
+ `,children:[(0,r.jsx)("input",{type:"checkbox",checked:t,onChange:e=>s(e.target.checked),className:"sr-only"}),t&&(0,r.jsx)("div",{className:"absolute top-2 right-2 sm:top-3 sm:right-3",children:(0,r.jsx)("div",{className:`w-2 h-2 rounded-full ${o.checkbox} shadow-lg animate-pulse`})}),(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:`font-bold text-sm sm:text-base transition-colors ${t?o.text:"text-gray-300"}`,children:a}),(0,r.jsx)("div",{className:`text-[10px] sm:text-xs font-mono mt-0.5 ${t?o.accent:"text-gray-500"}`,children:i}),(0,r.jsx)("div",{className:`text-[9px] sm:text-[10px] mt-1 ${t?o.accent:"text-gray-500"} opacity-70`,children:l})]})]})});function K(e){let{sizeSelection:t,errorMsg:s,onSizeChange:a,onConfirm:i}=e,{t:l}=(0,j.useLocale)();return(0,r.jsxs)("div",{className:"animate-fade-in-up",children:[(0,r.jsxs)("div",{className:"glass-panel p-4 sm:p-6 lg:p-8 rounded-xl sm:rounded-2xl lg:rounded-3xl border border-white/5",children:[(0,r.jsx)("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center mb-4 sm:mb-6 gap-3 sm:gap-4",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"flex items-center gap-3 mb-2",children:(0,r.jsx)("span",{className:"text-xs font-mono px-2 py-1 rounded-md border text-white bg-white/10 border-white/20",children:l("stepIndicator.step02")})}),(0,r.jsx)("h3",{className:"text-xl sm:text-2xl font-bold mb-1 sm:mb-2 text-white",children:l("phase2.title")}),(0,r.jsx)("p",{className:"text-xs sm:text-sm text-gray-500",children:l("phase2.description")})]})}),s&&(0,r.jsx)("div",{className:"mb-4 p-3 bg-[var(--brand-pink)]/10 border border-[var(--brand-pink)]/30 rounded-lg text-[var(--brand-pink)] text-sm",children:s}),(0,r.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-3 sm:gap-4 lg:gap-5",children:[(0,r.jsx)(B,{ratio:"1:1",checked:t["1:1"],onChange:e=>a("1:1",e),name:l("sizes.1:1.name"),ratioLabel:l("sizes.1:1.ratio"),description:l("sizes.1:1.description"),color:"blue"}),(0,r.jsx)(B,{ratio:"9:16",checked:t["9:16"],onChange:e=>a("9:16",e),name:l("sizes.9:16.name"),ratioLabel:l("sizes.9:16.ratio"),description:l("sizes.9:16.description"),color:"purple"}),(0,r.jsx)(B,{ratio:"4:5",checked:t["4:5"],onChange:e=>a("4:5",e),name:l("sizes.4:5.name"),ratioLabel:l("sizes.4:5.ratio"),description:l("sizes.4:5.description"),color:"pink"}),(0,r.jsx)(B,{ratio:"16:9",checked:t["16:9"],onChange:e=>a("16:9",e),name:l("sizes.16:9.name"),ratioLabel:l("sizes.16:9.ratio"),description:l("sizes.16:9.description"),color:"green"}),(0,r.jsx)(B,{ratio:"1:1-commercial",checked:t["1:1-commercial"],onChange:e=>a("1:1-commercial",e),name:l("sizes.1:1-commercial.name"),ratioLabel:l("sizes.1:1-commercial.ratio"),description:l("sizes.1:1-commercial.description"),color:"amber"})]})]}),(0,r.jsx)("div",{className:"flex justify-center mt-6 sm:mt-8",children:(0,r.jsx)("button",{onClick:i,className:"btn-primary px-10 sm:px-12 py-3.5 sm:py-4 rounded-xl font-bold text-sm sm:text-base transition-all duration-300 bg-white text-black hover:bg-gray-200 hover:scale-[1.02]",children:l("phase2.confirmButton")})})]})}B.displayName="SizeCheckbox";var H=e.i(13907),G=e.i(59325);function q(){let{t:e}=(0,j.useLocale)();return(0,r.jsxs)("div",{className:"jsx-fadb241e6f0632f6 flex-1 flex flex-col items-center justify-center space-y-8 text-center animate-in fade-in zoom-in duration-500",children:[(0,r.jsxs)("div",{className:"jsx-fadb241e6f0632f6 relative w-64 h-16 overflow-hidden",children:[(0,r.jsx)("div",{className:"jsx-fadb241e6f0632f6 absolute inset-0 flex items-center justify-between px-2",children:[...Array(8)].map((e,t)=>(0,r.jsx)("div",{style:{animationDelay:`${.1*t}s`},className:"jsx-fadb241e6f0632f6 w-3 h-3 bg-blue-400/60 rounded-full animate-pulse"},t))}),(0,r.jsx)("div",{style:{animation:"pacman-move 3s ease-in-out infinite"},className:"jsx-fadb241e6f0632f6 absolute top-1/2 -translate-y-1/2 w-12 h-12",children:(0,r.jsx)(G.default,{src:"/images/logo.svg",alt:e("alt.loading"),width:48,height:48,className:"w-full h-full object-contain drop-shadow-[0_0_8px_rgba(59,130,246,0.5)]",style:{animation:"pacman-chomp 0.3s ease-in-out infinite"}})}),(0,r.jsx)("div",{style:{animation:"pacman-trail 3s ease-in-out infinite"},className:"jsx-fadb241e6f0632f6 absolute top-1/2 -translate-y-1/2 h-1 bg-gradient-to-r from-blue-500/50 to-transparent rounded-full"})]}),(0,r.jsx)(H.default,{id:"fadb241e6f0632f6",children:"@keyframes pacman-move{0%{left:-48px}to{left:calc(100% + 48px)}}@keyframes pacman-chomp{0%,to{transform:scale(1)}50%{transform:scale(.9)scaleX(1.1)}}@keyframes pacman-trail{0%{opacity:0;width:0;left:0}10%{opacity:.5}to{opacity:0;width:100%;left:0}}"}),(0,r.jsxs)("div",{className:"jsx-fadb241e6f0632f6",children:[(0,r.jsx)("h2",{className:"jsx-fadb241e6f0632f6 text-2xl font-bold text-white mb-2",children:e("analyzing.title")}),(0,r.jsx)("p",{className:"jsx-fadb241e6f0632f6 text-gray-400",children:e("analyzing.description")})]})]})}function V(e){let{routeName:t}=e,{t:s}=(0,j.useLocale)();return(0,r.jsxs)("div",{className:"jsx-fadb241e6f0632f6 flex-1 flex flex-col items-center justify-center py-16 space-y-8 text-center animate-in fade-in zoom-in duration-500",children:[(0,r.jsxs)("div",{className:"jsx-fadb241e6f0632f6 relative w-64 h-16 overflow-hidden",children:[(0,r.jsx)("div",{className:"jsx-fadb241e6f0632f6 absolute inset-0 flex items-center justify-between px-2",children:[...Array(8)].map((e,t)=>(0,r.jsx)("div",{style:{animationDelay:`${.1*t}s`},className:"jsx-fadb241e6f0632f6 w-3 h-3 bg-blue-400/60 rounded-full animate-pulse"},t))}),(0,r.jsx)("div",{style:{animation:"pacman-move 3s ease-in-out infinite"},className:"jsx-fadb241e6f0632f6 absolute top-1/2 -translate-y-1/2 w-12 h-12",children:(0,r.jsx)(G.default,{src:"/images/logo.svg",alt:s("alt.loading"),width:48,height:48,className:"w-full h-full object-contain drop-shadow-[0_0_8px_rgba(59,130,246,0.5)]",style:{animation:"pacman-chomp 0.3s ease-in-out infinite"}})}),(0,r.jsx)("div",{style:{animation:"pacman-trail 3s ease-in-out infinite"},className:"jsx-fadb241e6f0632f6 absolute top-1/2 -translate-y-1/2 h-1 bg-gradient-to-r from-blue-500/50 to-transparent rounded-full"})]}),(0,r.jsx)(H.default,{id:"fadb241e6f0632f6",children:"@keyframes pacman-move{0%{left:-48px}to{left:calc(100% + 48px)}}@keyframes pacman-chomp{0%,to{transform:scale(1)}50%{transform:scale(.9)scaleX(1.1)}}@keyframes pacman-trail{0%{opacity:0;width:0;left:0}10%{opacity:.5}to{opacity:0;width:100%;left:0}}"}),(0,r.jsxs)("div",{className:"jsx-fadb241e6f0632f6",children:[(0,r.jsx)("h2",{className:"jsx-fadb241e6f0632f6 text-2xl font-bold text-white mb-2",children:s("analyzing.title")}),(0,r.jsxs)("p",{className:"jsx-fadb241e6f0632f6 text-gray-400",children:[s("phase2.planningDescription"),(0,r.jsxs)("strong",{className:"jsx-fadb241e6f0632f6",children:['"',t,'"']})," ",s("phase2.planningDescription2")]})]})]})}let Y={"1:1":!1,"9:16":!1,"4:5":!1,"16:9":!1,"1:1-commercial":!1},Z={appState:v.IDLE,errorMsg:"",selectedFile:null,imagePreview:null,productName:"",productInfo:"",productUrl:"",refCopy:"",analysisResult:null,activeRouteIndex:0,editedRoutes:[],routeSupplements:["","",""],sizeSelection:Y,contentPlan:null,editedContentSets:[],productImage:null,secondaryProduct:null,brandLogo:null,apiKey:"",serverHasKey:!1,isGuideOpen:!1,isApiKeyModalOpen:!1};function X(e,t){switch(t.type){case"SET_APP_STATE":return{...e,appState:t.payload};case"SET_ERROR":return{...e,errorMsg:t.payload};case"CLEAR_ERROR":return{...e,errorMsg:""};case"SET_SELECTED_FILE":return{...e,selectedFile:t.payload.file,imagePreview:t.payload.preview,analysisResult:null,contentPlan:null,editedContentSets:[],sizeSelection:Y,appState:v.IDLE};case"SET_INPUT":return{...e,[t.payload.field]:t.payload.value};case"SET_ANALYSIS_RESULT":return{...e,analysisResult:t.payload,editedRoutes:t.payload.marketing_routes,appState:v.SIZE_SELECTION};case"SET_ACTIVE_ROUTE":return{...e,activeRouteIndex:t.payload,contentPlan:null,editedContentSets:[],sizeSelection:Y,appState:e.appState===v.SUITE_READY||e.appState===v.PLANNING?v.SIZE_SELECTION:e.appState};case"UPDATE_EDITED_ROUTE":let r=[...e.editedRoutes];return r[t.payload.index]=t.payload.route,{...e,editedRoutes:r};case"UPDATE_ROUTE_SUPPLEMENT":let s=[...e.routeSupplements];return s[t.payload.index]=t.payload.value,{...e,routeSupplements:s};case"SET_SIZE_SELECTION":return{...e,sizeSelection:{...e.sizeSelection,[t.payload.ratio]:t.payload.checked}};case"RESET_SIZE_SELECTION":return{...e,sizeSelection:Y};case"SET_CONTENT_PLAN":return{...e,contentPlan:t.payload,editedContentSets:t.payload.content_sets,appState:v.SUITE_READY,productImage:e.productImage||e.selectedFile};case"SET_EDITED_CONTENT_SETS":return{...e,editedContentSets:t.payload};case"SET_PRODUCT_IMAGE":return{...e,productImage:t.payload};case"SET_SECONDARY_PRODUCT":return{...e,secondaryProduct:t.payload};case"SET_BRAND_LOGO":return{...e,brandLogo:t.payload};case"SET_API_KEY":return{...e,apiKey:t.payload,errorMsg:""};case"SET_SERVER_HAS_KEY":return{...e,serverHasKey:t.payload};case"SET_GUIDE_OPEN":return{...e,isGuideOpen:t.payload};case"SET_API_KEY_MODAL_OPEN":return{...e,isApiKeyModalOpen:t.payload};case"RESET_RESULTS":return{...e,analysisResult:null,contentPlan:null,editedContentSets:[],sizeSelection:Y,appState:v.IDLE};case"RESET_PHASE2":return{...e,contentPlan:null,editedContentSets:[],sizeSelection:Y,appState:v.SIZE_SELECTION};default:return e}}function J(){let{t:e,locale:t}=(0,j.useLocale)(),[a,i]=(0,s.useReducer)(X,Z),{appState:l,errorMsg:n,selectedFile:o,imagePreview:d,productName:c,productInfo:u,productUrl:h,refCopy:m,analysisResult:b,activeRouteIndex:f,editedRoutes:y,routeSupplements:k,sizeSelection:_,contentPlan:S,productImage:C,secondaryProduct:E,brandLogo:T,apiKey:L,serverHasKey:R,isGuideOpen:P,isApiKeyModalOpen:I}=a;s.default.useEffect(()=>{let e=A();e&&i({type:"SET_API_KEY",payload:e}),p().then(e=>{i({type:"SET_SERVER_HAS_KEY",payload:e})})},[]);let $=(0,s.useCallback)(e=>{i({type:"SET_API_KEY",payload:e})},[]),O=(0,s.useCallback)(e=>{if(e.target.files&&e.target.files[0]){let t=e.target.files[0],r=new FileReader;r.onload=e=>{i({type:"SET_SELECTED_FILE",payload:{file:t,preview:e.target?.result}})},r.readAsDataURL(t)}},[]),W=(0,s.useCallback)(()=>{i({type:"SET_SELECTED_FILE",payload:{file:null,preview:null}})},[]),B=(0,s.useCallback)(async()=>{if(o){if(!L&&!R)return void i({type:"SET_API_KEY_MODAL_OPEN",payload:!0});i({type:"CLEAR_ERROR"}),i({type:"SET_APP_STATE",payload:v.ANALYZING});try{let e=await x(o,c,u,h,L||void 0,t);i({type:"SET_ANALYSIS_RESULT",payload:e})}catch(t){console.error(t),i({type:"SET_ERROR",payload:t instanceof Error?t.message:e("errors.unexpectedError")}),i({type:"SET_APP_STATE",payload:v.ERROR})}}},[o,L,R,c,u,h,t,e]);(0,s.useCallback)(()=>{if(b){if(!L&&!R)return void i({type:"SET_API_KEY_MODAL_OPEN",payload:!0});i({type:"CLEAR_ERROR"}),i({type:"SET_APP_STATE",payload:v.SIZE_SELECTION}),setTimeout(()=>{document.getElementById("phase2-section")?.scrollIntoView({behavior:"smooth",block:"start"})},300)}},[b,L,R]);let H=(0,s.useCallback)(async()=>{if(!b)return;let r=Object.entries(_).filter(e=>{let[,t]=e;return t}).map(e=>{let[t]=e;return t});if(0===r.length)return void i({type:"SET_ERROR",payload:e("phase2.selectAtLeastOne")});let s=y[f],a=b.product_analysis,l=k[f],n=l?`${m}
105
+
106
+ ${e("prompt.strategySupplement")}
107
+ ${l}`:m;i({type:"CLEAR_ERROR"}),i({type:"SET_APP_STATE",payload:v.PLANNING});try{let e=await g(s,a,n,r,L||void 0,t);i({type:"SET_CONTENT_PLAN",payload:e}),setTimeout(()=>{document.getElementById("content-section")?.scrollIntoView({behavior:"smooth",block:"start"})},300)}catch(t){i({type:"SET_ERROR",payload:t instanceof Error?t.message:e("errors.contentPlanFailed")}),i({type:"SET_APP_STATE",payload:v.SIZE_SELECTION})}},[b,_,y,f,k,m,L,t,e]),Y=[{label:e("steps.analyze"),shortLabel:"01"},{label:e("steps.strategyFormat"),shortLabel:"02"},{label:e("steps.adjustGenerate"),shortLabel:"03"}],J=(()=>{switch(l){case v.IDLE:case v.ANALYZING:return 0;case v.RESULTS:case v.SIZE_SELECTION:return 1;case v.PLANNING:case v.SUITE_READY:return 2;default:return 0}})();return(0,r.jsxs)("div",{className:"min-h-screen text-slate-200 selection:bg-blue-500 selection:text-white font-sans flex flex-col",children:[(0,r.jsx)(N,{isOpen:P,onClose:()=>i({type:"SET_GUIDE_OPEN",payload:!1})}),(0,r.jsx)(M,{isOpen:I,onClose:()=>i({type:"SET_API_KEY_MODAL_OPEN",payload:!1}),onSave:$,serverHasKey:R}),(0,r.jsx)("header",{className:"w-full py-4 sm:py-6 border-b border-white/5 glass-panel sticky top-0 z-50",children:(0,r.jsxs)("div",{className:"container mx-auto px-4 sm:px-6 flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 sm:gap-3 cursor-pointer group",onClick:()=>i({type:"SET_APP_STATE",payload:v.IDLE}),children:[(0,r.jsx)("div",{className:"w-8 h-8 flex items-center justify-center",children:(0,r.jsx)(G.default,{src:"/images/logo.svg",alt:"Logo",width:32,height:32,className:"w-full h-full object-contain animate-float"})}),(0,r.jsx)("h1",{className:"text-base sm:text-lg font-bold text-white hidden sm:block group-hover:text-gray-300 transition-colors",children:e("common.appName")})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 sm:gap-3",children:[(0,r.jsx)("button",{onClick:()=>i({type:"SET_API_KEY_MODAL_OPEN",payload:!0}),className:"text-white hover:text-gray-300 text-xs sm:text-sm font-bold transition-colors",children:R?L?e("header.apiSettingsCustom"):e("header.apiSettingsFree"):L?e("header.apiSettingsConnected"):e("header.apiSettings")}),(0,r.jsx)("a",{href:"https://github.com/supra126/IGiveUpOnLife",target:"_blank",rel:"noopener noreferrer",className:"p-1.5 rounded-full hover:bg-white/10 transition-colors","aria-label":"View on GitHub",children:(0,r.jsx)("svg",{viewBox:"0 0 24 24",className:"w-5 h-5 text-white/70 hover:text-white",fill:"currentColor",children:(0,r.jsx)("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"})})})]})]})}),l===v.IDLE?null:(0,r.jsx)("div",{className:"w-full glass-panel border-b border-white/5 py-4 sticky top-[73px] z-40",children:(0,r.jsxs)("div",{className:"container mx-auto px-6",children:[(0,r.jsx)("div",{className:"hidden md:flex items-center justify-center gap-2",children:Y.map((e,t)=>{let a=t<J,i=t===J;return(0,r.jsxs)(s.default.Fragment,{children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:`
108
+ w-8 h-8 rounded-full flex items-center justify-center text-xs font-bold transition-all duration-500
109
+ ${a||i?"bg-white text-black":"bg-white/5 text-gray-500 border border-white/10"}
110
+ `,children:a?(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})}):e.shortLabel}),(0,r.jsx)("span",{className:`
111
+ text-sm font-medium transition-colors duration-300
112
+ ${i||a?"text-white":"text-gray-500"}
113
+ `,children:e.label})]}),t<Y.length-1&&(0,r.jsx)("div",{className:"w-12 h-0.5 mx-2 relative overflow-hidden rounded-full bg-white/10",children:(0,r.jsx)("div",{className:`
114
+ absolute inset-y-0 left-0 bg-white transition-all duration-700 ease-out rounded-full
115
+ ${t<J?"w-full":"w-0"}
116
+ `})})]},t)})}),(0,r.jsxs)("div",{className:"flex md:hidden items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-10 h-10 rounded-full bg-white flex items-center justify-center text-black font-bold text-sm",children:J+1}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-white font-bold text-sm",children:Y[J]?.label}),(0,r.jsx)("div",{className:"text-gray-500 text-xs",children:e("steps.stepOf").replace("{current}",String(J+1)).replace("{total}",String(Y.length))})]})]}),(0,r.jsx)("div",{className:"flex gap-1.5",children:Y.map((e,t)=>(0,r.jsx)("div",{className:`
117
+ w-2 h-2 rounded-full transition-all duration-300
118
+ ${t===J?"bg-white":t<J?"bg-white/50":"bg-white/20"}
119
+ `},t))})]})]})}),(0,r.jsxs)("main",{className:"container mx-auto px-4 py-8 pb-16 flex-1 flex flex-col",children:[n&&(0,r.jsxs)("div",{className:"w-full max-w-2xl mx-auto mb-8 p-4 bg-red-900/20 border border-red-500/50 rounded-lg text-red-200 text-center flex items-center justify-between",children:[(0,r.jsx)("span",{children:n}),(0,r.jsx)("button",{onClick:()=>i({type:"RESET_RESULTS"}),className:"text-sm underline hover:text-white",children:e("common.reset")})]}),l===v.ANALYZING&&(0,r.jsx)(q,{}),l===v.IDLE&&(0,r.jsxs)("div",{className:"flex-1 flex flex-col items-center mt-8 text-center",children:[(0,r.jsxs)("h2",{className:"text-4xl md:text-6xl font-bold text-white serif mb-4 leading-tight",children:[e("home.heroTitle"),(0,r.jsx)("br",{}),e("home.heroTitle2")]}),(0,r.jsx)("p",{className:"text-gray-400 max-w-xl mx-auto mb-8 text-base mt-2",children:e("home.heroDescription")}),(0,r.jsx)(U,{imagePreview:d,productName:c,productInfo:u,productUrl:h,refCopy:m,showAnalyzeButton:!!o&&l===v.IDLE,onFileChange:O,onClearImage:W,onProductNameChange:e=>i({type:"SET_INPUT",payload:{field:"productName",value:e}}),onProductInfoChange:e=>i({type:"SET_INPUT",payload:{field:"productInfo",value:e}}),onProductUrlChange:e=>i({type:"SET_INPUT",payload:{field:"productUrl",value:e}}),onRefCopyChange:e=>i({type:"SET_INPUT",payload:{field:"refCopy",value:e}}),onAnalyze:B})]}),(l===v.RESULTS||l===v.SIZE_SELECTION||l===v.PLANNING||l===v.SUITE_READY)&&(()=>{if(!b||!d)return null;let e=b.marketing_routes[f],t=l===v.RESULTS||l===v.SIZE_SELECTION;return(0,r.jsxs)("div",{className:"w-full max-w-6xl mx-auto px-4 pb-20",children:[t&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(w,{analysis:b.product_analysis,imageSrc:d}),(0,r.jsx)(F,{routes:y,activeRouteIndex:f,routeSupplements:k,onSelectRoute:e=>i({type:"SET_ACTIVE_ROUTE",payload:e}),onUpdateRoute:(e,t)=>i({type:"UPDATE_EDITED_ROUTE",payload:{index:e,route:t}}),onUpdateSupplement:(e,t)=>i({type:"UPDATE_ROUTE_SUPPLEMENT",payload:{index:e,value:t}})}),(0,r.jsx)("div",{className:"border-t border-white/10 pt-12",id:"phase2-section",children:(0,r.jsx)(K,{sizeSelection:_,errorMsg:n,onSizeChange:(e,t)=>i({type:"SET_SIZE_SELECTION",payload:{ratio:e,checked:t}}),onConfirm:H})})]}),l===v.PLANNING&&(0,r.jsx)(V,{routeName:e.route_name}),l===v.SUITE_READY&&S&&(0,r.jsx)("div",{className:"relative",id:"content-section",children:(0,r.jsx)(z,{plan:S,onContentUpdate:e=>i({type:"SET_EDITED_CONTENT_SETS",payload:e}),apiKey:L,productImage:C,secondaryProduct:E,brandLogo:T,onProductImageChange:e=>i({type:"SET_PRODUCT_IMAGE",payload:e}),onSecondaryProductChange:e=>i({type:"SET_SECONDARY_PRODUCT",payload:e}),onBrandLogoChange:e=>i({type:"SET_BRAND_LOGO",payload:e}),marketingRoute:y[f]})})]})})()]}),(0,r.jsx)("footer",{className:"border-t border-white/10 py-4 mt-auto",children:(0,r.jsxs)("div",{className:"container mx-auto px-4 flex items-center justify-end gap-4",children:[(0,r.jsx)("button",{onClick:()=>i({type:"SET_GUIDE_OPEN",payload:!0}),className:"text-gray-400 hover:text-white text-xs sm:text-sm font-bold transition-colors",children:e("header.guide")}),(0,r.jsx)("span",{className:"text-gray-600",children:"|"}),(0,r.jsx)(D,{})]})})]})}e.s(["default",()=>J],31713)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,35145,(e,t,r)=>{var n={229:function(e){var t,r,n,o=e.exports={};function i(){throw Error("setTimeout has not been defined")}function u(){throw Error("clearTimeout has not been defined")}try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(e){r=u}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}var c=[],f=!1,a=-1;function l(){f&&n&&(f=!1,n.length?c=n.concat(c):a=-1,c.length&&p())}function p(){if(!f){var e=s(l);f=!0;for(var t=c.length;t;){for(n=c,c=[];++a<t;)n&&n[a].run();a=-1,t=c.length}n=null,f=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function d(){}o.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new y(e,t)),1!==c.length||f||s(p)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=d,o.addListener=d,o.once=d,o.off=d,o.removeListener=d,o.removeAllListeners=d,o.emit=d,o.prependListener=d,o.prependOnceListener=d,o.listeners=function(e){return[]},o.binding=function(e){throw Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw Error("process.chdir is not supported")},o.umask=function(){return 0}}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}},u=!0;try{n[e](r,r.exports,i),u=!1}finally{u&&delete o[e]}return r.exports}i.ab="/ROOT/node_modules/.pnpm/next@16.0.7_@babel+core@7.28.5_react-dom@19.2.1_react@19.2.1__react@19.2.1/node_modules/next/dist/compiled/process/",t.exports=i(229)},97803,(e,t,r)=>{"use strict";var n,o;t.exports=(null==(n=e.g.process)?void 0:n.env)&&"object"==typeof(null==(o=e.g.process)?void 0:o.env)?e.g.process:e.r(35145)},93951,(e,t,r)=>{"use strict";var n=Symbol.for("react.transitional.element");function o(e,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var i in r={},t)"key"!==i&&(r[i]=t[i]);else r=t;return{$$typeof:n,type:e,key:o,ref:void 0!==(t=r.ref)?t:null,props:r}}r.Fragment=Symbol.for("react.fragment"),r.jsx=o,r.jsxs=o},59031,(e,t,r)=>{"use strict";t.exports=e.r(93951)},31318,(e,t,r)=>{"use strict";var n=e.i(97803),o=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),_=Symbol.for("react.view_transition"),v=Symbol.iterator,g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,b={};function S(e,t,r){this.props=e,this.context=t,this.refs=b,this.updater=r||g}function O(){}function E(e,t,r){this.props=e,this.context=t,this.refs=b,this.updater=r||g}S.prototype.isReactComponent={},S.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},S.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},O.prototype=S.prototype;var T=E.prototype=new O;T.constructor=E,m(T,S.prototype),T.isPureReactComponent=!0;var j=Array.isArray;function w(){}var x={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function C(e,t,r){var n=r.ref;return{$$typeof:o,type:e,key:t,ref:void 0!==n?n:null,props:r}}function H(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var A=/\/+/g;function P(e,t){var r,n;return"object"==typeof e&&null!==e&&null!=e.key?(r=""+e.key,n={"=":"=0",":":"=2"},"$"+r.replace(/[=:]/g,function(e){return n[e]})):t.toString(36)}function k(e,t,r){if(null==e)return e;var n=[],u=0;return!function e(t,r,n,u,s){var c,f,a,l=typeof t;("undefined"===l||"boolean"===l)&&(t=null);var p=!1;if(null===t)p=!0;else switch(l){case"bigint":case"string":case"number":p=!0;break;case"object":switch(t.$$typeof){case o:case i:p=!0;break;case d:return e((p=t._init)(t._payload),r,n,u,s)}}if(p)return s=s(t),p=""===u?"."+P(t,0):u,j(s)?(n="",null!=p&&(n=p.replace(A,"$&/")+"/"),e(s,r,n,"",function(e){return e})):null!=s&&(H(s)&&(c=s,f=n+(null==s.key||t&&t.key===s.key?"":(""+s.key).replace(A,"$&/")+"/")+p,s=C(c.type,f,c.props)),r.push(s)),1;p=0;var y=""===u?".":u+":";if(j(t))for(var h=0;h<t.length;h++)l=y+P(u=t[h],h),p+=e(u,r,n,l,s);else if("function"==typeof(h=null===(a=t)||"object"!=typeof a?null:"function"==typeof(a=v&&a[v]||a["@@iterator"])?a:null))for(t=h.call(t),h=0;!(u=t.next()).done;)l=y+P(u=u.value,h++),p+=e(u,r,n,l,s);else if("object"===l){if("function"==typeof t.then)return e(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(w,w):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(t),r,n,u,s);throw Error("Objects are not valid as a React child (found: "+("[object Object]"===(r=String(t))?"object with keys {"+Object.keys(t).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.")}return p}(e,n,"","",function(e){return t.call(r,e,u++)}),n}function M(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){(0===e._status||-1===e._status)&&(e._status=1,e._result=t)},function(t){(0===e._status||-1===e._status)&&(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var L="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof n.default&&"function"==typeof n.default.emit)return void n.default.emit("uncaughtException",e);console.error(e)};function $(e){var t=x.T,r={};r.types=null!==t?t.types:null,x.T=r;try{var n=e(),o=x.S;null!==o&&o(r,n),"object"==typeof n&&null!==n&&"function"==typeof n.then&&n.then(w,L)}catch(e){L(e)}finally{null!==t&&null!==r.types&&(t.types=r.types),x.T=t}}function D(e){var t=x.T;if(null!==t){var r=t.types;null===r?t.types=[e]:-1===r.indexOf(e)&&r.push(e)}else $(D.bind(null,e))}r.Activity=h,r.Children={map:k,forEach:function(e,t,r){k(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return k(e,function(){t++}),t},toArray:function(e){return k(e,function(e){return e})||[]},only:function(e){if(!H(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},r.Component=S,r.Fragment=u,r.Profiler=c,r.PureComponent=E,r.StrictMode=s,r.Suspense=p,r.ViewTransition=_,r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=x,r.__COMPILER_RUNTIME={__proto__:null,c:function(e){return x.H.useMemoCache(e)}},r.addTransitionType=D,r.cache=function(e){return function(){return e.apply(null,arguments)}},r.cacheSignal=function(){return null},r.cloneElement=function(e,t,r){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var n=m({},e.props),o=e.key;if(null!=t)for(i in void 0!==t.key&&(o=""+t.key),t)R.call(t,i)&&"key"!==i&&"__self"!==i&&"__source"!==i&&("ref"!==i||void 0!==t.ref)&&(n[i]=t[i]);var i=arguments.length-2;if(1===i)n.children=r;else if(1<i){for(var u=Array(i),s=0;s<i;s++)u[s]=arguments[s+2];n.children=u}return C(e.type,o,n)},r.createContext=function(e){return(e={$$typeof:a,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:f,_context:e},e},r.createElement=function(e,t,r){var n,o={},i=null;if(null!=t)for(n in void 0!==t.key&&(i=""+t.key),t)R.call(t,n)&&"key"!==n&&"__self"!==n&&"__source"!==n&&(o[n]=t[n]);var u=arguments.length-2;if(1===u)o.children=r;else if(1<u){for(var s=Array(u),c=0;c<u;c++)s[c]=arguments[c+2];o.children=s}if(e&&e.defaultProps)for(n in u=e.defaultProps)void 0===o[n]&&(o[n]=u[n]);return C(e,i,o)},r.createRef=function(){return{current:null}},r.forwardRef=function(e){return{$$typeof:l,render:e}},r.isValidElement=H,r.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:M}},r.memo=function(e,t){return{$$typeof:y,type:e,compare:void 0===t?null:t}},r.startTransition=$,r.unstable_useCacheRefresh=function(){return x.H.useCacheRefresh()},r.use=function(e){return x.H.use(e)},r.useActionState=function(e,t,r){return x.H.useActionState(e,t,r)},r.useCallback=function(e,t){return x.H.useCallback(e,t)},r.useContext=function(e){return x.H.useContext(e)},r.useDebugValue=function(){},r.useDeferredValue=function(e,t){return x.H.useDeferredValue(e,t)},r.useEffect=function(e,t){return x.H.useEffect(e,t)},r.useEffectEvent=function(e){return x.H.useEffectEvent(e)},r.useId=function(){return x.H.useId()},r.useImperativeHandle=function(e,t,r){return x.H.useImperativeHandle(e,t,r)},r.useInsertionEffect=function(e,t){return x.H.useInsertionEffect(e,t)},r.useLayoutEffect=function(e,t){return x.H.useLayoutEffect(e,t)},r.useMemo=function(e,t){return x.H.useMemo(e,t)},r.useOptimistic=function(e,t){return x.H.useOptimistic(e,t)},r.useReducer=function(e,t,r){return x.H.useReducer(e,t,r)},r.useRef=function(e){return x.H.useRef(e)},r.useState=function(e){return x.H.useState(e)},r.useSyncExternalStore=function(e,t,r){return x.H.useSyncExternalStore(e,t,r)},r.useTransition=function(){return x.H.useTransition()},r.version="19.3.0-canary-52684925-20251110"},27946,(e,t,r)=>{"use strict";t.exports=e.r(31318)},81258,(e,t,r)=>{"use strict";r._=function(e){return e&&e.__esModule?e:{default:e}}},67708,(e,t,r)=>{"use strict";var n=e.r(27946);function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var u={d:{f:i,r:function(){throw Error(o(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},s=Symbol.for("react.portal"),c=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,r.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(o(299));return function(e,t,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:s,key:null==n?null:""+n,children:e,containerInfo:t,implementation:r}}(e,t,null,r)},r.flushSync=function(e){var t=c.T,r=u.p;try{if(c.T=null,u.p=2,e)return e()}finally{c.T=t,u.p=r,u.d.f()}},r.preconnect=function(e,t){"string"==typeof e&&(t=t?"string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:null,u.d.C(e,t))},r.prefetchDNS=function(e){"string"==typeof e&&u.d.D(e)},r.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var r=t.as,n=f(r,t.crossOrigin),o="string"==typeof t.integrity?t.integrity:void 0,i="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===r?u.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:n,integrity:o,fetchPriority:i}):"script"===r&&u.d.X(e,{crossOrigin:n,integrity:o,fetchPriority:i,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},r.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var r=f(t.as,t.crossOrigin);u.d.M(e,{crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else null==t&&u.d.M(e)},r.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var r=t.as,n=f(r,t.crossOrigin);u.d.L(e,r,{crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},r.preloadModule=function(e,t){if("string"==typeof e)if(t){var r=f(t.as,t.crossOrigin);u.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else u.d.m(e)},r.requestFormReset=function(e){u.d.r(e)},r.unstable_batchedUpdates=function(e,t){return e(t)},r.useFormState=function(e,t,r){return c.H.useFormState(e,t,r)},r.useFormStatus=function(){return c.H.useHostTransitionStatus()},r.version="19.3.0-canary-52684925-20251110"},85885,(e,t,r)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),t.exports=e.r(67708)},44066,(e,t,r)=>{"use strict";function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}r._=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var s=i?Object.getOwnPropertyDescriptor(e,u):null;s&&(s.get||s.set)?Object.defineProperty(o,u,s):o[u]=e[u]}return o.default=e,r&&r.set(e,o),o}},28833,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"HeadManagerContext",{enumerable:!0,get:function(){return n}});let n=e.r(81258)._(e.r(27946)).default.createContext({})},26623,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return s}});let n=e.r(59031),o=e.r(58119),i={fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},u={fontSize:"14px",fontWeight:400,lineHeight:"28px",margin:"0 8px"},s=function(e){let{error:t}=e,r=t?.digest;return(0,n.jsxs)("html",{id:"__next_error__",children:[(0,n.jsx)("head",{}),(0,n.jsxs)("body",{children:[(0,n.jsx)(o.HandleISRError,{error:t}),(0,n.jsx)("div",{style:i,children:(0,n.jsxs)("div",{children:[(0,n.jsxs)("h2",{style:u,children:["Application error: a ",r?"server":"client","-side exception has occurred while loading ",window.location.hostname," (see the"," ",r?"server logs":"browser console"," for more information)."]}),r?(0,n.jsx)("p",{style:u,children:`Digest: ${r}`}):null]})})]})]})};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,97537,(e,t,r)=>{var n={229:function(e){var t,r,n,o=e.exports={};function i(){throw Error("setTimeout has not been defined")}function u(){throw Error("clearTimeout has not been defined")}try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(e){r=u}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}var c=[],f=!1,a=-1;function l(){f&&n&&(f=!1,n.length?c=n.concat(c):a=-1,c.length&&p())}function p(){if(!f){var e=s(l);f=!0;for(var t=c.length;t;){for(n=c,c=[];++a<t;)n&&n[a].run();a=-1,t=c.length}n=null,f=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function d(){}o.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new y(e,t)),1!==c.length||f||s(p)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=d,o.addListener=d,o.once=d,o.off=d,o.removeListener=d,o.removeAllListeners=d,o.emit=d,o.prependListener=d,o.prependOnceListener=d,o.listeners=function(e){return[]},o.binding=function(e){throw Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw Error("process.chdir is not supported")},o.umask=function(){return 0}}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}},u=!0;try{n[e](r,r.exports,i),u=!1}finally{u&&delete o[e]}return r.exports}i.ab="/ROOT/node_modules/.pnpm/next@16.1.1_@babel+core@7.28.5_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/next/dist/compiled/process/",t.exports=i(229)},27171,(e,t,r)=>{"use strict";var n,o;t.exports=(null==(n=e.g.process)?void 0:n.env)&&"object"==typeof(null==(o=e.g.process)?void 0:o.env)?e.g.process:e.r(97537)},71178,(e,t,r)=>{"use strict";var n=Symbol.for("react.transitional.element");function o(e,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var i in r={},t)"key"!==i&&(r[i]=t[i]);else r=t;return{$$typeof:n,type:e,key:o,ref:void 0!==(t=r.ref)?t:null,props:r}}r.Fragment=Symbol.for("react.fragment"),r.jsx=o,r.jsxs=o},80506,(e,t,r)=>{"use strict";t.exports=e.r(71178)},20793,(e,t,r)=>{"use strict";var n=e.i(27171),o=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),_=Symbol.for("react.view_transition"),v=Symbol.iterator,g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,b={};function S(e,t,r){this.props=e,this.context=t,this.refs=b,this.updater=r||g}function O(){}function E(e,t,r){this.props=e,this.context=t,this.refs=b,this.updater=r||g}S.prototype.isReactComponent={},S.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},S.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},O.prototype=S.prototype;var T=E.prototype=new O;T.constructor=E,m(T,S.prototype),T.isPureReactComponent=!0;var j=Array.isArray;function w(){}var x={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function C(e,t,r){var n=r.ref;return{$$typeof:o,type:e,key:t,ref:void 0!==n?n:null,props:r}}function P(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var H=/\/+/g;function k(e,t){var r,n;return"object"==typeof e&&null!==e&&null!=e.key?(r=""+e.key,n={"=":"=0",":":"=2"},"$"+r.replace(/[=:]/g,function(e){return n[e]})):t.toString(36)}function A(e,t,r){if(null==e)return e;var n=[],u=0;return!function e(t,r,n,u,s){var c,f,a,l=typeof t;("undefined"===l||"boolean"===l)&&(t=null);var p=!1;if(null===t)p=!0;else switch(l){case"bigint":case"string":case"number":p=!0;break;case"object":switch(t.$$typeof){case o:case i:p=!0;break;case d:return e((p=t._init)(t._payload),r,n,u,s)}}if(p)return s=s(t),p=""===u?"."+k(t,0):u,j(s)?(n="",null!=p&&(n=p.replace(H,"$&/")+"/"),e(s,r,n,"",function(e){return e})):null!=s&&(P(s)&&(c=s,f=n+(null==s.key||t&&t.key===s.key?"":(""+s.key).replace(H,"$&/")+"/")+p,s=C(c.type,f,c.props)),r.push(s)),1;p=0;var y=""===u?".":u+":";if(j(t))for(var h=0;h<t.length;h++)l=y+k(u=t[h],h),p+=e(u,r,n,l,s);else if("function"==typeof(h=null===(a=t)||"object"!=typeof a?null:"function"==typeof(a=v&&a[v]||a["@@iterator"])?a:null))for(t=h.call(t),h=0;!(u=t.next()).done;)l=y+k(u=u.value,h++),p+=e(u,r,n,l,s);else if("object"===l){if("function"==typeof t.then)return e(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(w,w):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(t),r,n,u,s);throw Error("Objects are not valid as a React child (found: "+("[object Object]"===(r=String(t))?"object with keys {"+Object.keys(t).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.")}return p}(e,n,"","",function(e){return t.call(r,e,u++)}),n}function M(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){(0===e._status||-1===e._status)&&(e._status=1,e._result=t)},function(t){(0===e._status||-1===e._status)&&(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var D="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof n.default&&"function"==typeof n.default.emit)return void n.default.emit("uncaughtException",e);console.error(e)};function L(e){var t=x.T,r={};r.types=null!==t?t.types:null,x.T=r;try{var n=e(),o=x.S;null!==o&&o(r,n),"object"==typeof n&&null!==n&&"function"==typeof n.then&&n.then(w,D)}catch(e){D(e)}finally{null!==t&&null!==r.types&&(t.types=r.types),x.T=t}}function $(e){var t=x.T;if(null!==t){var r=t.types;null===r?t.types=[e]:-1===r.indexOf(e)&&r.push(e)}else L($.bind(null,e))}r.Activity=h,r.Children={map:A,forEach:function(e,t,r){A(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return A(e,function(){t++}),t},toArray:function(e){return A(e,function(e){return e})||[]},only:function(e){if(!P(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},r.Component=S,r.Fragment=u,r.Profiler=c,r.PureComponent=E,r.StrictMode=s,r.Suspense=p,r.ViewTransition=_,r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=x,r.__COMPILER_RUNTIME={__proto__:null,c:function(e){return x.H.useMemoCache(e)}},r.addTransitionType=$,r.cache=function(e){return function(){return e.apply(null,arguments)}},r.cacheSignal=function(){return null},r.cloneElement=function(e,t,r){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var n=m({},e.props),o=e.key;if(null!=t)for(i in void 0!==t.key&&(o=""+t.key),t)R.call(t,i)&&"key"!==i&&"__self"!==i&&"__source"!==i&&("ref"!==i||void 0!==t.ref)&&(n[i]=t[i]);var i=arguments.length-2;if(1===i)n.children=r;else if(1<i){for(var u=Array(i),s=0;s<i;s++)u[s]=arguments[s+2];n.children=u}return C(e.type,o,n)},r.createContext=function(e){return(e={$$typeof:a,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:f,_context:e},e},r.createElement=function(e,t,r){var n,o={},i=null;if(null!=t)for(n in void 0!==t.key&&(i=""+t.key),t)R.call(t,n)&&"key"!==n&&"__self"!==n&&"__source"!==n&&(o[n]=t[n]);var u=arguments.length-2;if(1===u)o.children=r;else if(1<u){for(var s=Array(u),c=0;c<u;c++)s[c]=arguments[c+2];o.children=s}if(e&&e.defaultProps)for(n in u=e.defaultProps)void 0===o[n]&&(o[n]=u[n]);return C(e,i,o)},r.createRef=function(){return{current:null}},r.forwardRef=function(e){return{$$typeof:l,render:e}},r.isValidElement=P,r.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:M}},r.memo=function(e,t){return{$$typeof:y,type:e,compare:void 0===t?null:t}},r.startTransition=L,r.unstable_useCacheRefresh=function(){return x.H.useCacheRefresh()},r.use=function(e){return x.H.use(e)},r.useActionState=function(e,t,r){return x.H.useActionState(e,t,r)},r.useCallback=function(e,t){return x.H.useCallback(e,t)},r.useContext=function(e){return x.H.useContext(e)},r.useDebugValue=function(){},r.useDeferredValue=function(e,t){return x.H.useDeferredValue(e,t)},r.useEffect=function(e,t){return x.H.useEffect(e,t)},r.useEffectEvent=function(e){return x.H.useEffectEvent(e)},r.useId=function(){return x.H.useId()},r.useImperativeHandle=function(e,t,r){return x.H.useImperativeHandle(e,t,r)},r.useInsertionEffect=function(e,t){return x.H.useInsertionEffect(e,t)},r.useLayoutEffect=function(e,t){return x.H.useLayoutEffect(e,t)},r.useMemo=function(e,t){return x.H.useMemo(e,t)},r.useOptimistic=function(e,t){return x.H.useOptimistic(e,t)},r.useReducer=function(e,t,r){return x.H.useReducer(e,t,r)},r.useRef=function(e){return x.H.useRef(e)},r.useState=function(e){return x.H.useState(e)},r.useSyncExternalStore=function(e,t,r){return x.H.useSyncExternalStore(e,t,r)},r.useTransition=function(){return x.H.useTransition()},r.version="19.3.0-canary-f93b9fd4-20251217"},778,(e,t,r)=>{"use strict";t.exports=e.r(20793)},81258,(e,t,r)=>{"use strict";r._=function(e){return e&&e.__esModule?e:{default:e}}},60264,(e,t,r)=>{"use strict";var n=e.r(778);function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var u={d:{f:i,r:function(){throw Error(o(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},s=Symbol.for("react.portal"),c=Symbol.for("react.optimistic_key"),f=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(e,t){return"font"===e?"":"string"==typeof t?"use-credentials"===t?t:"":void 0}r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,r.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(o(299));return function(e,t,r){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:s,key:null==n?null:n===c?c:""+n,children:e,containerInfo:t,implementation:r}}(e,t,null,r)},r.flushSync=function(e){var t=f.T,r=u.p;try{if(f.T=null,u.p=2,e)return e()}finally{f.T=t,u.p=r,u.d.f()}},r.preconnect=function(e,t){"string"==typeof e&&(t=t?"string"==typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:null,u.d.C(e,t))},r.prefetchDNS=function(e){"string"==typeof e&&u.d.D(e)},r.preinit=function(e,t){if("string"==typeof e&&t&&"string"==typeof t.as){var r=t.as,n=a(r,t.crossOrigin),o="string"==typeof t.integrity?t.integrity:void 0,i="string"==typeof t.fetchPriority?t.fetchPriority:void 0;"style"===r?u.d.S(e,"string"==typeof t.precedence?t.precedence:void 0,{crossOrigin:n,integrity:o,fetchPriority:i}):"script"===r&&u.d.X(e,{crossOrigin:n,integrity:o,fetchPriority:i,nonce:"string"==typeof t.nonce?t.nonce:void 0})}},r.preinitModule=function(e,t){if("string"==typeof e)if("object"==typeof t&&null!==t){if(null==t.as||"script"===t.as){var r=a(t.as,t.crossOrigin);u.d.M(e,{crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0})}}else null==t&&u.d.M(e)},r.preload=function(e,t){if("string"==typeof e&&"object"==typeof t&&null!==t&&"string"==typeof t.as){var r=t.as,n=a(r,t.crossOrigin);u.d.L(e,r,{crossOrigin:n,integrity:"string"==typeof t.integrity?t.integrity:void 0,nonce:"string"==typeof t.nonce?t.nonce:void 0,type:"string"==typeof t.type?t.type:void 0,fetchPriority:"string"==typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"==typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"==typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"==typeof t.imageSizes?t.imageSizes:void 0,media:"string"==typeof t.media?t.media:void 0})}},r.preloadModule=function(e,t){if("string"==typeof e)if(t){var r=a(t.as,t.crossOrigin);u.d.m(e,{as:"string"==typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:r,integrity:"string"==typeof t.integrity?t.integrity:void 0})}else u.d.m(e)},r.requestFormReset=function(e){u.d.r(e)},r.unstable_batchedUpdates=function(e,t){return e(t)},r.useFormState=function(e,t,r){return f.H.useFormState(e,t,r)},r.useFormStatus=function(){return f.H.useHostTransitionStatus()},r.version="19.3.0-canary-f93b9fd4-20251217"},50919,(e,t,r)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),t.exports=e.r(60264)},44066,(e,t,r)=>{"use strict";function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}r._=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var s=i?Object.getOwnPropertyDescriptor(e,u):null;s&&(s.get||s.set)?Object.defineProperty(o,u,s):o[u]=e[u]}return o.default=e,r&&r.set(e,o),o}},40824,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={getDeploymentId:function(){return i},getDeploymentIdQueryOrEmptyString:function(){return u}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});function i(){return!1}function u(){return""}},37e3,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"HeadManagerContext",{enumerable:!0,get:function(){return n}});let n=e.r(81258)._(e.r(778)).default.createContext({})},54354,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return s}});let n=e.r(80506),o=e.r(66269),i={fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},u={fontSize:"14px",fontWeight:400,lineHeight:"28px",margin:"0 8px"},s=function(e){let{error:t}=e,r=t?.digest;return(0,n.jsxs)("html",{id:"__next_error__",children:[(0,n.jsx)("head",{}),(0,n.jsxs)("body",{children:[(0,n.jsx)(o.HandleISRError,{error:t}),(0,n.jsx)("div",{style:i,children:(0,n.jsxs)("div",{children:[(0,n.jsxs)("h2",{style:u,children:["Application error: a ",r?"server":"client","-side exception has occurred while loading ",window.location.hostname," (see the"," ",r?"server logs":"browser console"," for more information)."]}),r?(0,n.jsx)("p",{style:u,children:`Digest: ${r}`}):null]})})]})]})};("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)}]);