/*
 * Copyright (c) 2018, 2026, Oracle and/or its affiliates.
 * Licensed under The Universal Permissive License (UPL), Version 1.0
 * as shown at https://oss.oracle.com/licenses/upl/
 */
const OJPREFIX="oj-";module.exports=function(val){var classes,style,isExpr,i,j;isExpr=val.startsWith("[[")||val.startsWith("{{");val=_cleanStyle(val.toLowerCase());classes=val.split(" ");if(classes.length){for(i=0,j=0;i<classes.length;i++){style=classes[i].trim();if(style&&style.startsWith(OJPREFIX)){if(isExpr&&style.endsWith("-")){continue}classes[j++]=_cleanStyle(style.toLowerCase())}}classes.length=j}return classes};function _cleanStyle(style){style=style.replace(/[\'\"\`\[\]\{\}\(\)\?\+]/g,"");return style.replace(/:/g," ").trim()};