Socket
Socket
Sign inDemoInstall

tailwind-merge

Package Overview
Dependencies
Maintainers
1
Versions
276
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tailwind-merge - npm Package Compare versions

Comparing version 1.2.1 to 1.3.0

dist/tailwind-merge.mjs

2

dist/tailwind-merge.cjs.production.min.js

@@ -1,2 +0,2 @@

"use strict";function r(r){return r&&"object"==typeof r&&"default"in r?r:{default:r}}Object.defineProperty(exports,"__esModule",{value:!0});var e=r(require("hashlru"));function o(){return o=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(r[t]=o[t])}return r},o.apply(this,arguments)}function t(r){var e=function(r){var e=r.theme,o=r.prefix,t={nextPart:{},validators:[]};return function(r,e){return e?r.map((function(r){return[r[0],r[1].map((function(r){return"string"==typeof r?e+r:"object"==typeof r?Object.fromEntries(Object.entries(r).map((function(r){return[e+r[0],r[1]]}))):r}))]})):r}(Object.entries(r.classGroups),o).forEach((function(r){i(r[1],t,r[0],e)})),t}(r);return{getClassGroupId:function(r){var o=r.split("-");return""===o[0]&&1!==o.length&&o.shift(),n(o,e)||function(r){if(l.test(r)){var e=l.exec(r)[1],o=null==e?void 0:e.substring(0,e.indexOf(":"));if(o)return"arbitrary.."+o}}(r)},getConflictingClassGroupIds:function(e){return r.conflictingClassGroups[e]||[]}}}function n(r,e){var o;if(0===r.length)return e.classGroupId;var t=e.nextPart[r[0]],l=t?n(r.slice(1),t):void 0;if(l)return l;if(0!==e.validators.length){var i=r.join("-");return null==(o=e.validators.find((function(r){return(0,r.validator)(i)})))?void 0:o.classGroupId}}var l=/^\[(.+)\]$/;function i(r,e,o,t){r.forEach((function(r){if("string"!=typeof r){if("function"==typeof r)return r.isThemeGetter?void i(r(t),e,o,t):void e.validators.push({validator:r,classGroupId:o});Object.entries(r).forEach((function(r){i(r[1],a(e,r[0]),o,t)}))}else(""===r?e:a(e,r)).classGroupId=o}))}function a(r,e){var o=r;return e.split("-").forEach((function(r){void 0===o.nextPart[r]&&(o.nextPart[r]={nextPart:{},validators:[]}),o=o.nextPart[r]})),o}function s(r){return o({cache:(n=r.cacheSize,n>=1?e.default(n):{get:function(){},set:function(){}})},t(r));var n}var c=/\s+/,d=/:(?![^[]*\])/;function u(r,e){var o=e.getClassGroupId,t=e.getConflictingClassGroupIds,n=new Set;return r.trim().split(c).map((function(r){var e=r.split(d),t=e.pop(),n=t.startsWith("!"),l=n?t.substring(1):t,i=o(l);if(!i)return{isTailwindClass:!1,originalClassName:r};var a=0===e.length?"":e.sort().concat("").join(":");return{isTailwindClass:!0,modifier:n?"!"+a:a,classGroupId:i,originalClassName:r}})).reverse().filter((function(r){if(!r.isTailwindClass)return!0;var e=r.modifier,o=r.classGroupId,l=e+":"+o;return!n.has(l)&&(n.add(l),t(o).forEach((function(r){return n.add(e+":"+r)})),!0)})).reverse().map((function(r){return r.originalClassName})).join(" ")}function p(){for(var r=arguments.length,e=new Array(r),o=0;o<r;o++)e[o]=arguments[o];var t,n,l,i=a;function a(r){var o=e[0],a=e.slice(1).reduce((function(r,e){return e(r)}),o());return t=s(a),n=t.cache.get,l=t.cache.set,i=c,c(r)}function c(r){var e=n(r);if(e)return e;var o=u(r,t);return l(r,o),o}return function(){for(var r,e="",o=0;o<arguments.length;o+=1)(r=arguments[o])&&(e&&(e+=" "),e+=r);return i(e)}}function b(r){var e=function(e){return e[r]||[]};return e.isThemeGetter=!0,e}var f=/^\[(.+)\]$/,m=/^\d+\/\d+$/,g=new Set(["px","full","screen"]),v=/^(\d+)?(xs|sm|md|lg|xl)$/,h=/\d+(%|px|em|rem|vh|vw|pt|pc|in|cm|mm|cap|ch|ex|lh|rlh|vi|vb|vmin|vmax)/,y=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function x(r){return!Number.isNaN(Number(r))||g.has(r)||m.test(r)||w(r)}function w(r){var e,o=null==(e=f.exec(r))?void 0:e[1];return!!o&&(o.startsWith("length:")||h.test(o))}function k(r){var e,o=null==(e=f.exec(r))?void 0:e[1];return!!o&&o.startsWith("size:")}function z(r){var e,o=null==(e=f.exec(r))?void 0:e[1];return!!o&&o.startsWith("position:")}function j(r){var e,o=null==(e=f.exec(r))?void 0:e[1];return!!o&&(o.startsWith("url(")||o.startsWith("url:"))}function C(r){var e,o=null==(e=f.exec(r))?void 0:e[1];return!!o&&(!Number.isNaN(Number(o))||o.startsWith("number:"))}function G(r){var e,o=null==(e=f.exec(r))?void 0:e[1];return Number.isInteger(Number(o||r))}function A(r){return f.test(r)}function N(){return!0}function I(r){return v.test(r)}function O(r){var e,o=null==(e=f.exec(r))?void 0:e[1];return!!o&&y.test(o)}var P={__proto__:null,isLength:x,isArbitraryLength:w,isArbitrarySize:k,isArbitraryPosition:z,isArbitraryUrl:j,isArbitraryWeight:C,isInteger:G,isArbitraryValue:A,isAny:N,isTshirtSize:I,isArbitraryShadow:O};function S(){var r=b("colors"),e=b("spacing"),o=b("blur"),t=b("brightness"),n=b("borderColor"),l=b("borderRadius"),i=b("borderWidth"),a=b("contrast"),s=b("grayscale"),c=b("hueRotate"),d=b("invert"),u=b("gap"),p=b("gradientColorStops"),f=b("inset"),m=b("margin"),g=b("opacity"),v=b("padding"),h=b("saturate"),y=b("scale"),P=b("sepia"),S=b("skew"),W=b("space"),T=b("translate"),_=function(){return["auto",e]},E=function(){return["",x]},M=function(){return["auto",G]},R=function(){return["","0",A]};return{cacheSize:500,theme:{colors:[N],spacing:[x],blur:["none","",I,w],brightness:[G],borderColor:[r],borderRadius:["none","","full",I,w],borderWidth:E(),contrast:[G],grayscale:R(),hueRotate:[G],invert:R(),gap:[e],gradientColorStops:[r],inset:_(),margin:_(),opacity:[G],padding:[e],saturate:[G],scale:[G],sepia:R(),skew:[G,A],space:[e],translate:[e]},classGroups:{aspect:[{aspect:["auto","square","video",A]}],container:["container"],columns:[{columns:[I]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat(["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],[A])}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[f]}],"inset-x":[{"inset-x":[f]}],"inset-y":[{"inset-y":[f]}],top:[{top:[f]}],right:[{right:[f]}],bottom:[{bottom:[f]}],left:[{left:[f]}],visibility:["visible","invisible"],z:[{z:[x]}],basis:[{basis:[e]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",A]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",G]}],"grid-cols":[{"grid-cols":[N]}],"col-start-end":[{col:["auto",{span:[G]}]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[N]}],"row-start-end":[{row:["auto",{span:[G]}]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",A]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",A]}],gap:[{gap:[u]}],"gap-x":[{"gap-x":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["start","end","center","between","around","evenly"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["start","end","center","between","around","evenly"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(["start","end","center","between","around","evenly"],["stretch"])}],"place-items":[{"place-items":["start","end","center","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[W]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[W]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max",e]}],"min-w":[{"min-w":["min","max","fit",x]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[I]},I,w]}],h:[{h:_()}],"min-h":[{"min-h":["min","max","fit",x]}],"max-h":[{"max-h":[e,"min","max","fit"]}],"font-size":[{text:["base",I,w]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",C]}],"font-family":[{font:[N]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",w]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",x]}],"list-style-type":[{list:["none","disc","decimal",A]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[r]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify"]}],"text-color":[{text:[r]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(["solid","dashed","dotted","double","none"],["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",x]}],"underline-offset":[{"underline-offset":["auto",x]}],"text-decoration-color":[{decoration:[r]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:[e]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",w]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap"]}],break:[{break:["normal","words","all"]}],content:[{content:["none",A]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],[z])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",k]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},j]}],"bg-color":[{bg:[r]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[].concat(["solid","dashed","dotted","double","none"],["hidden"])}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:[""].concat(["solid","dashed","dotted","double","none"],["hidden"])}],"outline-offset":[{"outline-offset":[x]}],"outline-w":[{outline:[x]}],"outline-color":[{outline:[r]}],"ring-w":[{ring:E()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[r]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[x]}],"ring-offset-color":[{"ring-offset":[r]}],shadow:[{shadow:["","inner","none",I,O]}],"shadow-color":[{shadow:[N]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[t]}],contrast:[{contrast:[a]}],"drop-shadow":[{"drop-shadow":["","none",I,A]}],grayscale:[{grayscale:[s]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[h]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[t]}],"backdrop-contrast":[{"backdrop-contrast":[a]}],"backdrop-grayscale":[{"backdrop-grayscale":[s]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[h]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"table-layout":[{table:["auto","fixed"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",A]}],duration:[{duration:[G]}],ease:[{ease:["linear","in","out","in-out",A]}],delay:[{delay:[G]}],animate:[{animate:["none","spin","ping","pulse","bounce",A]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[y]}],"scale-x":[{"scale-x":[y]}],"scale-y":[{"scale-y":[y]}],rotate:[{rotate:[G,A]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",A]}],accent:[{accent:["auto",r]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",A]}],"caret-color":[{caret:[r]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":[e]}],"scroll-mx":[{"scroll-mx":[e]}],"scroll-my":[{"scroll-my":[e]}],"scroll-mt":[{"scroll-mt":[e]}],"scroll-mr":[{"scroll-mr":[e]}],"scroll-mb":[{"scroll-mb":[e]}],"scroll-ml":[{"scroll-ml":[e]}],"scroll-p":[{"scroll-p":[e]}],"scroll-px":[{"scroll-px":[e]}],"scroll-py":[{"scroll-py":[e]}],"scroll-pt":[{"scroll-pt":[e]}],"scroll-pr":[{"scroll-pr":[e]}],"scroll-pb":[{"scroll-pb":[e]}],"scroll-pl":[{"scroll-pl":[e]}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","pinch-zoom","manipulation",{pan:["x","left","right","y","up","down"]}]}],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",A]}],fill:[{fill:[r]}],"stroke-w":[{stroke:[x]}],stroke:[{stroke:[r]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],"col-start-end":["col-start","col-end"],"row-start-end":["row-start","row-end"],gap:["gap-x","gap-y"],p:["px","py","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-t","rounded-r","rounded-b","rounded-l","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-w":["border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"]}}}var W=p(S);function T(r,e){for(var o in e)M(r,o,e[o]);return r}var _=Object.prototype.hasOwnProperty,E=new Set(["string","number","boolean"]);function M(r,e,o){if(_.call(r,e)&&!E.has(typeof o)&&null!==o){if(Array.isArray(o)&&Array.isArray(r[e]))r[e]=r[e].concat(o);else if("object"==typeof o&&"object"==typeof r[e]){if(null===r[e])return void(r[e]=o);for(var t in o)M(r[e],t,o[t])}}else r[e]=o}exports.createTailwindMerge=p,exports.extendTailwindMerge=function(r){for(var e=arguments.length,o=new Array(e>1?e-1:0),t=1;t<e;t++)o[t-1]=arguments[t];return p.apply(void 0,"function"==typeof r?[S,r].concat(o):[function(){return T(S(),r)}].concat(o))},exports.fromTheme=b,exports.getDefaultConfig=S,exports.mergeConfigs=T,exports.twMerge=W,exports.validators=P;
"use strict";function r(r){return r&&"object"==typeof r&&"default"in r?r:{default:r}}Object.defineProperty(exports,"__esModule",{value:!0});var e=r(require("hashlru"));function o(){return o=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(r[t]=o[t])}return r},o.apply(this,arguments)}function t(r,e){(null==e||e>r.length)&&(e=r.length);for(var o=0,t=new Array(e);o<e;o++)t[o]=r[o];return t}function n(r){var e=function(r){var e=r.theme,o=r.prefix,t={nextPart:{},validators:[]};return function(r,e){return e?r.map((function(r){return[r[0],r[1].map((function(r){return"string"==typeof r?e+r:"object"==typeof r?Object.fromEntries(Object.entries(r).map((function(r){return[e+r[0],r[1]]}))):r}))]})):r}(Object.entries(r.classGroups),o).forEach((function(r){l(r[1],t,r[0],e)})),t}(r);return{getClassGroupId:function(r){var o=r.split("-");return""===o[0]&&1!==o.length&&o.shift(),i(o,e)||function(r){if(a.test(r)){var e=a.exec(r)[1],o=null==e?void 0:e.substring(0,e.indexOf(":"));if(o)return"arbitrary.."+o}}(r)},getConflictingClassGroupIds:function(e){return r.conflictingClassGroups[e]||[]}}}function i(r,e){var o;if(0===r.length)return e.classGroupId;var t=e.nextPart[r[0]],n=t?i(r.slice(1),t):void 0;if(n)return n;if(0!==e.validators.length){var a=r.join("-");return null==(o=e.validators.find((function(r){return(0,r.validator)(a)})))?void 0:o.classGroupId}}var a=/^\[(.+)\]$/;function l(r,e,o,t){r.forEach((function(r){if("string"!=typeof r){if("function"==typeof r)return r.isThemeGetter?void l(r(t),e,o,t):void e.validators.push({validator:r,classGroupId:o});Object.entries(r).forEach((function(r){l(r[1],s(e,r[0]),o,t)}))}else(""===r?e:s(e,r)).classGroupId=o}))}function s(r,e){var o=r;return e.split("-").forEach((function(r){void 0===o.nextPart[r]&&(o.nextPart[r]={nextPart:{},validators:[]}),o=o.nextPart[r]})),o}function c(r){return o({cache:(t=r.cacheSize,t>=1?e.default(t):{get:function(){},set:function(){}})},n(r));var t}var d=/\s+/;function u(r,e){var o=e.getClassGroupId,n=e.getConflictingClassGroupIds,i=new Set;return r.trim().split(d).map((function(r){var e=function(r){for(var e,o=[],n=0,i=0,a=function(r,e){var o="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(o)return(o=o.call(r)).next.bind(o);if(Array.isArray(r)||(o=function(r,e){if(r){if("string"==typeof r)return t(r,e);var o=Object.prototype.toString.call(r).slice(8,-1);return"Object"===o&&r.constructor&&(o=r.constructor.name),"Map"===o||"Set"===o?Array.from(r):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?t(r,e):void 0}}(r))){o&&(r=o);var n=0;return function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r.matchAll(/[:[\]]/g));!(e=a()).done;){var l=e.value;if(":"===l[0]){if(0===n){var s=l.index+1;o.push(r.substring(i,s)),i=s}}else"["===l[0]?n++:"]"===l[0]&&n--}var c=0===o.length?r:r.substring(i),d=c.startsWith("!");return{modifiers:o,hasImportantModifier:d,baseClassName:d?c.substring(1):c}}(r),n=e.modifiers,i=e.hasImportantModifier,a=o(e.baseClassName);if(!a)return{isTailwindClass:!1,originalClassName:r};var l=function(r){if(r.length<=1)return r;var e=[],o=[];return r.forEach((function(r){"["===r[0]?(e.push.apply(e,o.sort().concat([r])),o=[]):o.push(r)})),e.push.apply(e,o.sort()),e}(n).join("");return{isTailwindClass:!0,modifierId:i?l+"!":l,classGroupId:a,originalClassName:r}})).reverse().filter((function(r){if(!r.isTailwindClass)return!0;var e=r.modifierId,o=r.classGroupId,t=""+e+o;return!i.has(t)&&(i.add(t),n(o).forEach((function(r){return i.add(""+e+r)})),!0)})).reverse().map((function(r){return r.originalClassName})).join(" ")}function p(){for(var r=arguments.length,e=new Array(r),o=0;o<r;o++)e[o]=arguments[o];var t,n,i,a=l;function l(r){var o=e[0],l=e.slice(1).reduce((function(r,e){return e(r)}),o());return t=c(l),n=t.cache.get,i=t.cache.set,a=s,s(r)}function s(r){var e=n(r);if(e)return e;var o=u(r,t);return i(r,o),o}return function(){for(var r,e="",o=0;o<arguments.length;o+=1)(r=arguments[o])&&(e&&(e+=" "),e+=r);return a(e)}}function b(r){var e=function(e){return e[r]||[]};return e.isThemeGetter=!0,e}var f=/^\[(.+)\]$/,g=/^\d+\/\d+$/,m=new Set(["px","full","screen"]),v=/^(\d+)?(xs|sm|md|lg|xl)$/,h=/\d+(%|px|em|rem|vh|vw|pt|pc|in|cm|mm|cap|ch|ex|lh|rlh|vi|vb|vmin|vmax)/,y=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function x(r){return!Number.isNaN(Number(r))||m.has(r)||g.test(r)||w(r)}function w(r){var e,o=null==(e=f.exec(r))?void 0:e[1];return!!o&&(o.startsWith("length:")||h.test(o))}function k(r){var e,o=null==(e=f.exec(r))?void 0:e[1];return!!o&&o.startsWith("size:")}function z(r){var e,o=null==(e=f.exec(r))?void 0:e[1];return!!o&&o.startsWith("position:")}function j(r){var e,o=null==(e=f.exec(r))?void 0:e[1];return!!o&&(o.startsWith("url(")||o.startsWith("url:"))}function C(r){var e,o=null==(e=f.exec(r))?void 0:e[1];return!!o&&(!Number.isNaN(Number(o))||o.startsWith("number:"))}function A(r){var e,o=null==(e=f.exec(r))?void 0:e[1];return Number.isInteger(Number(o||r))}function I(r){return f.test(r)}function S(){return!0}function G(r){return v.test(r)}function N(r){var e,o=null==(e=f.exec(r))?void 0:e[1];return!!o&&y.test(o)}var O={__proto__:null,isLength:x,isArbitraryLength:w,isArbitrarySize:k,isArbitraryPosition:z,isArbitraryUrl:j,isArbitraryWeight:C,isInteger:A,isArbitraryValue:I,isAny:S,isTshirtSize:G,isArbitraryShadow:N};function P(){var r=b("colors"),e=b("spacing"),o=b("blur"),t=b("brightness"),n=b("borderColor"),i=b("borderRadius"),a=b("borderSpacing"),l=b("borderWidth"),s=b("contrast"),c=b("grayscale"),d=b("hueRotate"),u=b("invert"),p=b("gap"),f=b("gradientColorStops"),g=b("inset"),m=b("margin"),v=b("opacity"),h=b("padding"),y=b("saturate"),O=b("scale"),P=b("sepia"),T=b("skew"),W=b("space"),E=b("translate"),M=function(){return["auto",e]},_=function(){return["",x]},$=function(){return["auto",A]},R=function(){return["","0",I]};return{cacheSize:500,theme:{colors:[S],spacing:[x],blur:["none","",G,w],brightness:[A],borderColor:[r],borderRadius:["none","","full",G,w],borderSpacing:[e],borderWidth:_(),contrast:[A],grayscale:R(),hueRotate:[A],invert:R(),gap:[e],gradientColorStops:[r],inset:M(),margin:M(),opacity:[A],padding:[e],saturate:[A],scale:[A],sepia:R(),skew:[A,I],space:[e],translate:[e]},classGroups:{aspect:[{aspect:["auto","square","video",I]}],container:["container"],columns:[{columns:[G]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat(["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],[I])}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible"],z:[{z:[x]}],basis:[{basis:[e]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",I]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",A]}],"grid-cols":[{"grid-cols":[S]}],"col-start-end":[{col:["auto",{span:[A]}]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[S]}],"row-start-end":[{row:["auto",{span:[A]}]}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",I]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",I]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["start","end","center","between","around","evenly"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["start","end","center","between","around","evenly"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(["start","end","center","between","around","evenly"],["stretch"])}],"place-items":[{"place-items":["start","end","center","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[h]}],px:[{px:[h]}],py:[{py:[h]}],pt:[{pt:[h]}],pr:[{pr:[h]}],pb:[{pb:[h]}],pl:[{pl:[h]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[W]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[W]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max",e]}],"min-w":[{"min-w":["min","max","fit",x]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[G]},G,w]}],h:[{h:M()}],"min-h":[{"min-h":["min","max","fit",x]}],"max-h":[{"max-h":[e,"min","max","fit"]}],"font-size":[{text:["base",G,w]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",C]}],"font-family":[{font:[S]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",w]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",x]}],"list-style-type":[{list:["none","disc","decimal",I]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[r]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[r]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(["solid","dashed","dotted","double","none"],["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",x]}],"underline-offset":[{"underline-offset":["auto",x]}],"text-decoration-color":[{decoration:[r]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:[e]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",w]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap"]}],break:[{break:["normal","words","all"]}],content:[{content:["none",I]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],[z])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",k]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},j]}],"bg-color":[{bg:[r]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[].concat(["solid","dashed","dotted","double","none"],["hidden"])}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:[""].concat(["solid","dashed","dotted","double","none"],["hidden"])}],"outline-offset":[{"outline-offset":[x]}],"outline-w":[{outline:[x]}],"outline-color":[{outline:[r]}],"ring-w":[{ring:_()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[r]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[x]}],"ring-offset-color":[{"ring-offset":[r]}],shadow:[{shadow:["","inner","none",G,N]}],"shadow-color":[{shadow:[S]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[t]}],contrast:[{contrast:[s]}],"drop-shadow":[{"drop-shadow":["","none",G,I]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[u]}],saturate:[{saturate:[y]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[t]}],"backdrop-contrast":[{"backdrop-contrast":[s]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",I]}],duration:[{duration:[A]}],ease:[{ease:["linear","in","out","in-out",I]}],delay:[{delay:[A]}],animate:[{animate:["none","spin","ping","pulse","bounce",I]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[O]}],"scale-x":[{"scale-x":[O]}],"scale-y":[{"scale-y":[O]}],rotate:[{rotate:[A,I]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",I]}],accent:[{accent:["auto",r]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",I]}],"caret-color":[{caret:[r]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":[e]}],"scroll-mx":[{"scroll-mx":[e]}],"scroll-my":[{"scroll-my":[e]}],"scroll-mt":[{"scroll-mt":[e]}],"scroll-mr":[{"scroll-mr":[e]}],"scroll-mb":[{"scroll-mb":[e]}],"scroll-ml":[{"scroll-ml":[e]}],"scroll-p":[{"scroll-p":[e]}],"scroll-px":[{"scroll-px":[e]}],"scroll-py":[{"scroll-py":[e]}],"scroll-pt":[{"scroll-pt":[e]}],"scroll-pr":[{"scroll-pr":[e]}],"scroll-pb":[{"scroll-pb":[e]}],"scroll-pl":[{"scroll-pl":[e]}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","pinch-zoom","manipulation",{pan:["x","left","right","y","up","down"]}]}],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",I]}],fill:[{fill:[r]}],"stroke-w":[{stroke:[x]}],stroke:[{stroke:[r]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],"col-start-end":["col-start","col-end"],"row-start-end":["row-start","row-end"],gap:["gap-x","gap-y"],p:["px","py","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-t","rounded-r","rounded-b","rounded-l","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"]}}}var T=p(P);function W(r,e){for(var o in e)_(r,o,e[o]);return r}var E=Object.prototype.hasOwnProperty,M=new Set(["string","number","boolean"]);function _(r,e,o){if(E.call(r,e)&&!M.has(typeof o)&&null!==o){if(Array.isArray(o)&&Array.isArray(r[e]))r[e]=r[e].concat(o);else if("object"==typeof o&&"object"==typeof r[e]){if(null===r[e])return void(r[e]=o);for(var t in o)_(r[e],t,o[t])}}else r[e]=o}exports.createTailwindMerge=p,exports.extendTailwindMerge=function(r){for(var e=arguments.length,o=new Array(e>1?e-1:0),t=1;t<e;t++)o[t-1]=arguments[t];return p.apply(void 0,"function"==typeof r?[P,r].concat(o):[function(){return W(P(),r)}].concat(o))},exports.fromTheme=b,exports.getDefaultConfig=P,exports.mergeConfigs=W,exports.twMerge=T,exports.validators=O;
//# sourceMappingURL=tailwind-merge.cjs.production.min.js.map
{
"name": "tailwind-merge",
"version": "1.2.1",
"version": "1.3.0",
"description": "Merge Tailwind CSS classes without style conflicts",

@@ -28,6 +28,6 @@ "keywords": [

"require": "./dist/index.js",
"import": "./dist/index.mjs",
"default": "./dist/index.mjs"
"import": "./dist/tailwind-merge.mjs",
"default": "./dist/tailwind-merge.mjs"
},
"module": "dist/index.mjs",
"module": "dist/tailwind-merge.mjs",
"main": "dist/index.js",

@@ -53,19 +53,20 @@ "types": "./dist/index.d.ts",

"devDependencies": {
"@size-limit/preset-small-lib": "^7.0.5",
"@types/jest": "^27.4.0",
"@typescript-eslint/eslint-plugin": "^5.10.0",
"@typescript-eslint/parser": "^5.10.0",
"dts-cli": "^1.2.0",
"eslint": "^8.7.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jest": "^25.7.0",
"fp-ts": "^2.11.8",
"prettier": "^2.5.1",
"size-limit": "^7.0.5",
"typescript": "^4.5.5",
"zx": "^4.3.0"
"@size-limit/preset-small-lib": "^7.0.8",
"@types/jest": "^27.4.1",
"@typescript-eslint/eslint-plugin": "^5.20.0",
"@typescript-eslint/parser": "^5.20.0",
"dts-cli": "^1.5.1",
"eslint": "^8.14.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^26.1.4",
"fp-ts": "^2.12.0",
"prettier": "^2.6.2",
"size-limit": "^7.0.8",
"ts-jest": "^27.1.4",
"typescript": "^4.6.3",
"zx": "^6.1.0"
},
"size-limit": [
{
"path": "dist/index.mjs",
"path": "dist/tailwind-merge.mjs",
"limit": "10 KB"

@@ -72,0 +73,0 @@ },

<div align="center">
<br />
<a href="https://github.com/dcastil/tailwind-merge">
<!-- AUTOGENERATED START logo-image --><img src="https://github.com/dcastil/tailwind-merge/raw/v1.2.1/assets/logo.svg" alt="tailwind-merge" width="221px" /><!-- AUTOGENERATED END -->
<!-- AUTOGENERATED VERSION START --><img src="https://github.com/dcastil/tailwind-merge/raw/v1.3.0/assets/logo.svg" alt="tailwind-merge" width="221px" /><!-- AUTOGENERATED END -->
</a>

@@ -19,3 +19,3 @@ </div>

- Supports Tailwind v3.0 (if you use Tailwind v2, use [tailwind-merge v0.9.0](https://github.com/dcastil/tailwind-merge/tree/v0.9.0))
- Supports Tailwind v3.0 up to v3.1 (if you use Tailwind v2, use [tailwind-merge v0.9.0](https://github.com/dcastil/tailwind-merge/tree/v0.9.0))
- Works in Node >=12 and all modern browsers

@@ -118,2 +118,15 @@ - Fully typed

### Supports arbitrary variants
```ts
twMerge('[&:nth-child(3)]:py-0 [&:nth-child(3)]:py-4') // → '[&:nth-child(3)]:py-4'
twMerge('dark:hover:[&:nth-child(3)]:py-0 hover:dark:[&:nth-child(3)]:py-4')
// → 'hover:dark:[&:nth-child(3)]:py-4'
// Don't do this!
twMerge('[&:focus]:ring focus:ring-4') // → '[&:focus]:ring focus:ring-4'
```
Similarly to arbitrary properties, tailwind-merge does not resolve conflicts between arbitrary variants and their matching predefined modifiers for bundle size reasons.
### Supports important modifier

@@ -181,3 +194,3 @@

conflictingClassGroups: {
// Conflcits between class groups are defined here
// Conflicts between class groups are defined here
},

@@ -220,3 +233,3 @@ }

You can use am empty string (`''`) as a class part if you want to indicate that the preceding part was the end. This is useful for defining elements which are marked as `DEFAULT` in the Tailwind config.
You can use an empty string (`''`) as a class part if you want to indicate that the preceding part was the end. This is useful for defining elements which are marked as `DEFAULT` in the Tailwind config.

@@ -614,1 +627,5 @@ ```ts

- A changelog is documented in [GitHub Releases](https://github.com/dcastil/tailwind-merge/releases).
## Contributing
Please see <!-- AUTOGENERATED VERSION START -->[CONTRIBUTING](https://github.com/dcastil/tailwind-merge/tree/v1.3.0/.github/CONTRIBUTING.md)<!-- AUTOGENERATED END --> for details.

@@ -23,2 +23,3 @@ import { fromTheme } from './from-theme'

const borderRadius = fromTheme('borderRadius')
const borderSpacing = fromTheme('borderSpacing')
const borderWidth = fromTheme('borderWidth')

@@ -78,2 +79,3 @@ const contrast = fromTheme('contrast')

'luminosity',
'plus-lighter',
] as const

@@ -94,2 +96,3 @@ const getAlign = () => ['start', 'end', 'center', 'between', 'around', 'evenly'] as const

borderRadius: ['none', '', 'full', isTshirtSize, isArbitraryLength],
borderSpacing: [spacing],
borderWidth: getLengthWithEmpty(),

@@ -367,3 +370,3 @@ contrast: [isInteger],

*/
'grid-flow': [{ 'grid-flow': ['row', 'col', 'row-dense', 'col-dense'] }],
'grid-flow': [{ 'grid-flow': ['row', 'col', 'dense', 'row-dense', 'col-dense'] }],
/**

@@ -696,3 +699,3 @@ * Grid Auto Columns

*/
'text-alignment': [{ text: ['left', 'center', 'right', 'justify'] }],
'text-alignment': [{ text: ['left', 'center', 'right', 'justify', 'start', 'end'] }],
/**

@@ -1199,2 +1202,17 @@ * Text Color

/**
* Border Spacing
* @see https://tailwindcss.com/docs/border-spacing
*/
'border-spacing': [{ 'border-spacing': [borderSpacing] }],
/**
* Border Spacing X
* @see https://tailwindcss.com/docs/border-spacing
*/
'border-spacing-x': [{ 'border-spacing-x': [borderSpacing] }],
/**
* Border Spacing Y
* @see https://tailwindcss.com/docs/border-spacing
*/
'border-spacing-y': [{ 'border-spacing-y': [borderSpacing] }],
/**
* Table Layout

@@ -1570,2 +1588,3 @@ * @see https://tailwindcss.com/docs/table-layout

'rounded-l': ['rounded-tl', 'rounded-bl'],
'border-spacing': ['border-spacing-x', 'border-spacing-y'],
'border-w': ['border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],

@@ -1572,0 +1591,0 @@ 'border-w-x': ['border-w-r', 'border-w-l'],

@@ -5,6 +5,2 @@ import { ConfigUtils } from './config-utils'

const IMPORTANT_MODIFIER = '!'
// Regex is needed so we don't match against colons in labels for arbitrary values like `text-[color:var(--mystery-var)]`
// I'd prefer to use a negative lookbehind for all supported labels, but lookbheinds don't have good browser support yet. More info: https://caniuse.com/js-regexp-lookbehind
const MODIFIER_SEPARATOR_REGEX = /:(?![^[]*\])/
const MODIFIER_SEPARATOR = ':'

@@ -19,3 +15,3 @@ export function mergeClassList(classList: string, configUtils: ConfigUtils) {

* @example 'hover:focus:bg-color'
* @example '!md:pr'
* @example 'md:!pr'
*/

@@ -29,13 +25,7 @@ const classGroupsInConflict = new Set<string>()

.map((originalClassName) => {
const modifiers = originalClassName.split(MODIFIER_SEPARATOR_REGEX)
const classNameWithImportantModifier = modifiers.pop()!
const { modifiers, hasImportantModifier, baseClassName } =
splitModifiers(originalClassName)
const hasImportantModifier =
classNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)
const className = hasImportantModifier
? classNameWithImportantModifier.substring(1)
: classNameWithImportantModifier
const classGroupId = getClassGroupId(baseClassName)
const classGroupId = getClassGroupId(className)
if (!classGroupId) {

@@ -48,9 +38,6 @@ return {

const variantModifier =
modifiers.length === 0
? ''
: modifiers.sort().concat('').join(MODIFIER_SEPARATOR)
const variantModifier = sortModifiers(modifiers).join('')
const fullModifier = hasImportantModifier
? IMPORTANT_MODIFIER + variantModifier
const modifierId = hasImportantModifier
? variantModifier + IMPORTANT_MODIFIER
: variantModifier

@@ -60,3 +47,3 @@

isTailwindClass: true as const,
modifier: fullModifier,
modifierId,
classGroupId,

@@ -73,5 +60,5 @@ originalClassName,

const { modifier, classGroupId } = parsed
const { modifierId, classGroupId } = parsed
const classId = `${modifier}:${classGroupId}`
const classId = `${modifierId}${classGroupId}`

@@ -85,3 +72,3 @@ if (classGroupsInConflict.has(classId)) {

getConflictingClassGroupIds(classGroupId).forEach((group) =>
classGroupsInConflict.add(`${modifier}:${group}`)
classGroupsInConflict.add(`${modifierId}${group}`)
)

@@ -96,1 +83,64 @@

}
function splitModifiers(className: string) {
const modifiers = []
let bracketDepth = 0
let modifierStart = 0
for (const match of className.matchAll(/[:[\]]/g)) {
if (match[0] === ':') {
if (bracketDepth === 0) {
const nextModifierStart = match.index! + 1
modifiers.push(className.substring(modifierStart, nextModifierStart))
modifierStart = nextModifierStart
}
} else if (match[0] === '[') {
bracketDepth++
} else if (match[0] === ']') {
bracketDepth--
}
}
const baseClassNameWithImportantModifier =
modifiers.length === 0 ? className : className.substring(modifierStart)
const hasImportantModifier = baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)
const baseClassName = hasImportantModifier
? baseClassNameWithImportantModifier.substring(1)
: baseClassNameWithImportantModifier
return {
modifiers,
hasImportantModifier,
baseClassName,
}
}
/**
* Sorts modifiers according to following schema:
* - Predefined modifiers are sorted alphabetically
* - When an arbitrary variant appears, it's important to preserve which modifiers are before and after it
*/
function sortModifiers(modifiers: string[]) {
if (modifiers.length <= 1) {
return modifiers
}
const sortedModifiers = []
let unsortedModifiers: string[] = []
modifiers.forEach((modifier) => {
const isArbitraryVariant = modifier[0] === '['
if (isArbitraryVariant) {
sortedModifiers.push(...unsortedModifiers.sort(), modifier)
unsortedModifiers = []
} else {
unsortedModifiers.push(modifier)
}
})
sortedModifiers.push(...unsortedModifiers.sort())
return sortedModifiers
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc