1import{_ as w}from"./Avatar-6eaa7c78.js";import{K as j,c as n,E as M,a as d,d as t,f as p,t as o,b as h,u as l,e as C,a0 as b,o as r,s as S}from"./app-1de7f786.js";import{u as k,a as L,b as y,U as R}from"./installCanvasRenderer-6366a3ba.js";import{i as V}from"./install-5556963b.js";import{i as A,a as $}from"./install-b010fa07.js";import{i as N}from"./install-f26a7f71.js";import"./dataFilter-12556daa.js";const T={class:"mt-4 md:mt-10"},z=b('<div class="relative isolate overflow-hidden rounded-2xl bg-gray-900 px-6 py-12"><img class="absolute inset-0 h-full w-full object-cover brightness-150 saturate-0" src="https://images.unsplash.com/photo-1580983559367-0dc2f8934365?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt=""><div class="absolute inset-0 bg-gray-900/90 mix-blend-multiply"></div><div class="relative mx-auto max-w-2xl text-center"><h2 class="font-serif text-white text-2xl md:text-5xl">'Cost to Replicate' estimate</h2><p class="mt-6 text-lg leading-8 text-white">
1Has what it would cost to re-write your code from scratch increased or decreased between versions?</p></div></div>',1),B={class:"mx-auto mt-4 sm:mt-20"},D={class:"grid grid-cols-2 gap-x-8 gap-y-8"},F={class:"relative col-span-2 md:col-span-1"},O={class:"flex items-center font-bold"},H=t("div",{class:"mr-4 flex h-10 w-10 items-center justify-center rounded-lg bg-brand-purple"},[t("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"text-white w-6 h-6"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 01-1.125-1.125M3.375 19.5h7.5c.621 0 1.125-.504 1.125-1.125m-9.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-7.5A1.125 1.125 0 0112 18.375m9.75-12.75c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125m19.5 0v1.5c0 .621-.504 1.125-1.125 1.125M2.25 5.625v1.5c0 .621.504 1.125 1.125 1.125m0 0h17.25m-17.25 0h7.5c.621 0 1.125.504 1.125 1.125M3.375 8.25c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m17.25-3.75h-7.5c-.621 0-1.125.504-1.125 1.125m8.625-1.125c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125M12 10.875v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 10.875c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125M13.125 12h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125M20.625 12c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5M12 14.625v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 14.625c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125m0 1.5v-1.5m0 0c0-.621.504-1.125 1.125-1.125m0 0h7.5"})])],-1),I={class:"mt-2"},W={class:"inline-block min-w-full py-2 align-middle"},q={class:"flex items-center"},E={class:"min-w-full divide-y divide-gray-400"},G={class:"divide-y divide-gray-400"},P=t("th",{class:"py-2 pl-4 pr-3 text-xs font-semibold text-gray-900 sm:pl-0"},"Total lines of code",-1),K={class:"px-3 py-2 text-xs text-gray-500"},U=t("th",{class:"py-2 pl-4 pr-3 text-xs font-semibold text-gray-900 sm:pl-0"},"Lines of code discounted",-1),Y={class:"px-3 py-2 text-xs text-gray-500"},J=t("th",{class:"py-2 pl-4 pr-3 text-xs font-semibold text-gray-900 sm:pl-0"},"Languages multiple",-1),Q={class:"px-3 py-2 text-xs text-gray-500"},X=t("th",{class:"py-2 pl-4 pr-3 text-xs font-semibold text-gray-900 sm:pl-0"},"Complexity multiple",-1),Z={class:"px-3 py-2 text-xs text-gray-500"},tt={class:"flex items-center"},et={class:"min-w-full divide-y divide-gray-400"},st={class:"divide-y divide-gray-400"},ot=t("td",{class:"py-2 pl-4 pr-3 text-sm font-bold text-gray-900 sm:pl-0 text-center"},'The Code Registry "Cost to Replicate" Value',-1),at={class:"px-3 py-2 text-md font-bold text-blue-500"},it={class:"relative col-span-2 md:col-span-1"},lt={class:"flex items-center font-bold"},ct=t("div",{class:"mr-4 flex h-10 w-10 items-center justify-center rounded-lg bg-brand-purple"},[t("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"text-white w-6 h-6"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.375 19.5h17.25m-17.25 0a1.125 1.125 0 01-1.125-1.125M3.375 19.5h7.5c.621 0 1.125-.504 1.125-1.125m-9.75 0V5.625m0 12.75v-1.5c0-.621.504-1.125 1.125-1.125m18.375 2.625V5.625m0 12.75c0 .621-.504 1.125-1.125 1.125m1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125m0 3.75h-7.5A1.125 1.125 0 0112 18.375m9.75-12.75c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125m19.5 0v1.5c0 .621-.504 1.125-1.125 1.125M2.25 5.625v1.5c0 .621.504 1.125 1.125 1.125m0 0h17.25m-17.25 0h7.5c.621 0 1.125.504 1.125 1.125M3.375 8.25c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125m17.25-3.75h-7.5c-.621 0-1.125.504-1.125 1.125m8.625-1.125c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125M12 10.875v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 10.875c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125M13.125 12h7.5m-7.5 0c-.621 0-1.125.504-1.125 1.125M20.625 12c.621 0 1.125.504 1.125 1.125v1.5c0 .621-.504 1.125-1.125 1.125m-17.25 0h7.5M12 14.625v-1.5m0 1.5c0 .621-.504 1.125-1.125 1.125M12 14.625c0 .621.504 1.125 1.125 1.125m-2.25 0c.621 0 1.125.504 1.125 1.125m0 1.5v-1.5m0 0c0-.621.504-1.125 1.125-1.125m0 0h7.5"})])],-1),nt={class:"mt-2"},dt={class:"inline-block min-w-full py-2 align-middle"},rt={class:"flex items-center"},mt={class:"min-w-full divide-y divide-gray-400"},_t={class:"divide-y divide-gray-400"},pt=t("th",{class:"py-2 pl-4 pr-3 text-xs font-semibold text-gray-900 sm:pl-0"},"Total lines of code",-1),ht={class:"px-3 py-2 text-xs text-gray-500"},ut=t("th",{class:"py-2 pl-4 pr-3 text-xs font-semibold text-gray-900 sm:pl-0"}
1,"Lines of code discounted",-1),ft={class:"px-3 py-2 text-xs text-gray-500"},vt=t("th",{class:"py-2 pl-4 pr-3 text-xs font-semibold text-gray-900 sm:pl-0"},"Languages multiple",-1),xt={class:"px-3 py-2 text-xs text-gray-500"},gt=t("th",{class:"py-2 pl-4 pr-3 text-xs font-semibold text-gray-900 sm:pl-0"},"Complexity multiple",-1),yt={class:"px-3 py-2 text-xs text-gray-500"},bt={class:"flex items-center"},wt={class:"min-w-full divide-y divide-gray-400"},jt={class:"divide-y divide-gray-400"},Mt=t("td",{class:"py-2 pl-4 pr-3 text-sm font-bold text-gray-900 sm:pl-0 text-center"},'The Code Registry "Cost to Replicate" Value',-1),Ct={class:"px-3 py-2 text-md font-bold text-blue-500"},St={class:"relative col-span-2"},kt=b('<dt class="flex items-center font-bold"><div class="mr-4 flex h-10 w-10 items-center justify-center rounded-lg bg-brand-purple"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="text-white w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" d="M10.5 6a7.5 7.5 0 107.5 7.5h-7.5V6z"></path><path stroke-linecap="round" stroke-linejoin="round" d="M13.5 10.5H21A7.5 7.5 0 0013.5 3v7.5z"></path></svg></div> Largest 10 contributors to your estimates </dt>',1),Lt={class:"mt-2"},Rt={class:"grid grid-cols-2 gap-x-8 gap-y-8"},Vt={class:"relative col-span-2 md:col-span-1"},At={class:"text-center font-bold mt-2 mb-4"},$t={class:"flex items-center"},Nt={class:"relative col-span-2 md:col-span-1"},Tt={class:"text-center font-bold mt-2 mb-4"},zt={class:"flex items-center"},Bt={class:"relative col-span-2"},Dt={class:"flex items-center font-bold"},Ft=t("img",{src:"/img/ai-icon.svg",class:"w-[40px] mr-4",alt:"This content is generated by our AI Assistant Ada"},null,-1),Ot={class:"mt-2"},Ht={class:"relative group"},It={class:"ai-insight-bubble relative bg-violet-100 rounded-xl mt-8 border-2 border-violet-800 shadow text-xs p-5 md:p-6 md:text-sm"},Wt={key:0,class:"inner break-words"},qt=t("p",{class:"font-bold mb-2"},"Why 'Cost to Replicate' Matters:",-1),Et=t("div",null,[t("p",null,"The 'Cost to Replicate' estimate is a crucial metric that reflects the combined value of your project's complexity, technologies used, and the effort required to recreate it from scratch. Changes in this value can indicate shifts in project scope, complexity, or efficiency.")],-1),Gt=t("p",{class:"font-bold mb-2"},"Stable Project Valuation:",-1),Pt=t("div",null,[t("p",null,"An unchanged 'Cost to Replicate' estimate between versions suggests a stable scope and complexity in your project. This stability can indicate effective management of project size and efficient use of resources, maintaining a balance between adding new features and optimizing existing ones.")],-1),Kt=[qt,Et,Gt,Pt],Ut={key:1,class:"inner break-words"},Yt=t("p",{class:"font-bold mb-2"},"Why 'Cost to Replicate' Might Increase:",-1),Jt=t("div",null,[t("p",null,"An increase in the 'Cost to Replicate' can result from several factors such as added code complexity, integration of more programming languages, or an increase in the total lines of code. It may also reflect higher development costs due to more intricate or expansive project requirements.")],-1),Qt=t("p",{class:"font-bold mb-2"},"Growing Project Complexity and Value:",-1),Xt=t("div",null,[t("p",null,"A higher 'Cost to Replicate' estimate indicates a growth in your project's complexity and overall value. This could be due to expanding the project's scope, integrating advanced technologies, or incorporating more complex functionalities. While this can enhance the project's capabilities, it also highlights the increased effort and resources required for replication or future development.")],-1),Zt=[Yt,Jt,Qt,Xt],te={key:2,class:"inner break-words"},ee=t("p",{class:"font-bold mb-2"},"Why 'Cost to Replicate' Might Decrease:",-1),se=t("div",null,[t("p",null,"A decrease in the 'Cost to Replicate' could occur due to factors like code simplification, removal of redundant functionalities, or more efficient use of programming languages. It might also reflect a strategic decision to streamline the project, focusing on core features.")],-1),oe=t("p",{class:"font-bold mb-2"},"Streamlined Project Efficiency:",-1),ae=t("div",null,[t("p",null,"A reduced 'Cost to Replicate' estimate suggests that the project has become more streamlined and potentially more efficient. This could result from efforts to simplify the codebase, optimize existing features, or a strategic focus on cost-effective development practices. Itâs a positive sign of improved manageability and resource utilization in the project.")],-1),ie=[ee,se,oe,ae],le={class:"flex justify-end items-center mt-4"},ce={class:"text-sm mr-2"},fe={__name:"Valuation",props:{from_version:Object,to_version:Object,data:Object,complexity_data:Object},setup(c){var x,g;const s=c;k([L,V,A,$,N]);const u=(g=(x=j().props.auth.user.current_team)==null?void 0:x.whitelabel_settings)==null?void 0:g.assistant_name;S(R,"wonderland");const f=n(()=>[{name:`CC ${s.complexity_data.from_data.summary.overall_complexity_score.toFixed(2)}`,children:s.data.from_data.by_languages.filter(e=>e.language!=="__empty__").sort((e,a)=>a.valuation-e.valuation).slice(0,10).map((e,a)=>({name:e.language,itemStyle:{color:i(0)}
1,children:[{name:`Lines (${e.original_loc.toLocaleString()})`,itemStyle:{color:i(1)},children:[{name:"Removed ("+(e.original_loc-e.adjusted_loc).toLocaleString()+")",itemStyle:{color:i(2)},children:[{name:`$${Number(Number(e.valuation).toFixed(2)).toLocaleString()}`,value:1,itemStyle:{color:i(3)}}]}]}]}))}]),v=n(()=>[{name:`CC ${s.complexity_data.to_data.summary.overall_complexity_score.toFixed(2)}`,children:s.data.to_data.by_languages.filter(e=>e.language!=="__empty__").sort((e,a)=>a.valuation-e.valuation).slice(0,10).map((e,a)=>({name:e.language,itemStyle:{color:i(0)},children:[{name:`Lines (${e.original_loc.toLocaleString()})`,itemStyle:{color:i(1)},children:[{name:"Removed ("+(e.original_loc-e.adjusted_loc).toLocaleString()+")",itemStyle:{color:i(2)},children:[{name:`$${Number(Number(e.valuation).toFixed(2)).toLocaleString()}`,value:1,itemStyle:{color:i(3)}}]}]}]}))}]),m=n(()=>({visualMap:{type:"continuous",min:0,max:10},series:{type:"sunburst",sort:void 0,data:f.value,radius:[0,"100%"],label:{align:"center",rotate:"tangential"},levels:[{},{},{},{},{label:{fontSize:8}}]}})),_=n(()=>({visualMap:{type:"continuous",min:0,max:10},series:{type:"sunburst",sort:void 0,data:v.value,radius:[0,"100%"],label:{align:"center",rotate:"tangential"},levels:[{},{},{},{},{label:{fontSize:8}}]}}));M(()=>{m.value.series.data=f.value,m.value.color=s.data.from_data.by_languages.map((e,a)=>i(a)),_.value.series.data=v.value,_.value.color=s.data.to_data.by_languages.map((e,a)=>i(a))});function i(e){return["hsl(210, 100%, 40%)","hsl(210, 100%, 50%)","hsl(210, 100%, 60%)","hsl(210, 100%, 70%)"][e]}return(e,a)=>(r(),d("div",T,[z,t("div",B,[t("dl",D,[t("div",F,[t("dt",O,[H,p(" v"+o(c.from_version.version)+" 'Cost to Replicate' ",1)]),t("dd",I,[t("div",W,[t("div",q,[t("table",E,[t("tbody",G,[t("tr",null,[P,t("td",K,o(s.data.from_data.factors.total_lines_of_code.toLocaleString()),1)]),t("tr",null,[U,t("td",Y,o(s.data.from_data.factors.total_lines_discounted.toLocaleString()),1)]),t("tr",null,[J,t("td",Q,o(s.data.from_data.factors.language_multiple),1)]),t("tr",null,[X,t("td",Z,o(s.data.from_data.factors.complexity_multiple),1)])])])]),t("div",tt,[t("table",et,[t("tbody",st,[t("tr",null,[ot,t("td",at,"$"+o(Number(Number(s.data.from_data.total).toFixed(2)).toLocaleString()),1)])])])])])])]),t("div",it,[t("dt",lt,[ct,p(" v"+o(c.to_version.version)+" 'Cost to Replicate' ",1)]),t("dd",nt,[t("div",dt,[t("div",rt,[t("table",mt,[t("tbody",_t,[t("tr",null,[pt,t("td",ht,o(s.data.to_data.factors.total_lines_of_code.toLocaleString()),1)]),t("tr",null,[ut,t("td",ft,o(s.data.to_data.factors.total_lines_discounted.toLocaleString()),1)]),t("tr",null,[vt,t("td",xt,o(s.data.to_data.factors.language_multiple),1)]),t("tr",null,[gt,t("td",yt,o(s.data.to_data.factors.complexity_multiple),1)])])])]),t("div",bt,[t("table",wt,[t("tbody",jt,[t("tr",null,[Mt,t("td",Ct,"$"+o(Number(Number(s.data.to_data.total).toFixed(2)).toLocaleString()),1)])])])])])])]),t("div",St,[kt,t("dd",Lt,[t("dl",Rt,[t("div",Vt,[t("h3",At,"v"+o(c.from_version.version),1),t("div",$t,[h(l(y),{class:"h-96 w-full",option:l(m),autoresize:""},null,8,["option"])])]),t("div",Nt,[t("h3",Tt,"v"+o(c.to_version.version),1),t("div",zt,[h(l(y),{class:"h-96 w-full",option:l(_),autoresize:""},null,8,["option"])])])])])]),t("div",Bt,[t("dt",Dt,[Ft,p(" "+o(l(u)??"Ada")+"'s thoughts... ",1)]),t("dd",Ot,[t("div",Ht,[t("div",It,[s.data.to_data.total==s.data.from_data.total?(r(),d("div",Wt,Kt)):s.data.to_data.total>s.data.from_data.total?(r(),d("div",Ut,Zt)):s.data.to_data.total<s.data.from_data.total?(r(),d("div",te,ie)):C("",!0)]),t("div",le,[t("span",ce,o(l(u)??"Ada"),1),h(w,{class:"w-[40px] md:w-[60px]"})])])])])])])]))}};export{fe as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.