{"version":3,"sources":["jsdelivr-header.js","/npm/tailwind-mini@0.0.4/removeUnsupported.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,MAAM,QAAU,QAAQ,WAClB,kBAAoB,CACxB,MAAM,CAAC,qBAAqB,cAAc,cAAc,IAAI,OAC5D,GAAG,CAAC,qBAAqB,cAAc,gBAGzC,OAAO,QAAU,QAAQ,OAAO,iBAAiB,CAAC,EAAU,CAAE,SAAU,WAK/D,IACL,EAAK,WAAU,IALjB,IAAqB,EAMQ,UAArB,EAAK,OAAO,MACd,EAAK,OAAO,SAPG,EASA,EAAK,SAAS,kBAAkB,EAAQ,UARzC,MAAK,GAAQ,IAAI,OAAO,GAAM,KAAK,MASjD,EAAK,SAGP,EAAK,WAAU,IACK,eAAd,EAAK,MAEA,WADC,EAAK,MAOU,UAArB,EAAQ,UAAsC,mBAAd,EAAK,MAEhC,WADC,EAAK,MAQX,EAAK,MAAM,SAAS,SAAW,EAAK,MAAM,SAAS,QACrD,EAAQ,OAAS,QAAQ,IAAI,sBAAuB,EAAK,KAAM,EAAK,MAAO,KAAM,GAA+B,GAAzB,WAAW,EAAK,QACvG,EAAK,MAAuC,GAAzB,WAAW,EAAK,OAAe,MAR9C,EAAK,YAAY,EAAK,MAAM,CAAE,MAAO,YARrC,EAAK,YAAY,EAAK,MAAM,CAAE,MAAO,aAiB3C,GACD,GACF","file":"/npm/tailwind-mini@0.0.4/removeUnsupported.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/tailwind-mini@0.0.4/removeUnsupported.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","const postcss = require('postcss')\nconst blackSelectorList = {\n  weapp:['\\\\\\\\?:focus-within','\\\\\\\\?:hover','\\\\\\\\?:focus','>',\"\\\\*\"],\n  tt:['\\\\\\\\?:focus-within','\\\\\\\\?:hover','\\\\\\\\?:focus'],\n}\n\nmodule.exports = postcss.plugin('tailwind-mini', (options = { platform: 'weapp'}) => {\n  function isSupported(selector,blackList) {\n    return !blackList.some(item => new RegExp(item).test(selector))\n  }\n\n  return root => {\n    root.walkRules(rule => {\n      if (rule.parent.name === 'media') {\n        rule.parent.remove()\n      }\n      if (!isSupported(rule.selector,blackSelectorList[options.platform])) {\n        rule.remove()\n      }\n\n      rule.walkDecls(decl => {\n        if (decl.prop === 'visibility') {\n          switch (decl.value) {\n            case 'hidden':\n              decl.replaceWith(decl.clone({ value: 'collapse'}))\n              return\n          }\n        }\n\n        if (options.platform === 'weapp' && decl.prop === 'vertical-align') {\n          switch (decl.value) {\n            case 'middle':\n              decl.replaceWith(decl.clone({ value: 'center'}))\n              return\n          }\n        }\n\n        // allow using rem values (default unit in tailwind)\n        if (decl.value.includes('rem') && !decl.value.includes('--')) {\n          options.debug && console.log('replacing rem value', decl.prop, decl.value, '=>', '' + (parseFloat(decl.value) * 16))\n          decl.value = '' + (parseFloat(decl.value) * 16) + 'px'\n        }\n      })\n    })\n  }\n})\n\n"]}