import e from"../../../../../_virtual/index19.mjs";import{longhandTimeProperties as t,shorthandTimeProperties as s}from"../../reference/properties.mjs";import{declarationValueIndex as i}from"../../utils/nodeFieldIndices.mjs";import o from"../../utils/getDeclarationValue.mjs";import r from"../../utils/getDimension.mjs";import{isNumber as n}from"../../utils/validateTypes.mjs";import m from"../../utils/optionsMatches.mjs";import l from"../../utils/report.mjs";import u from"../../utils/ruleMessages.mjs";import a from"../../utils/validateOptions.mjs";import p from"../../utils/vendor.mjs";const c="time-min-milliseconds",d=u(c,{expected:e=>`Expected a minimum of ${e} milliseconds`}),f=new Set(["animation-delay","transition-delay"]),g=(u,g)=>(j,x)=>{if(!a(x,c,{actual:u,possible:n},{actual:g,possible:{ignore:["delay"]},optional:!0}))return;const h=u,v=m(g,"ignore","delay");function y(e){const{unit:t,number:s}=e;if(null===t||null===s)return!0;const i=Number(s);if(i<=0)return!0;const o=t.toLowerCase();return!("ms"===o&&i<h)&&!("s"===o&&1e3*i<h)}function w(e,t,s){const o=i(e)+t,r=o+s;l({result:x,ruleName:c,message:d.expected,messageArgs:[h],index:o,endIndex:r,node:e})}j.walkDecls(i=>{const n=p.unprefixed(i.prop.toLowerCase()),m=i.value,l=e(o(i));let u=0;l.walk(e=>{const{value:o,sourceIndex:l}=e,a=r(e);!t.has(n)||function(e){if(v&&f.has(e))return!0;return!1}(n)||y(a)||w(i,0,m.length),s.has(n)&&(u=function(e,t,s){const{unit:i}=e;null!==i&&s++;","===t&&(s=0);return s}(a,o,u),y(a)||v&&1!==u||w(i,l,o.length))})})};g.ruleName=c,g.messages=d,g.meta={url:"https://stylelint.io/user-guide/rules/time-min-milliseconds"};export{g as default};