1import{Ct as e,E as t,H as n,L as r,O as i,Q as a,S as o,T as s,U as c,_t as l,b as u,cn as d,dn as f,ft as p,nt as m,on as h,p as g,qt as _,tt as v,ut as y,v as b,x,zt as S}from"./EwwzsHhd.js";import{r as C}from"./DTgFxIHm.js";import{v as w}from"./MPovi0hz.js";import{n as T,p as E,t as D,u as O}from"./DXDt5E65.js";import{t as k}from"./DHihWhf5.js";import{g as A}from"./CWLsucG-2.js";import{r as j}from"./DpwmcyME2.js";import{t as M}from"./Cfr87m3-2.js";import{n as N}from"./C7zSito8.js";r(),e();var P=100,[F,I]=E(`ProgressRoot`),L=e=>typeof e==`number`;function R(e,t){return k(e)||L(e)&&!Number.isNaN(e)&&e<=t&&e>=0?e:(console.error(`Invalid prop \`value\` of value \`${e}\` supplied to \`ProgressRoot\`. The \`value\` prop must be: 2 - a positive number 3 - less than the value passed to \`max\` (or ${P} if no \`max\` prop is set) 4 - \`null\` or \`undefined\` if the progress is indeterminate. 5 6Defaulting to \`null\`.`),null)}function z(e){return L(e)&&!Number.isNaN(e)&&e>0?e:(console.error(`Invalid prop \`max\` of value \`${e}\` supplied to \`ProgressRoot\`. Only numbers greater than 0 are valid max values. Defaulting to \`${P}\`.`),P)}var B=i({__name:`ProgressRoot`,props:{modelValue:{type:[Number,null],required:!1},max:{type:Number,required:!1,default:P},getValueLabel:{type:Function,required:!1,default:(e,t)=>L(e)?`${Math.round(e/t*P)}%`:void 0},getValueText:{type:Function,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`update:modelValue`,`update:max`],setup(e,{emit:t}){let n=e,r=t;M();let i=A(n,`modelValue`,r,{passive:n.modelValue===void 0}),o=A(n,`max`,r,{passive:n.max===void 0});p(()=>i.value,async e=>{let t=R(e,n.max);t!==e&&(await c(),i.value=t)},{immediate:!0}),p(()=>n.max,e=>{let t=z(n.max);t!==e&&(o.value=t)},{immediate:!0});let s=b(()=>k(i.value)?`indeterminate`:i.value===o.value?`complete`:`loading`);return I({modelValue:i,max:o,progressState:s}),(e,t)=>(a(),u(S(O),{"as-child":e.asChild,as:e.as,"aria-valuemax":S(o),"aria-valuemin":0,"aria-valuenow":L(S(i))?S(i):void 0,"aria-valuetext":e.getValueText?.(S(i),S(o)),"aria-label":e.getValueLabel(S(i),S(o)),role:`progressbar`,"data-state":s.value,"data-value":S(i)??void 0,"data-max":S(o)},{default:l(()=>[m(e.$slots,`default`,{modelValue:S(i)})]),_:3},8,[`as-child`,`as`,`aria-valuemax`,`aria-valuenow`,`aria-valuetext`,`aria-label`,`data-state`,`data-value`,`data-max`]))}});r(),e();var V=i({__name:`ProgressIndicator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,r=F();return M(),(e,i)=>(a(),u(S(O),n(t,{"data-state":S(r).progressState.value,"data-value":S(r).modelValue?.value??void 0,"data-max":S(r).max.value}),{default:l(()=>[m(e.$slots,`default`)]),_:3},16,[`data-state`,`data-value`,`data-max`]))}}),H={slots:{root:`gap-2`,base:`relative overflow-hidden rounded-full bg-accented`,indicator:`rounded-full size-full transition-transform duration-200 ease-out motion-reduce:data-[state=indeterminate]:animate-pulse`,status:`flex text-dimmed transition-[width] duration-200`,steps:`grid items-end`,step:`truncate text-end row-start-1 col-start-1 transition-opacity`},variants:{animation:{carousel:``,"carousel-inverse":``,swing:``,elastic:``},color:{primary:{indicator:`bg-primary`,steps:`text-primary`},secondary:{indicator:`bg-secondary`,steps:`text-secondary`},white:{indicator:`bg-white`,steps:`text-white`},info:{indicator:`bg-info`,steps:`text-info`},success:{indicator:`bg-success`,steps:`text-success`},warning:{indicator:`bg-warning`,steps:`text-warning`},error:{indicator:`bg-error`,steps:`text-error`},dark:{indicator:`bg-dark`,steps:`text-dark`},neutral:{indicator:`bg-inverted`,steps:`text-inverted`}},size:{"2xs":{status:`text-xs`,steps:`text-xs`},xs:{status:`text-xs`,steps:`text-xs`},sm:{status:`text-sm`,steps:`text-sm`},md:{status:`text-sm`,steps:`text-sm`},lg:{status:`text-sm`,steps:`text-sm`},xl:{status:`text-base`,steps:`text-base`},"2xl":{status:`text-base`,steps:`text-base`}},step:{active:{step:`opacity-100`},first:{step:`opacity-100 text-muted`},other:{step:`opacity-0`},last:{step:``}}
6,orientation:{horizontal:{root:`w-full flex flex-col`,base:`w-full`,status:`flex-row items-center justify-end min-w-fit`},vertical:{root:`h-full flex flex-row-reverse`,base:`h-full`,status:`flex-col justify-end min-h-fit`}},inverted:{true:{status:`self-end`}}},compoundVariants:[{inverted:!0,orientation:`horizontal`,class:{step:`text-start`,status:`flex-row-reverse`}},{inverted:!0,orientation:`vertical`,class:{steps:`items-start`,status:`flex-col-reverse`}},{orientation:`horizontal`,size:`2xs`,class:`h-px`},{orientation:`horizontal`,size:`xs`,class:`h-0.5`},{orientation:`horizontal`,size:`sm`,class:`h-1`},{orientation:`horizontal`,size:`md`,class:`h-2`},{orientation:`horizontal`,size:`lg`,class:`h-3`},{orientation:`horizontal`,size:`xl`,class:`h-4`},{orientation:`horizontal`,size:`2xl`,class:`h-5`},{orientation:`vertical`,size:`2xs`,class:`w-px`},{orientation:`vertical`,size:`xs`,class:`w-0.5`},{orientation:`vertical`,size:`sm`,class:`w-1`},{orientation:`vertical`,size:`md`,class:`w-2`},{orientation:`vertical`,size:`lg`,class:`w-3`},{orientation:`vertical`,size:`xl`,class:`w-4`},{orientation:`vertical`,size:`2xl`,class:`w-5`},{orientation:`horizontal`,animation:`carousel`,class:{indicator:`motion-safe:data-[state=indeterminate]:animate-[carousel_2s_ease-in-out_infinite] motion-safe:data-[state=indeterminate]:rtl:animate-[carousel-rtl_2s_ease-in-out_infinite]`}},{orientation:`vertical`,animation:`carousel`,class:{indicator:`motion-safe:data-[state=indeterminate]:animate-[carousel-vertical_2s_ease-in-out_infinite]`}},{orientation:`horizontal`,animation:`carousel-inverse`,class:{indicator:`motion-safe:data-[state=indeterminate]:animate-[carousel-inverse_2s_ease-in-out_infinite] motion-safe:data-[state=indeterminate]:rtl:animate-[carousel-inverse-rtl_2s_ease-in-out_infinite]`}},{orientation:`vertical`,animation:`carousel-inverse`,class:{indicator:`motion-safe:data-[state=indeterminate]:animate-[carousel-inverse-vertical_2s_ease-in-out_infinite]`}},{orientation:`horizontal`,animation:`swing`,class:{indicator:`motion-safe:data-[state=indeterminate]:animate-[swing_2s_ease-in-out_infinite]`}},{orientation:`vertical`,animation:`swing`,class:{indicator:`motion-safe:data-[state=indeterminate]:animate-[swing-vertical_2s_ease-in-out_infinite]`}},{orientation:`horizontal`,animation:`elastic`,class:{indicator:`motion-safe:data-[state=indeterminate]:animate-[elastic_2s_ease-in-out_infinite]`}},{orientation:`vertical`,animation:`elastic`,class:{indicator:`motion-safe:data-[state=indeterminate]:animate-[elastic-vertical_2s_ease-in-out_infinite]`}}],defaultVariants:{animation:`carousel`,color:`primary`,size:`md`}};r(),e(),_();var U={__name:`UProgress`,props:{as:{type:null,required:!1},max:{type:[Number,Array],required:!1},status:{type:Boolean,required:!1},inverted:{type:Boolean,required:!1,default:!1},size:{type:null,required:!1},color:{type:null,required:!1},orientation:{type:null,required:!1,default:`horizontal`},animation:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},getValueLabel:{type:Function,required:!1},getValueText:{type:Function,required:!1},modelValue:{type:[Number,null],required:!1,default:null}},emits:[`update:modelValue`,`update:max`],setup(e,{emit:r}){let i=e,c=r,p=y(),_=T(`progress`,i),{dir:E}=N(),k=C(),A=j(w(_,`getValueLabel`,`getValueText`,`modelValue`),c),M=b(()=>A.value.modelValue===null),P=b(()=>Array.isArray(_.max)),F=b(()=>{if(!(M.value||!_.max))return Array.isArray(_.max)?_.max.length-1:Number(_.max)}),I=b(()=>{if(!M.value)switch(!0){case A.value.modelValue<0:return 0;case A.value.modelValue>(F.value??100):return 100;default:return Math.round(A.value.modelValue/(F.value??100)*100)}}),L=b(()=>{if(I.value!==void 0)return _.orientation===`vertical`?{transform:`translateY(${_.inverted?``:`-`}${100-I.value}%)`}:E.value===`rtl`?{transform:`translateX(${_.inverted?`-`:``}${100-I.value}%)`}:{transform:`translateX(${_.inverted?``:`-`}${100-I.value}%)`}}),R=b(()=>{let e=`${Math.max(I.value??0,0)}%`;return _.orientation===`vertical`?{height:e}:{width:e}});function z(e){return e===Number(_.modelValue)}function U(e){return e===0}function W(e){return e===F.value}function G(e){return e=Number(e),z(e)&&!U(e)?`active`:U(e)&&z(e)?`first`:W(e)&&z(e)?`last`:`other`}let K=b(()=>D({extend:H,...k.ui?.progress||{}})({animation:_.animation,size:_.size,color:_.color,orientation:_.orientation,inverted:_.inverted}));return(e,r)=>(a(),u(S(O),{as:S(_).as,"data-orientation":S(_).orientation,"data-slot":`root`,class:h(K.value.root({class:[S(_).ui?.root,S(_).class]}))},{default:l(()=>[!M.value&&(S(_).status||p.status)?(a(),o(`div`,{key:0,"data-slot":`status`,class:h(K.value.status({class:S(_).ui?.status})),style:d(R.value)},[m(e.$slots,`status`,{percent:I.value},()=>[s(f(I.value)+`% `,1)])],6)):x(``,!0),t(S(B),n(S(A),{max:F.value,"data-slot":`base`,class:K.value.base({class:S(_).ui?.base}),style:{transform:`translateZ(0)`}}),{default:l(()=>[t(S(V),{"data-slot":`indicator`,class:h(K.value.indicator({class:S(_).ui?.indicator})),style:d(L.value)},null,8,[`class`,`style`])]),_:1},16,[`max`,`class`]),P.value?(a(),o(`div`,{key:1,"data-slot":`steps`,class:h(K.value.steps({class:S(_).ui?.steps}))},[(a(!0),o(g,null,v(S(_).max,(t,n)=>(a(),o(`div`,{key:n,"data-slot":`step`,class:h(K.value.step({class:S(_).ui?.step,step:G(n)}))},[m(e.$slots,`step-${n}`,{step:t},()=>[s(f(t),1)])],2))),128))],2)):x(``,!0)]),_:3},8,[`as`,`data-orientation`,`class`]))}};export{U as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.