"use strict";const g=require("../../../../../../../_virtual/resolveConfig.js"),y=require("../../../../../lodash@4.17.21/node_modules/lodash/some.js"),A=require("../../../../../lodash@4.17.21/node_modules/lodash/mergeWith.js"),x=require("../../../../../lodash@4.17.21/node_modules/lodash/isFunction.js"),C=require("../../../../../lodash@4.17.21/node_modules/lodash/isUndefined.js"),E=require("../../../../../lodash@4.17.21/node_modules/lodash/defaults.js"),b=require("../../../../../lodash@4.17.21/node_modules/lodash/map.js"),F=require("../../../../../lodash@4.17.21/node_modules/lodash/get.js"),L=require("../../../../../lodash@4.17.21/node_modules/lodash/uniq.js"),M=require("../../../../../lodash@4.17.21/node_modules/lodash/toPath.js"),U=require("../../../../../lodash@4.17.21/node_modules/lodash/head.js"),W=require("../../../../../lodash@4.17.21/node_modules/lodash/isPlainObject.js");require("./negateValue.js");require("../corePluginList.js");require("./configurePlugins.js");const $=require("../../stubs/defaultConfig.stub.js"),w=require("../../colors.js"),z=require("../../../../../../../_virtual/negateValue.js"),D=require("../../../../../../../_virtual/corePluginList.js"),K=require("../../../../../../../_virtual/configurePlugins.js");Object.defineProperty(g.__exports,"__esModule",{value:!0});g.__exports.default=ue;var R=o(y),_=o(A),c=o(x),k=o(C),O=o(E),B=o(b),l=o(F),G=o(L),H=o(M),q=o(U),h=o(W),J=o(z.__exports),m=o(D.__exports),N=o(K.__exports),Q=o($),S=o(w);function o(e){return e&&e.__esModule?e:{default:e}}const j={colors:S.default,negative(e){return Object.keys(e).filter(r=>e[r]!=="0").reduce((r,t)=>({...r,[`-${t}`]:(0,J.default)(e[t])}),{})},breakpoints(e){return Object.keys(e).filter(r=>typeof e[r]=="string").reduce((r,t)=>({...r,[`screen-${t}`]:e[t]}),{})}};function X(e,...r){return(0,c.default)(e)?e(...r):e}function p(e){return e.reduce((r,{extend:t})=>(0,_.default)(r,t,(u,s)=>(0,k.default)(u)?[s]:Array.isArray(u)?[s,...u]:[s,u]),{})}function Y(e){return{...e.reduce((r,t)=>(0,O.default)(r,t),{}),extend:p(e)}}function v(e,r){if(Array.isArray(e)&&(0,h.default)((0,q.default)(e)))return e.concat(r);if(Array.isArray(r)&&(0,h.default)((0,q.default)(r))&&(0,h.default)(e))return[e,...r];if(Array.isArray(r))return r}function Z({extend:e,...r}){return(0,_.default)(r,e,(t,u)=>!(0,c.default)(t)&&!(0,R.default)(u,c.default)?(0,_.default)({},t,...u,v):(s,d)=>(0,_.default)({},...[t,...u].map(n=>X(n,s,d)),v))}function T(e){const r=(t,u)=>{const s=(0,H.default)(t);let d=0,n=e;for(;n!=null&&d<s.length;)n=n[s[d++]],n=(0,c.default)(n)?n(r,j):n;return n===void 0?u:n};return Object.keys(e).reduce((t,u)=>({...t,[u]:(0,c.default)(e[u])?e[u](r,j):e[u]}),{})}function P(e){let r=[];return e.forEach(t=>{r=[...r,t];const u=(0,l.default)(t,"plugins",[]);u.length!==0&&u.forEach(s=>{s.__isOptionsFunction&&(s=s()),r=[...r,...P([(0,l.default)(s,"config",{})])]})}),r}function I(e){return{...e.reduce((t,u)=>(Object.entries(u||{}).forEach(([s,d])=>{(0,c.default)(d)?t[s]=d({variants(n){return(0,l.default)(t,n,[])},before(n,i,a=(0,l.default)(t,s,[])){if(i===void 0)return[...n,...a];const f=a.indexOf(i);return f===-1?[...a,...n]:[...a.slice(0,f),...n,...a.slice(f)]},after(n,i,a=(0,l.default)(t,s,[])){if(i===void 0)return[...a,...n];const f=a.indexOf(i);return f===-1?[...n,...a]:[...a.slice(0,f+1),...n,...a.slice(f+1)]},without(n,i=(0,l.default)(t,s,[])){return i.filter(a=>!n.includes(a))}}):t[s]=d}),t),{}),extend:p(e)}}function V({extend:e,...r},t){return(0,_.default)(r,e,(u,s)=>{const d=(0,G.default)([...u||[],...s].flat());return s.flat().length===0?d:d.sort((n,i)=>t.indexOf(n)-t.indexOf(i))})}function ee([e,...r],t){return Array.isArray(e)?e:V(I([e,...r].reverse()),t)}function re(e){return[...e].reduceRight((t,u)=>(0,c.default)(u)?u({corePlugins:t}):(0,N.default)(u,t),m.default).slice().sort((t,u)=>Math.sign(m.default.indexOf(t)-m.default.indexOf(u)))}function te(e){return[...e].reduceRight((t,u)=>[...t,...u],[])}function ue(e){const r=[...P(e),{darkMode:!1,prefix:"",important:!1,separator:":",variantOrder:Q.default.variantOrder}],{variantOrder:t}=r.find(u=>u.variantOrder);return(0,O.default)({theme:T(Z(Y((0,B.default)(r,u=>(0,l.default)(u,"theme",{}))))),variants:ee(r.map(u=>(0,l.default)(u,"variants",{})),t),corePlugins:re(r.map(u=>u.corePlugins)),plugins:te(e.map(u=>(0,l.default)(u,"plugins",[])))},...r)}
//# sourceMappingURL=resolveConfig.js.map
