@jasonshimmy/custom-elements-runtime 2.5.7 → 2.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -127,7 +127,7 @@
127
127
  --cer-color-error-900: #7f1d1d;
128
128
  --cer-color-error-950: #450a0a;
129
129
  }
130
- `;function Ae(e,...t){let c="";for(let o=0;o<e.length;o++)c+=e[o],o<t.length&&(c+=t[o]);return c}function $e(e){return e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s+/g," ").replace(/\s*([{}:;,>+~])\s*/g,"$1").replace(/;}/g,"}").trim()}let te=null;function qe(){return te||(typeof CSSStyleSheet>"u"?te={cssRules:[],replaceSync:()=>{},toString:()=>$e(ke)}:(te=new CSSStyleSheet,te.replaceSync($e(ke)))),te}let Q=null;const ve=new Set;let de="";function Fe(){if(ve.size===0)return null;Q||(typeof CSSStyleSheet>"u"?Q={cssRules:[],replaceSync:()=>{},toString:()=>de}:(Q=new CSSStyleSheet,Q.toString=()=>de));let e="";for(const t of ve){const c=Te(t);c&&(e+=c)}if(de=$e(e),typeof Q.replaceSync=="function"&&e)try{Q.replaceSync(de)}catch{}return Q}function Ie(e){const t=!ve.has(e);ve.add(e),t&&Q&&Fe()}function Ne(e){return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi,"").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi,"").replace(/expression\s*\([^)]*\)/gi,"")}const ke=Ae`
130
+ `;function Ae(e,...t){let c="";for(let o=0;o<e.length;o++)c+=e[o],o<t.length&&(c+=t[o]);return c}function $e(e){return e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\s+/g," ").replace(/\s*([{}:;,>~])\s*/g,"$1").replace(/;}/g,"}").trim()}let te=null;function qe(){return te||(typeof CSSStyleSheet>"u"?te={cssRules:[],replaceSync:()=>{},toString:()=>$e(ke)}:(te=new CSSStyleSheet,te.replaceSync($e(ke)))),te}let Q=null;const ve=new Set;let de="";function Fe(){if(ve.size===0)return null;Q||(typeof CSSStyleSheet>"u"?Q={cssRules:[],replaceSync:()=>{},toString:()=>de}:(Q=new CSSStyleSheet,Q.toString=()=>de));let e="";for(const t of ve){const c=Te(t);c&&(e+=c)}if(de=$e(e),typeof Q.replaceSync=="function"&&e)try{Q.replaceSync(de)}catch{}return Q}function Ie(e){const t=!ve.has(e);ve.add(e),t&&Q&&Fe()}function Ne(e){return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi,"").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi,"").replace(/expression\s*\([^)]*\)/gi,"")}const ke=Ae`
131
131
  ${De}
132
132
  :host,
133
133
  *,
@@ -327,4 +327,4 @@
327
327
  --cer-prose-invert-links:var(--cer-color-info-300);
328
328
  --cer-prose-invert-links-hover:var(--cer-color-info-100);
329
329
  `.replace(/\s+/g,"")}),e},fe=Ue();function He(e){return/^prose(?:-(sm|lg|xl|2xl))?$/.test(e)?(Ie(e),""):null}function Se(e){return/^prose-([a-z0-9]+):(.+)$/.test(e)?Le(e,fe,ge,he,xe,me,be,ie):null}function q(e,t){let c=0;for(let o=0;o<e.length;o++){const r=e[o];if(r==="["||r==="(")c++;else if((r==="]"||r===")")&&c>0)c--;else if(c===0&&(r===">"||r==="+"||r==="~"||r===" "))return e.slice(0,o)+t+e.slice(o)}return e+t}const je={before:(e,t)=>`${e}::before{${t}}`,after:(e,t)=>`${e}::after{${t}}`,hover:(e,t)=>`${q(e,":hover")}{${t}}`,focus:(e,t)=>`${q(e,":focus")}{${t}}`,active:(e,t)=>`${q(e,":active")}{${t}}`,disabled:(e,t)=>`${q(e,":disabled")}{${t}}`,visited:(e,t)=>`${q(e,":visited")}{${t}}`,checked:(e,t)=>`${q(e,":checked")}{${t}}`,first:(e,t)=>`${q(e,":first-child")}{${t}}`,last:(e,t)=>`${q(e,":last-child")}{${t}}`,odd:(e,t)=>`${q(e,":nth-child(odd)")}{${t}}`,even:(e,t)=>`${q(e,":nth-child(even)")}{${t}}`,"focus-within":(e,t)=>`${q(e,":focus-within")}{${t}}`,"focus-visible":(e,t)=>`${q(e,":focus-visible")}{${t}}`,"group-hover":(e,t)=>`.group:hover ${e}{${t}}`,"group-focus":(e,t)=>`.group:focus ${e}{${t}}`,"group-active":(e,t)=>`.group:active ${e}{${t}}`,"group-disabled":(e,t)=>`.group:disabled ${e}{${t}}`,"peer-hover":(e,t)=>`.peer:hover ~ ${e}{${t}}`,"peer-focus":(e,t)=>`.peer:focus ~ ${e}{${t}}`,"peer-checked":(e,t)=>`.peer:checked ~ ${e}{${t}}`,"peer-disabled":(e,t)=>`.peer:disabled ~ ${e}{${t}}`,"dark-class":(e,t)=>`:host(.dark) ${e}{${t}}`,rtl:(e,t)=>`[dir=rtl] ${e}{${t}}`,ltr:(e,t)=>`[dir=ltr] ${e}{${t}}`,placeholder:(e,t)=>`${e}::placeholder{${t}}`,file:(e,t)=>`${e}::file-selector-button{${t}}`,marker:(e,t)=>`${e}::marker{${t}}`,selection:(e,t)=>`${e}::selection{${t}}`,open:(e,t)=>`${q(e,"[open]")}{${t}}`},oe={sm:"(min-width:640px)",md:"(min-width:768px)",lg:"(min-width:1024px)",xl:"(min-width:1280px)","2xl":"(min-width:1536px)",dark:"(prefers-color-scheme: dark)","motion-reduce":"(prefers-reduced-motion: reduce)","motion-safe":"(prefers-reduced-motion: no-preference)",print:"print","forced-colors":"(forced-colors: active)"},Ce={xs:"(min-width:20rem)",sm:"(min-width:24rem)",md:"(min-width:28rem)",lg:"(min-width:32rem)",xl:"(min-width:36rem)","2xl":"(min-width:42rem)","3xl":"(min-width:48rem)","4xl":"(min-width:56rem)","5xl":"(min-width:64rem)","6xl":"(min-width:72rem)","7xl":"(min-width:80rem)"},ne=["sm","md","lg","xl","2xl","motion-reduce","motion-safe","print","forced-colors"],pe=["xs","sm","md","lg","xl","2xl","3xl","4xl","5xl","6xl","7xl"];function ge(e){const t=e.startsWith("-"),c=t?e.slice(1):e,o=c.lastIndexOf("-");if(o===-1)return null;const r=c.slice(0,o),i=c.slice(o+1);if(!ye[r])return null;if(i.includes("/")){const[s,u]=i.split("/").map(l=>parseFloat(l));if(Number.isNaN(s)||Number.isNaN(u)||u===0)return null;const h=s/u*100;return ye[r].map(l=>`${l}:${h}%;`).join("")}const g=parseFloat(i);if(Number.isNaN(g))return null;const w=t?"-":"";return ye[r].map(s=>`${s}:calc(${w}${G} * ${g});`).join("")}function he(e){const t=e.startsWith("-"),o=(t?e.slice(1):e).match(/^space-(x|y)-(.+)$/);if(!o)return null;const[,r,i]=o,g=r==="x";if(i==="reverse")return g?"--cer-space-x-reverse:1;":"--cer-space-y-reverse:1;";if(i.includes("/")){const[h,l]=i.split("/").map(d=>parseFloat(d));if(Number.isNaN(h)||Number.isNaN(l)||l===0)return null;const b=h/l*100,n=t?"-":"";return g?`--cer-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${n}${b}% * calc(1 - var(--cer-space-x-reverse)));margin-inline-end:calc(${n}${b}% * var(--cer-space-x-reverse));}`:`--cer-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${n}${b}% * calc(1 - var(--cer-space-y-reverse)));margin-bottom:calc(${n}${b}% * var(--cer-space-y-reverse));}`}const w=parseFloat(i);if(Number.isNaN(w))return null;const u=`calc(${t?"-":""}${G} * ${w})`;return g?`--cer-space-x-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-inline-start:calc(${u} * calc(1 - var(--cer-space-x-reverse)));margin-inline-end:calc(${u} * var(--cer-space-x-reverse));}`:`--cer-space-y-reverse:0;& > :not([hidden]) ~ :not([hidden]){margin-top:calc(${u} * calc(1 - var(--cer-space-y-reverse)));margin-bottom:calc(${u} * var(--cer-space-y-reverse));}`}function ue(e){let t=e.replace("#","");t.length===3&&(t=t.split("").map(o=>o+o).join(""));const c=parseInt(t,16);return`${c>>16&255} ${c>>8&255} ${c&255}`}const Ke=/^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke|ring|divide)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/,Xe={bg:"background-color",decoration:"text-decoration-color",text:"color",border:"border-color",outline:"outline-color",caret:"caret-color",accent:"accent-color",fill:"fill",stroke:"stroke"};function Qe(e){const t=Ke.exec(e);if(!t)return null;const[,c,o,r="DEFAULT"]=t,i=Ee[o]?.[r];if(!i)return null;if(c==="shadow")return`--cer-shadow-color:${i};`;if(c==="ring")return`--cer-ring-color:${i};`;if(c==="divide")return`border-color:${i};`;const g=Xe[c];return g?`${g}:${i};`:null}function Ge(e){const t=e.indexOf("/");if(t===-1)return{base:e};const c=e.slice(0,t),o=e.slice(t+1),r=parseInt(o,10);return isNaN(r)||r<0||r>100?{base:c}:{base:c,opacity:r/100}}function me(e){const{base:t,opacity:c}=Ge(e),o=Qe(t);if(o){if(c!==void 0){if(o.includes("var(")){const g=/var\([^)]*\)/.exec(o);if(g){const w=g[0],s=c*100,u=`color-mix(in srgb, ${w} ${s}%, rgba(0 0 0 / 0) ${100-s}%)`,h=/#([0-9a-f]{6}|[0-9a-f]{3})/i.exec(w),l=/^([a-z-]+):/.exec(o),b=l?l[1]:"background-color";if(h){const d=`rgb(${ue(h[0])} / ${c})`,f=w.replace(/#([0-9a-f]{6}|[0-9a-f]{3})/i,d);return`${b}:${f};__CE_COLOR_MIX_SPLIT__${b}:${u};`}return`${b}:${u};`}}const i=/#([0-9a-f]{6}|[0-9a-f]{3})/i.exec(o);if(i){const g=ue(i[0]);return o.replace(/#([0-9a-f]{6}|[0-9a-f]{3})/i,`rgb(${g} / ${c})`)}}return o}const r=ie(t);if(r&&c!==void 0){if(r.includes("var(")){const g=/var\([^)]*\)/.exec(r);if(g){const w=g[0],s=c*100,u=`color-mix(in srgb, ${w} ${s}%, rgba(0 0 0 / 0) ${100-s}%)`,h=/#([0-9a-f]{6}|[0-9a-f]{3})/i.exec(w),l=/^([a-z-]+):/.exec(r),b=l?l[1]:null;if(h&&b){const d=`rgb(${ue(h[0])} / ${c})`,f=w.replace(/#([0-9a-f]{6}|[0-9a-f]{3})/i,d);return`${b}:${f};__CE_COLOR_MIX_SPLIT__${b}:${u};`}return r.replace(w,u)}}const i=/#([0-9a-f]{6}|[0-9a-f]{3})/i.exec(r);if(i){const g=ue(i[0]);return r.replace(/#([0-9a-f]{6}|[0-9a-f]{3})/i,`rgb(${g} / ${c})`)}}return r}function be(e){const t=/^(from|to|via)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);if(!t)return null;const[,c,o,r="DEFAULT"]=t,i=Ee[o]?.[r];if(!i)return null;switch(c){case"from":return`--cer-gradient-from:${i} var(--cer-gradient-from-position);--cer-gradient-to:rgb(255 255 255 / 0) var(--cer-gradient-to-position);--cer-gradient-stops:var(--cer-gradient-from), var(--cer-gradient-to);`;case"to":return`--cer-gradient-to:${i} var(--cer-gradient-to-position);`;case"via":return`--cer-gradient-to:rgb(255 255 255 / 0) var(--cer-gradient-to-position);--cer-gradient-stops:var(--cer-gradient-from), ${i} var(--cer-gradient-via-position), var(--cer-gradient-to);`;default:return null}}function xe(e){const t=/^opacity-(\d{1,3})$/.exec(e);if(!t)return null;const c=parseInt(t[1],10);return c<0||c>100?null:`opacity:${c/100};`}function ie(e){if(e.startsWith("[")&&e.endsWith("]")&&!e.includes("-[")){const g=e.slice(1,-1).trim(),w=g.indexOf(":");if(w===-1)return null;const s=g.slice(0,w).trim();let u=g.slice(w+1).trim();return/^[a-zA-Z][a-zA-Z0-9-]*$/.test(s)?(u=u.replace(/_/g," "),u=u.replace(/url\('\s*([^']*?)\s*'\)/g,'url("$1")'),u=u.replace(/^'([^']*)'$/g,'"$1"'),`${s}:${u};`):null}const t=e.indexOf("-[");if(t<=0||!e.endsWith("]"))return null;const c=e.slice(0,t),o=e.slice(t+2,-1).replace(/_/g," "),r={bg:"background-color",shadow:"box-shadow",p:"padding",px:"padding-inline",py:"padding-block",m:"margin",mx:"margin-inline",my:"margin-block",w:"width",h:"height","min-w":"min-width","max-w":"max-width","min-h":"min-height","max-h":"max-height","border-t":"border-top-width","border-b":"border-bottom-width","border-l":"border-left-width","border-r":"border-right-width","border-x":"border-inline-width","border-y":"border-block-width","grid-cols":"grid-template-columns","grid-rows":"grid-template-rows",transition:"transition-property",ease:"transition-timing-function",delay:"transition-delay",duration:"transition-duration",list:"list-style",break:"word-break",flex:"flex-direction",items:"align-items",justify:"justify-content",content:"content",self:"align-self",basis:"flex-basis",tracking:"letter-spacing",leading:"line-height",z:"z-index",opacity:"opacity"};if(c==="text")return/^\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex)$/.test(o)?`font-size:${o};`:`color:${o};`;if(c==="rotate")return`transform:rotate(${o});`;if(c==="scale")return`transform:scale(${o});`;if(c==="translate-x")return`transform:translateX(${o});`;if(c==="translate-y")return`transform:translateY(${o});`;const i=r[c]??c.replace(/_/g,"-");return i&&o?`${i}:${o};`:null}function ze(e){if(e.startsWith("[")&&e.endsWith("]")){const c=e.slice(1,-1);return c.includes("&")?c:e}const t=e.indexOf("-[");if(t>0&&e.endsWith("]")){const c=e.slice(t+2,-1).replace(/_/g,"-");return c.includes("&")?c:e.replace(/_/g,"-")}return null}function we(e){if(typeof CSS<"u"&&CSS.escape)return CSS.escape(e);const t=String(e),c=t.length;let o="",r=0;for(;r<c;){const i=t.charAt(r),g=t.charCodeAt(r);g===0?o+="�":g>=1&&g<=31||g===127||r===0&&g>=48&&g<=57||r===1&&g>=48&&g<=57&&t.charCodeAt(0)===45?o+="\\"+g.toString(16)+" ":r===0&&c===1&&g===45?o+="\\"+i:g>=128||g===45||g===95||g>=48&&g<=57||g>=65&&g<=90||g>=97&&g<=122?o+=i:o+="\\"+i,r++}return o}function ae(e){return"."+we(e)}function Ye(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ze(e){const t=/class\s*=\s*(['"])([\s\S]*?)\1/g,c=[];let o;for(;o=t.exec(e);){const r=o[2].split(/\s+/).filter(Boolean);r.length&&c.push(...r)}return c}const se=new Map,Oe=1e3;function We(e){const t=se.get(e);if(t)return t.css;const c=Ze(e);if(!c.length)return"";const o=new Set(c),r=[[],[],[],[]],i={},g=(d,f=!1)=>{const $=f?`dark|${d}`:d;if($ in i)return i[$];const y=h(d,f);return i[$]=y,y},w=d=>{const f=d.some(j=>ne.includes(j)),$=d.some(j=>j.startsWith("@")&&(pe.includes(j.slice(1))||j.match(/^@\[.+\]$/))),y=d.includes("dark");return d.length?!f&&!y&&!$?1:y&&(f||$)?3:2:0},s=d=>{const f=[];let $="",y=0;for(let j=0;j<d.length;j++){const k=d[j];k==="["||k==="("?y++:(k==="]"||k===")")&&y--,k===":"&&y===0?(f.push($),$=""):$+=k}return $&&f.push($),f},u={hover:":hover",focus:":focus",active:":active",visited:":visited",disabled:":disabled",checked:":checked",first:":first-child",last:":last-child",odd:":nth-child(odd)",even:":nth-child(even)","focus-within":":focus-within","focus-visible":":focus-visible"},h=(d,f=!1)=>{const $=s(d);let y="",j=!1;for(const a of $){let p=a;if(p.startsWith("!")&&(j=!0,p=p.slice(1)),p.endsWith("!")&&(j=!0,p=p.slice(0,-1)),!(p.startsWith("data-[")&&p.endsWith("]")||p.startsWith("has-[")&&p.endsWith("]")||p.startsWith("not-[")&&p.endsWith("]")||p.startsWith("in-[")&&p.endsWith("]")||p.startsWith("supports-[")&&p.endsWith("]")||p==="starting")&&(fe[p]||ge(p)||he(p)||xe(p)||me(p)||be(p)||ie(p))){y=a;break}}if(!y)return null;const k=y.replace(/^!/,"").replace(/!$/,""),P=fe[k]??ge(k)??he(k)??xe(k)??me(k)??be(k)??ie(k);if(!P)return null;const _=$.indexOf(y);let A=_>=0?$.slice(0,_):[];f&&(A=A.filter(a=>a!=="dark"));const z=ae(d),W=j?P.replace(/;/g," !important;"):P,x="__SUBJECT__";let m=x;const C=[];for(const a of A)a.startsWith("group-")?(m=`.group:${a.slice(6)} ${m}`,C.push(a)):a.startsWith("peer-")&&(m=m.replace(x,`.peer:${a.slice(5)}~${x}`),C.push(a));A=A.filter(a=>!C.includes(a));const E=[],L=[];let R=null,F=!1;const I=[];for(const a of A){if(a==="dark"||ne.includes(a)||a.startsWith("@")&&(pe.includes(a.slice(1))||a.match(/^@\[.+\]$/)))continue;if(a.startsWith("data-[")&&a.endsWith("]")){const v=a.slice(6,-1),M=v.includes("=")?"[data-"+v.replace(/^([^=]+)=(.+)$/,'$1="$2"')+"]":"[data-"+v+"]";E.push(M);continue}if(a.startsWith("has-[")&&a.endsWith("]")){const v=a.slice(5,-1).replace(/_/g," ");E.push(`:has(${v})`);continue}if(a.startsWith("not-[")&&a.endsWith("]")){const v=a.slice(5,-1).replace(/_/g," ");E.push(`:not(${v})`);continue}if(a.startsWith("in-[")&&a.endsWith("]")){m=":is("+a.slice(4,-1).replace(/_/g," ")+") "+m;continue}if(a==="starting"){F=!0;continue}if(a.startsWith("supports-[")&&a.endsWith("]")){I.push(a);continue}const p=ze(a);if(p){R=p;continue}const O=u[a];if(O){R?L.push(O):E.push(O);continue}const T=je[a];typeof T=="function"&&(m=T(m,W).split("{")[0])}const N=E.join(""),V=L.join("");function re(a,p){if(!p)return a;let O=0,T=0;if(a.length&&(a[0]===">"||a[0]==="+"||a[0]==="~"||a[0]===" ")){let v=1;for(;v<a.length&&a[v]===" ";)v++;for(;v<a.length;v++){const M=a[v];if(M==="["?O++:M==="]"&&O>0?O--:M==="("?T++:M===")"&&T>0&&T--,O===0&&T===0&&(a[v]===">"||a[v]==="+"||a[v]==="~"||a[v]===" "))return a.slice(0,v)+p+a.slice(v)}return a+p}for(let v=0;v<a.length;v++){const M=a[v];if(M==="["?O++:M==="]"&&O>0?O--:M==="("?T++:M===")"&&T>0&&T--,O===0&&T===0&&(M===">"||M==="+"||M==="~"||M===" "))return a.slice(0,v)+p+a.slice(v)}return a+p}if(R)if(R.includes("&")){const a=R.indexOf("&"),p=R.slice(0,a),O=R.slice(a+1),T=x+N;if(E.length===0)m=m.replace(x,p+T+V+O);else{const v=re(O,V);m=m.replace(x,p+T+v)}}else m=m.replace(x,`${R}${x+N}`),V&&(m=m.replace(x,`${x}${V}`));else m=m.replace(x,x+N+V);m=m.replace(new RegExp(x,"g"),z);const J="__CE_COLOR_MIX_SPLIT__",ce=W.includes(J)?W.split(J).map(a=>`${m}{${a}}`):[`${m}{${W}}`],H=A.filter(a=>ne.includes(a)),K=A.filter(a=>a.startsWith("@")&&(pe.includes(a.slice(1))||a.match(/^@\[.+\]$/))),Y=H.length?H[H.length-1]:null,S=K.length?K[K.length-1]:null,le=A.includes("dark");let U="",X="";if(le&&Y?U=`@media (prefers-color-scheme: dark) and ${oe[Y]}`:le?U="@media (prefers-color-scheme: dark)":Y&&(U=`@media ${oe[Y]}`),S)if(S.startsWith("@[")&&S.endsWith("]")){const a=S.slice(2,-1);if(!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(a))return null;X=`@container (min-width:${a})`}else{const a=S.slice(1);X=`@container ${Ce[a]||`(min-width:${a})`}`}let D="";if(I.length>0){const p=I[I.length-1].slice(10,-1).replace(/_/g," ");D=`@supports ${p.startsWith("not(")||p.startsWith("selector(")||p.startsWith("(")?p:`(${p})`}`}const B=a=>{let p=a;return F&&(p=`@starting-style{${p}}`),D&&(p=`${D}{${p}}`),U&&X?`${U}${X}{${p}}`:U?`${U}{${p}}`:X?`${X}{${p}}`:p};return ce.map(B).join("")};for(const d of o){const f=s(d),$=f.slice(0,-1),y=f[f.length-1];if(He(y)!==null){if($.length===0)r[0].push(`${ae(d)}{}`);else{const x=Te(y);if(!x)continue;const m=ae(d),C=ae(y);let E=x.replace(new RegExp(Ye(C),"g"),m);const L=$.filter(F=>ne.includes(F));if(L.length>0){const F=L[L.length-1];E=`${`@media ${oe[F]}`}{${E}}`}$.includes("dark")&&(E=`@media (prefers-color-scheme: dark){${E}}`);const R=w($);r[R].push(E)}continue}let k=-1;for(let x=f.length-1;x>=0;x--){const m=f.slice(x).join(":");if(Se(m)){k=x;break}}if(k>=0){const x=f.slice(k).join(":"),m=f.slice(0,k),C=Se(x);if(!C)continue;if(m.length===0){r[0].push(C);continue}const E=we(d),L=we(x),R=C.replace(new RegExp(`\\.${L.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}`,"g"),`.${E}`),F=/(.+?)\s+(.+?)\{([^}]+)\}/g,I=[...R.matchAll(F)];if(I.length===0){r[0].push(C);continue}const N=w(m),V={hover:":hover",focus:":focus",active:":active",visited:":visited",disabled:":disabled",checked:":checked",first:":first-child",last:":last-child",odd:":nth-child(odd)",even:":nth-child(even)","focus-within":":focus-within","focus-visible":":focus-visible"},re=[],J=[],ce=[],H=[],K=[];let Y=!1;for(const S of m)S.startsWith("group-")||S.startsWith("peer-")?re.push(S):S==="dark"||S==="dark-class"?Y=!0:ne.includes(S)?H.push(S):S.startsWith("@")&&(pe.includes(S.slice(1))||S.match(/^@\[.+\]$/))?K.push(S):S.startsWith("[")&&S.endsWith("]")?ce.push(S):(V[S]||je[S])&&J.push(S);for(const S of I){const[,le,U,X]=S;let D=`${le} ${U}`;for(const a of re)if(a.startsWith("group-")){const p=a.slice(6);D=`.group${V[p]||`:${p}`} ${D}`}else if(a.startsWith("peer-")){const p=a.slice(5);D=`.peer${V[p]||`:${p}`}~${D}`}if(J.length>0){const a=J.map(p=>V[p]||`:${p}`).join("");D=`${D}${a}`}for(const a of ce){const p=ze(a);if(p&&p.includes("&")){const O=p.indexOf("&"),T=p.slice(0,O),v=p.slice(O+1);D=`${T}${D}${v}`}}let B=`${D}{${X}}`;if(Y&&(B=`@media (prefers-color-scheme: dark){${B}}`),K.length>0){const a=K[K.length-1];if(a.startsWith("@[")&&a.endsWith("]")){const p=a.slice(2,-1);/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(p)&&(B=`@container (min-width:${p}){${B}}`)}else{const p=a.slice(1),T={xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"}[p];if(T){const v=d.match(/@([^/]+)\//)?.[1]||"";B=v?`@container ${v} (min-width: ${T}){${B}}`:`@container (min-width: ${T}){${B}}`}}}if(H.length>0){const a=H[H.length-1];B=`${`@media ${oe[a]}`}{${B}}`}r[N].push(B)}continue}const P=f.find(x=>{const m=x.replace(/^!/,"").replace(/!$/,"");return fe[m]||ge(m)||he(m)||xe(m)||me(m)||be(m)||ie(m)});if(!P)continue;const _=f.indexOf(P),A=_>=0?f.slice(0,_):[],z=w(A),W=g(d);W&&r[z].push(W)}const l=/^(from|via|to)-[a-z]+-?\d{2,3}?$/;for(const d of o)if(l.test(d)){if(r.flat().join("").includes(ae(d)))continue;const $=g(d);$&&r[0].push($)}const b=d=>d.sort((f,$)=>{const y=z=>{const W={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};for(const[x,m]of Object.entries(W))if(z.includes(`@media ${oe[x]}`))return m;return-1},j=z=>{const W={xs:320,sm:384,md:448,lg:512,xl:576,"2xl":672,"3xl":768,"4xl":896,"5xl":1024,"6xl":1152,"7xl":1280};for(const[x,m]of Object.entries(W))if(z.includes(`@container ${Ce[x]}`))return m;if(z.includes("@container (min-width:")){const x=/@container \(min-width:(\d+(?:\.\d+)?)(px|rem|em)/.exec(z);if(x){const m=parseFloat(x[1]),C=x[2];return C==="rem"||C==="em"?m*16:m}}return-1},k=y(f),P=y($),_=j(f),A=j($);return k>=0&&P>=0&&k!==P?k-P:_>=0&&A>=0&&_!==A?_-A:0});r[2]=b(r[2]),r[3]=b(r[3]);const n=r.flat().join("");return se.size>=Oe&&Array.from(se.keys()).slice(0,Math.floor(Oe/2)).forEach(f=>se.delete(f)),se.set(e,{css:n,timestamp:Date.now()}),n}const ee={fade:{enterFrom:"opacity-0",enterActive:"transition-opacity duration-300 ease-out",enterTo:"opacity-100",leaveFrom:"opacity-100",leaveActive:"transition-opacity duration-200 ease-in",leaveTo:"opacity-0"},"slide-right":{enterFrom:"translate-x-[100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-x-[0%] opacity-100",leaveFrom:"translate-x-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-x-[100%] opacity-0"},"slide-left":{enterFrom:"translate-x-[-100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-x-[0%] opacity-100",leaveFrom:"translate-x-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-x-[-100%] opacity-0"},"slide-up":{enterFrom:"translate-y-[100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-y-[0%] opacity-100",leaveFrom:"translate-y-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-y-[100%] opacity-0"},"slide-down":{enterFrom:"translate-y-[-100%] opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"translate-y-[0%] opacity-100",leaveFrom:"translate-y-[0%] opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"translate-y-[-100%] opacity-0"},scale:{enterFrom:"scale-95 opacity-0",enterActive:"transition-all duration-200 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-150 ease-in",leaveTo:"scale-95 opacity-0"},"scale-down":{enterFrom:"scale-105 opacity-0",enterActive:"transition-all duration-200 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-150 ease-in",leaveTo:"scale-105 opacity-0"},bounce:{enterFrom:"scale-0 opacity-0",enterActive:"transition-all duration-500 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"scale-0 opacity-0"},zoom:{enterFrom:"scale-0 opacity-0",enterActive:"transition-all duration-300 ease-out",enterTo:"scale-100 opacity-100",leaveFrom:"scale-100 opacity-100",leaveActive:"transition-all duration-200 ease-in",leaveTo:"scale-0 opacity-0"},flip:{enterFrom:"rotate-[90deg] opacity-0",enterActive:"transition-all duration-400 ease-out",enterTo:"rotate-[0deg] opacity-100",leaveFrom:"rotate-[0deg] opacity-100",leaveActive:"transition-all duration-300 ease-in",leaveTo:"rotate-[90deg] opacity-0"}};function Je(e,t){const{preset:c,show:o,mode:r="default",duration:i,appear:g=!1,css:w=!0,name:s,enterFrom:u,enterActive:h,enterTo:l,leaveFrom:b,leaveActive:n,leaveTo:d,onBeforeEnter:f,onEnter:$,onAfterEnter:y,onEnterCancelled:j,onBeforeLeave:k,onLeave:P,onAfterLeave:_,onLeaveCancelled:A}=e;let z;c&&ee[c]?(z={...ee[c]},u&&(z.enterFrom=u),h&&(z.enterActive=h),l&&(z.enterTo=l),b&&(z.leaveFrom=b),n&&(z.leaveActive=n),d&&(z.leaveTo=d)):z={enterFrom:u,enterActive:h,enterTo:l,leaveFrom:b,leaveActive:n,leaveTo:d};const W=s||(c?`transition-${c}`:"transition"),x=Me.anchorBlock(o?t:[],W);return x._transition={name:W,classes:z,mode:r,duration:i,appear:g,css:w,state:o?"visible":"hidden",hooks:{onBeforeEnter:f,onEnter:$,onAfterEnter:y,onEnterCancelled:j,onBeforeLeave:k,onLeave:P,onAfterLeave:_,onLeaveCancelled:A}},x}function er(e,t){const{tag:c="div",moveClass:o="transition-transform duration-300",preset:r,show:i=!0,mode:g="default",duration:w,appear:s=!1,css:u=!0,name:h,class:l,style:b,enterFrom:n,enterActive:d,enterTo:f,leaveFrom:$,leaveActive:y,leaveTo:j,onBeforeEnter:k,onEnter:P,onAfterEnter:_,onEnterCancelled:A,onBeforeLeave:z,onLeave:W,onAfterLeave:x,onLeaveCancelled:m}=e;let C;r&&ee[r]?(C={...ee[r]},n&&(C.enterFrom=n),d&&(C.enterActive=d),f&&(C.enterTo=f),$&&(C.leaveFrom=$),y&&(C.leaveActive=y),j&&(C.leaveTo=j)):C={enterFrom:n,enterActive:d,enterTo:f,leaveFrom:$,leaveActive:y,leaveTo:j};const E=h||(r?`transition-group-${r}`:"transition-group"),L=[];for(const F of i?t:[])if(F&&typeof F=="object"&&F.tag==="#anchor"){const I=Array.isArray(F.children)?F.children:[];for(const N of I)if(N&&typeof N=="object"){const V={...N,key:F.key||N.key,props:{...N.props,_anchorKey:F.key}};L.push(V)}else L.push(N)}else L.push(F);const R=(()=>{if(b)return typeof b=="string"?b:Object.entries(b).map(([F,I])=>`${F}: ${I}`).join("; ")})();return{tag:c,children:L,key:E,props:{attrs:{...l?{class:l}:{},...R?{style:R}:{}},_transitionGroup:{name:E,classes:C,moveClass:o,mode:g,duration:w,appear:s,css:u,hooks:{onBeforeEnter:k,onEnter:P,onAfterEnter:_,onEnterCancelled:A,onBeforeLeave:z,onLeave:W,onAfterLeave:x,onLeaveCancelled:m}}}}}function rr(e){return{...e}}let Z=null;function Re(){if(!Z){if(typeof CSSStyleSheet>"u")return Z={cssRules:[],replaceSync:()=>{},toString:()=>""},Z;const e=[];Object.values(ee).forEach(o=>{o.enterFrom&&e.push(o.enterFrom),o.enterActive&&e.push(o.enterActive),o.enterTo&&e.push(o.enterTo),o.leaveFrom&&e.push(o.leaveFrom),o.leaveActive&&e.push(o.leaveActive),o.leaveTo&&e.push(o.leaveTo)});const t=`<div class="${e.join(" ")}"></div>`,c=We(t);try{Z=new CSSStyleSheet,Z.replaceSync(c)}catch{Z={cssRules:[],replaceSync:()=>{},toString:()=>c||""}}}return Z}function tr(){if(!(typeof window>"u"||typeof CSSStyleSheet>"u"))try{Re()}catch{}}tr();exports.Transition=Je;exports.TransitionGroup=er;exports.baseReset=ke;exports.createTransitionPreset=rr;exports.css=Ae;exports.getBaseResetSheet=qe;exports.getProseSheet=Fe;exports.getTransitionStyleSheet=Re;exports.jitCSS=We;exports.minifyCSS=$e;exports.sanitizeCSS=Ne;exports.transitionPresets=ee;
330
- //# sourceMappingURL=transitions-DPZiuXb9.cjs.map
330
+ //# sourceMappingURL=transitions-Cm2TlhoN.cjs.map