You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
19 KiB

2 years ago
import s from"autoprefixer";import e from"cssdb";import o from"@csstools/postcss-progressive-custom-properties";import t from"fs";import i from"path";import r from"browserslist";import n from"postcss-initial";import a from"postcss-pseudo-class-any-link";import c from"css-blank-pseudo";import p from"postcss-page-break";import u from"@csstools/postcss-cascade-layers";import m from"postcss-attribute-case-insensitive";import l from"postcss-clamp";import d from"@csstools/postcss-color-function";import f from"postcss-color-functional-notation";import g from"postcss-custom-media";import b from"postcss-custom-properties";import h from"postcss-custom-selectors";import y from"postcss-dir-pseudo-class";import k from"@csstools/postcss-normalize-display-values";import N from"postcss-double-position-gradients";import v from"postcss-env-function";import w from"postcss-focus-visible";import $ from"postcss-focus-within";import O from"@csstools/postcss-font-format-keywords";import S from"postcss-font-variant";import x from"postcss-gap-properties";import P from"css-has-pseudo";import j from"postcss-color-hex-alpha";import F from"@csstools/postcss-hwb-function";import E from"@csstools/postcss-ic-unit";import M from"postcss-image-set-function";import C from"@csstools/postcss-is-pseudo-class";import _ from"postcss-lab-function";import q from"postcss-logical";import A from"postcss-media-minmax";import R from"postcss-nesting";import U from"postcss-selector-not";import B from"@csstools/postcss-oklab-function";import T from"postcss-opacity-percentage";import I from"postcss-overflow-shorthand";import V from"postcss-replace-overflow-wrap";import W from"postcss-place";import L from"css-prefers-color-scheme";import D from"postcss-color-rebeccapurple";import H from"@csstools/postcss-stepped-value-functions";import J from"@csstools/postcss-trigonometric-functions";import z from"@csstools/postcss-unset-value";const G={"blank-pseudo-class":"https://github.com/csstools/postcss-plugins/blob/main/plugins/css-blank-pseudo/README-BROWSER.md","focus-visible-pseudo-class":"https://github.com/WICG/focus-visible","focus-within-pseudo-class":"https://github.com/jsxtools/focus-within/blob/master/README-BROWSER.md","has-pseudo-class":"https://github.com/csstools/postcss-plugins/blob/main/plugins/css-has-pseudo/README-BROWSER.md","prefers-color-scheme-query":"https://github.com/csstools/postcss-plugins/blob/main/plugins/css-prefers-color-scheme/README-BROWSER.md"},K=["blank-pseudo-class","focus-visible-pseudo-class","focus-within-pseudo-class","has-pseudo-class","prefers-color-scheme-query"];async function Q(s,e,o,t){const i=function(s){return`:root {\n${Object.keys(s).reduce(((e,o)=>(e.push(`\t${o}: ${s[o]};`),e)),[]).join("\n")}\n}\n`}(o),r=function(s){return`${Object.keys(s).reduce(((e,o)=>(e.push(`@custom-media ${o} ${s[o]};`),e)),[]).join("\n")}\n`}(e),n=function(s){return`${Object.keys(s).reduce(((e,o)=>(e.push(`@custom-selector ${o} ${s[o]};`),e)),[]).join("\n")}\n`}(t),a=`${r}\n${n}\n${i}`;await es(s,a)}function X(s,e){return`\n\t${s}: {\n${Object.keys(e).reduce(((s,o)=>(s.push(`\t\t'${os(o)}': '${os(e[o])}'`),s)),[]).join(",\n")}\n\t}`}function Y(s,e){return`export const ${s} = {\n${Object.keys(e).reduce(((s,o)=>(s.push(`\t'${os(o)}': '${os(e[o])}'`),s)),[]).join(",\n")}\n};\n`}function Z(s,e){return Promise.all([].concat(e).map((async e=>{if(e instanceof Function)await e({customMedia:ss(s.customMedia),customProperties:ss(s.customProperties),customSelectors:ss(s.customSelectors)});else{const o=e===Object(e)?e:{to:String(e)},t=o.toJSON||ss;if("customMedia"in o||"customProperties"in o||"customSelectors"in o)o.customMedia=t(s.customMedia),o.customProperties=t(s.customProperties),o.customSelectors=t(s.customSelectors);else if("custom-media"in o||"custom-properties"in o||"custom-selectors"in o)o["custom-media"]=t(s.customMedia),o["custom-properties"]=t(s.customProperties),o["custom-selectors"]=t(s.customSelectors);else{const e=String(o.to||""),r=(o.type||i.extname(o.to).slice(1)).toLowerCase(),n=t(s.customMedia),a=t(s.customProperties),c=t(s.customSelectors);"cs