1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="554ea736-1160-4c16-b531-c5185b411a00",e._sentryDebugIdIdentifier="sentry-dbid-554ea736-1160-4c16-b531-c5185b411a00")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6329,8389],{22577:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/calculator",function(){return r(93702)}])},72656:function(e,t,r){"use strict";var n;r.d(t,{W:function(){return n}}),function(e){e[e.Ok=200]="Ok",e[e.MovedPermanently=301]="MovedPermanently",e[e.MovedTemporarily=302]="MovedTemporarily",e[e.SeeOther=303]="SeeOther",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.PaymentRequired=402]="PaymentRequired",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.MethodNotAllowed=405]="MethodNotAllowed",e[e.InternalServerError=500]="InternalServerError"}(n||(n={}))},40866:function(e,t,r){"use strict";var n=r(67294),s=r(90512);t.Z=e=>{let{children:t,className:r,as:a,...o}=e;const u=a??"label";return(0,n.createElement)(u,{className:(0,s.Z)("w-full text-sm font-medium text-dark-500 dark:text-dark-400 [&>*]:mt-[0.4rem]",r),...o},t)}},57157:function(e,t,r){"use strict";r.d(t,{RM:function(){return i},SC:function(){return c},iA:function(){return o},pj:function(){return g},ss:function(){return d},xD:function(){return u},yt:function(){return l}});var n=r(85893),s=r(67294),a=r(90512);const o=s.forwardRef(((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("div",{className:"w-full overflow-auto",children:(0,n.jsx)("table",{ref:t,className:(0,a.Z)("w-full caption-bottom text-sm",r),...s})})}));o.displayName="Table";const u=s.forwardRef(((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("thead",{ref:t,className:(0,a.Z)("[&_tr]:border-b border-gray-50 dark:border-dark-800",r),...s})}));u.displayName="TableHeader";const i=s.forwardRef(((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("tbody",{ref:t,className:(0,a.Z)("[&_tr:last-child]:border-0",r),...s})}));i.displayName="TableBody";const l=s.forwardRef(((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("tfoot",{ref:t,className:(0,a.Z)("font-medium w-full [&_tr:first-child]:border-b-0 [&_tr:first-child]:border-t",r),...s})}));l.displayName="TableFooter";const c=s.forwardRef(((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("tr",{ref:t,className:(0,a.Z)("border-b border-gray-100 dark:border-dark-800 transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",r),...s})}));c.displayName="TableRow";const d=s.forwardRef(((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("th",{ref:t,className:(0,a.Z)("h-12 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",r),...s})}));d.displayName="TableHead";const g=s.forwardRef(((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("td",{ref:t,className:(0,a.Z)("py-2.5 align-middle [&:has([role=checkbox])]:pr-0",r),...s})}));g.displayName="TableCell";s.forwardRef(((e,t)=>{let{className:r,...s}=e;return(0,n.jsx)("caption",{ref:t,className:(0,a.Z)("mt-4 text-sm text-muted-foreground",r),...s})})).displayName="TableCaption"},21453:function(e,t,r){"use strict";r.d(t,{I:function(){return o}});var n=r(85893),s=r(67294),a=r(73620);const o=s.forwardRef(((e,t)=>{let{className:r,type:s,...o}=e;return(0,n.jsx)("input",{type:s,className:(0,a.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 placeholder:text-dark-400 dark:placeholder:text-dark-600",r),ref:t,...o})}));o.displayName="Input"},73620:function(e,t,r){"use strict";r.d(t,{As:function(){return b},C$:function(){return m},EB:function(){return C},JP:function(){return w},LF:function(){return T},M1:function(){return U},PC:function(){return g},QQ:function(){return I},S4:function(){return N},TA:function(){return p},X8:function(){return k},Zu:function(){return O},cT:function(){return R},cn:function(){return h},dC:function(){return v},fZ:function(){return _},ik:function(){return f},kC:function(){return y},ob:function(){return j},vi:function(){return S},x0:function(){return x}});var n=r(90512),s=r(68079),a=r.n(s),o=r(53416),u=r(57851),i=r(94301),l=r(36100),c=r(36003),d=(r(99353),r(72656));function g(e,t){let r;return r=e instanceof Error?{message:e.message,status:e.status||d.W.BadRequest}:"object"===typeof e&&null!==e&&"message"in e?{message:String(e.message),status:e.status||d.W.BadRequest}:"object"===typeof e&&null!==e&&"error"in e&&"status"in e?{message:String(e.error),status:e.status||d.W.BadRequest}:{message:t,status:d.W.BadRequest},r}function f(e){const t=/!\[(?<altText>.*)\]\s*\((?<imageURL>.+)\)|img\s*src="(?<imageURL1>
1[^"]*)"\s*alt="(?<altText1>[^"]*)" \/>|img\s*alt="(?<altText2>[^"]*)"\s*src="(?<imageURL2>[^"]*)" \/>/gm,r=e;let n;const s=[];for(;null!==(n=t.exec(r));)n.index===t.lastIndex&&t.lastIndex++,s.push(n.groups?.imageURL??n.groups?.imageURL1??n.groups?.imageURL2??"");return s}const m={id:"test-article-id",title:"Sitemechanic Test Article",contentHtml:"<p>This is a site mechanic test article</p>",featuredImage:"https://sitemechanic.ai/assets/images/twitter-card.jpg",excerpt:"Site mechanic test article excerpt",description:"Site mechanic test description",slug:"sitemechanic-test-article",keyword:"main keyword",isDraft:!1},p=e=>{switch(e){case"shopify":return"/assets/images/integrations/shopify-icon-light.png";case"wordpress":return"/assets/images/integrations/wordpress-icon-light.png";case"wix":return"/assets/images/integrations/wix-icon-light.png";case"webflow":return"/assets/images/integrations/webflow-icon-light.png";case"zapier":return"/assets/images/integrations/zapier-icon-light.png";case"webhook":return"/assets/images/integrations/code-icon-light.png";case"ghost":return"/assets/images/integrations/ghost-icon-light.png";default:return""}};function b(e){if(!e)return"";try{return JSON.parse(e)}catch(t){return e}}function h(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,u.m)((0,n.W)(t))}const x=(0,o.kP)("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",7);function y(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():""}function k(e){return e.startsWith("http://")||e.startsWith("https://")?e:`https://${e}`}function w(e){return e?e<1e3?e.toString():e<1e4?(e/1e3).toFixed(1)+"K":e<1e6?Math.floor(e/1e3)+"K":e<1e9?(e/1e6).toFixed(1)+"M":(e/1e9).toFixed(1)+"B":""}function N(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MMM do, yyyy hh:mm a";return e instanceof l.EK?(0,i.WU)(e.toDate(),t):"string"===typeof e?(0,i.WU)(new Date(e),t):"-"}function j(e,t,r){return"month"===e.interval&&"year"===t.toLocaleLowerCase()||e.limits.credits<r}const v=e=>e?e<=30?{foreground:"text-emerald-700/80 dark:text-emerald-500/80",background:"bg-emerald-50 dark:bg-emerald-500/10"}:e<=60?{foreground:"text-blue-700/80 dark:text-blue-500/90",background:"bg-blue-50 dark:bg-blue-500/10"}:{foreground:"text-red-700/80 dark:text-red-500/80",background:"bg-red-50 dark:bg-red-500/10"}:{foreground:"text-gray-500",background:"bg-gray-50"},I=e=>{switch(e){case"ready":default:return{foreground:"text-gray-500 dark:text-gray-500",background:"bg-gray-50 dark:bg-gray-800"};case"complete":return{foreground:"text-emerald-700/80 dark:text-emerald-600/80",background:"bg-emerald-50 dark:bg-emerald-500/20"};case"processing":return{foreground:"text-primary-700/80 dark:text-primary-600/90",background:"bg-primary-50 dark:bg-primary-500/20"};case"queued":case"open":return{foreground:"text-secondary-700/80 dark:text-secondary-600/80",background:"bg-secondary-50 dark:bg-secondary-500/20"};case"error":return{foreground:"text-red-700/80 dark:text-red-600/80",background:"bg-red-50 dark:bg-red-500/20"}}},R=e=>{let t=0;e>=500?t=.35:e>=100&&(t=.2);return{price:e*c.default.stripe.basePrice*(1-t),discount:t}};function T(e){const t=["a","an","and","as","at","but","by","for","in","nor","of","on","or","per","the","to","vs","vs."];return e.split(" ").map(((e,r)=>t.includes(e.toLowerCase())&&0!==r?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase())).join(" ")}const S=(e,t)=>{let r=0;const n=t.pages??[],s=e?.includedUrls?.length??!1,a=e?.excludedUrls?.length??!1;if(s)r=e?.includedUrls?.length??0;else if(a){r=n.filter((t=>t.url.includes(e?.filter??""))).length-(e?.excludedUrls?.length??0)}else r=n.filter((t=>t.url.includes(e?.filter??""))).length;return r};const O=e=>{if(""===e)return null;let t=k(e);return t=t.replace(/\/$/,""),function(e){return!!a()(e)}(t)?t:null},C=e=>{switch(e){case"listicle":return"bg-gray-500 text-gray-100 dark:bg-gray-400 dark:text-gray-800";case"regular":return"bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-100"}},_=()=>{const e=localStorage.getItem("userSortingBulkQueue");return e?JSON.parse(e):null},U=e=>{localStorage.setItem("userSortingBulkQueue",JSON.stringify(e))}},93702:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return p},default:function(){return b}});var n=r(85893),s=r(67294),a=r(57157),o=r(9008),u=r.n(o),i=r(60693),l=r(27681);const c={"llama3-8b-8192":{Input:5e-5,Output:1e-4},"llama3-70b-8192":{Input:59e-5,Output:79e-5},"claude-3-haiku-20240307":{Input:25e-5,Output:.00125},"claude-3-5-sonnet-20240620":{Input:.003,Output:.015},"claude-3-sonnet-20240229":{Input:.003,Output:.015},"claude-3-opus-20240229":{Input:.015,Output:.075},"o1-mini":{Input:.003,Output:.012},"gpt-4o-mini":{Input:15e-5,Output:6e-4},"gpt-4o":{Input:.0025,Output:.01},"gpt-4-0125-preview":{Input:.01,Output:.03},"gpt-4-turbo":{Input:.01,Output:.03},"gpt-3.5-turbo":{Input:5e-4,Output:.0015}};var d=r(36003),g=r(96557),f=r(21453),m=r(40866);
1var p=!0,b=function(){const[e,t]=(0,s.useState)(0),[r,o]=(0,s.useState)(0),p=c,b=t=>{const{Input:n,Output:s}=p[t];return(e/1e3*n+r/1e3*s).toFixed(4)};return(0,n.jsxs)(i.Z,{children:[(0,n.jsx)(u(),{children:(0,n.jsx)("title",{children:`API Costs Generator | ${d.default.site.siteName}`})}),(0,n.jsx)(l.Z,{children:"Pricing Calculator"}),(0,n.jsx)(g.xV,{children:(0,n.jsxs)("div",{className:"w-full max-w-screen-sm mx-auto p-4",children:[(0,n.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 mb-6",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(m.Z,{htmlFor:"inputTokens",children:"Input Tokens"}),(0,n.jsx)(f.I,{id:"inputTokens",value:e,onChange:e=>t(Number(e.target.value)),className:"mt-1"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(m.Z,{htmlFor:"outputTokens",children:"Output Tokens"}),(0,n.jsx)(f.I,{id:"outputTokens",value:r,onChange:e=>o(Number(e.target.value)),className:"mt-1"})]})]}),(0,n.jsx)("div",{className:"border rounded-lg px-4 py-2",children:(0,n.jsxs)(a.iA,{children:[(0,n.jsx)(a.xD,{children:(0,n.jsxs)(a.SC,{children:[(0,n.jsx)(a.ss,{children:"Model"}),(0,n.jsx)(a.ss,{className:"text-center",children:"Total Cost"})]})}),(0,n.jsx)(a.RM,{children:Object.keys(p).map((e=>(0,n.jsxs)(a.SC,{children:[(0,n.jsx)(a.pj,{children:e}),(0,n.jsxs)(a.pj,{align:"center",children:["$",b(e)]})]},e)))})]})})]})})]})}}},function(e){e.O(0,[5643,3990,6062,4712,2993,7744,33,5420,2888,9774,179],(function(){return t=22577,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
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.