import*as SDK from"../sdk/sdk.js";export const Category={Layout:"Layout",Text:"Text",Appearance:"Appearance",Animation:"Animation",Grid:"Grid",Flex:"Flex",Table:"Table",CSSVariables:"CSS Variables",GeneratedContent:"Generated Content",Other:"Other"};export const DefaultCategoryOrder=[Category.Layout,Category.Text,Category.Appearance,Category.Animation,Category.CSSVariables,Category.Grid,Category.Flex,Category.Table,Category.GeneratedContent,Category.Other];const CategorizedProperties=new Map([[Category.Layout,["display","margin","padding","height","width","position","top","right","bottom","left","z-index","float","clear","overflow","resize","clip","visibility","box-sizing","align-content","align-items","align-self","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","justify-content","order","inline-size","block-size","min-inline-size","min-block-size","max-inline-size","max-block-size","min-width","max-width","min-height","max-height"]],[Category.Text,["font","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","font-smoothing","direction","tab-size","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-justify","text-overflow","text-shadow","text-transform","text-size-adjust","line-height","vertical-align","letter-spacing","word-spacing","white-space","word-break","word-wrap"]],[Category.Appearance,["color","outline","outline-color","outline-offset","outline-style","Outline-width","border","border-image","background","cursor","box-shadow","\u2248","tap-highlight-color"]],[Category.Animation,["animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","transition","transition-delay","transition-duration","transition-property","transition-timing-function"]],[Category.Grid,["grid","grid-column","grid-row","order","place-items","place-content","place-self"]],[Category.Flex,["flex","order","place-items","place-content","place-self"]],[Category.Table,["border-collapse","border-spacing","caption-side","empty-cells","table-layout"]],[Category.GeneratedContent,["content","quotes","counter-reset","counter-increment"]]]),CategoriesByPropertyName=new Map;for(const[e,t]of CategorizedProperties)for(const o of t){CategoriesByPropertyName.has(o)||CategoriesByPropertyName.set(o,[]);CategoriesByPropertyName.get(o).push(e)}const matchCategoriesByPropertyName=e=>CategoriesByPropertyName.has(e)?CategoriesByPropertyName.get(e):e.startsWith("--")?[Category.CSSVariables]:[];export const categorizePropertyName=e=>{const t=SDK.CSSMetadata.cssMetadata(),o=t.canonicalPropertyName(e),a=matchCategoriesByPropertyName(o);if(a.length>0)return a;const i=t.shorthands(o);if(i)for(const r of i){const e=matchCategoriesByPropertyName(r);if(e.length>0)return e}return[Category.Other]};