exports.id=7032,exports.ids=[7032],exports.modules={27753:(a,b,c)=>{"use strict";c.d(b,{A5:()=>m,lU:()=>p,lz:()=>n,pR:()=>o});var d=c(73024),e=c.n(d),f=c(76760),g=c.n(f),h=c(37701),i=c(61013);function j(a){return g().join(a,".forge/license.json")}function k(a){try{let b=e().readFileSync(j(a),"utf-8"),c=JSON.parse(b);if(!c.tier)return{...h.Vb};return{tier:c.tier,userId:c.userId,issuedAt:c.issuedAt??0,expiresAt:c.expiresAt??0,features:Array.isArray(c.features)?c.features:[],signature:c.signature,licenseKey:c.licenseKey,instanceId:c.instanceId,productName:c.productName,subscriptionStatus:c.subscriptionStatus,validatedAt:c.validatedAt,revalidationDue:c.revalidationDue,gracePeriodEnd:c.gracePeriodEnd,activationLimit:c.activationLimit,activationUsage:c.activationUsage}}catch{return{...h.Vb}}}function l(a){switch((a??"").trim().toLowerCase()){case"spectrum":return"spectrum";case"forge-pro":return"forge-pro";default:return"free"}}function m(a){let b=k(a);if("free"!==b.tier)return b;let c=(0,i.LK)();if(!c)return b;let d=function(a){let b=l(a.tier);if("free"===b)return{...h.Vb};let c="number"==typeof a.validatedAt?a.validatedAt:0,d="number"==typeof a.expiresAt?a.expiresAt:0,e="active"===a.subscriptionStatus||"cancelled"===a.subscriptionStatus||"expired"===a.subscriptionStatus||"paused"===a.subscriptionStatus?a.subscriptionStatus:"active";return{tier:b,issuedAt:c,expiresAt:d,features:[],licenseKey:a.licenseKey,instanceId:a.instanceId,productName:a.productName,subscriptionStatus:e,validatedAt:c||void 0,revalidationDue:c?c+h.Vu:void 0,gracePeriodEnd:c?c+h.Vu+h.eC:void 0}}(c);return"free"===d.tier?b:d}function n(a){if("free"!==k(a).tier)return!1;let b=(0,i.LK)();return!!b&&"free"!==l(b.tier)}function o(a,b){let c=j(a),d=g().dirname(c);e().existsSync(d)||e().mkdirSync(d,{recursive:!0});let f=c+".tmp."+Date.now();e().writeFileSync(f,JSON.stringify(b,null,2),{encoding:"utf-8",mode:384}),e().renameSync(f,c);try{e().chmodSync(c,384)}catch{}}function p(a){o(a,{...h.Vb})}},37701:(a,b,c)=>{"use strict";c.d(b,{Vb:()=>d,Vu:()=>f,eC:()=>g,mG:()=>e});let d={tier:"free",issuedAt:0,expiresAt:0,features:[]},e={free:0,"forge-pro":1,spectrum:1},f=2592e3,g=604800},61013:(a,b,c)=>{"use strict";c.d(b,{EZ:()=>m,LK:()=>l,lp:()=>k});var d=c(73024),e=c.n(d),f=c(48161),g=c.n(f),h=c(76760),i=c.n(h);function j(){return i().join(g().homedir(),".atomar","config.json")}function k(){try{let a=e().readFileSync(j(),"utf-8"),b=JSON.parse(a),c=b?.anthropicApiKey;if("string"!=typeof c||""===c.trim())return null;return c.trim()}catch{return null}}function l(){try{let a=e().readFileSync(j(),"utf-8"),b=JSON.parse(a),c=b?.license;if(!c||"object"!=typeof c||Array.isArray(c))return null;let d=c.tier;if("string"!=typeof d||!d.trim())return null;return c}catch{return null}}function m(a){let b,c=i().dirname(j());e().mkdirSync(c,{recursive:!0});let d={};try{let a=e().readFileSync(j(),"utf-8"),b=JSON.parse(a);b&&"object"==typeof b&&!Array.isArray(b)&&(d=b)}catch{}let f=(a.tier??"free").trim()||"free";if("free"===f)b={tier:"free"};else for(let c of Object.keys(b={tier:f,licenseKey:a.licenseKey,instanceId:a.instanceId,productName:a.productName,subscriptionStatus:a.subscriptionStatus,validatedAt:a.validatedAt,expiresAt:a.expiresAt}))void 0===b[c]&&delete b[c];let g={...d,license:b,updatedAt:new Date().toISOString(),updatedBy:"forge0x2b"},h=`${j()}.tmp.${Date.now()}`;e().writeFileSync(h,JSON.stringify(g,null,2),{encoding:"utf-8",mode:384}),e().renameSync(h,j());try{e().chmodSync(j(),384)}catch{}}j()},65792:(a,b,c)=>{"use strict";c.d(b,{DO:()=>g,MJ:()=>e,OH:()=>h,bT:()=>f,dJ:()=>j,vr:()=>i});var d=c(37701);function e(a){return!!a?.tier&&"free"!==a.tier}function f(a){return!!a.expiresAt&&Math.floor(Date.now()/1e3)>a.expiresAt}function g(a){if(!a.validatedAt)return"no-cache";let b=Math.floor(Date.now()/1e3),c=a.revalidationDue??a.validatedAt+d.Vu;return b<=c?"valid":b<=c+d.eC?"grace":"expired"}function h(a){return!e(a)||f(a)||a.licenseKey&&"expired"===g(a)?"free":a.tier}function i(a){let b=h(a);return"forge-pro"===b||"spectrum"===b}function j(a,b){let c=h(a);return d.mG[c]>=d.mG[b]}},78335:()=>{},82733:(a,b,c)=>{"use strict";c.d(b,{D4:()=>f,Is:()=>g});let d={de:"German (Deutsch)",en:"English",fr:"French (Fran\xe7ais)",es:"Spanish (Espa\xf1ol)"},e=["de","en","fr","es"];function f(a){return"string"==typeof a&&e.includes(a)}class g{constructor(a,b){this.inner=a,this.language=b}async complete(a){var b;let c,e=(c=d[b=this.language],`Generate the response in ${c} (${b}). Use ${c} for ALL output sections including headers, labels, and metadata. Do not mix languages. If source material is in another language, translate it into ${c}.`),f=a.systemPrompt?`${a.systemPrompt}

${e}`:e;return this.inner.complete({...a,systemPrompt:f})}}},94282:(a,b,c)=>{"use strict";c.d(b,{kV:()=>i,nk:()=>h,normalizeProjectRoot:()=>g,zN:()=>j});var d=c(73024),e=c(76760),f=c.n(e);function g(a){if(!a)return a;let b=a.replace(/\/+$/,"");return".prism"===f().basename(b)?f().dirname(b):b}function h(a){let b=g(a);try{let a=f().join(b,"package.json");if((0,d.existsSync)(a)){let b=JSON.parse((0,d.readFileSync)(a,"utf-8"));if("string"==typeof b.name&&""!==b.name.trim()){let a=b.name.trim(),c=a.lastIndexOf("/");return c>=0?a.slice(c+1):a}}}catch{}let c=f().basename(b);return c&&"."!==c?c:"Project"}function i(){return process.env.FORGE_TARGET&&""!==process.env.FORGE_TARGET.trim()?g(process.env.FORGE_TARGET):process.cwd()}async function j(a,b){let{loadConfig:d}=await c.e(4447).then(c.bind(c,84447)),e=await d(process.cwd()),f=function(a,b,c){if(c&&""!==c.trim())return g(c);let d=a.nextUrl.searchParams.get("target");if(d&&""!==d.trim())return g(d);let e=b?.prismFolderPath;return e&&""!==e.trim()?g(e):process.env.FORGE_TARGET&&""!==process.env.FORGE_TARGET.trim()?g(process.env.FORGE_TARGET):process.cwd()}(a,e,b),h=f===process.cwd()?e:await d(f);return!h.apiKey&&e.apiKey&&(h.apiKey=e.apiKey),!h.prismFolderPath&&e.prismFolderPath&&(h.prismFolderPath=e.prismFolderPath),{config:h,targetPath:f}}},96487:()=>{},96878:(a,b,c)=>{"use strict";c.d(b,{p:()=>e});var d=c(82733);function e(a,b){return a&&(0,d.D4)(a.language)?a.language:(0,d.D4)(b.defaultLanguage)?b.defaultLanguage:"de"}}};