import{__require as r}from"../isStandardSyntaxProperty.mjs";import{__require as e}from"../isCustomProperty.mjs";import{__require as t}from"./isDollarVariable.mjs";import{__require as a}from"./isAtVariable.mjs";import{__require as o}from"./calcAtRulePatternPriority.mjs";import{__require as s}from"./calcRulePatternPriority.mjs";var i,l;function n(){if(l)return i;l=1;const n=r(),m=e(),p=t(),u=a(),c=o(),f=s();return i=function(r,e){let t;if(u(e))t="at-variables";else if("decl"===e.type)m(e.prop)?t="custom-properties":p(e.prop)?t="dollar-variables":n(e.prop)&&(t="declarations");else if("rule"===e.type){t={type:"rule",selector:e.selector};const a=r.rule;if(a&&a.length){let r,e=0;if(a.forEach(a=>{const o=f(a,t);o>e&&(e=o,r=a)}),e)return r}}else if("atrule"===e.type){t={type:"at-rule",name:e.name,hasBlock:!1},e.nodes&&e.nodes.length&&(t.hasBlock=!0),e.params&&e.params.length&&(t.parameter=e.params);const a=r["at-rule"];if(a&&a.length){let r,e=0;if(a.forEach(a=>{const o=c(a,t);o>e&&(e=o,r=a)}),e)return r}}return r[t]?r[t]:null}}export{n as __require};