@roastcodes/ttdash 6.2.1 → 6.2.2

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 (78) hide show
  1. package/dist/assets/AnimatedBarFill-Da354-1y.js +1 -0
  2. package/dist/assets/{AnomalyDetection-BdGl1xvC.js → AnomalyDetection-D06kgR_V.js} +1 -1
  3. package/dist/assets/{AutoImportModal-bokip1Pn.js → AutoImportModal-CuzbrUVc.js} +1 -1
  4. package/dist/assets/CacheROI-fJ1paHaT.js +1 -0
  5. package/dist/assets/ChartCard-CS4Kbe6r.js +2 -0
  6. package/dist/assets/ChartLegend-Vzg_GmF-.js +1 -0
  7. package/dist/assets/CorrelationAnalysis-DX-ZQKVJ.js +1 -0
  8. package/dist/assets/CostByModelOverTime-BRo1PCRo.js +1 -0
  9. package/dist/assets/{CostByWeekday-X20qjGNA.js → CostByWeekday-BJwEWkmF.js} +1 -1
  10. package/dist/assets/CostForecast-BxICbpzM.js +1 -0
  11. package/dist/assets/CumulativeCost-BdlOTRDX.js +1 -0
  12. package/dist/assets/{CustomTooltip-CBVU1pyK.js → CustomTooltip-CEd8U-a3.js} +1 -1
  13. package/dist/assets/DistributionAnalysis-Cw8bRtt9.js +1 -0
  14. package/dist/assets/DrillDownModal-BT2rFk_U.js +1 -0
  15. package/dist/assets/{HelpPanel-HNxQElT5.js → HelpPanel-Ct4CbfBg.js} +1 -1
  16. package/dist/assets/{InfoButton-CTgLGzb9.js → InfoButton-CyA48Vlx.js} +1 -1
  17. package/dist/assets/InfoHeading-CFbl45C9.js +1 -0
  18. package/dist/assets/{MetricCard-Drluz0b9.js → MetricCard-CLFpH1l1.js} +1 -1
  19. package/dist/assets/{ModelEfficiency-CZ4ZzDtA.js → ModelEfficiency-CO7sQQnT.js} +1 -1
  20. package/dist/assets/{ModelMix-TDHxSk5H.js → ModelMix-C4P2SpQZ.js} +1 -1
  21. package/dist/assets/{PeriodComparison-B9WuoaCr.js → PeriodComparison-BogfA2IN.js} +1 -1
  22. package/dist/assets/{ProviderEfficiency-DpDIYr_l.js → ProviderEfficiency-CY4HJ7Fy.js} +1 -1
  23. package/dist/assets/ProviderLimitsSection-BcCrH2XG.js +1 -0
  24. package/dist/assets/RecentDays-K0Uzk7UU.js +1 -0
  25. package/dist/assets/RequestCacheHitRateByModel-8ip50S7V.js +1 -0
  26. package/dist/assets/RequestQuality-ByYXyzn8.js +1 -0
  27. package/dist/assets/RequestsOverTime-B4yB-x_5.js +1 -0
  28. package/dist/assets/{SettingsModal-D9-T5heB.js → SettingsModal-Badl8kHp.js} +1 -1
  29. package/dist/assets/TokenEfficiency-Bhdj4v75.js +1 -0
  30. package/dist/assets/TokenTypes-CaVA8FXP.js +1 -0
  31. package/dist/assets/TokensOverTime-BA7W_OfG.js +1 -0
  32. package/dist/assets/{app-settings-C3i52ycx.js → app-settings-EFIYxqQU.js} +1 -1
  33. package/dist/assets/{button-D--hHeVj.js → button-olcuyddH.js} +1 -1
  34. package/dist/assets/card-CskYMXga.js +1 -0
  35. package/dist/assets/chart-theme-BdE8bEiN.js +1 -0
  36. package/dist/assets/{constants-jyhBMReu.js → constants-DOCA3QtR.js} +1 -1
  37. package/dist/assets/{dialog-C0AeNKs8.js → dialog-D4LfH66U.js} +1 -1
  38. package/dist/assets/{formatted-value-rO0EpKbc.js → formatted-value-DuGw8WPX.js} +1 -1
  39. package/dist/assets/{formatters-yKppUXb3.js → formatters-BzLLk0br.js} +1 -1
  40. package/dist/assets/help-content-Cuf5l3_6.js +1 -0
  41. package/dist/assets/i18n-D1WJ4-W9.js +1 -0
  42. package/dist/assets/index-8kk0H-lQ.css +2 -0
  43. package/dist/assets/index-D6_2fCBR.js +3 -0
  44. package/dist/assets/motion-vendor-BNFhNARW.js +9 -0
  45. package/dist/assets/{section-header-DbV45zH5.js → section-header-KpKzq-Qa.js} +1 -1
  46. package/dist/assets/{ui-vendor-BolBXLiD.js → ui-vendor-DOI7LsxH.js} +1 -1
  47. package/dist/assets/{useTranslation-BSl7t2D6.js → useTranslation-JH30oWEP.js} +1 -1
  48. package/dist/index.html +25 -24
  49. package/package.json +1 -1
  50. package/src/locales/de/common.json +1 -0
  51. package/src/locales/en/common.json +1 -0
  52. package/dist/assets/CacheROI-IyVKLGZu.js +0 -1
  53. package/dist/assets/ChartCard-CBUnItl-.js +0 -2
  54. package/dist/assets/ChartLegend-B64cJdDI.js +0 -1
  55. package/dist/assets/CorrelationAnalysis-Dnd0YUCO.js +0 -1
  56. package/dist/assets/CostByModelOverTime-C10Hr2xR.js +0 -1
  57. package/dist/assets/CostForecast-C--EIZ4B.js +0 -1
  58. package/dist/assets/CumulativeCost-D9v6GDcr.js +0 -1
  59. package/dist/assets/DistributionAnalysis-Cdly0pAu.js +0 -1
  60. package/dist/assets/DrillDownModal-BXf7B9B8.js +0 -1
  61. package/dist/assets/InfoHeading-oi90uCR7.js +0 -1
  62. package/dist/assets/ProviderLimitsSection-CSuisho_.js +0 -1
  63. package/dist/assets/RecentDays-Cz4Yd_-Q.js +0 -1
  64. package/dist/assets/RequestCacheHitRateByModel-5bkvg7Hx.js +0 -1
  65. package/dist/assets/RequestQuality-iUIOJrpr.js +0 -1
  66. package/dist/assets/RequestsOverTime-D10OssgN.js +0 -1
  67. package/dist/assets/TokenEfficiency-CGeyr8Zq.js +0 -1
  68. package/dist/assets/TokenTypes-BiRBF9VP.js +0 -1
  69. package/dist/assets/TokensOverTime-DeT3D-aC.js +0 -1
  70. package/dist/assets/card-h-Z9EWBl.js +0 -1
  71. package/dist/assets/chart-theme-D5iCFDJg.js +0 -1
  72. package/dist/assets/help-content-Bt5KCpWS.js +0 -1
  73. package/dist/assets/i18n-C88wS2Uy.js +0 -1
  74. package/dist/assets/index-DjMakAzD.js +0 -3
  75. package/dist/assets/index-DuoM1Ukq.css +0 -2
  76. package/dist/assets/motion-vendor-vKc6gXHZ.js +0 -1
  77. /package/dist/assets/{calculations-GOdNqKo6.js → calculations-BJw_4KdI.js} +0 -0
  78. /package/dist/assets/{provider-limits-5e1fUwPl.js → provider-limits-BgKrr7k7.js} +0 -0
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{S as t,w as n,x as r}from"./charts-vendor-CiBqdKXh.js";import{n as i}from"./motion-vendor-vKc6gXHZ.js";var a=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},o=(e,t)=>({classGroupId:e,validator:t}),s=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),c=`-`,l=[],u=`arbitrary..`,d=e=>{let t=m(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return p(e);let n=e.split(c);return f(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?a(i,t):t:i||l}return n[e]||l}}},f=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=f(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(c):e.slice(t).join(c),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},p=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?u+r:void 0})(),m=e=>{let{theme:t,classGroups:n}=e;return h(n,t)},h=(e,t)=>{let n=s();for(let r in e){let i=e[r];g(i,n,r,t)}return n},g=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];_(i,t,n,r)}},_=(e,t,n,r)=>{if(typeof e==`string`){v(e,t,n);return}if(typeof e==`function`){y(e,t,n,r);return}b(e,t,n,r)},v=(e,t,n)=>{let r=e===``?t:x(t,e);r.classGroupId=n},y=(e,t,n,r)=>{if(S(e)){g(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(o(n,e))},b=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];g(o,x(t,a),n,r)}},x=(e,t)=>{let n=e,r=t.split(c),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=s(),n.nextPart.set(t,i)),n=i}return n},S=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,C=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},w=`!`,T=`:`,ee=[],te=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),E=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===T){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(w)?(c=s.slice(0,-1),l=!0):s.startsWith(w)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return te(t,l,c,u)};if(t){let e=t+T,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):te(ee,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},ne=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},D=e=>({cache:C(e.cacheSize),parseClassName:E(e),sortModifiers:ne(e),...d(e)}),O=/\s+/,k=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(O),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+w:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},A=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=j(n))&&(i&&(i+=` `),i+=r);return i},j=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=j(e[r]))&&(n&&(n+=` `),n+=t);return n},M=(e,...t)=>{let n,r,i,a,o=o=>(n=D(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=k(e,n);return i(e,a),a};return a=o,(...e)=>a(A(...e))},N=[],P=e=>{let t=t=>t[e]||N;return t.isThemeGetter=!0,t},re=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ie=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ae=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,oe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,F=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,I=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,L=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,se=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,R=e=>ae.test(e),z=e=>!!e&&!Number.isNaN(Number(e)),B=e=>!!e&&Number.isInteger(Number(e)),ce=e=>e.endsWith(`%`)&&z(e.slice(0,-1)),V=e=>oe.test(e),le=()=>!0,H=e=>F.test(e)&&!I.test(e),U=()=>!1,W=e=>L.test(e),G=e=>se.test(e),ue=e=>!K(e)&&!J(e),de=e=>X(e,Ee,U),K=e=>re.test(e),q=e=>X(e,De,H),fe=e=>X(e,Oe,z),pe=e=>X(e,Ae,le),me=e=>X(e,ke,U),he=e=>X(e,we,U),ge=e=>X(e,Te,G),_e=e=>X(e,je,W),J=e=>ie.test(e),Y=e=>Z(e,De),ve=e=>Z(e,ke),ye=e=>Z(e,we),be=e=>Z(e,Ee),xe=e=>Z(e,Te),Se=e=>Z(e,je,!0),Ce=e=>Z(e,Ae,!0),X=(e,t,n)=>{let r=re.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Z=(e,t,n=!1)=>{let r=ie.exec(e);return r?r[1]?t(r[1]):n:!1},we=e=>e===`position`||e===`percentage`,Te=e=>e===`image`||e===`url`,Ee=e=>e===`length`||e===`size`||e===`bg-size`,De=e=>e===`length`,Oe=e=>e===`number`,ke=e=>e===`family-name`,Ae=e=>e===`number`||e===`weight`,je=e=>e===`shadow`,Me=M(()=>{let e=P(`color`),t=P(`font`),n=P(`text`),r=P(`font-weight`),i=P(`tracking`),a=P(`leading`),o=P(`breakpoint`),s=P(`container`),c=P(`spacing`),l=P(`radius`),u=P(`shadow`),d=P(`inset-shadow`),f=P(`text-shadow`),p=P(`drop-shadow`),m=P(`blur`),h=P(`perspective`),g=P(`aspect`),_=P(`ease`),v=P(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),J,K],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[J,K,c],T=()=>[R,`full`,`auto`,...w()],ee=()=>[B,`none`,`subgrid`,J,K],te=()=>[`auto`,{span:[`full`,B,J,K]},B,J,K],E=()=>[B,`auto`,J,K],ne=()=>[`auto`,`min`,`max`,`fr`,J,K],D=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],O=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],k=()=>[`auto`,...w()],A=()=>[R,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],j=()=>[R,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],M=()=>[R,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],N=()=>[e,J,K],re=()=>[...b(),ye,he,{position:[J,K]}],ie=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ae=()=>[`auto`,`cover`,`contain`,be,de,{size:[J,K]}],oe=()=>[ce,Y,q],F=()=>[``,`none`,`full`,l,J,K],I=()=>[``,z,Y,q],L=()=>[`solid`,`dashed`,`dotted`,`double`],se=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],H=()=>[z,ce,ye,he],U=()=>[``,`none`,m,J,K],W=()=>[`none`,z,J,K],G=()=>[`none`,z,J,K],X=()=>[z,J,K],Z=()=>[R,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[V],breakpoint:[V],color:[le],container:[V],"drop-shadow":[V],ease:[`in`,`out`,`in-out`],font:[ue],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[V],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[V],shadow:[V],spacing:[`px`,z],text:[V],"text-shadow":[V],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,R,K,J,g]}],container:[`container`],columns:[{columns:[z,K,J,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[B,`auto`,J,K]}],basis:[{basis:[R,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[z,R,`auto`,`initial`,`none`,K]}],grow:[{grow:[``,z,J,K]}],shrink:[{shrink:[``,z,J,K]}],order:[{order:[B,`first`,`last`,`none`,J,K]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ne()}],"auto-rows":[{"auto-rows":ne()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...D(),`normal`]}],"justify-items":[{"justify-items":[...O(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...O()]}],"align-content":[{content:[`normal`,...D()]}],"align-items":[{items:[...O(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...O(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...O(),`baseline`]}],"place-self":[{"place-self":[`auto`,...O()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mbs:[{mbs:k()}],mbe:[{mbe:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:A()}],"inline-size":[{inline:[`auto`,...j()]}],"min-inline-size":[{"min-inline":[`auto`,...j()]}],"max-inline-size":[{"max-inline":[`none`,...j()]}],"block-size":[{block:[`auto`,...M()]}],"min-block-size":[{"min-block":[`auto`,...M()]}],"max-block-size":[{"max-block":[`none`,...M()]}],w:[{w:[s,`screen`,...A()]}],"min-w":[{"min-w":[s,`screen`,`none`,...A()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...A()]}],h:[{h:[`screen`,`lh`,...A()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...A()]}],"max-h":[{"max-h":[`screen`,`lh`,...A()]}],"font-size":[{text:[`base`,n,Y,q]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Ce,pe]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,ce,K]}],"font-family":[{font:[ve,me,t]}],"font-features":[{"font-features":[K]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,J,K]}],"line-clamp":[{"line-clamp":[z,`none`,J,fe]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,J,K]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,J,K]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...L(),`wavy`]}],"text-decoration-thickness":[{decoration:[z,`from-font`,`auto`,J,q]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[z,`auto`,J,K]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,J,K]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,J,K]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:ie()}],"bg-size":[{bg:ae()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},B,J,K],radial:[``,J,K],conic:[B,J,K]},xe,ge]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-bs":[{"border-bs":I()}],"border-w-be":[{"border-be":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":I()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...L(),`hidden`,`none`]}],"divide-style":[{divide:[...L(),`hidden`,`none`]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-bs":[{"border-bs":N()}],"border-color-be":[{"border-be":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...L(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[z,J,K]}],"outline-w":[{outline:[``,z,Y,q]}],"outline-color":[{outline:N()}],shadow:[{shadow:[``,`none`,u,Se,_e]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":[`none`,d,Se,_e]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:I()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[z,q]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":[`none`,f,Se,_e]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[z,J,K]}],"mix-blend":[{"mix-blend":[...se(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[z]}],"mask-image-linear-from-pos":[{"mask-linear-from":H()}],"mask-image-linear-to-pos":[{"mask-linear-to":H()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":H()}],"mask-image-t-to-pos":[{"mask-t-to":H()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":H()}],"mask-image-r-to-pos":[{"mask-r-to":H()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":H()}],"mask-image-b-to-pos":[{"mask-b-to":H()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":H()}],"mask-image-l-to-pos":[{"mask-l-to":H()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":H()}],"mask-image-x-to-pos":[{"mask-x-to":H()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":H()}],"mask-image-y-to-pos":[{"mask-y-to":H()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[J,K]}],"mask-image-radial-from-pos":[{"mask-radial-from":H()}],"mask-image-radial-to-pos":[{"mask-radial-to":H()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[z]}],"mask-image-conic-from-pos":[{"mask-conic-from":H()}],"mask-image-conic-to-pos":[{"mask-conic-to":H()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:ie()}],"mask-size":[{mask:ae()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,J,K]}],filter:[{filter:[``,`none`,J,K]}],blur:[{blur:U()}],brightness:[{brightness:[z,J,K]}],contrast:[{contrast:[z,J,K]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Se,_e]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:[``,z,J,K]}],"hue-rotate":[{"hue-rotate":[z,J,K]}],invert:[{invert:[``,z,J,K]}],saturate:[{saturate:[z,J,K]}],sepia:[{sepia:[``,z,J,K]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,J,K]}],"backdrop-blur":[{"backdrop-blur":U()}],"backdrop-brightness":[{"backdrop-brightness":[z,J,K]}],"backdrop-contrast":[{"backdrop-contrast":[z,J,K]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,z,J,K]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[z,J,K]}],"backdrop-invert":[{"backdrop-invert":[``,z,J,K]}],"backdrop-opacity":[{"backdrop-opacity":[z,J,K]}],"backdrop-saturate":[{"backdrop-saturate":[z,J,K]}],"backdrop-sepia":[{"backdrop-sepia":[``,z,J,K]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,J,K]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[z,`initial`,J,K]}],ease:[{ease:[`linear`,`initial`,_,J,K]}],delay:[{delay:[z,J,K]}],animate:[{animate:[`none`,v,J,K]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,J,K]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:W()}],"rotate-x":[{"rotate-x":W()}],"rotate-y":[{"rotate-y":W()}],"rotate-z":[{"rotate-z":W()}],scale:[{scale:G()}],"scale-x":[{"scale-x":G()}],"scale-y":[{"scale-y":G()}],"scale-z":[{"scale-z":G()}],"scale-3d":[`scale-3d`],skew:[{skew:X()}],"skew-x":[{"skew-x":X()}],"skew-y":[{"skew-y":X()}],transform:[{transform:[J,K,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:Z()}],"translate-x":[{"translate-x":Z()}],"translate-y":[{"translate-y":Z()}],"translate-z":[{"translate-z":Z()}],"translate-none":[`translate-none`],accent:[{accent:N()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,J,K]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,J,K]}],fill:[{fill:[`none`,...N()]}],"stroke-w":[{stroke:[z,Y,q,fe]}],stroke:[{stroke:[`none`,...N()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function Ne(...e){return Me(t(e))}function Pe(){return!!i()}function Fe(e,t){return e?``:t}var Q=e(n()),Ie=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);$(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},Le={},Re=(e,t,n,r)=>{$(n)&&Le[n]||($(n)&&(Le[n]=new Date),Ie(e,t,n,r))},ze=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},Be=(e,t,n)=>{e.loadNamespaces(t,ze(e,n))},Ve=(e,t,n,r)=>{if($(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Be(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,ze(e,r))},He=(e,t,n={})=>!t.languages||!t.languages.length?(Re(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),$=e=>typeof e==`string`,Ue=e=>typeof e==`object`&&!!e,We=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Ge={"&amp;":`&`,"&#38;":`&`,"&lt;":`<`,"&#60;":`<`,"&gt;":`>`,"&#62;":`>`,"&apos;":`'`,"&#39;":`'`,"&quot;":`"`,"&#34;":`"`,"&nbsp;":` `,"&#160;":` `,"&copy;":`©`,"&#169;":`©`,"&reg;":`®`,"&#174;":`®`,"&hellip;":`…`,"&#8230;":`…`,"&#x2F;":`/`,"&#47;":`/`},Ke=e=>Ge[e],qe={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:e=>e.replace(We,Ke),transDefaultProps:void 0},Je=(e={})=>{qe={...qe,...e}},Ye=()=>qe,Xe,Ze=e=>{Xe=e},Qe=()=>Xe,$e={type:`3rdParty`,init(e){Je(e.options.react),Ze(e)}},et=(0,Q.createContext)(),tt=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},nt=r(),rt={t:(e,t)=>{if($(t))return t;if(Ue(t)&&$(t.defaultValue))return t.defaultValue;if(typeof e==`function`)return``;if(Array.isArray(e)){let t=e[e.length-1];return typeof t==`function`?``:t}return e},ready:!1},it=()=>()=>{},at=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:i}=(0,Q.useContext)(et)||{},a=n||r||Qe();a&&!a.reportNamespaces&&(a.reportNamespaces=new tt),a||Re(a,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next`);let o=(0,Q.useMemo)(()=>({...Ye(),...a?.options?.react,...t}),[a,t]),{useSuspense:s,keyPrefix:c}=o,l=e||i||a?.options?.defaultNS,u=$(l)?[l]:l||[`translation`],d=(0,Q.useMemo)(()=>u,u);a?.reportNamespaces?.addUsedNamespaces?.(d);let f=(0,Q.useRef)(0),p=(0,Q.useCallback)(e=>{if(!a)return it;let{bindI18n:t,bindI18nStore:n}=o,r=()=>{f.current+=1,e()};return t&&a.on(t,r),n&&a.store.on(n,r),()=>{t&&t.split(` `).forEach(e=>a.off(e,r)),n&&n.split(` `).forEach(e=>a.store.off(e,r))}},[a,o]),m=(0,Q.useRef)(),h=(0,Q.useCallback)(()=>{if(!a)return rt;let e=!!(a.isInitialized||a.initializedStoreOnce)&&d.every(e=>He(e,a,o)),n=t.lng||a.language,r=f.current,i=m.current;if(i&&i.ready===e&&i.lng===n&&i.keyPrefix===c&&i.revision===r)return i;let s={t:a.getFixedT(n,o.nsMode===`fallback`?d:d[0],c),ready:e,lng:n,keyPrefix:c,revision:r};return m.current=s,s},[a,d,c,o,t.lng]),[g,_]=(0,Q.useState)(0),{t:v,ready:y}=(0,nt.useSyncExternalStore)(p,h,h);(0,Q.useEffect)(()=>{if(a&&!y&&!s){let e=()=>_(e=>e+1);t.lng?Ve(a,t.lng,d,e):Be(a,d,e)}},[a,t.lng,d,y,s,g]);let b=a||{},x=(0,Q.useRef)(null),S=(0,Q.useRef)(),C=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,`__original`))try{Object.defineProperty(n,`__original`,{value:e,writable:!1,enumerable:!1,configurable:!1})}catch{}return n},w=(0,Q.useMemo)(()=>{let e=b,t=e?.language,n=e;e&&(x.current&&x.current.__original===e&&S.current===t?n=x.current:(n=C(e),x.current=n,S.current=t));let r=!y&&!s?(...e)=>(Re(a,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),v(...e)):v,i=[r,n,y];return i.t=r,i.i18n=n,i.ready=y,i},[v,b,y,b.resolvedLanguage,b.language,b.languages]);if(a&&s&&!y)throw new Promise(e=>{let n=()=>e();t.lng?Ve(a,t.lng,d,n):Be(a,d,n)});return w};export{Ne as a,Pe as i,$e as n,Fe as r,at as t};
1
+ import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{S as t,w as n,x as r}from"./charts-vendor-CiBqdKXh.js";import{n as i}from"./motion-vendor-BNFhNARW.js";var a=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},o=(e,t)=>({classGroupId:e,validator:t}),s=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),c=`-`,l=[],u=`arbitrary..`,d=e=>{let t=m(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return p(e);let n=e.split(c);return f(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?a(i,t):t:i||l}return n[e]||l}}},f=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=f(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(c):e.slice(t).join(c),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},p=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?u+r:void 0})(),m=e=>{let{theme:t,classGroups:n}=e;return h(n,t)},h=(e,t)=>{let n=s();for(let r in e){let i=e[r];g(i,n,r,t)}return n},g=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];_(i,t,n,r)}},_=(e,t,n,r)=>{if(typeof e==`string`){v(e,t,n);return}if(typeof e==`function`){y(e,t,n,r);return}b(e,t,n,r)},v=(e,t,n)=>{let r=e===``?t:x(t,e);r.classGroupId=n},y=(e,t,n,r)=>{if(S(e)){g(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(o(n,e))},b=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];g(o,x(t,a),n,r)}},x=(e,t)=>{let n=e,r=t.split(c),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=s(),n.nextPart.set(t,i)),n=i}return n},S=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,C=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},w=`!`,T=`:`,ee=[],te=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),E=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===T){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(w)?(c=s.slice(0,-1),l=!0):s.startsWith(w)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return te(t,l,c,u)};if(t){let e=t+T,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):te(ee,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},ne=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},D=e=>({cache:C(e.cacheSize),parseClassName:E(e),sortModifiers:ne(e),...d(e)}),O=/\s+/,k=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(O),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+w:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},A=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=j(n))&&(i&&(i+=` `),i+=r);return i},j=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=j(e[r]))&&(n&&(n+=` `),n+=t);return n},M=(e,...t)=>{let n,r,i,a,o=o=>(n=D(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=k(e,n);return i(e,a),a};return a=o,(...e)=>a(A(...e))},N=[],P=e=>{let t=t=>t[e]||N;return t.isThemeGetter=!0,t},re=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ie=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ae=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,oe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,F=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,I=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,L=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,se=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,R=e=>ae.test(e),z=e=>!!e&&!Number.isNaN(Number(e)),B=e=>!!e&&Number.isInteger(Number(e)),ce=e=>e.endsWith(`%`)&&z(e.slice(0,-1)),V=e=>oe.test(e),le=()=>!0,H=e=>F.test(e)&&!I.test(e),U=()=>!1,W=e=>L.test(e),G=e=>se.test(e),ue=e=>!K(e)&&!J(e),de=e=>X(e,Ee,U),K=e=>re.test(e),q=e=>X(e,De,H),fe=e=>X(e,Oe,z),pe=e=>X(e,Ae,le),me=e=>X(e,ke,U),he=e=>X(e,we,U),ge=e=>X(e,Te,G),_e=e=>X(e,je,W),J=e=>ie.test(e),Y=e=>Z(e,De),ve=e=>Z(e,ke),ye=e=>Z(e,we),be=e=>Z(e,Ee),xe=e=>Z(e,Te),Se=e=>Z(e,je,!0),Ce=e=>Z(e,Ae,!0),X=(e,t,n)=>{let r=re.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Z=(e,t,n=!1)=>{let r=ie.exec(e);return r?r[1]?t(r[1]):n:!1},we=e=>e===`position`||e===`percentage`,Te=e=>e===`image`||e===`url`,Ee=e=>e===`length`||e===`size`||e===`bg-size`,De=e=>e===`length`,Oe=e=>e===`number`,ke=e=>e===`family-name`,Ae=e=>e===`number`||e===`weight`,je=e=>e===`shadow`,Me=M(()=>{let e=P(`color`),t=P(`font`),n=P(`text`),r=P(`font-weight`),i=P(`tracking`),a=P(`leading`),o=P(`breakpoint`),s=P(`container`),c=P(`spacing`),l=P(`radius`),u=P(`shadow`),d=P(`inset-shadow`),f=P(`text-shadow`),p=P(`drop-shadow`),m=P(`blur`),h=P(`perspective`),g=P(`aspect`),_=P(`ease`),v=P(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),J,K],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[J,K,c],T=()=>[R,`full`,`auto`,...w()],ee=()=>[B,`none`,`subgrid`,J,K],te=()=>[`auto`,{span:[`full`,B,J,K]},B,J,K],E=()=>[B,`auto`,J,K],ne=()=>[`auto`,`min`,`max`,`fr`,J,K],D=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],O=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],k=()=>[`auto`,...w()],A=()=>[R,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],j=()=>[R,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],M=()=>[R,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],N=()=>[e,J,K],re=()=>[...b(),ye,he,{position:[J,K]}],ie=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ae=()=>[`auto`,`cover`,`contain`,be,de,{size:[J,K]}],oe=()=>[ce,Y,q],F=()=>[``,`none`,`full`,l,J,K],I=()=>[``,z,Y,q],L=()=>[`solid`,`dashed`,`dotted`,`double`],se=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],H=()=>[z,ce,ye,he],U=()=>[``,`none`,m,J,K],W=()=>[`none`,z,J,K],G=()=>[`none`,z,J,K],X=()=>[z,J,K],Z=()=>[R,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[V],breakpoint:[V],color:[le],container:[V],"drop-shadow":[V],ease:[`in`,`out`,`in-out`],font:[ue],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[V],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[V],shadow:[V],spacing:[`px`,z],text:[V],"text-shadow":[V],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,R,K,J,g]}],container:[`container`],columns:[{columns:[z,K,J,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[B,`auto`,J,K]}],basis:[{basis:[R,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[z,R,`auto`,`initial`,`none`,K]}],grow:[{grow:[``,z,J,K]}],shrink:[{shrink:[``,z,J,K]}],order:[{order:[B,`first`,`last`,`none`,J,K]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ne()}],"auto-rows":[{"auto-rows":ne()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...D(),`normal`]}],"justify-items":[{"justify-items":[...O(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...O()]}],"align-content":[{content:[`normal`,...D()]}],"align-items":[{items:[...O(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...O(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...O(),`baseline`]}],"place-self":[{"place-self":[`auto`,...O()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mbs:[{mbs:k()}],mbe:[{mbe:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:A()}],"inline-size":[{inline:[`auto`,...j()]}],"min-inline-size":[{"min-inline":[`auto`,...j()]}],"max-inline-size":[{"max-inline":[`none`,...j()]}],"block-size":[{block:[`auto`,...M()]}],"min-block-size":[{"min-block":[`auto`,...M()]}],"max-block-size":[{"max-block":[`none`,...M()]}],w:[{w:[s,`screen`,...A()]}],"min-w":[{"min-w":[s,`screen`,`none`,...A()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...A()]}],h:[{h:[`screen`,`lh`,...A()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...A()]}],"max-h":[{"max-h":[`screen`,`lh`,...A()]}],"font-size":[{text:[`base`,n,Y,q]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Ce,pe]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,ce,K]}],"font-family":[{font:[ve,me,t]}],"font-features":[{"font-features":[K]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,J,K]}],"line-clamp":[{"line-clamp":[z,`none`,J,fe]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,J,K]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,J,K]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...L(),`wavy`]}],"text-decoration-thickness":[{decoration:[z,`from-font`,`auto`,J,q]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[z,`auto`,J,K]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,J,K]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,J,K]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:ie()}],"bg-size":[{bg:ae()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},B,J,K],radial:[``,J,K],conic:[B,J,K]},xe,ge]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-bs":[{"border-bs":I()}],"border-w-be":[{"border-be":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":I()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...L(),`hidden`,`none`]}],"divide-style":[{divide:[...L(),`hidden`,`none`]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-bs":[{"border-bs":N()}],"border-color-be":[{"border-be":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...L(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[z,J,K]}],"outline-w":[{outline:[``,z,Y,q]}],"outline-color":[{outline:N()}],shadow:[{shadow:[``,`none`,u,Se,_e]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":[`none`,d,Se,_e]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:I()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[z,q]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":[`none`,f,Se,_e]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[z,J,K]}],"mix-blend":[{"mix-blend":[...se(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[z]}],"mask-image-linear-from-pos":[{"mask-linear-from":H()}],"mask-image-linear-to-pos":[{"mask-linear-to":H()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":H()}],"mask-image-t-to-pos":[{"mask-t-to":H()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":H()}],"mask-image-r-to-pos":[{"mask-r-to":H()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":H()}],"mask-image-b-to-pos":[{"mask-b-to":H()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":H()}],"mask-image-l-to-pos":[{"mask-l-to":H()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":H()}],"mask-image-x-to-pos":[{"mask-x-to":H()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":H()}],"mask-image-y-to-pos":[{"mask-y-to":H()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[J,K]}],"mask-image-radial-from-pos":[{"mask-radial-from":H()}],"mask-image-radial-to-pos":[{"mask-radial-to":H()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[z]}],"mask-image-conic-from-pos":[{"mask-conic-from":H()}],"mask-image-conic-to-pos":[{"mask-conic-to":H()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:ie()}],"mask-size":[{mask:ae()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,J,K]}],filter:[{filter:[``,`none`,J,K]}],blur:[{blur:U()}],brightness:[{brightness:[z,J,K]}],contrast:[{contrast:[z,J,K]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Se,_e]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:[``,z,J,K]}],"hue-rotate":[{"hue-rotate":[z,J,K]}],invert:[{invert:[``,z,J,K]}],saturate:[{saturate:[z,J,K]}],sepia:[{sepia:[``,z,J,K]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,J,K]}],"backdrop-blur":[{"backdrop-blur":U()}],"backdrop-brightness":[{"backdrop-brightness":[z,J,K]}],"backdrop-contrast":[{"backdrop-contrast":[z,J,K]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,z,J,K]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[z,J,K]}],"backdrop-invert":[{"backdrop-invert":[``,z,J,K]}],"backdrop-opacity":[{"backdrop-opacity":[z,J,K]}],"backdrop-saturate":[{"backdrop-saturate":[z,J,K]}],"backdrop-sepia":[{"backdrop-sepia":[``,z,J,K]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,J,K]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[z,`initial`,J,K]}],ease:[{ease:[`linear`,`initial`,_,J,K]}],delay:[{delay:[z,J,K]}],animate:[{animate:[`none`,v,J,K]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,J,K]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:W()}],"rotate-x":[{"rotate-x":W()}],"rotate-y":[{"rotate-y":W()}],"rotate-z":[{"rotate-z":W()}],scale:[{scale:G()}],"scale-x":[{"scale-x":G()}],"scale-y":[{"scale-y":G()}],"scale-z":[{"scale-z":G()}],"scale-3d":[`scale-3d`],skew:[{skew:X()}],"skew-x":[{"skew-x":X()}],"skew-y":[{"skew-y":X()}],transform:[{transform:[J,K,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:Z()}],"translate-x":[{"translate-x":Z()}],"translate-y":[{"translate-y":Z()}],"translate-z":[{"translate-z":Z()}],"translate-none":[`translate-none`],accent:[{accent:N()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,J,K]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,J,K]}],fill:[{fill:[`none`,...N()]}],"stroke-w":[{stroke:[z,Y,q,fe]}],stroke:[{stroke:[`none`,...N()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function Ne(...e){return Me(t(e))}function Pe(){return!!i()}function Fe(e,t){return e?``:t}var Q=e(n()),Ie=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);$(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},Le={},Re=(e,t,n,r)=>{$(n)&&Le[n]||($(n)&&(Le[n]=new Date),Ie(e,t,n,r))},ze=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},Be=(e,t,n)=>{e.loadNamespaces(t,ze(e,n))},Ve=(e,t,n,r)=>{if($(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Be(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,ze(e,r))},He=(e,t,n={})=>!t.languages||!t.languages.length?(Re(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),$=e=>typeof e==`string`,Ue=e=>typeof e==`object`&&!!e,We=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Ge={"&amp;":`&`,"&#38;":`&`,"&lt;":`<`,"&#60;":`<`,"&gt;":`>`,"&#62;":`>`,"&apos;":`'`,"&#39;":`'`,"&quot;":`"`,"&#34;":`"`,"&nbsp;":` `,"&#160;":` `,"&copy;":`©`,"&#169;":`©`,"&reg;":`®`,"&#174;":`®`,"&hellip;":`…`,"&#8230;":`…`,"&#x2F;":`/`,"&#47;":`/`},Ke=e=>Ge[e],qe={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:e=>e.replace(We,Ke),transDefaultProps:void 0},Je=(e={})=>{qe={...qe,...e}},Ye=()=>qe,Xe,Ze=e=>{Xe=e},Qe=()=>Xe,$e={type:`3rdParty`,init(e){Je(e.options.react),Ze(e)}},et=(0,Q.createContext)(),tt=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},nt=r(),rt={t:(e,t)=>{if($(t))return t;if(Ue(t)&&$(t.defaultValue))return t.defaultValue;if(typeof e==`function`)return``;if(Array.isArray(e)){let t=e[e.length-1];return typeof t==`function`?``:t}return e},ready:!1},it=()=>()=>{},at=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:i}=(0,Q.useContext)(et)||{},a=n||r||Qe();a&&!a.reportNamespaces&&(a.reportNamespaces=new tt),a||Re(a,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next`);let o=(0,Q.useMemo)(()=>({...Ye(),...a?.options?.react,...t}),[a,t]),{useSuspense:s,keyPrefix:c}=o,l=e||i||a?.options?.defaultNS,u=$(l)?[l]:l||[`translation`],d=(0,Q.useMemo)(()=>u,u);a?.reportNamespaces?.addUsedNamespaces?.(d);let f=(0,Q.useRef)(0),p=(0,Q.useCallback)(e=>{if(!a)return it;let{bindI18n:t,bindI18nStore:n}=o,r=()=>{f.current+=1,e()};return t&&a.on(t,r),n&&a.store.on(n,r),()=>{t&&t.split(` `).forEach(e=>a.off(e,r)),n&&n.split(` `).forEach(e=>a.store.off(e,r))}},[a,o]),m=(0,Q.useRef)(),h=(0,Q.useCallback)(()=>{if(!a)return rt;let e=!!(a.isInitialized||a.initializedStoreOnce)&&d.every(e=>He(e,a,o)),n=t.lng||a.language,r=f.current,i=m.current;if(i&&i.ready===e&&i.lng===n&&i.keyPrefix===c&&i.revision===r)return i;let s={t:a.getFixedT(n,o.nsMode===`fallback`?d:d[0],c),ready:e,lng:n,keyPrefix:c,revision:r};return m.current=s,s},[a,d,c,o,t.lng]),[g,_]=(0,Q.useState)(0),{t:v,ready:y}=(0,nt.useSyncExternalStore)(p,h,h);(0,Q.useEffect)(()=>{if(a&&!y&&!s){let e=()=>_(e=>e+1);t.lng?Ve(a,t.lng,d,e):Be(a,d,e)}},[a,t.lng,d,y,s,g]);let b=a||{},x=(0,Q.useRef)(null),S=(0,Q.useRef)(),C=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,`__original`))try{Object.defineProperty(n,`__original`,{value:e,writable:!1,enumerable:!1,configurable:!1})}catch{}return n},w=(0,Q.useMemo)(()=>{let e=b,t=e?.language,n=e;e&&(x.current&&x.current.__original===e&&S.current===t?n=x.current:(n=C(e),x.current=n,S.current=t));let r=!y&&!s?(...e)=>(Re(a,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),v(...e)):v,i=[r,n,y];return i.t=r,i.i18n=n,i.ready=y,i},[v,b,y,b.resolvedLanguage,b.language,b.languages]);if(a&&s&&!y)throw new Promise(e=>{let n=()=>e();t.lng?Ve(a,t.lng,d,n):Be(a,d,n)});return w};export{Ne as a,Pe as i,$e as n,Fe as r,at as t};
package/dist/index.html CHANGED
@@ -8,35 +8,36 @@
8
8
  <link rel="icon" type="image/png" sizes="256x256" href="/favicon.png" />
9
9
  <link rel="shortcut icon" href="/favicon.png" />
10
10
  <link rel="apple-touch-icon" href="/favicon.png" />
11
- <script type="module" crossorigin src="/assets/index-DjMakAzD.js"></script>
11
+ <script type="module" crossorigin src="/assets/index-D6_2fCBR.js"></script>
12
12
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-COnpUsM8.js">
13
13
  <link rel="modulepreload" crossorigin href="/assets/charts-vendor-CiBqdKXh.js">
14
14
  <link rel="modulepreload" crossorigin href="/assets/react-vendor-0R1rd57Z.js">
15
- <link rel="modulepreload" crossorigin href="/assets/motion-vendor-vKc6gXHZ.js">
16
- <link rel="modulepreload" crossorigin href="/assets/ui-vendor-BolBXLiD.js">
17
- <link rel="modulepreload" crossorigin href="/assets/useTranslation-BSl7t2D6.js">
18
- <link rel="modulepreload" crossorigin href="/assets/button-D--hHeVj.js">
19
- <link rel="modulepreload" crossorigin href="/assets/i18n-C88wS2Uy.js">
15
+ <link rel="modulepreload" crossorigin href="/assets/motion-vendor-BNFhNARW.js">
16
+ <link rel="modulepreload" crossorigin href="/assets/ui-vendor-DOI7LsxH.js">
17
+ <link rel="modulepreload" crossorigin href="/assets/useTranslation-JH30oWEP.js">
18
+ <link rel="modulepreload" crossorigin href="/assets/button-olcuyddH.js">
19
+ <link rel="modulepreload" crossorigin href="/assets/i18n-D1WJ4-W9.js">
20
20
  <link rel="modulepreload" crossorigin href="/assets/icons-vendor-CIvT_-Pb.js">
21
21
  <link rel="modulepreload" crossorigin href="/assets/model-utils-BIvGAFGz.js">
22
- <link rel="modulepreload" crossorigin href="/assets/provider-limits-5e1fUwPl.js">
23
- <link rel="modulepreload" crossorigin href="/assets/app-settings-C3i52ycx.js">
24
- <link rel="modulepreload" crossorigin href="/assets/formatters-yKppUXb3.js">
25
- <link rel="modulepreload" crossorigin href="/assets/InfoButton-CTgLGzb9.js">
26
- <link rel="modulepreload" crossorigin href="/assets/card-h-Z9EWBl.js">
27
- <link rel="modulepreload" crossorigin href="/assets/MetricCard-Drluz0b9.js">
28
- <link rel="modulepreload" crossorigin href="/assets/dialog-C0AeNKs8.js">
29
- <link rel="modulepreload" crossorigin href="/assets/ChartCard-CBUnItl-.js">
30
- <link rel="modulepreload" crossorigin href="/assets/ChartLegend-B64cJdDI.js">
31
- <link rel="modulepreload" crossorigin href="/assets/CustomTooltip-CBVU1pyK.js">
32
- <link rel="modulepreload" crossorigin href="/assets/chart-theme-D5iCFDJg.js">
33
- <link rel="modulepreload" crossorigin href="/assets/InfoHeading-oi90uCR7.js">
34
- <link rel="modulepreload" crossorigin href="/assets/formatted-value-rO0EpKbc.js">
35
- <link rel="modulepreload" crossorigin href="/assets/section-header-DbV45zH5.js">
36
- <link rel="modulepreload" crossorigin href="/assets/calculations-GOdNqKo6.js">
37
- <link rel="modulepreload" crossorigin href="/assets/constants-jyhBMReu.js">
38
- <link rel="modulepreload" crossorigin href="/assets/help-content-Bt5KCpWS.js">
39
- <link rel="stylesheet" crossorigin href="/assets/index-DuoM1Ukq.css">
22
+ <link rel="modulepreload" crossorigin href="/assets/provider-limits-BgKrr7k7.js">
23
+ <link rel="modulepreload" crossorigin href="/assets/app-settings-EFIYxqQU.js">
24
+ <link rel="modulepreload" crossorigin href="/assets/card-CskYMXga.js">
25
+ <link rel="modulepreload" crossorigin href="/assets/formatters-BzLLk0br.js">
26
+ <link rel="modulepreload" crossorigin href="/assets/InfoButton-CyA48Vlx.js">
27
+ <link rel="modulepreload" crossorigin href="/assets/MetricCard-CLFpH1l1.js">
28
+ <link rel="modulepreload" crossorigin href="/assets/chart-theme-BdE8bEiN.js">
29
+ <link rel="modulepreload" crossorigin href="/assets/dialog-D4LfH66U.js">
30
+ <link rel="modulepreload" crossorigin href="/assets/ChartCard-CS4Kbe6r.js">
31
+ <link rel="modulepreload" crossorigin href="/assets/ChartLegend-Vzg_GmF-.js">
32
+ <link rel="modulepreload" crossorigin href="/assets/CustomTooltip-CEd8U-a3.js">
33
+ <link rel="modulepreload" crossorigin href="/assets/AnimatedBarFill-Da354-1y.js">
34
+ <link rel="modulepreload" crossorigin href="/assets/InfoHeading-CFbl45C9.js">
35
+ <link rel="modulepreload" crossorigin href="/assets/formatted-value-DuGw8WPX.js">
36
+ <link rel="modulepreload" crossorigin href="/assets/section-header-KpKzq-Qa.js">
37
+ <link rel="modulepreload" crossorigin href="/assets/calculations-BJw_4KdI.js">
38
+ <link rel="modulepreload" crossorigin href="/assets/constants-DOCA3QtR.js">
39
+ <link rel="modulepreload" crossorigin href="/assets/help-content-Cuf5l3_6.js">
40
+ <link rel="stylesheet" crossorigin href="/assets/index-8kk0H-lQ.css">
40
41
  </head>
41
42
  <body>
42
43
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roastcodes/ttdash",
3
- "version": "6.2.1",
3
+ "version": "6.2.2",
4
4
  "description": "Local-first dashboard and CLI for toktrack usage data",
5
5
  "main": "server.js",
6
6
  "repository": {
@@ -239,6 +239,7 @@
239
239
  "vsAverage": "{{direction}}{{value}}% vs. Ø",
240
240
  "vsAverageWithVolatility": "{{direction}}{{value}}% vs. Ø · σ Anf. {{volatility}}",
241
241
  "medianInfo": "Der Median zeigt den typischen Wert und ist weniger anfällig für Ausreisser als der Durchschnitt.",
242
+ "dominantProviderInfo": "Zeigt den Anbieter mit dem grössten Kostenanteil im aktuellen Ausschnitt zusammen mit dessen Gewichtung und Kostenbeitrag.",
242
243
  "requestLeader": "{{model}} · {{requests}} Anfragen",
243
244
  "dominantProviderSubtitle": "{{share}} Anteil · {{cost}}{{requestLeader}}"
244
245
  },
@@ -239,6 +239,7 @@
239
239
  "vsAverage": "{{direction}}{{value}}% vs avg",
240
240
  "vsAverageWithVolatility": "{{direction}}{{value}}% vs avg · σ Req {{volatility}}",
241
241
  "medianInfo": "The median shows the typical value and is less sensitive to outliers than the average.",
242
+ "dominantProviderInfo": "Shows the provider with the largest share of cost in the current slice, together with its relative weight and cost contribution.",
242
243
  "requestLeader": "{{model}} · {{requests}} req",
243
244
  "dominantProviderSubtitle": "{{share}} share · {{cost}}{{requestLeader}}"
244
245
  },
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{w as t}from"./charts-vendor-CiBqdKXh.js";import{a as n}from"./motion-vendor-vKc6gXHZ.js";import{t as r}from"./useTranslation-BSl7t2D6.js";import{g as i,u as a}from"./formatters-yKppUXb3.js";import{t as o}from"./icons-vendor-CIvT_-Pb.js";import{r as s}from"./constants-jyhBMReu.js";import{c}from"./model-utils-BIvGAFGz.js";import{a as l,i as u,n as d,t as f}from"./card-h-Z9EWBl.js";import{t as p}from"./formatted-value-rO0EpKbc.js";import{t as m}from"./help-content-Bt5KCpWS.js";import{t as h}from"./InfoHeading-oi90uCR7.js";var g=e(t()),_=n();function v({data:e,viewMode:t=`daily`}){let{t:n}=r(),{actualCost:v,hypotheticalCost:y,savings:b,savingsPercent:x,dailyAvg:S,heuristicModels:C}=(0,g.useMemo)(()=>{let t=0,n=0,r=new Set;for(let i of e){t+=i.totalCost;for(let e of i.modelBreakdowns){let t=c(e.modelName),i=s[t];if(!i){r.add(t),n+=e.cost+e.cacheReadTokens/1e6*10;continue}let a=e.cacheReadTokens/1e6*i.input,o=e.cacheReadTokens/1e6*i.cacheRead;n+=e.cost-o+a}}let i=n-t,a=n>0?i/n*100:0,o=e.reduce((e,t)=>e+(t._aggregatedDays??1),0),l=o>0?t/o:0;return{actualCost:t,hypotheticalCost:n,savings:i,savingsPercent:a,dailyAvg:l,heuristicModels:Array.from(r).sort()}},[e]);if(e.length===0)return(0,_.jsxs)(f,{children:[(0,_.jsx)(u,{className:`pb-2`,children:(0,_.jsxs)(l,{className:`flex items-center gap-2 text-sm font-medium text-muted-foreground`,children:[(0,_.jsx)(o,{className:`h-4 w-4 text-muted-foreground/30`}),n(`cacheRoi.title`)]})}),(0,_.jsx)(d,{children:(0,_.jsx)(`p`,{className:`py-4 text-center text-sm text-muted-foreground`,children:n(`cacheRoi.noData`)})})]});let w=Math.sign(b),T=w>0,E=Math.max(0,Math.min(100,y>0?v/y*100:100)),D=w<0?`text-rose-700 dark:text-rose-300`:`text-emerald-700 dark:text-emerald-300`,O=`bg-rose-500/60 dark:bg-rose-400/60`,k=`bg-emerald-500/65 dark:bg-emerald-400/60`;return(0,_.jsxs)(f,{children:[(0,_.jsx)(u,{className:`pb-2`,children:(0,_.jsx)(h,{info:m.cacheROI,children:(0,_.jsxs)(l,{className:`flex items-center gap-2 text-sm font-medium text-muted-foreground`,children:[(0,_.jsx)(o,{className:`h-4 w-4 text-yellow-500`}),n(`cacheRoi.title`)]})})}),(0,_.jsxs)(d,{className:`space-y-4`,children:[C.length>0&&(0,_.jsx)(`div`,{className:`rounded-lg border border-amber-500/30 bg-amber-500/12 px-3 py-2 text-xs text-amber-900 dark:text-amber-100`,children:n(`cacheRoi.heuristicFallback`,{count:C.length,modelsLabel:C.length===1?n(`cacheRoi.model`):n(`cacheRoi.models`)})}),(0,_.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 sm:grid-cols-4`,children:[(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:n(`cacheRoi.withoutCache`)}),(0,_.jsx)(`div`,{className:`text-lg font-bold text-rose-700 dark:text-rose-300`,children:(0,_.jsx)(p,{value:y,type:`currency`})})]}),(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:n(`cacheRoi.withCacheActual`)}),(0,_.jsx)(`div`,{className:`text-lg font-bold ${D}`,children:(0,_.jsx)(p,{value:v,type:`currency`})})]}),(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:n(`cacheRoi.savings`)}),(0,_.jsxs)(`div`,{className:`text-lg font-bold ${D}`,children:[(0,_.jsx)(p,{value:b,type:`currency`}),(0,_.jsxs)(`span`,{className:`ml-1 text-xs ${D}`,children:[`(`,a(x),`)`]})]})]}),(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:n(`cacheRoi.avgCostPerUnit`,{unit:i(t)})}),(0,_.jsx)(`div`,{className:`text-lg font-bold text-foreground`,children:(0,_.jsx)(p,{value:S,type:`currency`})})]})]}),(0,_.jsxs)(`div`,{className:`space-y-2`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-2 text-xs`,children:[(0,_.jsx)(`span`,{className:`w-24 text-muted-foreground`,children:n(`cacheRoi.withoutCache`)}),(0,_.jsx)(`div`,{className:`h-6 flex-1 overflow-hidden rounded-md bg-rose-500/12 dark:bg-rose-500/18`,children:(0,_.jsx)(`div`,{className:`h-full rounded-md ${O}`,style:{width:`100%`}})})]}),(0,_.jsxs)(`div`,{className:`flex items-center gap-2 text-xs`,children:[(0,_.jsx)(`span`,{className:`w-24 text-muted-foreground`,children:n(`cacheRoi.withCache`)}),(0,_.jsxs)(`div`,{className:`flex h-6 flex-1 overflow-hidden rounded-md bg-muted/20`,children:[(0,_.jsx)(`div`,{className:`h-full rounded-l-md ${T?k:O} transition-all duration-1000 motion-reduce:transition-none`,style:{width:`${E}%`}}),(0,_.jsx)(`div`,{className:`h-full flex-1 rounded-r-md ${T?`bg-emerald-500/12 dark:bg-emerald-400/16 border-l border-emerald-500/35 dark:border-emerald-400/30 border-dashed`:`bg-muted/10`}`})]})]}),(0,_.jsxs)(`div`,{className:`flex items-center justify-end gap-2 text-[10px] text-muted-foreground`,children:[(0,_.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,_.jsx)(`span`,{className:`h-2 w-2 rounded-sm ${k}`}),` `,n(`cacheRoi.paid`)]}),(0,_.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,_.jsx)(`span`,{className:`h-2 w-2 rounded-sm bg-emerald-500/12 dark:bg-emerald-400/16 border border-emerald-500/35 dark:border-emerald-400/30 border-dashed`}),` `,n(`cacheRoi.saved`)]})]})]})]})]})}export{v as CacheROI};
@@ -1,2 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{w as t}from"./charts-vendor-CiBqdKXh.js";import{a as n,t as r}from"./motion-vendor-vKc6gXHZ.js";import{a as i,i as a,t as o}from"./useTranslation-BSl7t2D6.js";import{n as s}from"./formatters-yKppUXb3.js";import{b as c}from"./icons-vendor-CIvT_-Pb.js";import{a as l,i as u,n as d,r as f,t as p}from"./card-h-Z9EWBl.js";import{a as m,n as h,r as g,t as _}from"./dialog-C0AeNKs8.js";import{t as v}from"./InfoButton-CTgLGzb9.js";var y=e(t());function b(e){let t=``;if(e==null)return`""`;if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`)t=String(e);else try{t=JSON.stringify(e)??``}catch{t=``}return`"${t.replace(/"/g,`""`)}"`}function x(e){return e.map(e=>b(e)).join(`,`)}var S=n();function C(e){if(e.length===0)return``;let t=e[0];if(!t)return``;let n=Object.keys(t);return[x(n),...e.map(e=>x(n.map(t=>e[t])))].join(`
2
- `)}var w=(0,y.createContext)(!1);function T(){return(0,y.useContext)(w)}function E({children:e}){let t=a(),n=T();return(0,S.jsx)(S.Fragment,{children:e(t?!1:n)})}function D({children:e,variant:t=`line`}){return(0,S.jsx)(`div`,{style:{width:`100%`,height:`100%`,overflow:t===`radial`?`visible`:`hidden`,transformOrigin:t===`bar`?`center bottom`:`center center`,paddingTop:t===`radial`?8:0,paddingBottom:t===`radial`?8:0,boxSizing:`border-box`},children:e})}function O({title:e,subtitle:t,summary:n,info:a,expandable:b=!0,children:x,className:T,chartData:E,valueKey:D,valueFormatter:O,expandedExtra:k}){let{t:A}=o(),[j,M]=(0,y.useState)(!1),N=(0,y.useRef)(null),P=r(N,{once:!0,amount:.25})||j,F=(0,y.useMemo)(()=>{if(!E||!D)return null;let e=E.map(e=>e[D]).filter(e=>typeof e==`number`&&!isNaN(e));if(e.length===0)return null;let t=e.reduce((e,t)=>e+t,0);return{min:Math.min(...e),max:Math.max(...e),avg:t/e.length,total:t,count:e.length}},[E,D]),I=O??s,L=e=>typeof x==`function`?x(e):x,R=(0,y.useCallback)(()=>{if(!E||E.length===0)return;let t=C(E);if(!t)return;let n=new Blob([t],{type:`text/csv`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=`${e}.csv`,i.click(),URL.revokeObjectURL(r)},[E,e]),z=(0,S.jsxs)(u,{className:`pb-2`,children:[(0,S.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,S.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,S.jsx)(l,{className:`text-sm font-medium text-muted-foreground`,children:e}),a&&(0,S.jsx)(v,{text:a})]}),(0,S.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:n&&(0,S.jsx)(`span`,{className:`text-sm font-semibold text-foreground`,children:n})})]}),t&&(0,S.jsx)(f,{className:`mt-0.5`,children:t})]});return(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(w.Provider,{value:P,children:(0,S.jsxs)(p,{ref:N,className:i(`group relative`,T),children:[z,(0,S.jsx)(d,{children:L(!1)}),b&&(0,S.jsx)(`button`,{type:`button`,onClick:()=>M(!0),className:`absolute top-3 right-3 z-10 rounded-lg border border-border/50 bg-background/80 p-1.5 text-muted-foreground opacity-100 backdrop-blur-sm transition-opacity duration-200 hover:bg-accent hover:text-foreground focus-visible:opacity-100 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-none motion-reduce:transition-none md:opacity-0 md:group-focus-within:opacity-100 md:group-hover:opacity-100`,title:A(`common.expand`),"aria-label":A(`common.expandWithTitle`,{title:e}),children:(0,S.jsx)(c,{className:`h-3.5 w-3.5`})})]})}),b&&(0,S.jsx)(_,{open:j,onOpenChange:M,children:(0,S.jsxs)(h,{className:`h-[92vh] max-h-[92vh] w-[96vw] max-w-[96vw] overflow-auto p-0 sm:h-[90vh] sm:max-h-[90vh] sm:w-[95vw] sm:max-w-[95vw]`,children:[(0,S.jsx)(m,{className:`sr-only`,children:e}),(0,S.jsx)(g,{className:`sr-only`,children:A(`chartCard.expandedDescription`)}),(0,S.jsx)(w.Provider,{value:j,children:(0,S.jsxs)(`div`,{className:`relative flex h-full flex-col`,children:[(0,S.jsxs)(`div`,{className:`p-4 pb-2 sm:p-6`,children:[(0,S.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`h2`,{className:`text-lg font-semibold`,children:e}),t&&(0,S.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:t})]}),E&&E.length>0&&(0,S.jsx)(`button`,{type:`button`,onClick:R,className:`rounded-lg border border-border px-3 py-1.5 text-xs text-muted-foreground transition-all duration-200 hover:bg-accent hover:text-foreground`,children:A(`chartCard.exportCsv`)})]}),F&&(0,S.jsxs)(`div`,{className:`mt-4 grid grid-cols-2 gap-3 sm:grid-cols-5`,children:[(0,S.jsxs)(`div`,{className:`rounded-lg bg-muted/20 p-2.5 text-center`,children:[(0,S.jsx)(`div`,{className:`text-[10px] tracking-wider text-muted-foreground uppercase`,children:A(`dashboard.stats.min`)}),(0,S.jsx)(`div`,{className:`mt-0.5 font-mono text-sm font-medium`,children:I(F.min)})]}),(0,S.jsxs)(`div`,{className:`rounded-lg bg-muted/20 p-2.5 text-center`,children:[(0,S.jsx)(`div`,{className:`text-[10px] tracking-wider text-muted-foreground uppercase`,children:A(`dashboard.stats.max`)}),(0,S.jsx)(`div`,{className:`mt-0.5 font-mono text-sm font-medium`,children:I(F.max)})]}),(0,S.jsxs)(`div`,{className:`rounded-lg bg-muted/20 p-2.5 text-center`,children:[(0,S.jsx)(`div`,{className:`text-[10px] tracking-wider text-muted-foreground uppercase`,children:A(`dashboard.stats.avg`)}),(0,S.jsx)(`div`,{className:`mt-0.5 font-mono text-sm font-medium`,children:I(F.avg)})]}),(0,S.jsxs)(`div`,{className:`rounded-lg bg-muted/20 p-2.5 text-center`,children:[(0,S.jsx)(`div`,{className:`text-[10px] tracking-wider text-muted-foreground uppercase`,children:A(`dashboard.stats.total`)}),(0,S.jsx)(`div`,{className:`mt-0.5 font-mono text-sm font-medium`,children:I(F.total)})]}),(0,S.jsxs)(`div`,{className:`rounded-lg bg-muted/20 p-2.5 text-center`,children:[(0,S.jsx)(`div`,{className:`text-[10px] tracking-wider text-muted-foreground uppercase`,children:A(`dashboard.stats.dataPoints`)}),(0,S.jsx)(`div`,{className:`mt-0.5 font-mono text-sm font-medium`,children:F.count})]})]})]}),(0,S.jsxs)(`div`,{className:`flex-1 overflow-auto p-4 pt-2 sm:p-6`,children:[L(!0),k]})]})})]})})]})}export{x as i,O as n,D as r,E as t};
@@ -1 +0,0 @@
1
- import{a as e}from"./motion-vendor-vKc6gXHZ.js";var t=e();function n({payload:e}){return e?.length?(0,t.jsx)(`div`,{className:`mt-3 overflow-x-auto pb-1`,children:(0,t.jsx)(`div`,{className:`flex min-w-max items-center gap-3 pr-2`,children:e.map((e,n)=>{let r=typeof e.color==`string`?e.color:`currentColor`,i=String(e.value??``),a=e.id??e.dataKey??`${i}-${r}-${n}`;return(0,t.jsxs)(`div`,{className:`inline-flex items-center gap-2 text-xs`,children:[(0,t.jsx)(`span`,{className:`h-2.5 w-2.5 shrink-0 rounded-full`,style:{backgroundColor:r}}),(0,t.jsx)(`span`,{className:`whitespace-nowrap text-muted-foreground`,children:i})]},String(a))})})}):null}export{n as t};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{b as t,c as n,l as r,m as i,r as a,s as o,u as s,v as c,w as l}from"./charts-vendor-CiBqdKXh.js";import{a as u,t as d}from"./motion-vendor-vKc6gXHZ.js";import{i as f,t as p}from"./useTranslation-BSl7t2D6.js";import{d as m,i as h,l as g,n as _,u as v}from"./formatters-yKppUXb3.js";import{a as y,i as b,n as x,t as S}from"./card-h-Z9EWBl.js";import{t as C}from"./help-content-Bt5KCpWS.js";import{t as w}from"./InfoHeading-oi90uCR7.js";import{n as T,r as E,t as D}from"./chart-theme-D5iCFDJg.js";var O=e(l()),k=u();function A(e,t,n){return e(n===`requestCost`?t>=.6?`charts.correlation.strongRequestCost`:t>=.3?`charts.correlation.mediumRequestCost`:`charts.correlation.weakRequestCost`:t<=-.3?`charts.correlation.negativeCache`:t<.2?`charts.correlation.neutralCache`:`charts.correlation.positiveCache`)}function j(e,t){if(e.length!==t.length||e.length<2)return 0;let n=e.reduce((e,t)=>e+t,0)/e.length,r=t.reduce((e,t)=>e+t,0)/t.length,i=e.reduce((e,i,a)=>{let o=t[a];return o===void 0?e:e+(i-n)*(o-r)},0),a=e.reduce((e,t)=>e+(t-n)**2,0),o=t.reduce((e,t)=>e+(t-r)**2,0);return a===0||o===0?0:i/Math.sqrt(a*o)}function M({active:e,payload:t,mode:n}){let{t:r}=p();if(!e||!t?.length)return null;let i=t[0]?.payload;return i?(0,k.jsxs)(`div`,{className:`max-w-[260px] rounded-lg border border-border/50 bg-popover/90 p-3 text-xs shadow-lg backdrop-blur-xl`,children:[(0,k.jsx)(`p`,{className:`mb-1.5 font-medium text-muted-foreground`,children:h(i.label)}),(0,k.jsx)(`div`,{className:`space-y-1`,children:n===`requestCost`?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,k.jsx)(`span`,{className:`text-muted-foreground`,children:r(`charts.correlation.requestsLabel`)}),(0,k.jsx)(`span`,{className:`font-mono font-medium`,children:i.requests===void 0?`–`:g(i.requests)})]}),(0,k.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,k.jsx)(`span`,{className:`text-muted-foreground`,children:r(`charts.correlation.cost`)}),(0,k.jsx)(`span`,{className:`font-mono font-medium`,children:_(i.y)})]}),(0,k.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,k.jsx)(`span`,{className:`text-muted-foreground`,children:r(`charts.correlation.tokensLabel`)}),(0,k.jsx)(`span`,{className:`font-mono font-medium`,children:i.tokens===void 0?`–`:m(i.tokens)})]})]}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,k.jsx)(`span`,{className:`text-muted-foreground`,children:r(`charts.correlation.cacheRate`)}),(0,k.jsx)(`span`,{className:`font-mono font-medium`,children:i.cacheRate===void 0?`–`:v(i.cacheRate,1)})]}),(0,k.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,k.jsx)(`span`,{className:`text-muted-foreground`,children:r(`charts.correlation.costPerRequest`)}),(0,k.jsx)(`span`,{className:`font-mono font-medium`,children:_(i.y)})]}),(0,k.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,k.jsx)(`span`,{className:`text-muted-foreground`,children:r(`charts.correlation.requestsLabel`)}),(0,k.jsx)(`span`,{className:`font-mono font-medium`,children:i.requests===void 0?`–`:g(i.requests)})]})]})})]}):null}function N({title:e,subtitle:l,mode:u,data:p,color:m,animationBegin:h=0,xAxisName:g,xTickFormatter:v,yAxisName:y,footer:b}){let x=(0,O.useRef)(null),S=d(x,{once:!0,amount:.45}),C=f(),w=C?!0:S,A=w?p:[];return(0,k.jsx)(`div`,{ref:x,children:(0,k.jsxs)(`div`,{children:[(0,k.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-3`,children:[(0,k.jsx)(`div`,{className:`text-[10px] tracking-[0.14em] text-muted-foreground uppercase`,children:e}),(0,k.jsx)(`div`,{className:`text-[10px] text-muted-foreground`,children:l})]}),(0,k.jsx)(t,{width:`100%`,height:260,children:(0,k.jsxs)(a,{margin:E,children:[(0,k.jsx)(i,{strokeDasharray:`3 3`,stroke:T.grid,opacity:.25}),(0,k.jsx)(r,{type:`number`,dataKey:`x`,stroke:T.axis,fontSize:10,tickLine:!1,name:g,...v?{tickFormatter:v}:{}}),(0,k.jsx)(n,{type:`number`,dataKey:`y`,stroke:T.axis,fontSize:10,tickLine:!1,axisLine:!1,name:y,tickFormatter:_}),(0,k.jsx)(o,{type:`number`,dataKey:`z`,range:[30,180]}),(0,k.jsx)(c,{content:(0,k.jsx)(M,{mode:u}),cursor:{strokeDasharray:`4 4`}}),(0,k.jsx)(s,{data:A,fill:m,stroke:m,fillOpacity:.72,isAnimationActive:!C&&w,animationBegin:h,animationDuration:D.duration})]})}),(0,k.jsx)(`div`,{className:`mt-2 text-xs text-muted-foreground`,children:b})]})})}function P({data:e}){let{t}=p(),n=(0,O.useMemo)(()=>e.map(e=>({x:e.requestCount,y:e.totalCost,z:Math.max(5,Math.sqrt(e.totalTokens/1e3)),label:e.date,tokens:e.totalTokens,requests:e.requestCount})),[e]),r=(0,O.useMemo)(()=>e.filter(e=>e.requestCount>0&&e.totalTokens>0).map(e=>{let t=e.cacheReadTokens/e.totalTokens*100;return{x:t,y:e.totalCost/e.requestCount,z:Math.max(5,Math.sqrt(e.requestCount)),label:e.date,cacheRate:t,requests:e.requestCount}}),[e]),i=j(n.map(e=>e.x),n.map(e=>e.y)),a=j(r.map(e=>e.x),r.map(e=>e.y));return e.length<2?(0,k.jsxs)(S,{children:[(0,k.jsx)(b,{children:(0,k.jsx)(w,{info:C.correlationAnalysis,children:(0,k.jsx)(y,{className:`text-sm font-medium text-muted-foreground`,children:t(`charts.correlation.title`)})})}),(0,k.jsx)(x,{children:(0,k.jsx)(`div`,{className:`rounded-xl border border-dashed border-border/60 bg-muted/10 px-4 py-6 text-sm text-muted-foreground`,children:t(`charts.correlation.requiresData`)})})]}):(0,k.jsxs)(S,{children:[(0,k.jsx)(b,{children:(0,k.jsx)(w,{info:C.correlationAnalysis,children:(0,k.jsx)(y,{className:`text-sm font-medium text-muted-foreground`,children:t(`charts.correlation.title`)})})}),(0,k.jsxs)(x,{className:`grid grid-cols-1 gap-4 xl:grid-cols-2`,children:[(0,k.jsx)(N,{title:t(`charts.correlation.requestsVsCost`),subtitle:`r ${i.toFixed(2)} · ${t(`charts.correlation.points`,{count:n.length})}`,mode:`requestCost`,data:n,color:T.cost,xAxisName:t(`charts.correlation.requestsAxis`),yAxisName:t(`charts.correlation.cost`),footer:A(t,i,`requestCost`)}),(0,k.jsx)(N,{title:t(`charts.correlation.cacheVsCostPerRequest`),subtitle:`r ${a.toFixed(2)} · ${t(`charts.correlation.points`,{count:r.length})}`,mode:`cacheEfficiency`,data:r,color:T.cumulative,animationBegin:D.stagger,xAxisName:t(`charts.correlation.cacheRate`),xTickFormatter:e=>v(e,0),yAxisName:t(`charts.correlation.costPerRequestAxis`),footer:A(t,a,`cacheEfficiency`)})]})]})}export{P as CorrelationAnalysis};
@@ -1 +0,0 @@
1
- import{b as e,c as t,l as n,m as r,o as i,p as a,v as o,y as s}from"./charts-vendor-CiBqdKXh.js";import{a as c}from"./motion-vendor-vKc6gXHZ.js";import{t as l}from"./useTranslation-BSl7t2D6.js";import{a as u,n as d,t as f}from"./formatters-yKppUXb3.js";import{t as p}from"./model-utils-BIvGAFGz.js";import{t as m}from"./help-content-Bt5KCpWS.js";import{n as h,r as g,t as _}from"./ChartCard-CBUnItl-.js";import{t as v}from"./ChartLegend-B64cJdDI.js";import{t as y}from"./CustomTooltip-CBVU1pyK.js";import{n as b,r as x,t as S}from"./chart-theme-D5iCFDJg.js";var C=c();function w({data:c,models:w}){let{t:T}=l(),E=w.map(e=>({model:e,total:c.reduce((t,n)=>t+(f(n[e])??0),0)})).sort((e,t)=>t.total-e.total)[0]??null,D=(0,C.jsx)(_,{children:l=>(0,C.jsxs)(`div`,{className:`mt-6`,children:[(0,C.jsx)(`div`,{className:`mb-2 text-[10px] tracking-wider text-muted-foreground uppercase`,children:T(`charts.costByModelOverTime.movingAverageHeading`)}),(0,C.jsx)(g,{variant:`line`,children:(0,C.jsx)(e,{width:`100%`,height:350,children:(0,C.jsxs)(i,{data:c,margin:x,children:[(0,C.jsx)(r,{strokeDasharray:`3 3`,stroke:b.grid,opacity:.3}),(0,C.jsx)(n,{dataKey:`date`,tickFormatter:u,stroke:b.axis,fontSize:11,tickLine:!1}),(0,C.jsx)(t,{tickFormatter:e=>{let t=f(e);return t===null?``:d(t)},stroke:b.axis,fontSize:11,tickLine:!1,axisLine:!1}),(0,C.jsx)(o,{content:(0,C.jsx)(y,{formatter:e=>d(e)}),cursor:{stroke:`hsl(var(--muted))`,strokeWidth:1}}),(0,C.jsx)(s,{content:(0,C.jsx)(v,{})}),w.map((e,t)=>(0,C.jsx)(a,{type:`monotone`,dataKey:`${e}_ma7`,stroke:p(e),name:`${e} ${T(`charts.costByModelOverTime.movingAverageSuffix`)}`,dot:!1,strokeWidth:2,strokeDasharray:`5 4`,connectNulls:!0,isAnimationActive:l,animationBegin:S.stagger*(t%5),animationDuration:S.slowDuration},`${e}_ma7`))]})})})]})});return(0,C.jsx)(h,{title:T(`charts.costByModelOverTime.title`),subtitle:E?T(`charts.costByModelOverTime.topDriver`,{model:E.model,total:d(E.total)}):T(`charts.costByModelOverTime.subtitle`),info:m.costByModelOverTime,className:`lg:col-span-2`,chartData:c,valueKey:`cost`,valueFormatter:d,expandedExtra:D,children:(0,C.jsx)(_,{children:l=>(0,C.jsx)(g,{variant:`line`,children:(0,C.jsx)(e,{width:`100%`,height:300,children:(0,C.jsxs)(i,{data:c,margin:x,children:[(0,C.jsx)(r,{strokeDasharray:`3 3`,stroke:b.grid,opacity:.3}),(0,C.jsx)(n,{dataKey:`date`,tickFormatter:u,stroke:b.axis,fontSize:11,tickLine:!1}),(0,C.jsx)(t,{tickFormatter:e=>{let t=f(e);return t===null?``:d(t)},stroke:b.axis,fontSize:11,tickLine:!1,axisLine:!1}),(0,C.jsx)(o,{content:(0,C.jsx)(y,{formatter:e=>d(e)}),cursor:{stroke:`hsl(var(--muted))`,strokeWidth:1}}),(0,C.jsx)(s,{content:(0,C.jsx)(v,{})}),w.map((e,t)=>(0,C.jsx)(a,{type:`monotone`,dataKey:e,stroke:p(e),name:e,dot:!1,strokeWidth:1.5,isAnimationActive:l,animationBegin:S.stagger*(t%5),animationDuration:S.duration,animationEasing:S.easing},e))]})})})})})}export{w as CostByModelOverTime};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{b as t,c as n,f as r,l as i,m as a,p as o,t as s,v as c,w as l,y as u}from"./charts-vendor-CiBqdKXh.js";import{a as d}from"./motion-vendor-vKc6gXHZ.js";import{t as f}from"./useTranslation-BSl7t2D6.js";import{a as p,n as m,t as h}from"./formatters-yKppUXb3.js";import{a as g}from"./icons-vendor-CIvT_-Pb.js";import{t as _}from"./MetricCard-Drluz0b9.js";import{t as v}from"./formatted-value-rO0EpKbc.js";import{t as y}from"./help-content-Bt5KCpWS.js";import{n as b,r as x,t as S}from"./ChartCard-CBUnItl-.js";import{t as C}from"./ChartLegend-B64cJdDI.js";import{t as w}from"./CustomTooltip-CBVU1pyK.js";import{n as T,r as E,t as D}from"./chart-theme-D5iCFDJg.js";import{r as O}from"./calculations-GOdNqKo6.js";var k=e(l()),A=d();function j({data:e,viewMode:l=`daily`}){let{t:d}=f(),{chartData:j,forecastTotal:M,currentMonthTotal:N,dailyAvgTrend:P,projectedDailyBurn:F,remainingDays:I,confidence:L,confidenceColor:R}=(0,k.useMemo)(()=>{let t=O(e);if(!t)return{chartData:[],forecastTotal:0,currentMonthTotal:0,dailyAvgTrend:null,projectedDailyBurn:0,remainingDays:0,confidence:`low`,confidenceColor:`text-red-400 bg-red-400/10`};let{currentMonth:n,currentMonthTotal:r,remainingDays:i,projectedDailyBurn:a,volatility:o,lowerDaily:s,upperDaily:c,forecastTotal:l,dailyAvgTrend:u,confidence:d,elapsedCalendarSeries:f,daysInMonth:p}=t,m=d===`high`?`text-green-400 bg-green-400/10`:d===`medium`?`text-yellow-400 bg-yellow-400/10`:`text-red-400 bg-red-400/10`,h=[];for(let e of f)h.push({date:e.date,cost:e.cost});let g=f[f.length-1]?.cost??0;if(h.length>0){let e=h[h.length-1];e&&(e.forecast=g,e.lower=Math.max(0,g-o),e.upper=g+o,e.band=(e.upper??0)-(e.lower??0))}for(let e=f.length+1;e<=p;e++){let t=`${n}-${String(e).padStart(2,`0`)}`;h.push({date:t,forecast:a,lower:s,upper:c,band:c-s})}return{chartData:h,forecastTotal:l,currentMonthTotal:r,dailyAvgTrend:u,projectedDailyBurn:a,remainingDays:i,confidence:d,confidenceColor:m}},[e]);if(l!==`daily`){let t=[...e].sort((e,t)=>e.date.localeCompare(t.date)).reduce((e,t)=>e+t.totalCost,0),n=e.length>0?t/e.length:0;return e.length===0?(0,A.jsx)(`div`,{className:`space-y-4`,children:(0,A.jsxs)(`div`,{className:`flex flex-col items-center justify-center rounded-xl border border-border/50 bg-card/80 p-6 text-center`,children:[(0,A.jsx)(g,{className:`mb-3 h-8 w-8 text-muted-foreground/20`}),(0,A.jsx)(`p`,{className:`text-sm font-medium text-muted-foreground`,children:d(`forecast.noData`)})]})}):(0,A.jsx)(`div`,{className:`space-y-4`,children:(0,A.jsx)(_,{label:d(l===`monthly`?`forecast.avgMonthlyCost`:`forecast.avgYearlyCost`),value:(0,A.jsx)(v,{value:n,type:`currency`}),subtitle:d(`forecast.totalOverPeriods`,{total:m(t),count:e.length,unit:d(l===`monthly`?`periods.months`:`periods.years`)}),icon:(0,A.jsx)(g,{className:`h-4 w-4`})})})}return j.length===0?(0,A.jsx)(`div`,{className:`space-y-4`,children:(0,A.jsxs)(`div`,{className:`flex flex-col items-center justify-center rounded-xl border border-border/50 bg-card/80 p-6 text-center`,children:[(0,A.jsx)(g,{className:`mb-3 h-8 w-8 text-muted-foreground/20`}),(0,A.jsx)(`p`,{className:`text-sm font-medium text-muted-foreground`,children:d(`forecast.noForecast`)}),(0,A.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground/60`,children:d(`forecast.requiresTwoDays`)})]})}):(0,A.jsxs)(`div`,{className:`space-y-4`,children:[(0,A.jsx)(_,{label:(0,A.jsxs)(`span`,{className:`flex items-center gap-2`,children:[d(`forecast.monthEndForecast`),` `,(0,A.jsx)(`span`,{className:`rounded px-1.5 py-0.5 text-[9px] font-semibold tracking-wider uppercase ${R}`,children:d(`forecast.${L}`)})]}),value:(0,A.jsx)(v,{value:M,type:`currency`}),subtitle:`${d(`forecast.soFar`,{value:m(N)})} · ${d(`forecast.remainingDays`,{count:I})}${P?` · ${d(`forecast.projectedPerDay`,{value:m(F)})}`:``}`,icon:(0,A.jsx)(g,{className:`h-4 w-4`}),trend:P&&P.change!==0?{value:P.change,label:d(`forecast.vsLastWeek`)}:null}),(0,A.jsx)(b,{title:d(`forecast.chartTitle`),subtitle:d(`forecast.chartSubtitle`),summary:(0,A.jsx)(v,{value:M,type:`currency`}),info:y.forecast,chartData:j,valueKey:`cost`,valueFormatter:m,children:(0,A.jsx)(S,{children:e=>(0,A.jsx)(x,{variant:`line`,children:(0,A.jsx)(t,{width:`100%`,height:250,children:(0,A.jsxs)(s,{data:j,margin:E,children:[(0,A.jsx)(`defs`,{children:(0,A.jsxs)(`linearGradient`,{id:`forecast-cost-grad`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,A.jsx)(`stop`,{offset:`0%`,stopColor:T.cost,stopOpacity:.3}),(0,A.jsx)(`stop`,{offset:`100%`,stopColor:T.cost,stopOpacity:0})]})}),(0,A.jsx)(a,{strokeDasharray:`3 3`,stroke:T.grid}),(0,A.jsx)(i,{dataKey:`date`,tickFormatter:p,stroke:T.axis,fontSize:11,tickLine:!1}),(0,A.jsx)(n,{tickFormatter:e=>{let t=h(e);return t===null?``:m(t)},stroke:T.axis,fontSize:11,tickLine:!1,axisLine:!1}),(0,A.jsx)(c,{content:(0,A.jsx)(w,{formatter:e=>m(e)})}),(0,A.jsx)(u,{content:(0,A.jsx)(C,{})}),(0,A.jsx)(r,{type:`monotone`,dataKey:`lower`,stackId:`forecast-band`,stroke:`none`,fill:`transparent`,name:d(`forecast.lowerBound`)}),(0,A.jsx)(r,{type:`monotone`,dataKey:`band`,stackId:`forecast-band`,stroke:`none`,fill:T.cumulative,fillOpacity:.12,name:d(`forecast.uncertaintyBand`),isAnimationActive:e,animationBegin:D.stagger,animationDuration:D.duration}),(0,A.jsx)(r,{type:`monotone`,dataKey:`cost`,stroke:T.cost,fill:`url(#forecast-cost-grad)`,name:d(`forecast.actualCost`),strokeWidth:2,dot:!1,connectNulls:!0,isAnimationActive:e,animationBegin:0,animationDuration:D.duration,animationEasing:D.easing}),(0,A.jsx)(o,{type:`monotone`,dataKey:`forecast`,stroke:T.cumulative,name:d(`forecast.projection`),dot:!1,strokeWidth:2,strokeDasharray:`6 3`,connectNulls:!0,isAnimationActive:e,animationBegin:D.stagger*2,animationDuration:D.slowDuration})]})})})})})]})}export{j as CostForecast};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{b as t,c as n,f as r,l as i,m as a,p as o,t as s,v as c,w as l}from"./charts-vendor-CiBqdKXh.js";import{a as u}from"./motion-vendor-vKc6gXHZ.js";import{t as d}from"./useTranslation-BSl7t2D6.js";import{a as f,n as p,t as m}from"./formatters-yKppUXb3.js";import{t as h}from"./help-content-Bt5KCpWS.js";import{n as g,r as _,t as v}from"./ChartCard-CBUnItl-.js";import{t as y}from"./CustomTooltip-CBVU1pyK.js";import{n as b,r as x,t as S}from"./chart-theme-D5iCFDJg.js";import{r as C}from"./calculations-GOdNqKo6.js";var w=e(l()),T=u();function E({data:e,rawData:l}){let{t:u}=d(),E=(0,w.useId)().replace(/:/g,``),D=(0,w.useMemo)(()=>{if(e.length<3)return e;let t=e[e.length-1];if(!t?.date||!t.cumulative)return e;let n=C(l);if(!n)return e;let{currentMonth:r,daysInMonth:i,projectedDailyBurn:a}=n,o=n.elapsedDays;if(o>=i)return e;let s=t.cumulative+a*(i-o),c=`${r}-${String(i).padStart(2,`0`)}`;return[...e.map(e=>({...e,projected:void 0})),{...e[e.length-1],projected:t.cumulative},{date:c,cumulative:void 0,projected:s,cost:0,ma7:0}]},[e,l]),O=e[e.length-1]?.cumulative??0;return(0,T.jsx)(g,{title:u(`charts.cumulativeCost.title`),subtitle:u(`charts.cumulativeCost.total`,{value:p(O)}),info:h.cumulativeCost,chartData:e,valueKey:`cumulative`,valueFormatter:p,children:(0,T.jsx)(v,{children:e=>(0,T.jsx)(_,{variant:`line`,children:(0,T.jsx)(t,{width:`100%`,height:300,children:(0,T.jsxs)(s,{data:D,margin:x,children:[(0,T.jsx)(`defs`,{children:(0,T.jsxs)(`linearGradient`,{id:`${E}-cumulGrad`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,T.jsx)(`stop`,{offset:`0%`,stopColor:b.cumulative,stopOpacity:.4}),(0,T.jsx)(`stop`,{offset:`60%`,stopColor:b.cumulative,stopOpacity:.1}),(0,T.jsx)(`stop`,{offset:`100%`,stopColor:b.cumulative,stopOpacity:0})]})}),(0,T.jsx)(a,{strokeDasharray:`3 3`,stroke:b.grid,opacity:.3}),(0,T.jsx)(i,{dataKey:`date`,tickFormatter:f,stroke:b.axis,fontSize:11,tickLine:!1}),(0,T.jsx)(n,{tickFormatter:e=>{let t=m(e);return t===null?``:p(t)},stroke:b.axis,fontSize:11,tickLine:!1,axisLine:!1}),(0,T.jsx)(c,{content:(0,T.jsx)(y,{formatter:e=>p(e)}),cursor:{fill:`hsl(var(--muted))`,opacity:.15}}),(0,T.jsx)(r,{type:`monotone`,dataKey:`cumulative`,stroke:b.cumulative,fill:`url(#${E}-cumulGrad)`,name:u(`charts.cumulativeCost.cumulative`),strokeWidth:2,activeDot:{r:5,strokeWidth:2,stroke:b.cumulative,fill:`hsl(var(--background))`},dot:!1,isAnimationActive:e,animationBegin:0,animationDuration:S.duration,animationEasing:S.easing,connectNulls:!1}),(0,T.jsx)(o,{type:`monotone`,dataKey:`projected`,stroke:b.cumulative,strokeWidth:2,strokeDasharray:`5 5`,dot:!1,name:u(`charts.cumulativeCost.projection`),connectNulls:!0,isAnimationActive:e,animationBegin:S.stagger,animationDuration:S.slowDuration})]})})})})})}export{E as CumulativeCost};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{_ as t,a as n,b as r,c as i,d as a,l as o,m as s,v as c,w as l}from"./charts-vendor-CiBqdKXh.js";import{a as u}from"./motion-vendor-vKc6gXHZ.js";import{i as d,t as f}from"./useTranslation-BSl7t2D6.js";import{d as p,h as m,l as h,n as g}from"./formatters-yKppUXb3.js";import{a as _,i as v,n as y,t as b}from"./card-h-Z9EWBl.js";import{t as x}from"./help-content-Bt5KCpWS.js";import{t as S}from"./InfoHeading-oi90uCR7.js";import{n as C,r as w,t as T}from"./chart-theme-D5iCFDJg.js";var E=e(l()),D=u();function O(e,t){if(e.length===0)return[];let n=Math.min(...e),r=Math.max(...e),i=Math.min(8,Math.max(4,Math.ceil(Math.sqrt(e.length)))),a=(r-n||1)/i,o=Array.from({length:i},(e,o)=>{let s=n+a*o,c=o===i-1?r:s+a;return{label:`${t(s)}–${t(c)}`,rangeStart:s,rangeEnd:c,count:0}});for(let t of e){let e=o[Math.min(i-1,Math.floor((t-n)/a))];e&&(e.count+=1)}return o}function k({active:e,payload:t}){let{t:n}=f();if(!e||!t?.length)return null;let r=t[0];return r?(0,D.jsxs)(`div`,{className:`max-w-[280px] rounded-lg border border-border/50 bg-popover/90 p-3 text-xs shadow-lg backdrop-blur-xl`,children:[(0,D.jsx)(`p`,{className:`mb-1.5 font-medium text-muted-foreground`,children:r.payload.label}),(0,D.jsxs)(`div`,{className:`space-y-1`,children:[(0,D.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,D.jsx)(`span`,{className:`text-muted-foreground`,children:n(`charts.distribution.interval`)}),(0,D.jsx)(`span`,{className:`font-mono font-medium`,children:r.payload.label})]}),(0,D.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,D.jsx)(`span`,{className:`text-muted-foreground`,children:n(`charts.distribution.dataPoints`)}),(0,D.jsx)(`span`,{className:`font-mono font-medium`,children:h(r.value)})]})]})]}):null}function A({data:e,viewMode:l=`daily`}){let{t:u}=f(),A=(0,E.useId)().replace(/:/g,``),j=d(),M=(0,E.useMemo)(()=>{if(e.length<2)return[];let t=e.map(e=>e.totalCost),n=e.map(e=>e.requestCount),r=e.map(e=>e.requestCount>0?e.totalTokens/e.requestCount:0);return[{title:u(`charts.distribution.costPerPeriod`,{period:m(l)}),data:O(t,g)},{title:u(`charts.distribution.requestsPerPeriod`,{period:m(l)}),data:O(n,h)},{title:u(`charts.distribution.tokensPerRequest`),data:O(r,p)}]},[e,l,u]);return e.length<2?(0,D.jsxs)(b,{children:[(0,D.jsx)(v,{children:(0,D.jsx)(S,{info:x.distributionAnalysis,children:(0,D.jsx)(_,{className:`text-sm font-medium text-muted-foreground`,children:u(`charts.distribution.title`)})})}),(0,D.jsx)(y,{children:(0,D.jsx)(`div`,{className:`rounded-xl border border-dashed border-border/60 bg-muted/10 px-4 py-6 text-sm text-muted-foreground`,children:u(`charts.distribution.requiresData`)})})]}):(0,D.jsxs)(b,{children:[(0,D.jsx)(v,{children:(0,D.jsx)(S,{info:x.distributionAnalysis,children:(0,D.jsx)(_,{className:`text-sm font-medium text-muted-foreground`,children:u(`charts.distribution.title`)})})}),(0,D.jsx)(y,{className:`space-y-5`,children:M.map((e,l)=>(0,D.jsx)(`div`,{children:(0,D.jsxs)(`div`,{children:[(0,D.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-3`,children:[(0,D.jsx)(`div`,{className:`text-[10px] tracking-[0.14em] text-muted-foreground uppercase`,children:e.title}),(0,D.jsxs)(`div`,{className:`text-[10px] text-muted-foreground`,children:[e.data.length,` `,u(`charts.distribution.buckets`)]})]}),(0,D.jsx)(r,{width:`100%`,height:160,children:(0,D.jsxs)(n,{data:e.data,margin:w,children:[(0,D.jsx)(`defs`,{children:(0,D.jsxs)(`linearGradient`,{id:`${A}-distribution-${l}`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,D.jsx)(`stop`,{offset:`0%`,stopColor:C.cost,stopOpacity:.9}),(0,D.jsx)(`stop`,{offset:`100%`,stopColor:C.cost,stopOpacity:.4})]})}),(0,D.jsx)(s,{strokeDasharray:`3 3`,stroke:C.grid,opacity:.25}),(0,D.jsx)(o,{dataKey:`label`,stroke:C.axis,fontSize:10,tickLine:!1,interval:0,angle:e.data.length>5?-16:0,textAnchor:e.data.length>5?`end`:`middle`,height:e.data.length>5?48:30}),(0,D.jsx)(i,{stroke:C.axis,fontSize:10,tickLine:!1,axisLine:!1,allowDecimals:!1}),(0,D.jsx)(c,{content:(0,D.jsx)(k,{}),cursor:{fill:`hsl(var(--muted))`,opacity:.15}}),(0,D.jsx)(a,{dataKey:`count`,radius:[6,6,0,0],fill:`url(#${A}-distribution-${l})`,isAnimationActive:!j,animationBegin:T.stagger*l,animationDuration:T.duration,children:e.data.map((n,r)=>(0,D.jsx)(t,{fill:`hsla(215, 70%, 55%, ${(.45+(e.data.length>1?r/(e.data.length-1):0)*.35).toFixed(2)})`},`${e.title}-${r}`))})]})})]})},e.title))})]})}export{A as DistributionAnalysis};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{_ as t,b as n,g as r,i,v as ee,w as a}from"./charts-vendor-CiBqdKXh.js";import{a as o}from"./motion-vendor-vKc6gXHZ.js";import{a as s,t as te}from"./useTranslation-BSl7t2D6.js";import{d as c,i as ne,l,n as u,u as d}from"./formatters-yKppUXb3.js";import{U as re,W as ie}from"./icons-vendor-CIvT_-Pb.js";import{t as f}from"./button-D--hHeVj.js";import{c as ae,i as p,r as oe,t as m}from"./model-utils-BIvGAFGz.js";import{a as se,i as ce,n as le,r as ue,t as de}from"./dialog-C0AeNKs8.js";import{t as h}from"./formatted-value-rO0EpKbc.js";import{t as fe}from"./CustomTooltip-CBVU1pyK.js";var g=e(a()),_=o();function pe(e){return/^\d{4}$/.test(e)?`year`:/^\d{4}-\d{2}$/.test(e)?`month`:`day`}function v(e){return e.cacheReadTokens+e.cacheCreationTokens+e.inputTokens+e.outputTokens+e.thinkingTokens}function y(e,t){return t>0?e/(t/1e6):null}function b(e,t){return t>0?e/t:null}function x(e,t){if(t===null)return null;let n=e-t;return{absolute:n,percent:t===0?null:n/t*100}}function S(e,t,n=`–`){return e?e.absolute===0?`→ ${t(0)}`:`${e.absolute>0?`↑`:`↓`} ${t(Math.abs(e.absolute))}`:n}function C(e,t=`–`){return!e||e.percent===null?t:e.percent===0?`0.0%`:`${e.percent>0?`+`:``}${e.percent.toFixed(1)}%`}function me(e){if(!(e instanceof HTMLElement))return!1;let t=e.tagName;return e.isContentEditable||t===`INPUT`||t===`TEXTAREA`||t===`SELECT`}function he(e,t){return`${e}${t}`}function w({day:e,contextData:a=[],open:o,hasPrevious:w,hasNext:ge,currentIndex:_e,totalCount:ve,onPrevious:T,onNext:E,onClose:ye}){let{t:D}=te(),O=e?pe(e.date):`day`,k=(0,g.useMemo)(()=>[...a].sort((e,t)=>e.date.localeCompare(t.date)),[a]),A=(0,g.useMemo)(()=>e?k.findIndex(t=>t.date===e.date):-1,[e,k]),j=A>0?k[A-1]:null,M=A>0?k.slice(Math.max(0,A-7),A):[],N=w??A>0,P=ge??(A>=0&&A<k.length-1),be=_e??(A>=0?A+1:0),xe=ve??k.length,F=e?v(e):0,I=F>0,L=(0,g.useMemo)(()=>{if(!e)return[];let t=new Map;for(let n of e.modelBreakdowns){let e=ae(n.modelName),r=oe(n.modelName),i=t.get(e)??{provider:r,cost:0,tokens:0,input:0,output:0,cacheRead:0,cacheCreate:0,thinking:0,requests:0};i.cost+=n.cost,i.tokens+=n.inputTokens+n.outputTokens+n.cacheCreationTokens+n.cacheReadTokens+n.thinkingTokens,i.input+=n.inputTokens,i.output+=n.outputTokens,i.cacheRead+=n.cacheReadTokens,i.cacheCreate+=n.cacheCreationTokens,i.thinking+=n.thinkingTokens,i.requests+=n.requestCount,t.set(e,i)}return Array.from(t.entries()).map(([t,n])=>({name:t,...n,costShare:e.totalCost>0?n.cost/e.totalCost*100:0,tokenShare:F>0?n.tokens/F*100:0,costPerMillion:y(n.cost,n.tokens),costPerRequest:b(n.cost,n.requests),tokensPerRequest:b(n.tokens,n.requests)})).sort((e,t)=>t.cost-e.cost)},[e,F]),R=(0,g.useMemo)(()=>{let t=new Map;for(let e of L){let n=t.get(e.provider)??{cost:0,tokens:0,requests:0,activeModels:new Set};n.cost+=e.cost,n.tokens+=e.tokens,n.requests+=e.requests,n.activeModels.add(e.name),t.set(e.provider,n)}return Array.from(t.entries()).map(([t,n])=>({provider:t,cost:n.cost,tokens:n.tokens,requests:n.requests,activeModels:n.activeModels.size,costShare:e&&e.totalCost>0?n.cost/e.totalCost*100:0})).sort((e,t)=>t.cost-e.cost)},[e,L]);if(!e)return null;let z=L.map(e=>({name:e.name,value:e.cost})),Se=I?e.cacheReadTokens/F*100:0,B=b(F,e.requestCount),V=b(e.totalCost,e.requestCount),H=y(e.totalCost,F),U=e.requestCount>0||e.modelBreakdowns.some(e=>e.requestCount>0)||a.some(e=>e.requestCount>0),Ce=[...a].sort((e,t)=>t.totalCost-e.totalCost).findIndex(t=>t.date===e.date)+1,we=U?[...a].sort((e,t)=>t.requestCount-e.requestCount).findIndex(t=>t.date===e.date)+1:0,W=M.length>0?M.reduce((e,t)=>e+t.totalCost,0)/M.length:null,G=M.length>0?M.reduce((e,t)=>e+t.requestCount,0)/M.length:null,K=M.length>0?M.reduce((e,t)=>e+v(t),0)/M.length:null,q=M.length>0?y(M.reduce((e,t)=>e+t.totalCost,0),M.reduce((e,t)=>e+v(t),0)):null,J=he(M.length>0?M.length:7,D(`drillDown.windowUnit.${O}`)),Te=j?v(j):null,Y=j?y(j.totalCost,v(j)):null,X=L[0]??null,Z=U?L.reduce((e,t)=>!e||t.requests>e.requests?t:e,null):null,Q=L.reduce((e,t)=>!e||t.tokens>e.tokens?t:e,null),$=L.reduce((e,t)=>t.costPerMillion===null?e:!e||e.costPerMillion===null||t.costPerMillion>e.costPerMillion?t:e,null),Ee=e.totalCost>0?L.slice(0,3).reduce((e,t)=>e+t.cost,0)/e.totalCost*100:0,De=[{label:D(`common.tokens`),value:(0,_.jsx)(h,{value:F,type:`tokens`})},{label:`$/1M`,value:H===null?`–`:(0,_.jsx)(h,{value:H,type:`currency`})},{label:D(`common.requests`),value:(0,_.jsx)(h,{value:e.requestCount,type:`number`})},{label:D(`common.models`),value:l(L.length)},{label:D(`drillDown.activeProviders`),value:l(R.length)},{label:D(`drillDown.tokensPerRequest`),value:B===null?`–`:(0,_.jsx)(h,{value:B,type:`tokens`})},{label:D(`drillDown.costPerRequest`),value:V===null?`–`:(0,_.jsx)(h,{value:V,type:`currency`})},{label:D(`drillDown.cacheRate`),value:(0,_.jsx)(h,{value:Se,type:`percent`})},{label:D(`common.thinking`),value:(0,_.jsx)(h,{value:e.thinkingTokens,type:`tokens`})},{label:D(`drillDown.costRank`),value:Ce>0?`#${Ce}`:`–`},{label:D(`drillDown.requestRank`),value:we>0?`#${we}`:`–`},{label:D(`drillDown.coverage`),value:(e._aggregatedDays??1)>1?D(`drillDown.coverageDays`,{count:e._aggregatedDays??1}):D(`drillDown.singlePeriod`,{period:D(`periods.${O}`)})}],Oe=[{label:D(`drillDown.costVsPrevious`),primary:S(x(e.totalCost,j?.totalCost??null),u),secondary:C(x(e.totalCost,j?.totalCost??null))},{label:D(`drillDown.tokensVsPrevious`),primary:S(x(F,Te),c),secondary:C(x(F,Te))},{label:D(`drillDown.requestsVsPrevious`),primary:S(x(e.requestCount,j?.requestCount??null),e=>l(Math.round(e))),secondary:C(x(e.requestCount,j?.requestCount??null))},{label:D(`drillDown.costPerMillionVsAverageWindow`,{window:J}),primary:S(H===null?null:x(H,q),u),secondary:q===null?`–`:u(q)},{label:D(`drillDown.costVsAverageWindow`,{window:J}),primary:S(x(e.totalCost,W),u),secondary:W===null?`–`:u(W)},{label:D(`drillDown.requestsVsAverageWindow`,{window:J}),primary:S(x(e.requestCount,G),e=>l(Math.round(e))),secondary:G===null?`–`:l(Math.round(G))},{label:D(`drillDown.tokensVsAverageWindow`,{window:J}),primary:S(x(F,K),c),secondary:K===null?`–`:c(K)},{label:D(`drillDown.costPerMillionVsPrevious`),primary:S(H===null?null:x(H,Y),u),secondary:Y===null?`–`:u(Y)}],ke=[{id:`cacheRead`,value:e.cacheReadTokens,color:`hsl(160, 50%, 42%)`,label:D(`drillDown.tokenSegments.cacheRead`)},{id:`cacheWrite`,value:e.cacheCreationTokens,color:`hsl(262, 60%, 55%)`,label:D(`drillDown.tokenSegments.cacheWrite`)},{id:`input`,value:e.inputTokens,color:`hsl(340, 55%, 52%)`,label:D(`common.input`)},{id:`output`,value:e.outputTokens,color:`hsl(35, 80%, 52%)`,label:D(`common.output`)},{id:`thinking`,value:e.thinkingTokens,color:`hsl(12, 78%, 56%)`,label:D(`common.thinking`)}],Ae=[{label:D(`drillDown.topCostModel`),title:X?.name??`–`,value:X?d(X.costShare):`–`},{label:D(`drillDown.topRequestModel`),title:Z?.name??`–`,value:Z&&Z.requests>0?D(`drillDown.requestCountShort`,{count:Z.requests}):`–`},{label:D(`drillDown.topTokenModel`),title:Q?.name??`–`,value:Q?d(Q.tokenShare):`–`},{label:D(`drillDown.priciestPerMillionModel`),title:$?.name??`–`,value:$?.costPerMillion!==null&&$?.costPerMillion!==void 0?(0,_.jsx)(h,{value:$.costPerMillion,type:`currency`}):`–`},{label:D(`drillDown.topCostShare`),title:X?d(X.costShare):`–`,value:X?.provider??`–`},{label:D(`drillDown.topThreeCostShare`),title:d(Ee),value:D(`drillDown.modelCount`,{count:Math.min(L.length,3)})}],je=D(O===`day`?`drillDown.previousDay`:`drillDown.previousPeriod`),Me=D(O===`day`?`drillDown.nextDay`:`drillDown.nextPeriod`);return(0,_.jsx)(de,{open:o,onOpenChange:e=>!e&&ye(),children:(0,_.jsxs)(le,{className:`max-h-[85vh] max-w-5xl overflow-y-auto`,onKeyDown:e=>{e.altKey||e.ctrlKey||e.metaKey||e.shiftKey||me(e.target)||(e.key===`ArrowLeft`&&N&&(e.preventDefault(),T?.()),e.key===`ArrowRight`&&P&&(e.preventDefault(),E?.()))},children:[(0,_.jsxs)(ce,{children:[(0,_.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,_.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,_.jsxs)(se,{children:[ne(e.date,`long`),` — `,u(e.totalCost)]}),(0,_.jsx)(ue,{children:D(`drillDown.description`,{periodType:D(`periods.${O}`)})})]}),(0,_.jsxs)(`div`,{className:`flex flex-col items-stretch gap-2 sm:items-end`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,_.jsxs)(f,{type:`button`,variant:`outline`,size:`sm`,onClick:T,disabled:!N,"aria-label":je,children:[(0,_.jsx)(ie,{className:`h-4 w-4`,"aria-hidden":`true`}),(0,_.jsx)(`span`,{children:je})]}),(0,_.jsxs)(f,{type:`button`,variant:`outline`,size:`sm`,onClick:E,disabled:!P,"aria-label":Me,children:[(0,_.jsx)(`span`,{children:Me}),(0,_.jsx)(re,{className:`h-4 w-4`,"aria-hidden":`true`})]})]}),(0,_.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs text-muted-foreground sm:justify-end`,children:[(0,_.jsx)(`span`,{children:D(`drillDown.position`,{current:be,total:xe})}),(0,_.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,_.jsx)(`span`,{children:D(`drillDown.keyboardHint`)})]})]})]}),(0,_.jsxs)(`div`,{className:`flex flex-wrap gap-2 pt-1 text-xs text-muted-foreground`,children:[(0,_.jsx)(`span`,{className:`rounded-full border border-border/60 bg-muted/20 px-2 py-1`,children:D(`drillDown.periodType`,{period:D(`periods.${O}`)})}),(e._aggregatedDays??1)>1&&(0,_.jsx)(`span`,{className:`rounded-full border border-border/60 bg-muted/20 px-2 py-1`,children:D(`drillDown.coverageDays`,{count:e._aggregatedDays??1})})]})]}),(0,_.jsxs)(`section`,{className:`space-y-3`,children:[(0,_.jsx)(`h3`,{className:`text-sm font-semibold`,children:D(`drillDown.overview`)}),(0,_.jsx)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-3 xl:grid-cols-6`,children:De.map(e=>(0,_.jsxs)(`div`,{className:`rounded-lg bg-muted/30 p-3 text-center`,children:[(0,_.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e.label}),(0,_.jsx)(`div`,{className:`mt-1 font-mono text-sm font-medium`,children:e.value})]},e.label))})]}),(0,_.jsxs)(`section`,{className:`space-y-3`,children:[(0,_.jsx)(`h3`,{className:`text-sm font-semibold`,children:D(`drillDown.benchmarks`)}),(0,_.jsx)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2 xl:grid-cols-4`,children:Oe.map(e=>(0,_.jsxs)(`div`,{className:`rounded-lg border border-border/50 bg-muted/15 px-3 py-2`,children:[(0,_.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e.label}),(0,_.jsx)(`div`,{className:`mt-1 font-medium`,children:e.primary}),(0,_.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:e.secondary})]},e.label))})]}),(0,_.jsxs)(`section`,{className:`space-y-3`,children:[(0,_.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,_.jsx)(`h3`,{className:`text-sm font-semibold`,children:D(`drillDown.modelBreakdown`)}),(0,_.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:D(`drillDown.modelCount`,{count:L.length})})]}),(0,_.jsxs)(`div`,{className:`grid grid-cols-1 gap-4 xl:grid-cols-[280px_minmax(0,1fr)]`,children:[(0,_.jsxs)(`div`,{className:`space-y-3`,children:[(0,_.jsx)(`div`,{className:`grid grid-cols-2 gap-3 sm:grid-cols-3 xl:grid-cols-2`,children:Ae.map(e=>(0,_.jsxs)(`div`,{className:`rounded-lg border border-border/50 bg-muted/15 px-3 py-2`,children:[(0,_.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e.label}),(0,_.jsx)(`div`,{className:`mt-1 truncate font-medium`,children:e.title}),(0,_.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:e.value})]},e.label))}),z.length>0&&(0,_.jsxs)(`div`,{className:`rounded-xl border border-border/50 bg-muted/10 p-3`,children:[(0,_.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:D(`drillDown.costShareByModel`)}),(0,_.jsx)(n,{width:`100%`,height:220,children:(0,_.jsxs)(i,{children:[(0,_.jsx)(r,{data:z,cx:`50%`,cy:`50%`,innerRadius:46,outerRadius:84,paddingAngle:2,dataKey:`value`,children:z.map(e=>(0,_.jsx)(t,{fill:m(e.name)},e.name))}),(0,_.jsx)(ee,{content:(0,_.jsx)(fe,{formatter:e=>u(e)})})]})})]})]}),(0,_.jsx)(`div`,{className:`space-y-3`,children:L.map(e=>(0,_.jsxs)(`div`,{className:`rounded-xl border border-border/50 bg-muted/10 p-3`,children:[(0,_.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:[(0,_.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,_.jsx)(`span`,{className:`h-2.5 w-2.5 rounded-full`,style:{backgroundColor:m(e.name)}}),(0,_.jsx)(`span`,{className:`truncate font-medium`,children:e.name}),(0,_.jsx)(`span`,{className:s(`inline-flex items-center rounded-full border px-1.5 py-0.5 text-[10px] leading-none font-medium`,p(e.provider)),children:e.provider})]}),(0,_.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:D(`drillDown.requestCountShort`,{count:e.requests})})]}),(0,_.jsxs)(`div`,{className:`mt-3 grid grid-cols-2 gap-2 text-xs sm:grid-cols-4`,children:[(0,_.jsxs)(`div`,{className:`rounded-lg bg-background/70 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`tables.recentDays.cost`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:(0,_.jsx)(h,{value:e.cost,type:`currency`})})]}),(0,_.jsxs)(`div`,{className:`rounded-lg bg-background/70 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`drillDown.costShare`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:d(e.costShare)})]}),(0,_.jsxs)(`div`,{className:`rounded-lg bg-background/70 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`tables.recentDays.tokens`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:(0,_.jsx)(h,{value:e.tokens,type:`tokens`})})]}),(0,_.jsxs)(`div`,{className:`rounded-lg bg-background/70 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`drillDown.tokenShare`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:d(e.tokenShare)})]}),(0,_.jsxs)(`div`,{className:`rounded-lg bg-background/70 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`common.requests`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:(0,_.jsx)(h,{value:e.requests,type:`number`})})]}),(0,_.jsxs)(`div`,{className:`rounded-lg bg-background/70 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:`$/1M`}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:e.costPerMillion===null?`–`:(0,_.jsx)(h,{value:e.costPerMillion,type:`currency`})})]}),(0,_.jsxs)(`div`,{className:`rounded-lg bg-background/70 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`drillDown.costPerRequest`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:e.costPerRequest===null?`–`:(0,_.jsx)(h,{value:e.costPerRequest,type:`currency`})})]}),(0,_.jsxs)(`div`,{className:`rounded-lg bg-background/70 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`drillDown.tokensPerRequest`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:e.tokensPerRequest===null?`–`:(0,_.jsx)(h,{value:e.tokensPerRequest,type:`tokens`})})]})]}),(0,_.jsxs)(`div`,{className:`mt-3 grid grid-cols-2 gap-2 text-[11px] sm:grid-cols-5`,children:[(0,_.jsxs)(`div`,{className:`rounded-lg border border-border/50 bg-background/60 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`common.input`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:c(e.input)})]}),(0,_.jsxs)(`div`,{className:`rounded-lg border border-border/50 bg-background/60 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`common.output`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:c(e.output)})]}),(0,_.jsxs)(`div`,{className:`rounded-lg border border-border/50 bg-background/60 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`common.cacheRead`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:c(e.cacheRead)})]}),(0,_.jsxs)(`div`,{className:`rounded-lg border border-border/50 bg-background/60 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`common.cacheWrite`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:c(e.cacheCreate)})]}),(0,_.jsxs)(`div`,{className:`rounded-lg border border-border/50 bg-background/60 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`common.thinking`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:c(e.thinking)})]})]})]},e.name))})]})]}),(0,_.jsxs)(`section`,{className:`space-y-3`,children:[(0,_.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,_.jsx)(`h3`,{className:`text-sm font-semibold`,children:D(`drillDown.providerSummary`)}),(0,_.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:D(`drillDown.providerCount`,{count:R.length})})]}),(0,_.jsx)(`div`,{className:`grid grid-cols-1 gap-3 lg:grid-cols-2`,children:R.map(e=>(0,_.jsxs)(`div`,{className:`rounded-xl border border-border/50 bg-muted/10 p-3`,children:[(0,_.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,_.jsx)(`span`,{className:s(`inline-flex items-center rounded-full border px-2 py-1 text-xs leading-none font-medium`,p(e.provider)),children:e.provider}),(0,_.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:D(`drillDown.activeModelsCount`,{count:e.activeModels})})]}),(0,_.jsxs)(`div`,{className:`mt-3 grid grid-cols-2 gap-2 text-xs sm:grid-cols-4`,children:[(0,_.jsxs)(`div`,{className:`rounded-lg bg-background/70 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`tables.recentDays.cost`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:(0,_.jsx)(h,{value:e.cost,type:`currency`})})]}),(0,_.jsxs)(`div`,{className:`rounded-lg bg-background/70 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`drillDown.costShare`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:d(e.costShare)})]}),(0,_.jsxs)(`div`,{className:`rounded-lg bg-background/70 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`tables.recentDays.tokens`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:(0,_.jsx)(h,{value:e.tokens,type:`tokens`})})]}),(0,_.jsxs)(`div`,{className:`rounded-lg bg-background/70 px-2.5 py-2`,children:[(0,_.jsx)(`div`,{className:`text-muted-foreground`,children:D(`common.requests`)}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:(0,_.jsx)(h,{value:e.requests,type:`number`})})]})]})]},e.provider))})]}),(0,_.jsxs)(`section`,{className:`space-y-3`,children:[(0,_.jsx)(`h3`,{className:`text-sm font-semibold`,children:D(`drillDown.tokenDistribution`)}),(0,_.jsxs)(`div`,{className:`rounded-xl border border-border/50 bg-muted/10 p-3`,children:[(0,_.jsx)(`div`,{className:`flex h-3 overflow-hidden rounded-full`,children:I&&ke.map(e=>{let t=(e.value/F*100).toFixed(1),n=`${e.label}: ${c(e.value)} (${t}%)`;return(0,_.jsx)(`div`,{className:`h-full transition-all duration-500`,style:{width:`${e.value/F*100}%`,backgroundColor:e.color},title:n,"aria-label":n},e.id)})}),(0,_.jsx)(`div`,{className:`mt-3 grid grid-cols-1 gap-2 text-xs sm:grid-cols-2 lg:grid-cols-5`,children:ke.map(e=>(0,_.jsxs)(`div`,{className:`rounded-lg bg-background/70 px-2.5 py-2`,children:[(0,_.jsxs)(`div`,{className:`flex items-center gap-2 text-muted-foreground`,children:[(0,_.jsx)(`span`,{className:`h-2.5 w-2.5 rounded-full`,style:{backgroundColor:e.color}}),e.label]}),(0,_.jsx)(`div`,{className:`mt-1 font-mono`,children:c(e.value)}),(0,_.jsx)(`div`,{className:`mt-1 text-[11px] text-muted-foreground`,children:I?d(e.value/F*100):`–`})]},e.id))})]})]})]})})}export{w as DrillDownModal};
@@ -1 +0,0 @@
1
- import{a as e}from"./motion-vendor-vKc6gXHZ.js";import{a as t}from"./useTranslation-BSl7t2D6.js";import{t as n}from"./InfoButton-CTgLGzb9.js";var r=e();function i({children:e,info:i,className:a}){return(0,r.jsxs)(`div`,{className:t(`flex min-w-0 items-center gap-2`,a),children:[e,i&&(0,r.jsx)(n,{text:i,className:`shrink-0`})]})}export{i as t};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{b as t,c as n,f as r,h as i,l as a,m as o,p as s,t as c,v as l,w as u,y as d}from"./charts-vendor-CiBqdKXh.js";import{a as f,r as p,t as m}from"./motion-vendor-vKc6gXHZ.js";import{t as h}from"./useTranslation-BSl7t2D6.js";import{c as g,n as _,r as v,t as y}from"./formatters-yKppUXb3.js";import{i as b}from"./i18n-C88wS2Uy.js";import{L as x,a as S,i as C,m as w}from"./icons-vendor-CIvT_-Pb.js";import{a as T}from"./model-utils-BIvGAFGz.js";import{n as E,t as D}from"./card-h-Z9EWBl.js";import{i as O,t as k}from"./help-content-Bt5KCpWS.js";import{t as A}from"./section-header-DbV45zH5.js";import{n as j,r as M,t as N}from"./ChartCard-CBUnItl-.js";import{t as P}from"./ChartLegend-B64cJdDI.js";import{n as F,r as I,t as L}from"./chart-theme-D5iCFDJg.js";import{n as R,r as z}from"./provider-limits-5e1fUwPl.js";var B=e(u()),V=f();function H(e){return e.riskStatus===`limit`?b.t(`limits.statuses.limitExceeded`):e.riskStatus===`warning`?b.t(`limits.statuses.budgetTight`):e.riskStatus===`ok`?b.t(`limits.statuses.budgetStable`):b.t(`limits.statuses.noLimit`)}function U(e){return e.hasSubscription?e.subscriptionStatus===`gain`?b.t(`limits.statuses.subscriptionPaysOff`):b.t(`limits.statuses.belowSubscription`):b.t(`limits.statuses.noSubscription`)}function W(e,t){return e.monthlyLimit>0?b.t(`limits.badge.limit`,{value:e.utilization?.toFixed(0)??`0`}):e.hasSubscription?b.t(`limits.badge.subscription`,{value:Math.min(t,999).toFixed(0)}):b.t(`limits.badge.open`)}function G(e){let t=Number(Array.isArray(e)?e[0]??0:e??0);return Number.isFinite(t)?t:0}function K({data:e,providers:u,limits:f,selectedMonth:b}){let{t:K}=h(),q=(0,B.useRef)(null),J=m(q,{once:!0,amount:.2}),{rows:Y,focusMonth:X,timelineData:Z,atLimitCount:Q,nearLimitCount:$,subscriptionTotal:ee,subscriptionGainTotal:te}=(0,B.useMemo)(()=>{let{months:t,monthMap:n,providerTotals:r}=R(e),i=z(e),a=b??i,o=u.map(e=>{let t=f[e],i=a?n.get(a)?.get(e)??0:0,o=r.get(e)??0,s=t?.monthlyLimit??0,c=!!t?.hasSubscription,l=c?t?.subscriptionPrice??0:0,u=s>0?Math.max(i-s,0):0,d=s>0?Math.max(s-i,0):null,p=s>0?i/s*100:null,m=c?i-l:null,h=m===null?0:Math.max(m,0),g=m===null?0:Math.max(-m,0),_=`none`;return s>0&&i>=s?_=`limit`:s>0&&i>=s*.8?_=`warning`:s>0&&(_=`ok`),{provider:e,cost:i,totalCost:o,monthlyLimit:s,subscriptionPrice:l,hasSubscription:c,remaining:d,overrun:u,utilization:p,subscriptionDelta:m,subscriptionGain:h,subscriptionGap:g,riskStatus:_,subscriptionStatus:c?h>0?`gain`:`gap`:`none`}}).sort((e,t)=>e.riskStatus===`limit`&&t.riskStatus!==`limit`?-1:e.riskStatus!==`limit`&&t.riskStatus===`limit`?1:e.subscriptionStatus===`gain`&&t.subscriptionStatus!==`gain`?-1:e.subscriptionStatus!==`gain`&&t.subscriptionStatus===`gain`?1:t.cost-e.cost);return{rows:o,focusMonth:a,timelineData:t.map(e=>{let t=n.get(e)??new Map,r=u.reduce((e,n)=>e+(t.get(n)??0),0),i=u.reduce((e,t)=>{let n=f[t]?.monthlyLimit??0;return e+(n>0?n:0)},0),a=u.reduce((e,t)=>{let n=f[t];return e+(n?.hasSubscription?n.subscriptionPrice:0)},0),o=u.reduce((e,n)=>{let r=f[n]?.monthlyLimit??0,i=t.get(n)??0;return e+(r>0?Math.max(i-r,0):0)},0),s=u.reduce((e,n)=>{let r=f[n],i=t.get(n)??0,a=r?.hasSubscription?r.subscriptionPrice:0;return e+Math.max(i-a,0)},0),c=u.reduce((e,n)=>{let r=f[n],i=t.get(n)??0,a=r?.hasSubscription?r.subscriptionPrice:0;return e+(r?.hasSubscription?Math.max(a-i,0):0)},0);return{month:e,totalCost:r,totalLimit:i>0?i:null,totalSubscriptions:a>0?a:null,totalOverrun:o,totalSubscriptionGain:s,totalSubscriptionGap:c}}),atLimitCount:o.filter(e=>e.riskStatus===`limit`).length,nearLimitCount:o.filter(e=>e.riskStatus===`warning`).length,subscriptionTotal:o.reduce((e,t)=>e+t.subscriptionPrice,0),subscriptionGainTotal:o.reduce((e,t)=>e+t.subscriptionGain,0)}},[e,f,u,b]);return u.length===0?null:(0,V.jsxs)(`div`,{id:`limits`,ref:q,children:[(0,V.jsx)(A,{title:K(`limits.sectionTitle`),badge:K(`limits.providersBadge`,{count:u.length}),description:K(`limits.sectionDescription`),info:O.limits}),Q>0&&(0,V.jsx)(p.div,{initial:{opacity:0,y:12},animate:J?{opacity:1,y:0}:{opacity:0,y:12},transition:{duration:.35},className:`mb-4 rounded-2xl border border-red-500/30 bg-red-500/10 px-4 py-3 text-sm text-red-100`,children:(0,V.jsxs)(`div`,{className:`flex items-center gap-2 font-medium`,children:[(0,V.jsx)(C,{className:`h-4 w-4`}),K(`limits.warningBanner`,{count:Q})]})}),(0,V.jsx)(`div`,{className:`grid grid-cols-1 gap-4 lg:grid-cols-4`,children:[{label:K(`limits.cards.atLimit`),value:String(Q),hint:X?g(X):K(`limits.cards.noMonth`),icon:(0,V.jsx)(C,{className:`h-4 w-4`})},{label:K(`limits.cards.nearLimit`),value:String($),hint:K(`limits.cards.nearLimitHint`),icon:(0,V.jsx)(w,{className:`h-4 w-4`})},{label:K(`limits.cards.subscriptionVolume`),value:_(ee),hint:K(`limits.cards.subscriptionVolumeHint`),icon:(0,V.jsx)(x,{className:`h-4 w-4`})},{label:K(`limits.cards.subscriptionValue`),value:_(te),hint:K(`limits.cards.subscriptionValueHint`),icon:(0,V.jsx)(S,{className:`h-4 w-4`})}].map((e,t)=>(0,V.jsx)(p.div,{initial:{opacity:0,y:12},animate:J?{opacity:1,y:0}:{opacity:0,y:12},transition:{duration:.35,delay:.04*t},children:(0,V.jsx)(D,{className:`h-full`,children:(0,V.jsx)(E,{className:`p-4`,children:(0,V.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{className:`text-[10px] tracking-[0.14em] text-muted-foreground uppercase`,children:e.label}),(0,V.jsx)(`div`,{className:`mt-1 text-2xl font-semibold tabular-nums`,children:e.value}),(0,V.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:e.hint})]}),(0,V.jsx)(`div`,{className:`rounded-lg border border-border/50 bg-muted/15 p-2 text-muted-foreground`,children:e.icon})]})})})},e.label))}),(0,V.jsx)(`div`,{className:`mt-4 grid grid-cols-1 gap-4 xl:grid-cols-3`,children:Y.map((e,t)=>{let n=T(e.provider),r=e.monthlyLimit>0?Math.min(e.cost/e.monthlyLimit*100,100):0,i=e.hasSubscription&&e.subscriptionPrice>0?e.cost/e.subscriptionPrice*100:0,a=Math.min(i,100);return(0,V.jsx)(p.div,{initial:{opacity:0,y:12},animate:J?{opacity:1,y:0}:{opacity:0,y:12},transition:{duration:.35,delay:.05+t*.03},children:(0,V.jsx)(D,{className:e.riskStatus===`limit`?`border-red-500/40 bg-red-500/[0.06]`:e.subscriptionStatus===`gain`?`border-emerald-500/30 bg-emerald-500/[0.05]`:void 0,children:(0,V.jsxs)(E,{className:`p-4`,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{className:`text-sm font-semibold`,children:e.provider}),(0,V.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:H(e)}),(0,V.jsx)(`div`,{className:`mt-0.5 text-xs text-muted-foreground/80`,children:U(e)})]}),(0,V.jsx)(`div`,{className:`rounded-full border px-2.5 py-1 text-[11px] font-medium`,style:n,children:W(e,i)})]}),(0,V.jsxs)(`div`,{className:`mt-4 grid grid-cols-2 gap-3`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{className:`text-[10px] tracking-[0.14em] text-muted-foreground uppercase`,children:K(`limits.tracks.usageFocusMonth`)}),(0,V.jsx)(`div`,{className:`mt-1 text-xl font-semibold tabular-nums`,children:_(e.cost)})]}),(0,V.jsxs)(`div`,{className:`text-right`,children:[(0,V.jsx)(`div`,{className:`text-[10px] tracking-[0.14em] text-muted-foreground uppercase`,children:K(`limits.tracks.limitSubscription`)}),(0,V.jsxs)(`div`,{className:`mt-1 text-sm font-medium tabular-nums`,children:[e.monthlyLimit>0?_(e.monthlyLimit):K(`limits.statuses.noLimit`),` `,`/ `,e.hasSubscription?_(e.subscriptionPrice):`–`]})]})]}),(0,V.jsxs)(`div`,{className:`mt-4 space-y-3`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsxs)(`div`,{className:`mb-1.5 flex items-center justify-between text-[11px] text-muted-foreground`,children:[(0,V.jsx)(`span`,{children:K(`limits.tracks.budgetRisk`)}),(0,V.jsx)(`span`,{children:e.monthlyLimit>0?e.overrun>0?`+${_(e.overrun)}`:_(e.remaining??0):K(`limits.statuses.noLimit`)})]}),(0,V.jsx)(`div`,{className:`h-2 overflow-hidden rounded-full bg-muted/30`,children:e.monthlyLimit>0?(0,V.jsx)(p.div,{className:e.riskStatus===`limit`?`h-full bg-red-400`:e.riskStatus===`warning`?`h-full bg-amber-400`:`h-full`,initial:{width:0},animate:J?{width:`${r}%`}:{width:0},transition:{duration:.8,delay:.08+t*.04,ease:`easeOut`},...e.riskStatus===`limit`||e.riskStatus===`warning`?{}:{style:{backgroundColor:n.color}}}):(0,V.jsx)(`div`,{className:`h-full w-full bg-muted/20`})})]}),(0,V.jsxs)(`div`,{children:[(0,V.jsxs)(`div`,{className:`mb-1.5 flex items-center justify-between text-[11px] text-muted-foreground`,children:[(0,V.jsx)(`span`,{children:K(`limits.tracks.subscriptionEffect`)}),(0,V.jsx)(`span`,{className:e.subscriptionStatus===`gain`?`text-emerald-300`:e.subscriptionStatus===`gap`?`text-amber-200`:``,children:e.hasSubscription?e.subscriptionStatus===`gain`?`+${_(e.subscriptionGain)}`:_(e.subscriptionGap):K(`limits.statuses.noSubscription`)})]}),(0,V.jsx)(`div`,{className:`h-2 overflow-hidden rounded-full bg-muted/30`,children:e.hasSubscription?(0,V.jsx)(p.div,{className:e.subscriptionStatus===`gain`?`h-full bg-emerald-400`:`h-full bg-amber-300`,initial:{width:0},animate:J?{width:`${Math.max(8,a)}%`}:{width:0},transition:{duration:.8,delay:.12+t*.04,ease:`easeOut`}}):(0,V.jsx)(`div`,{className:`h-full w-full bg-muted/20`})})]})]})]})})},e.provider)})}),(0,V.jsxs)(`div`,{className:`mt-4 grid grid-cols-1 gap-4 xl:grid-cols-2`,children:[(0,V.jsx)(j,{title:K(`limits.tracks.budgetTitle`),subtitle:K(X?`limits.tracks.budgetSubtitle`:`limits.tracks.budgetNoMonth`),info:k.providerLimitProgress,chartData:Y,valueKey:`cost`,valueFormatter:_,children:(0,V.jsx)(`div`,{className:`space-y-3`,children:Y.map((e,t)=>{let n=(e.monthlyLimit>0?Math.max(e.monthlyLimit,e.cost,1):Math.max(e.cost,1))*1.15,r=`${e.cost/n*100}%`,i=e.monthlyLimit>0?`${e.monthlyLimit/n*100}%`:`0%`,a=e.monthlyLimit>0?`${Math.min(e.cost,e.monthlyLimit)/n*100}%`:r,o=e.monthlyLimit>0&&e.overrun>0?`${e.overrun/n*100}%`:`0%`;return(0,V.jsxs)(p.div,{initial:{opacity:0,y:10},animate:J?{opacity:1,y:0}:{opacity:0,y:10},transition:{duration:.35,delay:.04+t*.04},className:`rounded-xl border border-border/50 bg-muted/10 p-4`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{className:`text-sm font-semibold`,children:e.provider}),(0,V.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:e.monthlyLimit<=0?K(`limits.statuses.noLimit`):e.overrun>0?K(`limits.tracks.alreadyAboveLimit`,{value:_(e.overrun)}):K(`limits.tracks.stillToLimit`,{value:_(e.remaining??0)})})]}),(0,V.jsxs)(`div`,{className:`text-right text-xs`,children:[(0,V.jsxs)(`div`,{className:`text-muted-foreground`,children:[K(`limits.tracks.usage`),` `,_(e.cost)]}),(0,V.jsxs)(`div`,{className:`mt-1 text-muted-foreground`,children:[K(`limits.tracks.limit`),` `,e.monthlyLimit>0?_(e.monthlyLimit):`–`]})]})]}),(0,V.jsx)(`div`,{className:`mt-4`,children:(0,V.jsxs)(`div`,{className:`relative h-14`,children:[(0,V.jsx)(`div`,{className:`absolute inset-x-0 top-5 h-4 rounded-full bg-muted/25`}),e.monthlyLimit>0?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`absolute top-5 left-0 h-4 rounded-l-full bg-sky-400/12`,style:{width:i}}),(0,V.jsx)(`div`,{className:`absolute top-5 h-4 rounded-r-full bg-red-400/12`,style:{left:i,width:`calc(100% - ${i})`}}),(0,V.jsx)(p.div,{className:e.riskStatus===`warning`?`absolute top-5 left-0 h-4 rounded-full bg-amber-400`:`absolute top-5 left-0 h-4 rounded-full bg-sky-400`,initial:{width:0},animate:J?{width:a}:{width:0},transition:{duration:.75,delay:.08+t*.04,ease:`easeOut`}}),e.overrun>0&&(0,V.jsx)(p.div,{className:`absolute top-5 h-4 rounded-r-full bg-red-400`,style:{left:i},initial:{width:0},animate:J?{width:o}:{width:0},transition:{duration:.75,delay:.14+t*.04,ease:`easeOut`}}),(0,V.jsx)(`div`,{className:`absolute top-2 h-10 w-px bg-border`,style:{left:i}}),(0,V.jsx)(`div`,{className:`absolute top-0 -translate-x-1/2 rounded-full border border-border/70 bg-background px-2 py-0.5 text-[10px] font-medium text-muted-foreground`,style:{left:i},children:K(`limits.tracks.limit`)})]}):(0,V.jsx)(p.div,{className:`absolute top-5 left-0 h-4 rounded-full bg-muted-foreground/40`,initial:{width:0},animate:J?{width:r}:{width:0},transition:{duration:.75,delay:.08+t*.04,ease:`easeOut`}}),(0,V.jsx)(`div`,{className:`absolute top-11 left-0 text-[10px] text-muted-foreground`,children:`$0`}),(0,V.jsx)(`div`,{className:`absolute top-11 right-0 text-[10px] text-muted-foreground`,children:_(n)})]})}),(0,V.jsxs)(`div`,{className:`mt-2 grid grid-cols-1 gap-2 text-xs md:grid-cols-3`,children:[(0,V.jsxs)(`div`,{className:`rounded-lg border border-border/40 bg-background/40 px-3 py-2`,children:[(0,V.jsx)(`div`,{className:`text-muted-foreground`,children:K(`limits.tracks.currentlyUsed`)}),(0,V.jsx)(`div`,{className:`mt-1 font-medium text-foreground`,children:_(e.cost)})]}),(0,V.jsxs)(`div`,{className:`rounded-lg border border-border/40 bg-background/40 px-3 py-2`,children:[(0,V.jsx)(`div`,{className:`text-muted-foreground`,children:K(`limits.tracks.remainingToLimit`)}),(0,V.jsx)(`div`,{className:e.monthlyLimit>0&&e.overrun===0?`mt-1 font-medium text-sky-300`:`mt-1 font-medium text-muted-foreground`,children:e.monthlyLimit>0?e.overrun===0?_(e.remaining??0):`$0.00`:`–`})]}),(0,V.jsxs)(`div`,{className:`rounded-lg border border-border/40 bg-background/40 px-3 py-2`,children:[(0,V.jsx)(`div`,{className:`text-muted-foreground`,children:K(`limits.tracks.alreadyOverLimit`)}),(0,V.jsx)(`div`,{className:e.overrun>0?`mt-1 font-medium text-red-300`:`mt-1 font-medium text-muted-foreground`,children:e.monthlyLimit>0?e.overrun>0?_(e.overrun):`$0.00`:`–`})]})]})]},e.provider)})})}),(0,V.jsx)(j,{title:K(`limits.tracks.subscriptionTitle`),subtitle:K(X?`limits.tracks.subscriptionSubtitle`:`limits.tracks.subscriptionNoMonth`),info:k.providerSubscriptionMix,chartData:Y,valueKey:`cost`,valueFormatter:_,children:(0,V.jsx)(`div`,{className:`space-y-3`,children:Y.map((e,t)=>{let n=(e.hasSubscription?Math.max(e.subscriptionPrice,e.cost,1):Math.max(e.cost,1))*1.15,r=`${e.cost/n*100}%`,i=e.hasSubscription?`${e.subscriptionPrice/n*100}%`:`0%`,a=e.hasSubscription?`${Math.min(e.cost,e.subscriptionPrice)/n*100}%`:r,o=e.hasSubscription&&e.subscriptionGain>0?`${e.subscriptionGain/n*100}%`:`0%`;return(0,V.jsxs)(p.div,{initial:{opacity:0,y:10},animate:J?{opacity:1,y:0}:{opacity:0,y:10},transition:{duration:.35,delay:.04+t*.04},className:`rounded-xl border border-border/50 bg-muted/10 p-4`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{className:`text-sm font-semibold`,children:e.provider}),(0,V.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:e.hasSubscription?e.subscriptionStatus===`gain`?K(`limits.tracks.alreadyAboveBreakEvenText`,{value:_(e.subscriptionGain)}):K(`limits.tracks.stillToBreakEven`,{value:_(e.subscriptionGap)}):K(`limits.tracks.noSubscriptionSet`)})]}),(0,V.jsxs)(`div`,{className:`text-right text-xs`,children:[(0,V.jsxs)(`div`,{className:`text-muted-foreground`,children:[K(`limits.tracks.usage`),` `,_(e.cost)]}),(0,V.jsxs)(`div`,{className:`mt-1 text-muted-foreground`,children:[K(`limits.tracks.subscription`),` `,e.hasSubscription?_(e.subscriptionPrice):`–`]})]})]}),(0,V.jsx)(`div`,{className:`mt-4`,children:(0,V.jsxs)(`div`,{className:`relative h-14`,children:[(0,V.jsx)(`div`,{className:`absolute inset-x-0 top-5 h-4 rounded-full bg-muted/25`}),e.hasSubscription?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`absolute top-5 left-0 h-4 rounded-l-full bg-amber-300/18`,style:{width:i}}),(0,V.jsx)(`div`,{className:`absolute top-5 h-4 rounded-r-full bg-emerald-400/14`,style:{left:i,width:`calc(100% - ${i})`}}),(0,V.jsx)(p.div,{className:`absolute top-5 left-0 h-4 rounded-full bg-amber-300`,initial:{width:0},animate:J?{width:a}:{width:0},transition:{duration:.75,delay:.08+t*.04,ease:`easeOut`}}),e.subscriptionGain>0&&(0,V.jsx)(p.div,{className:`absolute top-5 h-4 rounded-r-full bg-emerald-400`,style:{left:i},initial:{width:0},animate:J?{width:o}:{width:0},transition:{duration:.75,delay:.14+t*.04,ease:`easeOut`}}),(0,V.jsx)(`div`,{className:`absolute top-2 h-10 w-px bg-border`,style:{left:i}}),(0,V.jsx)(`div`,{className:`absolute top-0 -translate-x-1/2 rounded-full border border-border/70 bg-background px-2 py-0.5 text-[10px] font-medium text-muted-foreground`,style:{left:i},children:K(`limits.tracks.breakEven`)})]}):(0,V.jsx)(p.div,{className:`absolute top-5 left-0 h-4 rounded-full bg-muted-foreground/40`,initial:{width:0},animate:J?{width:r}:{width:0},transition:{duration:.75,delay:.08+t*.04,ease:`easeOut`}}),(0,V.jsx)(`div`,{className:`absolute top-11 left-0 text-[10px] text-muted-foreground`,children:`$0`}),(0,V.jsx)(`div`,{className:`absolute top-11 right-0 text-[10px] text-muted-foreground`,children:_(n)})]})}),(0,V.jsxs)(`div`,{className:`mt-2 grid grid-cols-1 gap-2 text-xs md:grid-cols-3`,children:[(0,V.jsxs)(`div`,{className:`rounded-lg border border-border/40 bg-background/40 px-3 py-2`,children:[(0,V.jsx)(`div`,{className:`text-muted-foreground`,children:K(`limits.tracks.currentlyUsed`)}),(0,V.jsx)(`div`,{className:`mt-1 font-medium text-foreground`,children:_(e.cost)})]}),(0,V.jsxs)(`div`,{className:`rounded-lg border border-border/40 bg-background/40 px-3 py-2`,children:[(0,V.jsx)(`div`,{className:`text-muted-foreground`,children:K(`limits.tracks.remainingToBreakEven`)}),(0,V.jsx)(`div`,{className:e.hasSubscription&&e.subscriptionGap>0?`mt-1 font-medium text-amber-200`:`mt-1 font-medium text-muted-foreground`,children:e.hasSubscription?e.subscriptionGap>0?_(e.subscriptionGap):`$0.00`:`–`})]}),(0,V.jsxs)(`div`,{className:`rounded-lg border border-border/40 bg-background/40 px-3 py-2`,children:[(0,V.jsx)(`div`,{className:`text-muted-foreground`,children:K(`limits.tracks.alreadyAboveBreakEven`)}),(0,V.jsx)(`div`,{className:e.subscriptionGain>0?`mt-1 font-medium text-emerald-300`:`mt-1 font-medium text-muted-foreground`,children:e.hasSubscription?e.subscriptionGain>0?_(e.subscriptionGain):`$0.00`:`–`})]})]})]},e.provider)})})})]}),(0,V.jsx)(`div`,{className:`mt-4`,children:(0,V.jsx)(j,{title:K(`limits.tracks.portfolioTitle`),subtitle:K(`limits.tracks.portfolioSubtitle`),info:k.providerLimitTimeline,chartData:Z,valueKey:`totalCost`,valueFormatter:_,children:(0,V.jsx)(N,{children:e=>(0,V.jsx)(M,{variant:`line`,children:(0,V.jsx)(t,{width:`100%`,height:320,children:(0,V.jsxs)(c,{data:Z,margin:I,children:[(0,V.jsxs)(`defs`,{children:[(0,V.jsxs)(`linearGradient`,{id:`limits-risk-area`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,V.jsx)(`stop`,{offset:`0%`,stopColor:`rgb(248 113 113)`,stopOpacity:.28}),(0,V.jsx)(`stop`,{offset:`100%`,stopColor:`rgb(248 113 113)`,stopOpacity:0})]}),(0,V.jsxs)(`linearGradient`,{id:`limits-gain-area`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,V.jsx)(`stop`,{offset:`0%`,stopColor:`rgb(74 222 128)`,stopOpacity:.28}),(0,V.jsx)(`stop`,{offset:`100%`,stopColor:`rgb(74 222 128)`,stopOpacity:0})]})]}),(0,V.jsx)(o,{strokeDasharray:`3 3`,stroke:F.grid,opacity:.25}),(0,V.jsx)(a,{dataKey:`month`,tickFormatter:g,stroke:F.axis,fontSize:11,tickLine:!1}),(0,V.jsx)(n,{tickFormatter:e=>{let t=y(e);return t===null?``:_(Math.abs(t))},stroke:F.axis,fontSize:11,tickLine:!1,axisLine:!1}),(0,V.jsx)(l,{formatter:(e,t)=>[v(Math.abs(G(e))),t??``],labelFormatter:e=>g(String(e)),contentStyle:{borderRadius:12,borderColor:`hsl(var(--border))`,background:`color-mix(in srgb, hsl(var(--popover)) 90%, transparent)`}}),(0,V.jsx)(d,{content:(0,V.jsx)(P,{})}),(0,V.jsx)(i,{y:0,stroke:`hsl(var(--border))`,strokeDasharray:`4 4`}),(0,V.jsx)(r,{type:`monotone`,dataKey:`totalSubscriptionGain`,name:K(`limits.cards.subscriptionValue`),stroke:`rgb(74 222 128)`,fill:`url(#limits-gain-area)`,strokeWidth:2,isAnimationActive:e,animationBegin:0,animationDuration:L.duration}),(0,V.jsx)(r,{type:`monotone`,dataKey:`totalOverrun`,name:K(`limits.tracks.alreadyOverLimit`),stroke:`rgb(248 113 113)`,fill:`url(#limits-risk-area)`,strokeWidth:2,isAnimationActive:e,animationBegin:L.stagger*1.2,animationDuration:L.duration}),(0,V.jsx)(s,{type:`monotone`,dataKey:`totalCost`,name:`${K(`limits.tracks.usage`)} ${K(`common.costs`).toLowerCase()}`,stroke:F.cost,strokeWidth:2,dot:!1,isAnimationActive:e,animationBegin:L.stagger*1.6,animationDuration:L.slowDuration}),(0,V.jsx)(s,{type:`monotone`,dataKey:`totalLimit`,name:K(`limits.tracks.limits`),stroke:`rgb(251 146 60)`,strokeDasharray:`6 3`,strokeWidth:2,dot:!1,connectNulls:!0,isAnimationActive:e,animationBegin:L.stagger*2,animationDuration:L.slowDuration}),(0,V.jsx)(s,{type:`monotone`,dataKey:`totalSubscriptions`,name:K(`limits.tracks.subscriptions`),stroke:`rgb(125 211 252)`,strokeDasharray:`3 3`,strokeWidth:2,dot:!1,connectNulls:!0,isAnimationActive:e,animationBegin:L.stagger*2.3,animationDuration:L.slowDuration})]})})})})})})]})}export{K as ProviderLimitsSection};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{w as t}from"./charts-vendor-CiBqdKXh.js";import{a as n}from"./motion-vendor-vKc6gXHZ.js";import{a as r,t as i}from"./useTranslation-BSl7t2D6.js";import{h as a,i as o,l as s,n as c,u as l}from"./formatters-yKppUXb3.js";import{tt as u}from"./icons-vendor-CIvT_-Pb.js";import{t as d}from"./button-D--hHeVj.js";import{c as f,i as p,n as m,r as h,t as g}from"./model-utils-BIvGAFGz.js";import{a as _,i as v,n as y,t as b}from"./card-h-Z9EWBl.js";import{t as x}from"./formatted-value-rO0EpKbc.js";import{n as S}from"./help-content-Bt5KCpWS.js";import{t as C}from"./InfoHeading-oi90uCR7.js";var w=e(t()),T=n(),E=30,D=120;function O(e){return Math.min(E+D,e)}function k(e,t,n){let r=O(e);if(t(r),r>=e)return null;let i=()=>{t(t=>{if(t>=e)return t;let r=Math.min(t+D,e);return r<e&&n(i),r})};return n(i)}function A(e){return e.modelBreakdowns.map(e=>({name:f(e.modelName),provider:h(e.modelName)})).filter((e,t,n)=>n.findIndex(t=>t.name===e.name&&t.provider===e.provider)===t)}function j(e){let t=new Map,n=0,r=0;for(let i=0;i<e.length;i+=1){let a=e[i];if(!a)continue;if(i>7){let t=e[i-8];t&&(n-=t.totalCost,r-=t.requestCount)}if(i>0){let t=e[i-1];t&&(n+=t.totalCost,r+=t.requestCount)}let o=i>0?e[i-1]:null,s=Math.min(i,7),c=o&&o.totalCost>0?(a.totalCost-o.totalCost)/o.totalCost*100:null;t.set(a.date,{...c===null?{}:{prevCostDelta:c},...s>0?{avgCost7:n/s}:{},...s>0?{avgRequests7:r/s}:{}})}return t}function M(e,t){if(e)return{contentVisibility:`auto`,containIntrinsicSize:t}}function N({data:e,onClickDay:t,viewMode:n=`daily`}){let{t:f}=i(),[h,D]=(0,w.useState)(!1),[O,N]=(0,w.useState)(`date`),[P,F]=(0,w.useState)(!1),[I,L]=(0,w.useState)(E),[,R]=(0,w.useTransition)(),z=(0,w.useMemo)(()=>{let t=[...e];return t.sort((e,t)=>{switch(O){case`date`:return P?e.date.localeCompare(t.date):t.date.localeCompare(e.date);case`cost`:return P?e.totalCost-t.totalCost:t.totalCost-e.totalCost;case`tokens`:return P?e.totalTokens-t.totalTokens:t.totalTokens-e.totalTokens;case`costPerM`:{let n=e.totalTokens>0?e.totalCost/(e.totalTokens/1e6):0,r=t.totalTokens>0?t.totalCost/(t.totalTokens/1e6):0;return P?n-r:r-n}}}),t},[e,O,P]);(0,w.useEffect)(()=>{if(!h){L(E);return}if(typeof window>`u`){L(z.length);return}let e=k(z.length,L,window.requestAnimationFrame);return()=>{e!==null&&window.cancelAnimationFrame(e)}},[h,z.length]);let B=(0,w.useMemo)(()=>h?z.slice(0,I):z.slice(0,E),[h,z,I]),V=(0,w.useMemo)(()=>[...e].sort((e,t)=>e.date.localeCompare(t.date)),[e]),H=(0,w.useMemo)(()=>j(V),[V]),U=(0,w.useMemo)(()=>Math.max(...e.map(e=>e.totalCost),0),[e]),W=(0,w.useMemo)(()=>{if(e.length===0)return null;let t=0,n=0,r=0,i=0,a=null;for(let o of e)t+=o.totalCost,n+=o.totalTokens,r+=o.requestCount,i+=o.cacheReadTokens,(!a||o.totalCost>a.totalCost)&&(a=o);let o=n>0?i/n*100:0;return{totalCost:t,totalTokens:n,totalRequests:r,cacheShare:o,top:a}},[e]),G=(0,w.useMemo)(()=>B.map(e=>({day:e,benchmark:H.get(e.date),costPerM:e.totalTokens>0?e.totalCost/(e.totalTokens/1e6):0,uniqueModels:A(e)})),[H,B]),K=e=>{R(()=>{e===O?F(!P):(N(e),F(!1))})},q=e=>O===e?P?`ascending`:`descending`:`none`,J=(0,w.useCallback)((e,n)=>{t&&(e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),t(n)))},[t]);return(0,T.jsxs)(b,{children:[(0,T.jsxs)(v,{className:`flex flex-row items-center justify-between`,children:[(0,T.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,T.jsx)(C,{info:S.recentDays,children:(0,T.jsx)(_,{className:`text-sm font-medium text-muted-foreground`,children:f(n===`monthly`?`tables.recentDays.monthsDetail`:n===`yearly`?`tables.recentDays.yearsDetail`:`tables.recentDays.daysDetail`)})}),(0,T.jsx)(`span`,{className:`text-xs text-muted-foreground/70`,children:f(`tables.recentDays.showing`,{shown:B.length,total:z.length,unit:a(n,!0)})})]}),z.length>E&&(0,T.jsx)(d,{variant:`ghost`,size:`sm`,onClick:()=>R(()=>{D(e=>!e)}),children:f(h?`tables.recentDays.showLess`:`tables.recentDays.showAll`)})]}),(0,T.jsxs)(y,{children:[W&&(0,T.jsxs)(`div`,{className:`mb-3 grid grid-cols-2 gap-2 lg:grid-cols-5`,children:[(0,T.jsxs)(`div`,{className:`rounded-lg border border-border/50 bg-muted/15 px-3 py-2`,children:[(0,T.jsx)(`div`,{className:`text-[10px] tracking-[0.14em] text-muted-foreground uppercase`,children:f(`tables.recentDays.totalCost`)}),(0,T.jsx)(`div`,{className:`mt-1 text-sm font-medium`,children:(0,T.jsx)(x,{value:W.totalCost,type:`currency`})})]}),(0,T.jsxs)(`div`,{className:`rounded-lg border border-border/50 bg-muted/15 px-3 py-2`,children:[(0,T.jsx)(`div`,{className:`text-[10px] tracking-[0.14em] text-muted-foreground uppercase`,children:f(`tables.recentDays.totalTokens`)}),(0,T.jsx)(`div`,{className:`mt-1 text-sm font-medium`,children:(0,T.jsx)(x,{value:W.totalTokens,type:`tokens`})})]}),(0,T.jsxs)(`div`,{className:`rounded-lg border border-border/50 bg-muted/15 px-3 py-2`,children:[(0,T.jsx)(`div`,{className:`text-[10px] tracking-[0.14em] text-muted-foreground uppercase`,children:f(`tables.recentDays.requests`)}),(0,T.jsx)(`div`,{className:`mt-1 text-sm font-medium`,children:(0,T.jsx)(x,{value:W.totalRequests,type:`number`})})]}),(0,T.jsxs)(`div`,{className:`rounded-lg border border-border/50 bg-muted/15 px-3 py-2`,children:[(0,T.jsx)(`div`,{className:`text-[10px] tracking-[0.14em] text-muted-foreground uppercase`,children:f(`tables.recentDays.cacheReadShare`)}),(0,T.jsx)(`div`,{className:`mt-1 text-sm font-medium`,children:l(W.cacheShare,1)})]}),(0,T.jsxs)(`div`,{className:`rounded-lg border border-border/50 bg-muted/15 px-3 py-2`,children:[(0,T.jsx)(`div`,{className:`text-[10px] tracking-[0.14em] text-muted-foreground uppercase`,children:f(`tables.recentDays.peak`)}),(0,T.jsx)(`div`,{className:`mt-1 text-sm font-medium`,children:W.top?o(W.top.date):`–`}),(0,T.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:W.top?c(W.top.totalCost):`–`})]})]}),h&&I<z.length&&(0,T.jsx)(`div`,{className:`mb-3 text-xs text-muted-foreground`,children:f(`tables.recentDays.showing`,{shown:I,total:z.length,unit:a(n,!0)})}),(0,T.jsx)(`div`,{className:`grid gap-2 md:hidden`,children:G.map(({day:e,benchmark:i,costPerM:a,uniqueModels:l})=>(0,T.jsxs)(`button`,{onClick:()=>t?.(e.date),className:`rounded-xl border border-border/50 bg-muted/10 p-3 text-left`,style:M(h,`220px`),children:[(0,T.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`div`,{className:`font-medium`,children:o(e.date,`long`)}),(0,T.jsxs)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:[s(e.requestCount),` `,f(`common.requests`)]})]}),(0,T.jsxs)(`div`,{className:`text-right`,children:[(0,T.jsx)(`div`,{className:`font-mono font-semibold`,children:(0,T.jsx)(x,{value:e.totalCost,type:`currency`,interactive:!1})}),(0,T.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:(0,T.jsx)(x,{value:e.totalTokens,type:`tokens`,interactive:!1})}),n===`daily`&&i?.prevCostDelta!==void 0&&(0,T.jsxs)(`div`,{className:`mt-1 text-[10px] text-muted-foreground`,children:[f(`tables.recentDays.previousDay`),` `,i.prevCostDelta>=0?`↑`:`↓`,Math.abs(i.prevCostDelta).toFixed(0),`%`]})]})]}),(0,T.jsxs)(`div`,{className:`mt-3 grid grid-cols-3 gap-2 text-xs`,children:[(0,T.jsxs)(`div`,{className:`rounded-lg bg-muted/20 px-2.5 py-2`,children:[(0,T.jsx)(`div`,{className:`text-muted-foreground`,children:f(`common.input`)}),(0,T.jsx)(`div`,{className:`mt-1 font-mono`,children:(0,T.jsx)(x,{value:e.inputTokens,type:`tokens`,interactive:!1})})]}),(0,T.jsxs)(`div`,{className:`rounded-lg bg-muted/20 px-2.5 py-2`,children:[(0,T.jsx)(`div`,{className:`text-muted-foreground`,children:f(`common.output`)}),(0,T.jsx)(`div`,{className:`mt-1 font-mono`,children:(0,T.jsx)(x,{value:e.outputTokens,type:`tokens`,interactive:!1})})]}),(0,T.jsxs)(`div`,{className:`rounded-lg bg-muted/20 px-2.5 py-2`,children:[(0,T.jsx)(`div`,{className:`text-muted-foreground`,children:`$/1M`}),(0,T.jsx)(`div`,{className:`mt-1 font-mono`,children:(0,T.jsx)(x,{value:a,type:`currency`,interactive:!1})})]})]}),(0,T.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-1.5`,children:[l.slice(0,4).map(({name:e,provider:t})=>(0,T.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] leading-tight font-medium`,style:{backgroundColor:m(e,.16),color:g(e)},children:[(0,T.jsx)(`span`,{children:e}),(0,T.jsx)(`span`,{className:r(`inline-flex items-center rounded-full border px-1 py-0.5 text-[9px] leading-none`,p(t)),children:t})]},`${e}-${t}`)),l.length>4&&(0,T.jsx)(`span`,{className:`inline-flex items-center rounded-full border border-border/50 px-2 py-0.5 text-[10px] text-muted-foreground`,children:f(`tables.modelEfficiency.more`,{count:l.length-4})})]}),n===`daily`&&i?.avgCost7!==void 0&&(0,T.jsxs)(`div`,{className:`mt-3 text-[10px] text-muted-foreground`,children:[f(`tables.recentDays.avg7d`),` `,c(i.avgCost7),` ·`,` `,f(`tables.recentDays.reqAvg`),` `,i.avgRequests7?.toFixed(0)??`–`]})]},e.date))}),(0,T.jsx)(`div`,{className:`hidden overflow-x-auto md:block`,children:(0,T.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,T.jsx)(`thead`,{className:`sticky top-0 z-10 bg-card`,children:(0,T.jsxs)(`tr`,{className:`border-b border-border`,children:[(0,T.jsx)(`th`,{"aria-sort":q(`date`),className:r(`px-2 py-2 text-left text-xs font-medium`,O===`date`?`text-foreground`:`text-muted-foreground`),children:(0,T.jsxs)(`button`,{type:`button`,onClick:()=>K(`date`),className:`inline-flex items-center gap-1 rounded-sm transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none`,children:[f(`tables.recentDays.date`),` `,(0,T.jsx)(u,{"aria-hidden":`true`,className:r(`h-3 w-3`,O===`date`&&`text-primary`)})]})}),(0,T.jsx)(`th`,{"aria-sort":q(`cost`),className:r(`px-2 py-2 text-right text-xs font-medium`,O===`cost`?`text-foreground`:`text-muted-foreground`),children:(0,T.jsxs)(`button`,{type:`button`,onClick:()=>K(`cost`),className:`inline-flex items-center gap-1 rounded-sm transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none`,children:[f(`tables.recentDays.cost`),` `,(0,T.jsx)(u,{"aria-hidden":`true`,className:r(`h-3 w-3`,O===`cost`&&`text-primary`)})]})}),(0,T.jsx)(`th`,{"aria-sort":q(`tokens`),className:r(`px-2 py-2 text-right text-xs font-medium`,O===`tokens`?`text-foreground`:`text-muted-foreground`),children:(0,T.jsxs)(`button`,{type:`button`,onClick:()=>K(`tokens`),className:`inline-flex items-center gap-1 rounded-sm transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none`,children:[f(`tables.recentDays.tokens`),` `,(0,T.jsx)(u,{"aria-hidden":`true`,className:r(`h-3 w-3`,O===`tokens`&&`text-primary`)})]})}),(0,T.jsx)(`th`,{className:`hidden px-2 py-2 text-right text-xs font-medium text-muted-foreground md:table-cell`,children:f(`common.input`)}),(0,T.jsx)(`th`,{className:`hidden px-2 py-2 text-right text-xs font-medium text-muted-foreground md:table-cell`,children:f(`common.output`)}),(0,T.jsx)(`th`,{className:`hidden px-2 py-2 text-right text-xs font-medium text-muted-foreground lg:table-cell`,children:f(`common.cacheWrite`)}),(0,T.jsx)(`th`,{className:`hidden px-2 py-2 text-right text-xs font-medium text-muted-foreground lg:table-cell`,children:f(`common.cacheRead`)}),(0,T.jsx)(`th`,{className:`hidden px-2 py-2 text-right text-xs font-medium text-muted-foreground xl:table-cell`,children:f(`common.thinking`)}),(0,T.jsx)(`th`,{className:`hidden px-2 py-2 text-right text-xs font-medium text-muted-foreground xl:table-cell`,children:f(`common.requestsShort`)}),(0,T.jsx)(`th`,{"aria-sort":q(`costPerM`),className:r(`px-2 py-2 text-right text-xs font-medium`,O===`costPerM`?`text-foreground`:`text-muted-foreground`),children:(0,T.jsxs)(`button`,{type:`button`,onClick:()=>K(`costPerM`),className:`inline-flex items-center gap-1 rounded-sm transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none`,children:[`$/1M`,` `,(0,T.jsx)(u,{"aria-hidden":`true`,className:r(`h-3 w-3`,O===`costPerM`&&`text-primary`)})]})}),(0,T.jsx)(`th`,{className:`px-2 py-2 text-left text-xs font-medium text-muted-foreground`,children:f(`tables.recentDays.models`)})]})}),(0,T.jsx)(`tbody`,{children:G.map(({day:e,benchmark:i,costPerM:a,uniqueModels:s})=>(0,T.jsxs)(`tr`,{className:`cursor-pointer border-b border-l-[3px] border-border/50 transition-colors hover:bg-muted/10 focus-visible:bg-muted/10 focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-inset active:bg-muted/20`,style:{borderLeftColor:`hsla(215, 70%, 55%, ${.2+(U>0?e.totalCost/U:0)*.8})`,...M(h,`52px`)},onClick:()=>t?.(e.date),onKeyDown:t=>J(t,e.date),role:t?`button`:void 0,tabIndex:t?0:void 0,children:[(0,T.jsx)(`td`,{className:`px-2 py-2.5 whitespace-nowrap`,children:o(e.date,`long`)}),(0,T.jsxs)(`td`,{className:`relative px-2 py-2.5 text-right font-mono tabular-nums`,children:[(0,T.jsx)(`div`,{className:`absolute inset-y-1 left-0 rounded-sm bg-primary/8 transition-all duration-300`,style:{width:`${U>0?e.totalCost/U*100:0}%`}}),(0,T.jsx)(`span`,{className:`relative`,children:(0,T.jsx)(x,{value:e.totalCost,type:`currency`})})]}),(0,T.jsx)(`td`,{className:`px-2 py-2.5 text-right font-mono tabular-nums`,children:(0,T.jsx)(x,{value:e.totalTokens,type:`tokens`})}),(0,T.jsx)(`td`,{className:`hidden px-2 py-2.5 text-right font-mono tabular-nums md:table-cell`,children:(0,T.jsx)(x,{value:e.inputTokens,type:`tokens`})}),(0,T.jsx)(`td`,{className:`hidden px-2 py-2.5 text-right font-mono tabular-nums md:table-cell`,children:(0,T.jsx)(x,{value:e.outputTokens,type:`tokens`})}),(0,T.jsx)(`td`,{className:`hidden px-2 py-2.5 text-right font-mono tabular-nums lg:table-cell`,children:(0,T.jsx)(x,{value:e.cacheCreationTokens,type:`tokens`})}),(0,T.jsx)(`td`,{className:`hidden px-2 py-2.5 text-right font-mono tabular-nums lg:table-cell`,children:(0,T.jsx)(x,{value:e.cacheReadTokens,type:`tokens`})}),(0,T.jsx)(`td`,{className:`hidden px-2 py-2.5 text-right font-mono tabular-nums xl:table-cell`,children:(0,T.jsx)(x,{value:e.thinkingTokens,type:`tokens`})}),(0,T.jsx)(`td`,{className:`hidden px-2 py-2.5 text-right font-mono tabular-nums xl:table-cell`,children:(0,T.jsx)(x,{value:e.requestCount,type:`number`})}),(0,T.jsx)(`td`,{className:`px-2 py-2.5 text-right font-mono tabular-nums`,children:(0,T.jsx)(x,{value:a,type:`currency`})}),(0,T.jsxs)(`td`,{className:`px-2 py-2.5`,children:[(0,T.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:s.map(({name:e,provider:t})=>(0,T.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] leading-tight font-medium`,style:{backgroundColor:m(e,.16),color:g(e)},children:[(0,T.jsx)(`span`,{children:e}),(0,T.jsx)(`span`,{className:r(`inline-flex items-center rounded-full border px-1 py-0.5 text-[9px] leading-none`,p(t)),children:t})]},`${e}-${t}`))}),n===`daily`&&i?.avgCost7!==void 0&&(0,T.jsxs)(`div`,{className:`mt-1 text-[10px] text-muted-foreground`,children:[f(`tables.recentDays.previousDay`),` `,i.prevCostDelta===void 0?`–`:`${i.prevCostDelta>=0?`↑`:`↓`}${Math.abs(i.prevCostDelta).toFixed(0)}%`,` `,`· `,f(`tables.recentDays.avg7d`),` `,c(i.avgCost7)]})]})]},e.date))})]})})]})]})}export{N as RecentDays};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{_ as t,a as n,b as r,c as i,d as a,f as o,l as s,m as c,p as l,t as u,v as d,w as f,y as p}from"./charts-vendor-CiBqdKXh.js";import{a as m}from"./motion-vendor-vKc6gXHZ.js";import{t as h}from"./useTranslation-BSl7t2D6.js";import{a as g,g as _,u as v}from"./formatters-yKppUXb3.js";import{c as y,t as b}from"./model-utils-BIvGAFGz.js";import{t as x}from"./help-content-Bt5KCpWS.js";import{n as S,r as C,t as w}from"./ChartCard-CBUnItl-.js";import{t as T}from"./ChartLegend-B64cJdDI.js";import{t as E}from"./CustomTooltip-CBVU1pyK.js";import{n as D,r as O,t as k}from"./chart-theme-D5iCFDJg.js";import{n as A,o as j}from"./calculations-GOdNqKo6.js";var M=e(f()),N=m();function P(e){return v(e,1)}function F(e,t,n,r,i){let a=e+t+n+r+i;return a>0?r/a*100:0}function I({timelineData:e,summaryData:f,viewMode:m}){let{t:v}=h(),I=(0,M.useId)().replace(/:/g,``),L=v(`charts.requestCacheHitRate.total`),R=v(m===`daily`?`charts.requestCacheHitRate.trailing7Rate`:`charts.requestCacheHitRate.trendRate`),z=(0,M.useMemo)(()=>A(f).map(e=>({...e,model:e.model===`Total`?L:e.model})),[f,L]),B=(0,M.useMemo)(()=>{if(z.length===0)return null;let e=z[0];return e?{total:e,topModel:z.slice(1).sort((e,t)=>t.totalRate-e.totalRate)[0]??null,dominantModel:z.slice(1).sort((e,t)=>t.totalBaseTokens-e.totalBaseTokens)[0]??null,models:Math.max(z.length-1,0)}:null},[z]),V=(0,M.useMemo)(()=>{if(e.length===0)return[];let t=z.slice(1).map(e=>e.model),n=[...e].sort((e,t)=>e.date.localeCompare(t.date)),r=n.map(e=>F(e.inputTokens,e.outputTokens,e.cacheCreationTokens,e.cacheReadTokens,e.thinkingTokens)),i=j(r,Math.min(7,n.length)),a={};for(let e of t)a[e]=[];for(let e of n){let n=new Map;for(let r of e.modelBreakdowns){let e=y(r.modelName);if(!t.includes(e))continue;let i=n.get(e)??{input:0,output:0,cacheCreate:0,cacheRead:0,thinking:0};i.input+=r.inputTokens,i.output+=r.outputTokens,i.cacheCreate+=r.cacheCreationTokens,i.cacheRead+=r.cacheReadTokens,i.thinking+=r.thinkingTokens,n.set(e,i)}for(let e of t){let t=n.get(e),r=a[e];r&&r.push(t?F(t.input,t.output,t.cacheCreate,t.cacheRead,t.thinking):0)}}return n.map((e,n)=>{let o={date:e.date,totalRate:r[n],totalRate_ma7:i[n]};for(let e of t)o[e]=a[e]?.[n]??0;return o})},[e,z]);if(!B||V.length===0)return null;let H=Math.max(220,Math.min(310,z.length*28+48)),U=Math.max(280,Math.min(420,z.length*34+56)),W=m===`daily`?280:250,G=m===`daily`?360:320,K=Object.keys(V[0]??{}).filter(e=>e!==`date`&&e!==`totalRate`&&e!==`totalRate_ma7`),q=(0,N.jsx)(`div`,{className:`mt-6 grid grid-cols-1 gap-4 xl:grid-cols-3`,children:z.slice(0,6).map(e=>(0,N.jsxs)(`div`,{className:`rounded-lg border border-border/50 bg-muted/10 p-3`,children:[(0,N.jsx)(`div`,{className:`truncate text-sm font-medium`,children:e.model}),(0,N.jsxs)(`div`,{className:`mt-2 flex items-end gap-3`,children:[(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`div`,{className:`text-[10px] tracking-wider text-muted-foreground uppercase`,children:v(`charts.requestCacheHitRate.totalRate`)}),(0,N.jsx)(`div`,{className:`text-lg font-semibold tabular-nums`,children:P(e.totalRate)})]}),(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`div`,{className:`text-[10px] tracking-wider text-muted-foreground uppercase`,children:v(`charts.requestCacheHitRate.trailing7Rate`)}),(0,N.jsx)(`div`,{className:`text-lg font-semibold tabular-nums`,children:P(e.trailing7Rate)})]})]})]},e.model))});return(0,N.jsx)(S,{title:v(`charts.requestCacheHitRate.title`),subtitle:v(`charts.requestCacheHitRate.subtitle`,{total:P(B.total.totalRate),trailing:P(B.total.trailing7Rate)}),info:x.requestCacheHitRate,chartData:z,valueKey:`totalRate`,valueFormatter:P,expandedExtra:q,children:e=>(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(`div`,{className:`mb-3 grid grid-cols-2 gap-2 text-center md:grid-cols-4`,children:[(0,N.jsxs)(`div`,{className:`rounded-lg bg-muted/20 p-2`,children:[(0,N.jsx)(`div`,{className:`text-[9px] tracking-wider text-muted-foreground uppercase`,children:v(`charts.requestCacheHitRate.totalRate`)}),(0,N.jsx)(`div`,{className:`text-sm font-semibold tabular-nums`,children:P(B.total.totalRate)})]}),(0,N.jsxs)(`div`,{className:`rounded-lg bg-muted/20 p-2`,children:[(0,N.jsx)(`div`,{className:`text-[9px] tracking-wider text-muted-foreground uppercase`,children:v(`charts.requestCacheHitRate.trailing7Rate`)}),(0,N.jsx)(`div`,{className:`text-sm font-semibold tabular-nums`,children:P(B.total.trailing7Rate)})]}),(0,N.jsxs)(`div`,{className:`rounded-lg bg-muted/20 p-2`,children:[(0,N.jsx)(`div`,{className:`text-[9px] tracking-wider text-muted-foreground uppercase`,children:v(`charts.requestCacheHitRate.topModel`)}),(0,N.jsx)(`div`,{className:`truncate text-sm font-semibold`,children:B.topModel?.model??`–`})]}),(0,N.jsxs)(`div`,{className:`rounded-lg bg-muted/20 p-2`,children:[(0,N.jsx)(`div`,{className:`text-[9px] tracking-wider text-muted-foreground uppercase`,children:v(`charts.requestCacheHitRate.models`)}),(0,N.jsx)(`div`,{className:`text-sm font-semibold tabular-nums`,children:B.models})]})]}),(0,N.jsxs)(`div`,{className:`grid gap-4 ${e?`grid-cols-1 xl:grid-cols-[2fr_1fr]`:`grid-cols-1 lg:grid-cols-[2fr_1fr]`}`,children:[(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`div`,{className:`mb-2 text-[10px] tracking-wider text-muted-foreground uppercase`,children:v(`charts.requestCacheHitRate.timelineHeading`,{unit:_(m)})}),(0,N.jsx)(w,{children:t=>(0,N.jsx)(C,{variant:`line`,children:(0,N.jsx)(r,{width:`100%`,height:e?G:W,children:(0,N.jsxs)(u,{data:V,margin:O,children:[(0,N.jsx)(`defs`,{children:(0,N.jsxs)(`linearGradient`,{id:`${I}-total-rate`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,N.jsx)(`stop`,{offset:`0%`,stopColor:D.cost,stopOpacity:.24}),(0,N.jsx)(`stop`,{offset:`100%`,stopColor:D.cost,stopOpacity:0})]})}),(0,N.jsx)(c,{strokeDasharray:`3 3`,stroke:D.grid,opacity:.3}),(0,N.jsx)(s,{dataKey:`date`,tickFormatter:g,stroke:D.axis,fontSize:11,tickLine:!1}),(0,N.jsx)(i,{type:`number`,domain:[0,100],tickFormatter:P,stroke:D.axis,fontSize:11,tickLine:!1,axisLine:!1}),(0,N.jsx)(d,{content:(0,N.jsx)(E,{formatter:e=>P(e),pinnedEntryNames:[v(`charts.requestCacheHitRate.totalRate`)],showComputedTotal:!1,hideZeroValues:!0}),cursor:{fill:`hsl(var(--muted))`,opacity:.12}}),(0,N.jsx)(p,{content:(0,N.jsx)(T,{})}),(0,N.jsx)(o,{type:`monotone`,dataKey:`totalRate`,stroke:D.cost,fill:`url(#${I}-total-rate)`,name:v(`charts.requestCacheHitRate.totalRate`),strokeWidth:2,dot:!1,activeDot:{r:5,strokeWidth:2,stroke:D.cost,fill:`hsl(var(--background))`},isAnimationActive:t,animationDuration:k.duration,animationEasing:k.easing}),(0,N.jsx)(l,{type:`monotone`,dataKey:`totalRate_ma7`,stroke:D.ma7,name:R,dot:!1,strokeWidth:2,strokeDasharray:`5 5`,connectNulls:!0,isAnimationActive:t,animationBegin:k.stagger,animationDuration:k.slowDuration,animationEasing:k.easing}),K.map((e,n)=>(0,N.jsx)(l,{type:`monotone`,dataKey:e,stroke:b(e),name:e,dot:!1,strokeWidth:1.8,connectNulls:!0,isAnimationActive:t,animationBegin:k.stagger*(n+2),animationDuration:k.slowDuration,animationEasing:k.easing},e))]})})})})]}),(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`div`,{className:`mb-2 text-[10px] tracking-wider text-muted-foreground uppercase`,children:v(`charts.requestCacheHitRate.modelBreakdownHeading`)}),(0,N.jsx)(w,{children:o=>(0,N.jsx)(C,{variant:`line`,children:(0,N.jsx)(r,{width:`100%`,height:e?U:H,children:(0,N.jsxs)(n,{data:z,layout:`vertical`,margin:{...O,left:e?30:20,right:8},barCategoryGap:e?14:10,children:[(0,N.jsx)(c,{strokeDasharray:`3 3`,stroke:D.grid,opacity:.22,horizontal:!1}),(0,N.jsx)(s,{type:`number`,domain:[0,100],tickFormatter:P,stroke:D.axis,fontSize:10,tickLine:!1,axisLine:!1}),(0,N.jsx)(i,{type:`category`,dataKey:`model`,stroke:D.axis,fontSize:10,tickLine:!1,axisLine:!1,width:e?126:108}),(0,N.jsx)(d,{content:(0,N.jsx)(E,{formatter:e=>P(e),pinnedEntryNames:[v(`charts.requestCacheHitRate.totalRate`),v(`charts.requestCacheHitRate.trailing7Rate`)],showComputedTotal:!1}),cursor:{fill:`hsl(var(--muted))`,opacity:.12}}),(0,N.jsx)(p,{content:(0,N.jsx)(T,{})}),(0,N.jsx)(a,{dataKey:`totalRate`,name:v(`charts.requestCacheHitRate.totalRate`),radius:[0,4,4,0],fill:D.cacheRead,isAnimationActive:o,animationDuration:k.duration,animationEasing:k.easing,children:z.map(e=>(0,N.jsx)(t,{fill:e.model===L?D.cost:D.cacheRead,fillOpacity:e.model===L?.95:.82},`${e.model}-total`))}),(0,N.jsx)(a,{dataKey:`trailing7Rate`,name:v(`charts.requestCacheHitRate.trailing7Rate`),radius:[0,4,4,0],fill:D.ma7,isAnimationActive:o,animationBegin:k.stagger,animationDuration:k.slowDuration,animationEasing:k.easing,children:z.map(e=>(0,N.jsx)(t,{fill:e.model===L?D.cumulative:D.ma7,fillOpacity:e.model===L?.95:.8},`${e.model}-recent`))})]})})})})]})]})]})})}export{I as RequestCacheHitRateByModel};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{w as t}from"./charts-vendor-CiBqdKXh.js";import{a as n,t as r}from"./motion-vendor-vKc6gXHZ.js";import{i,t as a}from"./useTranslation-BSl7t2D6.js";import{d as o,l as s,n as c,u as l}from"./formatters-yKppUXb3.js";import{a as u,i as d,n as f,t as p}from"./card-h-Z9EWBl.js";import{n as m}from"./help-content-Bt5KCpWS.js";import{t as h}from"./InfoHeading-oi90uCR7.js";var g=e(t()),_=n();function v({metrics:e,viewMode:t}){let{t:n}=a(),v=(0,g.useRef)(null),y=r(v,{once:!0,amount:.25}),b=i(),x=e.totalRequests>0?e.totalCacheRead/e.totalRequests:0,S=e.totalRequests>0?e.totalThinking/e.totalRequests:0,C=e.totalOutput>0?e.totalInput/e.totalOutput:0,w=e.activeDays>0?e.totalRequests/e.activeDays:0,T=[{label:n(`requestQuality.tokensPerRequest`),value:e.hasRequestData?o(e.avgTokensPerRequest):n(`common.notAvailable`),accent:`var(--chart-2)`,hint:n(`requestQuality.tokensHint`),progress:Math.min(e.avgTokensPerRequest/2e5,1)},{label:n(`requestQuality.costPerRequest`),value:e.hasRequestData?c(e.avgCostPerRequest):n(`common.notAvailable`),accent:`var(--chart-4)`,hint:n(`requestQuality.costHint`),progress:Math.min(e.avgCostPerRequest/.25,1)},{label:n(`requestQuality.cachePerRequest`),value:e.hasRequestData?o(x):n(`common.notAvailable`),accent:`var(--chart-1)`,hint:n(`requestQuality.cacheHint`),progress:Math.min(x/2e5,1)},{label:n(`requestQuality.thinkingPerRequest`),value:e.hasRequestData?o(S):n(`common.notAvailable`),accent:`var(--chart-5)`,hint:n(`requestQuality.thinkingHint`),progress:Math.min(S/1e4,1)}];return(0,_.jsxs)(p,{ref:v,className:`overflow-visible`,children:[(0,_.jsx)(d,{children:(0,_.jsx)(h,{info:m.requestQuality,children:(0,_.jsx)(u,{className:`text-sm font-medium text-muted-foreground`,children:n(`requestQuality.title`)})})}),(0,_.jsxs)(f,{className:`space-y-4`,children:[(0,_.jsx)(`div`,{className:`grid grid-cols-2 gap-3 xl:grid-cols-4`,children:T.map(t=>(0,_.jsxs)(`div`,{className:`rounded-xl border border-border/50 bg-muted/15 p-3`,children:[(0,_.jsx)(`div`,{className:`text-[10px] tracking-[0.14em] text-muted-foreground uppercase`,children:t.label}),(0,_.jsx)(`div`,{className:`mt-1 text-lg font-semibold tabular-nums`,children:t.value}),(0,_.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:t.hint}),(0,_.jsx)(`div`,{className:`mt-3 h-1.5 overflow-hidden rounded-full bg-muted/40`,children:(0,_.jsx)(`div`,{className:`h-full rounded-full transition-[width] duration-700 ease-out motion-reduce:transition-none`,style:{backgroundColor:`hsl(${t.accent})`,width:(y||b)&&e.hasRequestData&&t.progress>0?`${Math.max(t.progress*100,6)}%`:`0%`}})})]},t.label))}),(0,_.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-4`,children:[(0,_.jsxs)(`div`,{className:`rounded-xl border border-border/50 bg-gradient-to-br from-primary/[0.12] via-transparent to-transparent p-4`,children:[(0,_.jsx)(`div`,{className:`text-[10px] tracking-[0.14em] text-muted-foreground uppercase`,children:n(`requestQuality.requestDensity`)}),(0,_.jsx)(`div`,{className:`mt-1 text-xl font-semibold tabular-nums`,children:s(Math.round(w))}),(0,_.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:n(`requestQuality.averagePerActiveUnit`,{unit:n(t===`yearly`?`periods.year`:t===`monthly`?`periods.month`:`periods.day`)})})]}),(0,_.jsxs)(`div`,{className:`rounded-xl border border-border/50 bg-gradient-to-br from-chart-3/[0.12] via-transparent to-transparent p-4`,children:[(0,_.jsx)(`div`,{className:`text-[10px] tracking-[0.14em] text-muted-foreground uppercase`,children:n(`requestQuality.cacheHitRate`)}),(0,_.jsx)(`div`,{className:`mt-1 text-xl font-semibold tabular-nums`,children:l(e.cacheHitRate,1)}),(0,_.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:n(`requestQuality.cacheHitHint`)})]}),(0,_.jsxs)(`div`,{className:`rounded-xl border border-border/50 bg-gradient-to-br from-chart-4/[0.12] via-transparent to-transparent p-4`,children:[(0,_.jsx)(`div`,{className:`text-[10px] tracking-[0.14em] text-muted-foreground uppercase`,children:n(`requestQuality.inputOutput`)}),(0,_.jsxs)(`div`,{className:`mt-1 text-xl font-semibold tabular-nums`,children:[C.toFixed(2),`:1`]}),(0,_.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:n(`requestQuality.inputOutputHint`)})]}),(0,_.jsxs)(`div`,{className:`rounded-xl border border-border/50 bg-gradient-to-br from-chart-5/[0.12] via-transparent to-transparent p-4`,children:[(0,_.jsx)(`div`,{className:`text-[10px] tracking-[0.14em] text-muted-foreground uppercase`,children:n(`requestQuality.topRequestModel`)}),(0,_.jsx)(`div`,{className:`mt-1 truncate text-lg font-semibold`,children:e.topRequestModel?.name??`–`}),(0,_.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e.topRequestModel?`${s(e.topRequestModel.requests)} ${n(`common.requests`)}`:n(`requestQuality.noRequestLeader`)})]})]})]})]})}export{v as RequestQuality};
@@ -1 +0,0 @@
1
- import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{_ as t,b as n,c as r,f as i,g as a,i as o,l as s,m as c,p as l,t as u,v as d,w as f,y as p}from"./charts-vendor-CiBqdKXh.js";import{a as m}from"./motion-vendor-vKc6gXHZ.js";import{t as h}from"./useTranslation-BSl7t2D6.js";import{a as g,g as _}from"./formatters-yKppUXb3.js";import{r as v}from"./i18n-C88wS2Uy.js";import{t as y}from"./model-utils-BIvGAFGz.js";import{t as b}from"./formatted-value-rO0EpKbc.js";import{t as x}from"./help-content-Bt5KCpWS.js";import{n as S,r as C,t as w}from"./ChartCard-CBUnItl-.js";import{t as T}from"./ChartLegend-B64cJdDI.js";import{t as E}from"./CustomTooltip-CBVU1pyK.js";import{n as D,r as O,t as k}from"./chart-theme-D5iCFDJg.js";var A=e(f()),j=m();function M(e){return new Intl.NumberFormat(v(),{notation:e>=1e4?`compact`:`standard`,maximumFractionDigits:+(e>=1e4)}).format(e)}function N({viewBox:e,total:t}){let{t:n}=h();if(!e)return null;let{cx:r,cy:i}=e;return(0,j.jsxs)(`g`,{children:[(0,j.jsx)(`text`,{x:r,y:i-6,textAnchor:`middle`,className:`fill-muted-foreground`,fontSize:11,children:n(`charts.requestsOverTime.total`)}),(0,j.jsx)(`text`,{x:r,y:i+14,textAnchor:`middle`,className:`fill-foreground`,fontSize:16,fontWeight:600,children:t})]})}function P({data:e,viewMode:f=`daily`,onClickDay:m}){let{t:v}=h(),P=(0,A.useId)().replace(/:/g,``),F=v(`charts.requestsOverTime.averagePerUnit`,{unit:_(f)}),I=v(f===`daily`?`charts.requestsOverTime.movingAverage`:`charts.requestsOverTime.trend`),L=v(f===`daily`?`charts.requestsOverTime.movingAverageHeading`:`charts.requestsOverTime.trendHeading`),R=(0,A.useMemo)(()=>{if(e.length===0)return null;let t=new Map;for(let n of e)for(let[e,r]of Object.entries(n))e===`date`||e===`totalRequests`||e===`totalRequestsMA7`||e===`totalRequestsPrev`||e.endsWith(`_ma7`)||e.endsWith(`Prev`)||typeof r==`number`&&t.set(e,(t.get(e)??0)+r);let n=Array.from(t.entries()).sort((e,t)=>t[1]-e[1]),r=e.reduce((e,t)=>e+t.totalRequests,0),i=[...e].sort((e,t)=>t.totalRequests-e.totalRequests)[0];return i?{totalRequests:r,peak:i,topModels:n}:null},[e]),z=(0,A.useMemo)(()=>(R?.topModels??[]).slice(0,5).map(([e])=>e),[R]),B=(0,A.useMemo)(()=>(R?.topModels??[]).map(([e,t])=>({name:e,value:t})),[R]),V=e=>{let t=e;t?.activePayload?.[0]?.payload?.date&&m&&m(t.activePayload[0].payload.date)},H=(0,j.jsx)(w,{children:t=>(0,j.jsxs)(`div`,{className:`mt-6 space-y-5`,children:[(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`div`,{className:`mb-2 text-[10px] tracking-wider text-muted-foreground uppercase`,children:L}),(0,j.jsx)(C,{variant:`line`,children:(0,j.jsx)(n,{width:`100%`,height:360,children:(0,j.jsxs)(u,{data:e,margin:O,children:[(0,j.jsx)(c,{strokeDasharray:`3 3`,stroke:D.grid,opacity:.3}),(0,j.jsx)(s,{dataKey:`date`,tickFormatter:g,stroke:D.axis,fontSize:11,tickLine:!1}),(0,j.jsx)(r,{tickFormatter:M,stroke:D.axis,fontSize:11,tickLine:!1,axisLine:!1}),(0,j.jsx)(d,{content:(0,j.jsx)(E,{formatter:e=>M(e)}),cursor:{stroke:`hsl(var(--muted))`,strokeWidth:1}}),(0,j.jsx)(p,{content:(0,j.jsx)(T,{})}),(0,j.jsx)(l,{type:`monotone`,dataKey:`totalRequestsMA7`,stroke:D.ma7,name:v(`charts.requestsOverTime.totalMovingAverage`,{label:I}),dot:!1,strokeWidth:2.5,strokeDasharray:`6 4`,connectNulls:!0,isAnimationActive:t,animationBegin:0,animationDuration:k.slowDuration}),(R?.topModels??[]).map(([e],n)=>(0,j.jsx)(l,{type:`monotone`,dataKey:`${e}_ma7`,stroke:y(e),name:`${e} ${I}`,dot:!1,strokeWidth:2,strokeDasharray:`5 4`,connectNulls:!0,isAnimationActive:t,animationBegin:k.stagger*(n%6),animationDuration:k.slowDuration},`${e}_ma7`))]})})})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`div`,{className:`mb-2 text-[10px] tracking-wider text-muted-foreground uppercase`,children:v(`charts.requestsOverTime.requestsByModelTotal`)}),(0,j.jsx)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2 xl:grid-cols-3`,children:(R?.topModels??[]).map(([e,t])=>{let n=R&&R.totalRequests>0?t/R.totalRequests*100:0;return(0,j.jsxs)(`div`,{className:`rounded-lg border border-border/50 bg-muted/10 p-3`,children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,j.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,j.jsx)(`span`,{className:`h-2.5 w-2.5 shrink-0 rounded-full`,style:{backgroundColor:y(e)}}),(0,j.jsx)(`div`,{className:`truncate text-sm font-medium`,children:e})]}),(0,j.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[n.toFixed(1),`%`]})]}),(0,j.jsx)(`div`,{className:`mt-2 text-lg font-semibold tabular-nums`,children:M(t)}),(0,j.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:v(`charts.requestsOverTime.requestsInRange`)})]},e)})})]})]})});return(0,j.jsx)(S,{title:v(`charts.requestsOverTime.title`),subtitle:R?v(`charts.requestsOverTime.summary`,{total:M(R.totalRequests),peak:M(R.peak.totalRequests),date:g(R.peak.date)}):v(`charts.requestsOverTime.subtitle`),info:x.requestsOverTime,summary:R?(0,j.jsx)(b,{value:R.totalRequests,type:`number`}):void 0,chartData:e,valueKey:`totalRequests`,valueFormatter:M,expandedExtra:H,children:f=>{let m=f?420:320,h=f?440:340,_=f?70:54,b=f?112:82,x=f?`48%`:`46%`;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`div`,{className:`mb-3 grid grid-cols-2 gap-2 text-center md:grid-cols-4`,children:[(0,j.jsxs)(`div`,{className:`rounded-lg bg-muted/20 p-2`,children:[(0,j.jsx)(`div`,{className:`text-[9px] tracking-wider text-muted-foreground uppercase`,children:v(`charts.requestsOverTime.total`)}),(0,j.jsx)(`div`,{className:`text-sm font-semibold tabular-nums`,children:R?M(R.totalRequests):`0`})]}),(0,j.jsxs)(`div`,{className:`rounded-lg bg-muted/20 p-2`,children:[(0,j.jsx)(`div`,{className:`text-[9px] tracking-wider text-muted-foreground uppercase`,children:F}),(0,j.jsx)(`div`,{className:`text-sm font-semibold tabular-nums`,children:R&&e.length>0?M(R.totalRequests/e.length):`0`})]}),(0,j.jsxs)(`div`,{className:`rounded-lg bg-muted/20 p-2`,children:[(0,j.jsx)(`div`,{className:`text-[9px] tracking-wider text-muted-foreground uppercase`,children:v(`charts.requestsOverTime.topModel`)}),(0,j.jsx)(`div`,{className:`truncate text-sm font-semibold`,children:R?.topModels[0]?.[0]??`–`})]}),(0,j.jsxs)(`div`,{className:`rounded-lg bg-muted/20 p-2`,children:[(0,j.jsx)(`div`,{className:`text-[9px] tracking-wider text-muted-foreground uppercase`,children:v(`charts.requestsOverTime.topShare`)}),(0,j.jsx)(`div`,{className:`text-sm font-semibold tabular-nums`,children:R&&R.totalRequests>0&&R.topModels[0]?`${(R.topModels[0][1]/R.totalRequests*100).toFixed(1)}%`:`–`})]})]}),(0,j.jsxs)(`div`,{className:`grid gap-4 ${f?`grid-cols-1 xl:grid-cols-3`:`grid-cols-1 lg:grid-cols-3`}`,children:[(0,j.jsx)(`div`,{className:f?`xl:col-span-2`:`lg:col-span-2`,children:(0,j.jsx)(w,{children:t=>(0,j.jsx)(C,{variant:`line`,children:(0,j.jsx)(n,{width:`100%`,height:m,children:(0,j.jsxs)(u,{data:e,margin:O,onClick:V,children:[(0,j.jsx)(`defs`,{children:(0,j.jsxs)(`linearGradient`,{id:`${P}-requests`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,j.jsx)(`stop`,{offset:`0%`,stopColor:D.cumulative,stopOpacity:.28}),(0,j.jsx)(`stop`,{offset:`100%`,stopColor:D.cumulative,stopOpacity:0})]})}),(0,j.jsx)(c,{strokeDasharray:`3 3`,stroke:D.grid,opacity:.3}),(0,j.jsx)(s,{dataKey:`date`,tickFormatter:g,stroke:D.axis,fontSize:11,tickLine:!1}),(0,j.jsx)(r,{tickFormatter:M,stroke:D.axis,fontSize:11,tickLine:!1,axisLine:!1}),(0,j.jsx)(d,{content:(0,j.jsx)(E,{formatter:e=>M(e),pinnedEntryNames:[v(`charts.requestsOverTime.totalRequestsSeries`)],showComputedTotal:!1}),cursor:{fill:`hsl(var(--muted))`,opacity:.12}}),(0,j.jsx)(p,{content:(0,j.jsx)(T,{})}),(0,j.jsx)(i,{type:`monotone`,dataKey:`totalRequests`,stroke:D.cumulative,fill:`url(#${P}-requests)`,name:v(`charts.requestsOverTime.totalRequestsSeries`),strokeWidth:1.8,dot:!1,activeDot:{r:5,strokeWidth:2,stroke:D.cumulative,fill:`hsl(var(--background))`},isAnimationActive:t,animationDuration:k.duration}),(0,j.jsx)(l,{type:`monotone`,dataKey:`totalRequestsMA7`,stroke:D.ma7,name:I,dot:!1,strokeWidth:2.2,strokeDasharray:`5 5`,connectNulls:!0,isAnimationActive:t,animationBegin:k.stagger,animationDuration:k.slowDuration}),z.map((e,n)=>(0,j.jsx)(l,{type:`monotone`,dataKey:e,stroke:y(e),name:e,dot:!1,strokeWidth:1.6,isAnimationActive:t,animationBegin:k.stagger*(n%5+1),animationDuration:k.duration},e))]})})})})}),(0,j.jsx)(`div`,{className:`min-w-0 pt-1`,children:(0,j.jsx)(w,{children:e=>(0,j.jsx)(C,{variant:`radial`,children:(0,j.jsx)(n,{width:`100%`,height:h,children:(0,j.jsxs)(o,{children:[(0,j.jsxs)(a,{data:B,cx:`50%`,cy:x,innerRadius:_,outerRadius:b,paddingAngle:2,dataKey:`value`,nameKey:`name`,isAnimationActive:e,animationDuration:k.duration,animationBegin:k.stagger,animationEasing:k.easing,children:[B.map(e=>(0,j.jsx)(t,{fill:y(e.name)},e.name)),(0,j.jsx)(N,{total:R?M(R.totalRequests):`0`})]}),(0,j.jsx)(d,{content:(0,j.jsx)(E,{formatter:e=>M(e)})}),(0,j.jsx)(p,{wrapperStyle:{fontSize:`12px`,paddingTop:f?`18px`:`8px`},formatter:e=>{let t=B.find(t=>t.name===e);return(0,j.jsxs)(`span`,{className:`text-xs text-foreground`,children:[e,` (`,t?M(t.value):``,`)`]})}})]})})})})})]})]})}})}export{P as RequestsOverTime};