docs: 仓库链接指向本镜像仓库
Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Skipped

This commit is contained in:
TanTan committed 2026-11-13 09:27:07 +08:00
1 parent fa9c73363d
commit 2a69b23b47
18210 files changed
+5101211 -16

No files matched your search

@@ -0,0 +1 @@
{"version":3,"file":"hand.js","sources":["../../../src/icons/hand.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Hand\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTggMTFWNmEyIDIgMCAwIDAtMi0yYTIgMiAwIDAgMC0yIDIiIC8+CiAgPHBhdGggZD0iTTE0IDEwVjRhMiAyIDAgMCAwLTItMmEyIDIgMCAwIDAtMiAydjIiIC8+CiAgPHBhdGggZD0iTTEwIDEwLjVWNmEyIDIgMCAwIDAtMi0yYTIgMiAwIDAgMC0yIDJ2OCIgLz4KICA8cGF0aCBkPSJNMTggOGEyIDIgMCAxIDEgNCAwdjZhOCA4IDAgMCAxLTggOGgtMmMtMi44IDAtNC41LS44Ni01Ljk5LTIuMzRsLTMuNi0zLjZhMiAyIDAgMCAxIDIuODMtMi44Mkw3IDE1IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/hand\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Hand = createLucideIcon('Hand', [\n ['path', { d: 'M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2', key: '1fvzgz' }],\n ['path', { d: 'M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2', key: '1kc0my' }],\n ['path', { d: 'M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8', key: '10h0bg' }],\n [\n 'path',\n {\n d: 'M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15',\n key: '1s1gnw',\n },\n ],\n]);\n\nexport default Hand;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,iBAAiB,MAAQ,CAAA,CAAA,CAAA;AAAA,CAAA,CACpC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAwC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACrE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACzE,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"route.cjs","names":[],"sources":["../../src/route.tsx"],"sourcesContent":["import {\n BaseRootRoute,\n BaseRoute,\n BaseRouteApi,\n notFound,\n} from '@tanstack/router-core'\nimport React from 'react'\nimport { useLoaderData } from './useLoaderData'\nimport { useLoaderDeps } from './useLoaderDeps'\nimport { useParams } from './useParams'\nimport { useSearch } from './useSearch'\nimport { useNavigate } from './useNavigate'\nimport { useMatch } from './useMatch'\nimport { useRouteContext } from './useRouteContext'\nimport { useRouter } from './useRouter'\nimport { Link } from './link'\nimport type {\n AnyContext,\n AnyRoute,\n AnyRouter,\n ConstrainLiteral,\n ErrorComponentProps,\n NotFoundError,\n NotFoundRouteProps,\n Register,\n RegisteredRouter,\n ResolveFullPath,\n ResolveId,\n ResolveParams,\n RootRoute as RootRouteCore,\n RootRouteId,\n RootRouteOptions,\n RouteConstraints,\n Route as RouteCore,\n RouteIds,\n RouteMask,\n RouteOptions,\n RouteTypesById,\n RouterCore,\n ToMaskOptions,\n UseNavigateResult,\n} from '@tanstack/router-core'\nimport type { UseLoaderDataRoute } from './useLoaderData'\nimport type { UseMatchRoute } from './useMatch'\nimport type { UseLoaderDepsRoute } from './useLoaderDeps'\nimport type { UseParamsRoute } from './useParams'\nimport type { UseSearchRoute } from './useSearch'\nimport type { UseRouteContextRoute } from './useRouteContext'\nimport type { LinkComponentRoute } from './link'\n\ndeclare module '@tanstack/router-core' {\n export interface UpdatableRouteOptionsExtensions {\n component?: RouteComponent\n errorComponent?: false | null | undefined | ErrorRouteComponent\n notFoundComponent?: NotFoundRouteComponent\n pendingComponent?: RouteComponent\n }\n\n export interface RootRouteOptionsExtensions {\n shellComponent?: ({\n children,\n }: {\n children: React.ReactNode\n }) => React.ReactNode\n }\n\n export interface RouteExtensions<\n in out TId extends string,\n in out TFullPath extends string,\n > {\n useMatch: UseMatchRoute<TId>\n useRouteContext: UseRouteContextRoute<TId>\n useSearch: UseSearchRoute<TId>\n useParams: UseParamsRoute<TId>\n useLoaderDeps: UseLoaderDepsRoute<TId>\n useLoaderData: UseLoaderDataRoute<TId>\n useNavigate: () => UseNavigateResult<TFullPath>\n Link: LinkComponentRoute<TFullPath>\n }\n}\n\n/**\n * Returns a route-specific API that exposes type-safe hooks pre-bound\n * to a single route ID. Useful for consuming a route's APIs from files\n * where the route object isn't directly imported (e.g. code-split files).\n *\n * @param id Route ID string literal for the target route.\n * @returns A `RouteApi` instance bound to the given route ID.\n * @link https://tanstack.com/router/latest/docs/framework/react/api/router/getRouteApiFunction\n */\nexport function getRouteApi<\n const TId,\n TRouter extends AnyRouter = RegisteredRouter,\n>(id: ConstrainLiteral<TId, RouteIds<TRouter['routeTree']>>) {\n return new RouteApi<TId, TRouter>({ id })\n}\n\nexport class RouteApi<\n TId,\n TRouter extends AnyRouter = RegisteredRouter,\n> extends BaseRouteApi<TId, TRouter> {\n /**\n * @deprecated Use the `getRouteApi` function instead.\n */\n constructor({ id }: { id: TId }) {\n super({ id })\n }\n\n useMatch: UseMatchRoute<TId> = (opts) => {\n return useMatch({\n select: opts?.select,\n from: this.id,\n structuralSharing: opts?.structuralSharing,\n } as any) as any\n }\n\n useRouteContext: UseRouteContextRoute<TId> = (opts) => {\n return useRouteContext({ ...(opts as any), from: this.id as any })\n }\n\n useSearch: UseSearchRoute<TId> = (opts) => {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n return useSearch({\n select: opts?.select,\n structuralSharing: opts?.structuralSharing,\n from: this.id,\n } as any) as any\n }\n\n useParams: UseParamsRoute<TId> = (opts) => {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n return useParams({\n select: opts?.select,\n structuralSharing: opts?.structuralSharing,\n from: this.id,\n } as any) as any\n }\n\n useLoaderDeps: UseLoaderDepsRoute<TId> = (opts) => {\n return useLoaderDeps({ ...opts, from: this.id, strict: false } as any)\n }\n\n useLoaderData: UseLoaderDataRoute<TId> = (opts) => {\n return useLoaderData({ ...opts, from: this.id, strict: false } as any)\n }\n\n useNavigate = (): UseNavigateResult<\n RouteTypesById<TRouter, TId>['fullPath']\n > => {\n const router = useRouter()\n return useNavigate({ from: router.routesById[this.id as string].fullPath })\n }\n\n notFound = (opts?: NotFoundError) => {\n return notFound({ routeId: this.id as string, ...opts })\n }\n\n Link: LinkComponentRoute<RouteTypesById<TRouter, TId>['fullPath']> =\n React.forwardRef((props, ref: React.ForwardedRef<HTMLAnchorElement>) => {\n Line truncated
@@ -0,0 +1,38 @@
"use strict";var hn=Object.defineProperty;var vn=(e,r)=>{for(var i in r)hn(e,i,{get:r[i],enumerable:!0})};var Ut={};vn(Ut,{Features:()=>Pe,Polyfills:()=>ht,__unstable__loadDesignSystem:()=>na,compile:()=>ia,compileAst:()=>gn,default:()=>at});var hr="4.2.2";function st(e){let r=[0];for(let n=0;n<e.length;n++)e.charCodeAt(n)===10&&r.push(n+1);function i(n){let a=0,o=r.length;for(;o>0;){let u=(o|0)>>1,c=a+u;r[c]<=n?(a=c+1,o=o-u-1):o=u}a-=1;let f=n-r[a];return{line:a+1,column:f}}function t({line:n,column:a}){n-=1,n=Math.min(Math.max(n,0),r.length-1);let o=r[n],f=r[n+1]??o;return Math.min(Math.max(o+a,0),f)}return{find:i,findOffset:t}}var He=92,ut=47,ct=42,vr=34,kr=39,wn=58,ft=59,se=10,pt=13,Ze=32,Qe=9,wr=123,Kt=125,jt=40,br=41,bn=91,yn=93,yr=45,zt=64,xn=33,ue=class e extends Error{loc;constructor(r,i){if(i){let t=i[0],n=st(t.code).find(i[1]);r=`${t.file}:${n.line}:${n.column+1}: ${r}`}super(r),this.name="CssSyntaxError",this.loc=i,Error.captureStackTrace&&Error.captureStackTrace(this,e)}};function Ve(e,r){let i=r?.from?{file:r.from,code:e}:null;e[0]==="\uFEFF"&&(e=" "+e.slice(1));let t=[],n=[],a=[],o=null,f=null,u="",c="",m=0,d;for(let p=0;p<e.length;p++){let k=e.charCodeAt(p);if(!(k===pt&&(d=e.charCodeAt(p+1),d===se)))if(k===He)u===""&&(m=p),u+=e.slice(p,p+2),p+=1;else if(k===ut&&e.charCodeAt(p+1)===ct){let h=p;for(let A=p+2;A<e.length;A++)if(d=e.charCodeAt(A),d===He)A+=1;else if(d===ct&&e.charCodeAt(A+1)===ut){p=A+1;break}let w=e.slice(h,p+1);if(w.charCodeAt(2)===xn){let A=dt(w.slice(2,-2));n.push(A),i&&(A.src=[i,h,p+1],A.dst=[i,h,p+1])}}else if(k===kr||k===vr){let h=xr(e,p,k,i);u+=e.slice(p,h+1),p=h}else{if((k===Ze||k===se||k===Qe)&&(d=e.charCodeAt(p+1))&&(d===Ze||d===se||d===Qe||d===pt&&(d=e.charCodeAt(p+2))&&d==se))continue;if(k===se){if(u.length===0)continue;d=u.charCodeAt(u.length-1),d!==Ze&&d!==se&&d!==Qe&&(u+=" ")}else if(k===yr&&e.charCodeAt(p+1)===yr&&u.length===0){let h="",w=p,A=-1;for(let x=p+2;x<e.length;x++)if(d=e.charCodeAt(x),d===He)x+=1;else if(d===kr||d===vr)x=xr(e,x,d,i);else if(d===ut&&e.charCodeAt(x+1)===ct){for(let b=x+2;b<e.length;b++)if(d=e.charCodeAt(b),d===He)b+=1;else if(d===ct&&e.charCodeAt(b+1)===ut){x=b+1;break}}else if(A===-1&&d===wn)A=u.length+x-w;else if(d===ft&&h.length===0){u+=e.slice(w,x),p=x;break}else if(d===jt)h+=")";else if(d===bn)h+="]";else if(d===wr)h+="}";else if((d===Kt||e.length-1===x)&&h.length===0){p=x-1,u+=e.slice(w,x);break}else(d===br||d===yn||d===Kt)&&h.length>0&&e[x]===h[h.length-1]&&(h=h.slice(0,-1));let V=Mt(u,A);if(!V)throw new ue("Invalid custom property, expected a value",i?[i,w,p]:null);i&&(V.src=[i,w,p],V.dst=[i,w,p]),o?o.nodes.push(V):t.push(V),u=""}else if(k===ft&&u.charCodeAt(0)===zt)f=Je(u),i&&(f.src=[i,m,p],f.dst=[i,m,p]),o?o.nodes.push(f):t.push(f),u="",f=null;else if(k===ft&&c[c.length-1]!==")"){let h=Mt(u);if(!h){if(u.length===0)continue;throw new ue(`Invalid declaration: \`${u.trim()}\``,i?[i,m,p]:null)}i&&(h.src=[i,m,p],h.dst=[i,m,p]),o?o.nodes.push(h):t.push(h),u=""}else if(k===wr&&c[c.length-1]!==")")c+="}",f=Z(u.trim()),i&&(f.src=[i,m,p],f.dst=[i,m,p]),o&&o.nodes.push(f),a.push(o),o=f,u="",f=null;else if(k===Kt&&c[c.length-1]!==")"){if(c==="")throw new ue("Missing opening {",i?[i,p,p]:null);if(c=c.slice(0,-1),u.length>0)if(u.charCodeAt(0)===zt)f=Je(u),i&&(f.src=[i,m,p],f.dst=[i,m,p]),o?o.nodes.push(f):t.push(f),u="",f=null;else{let w=u.indexOf(":");if(o){let A=Mt(u,w);if(!A)throw new ue(`Invalid declaration: \`${u.trim()}\``,i?[i,m,p]:null);i&&(A.src=[i,m,p],A.dst=[i,m,p]),o.nodes.push(A)}}let h=a.pop()??null;h===null&&o&&t.push(o),o=h,u="",f=null}else if(k===jt)c+=")",u+="(";else if(k===br){if(c[c.length-1]!==")")throw new ue("Missing opening (",i?[i,p,p]:null);c=c.slice(0,-1),u+=")"}else{if(u.length===0&&(k===Ze||k===se||k===Qe))continue;u===""&&(m=p),u+=String.fromCharCode(k)}}}if(u.charCodeAt(0)===zt){let p=Je(u);i&&(p.src=[i,m,e.length],p.dst=[i,m,e.length]),t.push(p)}if(c.length>0&&o){if(o.kind==="rule")throw new ue(`Missing closing } at ${o.selector}`,o.src?[o.src[0],o.src[1],o.src[1]]:null);if(o.kind==="at-rule")throw new ue(`Missing closing } at ${o.name} ${o.params}`,o.src?[o.src[0],o.src[1],o.src[1]]:null)}return n.length>0?n.concat(t):t}function Je(e,r=[]){let i=e,t="";for(let n=5;n<e.length;n++){let a=e.charCodeAt(n);if(a===Ze||a===Qe||a===jt){i=e.slice(0,n),t=e.slice(n);break}}return F(i.trim(),t.trim(),r)}function Mt(e,r=e.indexOf(":")){if(r===-1)return null;let i=e.indexOf("!important",r+1);return l(e.slice(0,r).trim(),e.slice(r+1,i===-1?e.length:i).trim(),i!==-1)}function xr(e,r,i,t=null){let n;for(let a=r+1;a<e.length;a++)if(n=e.charCodeAt(a),n===He)a+=1;else{if(n===i)return a;if(n===ft&&(e.charCodeAt(a+1)===se||e.charCodeAt(a+1)===pt&&e.charCodeAt(a+2)===se))throw new ue(`Unterminated string: ${e.slice(r,a+1)+String.fromCharCode(i)}`,t?[t,r,a+1]:null);if(n===se||n===pt&&e.charCodeAt(a+1)===se)throw new ue(`Unterminated string: ${e.slice(r,a)+String.fromCharCode(i)}`,t?[t,r,a+1]:null)}return r}function Ae(e){if(argumentLine truncated
`,`
`);let r=[],i=[],t=null,n="",a;for(let o=0;o<e.length;o++){let f=e.charCodeAt(o);switch(f){case Sr:{n+=e[o]+e[o+1],o++;break}case Nn:{if(n.length>0){let c=oe(n);t?t.nodes.push(c):r.push(c),n=""}let u=oe(e[o]);t?t.nodes.push(u):r.push(u);break}case $r:case Tr:case Er:case Nr:case Vr:case Rr:case Or:case Pr:{if(n.length>0){let d=oe(n);t?t.nodes.push(d):r.push(d),n=""}let u=o,c=o+1;for(;c<e.length&&(a=e.charCodeAt(c),!(a!==$r&&a!==Tr&&a!==Er&&a!==Nr&&a!==Vr&&a!==Rr&&a!==Or&&a!==Pr));c++);o=c-1;let m=Cn(e.slice(u,c));t?t.nodes.push(m):r.push(m);break}case En:case $n:{let u=o;for(let c=o+1;c<e.length;c++)if(a=e.charCodeAt(c),a===Sr)c+=1;else if(a===f){o=c;break}n+=e.slice(u,o+1);break}case Tn:{let u=An(n,[]);n="",t?t.nodes.push(u):r.push(u),i.push(u),t=u;break}case Sn:{let u=i.pop();if(n.length>0){let c=oe(n);u?.nodes.push(c),n=""}i.length>0?t=i[i.length-1]:t=null;break}default:n+=String.fromCharCode(f)}}return n.length>0&&r.push(oe(n)),r}var Wt=(o=>(o[o.Continue=0]="Continue",o[o.Skip=1]="Skip",o[o.Stop=2]="Stop",o[o.Replace=3]="Replace",o[o.ReplaceSkip=4]="ReplaceSkip",o[o.ReplaceStop=5]="ReplaceStop",o))(Wt||{}),R={Continue:{kind:0},Skip:{kind:1},Stop:{kind:2},Replace:e=>({kind:3,nodes:Array.isArray(e)?e:[e]}),ReplaceSkip:e=>({kind:4,nodes:Array.isArray(e)?e:[e]}),ReplaceStop:e=>({kind:5,nodes:Array.isArray(e)?e:[e]})};function I(e,r){typeof r=="function"?_r(e,r):_r(e,r.enter,r.exit)}function _r(e,r=()=>R.Continue,i=()=>R.Continue){let t={value:[e,0,null],prev:null},n={parent:null,depth:0,path(){let a=[],o=t;for(;o;){let f=o.value[2];f&&a.push(f),o=o.prev}return a.reverse(),a}};for(;t!==null;){let a=t.value,o=a[0],f=a[1],u=a[2];if(f>=o.length){t=t.prev,n.depth-=1;continue}if(n.parent=u,f>=0){let p=o[f],k=r(p,n)??R.Continue;switch(k.kind){case 0:{p.nodes&&p.nodes.length>0&&(n.depth+=1,t={value:[p.nodes,0,p],prev:t}),a[1]=~f;continue}case 2:return;case 1:{a[1]=~f;continue}case 3:{o.splice(f,1,...k.nodes);continue}case 5:{o.splice(f,1,...k.nodes);return}case 4:{o.splice(f,1,...k.nodes),a[1]+=k.nodes.length;continue}default:throw new Error(`Invalid \`WalkAction.${Wt[k.kind]??`Unknown(${k.kind})`}\` in enter.`)}}let c=~f,m=o[c],d=i(m,n)??R.Continue;switch(d.kind){case 0:a[1]=c+1;continue;case 2:return;case 3:{o.splice(c,1,...d.nodes),a[1]=c+d.nodes.length;continue}case 5:{o.splice(c,1,...d.nodes);return}case 4:{o.splice(c,1,...d.nodes),a[1]=c+d.nodes.length;continue}default:throw new Error(`Invalid \`WalkAction.${Wt[d.kind]??`Unknown(${d.kind})`}\` in exit.`)}}}function gt(e){let r=[];return I(B(e),i=>{if(!(i.kind!=="function"||i.value!=="var"))return I(i.nodes,t=>{t.kind!=="word"||t.value[0]!=="-"||t.value[1]!=="-"||r.push(t.value)}),R.Skip}),r}var Vn=64;function q(e,r=[]){return{kind:"rule",selector:e,nodes:r}}function F(e,r="",i=[]){return{kind:"at-rule",name:e,params:r,nodes:i}}function Z(e,r=[]){return e.charCodeAt(0)===Vn?Je(e,r):q(e,r)}function l(e,r,i=!1){return{kind:"declaration",property:e,value:r,important:i}}function dt(e){return{kind:"comment",value:e}}function de(e,r){return{kind:"context",context:e,nodes:r}}function W(e){return{kind:"at-root",nodes:e}}function te(e){switch(e.kind){case"rule":return{kind:e.kind,selector:e.selector,nodes:e.nodes.map(te),src:e.src,dst:e.dst};case"at-rule":return{kind:e.kind,name:e.name,params:e.params,nodes:e.nodes.map(te),src:e.src,dst:e.dst};case"at-root":return{kind:e.kind,nodes:e.nodes.map(te),src:e.src,dst:e.dst};case"context":return{kind:e.kind,context:{...e.context},nodes:e.nodes.map(te),src:e.src,dst:e.dst};case"declaration":return{kind:e.kind,property:e.property,value:e.value,important:e.important,src:e.src,dst:e.dst};case"comment":return{kind:e.kind,value:e.value,src:e.src,dst:e.dst};default:throw new Error(`Unknown node kind: ${e.kind}`)}}function et(e){return{depth:e.depth,get context(){let r={};for(let i of e.path())i.kind==="context"&&Object.assign(r,i.context);return Object.defineProperty(this,"context",{value:r}),r},get parent(){let r=this.path().pop()??null;return Object.defineProperty(this,"parent",{value:r}),r},path(){return e.path().filter(r=>r.kind!=="context")}}}function Re(e,r,i=3){let t=[],n=new Set,a=new K(()=>new Set),o=new K(()=>new Set),f=new Set,u=new Set,c=[],m=[],d=new K(()=>new Set);function p(h,w,A={},V=0){if(h.kind==="declaration"){if(h.property==="--tw-sort"||h.value===void 0||h.value===null)return;if(A.theme&&h.property[0]==="-"&&h.property[1]==="-"){if(h.value==="initial"){h.value=void 0;return}A.keyframes||a.get(w).add(h)}if(h.value.includes("var("))if(A.theme&&h.property[0]==="-"&&h.property[1]==="-")for(let x of gt(h.value))d.get(x).add(h.property);else r.trackUsedVariables(h.value);if(h.property==="animation")for(let x of Ir(h.value))u.add(x);i&2&&h.value.includes("color-mix(")&&!A.supportsColorMix&&!A.keyframes&&o.get(w).add(h),w.push(h)}else if(h.kind==="rule"){let x=[];for(let E of h.nodes)p(E,x,A,V+1);let b={},D=new Set;for(let E of x){if(E.kind!=="declaration")continue;let N=`${E.property}:${E.value}:${E.important}`;b[N]??Line truncated
`,r){i+=c.length;let m=i;i+=o.property.length,i+=2,i+=o.value?.length??0,o.important&&(i+=11);let d=i;i+=2,o.dst=[t,m,d]}}else if(o.kind==="rule"){if(u+=`${c}${o.selector} {
`,r){i+=c.length;let m=i;i+=o.selector.length,i+=1;let d=i;o.dst=[t,m,d],i+=2}for(let m of o.nodes)u+=n(m,f+1);u+=`${c}}
`,r&&(i+=c.length,i+=2)}else if(o.kind==="at-rule"){if(o.nodes.length===0){let m=`${c}${o.name} ${o.params};
`;if(r){i+=c.length;let d=i;i+=o.name.length,i+=1,i+=o.params.length;let p=i;i+=2,o.dst=[t,d,p]}return m}if(u+=`${c}${o.name}${o.params?` ${o.params} `:" "}{
`,r){i+=c.length;let m=i;i+=o.name.length,o.params&&(i+=1,i+=o.params.length),i+=1;let d=i;o.dst=[t,m,d],i+=2}for(let m of o.nodes)u+=n(m,f+1);u+=`${c}}
`,r&&(i+=c.length,i+=2)}else if(o.kind==="comment"){if(u+=`${c}/*${o.value}*/
`,r){i+=c.length;let m=i;i+=2+o.value.length+2;let d=i;o.dst=[t,m,d],i+=1}}else if(o.kind==="context"||o.kind==="at-root")return"";return u}let a="";for(let o of e)a+=n(o,0);return t.code=a,a}function Rn(e,r){let i=[];return I(e,(t,n)=>{if(r(t))return i=n.path(),i.push(t),R.Stop}),i}function Dr(e,r,i,t=new Set){if(t.has(e)||(t.add(e),r.getOptions(e)&24))return!0;{let a=i.get(e)??[];for(let o of a)if(Dr(o,r,i,t))return!0}return!1}function Ir(e){return e.split(/[\s,]+/)}var Bt=["calc","min","max","clamp","mod","rem","sin","cos","tan","asin","acos","atan","atan2","pow","sqrt","hypot","log","exp","round"];function tt(e){return e.indexOf("(")!==-1&&Bt.some(r=>e.includes(`${r}(`))}function Ur(e){if(!Bt.some(a=>e.includes(a)))return e;let r="",i=[],t=null,n=null;for(let a=0;a<e.length;a++){let o=e.charCodeAt(a);if(o>=48&&o<=57||t!==null&&(o===37||o>=97&&o<=122||o>=65&&o<=90)?t=a:(n=t,t=null),o===40){r+=e[a];let f=a;for(let c=a-1;c>=0;c--){let m=e.charCodeAt(c);if(m>=48&&m<=57)f=c;else if(m>=97&&m<=122)f=c;else break}let u=e.slice(f,a);if(Bt.includes(u)){i.unshift(!0);continue}else if(i[0]&&u===""){i.unshift(!0);continue}i.unshift(!1);continue}else if(o===41)r+=e[a],i.shift();else if(o===44&&i[0]){r+=", ";continue}else{if(o===32&&i[0]&&r.charCodeAt(r.length-1)===32)continue;if((o===43||o===42||o===47||o===45)&&i[0]){let f=r.trimEnd(),u=f.charCodeAt(f.length-1),c=f.charCodeAt(f.length-2),m=e.charCodeAt(a+1);if((u===101||u===69)&&c>=48&&c<=57){r+=e[a];continue}else if(u===43||u===42||u===47||u===45){r+=e[a];continue}else if(u===40||u===44){r+=e[a];continue}else e.charCodeAt(a-1)===32?r+=`${e[a]} `:u>=48&&u<=57||m>=48&&m<=57||u===41||m===40||m===43||m===42||m===47||m===45||n!==null&&n===a-1?r+=` ${e[a]} `:r+=e[a]}else r+=e[a]}}return r}function Ce(e){if(e.indexOf("(")===-1)return ze(e);let r=B(e);return Yt(r),e=H(r),e=Ur(e),e}function ze(e,r=!1){let i="";for(let t=0;t<e.length;t++){let n=e[t];n==="\\"&&e[t+1]==="_"?(i+="_",t+=1):n==="_"&&!r?i+=" ":i+=n}return i}function Yt(e){for(let r of e)switch(r.kind){case"function":{if(r.value==="url"||r.value.endsWith("_url")){r.value=ze(r.value);break}if(r.value==="var"||r.value.endsWith("_var")||r.value==="theme"||r.value.endsWith("_theme")){r.value=ze(r.value);for(let i=0;i<r.nodes.length;i++){if(i==0&&r.nodes[i].kind==="word"){r.nodes[i].value=ze(r.nodes[i].value,!0);continue}Yt([r.nodes[i]])}break}r.value=ze(r.value),Yt(r.nodes);break}case"separator":case"word":{r.value=ze(r.value);break}default:On(r)}}function On(e){throw new Error(`Unexpected value: ${e}`)}var qt=new Uint8Array(256);function be(e){let r=0,i=e.length;for(let t=0;t<i;t++){let n=e.charCodeAt(t);switch(n){case 92:t+=1;break;case 39:case 34:for(;++t<i;){let a=e.charCodeAt(t);if(a===92){t+=1;continue}if(a===n)break}break;case 40:qt[r]=41,r++;break;case 91:qt[r]=93,r++;break;case 123:break;case 93:case 125:case 41:if(r===0)return!1;r>0&&n===qt[r-1]&&r--;break;case 59:if(r===0)return!1;break}}return!0}var vt=new Uint8Array(256);function z(e,r){let i=0,t=[],n=0,a=e.length,o=r.charCodeAt(0);for(let f=0;f<a;f++){let u=e.charCodeAt(f);if(i===0&&u===o){t.push(e.slice(n,f)),n=f+1;continue}switch(u){case 92:f+=1;break;case 39:case 34:for(;++f<a;){let c=e.charCodeAt(f);if(c===92){f+=1;continue}if(c===u)break}break;case 40:vt[i]=41,i++;break;case 91:vt[i]=93,i++;break;case 123:vt[i]=125,i++;break;case 93:case 125:case 41:i>0&&u===vt[i-1]&&i--;break}}return t.push(e.slice(n)),t}var Pn=58,Lr=45,Kr=97,zr=122,Zt=/^[a-zA-Z0-9_.%-]+$/;function Qt(e){switch(e.kind){case"arbitrary":return{kind:e.kind,property:e.property,value:e.value,modifier:e.modifier?{kind:e.modifier.kind,value:e.modifier.value}:null,variants:e.variants.map(Me),important:e.important,raw:e.raw};case"static":return{kind:e.kind,root:e.root,variants:e.variants.map(Me),important:e.important,raw:e.raw};case"functional":return{kind:e.kind,root:e.root,value:e.value?e.value.kind==="arbitrary"?{kind:e.value.kind,dataType:e.value.dataType,value:e.value.value}:{kind:e.value.kind,value:e.value.value,fraction:e.value.fraction}:null,modifier:e.modifier?{kind:e.modifier.kind,value:e.modifier.value}:null,variants:e.variants.map(Me),important:e.important,raw:e.raw};default:throw new Error("Unknown candidate kind")}}function Me(e){switch(e.kind){case"arbitrary":return{kind:e.kind,selector:e.selector,relative:e.relative};case"static":return{kind:e.kind,root:e.root};case"functional":return{kind:e.kind,root:e.root,value:e.value?{kind:e.value.kind,value:e.value.value}:null,modifier:e.modifier?{kind:e.modifier.kind,value:e.modifier.value}:null};case"compound":return{kind:e.kind,root:e.root,variant:Me(e.variant),modifier:e.modifier?{kind:e.modifier.kind,value:e.modifier.value}:null};default:throw new Error("Unknown variant kind")}}function*Mr(e,r){let i=z(e,":");if(r.theme.prefix){if(i.length===1||i[0]!==r.theme.prefix)return null;i.shift()}let t=i.pop(),n=[];for(let d=i.length-1;d>=0;--d){let p=r.parseVariant(i[d]);if(p===null)return;n.push(p)}let a=!1;t[t.length-1]==="!"?(a=!0,t=t.Line truncated
Only valid data types are: ${rr.map(w=>`"${w}"`).join(", ")}.
`);let c=u.value,m=structuredClone(o),d="\xB6";I(m.nodes,w=>{if(w.kind==="word"&&w.value===c)return R.ReplaceSkip({kind:"word",value:d})});let p="^".repeat(H([u]).length),k=H([m]).indexOf(d),h=["```css",H([o])," ".repeat(k)+p,"```"].join(`
`);console.warn(h)}}),n.value=H(a)}),i.utilities.functional(r.slice(0,-2),n=>{let a=te(e),o=n.value,f=n.modifier;if(o===null)return;let u=!1,c=!1,m=!1,d=!1,p=new Map,k=!1;if(I([a],(h,w)=>{let A=w.parent;if(A?.kind!=="rule"&&A?.kind!=="at-rule"||h.kind!=="declaration"||!h.value)return;let V=!1,x=B(h.value);if(I(x,b=>{if(b.kind==="function"){if(b.value==="--value"){u=!0;let D=Zr(o,b,i);return D?(c=!0,D.ratio?k=!0:p.set(h,A),R.ReplaceSkip(D.nodes)):(u||=!1,V=!0,R.Stop)}else if(b.value==="--modifier"){if(f===null)return V=!0,R.Stop;m=!0;let D=Zr(f,b,i);return D?(d=!0,R.ReplaceSkip(D.nodes)):(m||=!1,V=!0,R.Stop)}}}),V)return R.ReplaceSkip([]);h.value=H(x)}),u&&!c||m&&!d||k&&d||f&&!k&&!d)return null;if(k)for(let[h,w]of p){let A=w.nodes.indexOf(h);A!==-1&&w.nodes.splice(A,1)}return a.nodes}),i.utilities.suggest(r.slice(0,-2),()=>{let n=[],a=[];for(let[o,{literals:f,usedSpacingNumber:u,usedSpacingInteger:c,themeKeys:m}]of[[n,t["--value"]],[a,t["--modifier"]]]){for(let d of f)o.push(d);if(u)o.push(...At);else if(c)for(let d of At)P(d)&&o.push(d);for(let d of i.theme.keysInNamespaces(m))o.push(d.replace(Jr,(p,k,h)=>`${k}.${h}`))}return[{values:n,modifiers:a}]})}:xo(r)?i=>{i.utilities.static(r,()=>e.nodes.map(te))}:null}function Zr(e,r,i){for(let t of r.nodes){if(e.kind==="named"&&t.kind==="word"&&(t.value[0]==="'"||t.value[0]==='"')&&t.value[t.value.length-1]===t.value[0]&&t.value.slice(1,-1)===e.value)return{nodes:B(e.value)};if(e.kind==="named"&&t.kind==="word"&&t.value[0]==="-"&&t.value[1]==="-"){let n=t.value;if(n.endsWith("-*")){n=n.slice(0,-2);let a=i.theme.resolve(e.value,[n]);if(a)return{nodes:B(a)}}else{let a=n.split("-*");if(a.length<=1)continue;let o=[a.shift()],f=i.theme.resolveWith(e.value,o,a);if(f){let[,u={}]=f;{let c=u[a.pop()];if(c)return{nodes:B(c)}}}}}else if(e.kind==="named"&&t.kind==="word"){if(!rr.includes(t.value))continue;let n=t.value==="ratio"&&"fraction"in e?e.fraction:e.value;if(!n)continue;let a=Q(n,[t.value]);if(a===null)continue;if(a==="ratio"){let[o,f]=z(n,"/").map(Number);if(!P(o)||!P(f))continue}else{if(a==="number"&&!ee(n))continue;if(a==="percentage"&&!P(n.slice(0,-1)))continue}if(a==="ratio"){let[o,f]=z(n,"/");return{nodes:B(`${o.trim()} / ${f.trim()}`),ratio:!0}}return{nodes:B(n),ratio:!1}}else if(e.kind==="arbitrary"&&t.kind==="word"&&t.value[0]==="["&&t.value[t.value.length-1]==="]"){let n=t.value.slice(1,-1);if(n==="*")return{nodes:B(e.value)};if("dataType"in e&&e.dataType&&e.dataType!==n)continue;if("dataType"in e&&e.dataType)return{nodes:B(e.value)};if(Q(e.value,[n])!==null)return{nodes:B(e.value)}}}}function xe(e,r,i,t,n=""){let a=!1,o=nt(r,u=>i==null?t(u):u.startsWith("current")?t(J(u,i)):((u.startsWith("var(")||i.startsWith("var("))&&(a=!0),t(Qr(u,i))));function f(u){return n?z(u,",").map(c=>n.trim()+" "+c.trim()).join(", "):u}return a?[l(e,f(nt(r,t))),Z("@supports (color: lab(from red l a b))",[l(e,f(o))])]:[l(e,f(o))]}function bt(e,r,i,t,n=""){let a=!1,o=z(r,",").map(f=>nt(f,u=>i==null?t(u):u.startsWith("current")?t(J(u,i)):((u.startsWith("var(")||i.startsWith("var("))&&(a=!0),t(Qr(u,i))))).map(f=>`drop-shadow(${f})`).join(" ");return a?[l(e,n+z(r,",").map(f=>`drop-shadow(${nt(f,t)})`).join(" ")),Z("@supports (color: lab(from red l a b))",[l(e,n+o)])]:[l(e,n+o)]}var ti=/^-?[a-z][a-zA-Z0-9_-]*/,po=37,mo=47,go=46,ho=97,vo=122,ko=65,wo=90,yt=48,xt=57,bo=95,yo=45;function xo(e){let r=ti.exec(e);if(r===null)return!1;let i=r[0],t=e.slice(i.length);if(t.length===0&&i.endsWith("-"))return!1;if(t.length===0)return!0;let n=!1;for(let a=0;a<t.length;a++){let o=t.charCodeAt(a);switch(o){case po:{if(a!==t.length-1)return!1;let u=(t[a-1]||i[i.length-1]||"").charCodeAt(0);if(u<yt||u>xt)return!1;break}case mo:{if(a===t.length-1||n)return!1;n=!0;break}case go:{let u=(t[a-1]||i[i.length-1]||"").charCodeAt(0);if(u<yt||u>xt)return!1;let m=(t[a+1]||"").charCodeAt(0);if(m<yt||m>xt)return!1;break}case bo:case yo:continue;default:{if(o>=ho&&o<=vo||o>=ko&&o<=wo||o>=yt&&o<=xt)continue;return!1}}}return!0}function Ao(e){if(!e.endsWith("-*"))return!1;e=e.slice(0,-2);let r=ti.exec(e);if(r===null)return!1;let i=r[0];return e.slice(i.length).length===0}var ir={"--alpha":Co,"--spacing":So,"--theme":$o,theme:To};function Co(e,r,i,...t){let[n,a]=z(i,"/").map(o=>o.trim());if(!n||!a)throw new Error(`The --alpha(\u2026) function requires a color and an alpha value, e.g.: \`--alpha(${n||"var(--my-color)"} / ${a||"50%"})\``);if(t.length>0)throw new Error(`The --alpha(\u2026) function only accepts one argument, e.g.: \`--alpha(${n||"var(--my-color)"} / ${a||"50%"})\``);return J(n,a)}function So(e,r,i,...t){if(!i)throw new Error("The --spacing(\u2026) function requires an argument, but received none.");if(t.length>0)throw new Error(`The --spacing(\u2026) function only accepts a single argument, but received ${t.length+1}.`);let n=e.theme.resolve(null,["--spacing"]);if(!n)throw new Error("The --spacing(\u2026) function requires that the `--spacing` theme variable exists, but it was not found.");return`calc(${nLine truncated
`,`
`);let r=[],i=[],t=null,n="",a;for(let o=0;o<e.length;o++){let f=e.charCodeAt(o);switch(f){case gi:case hi:case vi:case yi:case bi:case xi:case Ai:{if(n.length>0){let p=$e(n);t?t.nodes.push(p):r.push(p),n=""}let u=o,c=o+1;for(;c<e.length&&(a=e.charCodeAt(c),!(a!==gi&&a!==hi&&a!==vi&&a!==yi&&a!==bi&&a!==xi&&a!==Ai));c++);o=c-1;let m=e.slice(u,c),d=m.trim()===","?Mo(m):Ko(m);t?t.nodes.push(d):r.push(d);break}case wi:{let u=zo(n,[]);if(n="",u.value!==":not"&&u.value!==":where"&&u.value!==":has"&&u.value!==":is"){let c=o+1,m=0;for(let p=o+1;p<e.length;p++){if(a=e.charCodeAt(p),a===wi){m++;continue}if(a===mi){if(m===0){o=p;break}m--}}let d=o;u.nodes.push(jo(e.slice(c,d))),n="",o=d,t?t.nodes.push(u):r.push(u);break}t?t.nodes.push(u):r.push(u),i.push(u),t=u;break}case mi:{let u=i.pop();if(n.length>0){let c=$e(n);u.nodes.push(c),n=""}i.length>0?t=i[i.length-1]:t=null;break}case Yo:case Wo:case qo:{if(n.length>0){let u=$e(n);t?t.nodes.push(u):r.push(u)}n=e[o];break}case ki:{if(n.length>0){let m=$e(n);t?t.nodes.push(m):r.push(m)}n="";let u=o,c=0;for(let m=o+1;m<e.length;m++){if(a=e.charCodeAt(m),a===ki){c++;continue}if(a===Fo){if(c===0){o=m;break}c--}}n+=e.slice(u,o+1);break}case Go:case Bo:{let u=o;for(let c=o+1;c<e.length;c++)if(a=e.charCodeAt(c),a===di)c+=1;else if(a===f){o=c;break}n+=e.slice(u,o+1);break}case Ho:case Zo:{if(n.length>0){let u=$e(n);t?t.nodes.push(u):r.push(u),n=""}t?t.nodes.push($e(e[o])):r.push($e(e[o]));break}case di:{n+=e[o]+e[o+1],o+=1;break}default:n+=e[o]}}return n.length>0&&r.push($e(n)),r}function ce(e,r){for(let i in e)delete e[i];return Object.assign(e,r)}function Ue(e){let r=[];for(let i of z(e,".")){if(!i.includes("[")){r.push(i);continue}let t=0;for(;;){let n=i.indexOf("[",t),a=i.indexOf("]",n);if(n===-1||a===-1)break;n>t&&r.push(i.slice(t,n)),r.push(i.slice(n+1,a)),t=a+1}t<=i.length-1&&r.push(i.slice(t))}return r}function nr(e,r){let i=e;return i.storage[Ei]??=Qo(),i.storage[Ni]??=Xo(i),i.storage[Vi]??=rl(),i.storage[Ri]??=nl(),i.storage[Oi]??=ll(),i.storage[lr]??=pl(i),i.storage[Et]??=ml(i,r),i.storage[he]??=$l(i),i.storage[ar]??=El(),i.storage[Nt]??=Nl(i),i.storage[sr]??=Vl(i),i.storage[Rt]??=Rl(i),i.storage[Di]??=Ol(i),i}var Ei=Symbol();function Qo(){return new K(e=>new K(r=>({rem:e,features:r})))}function Jo(e,r){let i=0;return r?.collapse&&(i|=1),r?.logicalToPhysical&&(i|=2),nr(e,r).storage[Ei].get(r?.rem??null).get(i)}var Ni=Symbol();function Xo(e){return new K(r=>new K(i=>({features:i,designSystem:e,signatureOptions:r})))}function el(e,r,i){let t=0;return i?.collapse&&(t|=1),nr(e).storage[Ni].get(r).get(t)}function or(e,r,i){let t=Jo(e,i),n=el(e,t,i),a=nr(e),o=new Set,f=a.storage[Vi].get(n);for(let u of r)o.add(f.get(u));return o.size<=1||!(n.features&1)?Array.from(o):tl(n,Array.from(o))}function tl(e,r){if(r.length<=1)return r;let i=e.designSystem,t=new K(f=>new K(u=>new Set)),n=e.designSystem.theme.prefix?`${e.designSystem.theme.prefix}:`:"";for(let f of r){let u=z(f,":"),c=u.pop(),m=c.endsWith("!");m&&(c=c.slice(0,-1));let d=u.length>0?`${u.join(":")}:`:"",p=m?"!":"";t.get(d).get(p).add(`${n}${c}`)}let a=new Set;for(let[f,u]of t.entries())for(let[c,m]of u.entries())for(let d of o(Array.from(m)))n&&d.startsWith(n)&&(d=d.slice(n.length)),a.add(`${f}${d}${c}`);return Array.from(a);function o(f){let u=e.signatureOptions,c=i.storage[Nt].get(u),m=i.storage[ar].get(u),d=f.map(x=>c.get(x));if(d.some(x=>x.has("line-height"))){let x=i.theme.keysInNamespaces(["--text"]);if(x.length>0){let b=new Set,D=new Set;for(let N of d)if(N.has("line-height"))for(let L of N.get("line-height")){if(D.has(L))continue;D.add(L);let _=i.storage[Et]?.get(L)??null;if(_!==null)if(ee(_)){b.add(_);for(let M of x)c.get(`text-${M}/${_}`)}else{b.add(L);for(let M of x)c.get(`text-${M}/[${L}]`)}}let E=new Set;for(let N of d)if(N.has("font-size")){for(let L of N.get("font-size"))if(!E.has(L)){E.add(L);for(let _ of b)ee(_)?c.get(`text-[${L}]/${_}`):c.get(`text-[${L}]/[${_}]`)}}}}let p=new K(x=>{let b=new K(E=>new K(N=>new Set)),D=new Set(c.get(x).keys());if(D.size===0)return b;for(let E of ge(i,x))if(!(E.kind!=="functional"||E.value?.kind!=="named")){for(let N of i.utilities.keys("functional")){if(N===E.root)continue;let L=Pi(i,{...Qt(E),root:N}),_=c.get(L);for(let[M,Y]of _)if(D.has(M))for(let G of Y)b.get(M).get(G).add(L)}return b}return b}),k=d.map((x,b)=>{let D=null;for(let E of x.keys()){let N=new Set;for(let L of m.get(E).values())for(let _ of L)N.add(_);for(let L of x.get(E))for(let _ of p.get(f[b]).get(E).get(L))N.add(_);if(D===null?D=N:D=Ti(D,N),D.size===0)return D}return D??new Set}),h=new K(x=>new Set([x]));for(let x=0;x<k.length;x++){let b=k[x];for(let D=x+1;D<k.length;D++){let E=k[D];for(let N of b)if(E.has(N)){h.get(x).add(D),h.get(D).add(x);break}}}if(h.size===0)return f;let w=new K(x=>x.split(",").map(Number));for(let x of h.values()){let b=Array.from(x).sort((D,E)=>D-E);w.get(b.join(","))}let A=new Set(f),V=new Set;for(let x of w.values())for(let b of _l(x)){if(b.some(N=>V.has(f[N])))continue;let DLine truncated
`),a=!0;return I(B(t),o=>{if(o.kind==="function"&&o.value==="var"){let f=o.nodes[0].value;if(!new RegExp(`var\\(${f}[,)]\\s*`,"g").test(n)||n.includes(`${f}:`))return a=!1,R.Stop}}),a}function vl(e,r){if(e.kind!=="functional"||e.value?.kind!=="named")return e;let i=r.designSystem,t=i.storage[sr].get(r.signatureOptions),n=i.storage[he].get(r.signatureOptions),a=i.printCandidate(e),o=n.get(a);if(typeof o!="string")return e;for(let u of f(o,e)){let c=i.printCandidate(u);if(n.get(c)===o)return u}return e;function*f(u,c){let m=t.get(u);if(!(m.length>1)){if(m.length===0&&c.modifier){let d={...c,modifier:null},p=n.get(i.printCandidate(d));if(typeof p=="string")for(let k of f(p,d))yield Object.assign({},k,{modifier:c.modifier})}if(m.length===1)for(let d of ge(i,m[0]))yield d}}}var kl=new Map([["order-none","order-0"],["break-words","wrap-break-word"]]);function wl(e,r){let i=r.designSystem,t=i.storage[he].get(r.signatureOptions),n=Pi(i,e),a=kl.get(n)??null;if(a===null)return e;let o=t.get(n);if(typeof o!="string")return e;let f=t.get(a);if(typeof f!="string"||o!==f)return e;let[u]=ge(i,a);return u}function bl(e,r){let i=r.designSystem,t=i.storage[Rt],n=i.storage[Di],a=Vt(e);for(let[o]of a){if(o.kind==="compound")continue;let f=i.printVariant(o),u=t.get(f);if(typeof u!="string")continue;let c=n.get(u);if(c.length!==1)continue;let m=c[0],d=i.parseVariant(m);d!==null&&ce(o,d)}return e}function yl(e,r){let i=r.designSystem,t=i.storage[he].get(r.signatureOptions);if(e.kind==="functional"&&e.value?.kind==="arbitrary"&&e.value.dataType!==null){let n=i.printCandidate({...e,value:{...e.value,dataType:null}});t.get(i.printCandidate(e))===t.get(n)&&(e.value.dataType=null)}return e}function xl(e,r){if(e.kind!=="functional"||e.value?.kind!=="arbitrary")return e;let i=r.designSystem,t=i.storage[he].get(r.signatureOptions),n=t.get(i.printCandidate(e));if(n===null)return e;for(let a of _i(e))if(t.get(i.printCandidate({...e,value:a}))===n)return e.value=a,e;return e}function Al(e){let r=Vt(e);for(let[i]of r)if(i.kind==="functional"&&i.root==="data"&&i.value?.kind==="arbitrary"&&!i.value.value.includes("="))i.value={kind:"named",value:i.value.value};else if(i.kind==="functional"&&i.root==="aria"&&i.value?.kind==="arbitrary"&&(i.value.value.endsWith("=true")||i.value.value.endsWith('="true"')||i.value.value.endsWith("='true'"))){let[t,n]=z(i.value.value,"=");if(t[t.length-1]==="~"||t[t.length-1]==="|"||t[t.length-1]==="^"||t[t.length-1]==="$"||t[t.length-1]==="*")continue;i.value={kind:"named",value:i.value.value.slice(0,i.value.value.indexOf("="))}}else i.kind==="functional"&&i.root==="supports"&&i.value?.kind==="arbitrary"&&/^[a-z-][a-z0-9-]*$/i.test(i.value.value)&&(i.value={kind:"named",value:i.value.value});return e}function*_i(e,r=e.value?.value??"",i=new Set){if(i.has(r))return;if(i.add(r),yield{kind:"named",value:r,fraction:null},r.endsWith("%")&&ee(r.slice(0,-1))&&(yield{kind:"named",value:r.slice(0,-1),fraction:null}),r.includes("/")){let[a,o]=r.split("/");P(a)&&P(o)&&(yield{kind:"named",value:a,fraction:`${a}/${o}`})}let t=new Set;for(let a of r.matchAll(/(\d+\/\d+)|(\d+\.?\d+)/g))t.add(a[0].trim());let n=Array.from(t).sort((a,o)=>a.length-o.length);for(let a of n)yield*_i(e,a,i)}function $i(e){return!e.some(r=>r.kind==="separator"&&r.value.trim()===",")}function Tt(e){let r=e.value.trim();return e.kind==="selector"&&r[0]==="["&&r[r.length-1]==="]"}function Cl(e,r){let i=[e],t=r.designSystem,n=t.storage[Rt],a=Vt(e);for(let[o,f]of a)if(o.kind==="compound"&&(o.root==="has"||o.root==="not"||o.root==="in")&&o.modifier!==null&&"modifier"in o.variant&&(o.variant.modifier=o.modifier,o.modifier=null),o.kind==="arbitrary"){if(o.relative)continue;let u=De(o.selector.trim());if(!$i(u))continue;if(f===null&&u.length===3&&u[0].kind==="selector"&&u[0].value==="&"&&u[1].kind==="combinator"&&u[1].value.trim()===">"&&u[2].kind==="selector"&&u[2].value==="*"){ce(o,t.parseVariant("*"));continue}if(f===null&&u.length===3&&u[0].kind==="selector"&&u[0].value==="&"&&u[1].kind==="combinator"&&u[1].value.trim()===""&&u[2].kind==="selector"&&u[2].value==="*"){ce(o,t.parseVariant("**"));continue}if(f===null&&u.length===3&&u[1].kind==="combinator"&&u[1].value.trim()===""&&u[2].kind==="selector"&&u[2].value==="&"){u.pop(),u.pop(),ce(o,t.parseVariant(`in-[${me(u)}]`));continue}if(f===null&&u[0].kind==="selector"&&(u[0].value==="@media"||u[0].value==="@supports")){let p=n.get(t.printVariant(o)),k=B(me(u)),h=!1;if(I(k,w=>{if(w.kind==="word"&&w.value==="not")return h=!0,R.Replace([])}),k=B(H(k)),I(k,w=>{w.kind==="separator"&&w.value!==" "&&w.value.trim()===""&&(w.value=" ")}),h){let w=t.parseVariant(`not-[${H(k)}]`);if(w===null)continue;let A=n.get(t.printVariant(w));if(p===A){ce(o,w);continue}}}let c=null;f===null&&u.length===3&&u[0].kind==="selector"&&u[0].value.trim()==="&"&&u[1].kind==="combinator"&&u[1].value.trim()===">"&&u[2].kind==="selector"&&(Tt(u[2])||u[2].value[0]===":")&&(u=[u[2]],c=t.parseVariant("*")),f===null&&u.length===3&&u[0].kind==="sLine truncated
${ne([d])}
Relies on:
${ne([k])}`)}c.add(d);for(let k of a.get(d))for(let h of o.get(k))p.push(d),m(h,p),p.pop();f.add(d),c.delete(d),u.push(d)}}for(let d of n)m(d);for(let d of u)"nodes"in d&&I(d.nodes,p=>{if(p.kind!=="at-rule"||p.name!=="@apply")return;let k=p.params.split(/(\s+)/g),h={},w=0;for(let[A,V]of k.entries())A%2===0&&(h[V]=w),w+=V.length;{let A=Object.keys(h),V=Ee(A,r,{respectImportant:!1,onInvalidCandidate:E=>{if(r.theme.prefix&&!E.startsWith(r.theme.prefix))throw new Error(`Cannot apply unprefixed utility class \`${E}\`. Did you mean \`${r.theme.prefix}:${E}\`?`);if(r.invalidCandidates.has(E))throw new Error(`Cannot apply utility class \`${E}\` because it has been explicitly disabled: https://tailwindcss.com/docs/detecting-classes-in-source-files#explicitly-excluding-classes`);let N=z(E,":");if(N.length>1){let L=N.pop();if(r.candidatesToCss([L])[0]){let _=r.candidatesToCss(N.map(Y=>`${Y}:[--tw-variant-check:1]`)),M=N.filter((Y,G)=>_[G]===null);if(M.length>0){if(M.length===1)throw new Error(`Cannot apply utility class \`${E}\` because the ${M.map(Y=>`\`${Y}\``)} variant does not exist.`);{let Y=new Intl.ListFormat("en",{style:"long",type:"conjunction"});throw new Error(`Cannot apply utility class \`${E}\` because the ${Y.format(M.map(G=>`\`${G}\``))} variants do not exist.`)}}}}throw r.theme.size===0?new Error(`Cannot apply unknown utility class \`${E}\`. Are you using CSS modules or similar and missing \`@reference\`? https://tailwindcss.com/docs/functions-and-directives#reference-directive`):new Error(`Cannot apply unknown utility class \`${E}\``)}}),x=p.src,b=V.astNodes.map(E=>{let N=V.nodeSorting.get(E)?.candidate,L=N?h[N]:void 0;if(E=te(E),!x||!N||L===void 0)return I([E],M=>{M.src=x}),E;let _=[x[0],x[1],x[2]];return _[1]+=7+L,_[2]=_[1]+N.length,I([E],M=>{M.src=_}),E}),D=[];for(let E of b)if(E.kind==="rule")for(let N of E.nodes)D.push(N);else D.push(E);return R.Replace(D)}});return i}function*Yi(e,r){for(let i of e.params.split(/\s+/g))for(let t of r.parseCandidate(i))switch(t.kind){case"arbitrary":break;case"static":case"functional":yield t.root;break;default:}}async function pr(e,r,i,t=0,n=!1){let a=0,o=[];return I(e,f=>{if(f.kind==="at-rule"&&(f.name==="@import"||f.name==="@reference")){let u=zl(B(f.params));if(u===null)return;f.name==="@reference"&&(u.media="reference"),a|=2;let{uri:c,layer:m,media:d,supports:p}=u;if(c.startsWith("data:")||c.startsWith("http://")||c.startsWith("https://"))return;let k=de({},[]);return o.push((async()=>{if(t>100)throw new Error(`Exceeded maximum recursion depth while resolving \`${c}\` in \`${r}\`)`);let h=await i(c,r),w=Ve(h.content,{from:n?h.path:void 0});await pr(w,h.base,i,t+1,n),k.nodes=Ml(f,[de({base:h.base},w)],m,d,p)})()),R.ReplaceSkip(k)}}),o.length>0&&await Promise.all(o),a}function zl(e){let r,i=null,t=null,n=null;for(let a=0;a<e.length;a++){let o=e[a];if(o.kind!=="separator"){if(o.kind==="word"&&!r){if(!o.value||o.value[0]!=='"'&&o.value[0]!=="'")return null;r=o.value.slice(1,-1);continue}if(o.kind==="function"&&o.value.toLowerCase()==="url"||!r)return null;if((o.kind==="word"||o.kind==="function")&&o.value.toLowerCase()==="layer"){if(i)return null;if(n)throw new Error("`layer(\u2026)` in an `@import` should come before any other functions or conditions");"nodes"in o?i=H(o.nodes):i="";continue}if(o.kind==="function"&&o.value.toLowerCase()==="supports"){if(n)return null;n=H(o.nodes);continue}t=H(e.slice(a));break}}return r?{uri:r,layer:i,media:t,supports:n}:null}function Ml(e,r,i,t,n){let a=r;if(i!==null){let o=F("@layer",i,a);o.src=e.src,a=[o]}if(t!==null){let o=F("@media",t,a);o.src=e.src,a=[o]}if(n!==null){let o=F("@supports",n[0]==="("?n:`(${n})`,a);o.src=e.src,a=[o]}return a}function Ge(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;let r=Object.getPrototypeOf(e);return r===null||Object.getPrototypeOf(r)===null}function lt(e,r,i,t=[]){for(let n of r)if(n!=null)for(let a of Reflect.ownKeys(n)){t.push(a);let o=i(e[a],n[a],t);o!==void 0?e[a]=o:!Ge(e[a])||!Ge(n[a])?e[a]=n[a]:e[a]=lt({},[e[a],n[a]],i,t),t.pop()}return e}function Pt(e,r,i){return function(n,a){let o=n.lastIndexOf("/"),f=null;o!==-1&&(f=n.slice(o+1).trim(),n=n.slice(0,o).trim());let u=(()=>{let c=Ue(n),[m,d]=jl(e.theme,c),p=i(qi(r()??{},c)??null);if(typeof p=="string"&&(p=p.replace("<alpha-value>","1")),typeof m!="object")return typeof d!="object"&&d&4?p??m:m;if(p!==null&&typeof p=="object"&&!Array.isArray(p)){let k=lt({},[p],(h,w)=>w);if(m===null&&Object.hasOwn(p,"__CSS_VALUES__")){let h={};for(let w in p.__CSS_VALUES__)h[w]=p[w],delete k[w];m=h}for(let h in m)h!=="__CSS_VALUES__"&&(p?.__CSS_VALUES__?.[h]&4&&qi(k,h.split("-"))!==void 0||(k[ke(h)]=m[h]));return k}if(Array.isArray(m)&&Array.isArray(d)&&Array.isArray(p)){let k=m[0],h=m[1];d[0]&4&&(k=p[0]??k);for(let w of Object.keys(h))d[1][w]&4&&(h[w]=p[1][w]??h[w]);return[k,h]}return m??p})();return f&&typeof u=="string"&&(u=J(u,f)),u??a}}function jl(e,r){if(r.length===1&&r[0].startsWith("--"))return[e.get([r[0]]),e.getOptions(Line truncated
${ne([A])}
\`@plugin\` options must be a flat list of declarations.`);if(A.value===void 0)continue;let V=A.value,x=z(V,",").map(b=>{if(b=b.trim(),b==="null")return null;if(b==="true")return!0;if(b==="false")return!1;if(Number.isNaN(Number(b))){if(b[0]==='"'&&b[b.length-1]==='"'||b[0]==="'"&&b[b.length-1]==="'")return b.slice(1,-1);if(b[0]==="{"&&b[b.length-1]==="}")throw new Error(`Unexpected \`@plugin\` option: Value of declaration \`${ne([A]).trim()}\` is not supported.
Using an object as a plugin option is currently only supported in JavaScript configuration files.`)}else return Number(b);return b});w[A.property]=x.length===1?x[0]:x}return o.push([{id:h,base:k.context.base,reference:!!k.context.reference,src:d.src},Object.keys(w).length>0?w:null]),a|=4,R.Replace([])}if(d.name==="@config"){if(d.nodes.length>0)throw new Error("`@config` cannot have a body.");if(k.parent!==null)throw new Error("`@config` cannot be nested.");return f.push({id:d.params.slice(1,-1),base:k.context.base,reference:!!k.context.reference,src:d.src}),a|=4,R.Replace([])}}),ln(e);let u=e.resolveThemeValue;if(e.resolveThemeValue=function(p,k){return p.startsWith("--")?u(p,k):(a|=un({designSystem:e,base:r,ast:i,sources:n,configs:[],pluginDetails:[]}),e.resolveThemeValue(p,k))},!o.length&&!f.length)return 0;let[c,m]=await Promise.all([Promise.all(f.map(async({id:d,base:p,reference:k,src:h})=>{let w=await t(d,p,"config");return{path:d,base:w.base,config:w.module,reference:k,src:h}})),Promise.all(o.map(async([{id:d,base:p,reference:k,src:h},w])=>{let A=await t(d,p,"plugin");return{path:d,base:A.base,plugin:A.module,options:w,reference:k,src:h}}))]);return a|=un({designSystem:e,base:r,ast:i,sources:n,configs:c,pluginDetails:m}),a}function un({designSystem:e,base:r,ast:i,sources:t,configs:n,pluginDetails:a}){let o=0,u=[...a.map(w=>{if(!w.options)return{config:{plugins:[w.plugin]},base:w.base,reference:w.reference,src:w.src};if("__isOptionsFunction"in w.plugin)return{config:{plugins:[w.plugin(w.options)]},base:w.base,reference:w.reference,src:w.src};throw new Error(`The plugin "${w.path}" does not accept options`)}),...n],{resolvedConfig:c}=gr(e,[{config:rn(e.theme),base:r,reference:!0,src:void 0},...u,{config:{plugins:[on]},base:r,reference:!0,src:void 0}]),{resolvedConfig:m,replacedThemeKeys:d}=gr(e,u),p={designSystem:e,ast:i,resolvedConfig:c,featuresRef:{set current(w){o|=w}}},k=dr({...p,referenceMode:!1,src:void 0}),h=e.resolveThemeValue;e.resolveThemeValue=function(A,V){if(A[0]==="-"&&A[1]==="-")return h(A,V);let x=k.theme(A,void 0);if(Array.isArray(x)&&x.length===2)return x[0];if(Array.isArray(x))return x.join(", ");if(typeof x=="object"&&x!==null&&"DEFAULT"in x)return x.DEFAULT;if(typeof x=="string")return x};for(let{handler:w,reference:A,src:V}of c.plugins){let x=dr({...p,referenceMode:A??!1,src:V});w(x)}if(oi(e,m,d),Ji(e,m),sn(m,e),an(m,e),nn(m,e),!e.theme.prefix&&c.prefix){if(c.prefix.endsWith("-")&&(c.prefix=c.prefix.slice(0,-1),console.warn(`The prefix "${c.prefix}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only and is written as a variant before all utilities. We have fixed up the prefix for you. Remove the trailing \`-\` to silence this warning.`)),!Zl.test(c.prefix))throw new Error(`The prefix "${c.prefix}" is invalid. Prefixes must be lowercase ASCII letters (a-z) only.`);e.theme.prefix=c.prefix}if(!e.important&&c.important===!0&&(e.important=!0),typeof c.important=="string"){let w=c.important;I(i,(A,V)=>{if(A.kind!=="at-rule"||A.name!=="@tailwind"||A.params!=="utilities")return;let x=et(V);return x.parent?.kind==="rule"&&x.parent.selector===w?R.Stop:R.ReplaceStop(q(w,[A]))})}for(let w of c.blocklist)e.invalidCandidates.add(w);for(let w of c.content.files){if("raw"in w)throw new Error(`Error in the config file/plugin/preset. The \`content\` key contains a \`raw\` entry:
${JSON.stringify(w,null,2)}
This feature is not currently supported.`);let A=!1;w.pattern[0]=="!"&&(A=!0,w.pattern=w.pattern.slice(1)),t.push({...w,negated:A})}return o}function fn({ast:e}){let r=new K(n=>st(n.code)),i=new K(n=>({url:n.file,content:n.code,ignore:!1})),t={file:null,sources:[],mappings:[]};I(e,n=>{if(!n.src||!n.dst)return;let a=i.get(n.src[0]);if(!a.content)return;let o=r.get(n.src[0]),f=r.get(n.dst[0]),u=a.content.slice(n.src[1],n.src[2]),c=0;for(let p of u.split(`
`)){if(p.trim()!==""){let k=o.find(n.src[1]+c),h=f.find(n.dst[1]);t.mappings.push({name:null,originalPosition:{source:a,...k},generatedPosition:h})}c+=p.length,c+=1}let m=o.find(n.src[2]),d=f.find(n.dst[2]);t.mappings.push({name:null,originalPosition:{source:a,...m},generatedPosition:d})});for(let n of r.keys())t.sources.push(i.get(n));return t.mappings.sort((n,a)=>n.generatedPosition.line-a.generatedPosition.line||n.generatedPosition.column-a.generatedPosition.column||(n.originalPosition?.line??0)-(a.originalPosition?.line??0)||(n.originalPosition?.column??0)-(a.originalPosition?.column??0)),t}var pn=/^(-?\d+)\.\.(-?\d+)(?:\.\.(-?\d+))?$/;function Dt(e){let r=e.indexOf("{");if(r===-1)return[e];let i=[],t=e.slice(0,r),n=e.slice(r),a=0,o=n.lastIndexOf("}");for(let d=0;d<n.length;d++){let p=n[d];if(p==="{")a++;else if(p==="}"&&(a--,a===0)){o=d;break}}if(o===-1)throw new Error(`The pattern \`${e}\` is not balanced.`);let f=n.slice(1,o),u=n.slice(o+1),c;Ql(f)?c=Jl(f):c=z(f,","),c=c.flatMap(d=>Dt(d));let m=Dt(u);for(let d of m)for(let p of c)i.push(t+p+d);return i}function Ql(e){return pn.test(e)}function Jl(e){let r=e.match(pn);if(!r)return[e];let[,i,t,n]=r,a=n?parseInt(n,10):void 0,o=[];if(/^-?\d+$/.test(i)&&/^-?\d+$/.test(t)){let f=parseInt(i,10),u=parseInt(t,10);if(a===void 0&&(a=f<=u?1:-1),a===0)throw new Error("Step cannot be zero in sequence expansion.");let c=f<u;c&&a<0&&(a=-a),!c&&a>0&&(a=-a);for(let m=f;c?m<=u:m>=u;m+=a)o.push(m.toString())}return o}function dn(e,r){let i=new Set,t=new Set,n=[];function a(o,f=[]){if(e.has(o)&&!i.has(o)){t.has(o)&&r.onCircularDependency?.(f,o),t.add(o);for(let u of e.get(o)??[])f.push(o),a(u,f),f.pop();i.add(o),t.delete(o),n.push(o)}}for(let o of e.keys())a(o);return n}var Xl=/^[a-z]+$/,ht=(n=>(n[n.None=0]="None",n[n.AtProperty=1]="AtProperty",n[n.ColorMix=2]="ColorMix",n[n.All=3]="All",n))(ht||{});function ea(){throw new Error("No `loadModule` function provided to `compile`")}function ta(){throw new Error("No `loadStylesheet` function provided to `compile`")}function ra(e){let r=0,i=null;for(let t of z(e," "))t==="reference"?r|=2:t==="inline"?r|=1:t==="default"?r|=4:t==="static"?r|=8:t.startsWith("prefix(")&&t.endsWith(")")&&(i=t.slice(7,-1));return[r,i]}var Pe=(u=>(u[u.None=0]="None",u[u.AtApply=1]="AtApply",u[u.AtImport=2]="AtImport",u[u.JsPluginCompat=4]="JsPluginCompat",u[u.ThemeFunction=8]="ThemeFunction",u[u.Utilities=16]="Utilities",u[u.Variants=32]="Variants",u[u.AtTheme=64]="AtTheme",u))(Pe||{});async function mn(e,{base:r="",from:i,loadModule:t=ea,loadStylesheet:n=ta}={}){let a=0;e=[de({base:r},e)],a|=await pr(e,r,n,0,i!==void 0);let o=null,f=new mt,u=new Map,c=new Map,m=[],d=null,p=null,k=[],h=[],w=[],A=[],V=null;I(e,(b,D)=>{if(b.kind!=="at-rule")return;let E=et(D);if(b.name==="@tailwind"&&(b.params==="utilities"||b.params.startsWith("utilities"))){if(p!==null)return R.Replace([]);if(E.context.reference)return R.Replace([]);let N=z(b.params," ");for(let L of N)if(L.startsWith("source(")){let _=L.slice(7,-1);if(_==="none"){V=_;continue}if(_[0]==='"'&&_[_.length-1]!=='"'||_[0]==="'"&&_[_.length-1]!=="'"||_[0]!=="'"&&_[0]!=='"')throw new Error("`source(\u2026)` paths must be quoted.");V={base:E.context.sourceBase??E.context.base,pattern:_.slice(1,-1)}}p=b,a|=16}if(b.name==="@utility"){if(E.parent!==null)throw new Error("`@utility` cannot be nested.");if(b.nodes.length===0)throw new Error(`\`@utility ${b.params}\` is empty. Utilities should include at least one property.`);let N=ei(b);if(N===null){if(!b.params.endsWith("-*")){if(b.params.endsWith("*"))throw new Error(`\`@utility ${b.params}\` defines an invalid utility name. A functional utility must end in \`-*\`.`);if(b.params.includes("*"))throw new Error(`\`@utility ${b.params}\` defines an invalid utility name. The dynamic portion marked by \`-*\` must appear once at the end.`)}throw new Error(`\`@utility ${b.params}\` defines an invalid utility name. Utilities should be alphanumeric and start with a lowercase letter.`)}m.push(N)}if(b.name==="@source"){if(b.nodes.length>0)throw new Error("`@source` cannot have a body.");if(E.parent!==null)throw new Error("`@source` cannot be nested.");let N=!1,L=!1,_=b.params;if(_[0]==="n"&&_.startsWith("not ")&&(N=!0,_=_.slice(4)),_[0]==="i"&&_.startsWith("inline(")&&(L=!0,_=_.slice(7,-1).trim()),_[0]==='"'&&_[_.length-1]!=='"'||_[0]==="'"&&_[_.length-1]!=="'"||_[0]!=="'"&&_[0]!=='"')throw new Error("`@source` paths must be quoted.");let M=_.slice(1,-1);if(L){let Y=N?A:w,G=z(M," ");for(let le of G)for(let ae of Dt(le))Y.push(ae)}else h.push({base:E.context.base,pattern:M,negated:N});return R.ReplaceSkip([])}if(b.name==="@variant"&&(E.parent===null?b.nodes.length===0?b.name="@custom-variant":(I(b.nodes,N=>{if(N.kind==="at-rule"&&N.name==="@slot")return b.name="@custom-variant",R.Stop}),b.name==="@variant"&&k.push(b)):k.push(b)),b.name==="@custom-variant"){if(E.parent!==null)throw new Error("`@custom-variant` cannot be nested.");let[N,L]=z(b.params," ");if(!Ot.test(N))throwLine truncated
`).map((Y,G,le)=>`${G===0||G>=le.length-2?" ":">"} ${Y}`).join(`
`);throw new Error(`\`@theme\` blocks must only contain custom properties or \`@keyframes\`.
${M}`)}),d?R.ReplaceSkip([]):(d=q(":root, :host",[]),d.src=b.src,R.ReplaceSkip(d))}});let x=ji(f,p?.src);if(o&&(x.important=o),A.length>0)for(let b of A)x.invalidCandidates.add(b);a|=await cn({designSystem:x,base:r,ast:e,loadModule:t,sources:h});for(let b of u.keys())x.variants.static(b,()=>{});for(let b of dn(c,{onCircularDependency(D,E){let N=ne(D.map((L,_)=>F("@custom-variant",L,[F("@variant",D[_+1]??E,[])]))).replaceAll(";"," { \u2026 }").replace(`@custom-variant ${E} {`,`@custom-variant ${E} { /* \u2190 */`);throw new Error(`Circular dependency detected in custom variants:
${N}`)}}))u.get(b)?.(x);for(let b of m)b(x);if(d){let b=[];for(let[E,N]of x.theme.entries()){if(N.options&2)continue;let L=l(Ae(E),N.value);L.src=N.src,b.push(L)}let D=x.theme.getKeyframes();for(let E of D)e.push(de({theme:!0},[W([E])]));d.nodes=[de({theme:!0},b)]}if(a|=ot(e,x),a|=Fe(e,x),a|=Te(e,x),p){let b=p;b.kind="context",b.context={}}return I(e,b=>{if(b.kind==="at-rule")return b.name==="@utility"?R.Replace([]):R.Skip}),{designSystem:x,ast:e,sources:h,root:V,utilitiesNode:p,features:a,inlineCandidates:w}}async function gn(e,r={}){let{designSystem:i,ast:t,sources:n,root:a,utilitiesNode:o,features:f,inlineCandidates:u}=await mn(e,r);t.unshift(dt(`! tailwindcss v${hr} | MIT License | https://tailwindcss.com `));function c(h){i.invalidCandidates.add(h)}let m=new Set,d=null,p=0,k=!1;for(let h of u)i.invalidCandidates.has(h)||(m.add(h),k=!0);return{sources:n,root:a,features:f,build(h){if(f===0)return e;if(!o)return d??=Re(t,i,r.polyfills),d;let w=k,A=!1;k=!1;let V=m.size;for(let b of h)if(!i.invalidCandidates.has(b))if(b[0]==="-"&&b[1]==="-"){let D=i.theme.markUsedVariable(b);w||=D,A||=D}else m.add(b),w||=m.size!==V;if(!w)return d??=Re(t,i,r.polyfills),d;let x=Ee(m,i,{onInvalidCandidate:c}).astNodes;return r.from&&I(x,b=>{b.src??=o.src}),!A&&p===x.length?(d??=Re(t,i,r.polyfills),d):(p=x.length,o.nodes=x,d=Re(t,i,r.polyfills),d)}}}async function ia(e,r={}){let i=Ve(e,{from:r.from}),t=await gn(i,r),n=i,a=e;return{...t,build(o){let f=t.build(o);return f===n||(a=ne(f,!!r.from),n=f),a},buildSourceMap(){return fn({ast:n})}}}async function na(e,r={}){return(await mn(Ve(e,{from:r.from}),r)).designSystem}function at(){throw new Error("It looks like you're trying to use `tailwindcss` directly as a PostCSS plugin. The PostCSS plugin has moved to a separate package, so to continue using Tailwind CSS with PostCSS you'll need to install `@tailwindcss/postcss` and update your PostCSS configuration.")}for(let e in Ut)e!=="default"&&(at[e]=Ut[e]);module.exports=at;
@@ -0,0 +1,4 @@
import { DetailedError } from "./fetch-result-please.js";
import { parseResponse } from "./utils.js";
import { hc } from "./client.js";
export { DetailedError, hc, parseResponse };
@@ -0,0 +1,121 @@
# eslint-visitor-keys
[![npm version](https://img.shields.io/npm/v/eslint-visitor-keys.svg)](https://www.npmjs.com/package/eslint-visitor-keys)
[![Downloads/month](https://img.shields.io/npm/dm/eslint-visitor-keys.svg)](http://www.npmtrends.com/eslint-visitor-keys)
[![Build Status](https://github.com/eslint/js/workflows/CI/badge.svg)](https://github.com/eslint/js/actions)
Constants and utilities about visitor keys to traverse AST.
## 💿 Installation
Use [npm] to install.
```bash
$ npm install eslint-visitor-keys
```
### Requirements
- [Node.js] `^18.18.0`, `^20.9.0`, or `>=21.1.0`
## 📖 Usage
To use in an ESM file:
```js
import * as evk from "eslint-visitor-keys"
```
To use in a CommonJS file:
```js
const evk = require("eslint-visitor-keys")
```
### evk.KEYS
> type: `{ [type: string]: string[] | undefined }`
Visitor keys. This keys are frozen.
This is an object. Keys are the type of [ESTree] nodes. Their values are an array of property names which have child nodes.
For example:
```
console.log(evk.KEYS.AssignmentExpression) // → ["left", "right"]
```
### evk.getKeys(node)
> type: `(node: object) => string[]`
Get the visitor keys of a given AST node.
This is similar to `Object.keys(node)` of ES Standard, but some keys are excluded: `parent`, `leadingComments`, `trailingComments`, and names which start with `_`.
This will be used to traverse unknown nodes.
For example:
```js
const node = {
type: "AssignmentExpression",
left: { type: "Identifier", name: "foo" },
right: { type: "Literal", value: 0 }
}
console.log(evk.getKeys(node)) // → ["type", "left", "right"]
```
### evk.unionWith(additionalKeys)
> type: `(additionalKeys: object) => { [type: string]: string[] | undefined }`
Make the union set with `evk.KEYS` and the given keys.
- The order of keys is, `additionalKeys` is at first, then `evk.KEYS` is concatenated after that.
- It removes duplicated keys as keeping the first one.
For example:
```js
console.log(evk.unionWith({
MethodDefinition: ["decorators"]
})) // → { ..., MethodDefinition: ["decorators", "key", "value"], ... }
```
## 📰 Change log
See [GitHub releases](https://github.com/eslint/js/releases).
## 🍻 Contributing
Welcome. See [ESLint contribution guidelines](https://eslint.org/docs/developer-guide/contributing/).
### Development commands
- `npm test` runs tests and measures code coverage.
- `npm run lint` checks source codes with ESLint.
- `npm run test:open-coverage` opens the code coverage report of the previous test with your default browser.
[npm]: https://www.npmjs.com/
[Node.js]: https://nodejs.org/
[ESTree]: https://github.com/estree/estree
<!-- NOTE: This section is autogenerated. Do not manually edit.-->
<!--sponsorsstart-->
## Sponsors
The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate)
to get your logo on our READMEs and [website](https://eslint.org/sponsors).
<h3>Diamond Sponsors</h3>
<p><a href="https://www.ag-grid.com/"><img src="https://images.opencollective.com/ag-grid/bec0580/logo.png" alt="AG Grid" height="128"></a></p><h3>Platinum Sponsors</h3>
<p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="128"></a></p><h3>Gold Sponsors</h3>
<p><a href="https://qlty.sh/"><img src="https://images.opencollective.com/qltysh/33d157d/logo.png" alt="Qlty Software" height="96"></a> <a href="https://trunk.io/"><img src="https://images.opencollective.com/trunkio/fb92d60/avatar.png" alt="trunk.io" height="96"></a> <a href="https://shopify.engineering/"><img src="https://avatars.githubusercontent.com/u/8085" alt="Shopify" height="96"></a></p><h3>Silver Sponsors</h3>
<p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/e6d15e1/logo.png" alt="Vite" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301" alt="American Express" height="64"></a> <a href="https://stackblitz.com"><img src="https://avatars.githubusercontent.com/u/28635252" alt="StackBlitz" height="64"></a></p><h3>Bronze Sponsors</h3>
<p><a href="https://sentry.io"><img src="https://github.com/getsentry.png" alt="Sentry" height="32"></a> <a href="https://syntax.fm"><img src="https://github.com/syntaxfm.png" alt="Syntax" height="32"></a> <a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://nolebase.ayaka.io"><img src="https://avatars.githubusercontent.com/u/11081491" alt="Neko" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104" alt="Nx" height="32"></a> <a href="https://opensource.mercedes-benz.com/"><img src="https://avatars.githubusercontent.com/u/34240465" alt="Mercedes-Benz Group" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a> <a href="https://www.lambdatest.com"><img src="https://avatars.githubusercontent.com/u/171592363" alt="LambdaTest" height="32"></a></p>
<h3>Technology Sponsors</h3>
Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.
<p><a href="https://netlify.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/netlify-icon.svg" alt="Netlify" height="32"></a> <a href="https://algolia.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/algolia-icon.svg" alt="Algolia" height="32"></a> <a href="https://1password.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/1password-icon.svg" alt="1Password" height="32"></a></p>
<!--sponsorsend-->
@@ -0,0 +1,159 @@
/**
* @fileoverview A rule to set the maximum depth block can be nested in a function.
* @author Ian Christian Myers
*/
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "Enforce a maximum depth that blocks can be nested",
recommended: false,
url: "https://eslint.org/docs/latest/rules/max-depth",
},
schema: [
{
oneOf: [
{
type: "integer",
minimum: 0,
},
{
type: "object",
properties: {
maximum: {
type: "integer",
minimum: 0,
},
max: {
type: "integer",
minimum: 0,
},
},
additionalProperties: false,
},
],
},
],
messages: {
tooDeeply:
"Blocks are nested too deeply ({{depth}}). Maximum allowed is {{maxDepth}}.",
},
},
create(context) {
//--------------------------------------------------------------------------
// Helpers
//--------------------------------------------------------------------------
const functionStack = [],
option = context.options[0];
let maxDepth = 4;
if (
typeof option === "object" &&
(Object.hasOwn(option, "maximum") || Object.hasOwn(option, "max"))
) {
maxDepth = option.maximum || option.max;
}
if (typeof option === "number") {
maxDepth = option;
}
/**
* When parsing a new function, store it in our function stack
* @returns {void}
* @private
*/
function startFunction() {
functionStack.push(0);
}
/**
* When parsing is done then pop out the reference
* @returns {void}
* @private
*/
function endFunction() {
functionStack.pop();
}
/**
* Save the block and Evaluate the node
* @param {ASTNode} node node to evaluate
* @returns {void}
* @private
*/
function pushBlock(node) {
const len = ++functionStack[functionStack.length - 1];
if (len > maxDepth) {
context.report({
node,
messageId: "tooDeeply",
data: { depth: len, maxDepth },
});
}
}
/**
* Pop the saved block
* @returns {void}
* @private
*/
function popBlock() {
functionStack[functionStack.length - 1]--;
}
//--------------------------------------------------------------------------
// Public API
//--------------------------------------------------------------------------
return {
Program: startFunction,
FunctionDeclaration: startFunction,
FunctionExpression: startFunction,
ArrowFunctionExpression: startFunction,
StaticBlock: startFunction,
IfStatement(node) {
if (node.parent.type !== "IfStatement") {
pushBlock(node);
}
},
SwitchStatement: pushBlock,
TryStatement: pushBlock,
DoWhileStatement: pushBlock,
WhileStatement: pushBlock,
WithStatement: pushBlock,
ForStatement: pushBlock,
ForInStatement: pushBlock,
ForOfStatement: pushBlock,
"IfStatement:exit": popBlock,
"SwitchStatement:exit": popBlock,
"TryStatement:exit": popBlock,
"DoWhileStatement:exit": popBlock,
"WhileStatement:exit": popBlock,
"WithStatement:exit": popBlock,
"ForStatement:exit": popBlock,
"ForInStatement:exit": popBlock,
"ForOfStatement:exit": popBlock,
"FunctionDeclaration:exit": endFunction,
"FunctionExpression:exit": endFunction,
"ArrowFunctionExpression:exit": endFunction,
"StaticBlock:exit": endFunction,
"Program:exit": endFunction,
};
},
};
@@ -0,0 +1,3 @@
//#region src/request/constants.d.ts
export declare const GET_MATCH_RESULT: unique symbol;
//#endregion
@@ -0,0 +1,335 @@
import { HTTPException } from "./http-exception.js";
import { GET_MATCH_RESULT } from "./request/constants.js";
import { parseBody } from "./utils/body.js";
import { getQueryParam, getQueryParams, tryDecodeURIComponent } from "./utils/url.js";
//#region src/request.ts
var HonoRequest = class {
/**
* `.raw` can get the raw Request object.
*
* @see {@link https://hono.dev/docs/api/request#raw}
*
* @example
* ```ts
* // For Cloudflare Workers
* app.post('/', async (c) => {
* const metadata = c.req.raw.cf?.hostMetadata?
* ...
* })
* ```
*/
raw;
#validatedData;
#matchResult;
routeIndex = 0;
/**
* `.path` can get the pathname of the request.
*
* @see {@link https://hono.dev/docs/api/request#path}
*
* @example
* ```ts
* app.get('/about/me', (c) => {
* const pathname = c.req.path // `/about/me`
* })
* ```
*/
path;
bodyCache = {};
constructor(request, path = "/", matchResult = [[]]) {
this.raw = request;
this.path = path;
this.#matchResult = matchResult;
}
param(key) {
return key ? this.#getDecodedParam(key) : this.#getAllDecodedParams();
}
#getDecodedParam(key) {
const paramKey = this.#matchResult[0][this.routeIndex]?.[1][key];
const param = this.#getParamValue(paramKey);
return param && tryDecodeURIComponent(param);
}
#getAllDecodedParams() {
const decoded = {};
const keys = Object.keys(this.#matchResult[0][this.routeIndex]?.[1] ?? {});
for (const key of keys) {
const value = this.#getParamValue(this.#matchResult[0][this.routeIndex][1][key]);
if (value !== void 0) decoded[key] = tryDecodeURIComponent(value);
}
return decoded;
}
#getParamValue(paramKey) {
return this.#matchResult[1] ? this.#matchResult[1][paramKey] : paramKey;
}
query(key) {
return getQueryParam(this.url, key);
}
queries(key) {
return getQueryParams(this.url, key);
}
header(name) {
if (name) return this.raw.headers.get(name) ?? void 0;
const headerData = Object.create(null);
this.raw.headers.forEach((value, key) => {
headerData[key] = value;
});
return headerData;
}
async parseBody(options) {
return parseBody(this, options);
}
#cachedBody = (key) => {
const { bodyCache, raw } = this;
const cachedBody = bodyCache[key];
if (cachedBody) return cachedBody;
for (const anyCachedKey in bodyCache) return bodyCache[anyCachedKey].then((body) => {
if (anyCachedKey === "json") body = JSON.stringify(body);
const contentType = anyCachedKey === "formData" ? void 0 : raw.headers.get("content-type");
return new Response(body, { headers: contentType ? { "Content-Type": contentType } : void 0 })[key]();
});
return bodyCache[key] = raw[key]();
};
/**
* `.json()` can parse Request body of type `application/json`
*
* @see {@link https://hono.dev/docs/api/request#json}
*
* @example
* ```ts
* app.post('/entry', async (c) => {
* const body = await c.req.json()
* })
* ```
*/
json() {
return this.#cachedBody("text").then((text) => JSON.parse(text));
}
/**
* `.text()` can parse Request body of type `text/plain`
*
* @see {@link https://hono.dev/docs/api/request#text}
*
* @example
* ```ts
* app.post('/entry', async (c) => {
* const body = await c.req.text()
* })
* ```
*/
text() {
return this.#cachedBody("text");
}
/**
* `.arrayBuffer()` parse Request body as an `ArrayBuffer`
*
* @see {@link https://hono.dev/docs/api/request#arraybuffer}
*
* @example
* ```ts
* app.post('/entry', async (c) => {
* const body = await c.req.arrayBuffer()
* })
* ```
*/
arrayBuffer() {
return this.#cachedBody("arrayBuffer");
}
/**
* `.bytes()` parses the request body as a `Uint8Array`.
*
* @see {@link https://hono.dev/docs/api/request#bytes}
*
* @example
* ```ts
* app.post('/entry', async (c) => {
* const body = await c.req.bytes()
* })
* ```
*/
bytes() {
return this.#cachedBody("arrayBuffer").then((buffer) => new Uint8Array(buffer));
}
/**
* Parses the request body as a `Blob`.
* @example
* ```ts
* app.post('/entry', async (c) => {
* const body = await c.req.blob();
* });
* ```
* @see https://hono.dev/docs/api/request#blob
*/
blob() {
return this.#cachedBody("blob");
}
/**
* Parses the request body as `FormData`.
* @example
* ```ts
* app.post('/entry', async (c) => {
* const body = await c.req.formData();
* });
* ```
* @see https://hono.dev/docs/api/request#formdata
*/
formData() {
return this.#cachedBody("formData");
}
/**
* Adds validated data to the request.
*
* @param target - The target of the validation.
* @param data - The validated data to add.
*/
addValidatedData(target, data) {
(this.#validatedData ??= {})[target] = data;
}
valid(target) {
return this.#validatedData?.[target];
}
/**
* `.url` can get the request url strings.
*
* @see {@link https://hono.dev/docs/api/request#url}
*
* @example
* ```ts
* app.get('/about/me', (c) => {
* const url = c.req.url // `http://localhost:8787/about/me`
* ...
* })
* ```
*/
get url() {
return this.raw.url;
}
/**
* `.method` can get the method name of the request.
*
* @see {@link https://hono.dev/docs/api/request#method}
*
* @example
* ```ts
* app.get('/about/me', (c) => {
* const method = c.req.method // `GET`
* })
* ```
*/
get method() {
return this.raw.method;
}
get [GET_MATCH_RESULT]() {
return this.#matchResult;
}
/**
* `.matchedRoutes` can return a matched route in the handler
*
* @deprecated
*
* Use matchedRoutes helper defined in "hono/route" instead.
*
* @see {@link https://hono.dev/docs/api/request#matchedroutes}
*
* @example
* ```ts
* app.use('*', async function logger(c, next) {
* await next()
* c.req.matchedRoutes.forEach(({ handler, method, path }, i) => {
* const name = handler.name || (handler.length < 2 ? '[handler]' : '[middleware]')
* console.log(
* method,
* ' ',
* path,
* ' '.repeat(Math.max(10 - path.length, 0)),
* name,
* i === c.req.routeIndex ? '<- respond from here' : ''
* )
* })
* })
* ```
*/
get matchedRoutes() {
return this.#matchResult[0].map(([[, route]]) => route);
}
/**
* `.routePath` can retrieve the path registered within the handler
*
* @deprecated
*
* Use routePath helper defined in "hono/route" instead.
*
* @see {@link https://hono.dev/docs/api/request#routepath}
*
* @example
* ```ts
* app.get('/posts/:id', (c) => {
* return c.json({ path: c.req.routePath })
* })
* ```
*/
get routePath() {
return this.#matchResult[0].map(([[, route]]) => route)[this.routeIndex].path;
}
};
/**
* Clones a HonoRequest's underlying raw Request object.
*
* This utility handles both consumed and unconsumed request bodies:
* - If the request body hasn't been consumed, it uses the native `clone()` method
* - If the request body has been consumed, it reconstructs a new Request using cached body data
*
* This is particularly useful when you need to:
* - Process the same request body multiple times
* - Pass requests to external services after validation
*
* @param req - The HonoRequest object to clone
* @returns A Promise that resolves to a new Request object with the same properties
* @throws {HTTPException} If the request body was consumed directly via `req.raw`
* without using HonoRequest methods (e.g., `req.json()`, `req.text()`), making it
* impossible to reconstruct the body from cache
*
* @example
* ```ts
* // Clone after consuming the body (e.g., after validation)
* app.post('/forward',
* validator('json', (data) => data),
* async (c) => {
* const validated = c.req.valid('json')
* // Body has been consumed, but cloneRawRequest still works
* const clonedReq = await cloneRawRequest(c.req)
* return fetch('http://backend-service.com', clonedReq)
* }
* )
* ```
*/
const cloneRawRequest = async (req) => {
if (!req.raw.bodyUsed) return req.raw.clone();
const cacheKey = Object.keys(req.bodyCache)[0];
if (!cacheKey) throw new HTTPException(500, { message: "Cannot clone request: body was already consumed and not cached. Please use HonoRequest methods (e.g., req.json(), req.text()) instead of consuming req.raw directly." });
let body = await req[cacheKey]();
const headers = req.header();
if (cacheKey === "json") {
body = JSON.stringify(body);
delete headers["content-length"];
} else if (body instanceof FormData) {
delete headers["content-type"];
delete headers["content-length"];
}
const requestInit = {
body,
cache: req.raw.cache,
credentials: req.raw.credentials,
headers,
integrity: req.raw.integrity,
keepalive: req.raw.keepalive,
method: req.method,
mode: req.raw.mode,
redirect: req.raw.redirect,
referrer: req.raw.referrer,
referrerPolicy: req.raw.referrerPolicy,
signal: req.raw.signal
};
return new Request(req.url, requestInit);
};
//#endregion
export { HonoRequest, cloneRawRequest };
@@ -0,0 +1,12 @@
# `@typescript-eslint/type-utils`
> Type utilities for working with TypeScript within ESLint rules.
[![NPM Version](https://img.shields.io/npm/v/@typescript-eslint/utils.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/utils)
[![NPM Downloads](https://img.shields.io/npm/dm/@typescript-eslint/utils.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/utils)
The utilities in this package are separated from `@typescript-eslint/utils` so that that package does not require a dependency on `typescript`.
> See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code.
<!-- Local path for docs: docs/packages/Type_Utils.mdx -->
@@ -0,0 +1,105 @@
// src/slot.tsx
import * as React from "react";
import { composeRefs } from "@radix-ui/react-compose-refs";
import { Fragment as Fragment2, jsx } from "react/jsx-runtime";
// @__NO_SIDE_EFFECTS__
function createSlot(ownerName) {
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
const Slot2 = React.forwardRef((props, forwardedRef) => {
const { children, ...slotProps } = props;
const childrenArray = React.Children.toArray(children);
const slottable = childrenArray.find(isSlottable);
if (slottable) {
const newElement = slottable.props.children;
const newChildren = childrenArray.map((child) => {
if (child === slottable) {
if (React.Children.count(newElement) > 1) return React.Children.only(null);
return React.isValidElement(newElement) ? newElement.props.children : null;
} else {
return child;
}
});
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
}
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
});
Slot2.displayName = `${ownerName}.Slot`;
return Slot2;
}
var Slot = /* @__PURE__ */ createSlot("Slot");
// @__NO_SIDE_EFFECTS__
function createSlotClone(ownerName) {
const SlotClone = React.forwardRef((props, forwardedRef) => {
const { children, ...slotProps } = props;
if (React.isValidElement(children)) {
const childrenRef = getElementRef(children);
const props2 = mergeProps(slotProps, children.props);
if (children.type !== React.Fragment) {
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
}
return React.cloneElement(children, props2);
}
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
});
SlotClone.displayName = `${ownerName}.SlotClone`;
return SlotClone;
}
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
// @__NO_SIDE_EFFECTS__
function createSlottable(ownerName) {
const Slottable2 = ({ children }) => {
return /* @__PURE__ */ jsx(Fragment2, { children });
};
Slottable2.displayName = `${ownerName}.Slottable`;
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
return Slottable2;
}
var Slottable = /* @__PURE__ */ createSlottable("Slottable");
function isSlottable(child) {
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
}
function mergeProps(slotProps, childProps) {
const overrideProps = { ...childProps };
for (const propName in childProps) {
const slotPropValue = slotProps[propName];
const childPropValue = childProps[propName];
const isHandler = /^on[A-Z]/.test(propName);
if (isHandler) {
if (slotPropValue && childPropValue) {
overrideProps[propName] = (...args) => {
const result = childPropValue(...args);
slotPropValue(...args);
return result;
};
} else if (slotPropValue) {
overrideProps[propName] = slotPropValue;
}
} else if (propName === "style") {
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
} else if (propName === "className") {
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
}
}
return { ...slotProps, ...overrideProps };
}
function getElementRef(element) {
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
if (mayWarn) {
return element.ref;
}
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
if (mayWarn) {
return element.props.ref;
}
return element.props.ref || element.ref;
}
export {
Slot as Root,
Slot,
Slottable,
createSlot,
createSlottable
};
//# sourceMappingURL=index.mjs.map
@@ -0,0 +1,144 @@
# ISC License
#
# Copyright (c) 2018-2025, Andrea Giammarchi, @WebReflection
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
import json as _json
class _Known:
def __init__(self):
self.key = []
self.value = []
class _String:
def __init__(self, value):
self.value = value
def _array_keys(value):
for i in range(len(value)):
yield i
def _object_keys(value):
for key in value:
yield key
def _is_array(value):
return isinstance(value, (list, tuple))
def _is_object(value):
return isinstance(value, dict)
def _is_string(value):
return isinstance(value, str)
def _index(known, input, value):
input.append(value)
index = str(len(input) - 1)
known.key.append(value)
known.value.append(index)
return index
def _relate(known, input, value):
if _is_string(value) or _is_array(value) or _is_object(value):
try:
return known.value[known.key.index(value)]
except:
return _index(known, input, value)
return value
def _resolver(input, lazy, parsed):
def resolver(output):
keys = _array_keys(output) if _is_array(output) else _object_keys(output) if _is_object(output) else []
for key in keys:
value = output[key]
if isinstance(value, _String):
tmp = input[int(value.value)]
output[key] = tmp
if (_is_array(tmp) or _is_object(tmp)) and tmp not in parsed:
parsed.append(tmp)
lazy.append([output, key])
return output
return resolver
def _transform(known, input, value):
if _is_array(value):
output = []
for val in value:
output.append(_relate(known, input, val))
return output
if _is_object(value):
obj = {}
for key in value:
obj[key] = _relate(known, input, value[key])
return obj
return value
def _wrap(value):
if _is_string(value):
return _String(value)
if _is_array(value):
i = 0
for val in value:
value[i] = _wrap(val)
i += 1
elif _is_object(value):
for key in value:
value[key] = _wrap(value[key])
return value
def parse(value, *args, **kwargs):
json = _json.loads(value, *args, **kwargs)
wrapped = []
for value in json:
wrapped.append(_wrap(value))
input = []
for value in wrapped:
if isinstance(value, _String):
input.append(value.value)
else:
input.append(value)
value = input[0]
lazy = []
revive = _resolver(input, lazy, [value])
value = revive(value)
i = 0
while i < len(lazy):
o, k = lazy[i]
i += 1
o[k] = revive(o[k])
return value
def stringify(value, *args, **kwargs):
known = _Known()
input = []
output = []
i = int(_index(known, input, value))
while i < len(input):
output.append(_transform(known, input, input[i]))
i += 1
return _json.dumps(output, *args, **kwargs)
@@ -0,0 +1 @@
{"version":3,"file":"brain-circuit.js","sources":["../../../src/icons/brain-circuit.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BrainCircuit\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgNWEzIDMgMCAxIDAtNS45OTcuMTI1IDQgNCAwIDAgMC0yLjUyNiA1Ljc3IDQgNCAwIDAgMCAuNTU2IDYuNTg4QTQgNCAwIDEgMCAxMiAxOFoiIC8+CiAgPHBhdGggZD0iTTkgMTNhNC41IDQuNSAwIDAgMCAzLTQiIC8+CiAgPHBhdGggZD0iTTYuMDAzIDUuMTI1QTMgMyAwIDAgMCA2LjQwMSA2LjUiIC8+CiAgPHBhdGggZD0iTTMuNDc3IDEwLjg5NmE0IDQgMCAwIDEgLjU4NS0uMzk2IiAvPgogIDxwYXRoIGQ9Ik02IDE4YTQgNCAwIDAgMS0xLjk2Ny0uNTE2IiAvPgogIDxwYXRoIGQ9Ik0xMiAxM2g0IiAvPgogIDxwYXRoIGQ9Ik0xMiAxOGg2YTIgMiAwIDAgMSAyIDJ2MSIgLz4KICA8cGF0aCBkPSJNMTIgOGg4IiAvPgogIDxwYXRoIGQ9Ik0xNiA4VjVhMiAyIDAgMCAxIDItMiIgLz4KICA8Y2lyY2xlIGN4PSIxNiIgY3k9IjEzIiByPSIuNSIgLz4KICA8Y2lyY2xlIGN4PSIxOCIgY3k9IjMiIHI9Ii41IiAvPgogIDxjaXJjbGUgY3g9IjIwIiBjeT0iMjEiIHI9Ii41IiAvPgogIDxjaXJjbGUgY3g9IjIwIiBjeT0iOCIgcj0iLjUiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/brain-circuit\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst BrainCircuit = createLucideIcon('BrainCircuit', [\n [\n 'path',\n {\n d: 'M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z',\n key: 'l5xja',\n },\n ],\n ['path', { d: 'M9 13a4.5 4.5 0 0 0 3-4', key: '10igwf' }],\n ['path', { d: 'M6.003 5.125A3 3 0 0 0 6.401 6.5', key: '105sqy' }],\n ['path', { d: 'M3.477 10.896a4 4 0 0 1 .585-.396', key: 'ql3yin' }],\n ['path', { d: 'M6 18a4 4 0 0 1-1.967-.516', key: '2e4loj' }],\n ['path', { d: 'M12 13h4', key: '1ku699' }],\n ['path', { d: 'M12 18h6a2 2 0 0 1 2 2v1', key: '105ag5' }],\n ['path', { d: 'M12 8h8', key: '1lhi5i' }],\n ['path', { d: 'M16 8V5a2 2 0 0 1 2-2', key: 'u6izg6' }],\n ['circle', { cx: '16', cy: '13', r: '.5', key: 'ry7gng' }],\n ['circle', { cx: '18', cy: '3', r: '.5', key: '1aiba7' }],\n ['circle', { cx: '20', cy: '21', r: '.5', key: 'yhc1fs' }],\n ['circle', { cx: '20', cy: '8', r: '.5', key: '1e43v0' }],\n]);\n\nexport default BrainCircuit;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CACpD,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAoC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACjE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAqC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAClE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA8B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAALine truncated
@@ -0,0 +1,36 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const BrainCog = createLucideIcon("BrainCog", [
[
"path",
{
d: "M12 5a3 3 0 1 0-5.997.142 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588 4 4 0 0 0 7.636 2.106 3.2 3.2 0 0 0 .164-.546c.028-.13.306-.13.335 0a3.2 3.2 0 0 0 .163.546 4 4 0 0 0 7.636-2.106 4 4 0 0 0 .556-6.588 4 4 0 0 0-2.526-5.77A3 3 0 1 0 12 5",
key: "1kgmhc"
}
],
["path", { d: "M17.599 6.5a3 3 0 0 0 .399-1.375", key: "tmeiqw" }],
["path", { d: "M6.003 5.125A3 3 0 0 0 6.401 6.5", key: "105sqy" }],
["path", { d: "M3.477 10.896a4 4 0 0 1 .585-.396", key: "ql3yin" }],
["path", { d: "M19.938 10.5a4 4 0 0 1 .585.396", key: "1qfode" }],
["path", { d: "M6 18a4 4 0 0 1-1.967-.516", key: "2e4loj" }],
["path", { d: "M19.967 17.484A4 4 0 0 1 18 18", key: "159ez6" }],
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }],
["path", { d: "m15.7 10.4-.9.4", key: "ayzo6p" }],
["path", { d: "m9.2 13.2-.9.4", key: "1uzb3g" }],
["path", { d: "m13.6 15.7-.4-.9", key: "11ifqf" }],
["path", { d: "m10.8 9.2-.4-.9", key: "1pmk2v" }],
["path", { d: "m15.7 13.5-.9-.4", key: "7ng02m" }],
["path", { d: "m9.2 10.9-.9-.4", key: "1x66zd" }],
["path", { d: "m10.5 15.7.4-.9", key: "3js94g" }],
["path", { d: "m13.1 9.2.4-.9", key: "18n7mc" }]
]);
export { BrainCog as default };
//# sourceMappingURL=brain-cog.js.map
@@ -0,0 +1,39 @@
/**
* @fileoverview Types for this package.
*/
import type { ConfigObject } from "@eslint/core";
/**
* Infinite array type.
*/
export type InfiniteArray<T> = T | InfiniteArray<T>[];
/**
* A config object that may appear inside of `extends`.
* `basePath` and nested `extends` are not allowed on extension config objects.
*/
export type ExtensionConfigObject = Omit<ConfigObject, "basePath"> & {
extends?: never;
};
/**
* The type of array element in the `extends` property after flattening.
*/
export type SimpleExtendsElement = string | ExtensionConfigObject;
/**
* The type of array element in the `extends` property before flattening.
*/
export type ExtendsElement =
| SimpleExtendsElement
| InfiniteArray<ExtensionConfigObject>;
/**
* Config with extends. Valid only inside of `defineConfig()`.
*/
export interface ConfigWithExtends extends ConfigObject {
extends?: ExtendsElement[];
}
export type ConfigWithExtendsArray = InfiniteArray<ConfigWithExtends>[];
@@ -0,0 +1 @@
module.exports={C:{"48":0.00446,"52":0.0223,"78":0.01338,"88":0.00446,"102":0.00446,"110":0.00446,"113":0.00446,"115":0.3568,"120":0.0223,"121":0.0446,"122":0.00446,"123":0.00892,"124":0.00892,"125":0.00892,"127":0.00446,"128":0.0223,"130":0.00446,"131":0.00446,"132":0.00446,"133":0.01338,"134":0.00446,"135":0.00892,"136":0.01338,"137":0.00446,"138":0.00446,"139":0.00892,"140":0.36126,"141":0.00892,"142":0.00446,"143":0.00892,"144":0.00446,"145":0.00892,"146":0.0223,"147":0.01784,"148":0.0223,"149":0.01784,"150":0.03122,"151":0.04014,"152":0.07582,"153":0.12934,"154":0.49952,"155":1.83752,"156":1.86428,"157":0.06244,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 49 50 51 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 89 90 91 92 93 94 95 96 97 98 99 100 101 103 104 105 106 107 108 109 111 112 114 116 117 118 119 126 129 158 159 160 3.5 3.6"},D:{"41":0.00892,"49":0.01338,"56":0.00446,"70":0.00446,"76":0.01338,"79":0.00446,"87":0.00892,"88":0.00446,"91":0.00446,"101":0.00446,"103":0.12488,"104":0.09366,"105":0.09366,"106":0.09366,"107":0.09812,"108":0.09812,"109":0.67792,"110":0.09366,"111":0.10258,"112":0.09812,"113":0.00446,"114":0.01784,"115":0.00446,"116":0.25868,"117":0.09812,"118":0.27652,"119":0.05352,"120":0.16502,"121":0.00892,"122":0.01784,"123":0.01338,"124":0.12042,"125":0.00892,"126":0.03568,"127":0.01338,"128":0.07136,"129":0.00892,"130":0.02676,"131":0.20962,"132":0.02676,"133":0.21408,"134":0.16056,"135":0.05798,"136":0.0669,"137":0.04906,"138":0.17394,"139":0.05352,"140":0.0669,"141":0.07136,"142":0.1561,"143":0.04906,"144":0.12488,"145":0.06244,"146":0.05798,"147":0.08474,"148":0.16502,"149":0.1561,"150":0.46384,"151":1.93118,"152":7.57754,"153":7.5151,"154":1.87766,"155":0.02676,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 42 43 44 45 46 47 48 50 51 52 53 54 55 57 58 59 60 61 62 63 64 65 66 67 68 69 71 72 73 74 75 77 78 80 81 83 84 85 86 89 90 92 93 94 95 96 97 98 99 100 102 156 157"},F:{"46":0.00446,"95":0.02676,"100":0.00446,"101":0.0223,"102":0.00446,"105":0.00446,"106":0.00892,"107":0.00446,"114":0.00446,"115":0.00446,"116":0.00446,"118":0.00446,"119":0.00446,"120":0.00446,"121":0.00446,"122":0.00446,"131":0.00446,"133":0.00892,"134":0.12934,"135":0.92322,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 96 97 98 99 103 104 108 109 110 111 112 113 117 123 124 125 126 127 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"17":0.00446,"18":0.00446,"92":0.00446,"109":0.08474,"114":0.00446,"119":0.0223,"120":0.0223,"122":0.01338,"123":0.00446,"124":0.00446,"126":0.00446,"128":0.00446,"130":0.00446,"131":0.00892,"132":0.00446,"133":0.00446,"134":0.00446,"135":0.00892,"136":0.00892,"137":0.01338,"138":0.01338,"139":0.00892,"140":0.00892,"141":0.00892,"142":0.01338,"143":0.01784,"144":0.01338,"145":0.01338,"146":0.01784,"147":0.01338,"148":0.02676,"149":0.04014,"150":0.11596,"151":0.2007,"152":2.28352,"153":2.97928,"154":0.8474,_:"12 13 14 15 16 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 121 125 127 129"},E:{"14":0.00446,"27":0.16948,_:"4 5 6 7 8 9 10 11 12 13 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 27.1 TP","11.1":0.00446,"12.1":0.00446,"13.1":0.03122,"14.1":0.11596,"15.1":0.02676,"15.2-15.3":0.00446,"15.4":0.00446,"15.5":0.00446,"15.6":0.16056,"16.0":0.00446,"16.1":0.00892,"16.2":0.01338,"16.3":0.01338,"16.4":0.00892,"16.5":0.01338,"16.6":0.18286,"17.0":0.00446,"17.1":0.12934,"17.2":0.00892,"17.3":0.01338,"17.4":0.0223,"17.5":0.03568,"17.6":0.22746,"18.0":0.01338,"18.1":0.0223,"18.2":0.01338,"18.3":0.03568,"18.4":0.01784,"18.5-18.7":0.0446,"26.0":0.0223,"26.1":0.0223,"26.2":0.08028,"26.3":0.10258,"26.4":0.09812,"26.5":0.37018,"26.6":1.48964,"27.2":0.00446},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00161,"5.0-5.1":0.00161,"6.0-6.1":0,"7.0-7.1":0.00322,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.01612,"11.0-11.2":0.00161,"11.3-11.4":0.00322,"12.0-12.1":0,"12.2-12.5":0.04192,"13.0-13.1":0,"13.2":0.00806,"13.3":0,"13.4-13.7":0.00161,"14.0-14.4":0.00645,"14.5-14.8":0.00967,"15.0-15.1":0.00967,"15.2-15.3":0.00645,"15.4":0.00806,"15.5":0.00967,"15.6-15.8":0.20962,"16.0":0.01612,"16.1":0.02902,"16.2":0.01612,"16.3":0.03547,"16.4":0.00806,"16.5":0.0129,"16.6-16.7":0.29185,"17.0":0.01129,"17.1":0.01612,"17.2":0.01612,"17.3":0.02419,"17.4":0.03386,"17.5":0.06611,"17.6-17.7":0.17092,"18.0":0.03547,"18.1":0.07095,"18.2":0.09675,"18.3":0.16769,"18.4":0.10481,"18.5-18.7":2.16549,"26.0":0.10481,"26.1":0.10642,"26.2":0.27734,"26.3":0.29991,"26.4":0.21929,"26.5":1.46892,"26.6":9.06347,"27.0":0.69496,"27.1":0,"27.2":0.01774},P:{"4"Line truncated
@@ -0,0 +1,387 @@
/**
* This is a fork of https://github.com/DefinitelyTyped/DefinitelyTyped/blob/13f63c2eb8d7479caf01ab8d72f9e3683368a8f5/types/json-schema/index.d.ts
* We intentionally fork this because:
* - ESLint ***ONLY*** supports JSONSchema v4
* - We want to provide stricter types
*/
/**
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.1
*/
export type JSONSchema4TypeName = 'any' | 'array' | 'boolean' | 'integer' | 'null' | 'number' | 'object' | 'string';
/**
* @see https://tools.ietf.org/html/draft-zyp-json-schema-04#section-3.5
*/
export type JSONSchema4Type = boolean | number | string | null;
export type JSONSchema4TypeExtended = JSONSchema4Array | JSONSchema4Object | JSONSchema4Type;
export interface JSONSchema4Object {
[key: string]: JSONSchema4TypeExtended;
}
export interface JSONSchema4Array extends Array<JSONSchema4TypeExtended> {
}
/**
* Meta schema
*
* Recommended values:
* - 'http://json-schema.org/schema#'
* - 'http://json-schema.org/hyper-schema#'
* - 'http://json-schema.org/draft-04/schema#'
* - 'http://json-schema.org/draft-04/hyper-schema#'
* - 'http://json-schema.org/draft-03/schema#'
* - 'http://json-schema.org/draft-03/hyper-schema#'
*
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
*/
export type JSONSchema4Version = string;
/**
* JSON Schema V4
* @see https://tools.ietf.org/html/draft-zyp-json-schema-04
*/
export type JSONSchema4 = JSONSchema4AllOfSchema | JSONSchema4AnyOfSchema | JSONSchema4AnySchema | JSONSchema4ArraySchema | JSONSchema4BooleanSchema | JSONSchema4MultiSchema | JSONSchema4NullSchema | JSONSchema4NumberSchema | JSONSchema4ObjectSchema | JSONSchema4OneOfSchema | JSONSchema4RefSchema | JSONSchema4StringSchema;
interface JSONSchema4Base {
/**
* Reusable definitions that can be referenced via `$ref`
*/
$defs?: Record<string, JSONSchema4> | undefined;
/**
* Path to a schema defined in `definitions`/`$defs` that will form the base
* for this schema.
*
* If you are defining an "array" schema (`schema: [ ... ]`) for your rule
* then you should prefix this with `items/0` so that the validator can find
* your definitions.
*
* eg: `'#/items/0/definitions/myDef'`
*
* Otherwise if you are defining an "object" schema (`schema: { ... }`) for
* your rule you can directly reference your definitions
*
* eg: `'#/definitions/myDef'`
*/
$ref?: string | undefined;
$schema?: JSONSchema4Version | undefined;
/**
* (AND) Must be valid against all of the sub-schemas
*/
allOf?: JSONSchema4[] | undefined;
/**
* (OR) Must be valid against any of the sub-schemas
*/
anyOf?: JSONSchema4[] | undefined;
/**
* The default value for the item if not present
*/
default?: JSONSchema4TypeExtended | undefined;
/**
* Reusable definitions that can be referenced via `$ref`
*/
definitions?: Record<string, JSONSchema4> | undefined;
/**
* This attribute is a string that provides a full description of the of
* purpose the instance property.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.22
*/
description?: string | undefined;
/**
* The value of this property MUST be another schema which will provide
* a base schema which the current schema will inherit from. The
* inheritance rules are such that any instance that is valid according
* to the current schema MUST be valid according to the referenced
* schema. This MAY also be an array, in which case, the instance MUST
* be valid for all the schemas in the array. A schema that extends
* another schema MAY define additional attributes, constrain existing
* attributes, or add other constraints.
*
* Conceptually, the behavior of extends can be seen as validating an
* instance against all constraints in the extending schema as well as
* the extended schema(s).
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.26
*/
extends?: string | string[] | undefined;
id?: string | undefined;
/**
* (NOT) Must not be valid against the given schema
*/
not?: JSONSchema4 | undefined;
/**
* (XOR) Must be valid against exactly one of the sub-schemas
*/
oneOf?: JSONSchema4[] | undefined;
/**
* This attribute indicates if the instance must have a value, and not
* be undefined. This is false by default, making the instance
* optional.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.7
*/
required?: boolean | string[] | undefined;
/**
* This attribute is a string that provides a short description of the
* instance property.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.21
*/
title?: string | undefined;
/**
* A single type, or a union of simple types
*/
type?: JSONSchema4TypeName | JSONSchema4TypeName[] | undefined;
}
export interface JSONSchema4RefSchema extends JSONSchema4Base {
$ref: string;
type?: undefined;
}
export interface JSONSchema4AllOfSchema extends JSONSchema4Base {
allOf: JSONSchema4[];
type?: undefined;
}
export interface JSONSchema4AnyOfSchema extends JSONSchema4Base {
anyOf: JSONSchema4[];
type?: undefined;
}
export interface JSONSchema4OneOfSchema extends JSONSchema4Base {
oneOf: JSONSchema4[];
type?: undefined;
}
export interface JSONSchema4MultiSchema extends Omit<JSONSchema4ObjectSchema, 'enum' | 'type'>, Omit<JSONSchema4ArraySchema, 'enum' | 'type'>, Omit<JSONSchema4StringSchema, 'enum' | 'type'>, Omit<JSONSchema4NumberSchema, 'enum' | 'type'>, Omit<JSONSchema4BooleanSchema, 'enum' | 'type'>, Omit<JSONSchema4NullSchema, 'enum' | 'type'>, Omit<JSONSchema4AnySchema, 'enum' | 'type'> {
/**
* This provides an enumeration of all possible values that are valid
* for the instance property. This MUST be an array, and each item in
* the array represents a possible value for the instance value. If
* this attribute is defined, the instance value MUST be one of the
* values in the array in order for the schema to be valid.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.19
*/
enum?: JSONSchema4Type[];
type: JSONSchema4TypeName[];
}
/**
* @see https://json-schema.org/understanding-json-schema/reference/object.html
*/
export interface JSONSchema4ObjectSchema extends JSONSchema4Base {
/**
* This attribute defines a schema for all properties that are not
* explicitly defined in an object type definition. If specified, the
* value MUST be a schema or a boolean. If false is provided, no
* additional properties are allowed beyond the properties defined in
* the schema. The default value is an empty schema which allows any
* value for additional properties.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.4
*/
additionalProperties?: boolean | JSONSchema4 | undefined;
/**
* The `dependencies` keyword conditionally applies a sub-schema when a given
* property is present. This schema is applied in the same way `allOf` applies
* schemas. Nothing is merged or extended. Both schemas apply independently.
*/
dependencies?: Record<string, JSONSchema4 | string[]> | undefined;
/**
* The maximum number of properties allowed for record-style schemas
*/
maxProperties?: number | undefined;
/**
* The minimum number of properties required for record-style schemas
*/
minProperties?: number | undefined;
/**
* This attribute is an object that defines the schema for a set of
* property names of an object instance. The name of each property of
* this attribute's object is a regular expression pattern in the ECMA
* 262/Perl 5 format, while the value is a schema. If the pattern
* matches the name of a property on the instance object, the value of
* the instance's property MUST be valid against the pattern name's
* schema value.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.3
*/
patternProperties?: Record<string, JSONSchema4> | undefined;
/**
* This attribute is an object with property definitions that define the
* valid values of instance object property values. When the instance
* value is an object, the property values of the instance object MUST
* conform to the property definitions in this object. In this object,
* each property definition's value MUST be a schema, and the property's
* name MUST be the name of the instance property that it defines. The
* instance property value MUST be valid according to the schema from
* the property definition. Properties are considered unordered, the
* order of the instance properties MAY be in any order.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.2
*/
properties?: Record<string, JSONSchema4> | undefined;
type: 'object';
}
/**
* @see https://json-schema.org/understanding-json-schema/reference/array.html
*/
export interface JSONSchema4ArraySchema extends JSONSchema4Base {
/**
* May only be defined when "items" is defined, and is a tuple of JSONSchemas.
*
* This provides a definition for additional items in an array instance
* when tuple definitions of the items is provided. This can be false
* to indicate additional items in the array are not allowed, or it can
* be a schema that defines the schema of the additional items.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.6
*/
additionalItems?: boolean | JSONSchema4 | undefined;
/**
* This attribute defines the allowed items in an instance array, and
* MUST be a schema or an array of schemas. The default value is an
* empty schema which allows any value for items in the instance array.
*
* When this attribute value is a schema and the instance value is an
* array, then all the items in the array MUST be valid according to the
* schema.
*
* When this attribute value is an array of schemas and the instance
* value is an array, each position in the instance array MUST conform
* to the schema in the corresponding position for this array. This
* called tuple typing. When tuple typing is used, additional items are
* allowed, disallowed, or constrained by the "additionalItems"
* (Section 5.6) attribute using the same rules as
* "additionalProperties" (Section 5.4) for objects.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.5
*/
items?: JSONSchema4 | JSONSchema4[] | undefined;
/**
* Defines the maximum length of an array
*/
maxItems?: number | undefined;
/**
* Defines the minimum length of an array
*/
minItems?: number | undefined;
type: 'array';
/**
* Enforces that all items in the array are unique
*/
uniqueItems?: boolean | undefined;
}
/**
* @see https://json-schema.org/understanding-json-schema/reference/string.html
*/
export interface JSONSchema4StringSchema extends JSONSchema4Base {
enum?: string[] | undefined;
/**
* The `format` keyword allows for basic semantic identification of certain
* kinds of string values that are commonly used.
*
* For example, because JSON doesn’t have a “DateTime” type, dates need to be
* encoded as strings. `format` allows the schema author to indicate that the
* string value should be interpreted as a date.
*
* ajv v6 provides a few built-in formats - all other strings will cause AJV
* to throw during schema compilation
*/
format?: 'date' | 'date-time' | 'email' | 'hostname' | 'ipv4' | 'ipv6' | 'json-pointer' | 'json-pointer-uri-fragment' | 'regex' | 'relative-json-pointer' | 'time' | 'uri' | 'uri-reference' | 'uri-template' | 'url' | 'uuid' | undefined;
/**
* The maximum allowed length for the string
*/
maxLength?: number | undefined;
/**
* The minimum allowed length for the string
*/
minLength?: number | undefined;
/**
* The `pattern` keyword is used to restrict a string to a particular regular
* expression. The regular expression syntax is the one defined in JavaScript
* (ECMA 262 specifically) with Unicode support.
*
* When defining the regular expressions, it’s important to note that the
* string is considered valid if the expression matches anywhere within the
* string. For example, the regular expression "p" will match any string with
* a p in it, such as "apple" not just a string that is simply "p". Therefore,
* it is usually less confusing, as a matter of course, to surround the
* regular expression in ^...$, for example, "^p$", unless there is a good
* reason not to do so.
*/
pattern?: string | undefined;
type: 'string';
}
/**
* @see https://json-schema.org/understanding-json-schema/reference/numeric.html
*/
export interface JSONSchema4NumberSchema extends JSONSchema4Base {
/**
* This provides an enumeration of all possible values that are valid
* for the instance property. This MUST be an array, and each item in
* the array represents a possible value for the instance value. If
* this attribute is defined, the instance value MUST be one of the
* values in the array in order for the schema to be valid.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.19
*/
enum?: number[] | undefined;
/**
* The exclusive minimum allowed value for the number
* - `true` = `x < maximum`
* - `false` = `x <= maximum`
*
* Default is `false`
*/
exclusiveMaximum?: boolean | undefined;
/**
* Indicates whether or not `minimum` is the inclusive or exclusive minimum
* - `true` = `x > minimum`
* - `false` = `x ≥ minimum`
*
* Default is `false`
*/
exclusiveMinimum?: boolean | undefined;
/**
* The maximum allowed value for the number
*/
maximum?: number | undefined;
/**
* The minimum allowed value for the number
*/
minimum?: number | undefined;
/**
* Numbers can be restricted to a multiple of a given number, using the
* `multipleOf` keyword. It may be set to any positive number.
*/
multipleOf?: number | undefined;
type: 'integer' | 'number';
}
/**
* @see https://json-schema.org/understanding-json-schema/reference/boolean.html
*/
export interface JSONSchema4BooleanSchema extends JSONSchema4Base {
/**
* This provides an enumeration of all possible values that are valid
* for the instance property. This MUST be an array, and each item in
* the array represents a possible value for the instance value. If
* this attribute is defined, the instance value MUST be one of the
* values in the array in order for the schema to be valid.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.19
*/
enum?: boolean[] | undefined;
type: 'boolean';
}
/**
* @see https://json-schema.org/understanding-json-schema/reference/null.html
*/
export interface JSONSchema4NullSchema extends JSONSchema4Base {
/**
* This provides an enumeration of all possible values that are valid
* for the instance property. This MUST be an array, and each item in
* the array represents a possible value for the instance value. If
* this attribute is defined, the instance value MUST be one of the
* values in the array in order for the schema to be valid.
*
* @see https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.19
*/
enum?: null[] | undefined;
type: 'null';
}
export interface JSONSchema4AnySchema extends JSONSchema4Base {
type: 'any';
}
export {};
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './file-chart-column.js';
//# sourceMappingURL=file-bar-chart-2.js.map
@@ -0,0 +1,560 @@
var $ = Object.defineProperty;
var C = (s) => {
throw TypeError(s);
};
var D = (s, n, t) => n in s ? $(s, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[n] = t;
var O = (s, n, t) => D(s, typeof n != "symbol" ? n + "" : n, t), q = (s, n, t) => n.has(s) || C("Cannot " + t);
var d = (s, n, t) => (q(s, n, "read from private field"), t ? t.call(s) : n.get(s)), k = (s, n, t) => n.has(s) ? C("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(s) : n.set(s, t), f = (s, n, t, e) => (q(s, n, "write to private field"), e ? e.call(s, t) : n.set(s, t), t);
var F = (s, n, t, e) => ({
set _(r) {
f(s, n, r, t);
},
get _() {
return d(s, n, e);
}
});
// node_modules/.pnpm/yocto-queue@1.0.0/node_modules/yocto-queue/index.js
var M = class {
constructor(n) {
O(this, "value");
O(this, "next");
this.value = n;
}
}, m, w, E, g = class {
constructor() {
k(this, m);
k(this, w);
k(this, E);
this.clear();
}
enqueue(n) {
let t = new M(n);
d(this, m) ? (d(this, w).next = t, f(this, w, t)) : (f(this, m, t), f(this, w, t)), F(this, E)._++;
}
dequeue() {
let n = d(this, m);
if (n)
return f(this, m, d(this, m).next), F(this, E)._--, n.value;
}
clear() {
f(this, m, void 0), f(this, w, void 0), f(this, E, 0);
}
get size() {
return d(this, E);
}
*[Symbol.iterator]() {
let n = d(this, m);
for (; n; )
yield n.value, n = n.next;
}
};
m = new WeakMap(), w = new WeakMap(), E = new WeakMap();
// node_modules/.pnpm/p-limit@4.0.0/node_modules/p-limit/index.js
function y(s) {
if (!((Number.isInteger(s) || s === Number.POSITIVE_INFINITY) && s > 0))
throw new TypeError("Expected `concurrency` to be a number from 1 and up");
let n = new g(), t = 0, e = () => {
t--, n.size > 0 && n.dequeue()();
}, r = async (h, p, a) => {
t++;
let l = (async () => h(...a))();
p(l);
try {
await l;
} catch (T) {
}
e();
}, i = (h, p, a) => {
n.enqueue(r.bind(void 0, h, p, a)), (async () => (await Promise.resolve(), t < s && n.size > 0 && n.dequeue()()))();
}, c = (h, ...p) => new Promise((a) => {
i(h, a, p);
});
return Object.defineProperties(c, {
activeCount: {
get: () => t
},
pendingCount: {
get: () => n.size
},
clearQueue: {
value: () => {
n.clear();
}
}
}), c;
}
// src/event.ts
function o(s, n = null) {
let t = new Event(s);
return n && Object.defineProperty(t, "task", {
value: n,
enumerable: !0,
writable: !1,
configurable: !1
}), t;
}
// src/constants.ts
var G = {
1: 12.71,
2: 4.303,
3: 3.182,
4: 2.776,
5: 2.571,
6: 2.447,
7: 2.365,
8: 2.306,
9: 2.262,
10: 2.228,
11: 2.201,
12: 2.179,
13: 2.16,
14: 2.145,
15: 2.131,
16: 2.12,
17: 2.11,
18: 2.101,
19: 2.093,
20: 2.086,
21: 2.08,
22: 2.074,
23: 2.069,
24: 2.064,
25: 2.06,
26: 2.056,
27: 2.052,
28: 2.048,
29: 2.045,
30: 2.042,
31: 2.0399,
32: 2.0378,
33: 2.0357,
34: 2.0336,
35: 2.0315,
36: 2.0294,
37: 2.0273,
38: 2.0252,
39: 2.0231,
40: 2.021,
41: 2.0198,
42: 2.0186,
43: 2.0174,
44: 2.0162,
45: 2.015,
46: 2.0138,
47: 2.0126,
48: 2.0114,
49: 2.0102,
50: 2.009,
51: 2.0081,
52: 2.0072,
53: 2.0063,
54: 2.0054,
55: 2.0045,
56: 2.0036,
57: 2.0027,
58: 2.0018,
59: 2.0009,
60: 2,
61: 1.9995,
62: 1.999,
63: 1.9985,
64: 1.998,
65: 1.9975,
66: 1.997,
67: 1.9965,
68: 1.996,
69: 1.9955,
70: 1.995,
71: 1.9945,
72: 1.994,
73: 1.9935,
74: 1.993,
75: 1.9925,
76: 1.992,
77: 1.9915,
78: 1.991,
79: 1.9905,
80: 1.99,
81: 1.9897,
82: 1.9894,
83: 1.9891,
84: 1.9888,
85: 1.9885,
86: 1.9882,
87: 1.9879,
88: 1.9876,
89: 1.9873,
90: 1.987,
91: 1.9867,
92: 1.9864,
93: 1.9861,
94: 1.9858,
95: 1.9855,
96: 1.9852,
97: 1.9849,
98: 1.9846,
99: 1.9843,
100: 1.984,
101: 1.9838,
102: 1.9836,
103: 1.9834,
104: 1.9832,
105: 1.983,
106: 1.9828,
107: 1.9826,
108: 1.9824,
109: 1.9822,
110: 1.982,
111: 1.9818,
112: 1.9816,
113: 1.9814,
114: 1.9812,
115: 1.9819,
116: 1.9808,
117: 1.9806,
118: 1.9804,
119: 1.9802,
120: 1.98,
infinity: 1.96
}, N = G;
// src/utils.ts
var J = (s) => s / 1e6, U = () => J(Number(process.hrtime.bigint())), B = () => performance.now();
function W(s) {
return s !== null && typeof s == "object" && typeof s.then == "function";
}
var S = (s, n) => s.reduce((e, r) => e + (r - n) ** 2, 0) / (s.length - 1) || 0, X = (async () => {
}).constructor, Z = (s) => s.constructor === X, z = async (s) => {
if (Z(s.fn))
return !0;
try {
if (s.opts.beforeEach != null)
try {
await s.opts.beforeEach.call(s);
} catch (e) {
}
let n = s.fn(), t = W(n);
if (t)
try {
await n;
} catch (e) {
}
if (s.opts.afterEach != null)
try {
await s.opts.afterEach.call(s);
} catch (e) {
}
return t;
} catch (n) {
return !1;
}
};
// src/task.ts
var b = class extends EventTarget {
constructor(t, e, r, i = {}) {
super();
/*
* the number of times the task
* function has been executed
*/
this.runs = 0;
this.bench = t, this.name = e, this.fn = r, this.opts = i;
}
async loop(t, e) {
var T;
let r = this.bench.concurrency === "task", { threshold: i } = this.bench, c = 0, h = [];
if (this.opts.beforeAll != null)
try {
await this.opts.beforeAll.call(this);
} catch (u) {
return { error: u };
}
let p = await z(this), a = async () => {
this.opts.beforeEach != null && await this.opts.beforeEach.call(this);
let u = 0;
if (p) {
let v = this.bench.now();
await this.fn.call(this), u = this.bench.now() - v;
} else {
let v = this.bench.now();
this.fn.call(this), u = this.bench.now() - v;
}
h.push(u), c += u, this.opts.afterEach != null && await this.opts.afterEach.call(this);
}, l = y(i);
try {
let u = [];
for (; (c < t || h.length + l.activeCount + l.pendingCount < e) && !((T = this.bench.signal) != null && T.aborted); )
r ? u.push(l(a)) : await a();
u.length && await Promise.all(u);
} catch (u) {
return { error: u };
}
if (this.opts.afterAll != null)
try {
await this.opts.afterAll.call(this);
} catch (u) {
return { error: u };
}
return { samples: h };
}
/**
* run the current task and write the results in `Task.result` object
*/
async run() {
var r, i;
if ((r = this.result) != null && r.error)
return this;
this.dispatchEvent(o("start", this)), await this.bench.setup(this, "run");
let { samples: t, error: e } = await this.loop(this.bench.time, this.bench.iterations);
if (this.bench.teardown(this, "run"), t) {
let c = t.reduce((L, A) => L + A, 0);
this.runs = t.length, t.sort((L, A) => L - A);
let h = c / this.runs, p = 1e3 / h, a = t.length, l = a - 1, T = t[0], u = t[l], v = c / t.length || 0, P = S(t, v), R = Math.sqrt(P), I = R / Math.sqrt(a), _ = N[String(Math.round(l) || 1)] || N.infinity, K = I * _, j = K / v * 100, H = t[Math.ceil(a * 0.75) - 1], V = t[Math.ceil(a * 0.99) - 1], Q = t[Math.ceil(a * 0.995) - 1], Y = t[Math.ceil(a * 0.999) - 1];
if ((i = this.bench.signal) != null && i.aborted)
return this;
this.setResult({
totalTime: c,
min: T,
max: u,
hz: p,
period: h,
samples: t,
mean: v,
variance: P,
sd: R,
sem: I,
df: l,
critical: _,
moe: K,
rme: j,
p75: H,
p99: V,
p995: Q,
p999: Y
});
}
if (e) {
if (this.setResult({ error: e }), this.bench.throws)
throw e;
this.dispatchEvent(o("error", this)), this.bench.dispatchEvent(o("error", this));
}
return this.dispatchEvent(o("cycle", this)), this.bench.dispatchEvent(o("cycle", this)), this.dispatchEvent(o("complete", this)), this;
}
/**
* warmup the current task
*/
async warmup() {
var e;
if ((e = this.result) != null && e.error)
return;
this.dispatchEvent(o("warmup", this)), await this.bench.setup(this, "warmup");
let { error: t } = await this.loop(this.bench.warmupTime, this.bench.warmupIterations);
if (this.bench.teardown(this, "warmup"), t && (this.setResult({ error: t }), this.bench.throws))
throw t;
}
addEventListener(t, e, r) {
super.addEventListener(t, e, r);
}
removeEventListener(t, e, r) {
super.removeEventListener(t, e, r);
}
/**
* change the result object values
*/
setResult(t) {
this.result = { ...this.result, ...t }, Object.freeze(this.result);
}
/**
* reset the task to make the `Task.runs` a zero-value and remove the `Task.result`
* object
*/
reset() {
this.dispatchEvent(o("reset", this)), this.runs = 0, this.result = void 0;
}
};
// src/bench.ts
var x = class extends EventTarget {
constructor(t = {}) {
var e, r, i, c, h, p, a, l;
super();
/*
* @private the task map
*/
this._tasks = /* @__PURE__ */ new Map();
this._todos = /* @__PURE__ */ new Map();
/**
* Executes tasks concurrently based on the specified concurrency mode.
*
* - When `mode` is set to `null` (default), concurrency is disabled.
* - When `mode` is set to 'task', each task's iterations (calls of a task function) run concurrently.
* - When `mode` is set to 'bench', different tasks within the bench run concurrently.
*/
this.concurrency = null;
/**
* The maximum number of concurrent tasks to run. Defaults to Infinity.
*/
this.threshold = 1 / 0;
this.warmupTime = 100;
this.warmupIterations = 5;
this.time = 500;
this.iterations = 10;
this.now = B;
this.now = (e = t.now) != null ? e : this.now, this.warmupTime = (r = t.warmupTime) != null ? r : this.warmupTime, this.warmupIterations = (i = t.warmupIterations) != null ? i : this.warmupIterations, this.time = (c = t.time) != null ? c : this.time, this.iterations = (h = t.iterations) != null ? h : this.iterations, this.signal = t.signal, this.throws = (p = t.throws) != null ? p : !1, this.setup = (a = t.setup) != null ? a : () => {
}, this.teardown = (l = t.teardown) != null ? l : () => {
}, this.signal && this.signal.addEventListener(
"abort",
() => {
this.dispatchEvent(o("abort"));
},
{ once: !0 }
);
}
runTask(t) {
var e;
return (e = this.signal) != null && e.aborted ? t : t.run();
}
/**
* run the added tasks that were registered using the
* {@link add} method.
* Note: This method does not do any warmup. Call {@link warmup} for that.
*/
async run() {
if (this.concurrency === "bench")
return this.runConcurrently(this.threshold, this.concurrency);
this.dispatchEvent(o("start"));
let t = [];
for (let e of [...this._tasks.values()])
t.push(await this.runTask(e));
return this.dispatchEvent(o("complete")), t;
}
/**
* See Bench.{@link concurrency}
*/
async runConcurrently(t = 1 / 0, e = "bench") {
if (this.threshold = t, this.concurrency = e, e === "task")
return this.run();
this.dispatchEvent(o("start"));
let r = y(t), i = [];
for (let h of [...this._tasks.values()])
i.push(r(() => this.runTask(h)));
let c = await Promise.all(i);
return this.dispatchEvent(o("complete")), c;
}
/**
* warmup the benchmark tasks.
* This is not run by default by the {@link run} method.
*/
async warmup() {
if (this.concurrency === "bench") {
await this.warmupConcurrently(this.threshold, this.concurrency);
return;
}
this.dispatchEvent(o("warmup"));
for (let [, t] of this._tasks)
await t.warmup();
}
/**
* warmup the benchmark tasks concurrently.
* This is not run by default by the {@link runConcurrently} method.
*/
async warmupConcurrently(t = 1 / 0, e = "bench") {
if (this.threshold = t, this.concurrency = e, e === "task") {
await this.warmup();
return;
}
this.dispatchEvent(o("warmup"));
let r = y(t), i = [];
for (let [, c] of this._tasks)
i.push(r(() => c.warmup()));
await Promise.all(i);
}
/**
* reset each task and remove its result
*/
reset() {
this.dispatchEvent(o("reset")), this._tasks.forEach((t) => {
t.reset();
});
}
/**
* add a benchmark task to the task map
*/
add(t, e, r = {}) {
let i = new b(this, t, e, r);
return this._tasks.set(t, i), this.dispatchEvent(o("add", i)), this;
}
/**
* add a benchmark todo to the todo map
*/
// eslint-disable-next-line @typescript-eslint/no-empty-function
todo(t, e = () => {
}, r = {}) {
let i = new b(this, t, e, r);
return this._todos.set(t, i), this.dispatchEvent(o("todo", i)), this;
}
/**
* remove a benchmark task from the task map
*/
remove(t) {
let e = this.getTask(t);
return e && (this.dispatchEvent(o("remove", e)), this._tasks.delete(t)), this;
}
addEventListener(t, e, r) {
super.addEventListener(t, e, r);
}
removeEventListener(t, e, r) {
super.removeEventListener(t, e, r);
}
/**
* table of the tasks results
*/
table(t) {
return this.tasks.map((e) => {
if (e.result) {
if (e.result.error)
throw e.result.error;
return (t == null ? void 0 : t(e)) || {
"Task Name": e.name,
"ops/sec": e.result.error ? "NaN" : parseInt(e.result.hz.toString(), 10).toLocaleString(),
"Average Time (ns)": e.result.error ? "NaN" : e.result.mean * 1e3 * 1e3,
Margin: e.result.error ? "NaN" : `\xB1${e.result.rme.toFixed(2)}%`,
Samples: e.result.error ? "NaN" : e.result.samples.length
};
}
return null;
});
}
/**
* (getter) tasks results as an array
*/
get results() {
return [...this._tasks.values()].map((t) => t.result);
}
/**
* (getter) tasks as an array
*/
get tasks() {
return [...this._tasks.values()];
}
get todos() {
return [...this._todos.values()];
}
/**
* get a task based on the task name
*/
getTask(t) {
return this._tasks.get(t);
}
};
export {
x as Bench,
b as Task,
U as hrtimeNow,
B as now
};
@@ -0,0 +1 @@
{"version":3,"names":["findConfigUpwards","rootDir","findPackageData","filepath","directories","pkg","isPackage","findRelativeConfig","pkgData","envName","caller","config","ignore","findRootConfig","dirname","loadConfig","name","Error","resolveShowConfigPath","ROOT_CONFIG_FILENAMES","exports","resolvePlugin","resolvePreset","loadPlugin","loadPreset"],"sources":["../../../src/config/files/index-browser.ts"],"sourcesContent":["/* c8 ignore start */\n\nimport type { Handler } from \"gensync\";\n\nimport type {\n ConfigFile,\n IgnoreFile,\n RelativeConfig,\n FilePackageData,\n} from \"./types.ts\";\n\nimport type { CallerMetadata } from \"../validation/options.ts\";\n\nexport type { ConfigFile, IgnoreFile, RelativeConfig, FilePackageData };\n\nexport function findConfigUpwards(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n rootDir: string,\n): string | null {\n return null;\n}\n\n// eslint-disable-next-line require-yield\nexport function* findPackageData(filepath: string): Handler<FilePackageData> {\n return {\n filepath,\n directories: [],\n pkg: null,\n isPackage: false,\n };\n}\n\n// eslint-disable-next-line require-yield\nexport function* findRelativeConfig(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n pkgData: FilePackageData,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler<RelativeConfig> {\n return { config: null, ignore: null };\n}\n\n// eslint-disable-next-line require-yield\nexport function* findRootConfig(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n dirname: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler<ConfigFile | null> {\n return null;\n}\n\n// eslint-disable-next-line require-yield\nexport function* loadConfig(\n name: string,\n dirname: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n envName: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n caller: CallerMetadata | undefined,\n): Handler<ConfigFile> {\n throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`);\n}\n\n// eslint-disable-next-line require-yield\nexport function* resolveShowConfigPath(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n dirname: string,\n): Handler<string | null> {\n return null;\n}\n\nexport const ROOT_CONFIG_FILENAMES: string[] = [];\n\ntype Resolved =\n | { loader: \"require\"; filepath: string }\n | { loader: \"import\"; filepath: string };\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function resolvePlugin(name: string, dirname: string): Resolved | null {\n return null;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function resolvePreset(name: string, dirname: string): Resolved | null {\n return null;\n}\n\nexport function loadPlugin(\n name: string,\n dirname: string,\n): Handler<{\n filepath: string;\n value: unknown;\n}> {\n throw new Error(\n `Cannot load plugin ${name} relative to ${dirname} in a browser`,\n );\n}\n\nexport function loadPreset(\n name: string,\n dirname: string,\n): Handler<{\n filepath: string;\n value: unknown;\n}> {\n throw new Error(\n `Cannot load preset ${name} relative to ${dirname} in a browser`,\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAeO,SAASA,iBAAiBA,CAE/BC,OAAe,EACA;EACf,OAAO,IAAI;AACb;AAGO,UAAUC,eAAeA,CAACC,QAAgB,EAA4B;EAC3E,OAAO;IACLA,QAAQ;IACRC,WAAW,EAAE,EAAE;IACfC,GAAG,EAAE,IAAI;IACTC,SAAS,EAAE;EACb,CAAC;AACH;AAGO,UAAUC,kBAAkBA,CAEjCC,OAAwB,EAExBC,OAAe,EAEfC,MAAkC,EACT;EACzB,OAAO;IAAEC,MAAM,EAAE,IAAI;IAAEC,MAAM,EAAE;EAAK,CAAC;AACvC;AAGO,UAAUC,cAAcA,CAE7BC,OAAe,EAEfL,OAAe,EAEfC,MAAkC,EACN;EAC5B,OAAO,IAAI;AACb;AAGO,UAAUK,UAAUA,CACzBC,IAAY,EACZF,OAAe,EAEfL,OAAe,EAEfC,MAAkC,EACb;EACrB,MAAM,IAAIO,KAAK,CAAC,eAAeD,IAAI,gBAAgBF,OAAO,eAAe,CAAC;AAC5E;AAGO,UAAUI,qBAAqBA,CAEpCJ,OAAe,EACS;EACxB,OAAO,IAAI;AACb;AAEO,MAAMK,qBAA+B,GAAAC,OAAA,CAAAD,qBAAA,GAAG,EAAE;AAO1C,SAASE,aAAaA,CAACL,IAAY,EAAEF,OAAe,EAAmB;EAC5E,OAAO,IAAI;AACb;AAGO,SAASQ,aAAaA,CAACN,IAAY,EAAEF,OAAe,EAAmB;EAC5E,OAAO,IAAI;AACb;AAEO,SAASS,UAAUA,CACxBP,IAAY,EACZF,OAAe,EAId;EACD,MAAM,IAAIG,KAAK,CACb,sBAAsBD,IAAI,gBAAgBF,OAAO,eACnD,CAAC;AACH;AAEO,SAASU,UAAUA,CACxBR,IAAY,EACZF,OAAe,EAId;EACD,MAAM,IAAIG,KAAK,CACb,sBAAsBD,IAAI,gBAAgBF,OAAO,eACnD,CAAC;AACH;AAAC","ignoreList":[]}
@@ -0,0 +1 @@
{"version":3,"file":"get-easing-for-segment.mjs","sources":["../../../../src/easing/utils/get-easing-for-segment.ts"],"sourcesContent":["import { wrap } from \"../../wrap\"\nimport { Easing } from \"../types\"\nimport { isEasingArray } from \"./is-easing-array\"\n\nexport function getEasingForSegment(\n easing: Easing | Easing[],\n i: number\n): Easing {\n return isEasingArray(easing) ? easing[wrap(0, easing.length, i)] : easing\n}\n"],"names":[],"mappings":";;;AAIM,SAAU,mBAAmB,CAC/B,MAAyB,EACzB,CAAS,EAAA;IAET,OAAO,aAAa,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM;AAC7E;;;;"}
@@ -0,0 +1 @@
{"version":3,"file":"package-open.js","sources":["../../../src/icons/package-open.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PackageOpen\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMjJ2LTkiIC8+CiAgPHBhdGggZD0iTTE1LjE3IDIuMjFhMS42NyAxLjY3IDAgMCAxIDEuNjMgMEwyMSA0LjU3YTEuOTMgMS45MyAwIDAgMSAwIDMuMzZMOC44MiAxNC43OWExLjY1NSAxLjY1NSAwIDAgMS0xLjY0IDBMMyAxMi40M2ExLjkzIDEuOTMgMCAwIDEgMC0zLjM2eiIgLz4KICA8cGF0aCBkPSJNMjAgMTN2My44N2EyLjA2IDIuMDYgMCAwIDEtMS4xMSAxLjgzbC02IDMuMDhhMS45MyAxLjkzIDAgMCAxLTEuNzggMGwtNi0zLjA4QTIuMDYgMi4wNiAwIDAgMSA0IDE2Ljg3VjEzIiAvPgogIDxwYXRoIGQ9Ik0yMSAxMi40M2ExLjkzIDEuOTMgMCAwIDAgMC0zLjM2TDguODMgMi4yYTEuNjQgMS42NCAwIDAgMC0xLjYzIDBMMyA0LjU3YTEuOTMgMS45MyAwIDAgMCAwIDMuMzZsMTIuMTggNi44NmExLjYzNiAxLjYzNiAwIDAgMCAxLjYzIDB6IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/package-open\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst PackageOpen = createLucideIcon('PackageOpen', [\n ['path', { d: 'M12 22v-9', key: 'x3hkom' }],\n [\n 'path',\n {\n d: 'M15.17 2.21a1.67 1.67 0 0 1 1.63 0L21 4.57a1.93 1.93 0 0 1 0 3.36L8.82 14.79a1.655 1.655 0 0 1-1.64 0L3 12.43a1.93 1.93 0 0 1 0-3.36z',\n key: '2ntwy6',\n },\n ],\n [\n 'path',\n {\n d: 'M20 13v3.87a2.06 2.06 0 0 1-1.11 1.83l-6 3.08a1.93 1.93 0 0 1-1.78 0l-6-3.08A2.06 2.06 0 0 1 4 16.87V13',\n key: '1pmm1c',\n },\n ],\n [\n 'path',\n {\n d: 'M21 12.43a1.93 1.93 0 0 0 0-3.36L8.83 2.2a1.64 1.64 0 0 0-1.63 0L3 4.57a1.93 1.93 0 0 0 0 3.36l12.18 6.86a1.636 1.636 0 0 0 1.63 0z',\n key: '12ttoo',\n },\n ],\n]);\n\nexport default PackageOpen;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAAA,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC1C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,Line truncated
@@ -0,0 +1,415 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _keywords = require('../parser/tokenizer/keywords');
var _types = require('../parser/tokenizer/types');
var _elideImportEquals = require('../util/elideImportEquals'); var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
var _getDeclarationInfo = require('../util/getDeclarationInfo'); var _getDeclarationInfo2 = _interopRequireDefault(_getDeclarationInfo);
var _getImportExportSpecifierInfo = require('../util/getImportExportSpecifierInfo'); var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
var _getNonTypeIdentifiers = require('../util/getNonTypeIdentifiers');
var _isExportFrom = require('../util/isExportFrom'); var _isExportFrom2 = _interopRequireDefault(_isExportFrom);
var _removeMaybeImportAttributes = require('../util/removeMaybeImportAttributes');
var _shouldElideDefaultExport = require('../util/shouldElideDefaultExport'); var _shouldElideDefaultExport2 = _interopRequireDefault(_shouldElideDefaultExport);
var _Transformer = require('./Transformer'); var _Transformer2 = _interopRequireDefault(_Transformer);
/**
* Class for editing import statements when we are keeping the code as ESM. We still need to remove
* type-only imports in TypeScript and Flow.
*/
class ESMImportTransformer extends _Transformer2.default {
constructor(
tokens,
nameManager,
helperManager,
reactHotLoaderTransformer,
isTypeScriptTransformEnabled,
isFlowTransformEnabled,
keepUnusedImports,
options,
) {
super();this.tokens = tokens;this.nameManager = nameManager;this.helperManager = helperManager;this.reactHotLoaderTransformer = reactHotLoaderTransformer;this.isTypeScriptTransformEnabled = isTypeScriptTransformEnabled;this.isFlowTransformEnabled = isFlowTransformEnabled;this.keepUnusedImports = keepUnusedImports;;
this.nonTypeIdentifiers =
isTypeScriptTransformEnabled && !keepUnusedImports
? _getNonTypeIdentifiers.getNonTypeIdentifiers.call(void 0, tokens, options)
: new Set();
this.declarationInfo =
isTypeScriptTransformEnabled && !keepUnusedImports
? _getDeclarationInfo2.default.call(void 0, tokens)
: _getDeclarationInfo.EMPTY_DECLARATION_INFO;
this.injectCreateRequireForImportRequire = Boolean(options.injectCreateRequireForImportRequire);
}
process() {
// TypeScript `import foo = require('foo');` should always just be translated to plain require.
if (this.tokens.matches3(_types.TokenType._import, _types.TokenType.name, _types.TokenType.eq)) {
return this.processImportEquals();
}
if (
this.tokens.matches4(_types.TokenType._import, _types.TokenType.name, _types.TokenType.name, _types.TokenType.eq) &&
this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 1, _keywords.ContextualKeyword._type)
) {
// import type T = require('T')
this.tokens.removeInitialToken();
// This construct is always exactly 8 tokens long, so remove the 7 remaining tokens.
for (let i = 0; i < 7; i++) {
this.tokens.removeToken();
}
return true;
}
if (this.tokens.matches2(_types.TokenType._export, _types.TokenType.eq)) {
this.tokens.replaceToken("module.exports");
return true;
}
if (
this.tokens.matches5(_types.TokenType._export, _types.TokenType._import, _types.TokenType.name, _types.TokenType.name, _types.TokenType.eq) &&
this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 2, _keywords.ContextualKeyword._type)
) {
// export import type T = require('T')
this.tokens.removeInitialToken();
// This construct is always exactly 9 tokens long, so remove the 8 remaining tokens.
for (let i = 0; i < 8; i++) {
this.tokens.removeToken();
}
return true;
}
if (this.tokens.matches1(_types.TokenType._import)) {
return this.processImport();
}
if (this.tokens.matches2(_types.TokenType._export, _types.TokenType._default)) {
return this.processExportDefault();
}
if (this.tokens.matches2(_types.TokenType._export, _types.TokenType.braceL)) {
return this.processNamedExports();
}
if (
this.tokens.matches2(_types.TokenType._export, _types.TokenType.name) &&
this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 1, _keywords.ContextualKeyword._type)
) {
// export type {a};
// export type {a as b};
// export type {a} from './b';
// export type * from './b';
// export type * as ns from './b';
this.tokens.removeInitialToken();
this.tokens.removeToken();
if (this.tokens.matches1(_types.TokenType.braceL)) {
while (!this.tokens.matches1(_types.TokenType.braceR)) {
this.tokens.removeToken();
}
this.tokens.removeToken();
} else {
// *
this.tokens.removeToken();
if (this.tokens.matches1(_types.TokenType._as)) {
// as
this.tokens.removeToken();
// ns
this.tokens.removeToken();
}
}
// Remove type re-export `... } from './T'`
if (
this.tokens.matchesContextual(_keywords.ContextualKeyword._from) &&
this.tokens.matches1AtIndex(this.tokens.currentIndex() + 1, _types.TokenType.string)
) {
this.tokens.removeToken();
this.tokens.removeToken();
_removeMaybeImportAttributes.removeMaybeImportAttributes.call(void 0, this.tokens);
}
return true;
}
return false;
}
processImportEquals() {
const importName = this.tokens.identifierNameAtIndex(this.tokens.currentIndex() + 1);
if (this.shouldAutomaticallyElideImportedName(importName)) {
// If this name is only used as a type, elide the whole import.
_elideImportEquals2.default.call(void 0, this.tokens);
} else if (this.injectCreateRequireForImportRequire) {
// We're using require in an environment (Node ESM) that doesn't provide
// it as a global, so generate a helper to import it.
// import -> const
this.tokens.replaceToken("const");
// Foo
this.tokens.copyToken();
// =
this.tokens.copyToken();
// require
this.tokens.replaceToken(this.helperManager.getHelperName("require"));
} else {
// Otherwise, just switch `import` to `const`.
this.tokens.replaceToken("const");
}
return true;
}
processImport() {
if (this.tokens.matches2(_types.TokenType._import, _types.TokenType.parenL)) {
// Dynamic imports don't need to be transformed.
return false;
}
const snapshot = this.tokens.snapshot();
const allImportsRemoved = this.removeImportTypeBindings();
if (allImportsRemoved) {
this.tokens.restoreToSnapshot(snapshot);
while (!this.tokens.matches1(_types.TokenType.string)) {
this.tokens.removeToken();
}
this.tokens.removeToken();
_removeMaybeImportAttributes.removeMaybeImportAttributes.call(void 0, this.tokens);
if (this.tokens.matches1(_types.TokenType.semi)) {
this.tokens.removeToken();
}
}
return true;
}
/**
* Remove type bindings from this import, leaving the rest of the import intact.
*
* Return true if this import was ONLY types, and thus is eligible for removal. This will bail out
* of the replacement operation, so we can return early here.
*/
removeImportTypeBindings() {
this.tokens.copyExpectedToken(_types.TokenType._import);
if (
this.tokens.matchesContextual(_keywords.ContextualKeyword._type) &&
!this.tokens.matches1AtIndex(this.tokens.currentIndex() + 1, _types.TokenType.comma) &&
!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 1, _keywords.ContextualKeyword._from)
) {
// This is an "import type" statement, so exit early.
return true;
}
if (this.tokens.matches1(_types.TokenType.string)) {
// This is a bare import, so we should proceed with the import.
this.tokens.copyToken();
return false;
}
// Skip the "module" token in import reflection.
if (
this.tokens.matchesContextual(_keywords.ContextualKeyword._module) &&
this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 2, _keywords.ContextualKeyword._from)
) {
this.tokens.copyToken();
}
let foundNonTypeImport = false;
let foundAnyNamedImport = false;
let needsComma = false;
// Handle default import.
if (this.tokens.matches1(_types.TokenType.name)) {
if (this.shouldAutomaticallyElideImportedName(this.tokens.identifierName())) {
this.tokens.removeToken();
if (this.tokens.matches1(_types.TokenType.comma)) {
this.tokens.removeToken();
}
} else {
foundNonTypeImport = true;
this.tokens.copyToken();
if (this.tokens.matches1(_types.TokenType.comma)) {
// We're in a statement like:
// import A, * as B from './A';
// or
// import A, {foo} from './A';
// where the `A` is being kept. The comma should be removed if an only
// if the next part of the import statement is elided, but that's hard
// to determine at this point in the code. Instead, always remove it
// and set a flag to add it back if necessary.
needsComma = true;
this.tokens.removeToken();
}
}
}
if (this.tokens.matches1(_types.TokenType.star)) {
if (this.shouldAutomaticallyElideImportedName(this.tokens.identifierNameAtRelativeIndex(2))) {
this.tokens.removeToken();
this.tokens.removeToken();
this.tokens.removeToken();
} else {
if (needsComma) {
this.tokens.appendCode(",");
}
foundNonTypeImport = true;
this.tokens.copyExpectedToken(_types.TokenType.star);
this.tokens.copyExpectedToken(_types.TokenType.name);
this.tokens.copyExpectedToken(_types.TokenType.name);
}
} else if (this.tokens.matches1(_types.TokenType.braceL)) {
if (needsComma) {
this.tokens.appendCode(",");
}
this.tokens.copyToken();
while (!this.tokens.matches1(_types.TokenType.braceR)) {
foundAnyNamedImport = true;
const specifierInfo = _getImportExportSpecifierInfo2.default.call(void 0, this.tokens);
if (
specifierInfo.isType ||
this.shouldAutomaticallyElideImportedName(specifierInfo.rightName)
) {
while (this.tokens.currentIndex() < specifierInfo.endIndex) {
this.tokens.removeToken();
}
if (this.tokens.matches1(_types.TokenType.comma)) {
this.tokens.removeToken();
}
} else {
foundNonTypeImport = true;
while (this.tokens.currentIndex() < specifierInfo.endIndex) {
this.tokens.copyToken();
}
if (this.tokens.matches1(_types.TokenType.comma)) {
this.tokens.copyToken();
}
}
}
this.tokens.copyExpectedToken(_types.TokenType.braceR);
}
if (this.keepUnusedImports) {
return false;
}
if (this.isTypeScriptTransformEnabled) {
return !foundNonTypeImport;
} else if (this.isFlowTransformEnabled) {
// In Flow, unlike TS, `import {} from 'foo';` preserves the import.
return foundAnyNamedImport && !foundNonTypeImport;
} else {
return false;
}
}
shouldAutomaticallyElideImportedName(name) {
return (
this.isTypeScriptTransformEnabled &&
!this.keepUnusedImports &&
!this.nonTypeIdentifiers.has(name)
);
}
processExportDefault() {
if (
_shouldElideDefaultExport2.default.call(void 0,
this.isTypeScriptTransformEnabled,
this.keepUnusedImports,
this.tokens,
this.declarationInfo,
)
) {
// If the exported value is just an identifier and should be elided by TypeScript
// rules, then remove it entirely. It will always have the form `export default e`,
// where `e` is an identifier.
this.tokens.removeInitialToken();
this.tokens.removeToken();
this.tokens.removeToken();
return true;
}
const alreadyHasName =
this.tokens.matches4(_types.TokenType._export, _types.TokenType._default, _types.TokenType._function, _types.TokenType.name) ||
// export default async function
(this.tokens.matches5(_types.TokenType._export, _types.TokenType._default, _types.TokenType.name, _types.TokenType._function, _types.TokenType.name) &&
this.tokens.matchesContextualAtIndex(
this.tokens.currentIndex() + 2,
_keywords.ContextualKeyword._async,
)) ||
this.tokens.matches4(_types.TokenType._export, _types.TokenType._default, _types.TokenType._class, _types.TokenType.name) ||
this.tokens.matches5(_types.TokenType._export, _types.TokenType._default, _types.TokenType._abstract, _types.TokenType._class, _types.TokenType.name);
if (!alreadyHasName && this.reactHotLoaderTransformer) {
// This is a plain "export default E" statement and we need to assign E to a variable.
// Change "export default E" to "let _default; export default _default = E"
const defaultVarName = this.nameManager.claimFreeName("_default");
this.tokens.replaceToken(`let ${defaultVarName}; export`);
this.tokens.copyToken();
this.tokens.appendCode(` ${defaultVarName} =`);
this.reactHotLoaderTransformer.setExtractedDefaultExportName(defaultVarName);
return true;
}
return false;
}
/**
* Handle a statement with one of these forms:
* export {a, type b};
* export {c, type d} from 'foo';
*
* In both cases, any explicit type exports should be removed. In the first
* case, we also need to handle implicit export elision for names declared as
* types. In the second case, we must NOT do implicit named export elision,
* but we must remove the runtime import if all exports are type exports.
*/
processNamedExports() {
if (!this.isTypeScriptTransformEnabled) {
return false;
}
this.tokens.copyExpectedToken(_types.TokenType._export);
this.tokens.copyExpectedToken(_types.TokenType.braceL);
const isReExport = _isExportFrom2.default.call(void 0, this.tokens);
let foundNonTypeExport = false;
while (!this.tokens.matches1(_types.TokenType.braceR)) {
const specifierInfo = _getImportExportSpecifierInfo2.default.call(void 0, this.tokens);
if (
specifierInfo.isType ||
(!isReExport && this.shouldElideExportedName(specifierInfo.leftName))
) {
// Type export, so remove all tokens, including any comma.
while (this.tokens.currentIndex() < specifierInfo.endIndex) {
this.tokens.removeToken();
}
if (this.tokens.matches1(_types.TokenType.comma)) {
this.tokens.removeToken();
}
} else {
// Non-type export, so copy all tokens, including any comma.
foundNonTypeExport = true;
while (this.tokens.currentIndex() < specifierInfo.endIndex) {
this.tokens.copyToken();
}
if (this.tokens.matches1(_types.TokenType.comma)) {
this.tokens.copyToken();
}
}
}
this.tokens.copyExpectedToken(_types.TokenType.braceR);
if (!this.keepUnusedImports && isReExport && !foundNonTypeExport) {
// This is a type-only re-export, so skip evaluating the other module. Technically this
// leaves the statement as `export {}`, but that's ok since that's a no-op.
this.tokens.removeToken();
this.tokens.removeToken();
_removeMaybeImportAttributes.removeMaybeImportAttributes.call(void 0, this.tokens);
}
return true;
}
/**
* ESM elides all imports with the rule that we only elide if we see that it's
* a type and never see it as a value. This is in contrast to CJS, which
* elides imports that are completely unknown.
*/
shouldElideExportedName(name) {
return (
this.isTypeScriptTransformEnabled &&
!this.keepUnusedImports &&
this.declarationInfo.typeDeclarations.has(name) &&
!this.declarationInfo.valueDeclarations.has(name)
);
}
} exports.default = ESMImportTransformer;
@@ -0,0 +1,132 @@
import * as React from "react";
import { flushSync } from "react-dom";
import { Virtualizer, elementScroll, observeElementOffset, observeElementRect, windowScroll, observeWindowOffset, observeWindowRect } from "@tanstack/virtual-core";
export * from "@tanstack/virtual-core";
const useIsomorphicLayoutEffect = typeof document !== "undefined" ? React.useLayoutEffect : React.useEffect;
function useVirtualizerBase({
useFlushSync = true,
directDomUpdates = false,
directDomUpdatesMode = "transform",
...options
}) {
const rerender = React.useReducer((x) => x + 1, 0)[1];
const directRef = React.useRef({
enabled: directDomUpdates,
mode: directDomUpdatesMode,
container: null,
lastSize: null,
// Keyed by the element itself so a remounted node (same key, new DOM
// node — e.g. when `enabled` is toggled off then on) is treated as fresh
// and gets its style written.
lastPositions: /* @__PURE__ */ new WeakMap(),
prevRange: null
});
directRef.current.enabled = directDomUpdates;
directRef.current.mode = directDomUpdatesMode;
const applyDirectStyles = (instance2) => {
const state = directRef.current;
if (!state.enabled || !state.container) return;
const totalSize = instance2.getTotalSize();
if (totalSize !== state.lastSize) {
state.lastSize = totalSize;
const sizeAxis = instance2.options.horizontal ? "width" : "height";
state.container.style[sizeAxis] = `${totalSize}px`;
}
const horizontal = !!instance2.options.horizontal;
const useTransform = state.mode === "transform";
const posAxis = horizontal ? "left" : "top";
const scrollMargin = instance2.options.scrollMargin;
const items = instance2.getVirtualItems();
for (const item of items) {
const next = item.start - scrollMargin;
const el = instance2.elementsCache.get(item.key);
if (!el) continue;
if (state.lastPositions.get(el) === next) continue;
state.lastPositions.set(el, next);
if (useTransform) {
el.style.transform = horizontal ? `translate3d(${next}px, 0, 0)` : `translate3d(0, ${next}px, 0)`;
} else {
el.style[posAxis] = `${next}px`;
}
}
};
const resolvedOptions = {
...options,
onChange: (instance2, sync) => {
var _a;
const state = directRef.current;
let shouldRerender = true;
if (state.enabled) {
applyDirectStyles(instance2);
const range = instance2.range;
const prev = state.prevRange;
shouldRerender = !prev || prev.isScrolling !== instance2.isScrolling || prev.startIndex !== (range == null ? void 0 : range.startIndex) || prev.endIndex !== (range == null ? void 0 : range.endIndex);
if (shouldRerender) {
state.prevRange = range ? {
startIndex: range.startIndex,
endIndex: range.endIndex,
isScrolling: instance2.isScrolling
} : null;
}
}
if (shouldRerender) {
if (useFlushSync && sync) {
flushSync(rerender);
} else {
rerender();
}
}
(_a = options.onChange) == null ? void 0 : _a.call(options, instance2, sync);
}
};
const [instance] = React.useState(() => {
const v = new Virtualizer(resolvedOptions);
return Object.assign(v, {
containerRef: (node) => {
const state = directRef.current;
state.container = node;
state.lastSize = null;
if (node && state.enabled) {
const total = v.getTotalSize();
state.lastSize = total;
const axis = v.options.horizontal ? "width" : "height";
node.style[axis] = `${total}px`;
}
}
});
});
instance.setOptions(resolvedOptions);
useIsomorphicLayoutEffect(() => {
return instance._didMount();
}, []);
useIsomorphicLayoutEffect(() => {
return instance._willUpdate();
});
useIsomorphicLayoutEffect(() => {
applyDirectStyles(instance);
});
return instance;
}
function useVirtualizer(options) {
return useVirtualizerBase({
observeElementRect,
observeElementOffset,
scrollToFn: elementScroll,
...options
});
}
function useWindowVirtualizer(options) {
return useVirtualizerBase({
getScrollElement: () => typeof document !== "undefined" ? window : null,
observeElementRect: observeWindowRect,
observeElementOffset: observeWindowOffset,
scrollToFn: windowScroll,
initialOffset: () => typeof document !== "undefined" ? window.scrollY : 0,
...options
});
}
export {
useVirtualizer,
useWindowVirtualizer
};
//# sourceMappingURL=index.js.map
@@ -0,0 +1,22 @@
import type {CodeKeywordDefinition, AnySchema} from "../../types"
import type {KeywordCxt} from "../../compile/validate"
import {alwaysValidSchema} from "../../compile/util"
const def: CodeKeywordDefinition = {
keyword: "allOf",
schemaType: "array",
code(cxt: KeywordCxt) {
const {gen, schema, it} = cxt
/* istanbul ignore if */
if (!Array.isArray(schema)) throw new Error("ajv implementation error")
const valid = gen.name("valid")
schema.forEach((sch: AnySchema, i: number) => {
if (alwaysValidSchema(it, sch)) return
const schCxt = cxt.subschema({keyword: "allOf", schemaProp: i}, valid)
cxt.ok(valid)
cxt.mergeEvaluated(schCxt)
})
},
}
export default def
@@ -0,0 +1,214 @@
import { LRUCache } from './lru-cache.js';
export declare const SEGMENT_TYPE_PATHNAME = 0;
export declare const SEGMENT_TYPE_PARAM = 1;
export declare const SEGMENT_TYPE_WILDCARD = 2;
export declare const SEGMENT_TYPE_OPTIONAL_PARAM = 3;
declare const SEGMENT_TYPE_INDEX = 4;
declare const SEGMENT_TYPE_PATHLESS = 5;
/**
* All the kinds of segments that can be present in a route path.
*/
export type SegmentKind = typeof SEGMENT_TYPE_PATHNAME | typeof SEGMENT_TYPE_PARAM | typeof SEGMENT_TYPE_WILDCARD | typeof SEGMENT_TYPE_OPTIONAL_PARAM;
/**
* All the kinds of segments that can be present in the segment tree.
*/
type ExtendedSegmentKind = SegmentKind | typeof SEGMENT_TYPE_INDEX | typeof SEGMENT_TYPE_PATHLESS;
type ParsedSegment = Uint16Array & {
/** segment type (0 = pathname, 1 = param, 2 = wildcard, 3 = optional param) */
0: SegmentKind;
/** index of the end of the prefix */
1: number;
/** index of the start of the value */
2: number;
/** index of the end of the value */
3: number;
/** index of the start of the suffix */
4: number;
/** index of the end of the segment */
5: number;
};
/**
* Populates the `output` array with the parsed representation of the given `segment` string.
*
* Usage:
* ```ts
* let output
* let cursor = 0
* while (cursor < path.length) {
* output = parseSegment(path, cursor, output)
* const end = output[5]
* cursor = end + 1
* ```
*
* `output` is stored outside to avoid allocations during repeated calls. It doesn't need to be typed
* or initialized, it will be done automatically.
*/
export declare function parseSegment(
/** The full path string containing the segment. */
path: string,
/** The starting index of the segment within the path. */
start: number,
/** A Uint16Array (length: 6) to populate with the parsed segment data. */
output?: Uint16Array): ParsedSegment;
type StaticSegmentNode<T extends RouteLike> = SegmentNode<T> & {
kind: typeof SEGMENT_TYPE_PATHNAME | typeof SEGMENT_TYPE_PATHLESS | typeof SEGMENT_TYPE_INDEX;
};
type DynamicSegmentNode<T extends RouteLike> = SegmentNode<T> & {
kind: typeof SEGMENT_TYPE_PARAM | typeof SEGMENT_TYPE_WILDCARD | typeof SEGMENT_TYPE_OPTIONAL_PARAM;
prefix?: string;
suffix?: string;
caseSensitive: boolean;
};
type AnySegmentNode<T extends RouteLike> = StaticSegmentNode<T> | DynamicSegmentNode<T>;
type SegmentNode<T extends RouteLike> = {
kind: ExtendedSegmentKind;
pathless: Array<StaticSegmentNode<T>> | null;
/** Exact index segment (highest priority) */
index: StaticSegmentNode<T> | null;
/** Static segments (2nd priority) */
static: Map<string, StaticSegmentNode<T>> | null;
/** Case insensitive static segments (3rd highest priority) */
staticInsensitive: Map<string, StaticSegmentNode<T>> | null;
/** Dynamic segments ($param) */
dynamic: Array<DynamicSegmentNode<T>> | null;
/** Optional dynamic segments ({-$param}) */
optional: Array<DynamicSegmentNode<T>> | null;
/** Wildcard segments ($ - lowest priority) */
wildcard: Array<DynamicSegmentNode<T>> | null;
/** Terminal route (if this path can end here) */
route: T | null;
/** The full path for this segment node (will only be valid on leaf nodes) */
fullPath: string;
parent: AnySegmentNode<T> | null;
depth: number;
/** route.options.params.parse function, set on the last node of the route */
parse: null | ((params: Record<string, string>) => unknown);
};
type RouteLike = {
id?: string;
path?: string;
children?: Array<RouteLike>;
parentRoute?: RouteLike;
isRoot?: boolean;
options?: {
caseSensitive?: boolean;
parseParams?: (params: Record<string, string>) => unknown;
params?: {
parse?: (params: Record<string, string>) => unknown;
};
};
} & ({
fullPath: string;
from?: never;
} | {
fullPath?: never;
from: string;
});
export type ProcessedTree<TTree extends Extract<RouteLike, {
fullPath: string;
}>, TFlat extends Extract<RouteLike, {
from: string;
}>, TSingle extends Extract<RouteLike, {
from: string;
}>> = {
/** a representation of the `routeTree` as a segment tree */
segmentTree: AnySegmentNode<TTree>;
/** a mini route tree generated from the flat `routeMasks` list */
masksTree: AnySegmentNode<TFlat> | null;
/** @deprecated keep until v2 so that `router.matchRoute` can keep not caring about the actual route tree */
singleCache: LRUCache<string, AnySegmentNode<TSingle>>;
/** a cache of route matches from the `segmentTree` */
matchCache: LRUCache<string, RouteMatch<TTree> | null>;
/** a cache of route matches from the `masksTree` */
flatCache: LRUCache<string, ReturnType<typeof findMatch<TFlat>>> | null;
};
export declare function processRouteMasks<TRouteLike extends Extract<RouteLike, {
from: string;
}>>(routeList: Array<TRouteLike>, processedTree: ProcessedTree<any, TRouteLike, any>): void;
/**
* Take an arbitrary list of routes, create a tree from them (if it hasn't been created already), and match a path against it.
*/
export declare function findFlatMatch<T extends Extract<RouteLike, {
from: string;
}>>(
/** The path to match. */
path: string,
/** The `processedTree` returned by the initial `processRouteTree` call. */
processedTree: ProcessedTree<any, T, any>): {
route: T;
/**
* The raw (unparsed) params extracted from the path.
* This will be the exhaustive list of all params defined in the route's path.
*/
rawParams: Record<string, string>;
} | null;
/**
* @deprecated keep until v2 so that `router.matchRoute` can keep not caring about the actual route tree
*/
export declare function findSingleMatch(from: string, caseSensitive: boolean, fuzzy: boolean, path: string, processedTree: ProcessedTree<any, any, {
from: string;
}>): {
route: {
from: string;
};
/**
* The raw (unparsed) params extracted from the path.
* This will be the exhaustive list of all params defined in the route's path.
*/
rawParams: Record<string, string>;
} | null;
type RouteMatch<T extends Extract<RouteLike, {
fullPath: string;
}>> = {
route: T;
rawParams: Record<string, string>;
branch: ReadonlyArray<T>;
};
export declare function findRouteMatch<T extends Extract<RouteLike, {
fullPath: string;
}>>(
/** The path to match against the route tree. */
path: string,
/** The `processedTree` returned by the initial `processRouteTree` call. */
processedTree: ProcessedTree<T, any, any>,
/** If `true`, allows fuzzy matching (partial matches), i.e. which node in the tree would have been an exact match if the `path` had been shorter? */
fuzzy?: boolean): RouteMatch<T> | null;
/** Trim trailing slashes (except preserving root '/'). */
export declare function trimPathRight(path: string): string;
export interface ProcessRouteTreeResult<TRouteLike extends Extract<RouteLike, {
fullPath: string;
}> & {
id: string;
}> {
/** Should be considered a black box, needs to be provided to all matching functions in this module. */
processedTree: ProcessedTree<TRouteLike, any, any>;
/** A lookup map of routes by their unique IDs. */
routesById: Record<string, TRouteLike>;
/** A lookup map of routes by their trimmed full paths. */
routesByPath: Record<string, TRouteLike>;
}
/**
* Processes a route tree into a segment trie for efficient path matching.
* Also builds lookup maps for routes by ID and by trimmed full path.
*/
export declare function processRouteTree<TRouteLike extends Extract<RouteLike, {
fullPath: string;
}> & {
id: string;
}>(
/** The root of the route tree to process. */
routeTree: TRouteLike,
/** Whether matching should be case sensitive by default (overridden by individual route options). */
caseSensitive?: boolean,
/** Optional callback invoked for each route during processing. */
initRoute?: (route: TRouteLike, index: number) => void): ProcessRouteTreeResult<TRouteLike>;
declare function findMatch<T extends RouteLike>(path: string, segmentTree: AnySegmentNode<T>, fuzzy?: boolean): {
route: T;
/**
* The raw (unparsed) params extracted from the path.
* This will be the exhaustive list of all params defined in the route's path.
*/
rawParams: Record<string, string>;
} | null;
export declare function buildRouteBranch<T extends RouteLike>(route: T): T[];
export {};
@@ -0,0 +1,86 @@
import { P as isDecimalInteger, d as safeReplaceTextBetween, f as createRule, g as import_ast_utils } from "../utils.js";
var no_whitespace_before_property_default = createRule({
name: "no-whitespace-before-property",
meta: {
type: "layout",
docs: { description: "Disallow whitespace before properties" },
fixable: "whitespace",
schema: [],
messages: { unexpectedWhitespace: "Unexpected whitespace before property {{propName}}." }
},
create(context) {
const sourceCode = context.sourceCode;
function reportError(descriptor) {
const { node, leftToken, rightToken, propName, replacementText = "", preventAutoFix } = descriptor;
context.report({
node,
messageId: "unexpectedWhitespace",
data: { propName },
fix: preventAutoFix?.() ? null : safeReplaceTextBetween(sourceCode, leftToken, rightToken, replacementText)
});
}
return {
MemberExpression(node) {
if (!(0, import_ast_utils.isTokenOnSameLine)(node.object, node.property)) return;
let rightToken;
let leftToken;
if (node.computed) {
rightToken = sourceCode.getTokenBefore(node.property, import_ast_utils.isOpeningBracketToken);
leftToken = sourceCode.getTokenBefore(rightToken, node.optional ? 1 : 0);
} else {
rightToken = sourceCode.getFirstToken(node.property);
leftToken = sourceCode.getTokenBefore(rightToken, 1);
}
if (!sourceCode.isSpaceBetween(leftToken, rightToken)) return;
let replacementText = "";
if (node.optional) replacementText = "?.";
else if (!node.computed) replacementText = ".";
reportError({
node,
leftToken,
rightToken,
propName: sourceCode.getText(node.property),
replacementText,
preventAutoFix: () => !node.computed && !node.optional && isDecimalInteger(node.object)
});
},
TSIndexedAccessType(node) {
const rightToken = sourceCode.getTokenBefore(node.indexType, import_ast_utils.isOpeningBracketToken);
const leftToken = sourceCode.getTokenBefore(rightToken);
if (!sourceCode.isSpaceBetween(leftToken, rightToken)) return;
reportError({
node,
leftToken,
rightToken,
propName: sourceCode.getText(node.indexType)
});
},
TSQualifiedName(node) {
const leftToken = node.left;
const rightToken = node.right;
if (!sourceCode.isSpaceBetween(leftToken, rightToken)) return;
reportError({
node,
leftToken,
rightToken,
replacementText: ".",
propName: sourceCode.getText(node.right)
});
},
TSImportType(node) {
if (!node.qualifier) return;
const rightToken = node.qualifier;
const leftToken = sourceCode.getTokenBefore(rightToken, 1);
if (!sourceCode.isSpaceBetween(leftToken, rightToken)) return;
reportError({
node,
leftToken,
rightToken,
replacementText: ".",
propName: sourceCode.getText(node.qualifier)
});
}
};
}
});
export { no_whitespace_before_property_default as t };
@@ -0,0 +1,12 @@
# istanbul-reports
[![Build Status](https://travis-ci.org/istanbuljs/istanbul-reports.svg?branch=main)](https://travis-ci.org/istanbuljs/istanbul-reports)
- node.getRelativeName
- context.getSource(filePath)
- context.classForPercent(type, percent)
- context.console.colorize(str, class)
- context.writer
- context.console.write
- context.console.println
@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const SquareTerminal = createLucideIcon("SquareTerminal", [
["path", { d: "m7 11 2-2-2-2", key: "1lz0vl" }],
["path", { d: "M11 13h4", key: "1p7l4v" }],
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }]
]);
export { SquareTerminal as default };
//# sourceMappingURL=square-terminal.js.map
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=index.js.map
@@ -0,0 +1,175 @@
const require_auth = require('./auth-D1CeV_Jr.cjs');
exports.AnnotationsSchema = require_auth.AnnotationsSchema;
exports.AudioContentSchema = require_auth.AudioContentSchema;
exports.BaseMetadataSchema = require_auth.BaseMetadataSchema;
exports.BlobResourceContentsSchema = require_auth.BlobResourceContentsSchema;
exports.BooleanSchemaSchema = require_auth.BooleanSchemaSchema;
exports.CallToolRequestParamsSchema = require_auth.CallToolRequestParamsSchema;
exports.CallToolRequestSchema = require_auth.CallToolRequestSchema;
exports.CallToolResultSchema = require_auth.CallToolResultSchema;
exports.CancelTaskRequestSchema = require_auth.CancelTaskRequestSchema;
exports.CancelTaskResultSchema = require_auth.CancelTaskResultSchema;
exports.CancelledNotificationParamsSchema = require_auth.CancelledNotificationParamsSchema;
exports.CancelledNotificationSchema = require_auth.CancelledNotificationSchema;
exports.ClientCapabilitiesSchema = require_auth.ClientCapabilitiesSchema;
exports.ClientNotificationSchema = require_auth.ClientNotificationSchema;
exports.ClientRequestSchema = require_auth.ClientRequestSchema;
exports.ClientResultSchema = require_auth.ClientResultSchema;
exports.CompatibilityCallToolResultSchema = require_auth.CompatibilityCallToolResultSchema;
exports.CompleteRequestParamsSchema = require_auth.CompleteRequestParamsSchema;
exports.CompleteRequestSchema = require_auth.CompleteRequestSchema;
exports.CompleteResultSchema = require_auth.CompleteResultSchema;
exports.ContentBlockSchema = require_auth.ContentBlockSchema;
exports.CreateMessageRequestParamsSchema = require_auth.CreateMessageRequestParamsSchema;
exports.CreateMessageRequestSchema = require_auth.CreateMessageRequestSchema;
exports.CreateMessageResultSchema = require_auth.CreateMessageResultSchema;
exports.CreateMessageResultWithToolsSchema = require_auth.CreateMessageResultWithToolsSchema;
exports.CreateTaskResultSchema = require_auth.CreateTaskResultSchema;
exports.CursorSchema = require_auth.CursorSchema;
exports.DiscoverRequestSchema = require_auth.DiscoverRequestSchema;
exports.DiscoverResultSchema = require_auth.DiscoverResultSchema;
exports.ElicitRequestFormParamsSchema = require_auth.ElicitRequestFormParamsSchema;
exports.ElicitRequestParamsSchema = require_auth.ElicitRequestParamsSchema;
exports.ElicitRequestSchema = require_auth.ElicitRequestSchema;
exports.ElicitRequestURLParamsSchema = require_auth.ElicitRequestURLParamsSchema;
exports.ElicitResultSchema = require_auth.ElicitResultSchema;
exports.ElicitationCompleteNotificationParamsSchema = require_auth.ElicitationCompleteNotificationParamsSchema;
exports.ElicitationCompleteNotificationSchema = require_auth.ElicitationCompleteNotificationSchema;
exports.EmbeddedResourceSchema = require_auth.EmbeddedResourceSchema;
exports.EmptyResultSchema = require_auth.EmptyResultSchema;
exports.EnumSchemaSchema = require_auth.EnumSchemaSchema;
exports.GetPromptRequestParamsSchema = require_auth.GetPromptRequestParamsSchema;
exports.GetPromptRequestSchema = require_auth.GetPromptRequestSchema;
exports.GetPromptResultSchema = require_auth.GetPromptResultSchema;
exports.GetTaskPayloadRequestSchema = require_auth.GetTaskPayloadRequestSchema;
exports.GetTaskPayloadResultSchema = require_auth.GetTaskPayloadResultSchema;
exports.GetTaskRequestSchema = require_auth.GetTaskRequestSchema;
exports.GetTaskResultSchema = require_auth.GetTaskResultSchema;
exports.IconSchema = require_auth.IconSchema;
exports.IconsSchema = require_auth.IconsSchema;
exports.IdJagTokenExchangeResponseSchema = require_auth.IdJagTokenExchangeResponseSchema;
exports.ImageContentSchema = require_auth.ImageContentSchema;
exports.ImplementationSchema = require_auth.ImplementationSchema;
exports.InitializeRequestParamsSchema = require_auth.InitializeRequestParamsSchema;
exports.InitializeRequestSchema = require_auth.InitializeRequestSchema;
exports.InitializeResultSchema = require_auth.InitializeResultSchema;
exports.InitializedNotificationSchema = require_auth.InitializedNotificationSchema;
exports.JSONArraySchema = require_auth.JSONArraySchema;
exports.JSONObjectSchema = require_auth.JSONObjectSchema;
exports.JSONRPCErrorResponseSchema = require_auth.JSONRPCErrorResponseSchema;
exports.JSONRPCMessageSchema = require_auth.JSONRPCMessageSchema;
exports.JSONRPCNotificationSchema = require_auth.JSONRPCNotificationSchema;
exports.JSONRPCRequestSchema = require_auth.JSONRPCRequestSchema;
exports.JSONRPCResponseSchema = require_auth.JSONRPCResponseSchema;
exports.JSONRPCResultResponseSchema = require_auth.JSONRPCResultResponseSchema;
exports.JSONValueSchema = require_auth.JSONValueSchema;
exports.LegacyTitledEnumSchemaSchema = require_auth.LegacyTitledEnumSchemaSchema;
exports.ListPromptsRequestSchema = require_auth.ListPromptsRequestSchema;
exports.ListPromptsResultSchema = require_auth.ListPromptsResultSchema;
exports.ListResourceTemplatesRequestSchema = require_auth.ListResourceTemplatesRequestSchema;
exports.ListResourceTemplatesResultSchema = require_auth.ListResourceTemplatesResultSchema;
exports.ListResourcesRequestSchema = require_auth.ListResourcesRequestSchema;
exports.ListResourcesResultSchema = require_auth.ListResourcesResultSchema;
exports.ListRootsRequestSchema = require_auth.ListRootsRequestSchema;
exports.ListRootsResultSchema = require_auth.ListRootsResultSchema;
exports.ListTasksRequestSchema = require_auth.ListTasksRequestSchema;
exports.ListTasksResultSchema = require_auth.ListTasksResultSchema;
exports.ListToolsRequestSchema = require_auth.ListToolsRequestSchema;
exports.ListToolsResultSchema = require_auth.ListToolsResultSchema;
exports.LoggingLevelSchema = require_auth.LoggingLevelSchema;
exports.LoggingMessageNotificationParamsSchema = require_auth.LoggingMessageNotificationParamsSchema;
exports.LoggingMessageNotificationSchema = require_auth.LoggingMessageNotificationSchema;
exports.ModelHintSchema = require_auth.ModelHintSchema;
exports.ModelPreferencesSchema = require_auth.ModelPreferencesSchema;
exports.MultiSelectEnumSchemaSchema = require_auth.MultiSelectEnumSchemaSchema;
exports.NotificationSchema = require_auth.NotificationSchema;
exports.NumberSchemaSchema = require_auth.NumberSchemaSchema;
exports.OAuthClientInformationFullSchema = require_auth.OAuthClientInformationFullSchema;
exports.OAuthClientInformationSchema = require_auth.OAuthClientInformationSchema;
exports.OAuthClientMetadataSchema = require_auth.OAuthClientMetadataSchema;
exports.OAuthClientRegistrationErrorSchema = require_auth.OAuthClientRegistrationErrorSchema;
exports.OAuthErrorResponseSchema = require_auth.OAuthErrorResponseSchema;
exports.OAuthMetadataSchema = require_auth.OAuthMetadataSchema;
exports.OAuthProtectedResourceMetadataSchema = require_auth.OAuthProtectedResourceMetadataSchema;
exports.OAuthTokenRevocationRequestSchema = require_auth.OAuthTokenRevocationRequestSchema;
exports.OAuthTokensSchema = require_auth.OAuthTokensSchema;
exports.OpenIdProviderDiscoveryMetadataSchema = require_auth.OpenIdProviderDiscoveryMetadataSchema;
exports.OpenIdProviderMetadataSchema = require_auth.OpenIdProviderMetadataSchema;
exports.PaginatedRequestParamsSchema = require_auth.PaginatedRequestParamsSchema;
exports.PaginatedRequestSchema = require_auth.PaginatedRequestSchema;
exports.PaginatedResultSchema = require_auth.PaginatedResultSchema;
exports.PingRequestSchema = require_auth.PingRequestSchema;
exports.PrimitiveSchemaDefinitionSchema = require_auth.PrimitiveSchemaDefinitionSchema;
exports.ProgressNotificationParamsSchema = require_auth.ProgressNotificationParamsSchema;
exports.ProgressNotificationSchema = require_auth.ProgressNotificationSchema;
exports.ProgressSchema = require_auth.ProgressSchema;
exports.ProgressTokenSchema = require_auth.ProgressTokenSchema;
exports.PromptArgumentSchema = require_auth.PromptArgumentSchema;
exports.PromptListChangedNotificationSchema = require_auth.PromptListChangedNotificationSchema;
exports.PromptMessageSchema = require_auth.PromptMessageSchema;
exports.PromptReferenceSchema = require_auth.PromptReferenceSchema;
exports.PromptSchema = require_auth.PromptSchema;
exports.ReadResourceRequestParamsSchema = require_auth.ReadResourceRequestParamsSchema;
exports.ReadResourceRequestSchema = require_auth.ReadResourceRequestSchema;
exports.ReadResourceResultSchema = require_auth.ReadResourceResultSchema;
exports.RelatedTaskMetadataSchema = require_auth.RelatedTaskMetadataSchema;
exports.RequestIdSchema = require_auth.RequestIdSchema;
exports.RequestMetaSchema = require_auth.RequestMetaSchema;
exports.RequestSchema = require_auth.RequestSchema;
exports.ResourceContentsSchema = require_auth.ResourceContentsSchema;
exports.ResourceLinkSchema = require_auth.ResourceLinkSchema;
exports.ResourceListChangedNotificationSchema = require_auth.ResourceListChangedNotificationSchema;
exports.ResourceRequestParamsSchema = require_auth.ResourceRequestParamsSchema;
exports.ResourceSchema = require_auth.ResourceSchema;
exports.ResourceTemplateReferenceSchema = require_auth.ResourceTemplateReferenceSchema;
exports.ResourceTemplateSchema = require_auth.ResourceTemplateSchema;
exports.ResourceUpdatedNotificationParamsSchema = require_auth.ResourceUpdatedNotificationParamsSchema;
exports.ResourceUpdatedNotificationSchema = require_auth.ResourceUpdatedNotificationSchema;
exports.ResultMetaObjectSchema = require_auth.ResultMetaObjectSchema;
exports.ResultSchema = require_auth.ResultSchema;
exports.RoleSchema = require_auth.RoleSchema;
exports.RootSchema = require_auth.RootSchema;
exports.RootsListChangedNotificationSchema = require_auth.RootsListChangedNotificationSchema;
exports.SamplingContentSchema = require_auth.SamplingContentSchema;
exports.SamplingMessageContentBlockSchema = require_auth.SamplingMessageContentBlockSchema;
exports.SamplingMessageSchema = require_auth.SamplingMessageSchema;
exports.ServerCapabilitiesSchema = require_auth.ServerCapabilitiesSchema;
exports.ServerNotificationSchema = require_auth.ServerNotificationSchema;
exports.ServerRequestSchema = require_auth.ServerRequestSchema;
exports.ServerResultSchema = require_auth.ServerResultSchema;
exports.SetLevelRequestParamsSchema = require_auth.SetLevelRequestParamsSchema;
exports.SetLevelRequestSchema = require_auth.SetLevelRequestSchema;
exports.SingleSelectEnumSchemaSchema = require_auth.SingleSelectEnumSchemaSchema;
exports.StringSchemaSchema = require_auth.StringSchemaSchema;
exports.SubscribeRequestParamsSchema = require_auth.SubscribeRequestParamsSchema;
exports.SubscribeRequestSchema = require_auth.SubscribeRequestSchema;
exports.SubscriptionFilterSchema = require_auth.SubscriptionFilterSchema;
exports.SubscriptionsAcknowledgedNotificationParamsSchema = require_auth.SubscriptionsAcknowledgedNotificationParamsSchema;
exports.SubscriptionsAcknowledgedNotificationSchema = require_auth.SubscriptionsAcknowledgedNotificationSchema;
exports.SubscriptionsListenRequestParamsSchema = require_auth.SubscriptionsListenRequestParamsSchema;
exports.SubscriptionsListenRequestSchema = require_auth.SubscriptionsListenRequestSchema;
exports.SubscriptionsListenResultMetaSchema = require_auth.SubscriptionsListenResultMetaSchema;
exports.SubscriptionsListenResultSchema = require_auth.SubscriptionsListenResultSchema;
exports.TaskAugmentedRequestParamsSchema = require_auth.TaskAugmentedRequestParamsSchema;
exports.TaskCreationParamsSchema = require_auth.TaskCreationParamsSchema;
exports.TaskMetadataSchema = require_auth.TaskMetadataSchema;
exports.TaskSchema = require_auth.TaskSchema;
exports.TaskStatusNotificationParamsSchema = require_auth.TaskStatusNotificationParamsSchema;
exports.TaskStatusNotificationSchema = require_auth.TaskStatusNotificationSchema;
exports.TaskStatusSchema = require_auth.TaskStatusSchema;
exports.TextContentSchema = require_auth.TextContentSchema;
exports.TextResourceContentsSchema = require_auth.TextResourceContentsSchema;
exports.TitledMultiSelectEnumSchemaSchema = require_auth.TitledMultiSelectEnumSchemaSchema;
exports.TitledSingleSelectEnumSchemaSchema = require_auth.TitledSingleSelectEnumSchemaSchema;
exports.ToolAnnotationsSchema = require_auth.ToolAnnotationsSchema;
exports.ToolChoiceSchema = require_auth.ToolChoiceSchema;
exports.ToolExecutionSchema = require_auth.ToolExecutionSchema;
exports.ToolListChangedNotificationSchema = require_auth.ToolListChangedNotificationSchema;
exports.ToolResultContentSchema = require_auth.ToolResultContentSchema;
exports.ToolSchema = require_auth.ToolSchema;
exports.ToolUseContentSchema = require_auth.ToolUseContentSchema;
exports.UnsubscribeRequestParamsSchema = require_auth.UnsubscribeRequestParamsSchema;
exports.UnsubscribeRequestSchema = require_auth.UnsubscribeRequestSchema;
exports.UntitledMultiSelectEnumSchemaSchema = require_auth.UntitledMultiSelectEnumSchemaSchema;
exports.UntitledSingleSelectEnumSchemaSchema = require_auth.UntitledSingleSelectEnumSchemaSchema;
@@ -0,0 +1,43 @@
'use strict'
const { Transform } = require('node:stream')
const { Console } = require('node:console')
const PERSISTENT = process.versions.icu ? '✅' : 'Y '
const NOT_PERSISTENT = process.versions.icu ? '❌' : 'N '
/**
* Gets the output of `console.table(…)` as a string.
*/
module.exports = class PendingInterceptorsFormatter {
constructor ({ disableColors } = {}) {
this.transform = new Transform({
transform (chunk, _enc, cb) {
cb(null, chunk)
}
})
this.logger = new Console({
stdout: this.transform,
inspectOptions: {
colors: !disableColors && !process.env.CI
}
})
}
format (pendingInterceptors) {
const withPrettyHeaders = pendingInterceptors.map(
({ method, path, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
Method: method,
Origin: origin,
Path: path,
'Status code': statusCode,
Persistent: persist ? PERSISTENT : NOT_PERSISTENT,
Invocations: timesInvoked,
Remaining: persist ? Infinity : times - timesInvoked
}))
this.logger.table(withPrettyHeaders)
return this.transform.read().toString()
}
}
@@ -0,0 +1,125 @@
import * as util from "../core/util.js";
const error = () => {
const Sizable = {
string: { unit: "символа", verb: "да съдържа" },
file: { unit: "байта", verb: "да съдържа" },
array: { unit: "елемента", verb: "да съдържа" },
set: { unit: "елемента", verb: "да съдържа" },
map: { unit: "елемента", verb: "да съдържа" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const FormatDictionary = {
regex: "вход",
email: "имейл адрес",
url: "URL",
emoji: "емоджи",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO време",
date: "ISO дата",
time: "ISO време",
duration: "ISO продължителност",
ipv4: "IPv4 адрес",
ipv6: "IPv6 адрес",
mac: "MAC адрес",
cidrv4: "IPv4 диапазон",
cidrv6: "IPv6 диапазон",
base64: "base64-кодиран низ",
base64url: "base64url-кодиран низ",
json_string: "JSON низ",
e164: "E.164 номер",
credit_card: "номер на кредитна карта",
currency_code: "код на валута",
iban: "IBAN",
jwt: "JWT",
template_literal: "вход",
};
const TypeDictionary = {
nan: "NaN",
number: "число",
array: "масив",
};
return (issue) => {
switch (issue.code) {
case "invalid_type": {
const expected = TypeDictionary[issue.expected] ?? issue.expected;
const receivedType = util.parsedType(issue.input);
const received = TypeDictionary[receivedType] ?? receivedType;
if (/^[A-Z]/.test(issue.expected)) {
return `Невалиден вход: очакван instanceof ${issue.expected}, получен ${received}`;
}
return `Невалиден вход: очакван ${expected}, получен ${received}`;
}
case "invalid_value":
if (issue.values.length === 1)
return `Невалиден вход: очакван ${util.stringifyPrimitive(issue.values[0])}`;
return `Невалидна опция: очаквано едно от ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Твърде голямо: очаква се ${issue.origin ?? "стойност"} да съдържа ${adj}${issue.maximum.toString()} ${sizing.unit ?? "елемента"}`;
return `Твърде голямо: очаква се ${issue.origin ?? "стойност"} да бъде ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Твърде малко: очаква се ${issue.origin} да съдържа ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Твърде малко: очаква се ${issue.origin} да бъде ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with") {
return `Невалиден низ: трябва да започва с "${_issue.prefix}"`;
}
if (_issue.format === "ends_with")
return `Невалиден низ: трябва да завършва с "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Невалиден низ: трябва да включва "${_issue.includes}"`;
if (_issue.format === "regex")
return `Невалиден низ: трябва да съвпада с ${_issue.pattern}`;
let invalid_adj = "Невалиден";
if (_issue.format === "emoji")
invalid_adj = "Невалидно";
if (_issue.format === "datetime")
invalid_adj = "Невалидно";
if (_issue.format === "date")
invalid_adj = "Невалидна";
if (_issue.format === "time")
invalid_adj = "Невалидно";
if (_issue.format === "duration")
invalid_adj = "Невалидна";
return `${invalid_adj} ${FormatDictionary[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Невалидно число: трябва да бъде кратно на ${issue.divisor}`;
case "unrecognized_keys":
return `Неразпознат${issue.keys.length > 1 ? "и" : ""} ключ${issue.keys.length > 1 ? "ове" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Невалиден ключ в ${issue.origin}`;
case "invalid_union":
return "Невалиден вход";
case "invalid_element":
return `Невалидна стойност в ${issue.origin}`;
default:
return `Невалиден вход`;
}
};
};
export default function () {
return {
localeError: error(),
};
}
@@ -0,0 +1,62 @@
var Bl=Object.create;var Qr=Object.defineProperty;var Ul=Object.getOwnPropertyDescriptor;var Fl=Object.getOwnPropertyNames;var Wl=Object.getPrototypeOf,$l=Object.prototype.hasOwnProperty;var w=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(s){throw e=0,s}},hn=(t,e)=>{for(var s in e)Qr(t,s,{get:e[s],enumerable:!0})},Gl=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Fl(e))!$l.call(t,n)&&n!==s&&Qr(t,n,{get:()=>e[n],enumerable:!(r=Ul(e,n))||r.enumerable});return t};var Ne=(t,e,s)=>(s=t!=null?Bl(Wl(t)):{},Gl(e||!t||!t.__esModule?Qr(s,"default",{value:t,enumerable:!0}):s,t));var Yi=w((Bx,ms)=>{var _=String,Gi=function(){return{isColorSupported:!1,reset:_,bold:_,dim:_,italic:_,underline:_,inverse:_,hidden:_,strikethrough:_,black:_,red:_,green:_,yellow:_,blue:_,magenta:_,cyan:_,white:_,gray:_,bgBlack:_,bgRed:_,bgGreen:_,bgYellow:_,bgBlue:_,bgMagenta:_,bgCyan:_,bgWhite:_,blackBright:_,redBright:_,greenBright:_,yellowBright:_,blueBright:_,magentaBright:_,cyanBright:_,whiteBright:_,bgBlackBright:_,bgRedBright:_,bgGreenBright:_,bgYellowBright:_,bgBlueBright:_,bgMagentaBright:_,bgCyanBright:_,bgWhiteBright:_}};ms.exports=Gi();ms.exports.createColors=Gi});var ds=w(()=>{});var Kt=w((Wx,ji)=>{"use strict";var Vi=Yi(),zi=ds(),ot=class t extends Error{constructor(e,s,r,n,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),typeof s<"u"&&typeof r<"u"&&(typeof s=="number"?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let s=this.source;e==null&&(e=Vi.isColorSupported);let r=f=>f,n=f=>f,i=f=>f;if(e){let{bold:f,gray:h,red:l}=Vi.createColors(!0);n=d=>f(l(d)),r=d=>h(d),zi&&(i=d=>zi(d))}let o=s.split(/\r?\n/),u=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),c=String(a).length;return o.slice(u,a).map((f,h)=>{let l=u+1+h,d=" "+(" "+l).slice(-c)+" | ";if(l===this.line){if(f.length>160){let m=20,p=Math.max(0,this.column-m),y=Math.max(this.column+m,this.endColumn+m),g=f.slice(p,y),v=r(d.replace(/\d/g," "))+f.slice(0,Math.min(this.column-1,m-1)).replace(/[^\t]/g," ");return n(">")+r(d)+i(g)+`
`+v+n("^")}let x=r(d.replace(/\d/g," "))+f.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+r(d)+i(f)+`
`+x+n("^")}return" "+r(d)+i(f)}).join(`
`)}toString(){let e=this.showSourceCode();return e&&(e=`
`+e+`
`),this.name+": "+this.message+e}};ji.exports=ot;ot.default=ot});var Xt=w(($x,Qi)=>{"use strict";var Zc=/(<)(\/?style\b)/gi,ef=/(<)(!--)/g;function fe(t){return typeof t!="string"||!t.includes("<")?t:t.replace(Zc,"\\3c $2").replace(ef,"\\3c $2")}var Hi={after:`
`,beforeClose:`
`,beforeComment:`
`,beforeDecl:`
`,beforeOpen:" ",beforeRule:`
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function tf(t){return t[0].toUpperCase()+t.slice(1)}var at=class{constructor(e){this.builder=e}atrule(e,s){let r=e.raws,n="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof r.afterName<"u"?n+=r.afterName:i&&(n+=" "),e.nodes)this.block(e,n+i);else{let o=(r.between||"")+(s?";":"");this.builder(fe(n+i+o),e)}}beforeAfter(e,s){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):s==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let n=e.parent,i=0;for(;n&&n.type!=="root";)i+=1,n=n.parent;if(r.includes(`
`)){let o=this.raw(e,null,"indent");if(o.length)for(let u=0;u<i;u++)r+=o}return r}block(e,s){let r=this.raw(e,"between","beforeOpen");this.builder(fe(s+r)+"{",e,"start");let n;e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(fe(n)),this.builder("}",e,"end")}body(e){let s=e.nodes,r=s.length-1;for(;r>0&&s[r].type==="comment";)r-=1;let n=this.raw(e,"semicolon"),i=e.type==="document";for(let o=0;o<s.length;o++){let u=s[o],a=this.raw(u,"before");a&&this.builder(i?a:fe(a)),this.stringify(u,r!==o||n)}}comment(e){let s=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder(fe("/*"+s+e.text+r+"*/"),e)}decl(e,s){let r=e.raws,n=this.raw(e,"between","colon"),i=e.prop+n+this.rawValue(e,"value");e.important&&(i+=r.important||" !important"),s&&(i+=";"),this.builder(fe(i),e)}document(e){this.body(e)}raw(e,s,r){let n;if(r||(r=s),s&&(n=e.raws[s],typeof n<"u"))return n;let i=e.parent;if(r==="before"&&(!i||i.type==="root"&&i.first===e||i&&i.type==="document"))return"";if(!i)return Hi[r];let o=e.root(),u=o.rawCache||(o.rawCache={});if(typeof u[r]<"u")return u[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+tf(r);this[a]?n=this[a](o,e):o.walk(c=>{if(n=c.raws[s],typeof n<"u")return!1})}return typeof n>"u"&&(n=Hi[r]),u[r]=n,n}rawBeforeClose(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return s=r.raws.after,s.includes(`
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawBeforeComment(e,s){let r;return e.walkComments(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(s,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,s){let r;return e.walkDecls(n=>{if(typeof n.raws.before<"u")return r=n.raws.before,r.includes(`
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(s,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let s;return e.walk(r=>{if(r.type!=="decl"&&(s=r.raws.between,typeof s<"u"))return!1}),s}rawBeforeRule(e){let s;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return s=r.raws.before,s.includes(`
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawColon(e){let s;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return s=r.raws.between.replace(/[^\s:]/g,""),!1}),s}rawEmptyBody(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(s=r.raws.after,typeof s<"u"))return!1}),s}rawIndent(e){if(e.raws.indent)return e.raws.indent;let s;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&typeof r.raws.before<"u"){let i=r.raws.before.split(`
`);return s=i[i.length-1],s=s.replace(/\S/g,""),!1}}),s}rawSemicolon(e){let s;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(s=r.raws.semicolon,typeof s<"u"))return!1}),s}rawValue(e,s){let r=e[s],n=e.raws[s];return n&&n.value===r?n.raw:r}root(e){if(this.body(e),e.raws.after){let s=e.raws.after,r=e.parent&&e.parent.type==="document";this.builder(r?s:fe(s))}}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(fe(e.raws.ownSemicolon),e,"end")}stringify(e,s){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,s)}};Qi.exports=at;at.default=at});var ut=w((Gx,Ki)=>{"use strict";var rf=Xt();function ys(t,e){new rf(e).stringify(t)}Ki.exports=ys;ys.default=ys});var Jt=w((Yx,gs)=>{"use strict";gs.exports.isClean=Symbol("isClean");gs.exports.my=Symbol("my")});var ft=w((Vx,Xi)=>{"use strict";var sf=Kt(),nf=Xt(),of=ut(),{isClean:lt,my:af}=Jt();function ws(t,e){let s=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let n=t[r],i=typeof n;r==="parent"&&i==="object"?e&&(s[r]=e):r==="source"?s[r]=n:Array.isArray(n)?s[r]=n.map(o=>ws(o,s)):(i==="object"&&n!==null&&(n=ws(n)),s[r]=n)}return s}function J(t,e){if(e&&typeof e.offset<"u")return e.offset;let s=1,r=1,n=0;for(let i=0;i<t.length;i++){if(r===e.line&&s===e.column){n=i;break}t[i]===`
`?(s=1,r+=1):s+=1}return n}var ct=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[lt]=!1,this[af]=!0;for(let s in e)if(s==="nodes"){this.nodes=[];for(let r of e[s])typeof r.clone=="function"&&r.parent?this.append(r.clone()):this.append(r)}else this[s]=e[s]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let s=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${s.input.from}:${s.start.line}:${s.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let s in e)this[s]=e[s];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let s=ws(this);for(let r in e)s[r]=e[r];return s}cloneAfter(e={}){let s=this.clone(e);return this.parent.insertAfter(this,s),s}cloneBefore(e={}){let s=this.clone(e);return this.parent.insertBefore(this,s),s}error(e,s={}){if(this.source){let{end:r,start:n}=this.rangeBy(s);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},s)}return new sf(e)}getProxyProcessor(){return{get(e,s){return s==="proxyOf"?e:s==="root"?()=>e.root().toProxy():e[s]},set(e,s,r){return e[s]===r||(e[s]=r,(s==="prop"||s==="value"||s==="name"||s==="params"||s==="important"||s==="text")&&e.markDirty()),!0}}}markClean(){this[lt]=!0}markDirty(){if(this[lt]){this[lt]=!1;let e=this;for(;e=e.parent;)e[lt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let s="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:J(s,this.source.start)};if(e.index)r=this.positionInside(e.index);else if(e.word){let i=s.slice(J(s,this.source.start),J(s,this.source.end)).indexOf(e.word);i!==-1&&(r=this.positionInside(i))}return r}positionInside(e){let s=this.source.start.column,r=this.source.start.line,n="document"in this.source.input?this.source.input.document:this.source.input.css,i=J(n,this.source.start),o=i+e;for(let u=i;u<o;u++)n[u]===`
`?(s=1,r+=1):s+=1;return{column:s,line:r,offset:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let s="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:J(s,this.source.start)},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:J(s,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let o=s.slice(J(s,this.source.start),J(s,this.source.end)).indexOf(e.word);o!==-1&&(r=this.positionInside(o),n=this.positionInside(o+e.word.length))}else e.start?r={column:e.start.column,line:e.start.line,offset:J(s,e.start)}:typeof e.index=="number"&&(r=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line,offset:J(s,e.end)}:typeof e.endIndex=="number"?n=this.positionInside(e.endIndex):typeof e.index=="number"&&(n=this.positionInside(e.index+1));return(n.line<r.line||n.line===r.line&&n.column<=r.column)&&(n={column:r.column+1,line:r.line,offset:r.offset+1}),{end:n,start:r}}raw(e,s){return new nf().raw(this,e,s)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let s=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(s,n),s=n):this.parent.insertBefore(s,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,s){let r={},n=s==null;s=s||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let u=this[o];if(Array.isArray(u))r[o]=u.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,s):a);else if(typeof u=="object"&&u.toJSON)r[o]=u.toJSON(null,s);else if(o==="source"){if(u==null)continue;let a=s.get(u.input);a==null&&(a=i,s.set(u.input,i),i++),r[o]={end:u.end,inputId:a,start:u.start}}else r[o]=u}return n&&(r.inputs=[...s.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=of){e.stringify&&(e=e.stringify);let s="";return e(this,r=>{s+=r}),s}warn(e,s,r={}){let n={node:this};for(let i in r)n[i]=r[i];return e.warn(s,n)}};Xi.exports=ct;ct.default=ct});var Fe=w((zx,Ji)=>{"use strict";var uf=ft(),pt=class extends uf{constructor(e){super(e),this.type="comment"}};Ji.exports=pt;pt.default=pt});var mt=w((jx,Zi)=>{"use strict";var lf=ft(),ht=class extends lf{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}};Zi.exports=ht;ht.default=ht});var pe=w((Hx,uo)=>{"use strict";var eo=Fe(),to=mt(),cf=ft(),{isClean:ro,my:so}=Jt(),vs,no,io,xs;function oo(t){return t.map(e=>(e.nodes&&(e.nodes=oo(e.nodes)),delete e.source,e))}function ao(t){if(t[ro]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)ao(e)}var z=class t extends cf{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let s of e){let r=this.normalize(s,this.last);for(let n of r)this.proxyOf.nodes.push(n)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let s of this.nodes)s.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let s=this.getIterator(),r,n;for(;this.indexes[s]<this.proxyOf.nodes.length&&(r=this.indexes[s],n=e(this.proxyOf.nodes[r],r),n!==!1);)this.indexes[s]+=1;return delete this.indexes[s],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,s){return s==="proxyOf"?e:e[s]?s==="each"||typeof s=="string"&&s.startsWith("walk")?(...r)=>e[s](...r.map(n=>typeof n=="function"?(i,o)=>n(i.toProxy(),o):n)):s==="every"||s==="some"?r=>e[s]((n,...i)=>r(n.toProxy(),...i)):s==="root"?()=>e.root().toProxy():s==="nodes"?e.nodes.map(r=>r.toProxy()):s==="first"||s==="last"?e[s].toProxy():e[s]:e[s]},set(e,s,r){return e[s]===r||(e[s]=r,(s==="name"||s==="params"||s==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,s){let r=this.index(e),n=this.normalize(s,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of n)this.proxyOf.nodes.splice(r+1,0,o);let i;for(let o in this.indexes)i=this.indexes[o],r<i&&(this.indexes[o]=i+n.length);return this.markDirty(),this}insertBefore(e,s){let r=this.index(e),n=r===0?"prepend":!1,i=this.normalize(s,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let u of i)this.proxyOf.nodes.splice(r,0,u);let o;for(let u in this.indexes)o=this.indexes[u],r<=o&&(this.indexes[u]=o+i.length);return this.markDirty(),this}normalize(e,s){iLine truncated
`),s=new Array(e.length),r=0;for(let n=0,i=e.length;n<i;n++)s[n]=r,r+=e[n].length+1;return t[Es]=s,s}var We=class{get from(){return this.file||this.id}constructor(e,s={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,s.document&&(this.document=s.document.toString()),s.from&&(!yo||/^\w+:\/\//.test(s.from)||Ss(s.from)?this.file=s.from:this.file=Ts(s.from)),yo&&wf){let r=new gf(this.css,s);if(r.text){this.map=r;let n=r.consumer().file;!this.file&&n&&(this.file=this.mapResolve(n))}}this.file||(this.id="<input css "+mf(6)+">"),this.map&&(this.map.file=this.from)}error(e,s,r,n={}){let i,o,u,a,c;if(s&&typeof s=="object"){let h=s,l=r;if(typeof h.offset=="number"){a=h.offset;let d=this.fromOffset(a);s=d.line,r=d.col}else s=h.line,r=h.column,a=this.fromLineAndColumn(s,r);if(typeof l.offset=="number"){u=l.offset;let d=this.fromOffset(u);o=d.line,i=d.col}else o=l.line,i=l.column,u=this.fromLineAndColumn(l.line,l.column)}else if(r)a=this.fromLineAndColumn(s,r);else{a=s;let h=this.fromOffset(a);s=h.line,r=h.col}let f=this.origin(s,r,o,i);return f?c=new mo(e,f.endLine===void 0?f.line:{column:f.column,line:f.line},f.endLine===void 0?f.column:{column:f.endColumn,line:f.endLine},f.source,f.file,n.plugin):c=new mo(e,o===void 0?s:{column:r,line:s},o===void 0?r:{column:i,line:o},this.css,this.file,n.plugin),c.input={column:r,endColumn:i,endLine:o,endOffset:u,line:s,offset:a,source:this.css},this.file&&(Zt&&(c.input.url=Zt(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(e,s){return go(this)[e-1]+s-1}fromOffset(e){let s=go(this),r=s[s.length-1],n=0;if(e>=r)n=s.length-1;else{let i=s.length-2,o;for(;n<i;)if(o=n+(i-n>>1),e<s[o])i=o-1;else if(e>=s[o+1])n=o+1;else{n=o;break}}return{col:e-s[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Ts(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,s,r,n){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:s-1,line:e});if(!o.source)return!1;let u;typeof r=="number"&&(u=i.originalPositionFor({column:n-1,line:r}));let a;Ss(o.source)?a=Zt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Zt(this.map.mapFile));let c={column:o.column+1,endColumn:u&&u.column+1,endLine:u&&u.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(ho)c.file=ho(a);else throw new Error("file: protocol is not available in this PostCSS build");let f=i.sourceContentFor(o.source);return f&&(c.source=f),c}toJSON(){let e={};for(let s of["hasBOM","css","file","id"])this[s]!=null&&(e[s]=this[s]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};wo.exports=We;We.default=We;bs&&bs.registerInput&&bs.registerInput(We)});var er=w((t_,xo)=>{"use strict";var vo=pe(),Ge=class extends vo{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};xo.exports=Ge;Ge.default=Ge;vo.registerAtRule(Ge)});var Ye=w((r_,So)=>{"use strict";var _o=pe(),bo,Eo,he=class extends _o{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,s,r){let n=super.normalize(e);if(s){if(r==="prepend")this.nodes.length>1?s.raws.before=this.nodes[1].raws.before:delete s.raws.before;else if(this.first!==s)for(let i of n)i.raws.before=s.raws.before}return n}removeChild(e,s){let r=this.index(e);return!s&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new bo(new Eo,this,e).stringify()}};he.registerLazyResult=t=>{bo=t};he.registerProcessor=t=>{Eo=t};So.exports=he;he.default=he;_o.registerRoot(he)});var ks=w((s_,To)=>{"use strict";var dt={comma(t){return dt.split(t,[","],!0)},space(t){let e=[" ",`
`," "];return dt.split(t,e)},split(t,e,s){let r=[],n="",i=!1,o=0,u=!1,a="",c=!1;for(let f of t)c?c=!1:f==="\\"?c=!0:u?f===a&&(u=!1):f==='"'||f==="'"?(u=!0,a=f):f==="("?o+=1:f===")"?o>0&&(o-=1):o===0&&e.includes(f)&&(i=!0),i?(n!==""&&r.push(n.trim()),n="",i=!1):n+=f;return(s||n!=="")&&r.push(n.trim()),r}};To.exports=dt;dt.default=dt});var tr=w((n_,Oo)=>{"use strict";var ko=pe(),vf=ks(),Ve=class extends ko{get selectors(){return vf.comma(this.selector)}set selectors(e){let s=this.selector?this.selector.match(/,\s*/):null,r=s?s[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};Oo.exports=Ve;Ve.default=Ve;ko.registerRule(Ve)});var nr=w((i_,Co)=>{"use strict";var rr=/[\t\n\f\r "#'()/;[\\\]{}]/g,sr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,xf=/.[\r\n"'(/\\]/,Ao=/[\da-f]/i;Co.exports=function(e,s={}){let r=e.css.valueOf(),n=s.ignoreErrors,i,o,u,a,c,f,h,l,d,x,m=r.length,p=0,y=[],g=[],v=-1;function C(){return p}function q(k){throw e.error("Unclosed "+k,p)}function W(){return g.length===0&&p>=m}function se(k){if(g.length)return g.pop();if(p>=m)return;let b=k?k.ignoreUnclosed:!1;switch(i=r.charCodeAt(p),i){case 10:case 32:case 9:case 13:case 12:{a=p;do a+=1,i=r.charCodeAt(a);while(i===32||i===10||i===9||i===13||i===12);f=["space",r.slice(p,a)],p=a-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let S=String.fromCharCode(i);f=[S,S,p];break}case 40:{if(x=y.length?y.pop()[1]:"",d=r.charCodeAt(p+1),x==="url"&&d!==39&&d!==34&&d!==32&&d!==10&&d!==9&&d!==12&&d!==13){a=p;do{if(h=!1,a=r.indexOf(")",a+1),a===-1)if(n||b){a=p;break}else q("bracket");for(l=a;r.charCodeAt(l-1)===92;)l-=1,h=!h}while(h);f=["brackets",r.slice(p,a+1),p,a],p=a}else p<=v?f=["(","(",p]:(a=r.indexOf(")",p+1),o=r.slice(p,a+1),a===-1||xf.test(o)?(v=a===-1?m:a,f=["(","(",p]):(f=["brackets",o,p,a],p=a));break}case 39:case 34:{c=i===39?"'":'"',a=p;do{if(h=!1,a=r.indexOf(c,a+1),a===-1)if(n||b){a=p+1;break}else q("string");for(l=a;r.charCodeAt(l-1)===92;)l-=1,h=!h}while(h);f=["string",r.slice(p,a+1),p,a],p=a;break}case 64:{rr.lastIndex=p+1,rr.test(r),rr.lastIndex===0?a=r.length-1:a=rr.lastIndex-2,f=["at-word",r.slice(p,a+1),p,a],p=a;break}case 92:{for(a=p,u=!0;r.charCodeAt(a+1)===92;)a+=1,u=!u;if(i=r.charCodeAt(a+1),u&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(a+=1,Ao.test(r.charAt(a)))){for(;Ao.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===32&&(a+=1)}f=["word",r.slice(p,a+1),p,a],p=a;break}default:{i===47&&r.charCodeAt(p+1)===42?(a=r.indexOf("*/",p+2)+1,a===0&&(n||b?a=r.length:q("comment")),f=["comment",r.slice(p,a+1),p,a],p=a):(sr.lastIndex=p+1,sr.test(r),sr.lastIndex===0?a=r.length-1:a=sr.lastIndex-2,f=["word",r.slice(p,a+1),p,a],y.push(f),p=a);break}}return p++,f}function ye(k){g.push(k)}return{back:ye,endOfFile:W,nextToken:se,position:C}}});var ir=w((o_,Ro)=>{"use strict";var _f=er(),bf=Fe(),Ef=mt(),Sf=Ye(),No=tr(),Tf=nr(),Po={empty:!0,space:!0};function kf(t){for(let e=t.length-1;e>=0;e--){let s=t[e],r=s[3]||s[2];if(r)return r}}function Os(t,e,s){let r="";for(let n=e;n<s;n++)r+=t[n][1];return r}var As=class{constructor(e){this.input=e,this.root=new Sf,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let s=new _f;s.name=e[1].slice(1),s.name===""&&this.unnamedAtrule(s,e),this.init(s,e[2]);let r,n,i,o=!1,u=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(a.length>0){for(i=a.length-1,n=a[i];n&&n[0]==="space";)n=a[--i];n&&(s.source.end=this.getPosition(n[3]||n[2]),s.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(s.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(s,"params",a),o&&(e=a[a.length-1],s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),u&&(s.nodes=[],this.current=s)}checkMissedSemicolon(e){let s=this.colon(e);if(s===!1)return;let r=0,n;for(let i=s-1;i>=0&&(n=e[i],!(n[0]!=="space"&&(r+=1,r===2)));i--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(e){let s=0,r,n,i;for(let[o,u]of e.entries()){if(n=u,i=n[0],i==="("&&(s+=1),i===")"&&(s-=1),s===0&&i===":")if(!r)this.doubleColon(n);else{if(r[0]==="word"&&r[1]==="progid")continue;return o}r=n}return!1}comment(e){let s=new bf;this.init(s,e[2]),s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++;let r=e[1].slice(2,-2);if(!r.trim())s.text="",s.raws.left=r,s.raws.right="";else{let n=r.match(/^(\s*)([^]*\S)(\s*)$/);s.text=n[2],s.raws.left=n[1],s.raws.right=n[3Line truncated
`))),n=t[1].substring(t[1].indexOf(`
`));let o=this.input.css.valueOf().substring(this.tokenizer.position());n+=o,r=t[3]+o.length-n.length}else this.tokenizer.back(t);break}s.push(t[1]),r=t[2],t=this.tokenizer.nextToken({ignoreUnclosed:!0})}let i=["comment",s.join(""),e[2],r];return this.inlineComment(i),n&&(this.input=new Pf(n),this.tokenizer=Nf(this.input)),!0}else if(t[1]==="/"){let e=this.tokenizer.nextToken({ignoreUnclosed:!0});if(e[0]==="comment"&&/^\/\*/.test(e[1]))return e[0]="word",e[1]=e[1].slice(1),t[1]="//",this.tokenizer.back(e),Cs.exports.isInlineComment.bind(this)(t)}return!1}}});var Do=w((l_,qo)=>{qo.exports={interpolation(t){let e=[t,this.tokenizer.nextToken()],s=["word","}"];if(e[0][1].length>1||e[1][0]!=="{")return this.tokenizer.back(e[1]),!1;for(t=this.tokenizer.nextToken();t&&s.includes(t[0]);)e.push(t),t=this.tokenizer.nextToken();let r=e.map(u=>u[1]),[n]=e,i=e.pop(),o=["word",r.join(""),n[2],i[2]];return this.tokenizer.back(t),this.tokenizer.back(o),!0}}});var Bo=w((c_,Mo)=>{var Rf=/^#[0-9a-fA-F]{6}$|^#[0-9a-fA-F]{3}$/,If=/\.[0-9]/,Lf=t=>{let[,e]=t,[s]=e;return(s==="."||s==="#")&&Rf.test(e)===!1&&If.test(e)===!1};Mo.exports={isMixinToken:Lf}});var Fo=w((f_,Uo)=>{var qf=nr(),Df=/^url\((.+)\)/;Uo.exports=t=>{let{name:e,params:s=""}=t;if(e==="import"&&s.length){t.import=!0;let r=qf({css:s});for(t.filename=s.replace(Df,"$1");!r.endOfFile();){let[n,i]=r.nextToken();if(n==="word"&&i==="url")return;if(n==="brackets"){t.options=i,t.filename=s.replace(i,"").trim();break}}}}});var Yo=w((p_,Go)=>{var Wo=/:$/,$o=/^:(\s+)?/;Go.exports=t=>{let{name:e,params:s=""}=t;if(t.name.slice(-1)===":"){if(Wo.test(e)){let[r]=e.match(Wo);t.name=e.replace(r,""),t.raws.afterName=r+(t.raws.afterName||""),t.variable=!0,t.value=t.params}if($o.test(s)){let[r]=s.match($o);t.value=s.replace(r,""),t.raws.afterName=(t.raws.afterName||"")+r,t.variable=!0}}}});var jo=w((m_,zo)=>{var Mf=Fe(),Bf=ir(),{isInlineComment:Uf}=Lo(),{interpolation:Vo}=Do(),{isMixinToken:Ff}=Bo(),Wf=Fo(),$f=Yo(),Gf=/(!\s*important)$/i;zo.exports=class extends Bf{constructor(...e){super(...e),this.lastNode=null}atrule(e){Vo.bind(this)(e)||(super.atrule(e),Wf(this.lastNode),$f(this.lastNode))}decl(...e){super.decl(...e),/extend\(.+\)/i.test(this.lastNode.value)&&(this.lastNode.extend=!0)}each(e){e[0][1]=` ${e[0][1]}`;let s=e.findIndex(u=>u[0]==="("),r=e.reverse().find(u=>u[0]===")"),n=e.reverse().indexOf(r),o=e.splice(s,n).map(u=>u[1]).join("");for(let u of e.reverse())this.tokenizer.back(u);this.atrule(this.tokenizer.nextToken()),this.lastNode.function=!0,this.lastNode.params=o}init(e,s,r){super.init(e,s,r),this.lastNode=e}inlineComment(e){let s=new Mf,r=e[1].slice(2);if(this.init(s,e[2]),s.source.end=this.getPosition(e[3]||e[2]),s.inline=!0,s.raws.begin="//",/^\s*$/.test(r))s.text="",s.raws.left=r,s.raws.right="";else{let n=r.match(/^(\s*)([^]*[^\s])(\s*)$/);[,s.raws.left,s.text,s.raws.right]=n}}mixin(e){let[s]=e,r=s[1].slice(0,1),n=e.findIndex(c=>c[0]==="brackets"),i=e.findIndex(c=>c[0]==="("),o="";if((n<0||n>3)&&i>0){let c=e.reduce((v,C,q)=>C[0]===")"?q:v),h=e.slice(i,c+i).map(v=>v[1]).join(""),[l]=e.slice(i),d=[l[2],l[3]],[x]=e.slice(c,c+1),m=[x[2],x[3]],p=["brackets",h].concat(d,m),y=e.slice(0,i),g=e.slice(c+1);e=y,e.push(p),e=e.concat(g)}let u=[];for(let c of e)if((c[1]==="!"||u.length)&&u.push(c),c[1]==="important")break;if(u.length){let[c]=u,f=e.indexOf(c),h=u[u.length-1],l=[c[2],c[3]],d=[h[4],h[5]],m=["word",u.map(p=>p[1]).join("")].concat(l,d);e.splice(f,u.length,m)}let a=e.findIndex(c=>Gf.test(c[1]));a>0&&([,o]=e[a],e.splice(a,1));for(let c of e.reverse())this.tokenizer.back(c);this.atrule(this.tokenizer.nextToken()),this.lastNode.mixin=!0,this.lastNode.raws.identifier=r,o&&(this.lastNode.important=!0,this.lastNode.raws.important=o)}other(e){Uf.bind(this)(e)||super.other(e)}rule(e){let s=e[e.length-1],r=e[e.length-2];if(r[0]==="at-word"&&s[0]==="{"&&(this.tokenizer.back(s),Vo.bind(this)(r))){let i=this.tokenizer.nextToken();e=e.slice(0,e.length-2).concat([i]);for(let o of e.reverse())this.tokenizer.back(o);return}super.rule(e),/:extend\(.+\)/i.test(this.lastNode.selector)&&(this.lastNode.extend=!0)}unknownWord(e){let[s]=e;if(e[0][1]==="each"&&e[1][0]==="("){this.each(e);return}if(Ff(s)){this.mixin(e);return}super.unknownWord(e)}}});var Qo=w((y_,Ho)=>{var Yf=Xt();Ho.exports=class extends Yf{atrule(e,s){if(!e.mixin&&!e.variable&&!e.function){super.atrule(e,s);return}let n=`${e.function?"":e.raws.identifier||"@"}${e.name}`,i=e.params?this.rawValue(e,"params"):"",o=e.raws.important||"";if(e.variable&&(i=e.value),typeof e.raws.afterName<"u"?n+=e.raws.afterName:i&&(n+=" "),e.nodes)this.block(e,n+i+o);else{let u=(e.raws.between||"")+o+(s?";":"");this.builder(n+i+u,e)}}comment(e){if(e.inline){let s=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder(`//${s}${e.text}${r}`,e)}else super.comment(e)}}});var Ko=w((g_,Ns)=>{var Vf=$e(),zf=jo(),jf=Qo();Ns.exports={parse(t,e){let s=new Vf(t,e),r=new zf(s);return r.parse(),r.root.walk(n=>{let i=s.css.lastIndexLine truncated
https://evilmartians.com/chronicles/postcss-8-plugin-migration`));let u=s(...o);return u.postcssPlugin=e,u.postcssVersion=new Ms().version,u}let i;return Object.defineProperty(n,"postcss",{get(){return i||(i=n()),i}}),n.process=function(o,u,a){return E([n(a)]).process(o,u)},n};E.stringify=Np;E.parse=Ap;E.fromJSON=Ep;E.list=kp;E.comment=t=>new ya(t);E.atRule=t=>new da(t);E.decl=t=>new ga(t);E.rule=t=>new xa(t);E.root=t=>new va(t);E.document=t=>new wa(t);E.CssSyntaxError=bp;E.Declaration=ga;E.Container=_p;E.Processor=Ms;E.Document=wa;E.Comment=ya;E.Warning=Pp;E.AtRule=da;E.Result=Cp;E.Input=Sp;E.Rule=xa;E.Root=va;E.Node=Op;Tp.registerPostcss(E);_a.exports=E;E.default=E});var Ea=w((P_,ba)=>{var{Container:Rp}=lr(),Bs=class extends Rp{constructor(e){super(e),this.type="decl",this.isNested=!0,this.nodes||(this.nodes=[])}};ba.exports=Bs});var ka=w((R_,Ta)=>{"use strict";var cr=/[\t\n\f\r "#'()/;[\\\]{}]/g,fr=/[,\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ip=/.[\r\n"'(/\\]/,Sa=/[\da-f]/i,pr=/[\n\f\r]/g;Ta.exports=function(e,s={}){let r=e.css.valueOf(),n=s.ignoreErrors,i,o,u,a,c,f,h,l,d,x=r.length,m=0,p=[],y=[],g;function v(){return m}function C(k){throw e.error("Unclosed "+k,m)}function q(){return y.length===0&&m>=x}function W(){let k=1,b=!1,S=!1;for(;k>0;)o+=1,r.length<=o&&C("interpolation"),i=r.charCodeAt(o),l=r.charCodeAt(o+1),b?!S&&i===b?(b=!1,S=!1):i===92?S=!S:S&&(S=!1):i===39||i===34?b=i:i===125?k-=1:i===35&&l===123&&(k+=1)}function se(k){if(y.length)return y.pop();if(m>=x)return;let b=k?k.ignoreUnclosed:!1;switch(i=r.charCodeAt(m),i){case 10:case 32:case 9:case 13:case 12:{o=m;do o+=1,i=r.charCodeAt(o);while(i===32||i===10||i===9||i===13||i===12);d=["space",r.slice(m,o)],m=o-1;break}case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let S=String.fromCharCode(i);d=[S,S,m];break}case 44:{d=["word",",",m,m+1];break}case 40:{if(h=p.length?p.pop()[1]:"",l=r.charCodeAt(m+1),h==="url"&&l!==39&&l!==34){for(g=1,f=!1,o=m+1;o<=r.length-1;){if(l=r.charCodeAt(o),l===92)f=!f;else if(l===40)g+=1;else if(l===41&&(g-=1,g===0))break;o+=1}a=r.slice(m,o+1),d=["brackets",a,m,o],m=o}else o=r.indexOf(")",m+1),a=r.slice(m,o+1),o===-1||Ip.test(a)?d=["(","(",m]:(d=["brackets",a,m,o],m=o);break}case 39:case 34:{for(u=i,o=m,f=!1;o<x&&(o++,o===x&&C("string"),i=r.charCodeAt(o),l=r.charCodeAt(o+1),!(!f&&i===u));)i===92?f=!f:f?f=!1:i===35&&l===123&&W();d=["string",r.slice(m,o+1),m,o],m=o;break}case 64:{cr.lastIndex=m+1,cr.test(r),cr.lastIndex===0?o=r.length-1:o=cr.lastIndex-2,d=["at-word",r.slice(m,o+1),m,o],m=o;break}case 92:{for(o=m,c=!0;r.charCodeAt(o+1)===92;)o+=1,c=!c;if(i=r.charCodeAt(o+1),c&&i!==47&&i!==32&&i!==10&&i!==9&&i!==13&&i!==12&&(o+=1,Sa.test(r.charAt(o)))){for(;Sa.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===32&&(o+=1)}d=["word",r.slice(m,o+1),m,o],m=o;break}default:l=r.charCodeAt(m+1),i===35&&l===123?(o=m,W(),a=r.slice(m,o+1),d=["word",a,m,o],m=o):i===47&&l===42?(o=r.indexOf("*/",m+2)+1,o===0&&(n||b?o=r.length:C("comment")),d=["comment",r.slice(m,o+1),m,o],m=o):i===47&&l===47?(pr.lastIndex=m+1,pr.test(r),pr.lastIndex===0?o=r.length-1:o=pr.lastIndex-2,a=r.slice(m,o+1),d=["comment",a,m,o,"inline"],m=o):(fr.lastIndex=m+1,fr.test(r),fr.lastIndex===0?o=r.length-1:o=fr.lastIndex-2,d=["word",r.slice(m,o+1),m,o],p.push(d),m=o);break}return m++,d}function ye(k){y.push(k)}return{back:ye,endOfFile:q,nextToken:se,position:v}}});var Aa=w((I_,Oa)=>{var{Comment:Lp}=lr(),qp=ir(),Dp=Ea(),Mp=ka(),Us=class extends qp{atrule(e){let s=e[1],r=e;for(;!this.tokenizer.endOfFile();){let n=this.tokenizer.nextToken();if(n[0]==="word"&&n[2]===r[3]+1)s+=n[1],r=n;else{this.tokenizer.back(n);break}}super.atrule(["at-word",s,e[2],r[3]])}comment(e){if(e[4]==="inline"){let s=new Lp;this.init(s,e[2]),s.raws.inline=!0;let r=this.input.fromOffset(e[3]);s.source.end={column:r.col,line:r.line,offset:e[3]+1};let n=e[1].slice(2);if(/^\s*$/.test(n))s.text="",s.raws.left=n,s.raws.right="";else{let i=n.match(/^(\s*)([^]*\S)(\s*)$/),o=i[2].replace(/(\*\/|\/\*)/g,"*//*");s.text=o,s.raws.left=i[1],s.raws.right=i[3],s.raws.text=i[2]}}else super.comment(e)}createTokenizer(){this.tokenizer=Mp(this.input)}raw(e,s,r,n){if(super.raw(e,s,r,n),e.raws[s]){let i=e.raws[s].raw;e.raws[s].raw=r.reduce((o,u)=>{if(u[0]==="comment"&&u[4]==="inline"){let a=u[1].slice(2).replace(/(\*\/|\/\*)/g,"*//*");return o+"/*"+a+"*/"}else return o+u[1]},""),i!==e.raws[s].raw&&(e.raws[s].scss=i)}}rule(e){let s=!1,r=0,n="";for(let i of e)if(s)i[0]!=="comment"&&i[0]!=="{"&&(n+=i[1]);else{if(i[0]==="space"&&i[1].includes(`
`))break;i[0]==="("?r+=1:i[0]===")"?r-=1:r===0&&i[0]===":"&&(s=!0)}if(!s||n.trim()===""||/^[#:A-Za-z-]/.test(n))super.rule(e);else{e.pop();let i=new Dp;this.init(i,e[0][2]);let o;for(let a=e.length-1;a>=0;a--)if(e[a][0]!=="space"){o=e[a];break}if(o[3]){let a=this.input.fromOffset(o[3]);i.source.end={column:a.col,line:a.line,offset:o[3]+1}}else{let a=this.input.fromOffset(o[2]);i.source.end={column:a.col,line:a.line,offset:o[2]+1}}for(;e[0][0]!=="word";)i.raws.before+=e.shift()[1];if(e[0][2]){let a=this.input.fromOffset(e[0][2]);i.source.start={column:a.col,line:a.line,offset:e[0][2]}}for(i.prop="";e.length;){let a=e[0][0];if(a===":"||a==="space"||a==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let u;for(;e.length;)if(u=e.shift(),u[0]===":"){i.raws.between+=u[1];break}else i.raws.between+=u[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1)),i.raws.between+=this.spacesAndCommentsFromStart(e),this.precheckMissedSemicolon(e);for(let a=e.length-1;a>0;a--){if(u=e[a],u[1]==="!important"){i.important=!0;let c=this.stringFrom(e,a);c=this.spacesFromEnd(e)+c,c!==" !important"&&(i.raws.important=c);break}else if(u[1]==="important"){let c=e.slice(0),f="";for(let h=a;h>0;h--){let l=c[h][0];if(f.trim().indexOf("!")===0&&l!=="space")break;f=c.pop()[1]+f}f.trim().indexOf("!")===0&&(i.important=!0,i.raws.important=f,e=c)}if(u[0]!=="space"&&u[0]!=="comment")break}this.raw(i,"value",e),i.value.includes(":")&&this.checkMissedSemicolon(e),this.current=i}}};Oa.exports=Us});var Na=w((L_,Ca)=>{var{Input:Bp}=lr(),Up=Aa();Ca.exports=function(e,s){let r=new Bp(e,s),n=new Up(r);return n.parse(),n.root}});var Ws=w(Fs=>{"use strict";Object.defineProperty(Fs,"__esModule",{value:!0});function $p(t){this.after=t.after,this.before=t.before,this.type=t.type,this.value=t.value,this.sourceIndex=t.sourceIndex}Fs.default=$p});var Gs=w($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});var Gp=Ws(),Ra=Yp(Gp);function Yp(t){return t&&t.__esModule?t:{default:t}}function bt(t){var e=this;this.constructor(t),this.nodes=t.nodes,this.after===void 0&&(this.after=this.nodes.length>0?this.nodes[this.nodes.length-1].after:""),this.before===void 0&&(this.before=this.nodes.length>0?this.nodes[0].before:""),this.sourceIndex===void 0&&(this.sourceIndex=this.before.length),this.nodes.forEach(function(s){s.parent=e})}bt.prototype=Object.create(Ra.default.prototype);bt.constructor=Ra.default;bt.prototype.walk=function(e,s){for(var r=typeof e=="string"||e instanceof RegExp,n=r?s:e,i=typeof e=="string"?new RegExp(e):e,o=0;o<this.nodes.length;o++){var u=this.nodes[o],a=r?i.test(u.type):!0;if(a&&n&&n(u,o,this.nodes)===!1||u.nodes&&u.walk(e,s)===!1)return!1}return!0};bt.prototype.each=function(){for(var e=arguments.length<=0||arguments[0]===void 0?function(){}:arguments[0],s=0;s<this.nodes.length;s++){var r=this.nodes[s];if(e(r,s,this.nodes)===!1)return!1}return!0};$s.default=bt});var Da=w(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.parseMediaFeature=qa;Et.parseMediaQuery=Vs;Et.parseMediaList=jp;var Vp=Ws(),Ia=La(Vp),zp=Gs(),Ys=La(zp);function La(t){return t&&t.__esModule?t:{default:t}}function qa(t){var e=arguments.length<=1||arguments[1]===void 0?0:arguments[1],s=[{mode:"normal",character:null}],r=[],n=0,i="",o=null,u=null,a=e,c=t;t[0]==="("&&t[t.length-1]===")"&&(c=t.substring(1,t.length-1),a++);for(var f=0;f<c.length;f++){var h=c[f];if((h==="'"||h==='"')&&(s[n].isCalculationEnabled===!0?(s.push({mode:"string",isCalculationEnabled:!1,character:h}),n++):s[n].mode==="string"&&s[n].character===h&&c[f-1]!=="\\"&&(s.pop(),n--)),h==="{"?(s.push({mode:"interpolation",isCalculationEnabled:!0}),n++):h==="}"&&(s.pop(),n--),s[n].mode==="normal"&&h===":"){var l=c.substring(f+1);u={type:"value",before:/^(\s*)/.exec(l)[1],after:/(\s*)$/.exec(l)[1],value:l.trim()},u.sourceIndex=u.before.length+f+1+a,o={type:"colon",sourceIndex:f+a,after:u.before,value:":"};break}i+=h}return i={type:"media-feature",before:/^(\s*)/.exec(i)[1],after:/(\s*)$/.exec(i)[1],value:i.trim()},i.sourceIndex=i.before.length+a,r.push(i),o!==null&&(o.before=i.after,r.push(o)),u!==null&&r.push(u),r}function Vs(t){var e=arguments.length<=1||arguments[1]===void 0?0:arguments[1],s=[],r=0,n=!1,i=void 0;function o(){return{before:"",after:"",value:""}}i=o();for(var u=0;u<t.length;u++){var a=t[u];n?(i.value+=a,(a==="{"||a==="(")&&r++,(a===")"||a==="}")&&r--):a.search(/\s/)!==-1?i.before+=a:(a==="("&&(i.type="media-feature-expression",r++),i.value=a,i.sourceIndex=e+u,n=!0),n&&r===0&&(a===")"||u===t.length-1||t[u+1].search(/\s/)!==-1)&&(["not","only","and"].indexOf(i.value)!==-1&&(i.type="keyword"),i.type==="media-feature-expression"&&(i.nodes=qa(i.value,i.sourceIndex)),s.push(Array.isArray(i.nodes)?new Ys.default(i):new Ia.default(i)),i=o(),n=!1)}for(var c=0;c<s.length;c++)if(i=s[c],c>0&&(s[c-1].after=i.before),i.type===void 0){if(c>0){if(s[c-1].type==="media-feature-expression"){i.type="keyword";continue}if(s[c-1].value==="not"Line truncated
`),u=o.length-1,u>0?(f=p+u,h=n-o[u].length):(f=p,h=m),e.push(["comment",a,p,y-m,f,n-h,y]),m=h,p=f,y=n):(Pr.lastIndex=y+1,Pr.test(s),Pr.lastIndex===0?n=s.length-1:n=Pr.lastIndex-2,e.push(["word",s.slice(y,n+1),p,y-m,p,n-m,y]),y=n);break}y++}return e}ku.exports=Rr.default});var Nu=w((Ir,Cu)=>{"use strict";Ir.__esModule=!0;var Td=(function(){function t(e,s){for(var r=0;r<s.length;r++){var n=s[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,s,r){return s&&t(e.prototype,s),r&&t(e,r),e}})(),kd=Hs(),Od=L(kd),Ad=Qs(),rn=L(Ad),Cd=Ks(),Nd=L(Cd),Pd=ja(),Rd=L(Pd),Id=Qa(),sn=L(Id),Ld=Ja(),qd=L(Ld),Dd=eu(),Md=L(Dd),Bd=ru(),Ud=L(Bd),Fd=nu(),Wd=L(Fd),$d=ou(),Gd=L($d),Yd=uu(),Vd=L(Yd),zd=cu(),jd=L(zd),Hd=pu(),Qd=L(Hd),Kd=mu(),Xd=L(Kd),Jd=yu(),Zd=L(Jd),ey=wu(),ty=L(ey),ry=Ou(),Au=L(ry),sy=M(),ny=iy(sy);function iy(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e.default=t,e}function L(t){return t&&t.__esModule?t:{default:t}}function oy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var ay=(function(){function t(e){oy(this,t),this.input=e,this.lossy=e.options.lossless===!1,this.position=0,this.root=new Rd.default;var s=new sn.default;return this.root.append(s),this.current=s,this.lossy?this.tokens=(0,Au.default)({safe:e.safe,css:e.css.trim()}):this.tokens=(0,Au.default)(e),this.loop()}return t.prototype.attribute=function(){var s="",r=void 0,n=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[0]!=="]";)s+=this.tokens[this.position][1],this.position++;this.position===this.tokens.length&&!~s.indexOf("]")&&this.error("Expected a closing square bracket.");var i=s.split(/((?:[*~^$|]?=))([^]*)/),o=i[0].split(/(\|)/g),u={operator:i[1],value:i[2],source:{start:{line:n[2],column:n[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:n[4]};if(o.length>1?(o[0]===""&&(o[0]=!0),u.attribute=this.parseValue(o[2]),u.namespace=this.parseNamespace(o[0])):u.attribute=this.parseValue(i[0]),r=new jd.default(u),i[2]){var a=i[2].split(/(\s+i\s*?)$/),c=a[0].trim();r.value=this.lossy?c:a[0],a[1]&&(r.insensitive=!0,this.lossy||(r.raws.insensitive=a[1])),r.quoted=c[0]==="'"||c[0]==='"',r.raws.unquoted=r.quoted?c.slice(1,-1):c}this.newNode(r),this.position++},t.prototype.combinator=function(){if(this.currToken[1]==="|")return this.namespace();for(var s=new Xd.default({value:"",source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]});this.position<this.tokens.length&&this.currToken&&(this.currToken[0]==="space"||this.currToken[0]==="combinator");)this.nextToken&&this.nextToken[0]==="combinator"?(s.spaces.before=this.parseSpace(this.currToken[1]),s.source.start.line=this.nextToken[2],s.source.start.column=this.nextToken[3],s.source.end.column=this.nextToken[3],s.source.end.line=this.nextToken[2],s.sourceIndex=this.nextToken[4]):this.prevToken&&this.prevToken[0]==="combinator"?s.spaces.after=this.parseSpace(this.currToken[1]):this.currToken[0]==="combinator"?s.value=this.currToken[1]:this.currToken[0]==="space"&&(s.value=this.parseSpace(this.currToken[1]," ")),this.position++;return this.newNode(s)},t.prototype.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}var s=new sn.default;this.current.parent.append(s),this.current=s,this.position++},t.prototype.comment=function(){var s=new Md.default({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]});this.newNode(s),this.position++},t.prototype.error=function(s){throw new this.input.error(s)},t.prototype.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.")},t.prototype.missingParenthesis=function(){return this.error("Expected opening parenthesis.")},t.prototype.missingSquareBracket=function(){return this.error("Expected opening square bracket.")},t.prototype.namespace=function(){var s=this.prevToken&&this.prevToken[1]||!0;if(this.nextToken[0]==="word")return this.position++,this.word(s);if(this.nextToken[0]==="*")return this.position++,this.universal(s)},t.prototype.nesting=function(){this.newNode(new Zd.default({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]})),this.position++},t.prototype.parentheses=function(){var s=this.current.last;if(s&&s.type===ny.PSEUDO){var r=new sn.default,n=this.current;s.append(r),this.current=r;var i=1;for(this.position++;this.position<this.tokens.length&&i;)this.currToken[0]==="("&&i++,this.currToken[0]===")"&&i--,i?this.parse():(r.parent.source.end.line=this.currToken[2],r.parent.source.end.columnLine truncated
`?(r=1,n+=1):r+=1;return{line:n,column:r}}positionBy(e){let s=this.source.start;if(Object(e).index)s=this.positionInside(e.index);else if(Object(e).word){let r=this.toString().indexOf(e.word);r!==-1&&(s=this.positionInside(r))}return s}}});var U=w((pb,qu)=>{"use strict";var dy=j(),He=class extends dy{constructor(e){super(e),this.nodes||(this.nodes=[])}push(e){return e.parent=this,this.nodes.push(e),this}each(e){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let s=this.lastEach,r,n;if(this.indexes[s]=0,!!this.nodes){for(;this.indexes[s]<this.nodes.length&&(r=this.indexes[s],n=e(this.nodes[r],r),n!==!1);)this.indexes[s]+=1;return delete this.indexes[s],n}}walk(e){return this.each((s,r)=>{let n=e(s,r);return n!==!1&&s.walk&&(n=s.walk(e)),n})}walkType(e,s){if(!e||!s)throw new Error("Parameters {type} and {callback} are required.");let r=typeof e=="function";return this.walk((n,i)=>{if(r&&n instanceof e||!r&&n.type===e)return s.call(this,n,i)})}append(e){return e.parent=this,this.nodes.push(e),this}prepend(e){return e.parent=this,this.nodes.unshift(e),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let s of this.nodes)s.cleanRaws(e)}insertAfter(e,s){let r=this.index(e),n;this.nodes.splice(r+1,0,s);for(let i in this.indexes)n=this.indexes[i],r<=n&&(this.indexes[i]=n+this.nodes.length);return this}insertBefore(e,s){let r=this.index(e),n;this.nodes.splice(r,0,s);for(let i in this.indexes)n=this.indexes[i],r<=n&&(this.indexes[i]=n+this.nodes.length);return this}removeChild(e){e=this.index(e),this.nodes[e].parent=void 0,this.nodes.splice(e,1);let s;for(let r in this.indexes)s=this.indexes[r],s>=e&&(this.indexes[r]=s-1);return this}removeAll(){for(let e of this.nodes)e.parent=void 0;return this.nodes=[],this}every(e){return this.nodes.every(e)}some(e){return this.nodes.some(e)}index(e){return typeof e=="number"?e:this.nodes.indexOf(e)}get first(){if(this.nodes)return this.nodes[0]}get last(){if(this.nodes)return this.nodes[this.nodes.length-1]}toString(){let e=this.nodes.map(String).join("");return this.value&&(e=this.value+e),this.raws.before&&(e=this.raws.before+e),this.raws.after&&(e+=this.raws.after),e}};He.registerWalker=t=>{let e="walk"+t.name;e.lastIndexOf("s")!==e.length-1&&(e+="s"),!He.prototype[e]&&(He.prototype[e]=function(s){return this.walkType(t,s)})};qu.exports=He});var Mu=w((mb,Du)=>{"use strict";var yy=U();Du.exports=class extends yy{constructor(e){super(e),this.type="root"}}});var Uu=w((yb,Bu)=>{"use strict";var gy=U();Bu.exports=class extends gy{constructor(e){super(e),this.type="value",this.unbalanced=0}}});var $u=w((gb,Wu)=>{"use strict";var Fu=U(),qr=class extends Fu{constructor(e){super(e),this.type="atword"}toString(){let e=this.quoted?this.raws.quote:"";return[this.raws.before,"@",String.prototype.toString.call(this.value),this.raws.after].join("")}};Fu.registerWalker(qr);Wu.exports=qr});var Yu=w((wb,Gu)=>{"use strict";var wy=U(),vy=j(),Dr=class extends vy{constructor(e){super(e),this.type="colon"}};wy.registerWalker(Dr);Gu.exports=Dr});var zu=w((vb,Vu)=>{"use strict";var xy=U(),_y=j(),Mr=class extends _y{constructor(e){super(e),this.type="comma"}};xy.registerWalker(Mr);Vu.exports=Mr});var Hu=w((xb,ju)=>{"use strict";var by=U(),Ey=j(),Br=class extends Ey{constructor(e){super(e),this.type="comment",this.inline=Object(e).inline||!1}toString(){return[this.raws.before,this.inline?"//":"/*",String(this.value),this.inline?"":"*/",this.raws.after].join("")}};by.registerWalker(Br);ju.exports=Br});var Xu=w((_b,Ku)=>{"use strict";var Qu=U(),Ur=class extends Qu{constructor(e){super(e),this.type="func",this.unbalanced=-1}};Qu.registerWalker(Ur);Ku.exports=Ur});var Zu=w((bb,Ju)=>{"use strict";var Sy=U(),Ty=j(),Fr=class extends Ty{constructor(e){super(e),this.type="number",this.unit=Object(e).unit||""}toString(){return[this.raws.before,String(this.value),this.unit,this.raws.after].join("")}};Sy.registerWalker(Fr);Ju.exports=Fr});var tl=w((Eb,el)=>{"use strict";var ky=U(),Oy=j(),Wr=class extends Oy{constructor(e){super(e),this.type="operator"}};ky.registerWalker(Wr);el.exports=Wr});var sl=w((Sb,rl)=>{"use strict";var Ay=U(),Cy=j(),$r=class extends Cy{constructor(e){super(e),this.type="paren",this.parenType=""}};Ay.registerWalker($r);rl.exports=$r});var il=w((Tb,nl)=>{"use strict";var Ny=U(),Py=j(),Gr=class extends Py{constructor(e){super(e),this.type="string"}toString(){let e=this.quoted?this.raws.quote:"";return[this.raws.before,e,this.value+"",e,this.raws.after].join("")}};Ny.registerWalker(Gr);nl.exports=Gr});var al=w((kb,ol)=>{"use strict";var Ry=U(),Iy=j(),Yr=class extends Iy{constructor(e){super(e),this.type="word"}};Ry.registerWalker(Yr);ol.exports=Yr});var ll=w((Ob,ul)=>{"use strict";var Ly=U(),qy=j(),Vr=class extends qy{constructor(e){super(e),this.type="unicode-range"}};Ly.registerWalker(Vr);ul.exports=Vr});var fl=w((Ab,cl)=>{"use strict";var on=class extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||"An error ocurred whLine truncated
`,a+2);l=S!==-1?S-1:i}p=n.slice(a,l+1),x=p.split(`
`),m=x.length-1,m>0?(g=u+m,v=l-x[m].length):(g=u,v=o),r.push(["comment",p,u,a-o,g,l-v,a]),o=v,u=g,a=l}else if(h===35&&!My.test(n.slice(a+1,a+2)))l=a+1,r.push(["#",n.slice(a,l),u,a-o,u,l-o,a]),a=l-1;else if((h===117||h===85)&&n.charCodeAt(a+1)===43){l=a+2;do l+=1,h=n.charCodeAt(l);while(l<i&&By.test(n.slice(l,l+1)));r.push(["unicoderange",n.slice(a,l),u,a-o,u,l-o,a]),a=l-1}else if(h===47)l=a+1,r.push(["operator",n.slice(a,l),u,a-o,u,l-o,a]),a=l-1;else{let b=Dy;if(h>=48&&h<=57&&(b=Qe),b.lastIndex=a+1,b.test(n),b.lastIndex===0?l=n.length-1:l=b.lastIndex-2,b===Qe||h===46){let S=n.charCodeAt(l),fn=n.charCodeAt(l+1),pn=n.charCodeAt(l+2);(S===101||S===69)&&(fn===45||fn===43)&&pn>=48&&pn<=57&&(Qe.lastIndex=l+2,Qe.test(n),Qe.lastIndex===0?l=n.length-1:l=Qe.lastIndex-2)}r.push(["word",n.slice(a,l+1),u,a-o,u,l-o,a]),a=l}break}a++}return r}});var yl=w((Nb,dl)=>{"use strict";var an=class extends Error{constructor(e){super(e),this.name=this.constructor.name,this.message=e||"An error ocurred while parsing.",typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(e).stack}};dl.exports=an});var xl=w((Rb,vl)=>{"use strict";var Uy=Mu(),Fy=Uu(),Wy=$u(),$y=Yu(),Gy=zu(),Yy=Hu(),Vy=Xu(),zy=Zu(),jy=tl(),gl=sl(),Hy=il(),wl=al(),Qy=ll(),Ky=ml(),Xy=Hs(),Jy=Qs(),Zy=Ks(),eg=yl();function tg(t){return t.sort((e,s)=>e-s)}vl.exports=class{constructor(e,s){let r={loose:!1};this.cache=[],this.input=e,this.options=Object.assign({},r,s),this.position=0,this.unbalanced=0,this.root=new Uy;let n=new Fy;this.root.append(n),this.current=n,this.tokens=Ky(e,this.options)}parse(){return this.loop()}colon(){let e=this.currToken;this.newNode(new $y({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}comma(){let e=this.currToken;this.newNode(new Gy({value:e[1],source:{start:{line:e[2],column:e[3]},end:{line:e[4],column:e[5]}},sourceIndex:e[6]})),this.position++}comment(){let e=!1,s=this.currToken[1].replace(/\/\*|\*\//g,""),r;this.options.loose&&s.startsWith("//")&&(s=s.substring(2),e=!0),r=new Yy({value:s,inline:e,source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[4],column:this.currToken[5]}},sourceIndex:this.currToken[6]}),this.newNode(r),this.position++}error(e,s){throw new eg(e+` at line: ${s[2]}, column ${s[3]}`)}loop(){for(;this.position<this.tokens.length;)this.parseTokens();return!this.current.last&&this.spaces?this.current.raws.before+=this.spaces:this.spaces&&(this.current.last.raws.after+=this.spaces),this.spaces="",this.root}operator(){let e=this.currToken[1],s;if(e==="+"||e==="-"){if(this.options.loose||this.position>0&&(this.current.type==="func"&&this.current.value==="calc"?this.prevToken[0]!=="space"&&this.prevToken[0]!=="("?this.error("Syntax Error",this.currToken):this.nextToken[0]!=="space"&&this.nextToken[0]!=="word"?this.error("Syntax Error",this.currToken):this.nextToken[0]==="word"&&this.current.last.type!=="operator"&&this.current.last.value!=="("&&this.error("Syntax Error",this.currToken):(this.nextToken[0]==="space"||this.nextToken[0]==="operator"||this.prevToken[0]==="operator")&&this.error("Syntax Error",this.currToken)),this.options.loose){if((!this.current.nodes.length||this.current.last&&this.current.last.type==="operator")&&this.nextToken[0]==="word")return this.word()}else if(this.nextToken[0]==="word")return this.word()}return s=new jy({value:this.currToken[1],source:{start:{line:this.currToken[2],column:this.currToken[3]},end:{line:this.currToken[2],column:this.currToken[3]}},sourceIndex:this.currToken[4]}),this.position++,this.newNode(s)}parseTokens(){switch(this.currToken[0]){case"space":this.space();break;case"colon":this.colon();break;case"comma":this.comma();break;case"comment":this.comment();break;case"(":this.parenOpen();break;case")":this.parenClose();break;case"atword":case"word":this.word();break;case"operator":this.operator();break;case"string":this.string();break;case"unicoderange":this.unicodeRange();break;default:this.word();break}}parenOpen(){let e=1,s=this.position+1,r=this.currToken,n;for(;s<this.tokens.length&&e;){let i=this.tokens[s];i[0]==="("&&e++,i[0]===")"&&e--,s++}if(e&&this.error("Expected closing parenthesis",r),n=this.current.last,n&&n.type==="func"&&n.unbalanced<0&&(n.unbalanced=0,this.current=n),this.current.unbalanced++,this.newNode(new gl({value:r[1],source:{start:{line:r[2],column:r[3]},end:{line:r[4],column:r[5]}},sourceIndex:r[6]})),this.position++,this.current.type==="func"&&this.current.unbalanced&&this.current.value==="url"&&this.currToken[0]!=="string"&&this.currToken[0]!==")"&&!this.options.loose){let i=this.nextToken,o=this.currToken[1],u={line:this.currToken[2],column:this.currToken[3]};for(;i&&i[0]!==")"&&this.current.unbalanced;)this.position++,o+=this.currToken[1],i=this.nextToken;this.position!==this.tokens.length-1&&(this.position++,this.newNode(new wl({value:o,source:{start:u,end:{line:this.currToken[4],column:this.cuLine truncated
Expected it to be 'string' or 'object'.`;if(ae(t))throw new Error("doc is valid.");let s=Object.prototype.toString.call(t);if(s!=="[object Object]")return`Unexpected doc '${s}'.`;let r=Kl([...Nt].map(n=>`'${n}'`));return`Unexpected doc.type '${t.type}'.
Expected it to be ${r}.`}var Kr=class extends Error{name="InvalidDocError";constructor(e){super(Xl(e)),this.doc=e}},dn=Kr;function yn(t,e){if(typeof t=="string")return e(t);let s=new Map;return r(t);function r(i){return mn(s,i,n)}function n(i){switch(ae(i)){case Xe:return e(i.map(r));case oe:return e({...i,parts:i.parts.map(r)});case ge:return e({...i,breakContents:r(i.breakContents),flatContents:r(i.flatContents)});case ie:{let{expandedStates:o,contents:u}=i;return o?(o=o.map(r),u=o[0]):u=r(u),e({...i,contents:u,expandedStates:o})}case Pe:case ne:case At:case Ct:case Re:return e({...i,contents:r(i.contents)});case Ke:case kt:case Ot:case Ie:case H:case Le:return e(i);default:throw new dn(i)}}}function Jl(t){return t.type===H&&!t.hard?t.soft?"":" ":t.type===ge?t.flatContents:t}function gn(t){return yn(t,Jl)}function wn(t,e=vn){return yn(t,s=>typeof s=="string"?Y(e,s.split(`
`)):s)}var F=G,we=G,xn=G,_n=G;function R(t){return F(t),{type:ne,contents:t}}function Zl(t,e){return _n(t),F(e),{type:Pe,contents:e,n:t}}function ue(t){return Zl(-1,t)}var ve={type:Le};function qe(t){return xn(t),{type:oe,parts:t}}function D(t,e={}){return F(t),we(e.expandedStates,!0),{type:ie,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function Pt(t,e="",s={}){return F(t),e!==""&&F(e),{type:ge,breakContents:t,flatContents:e,groupId:s.groupId}}function Y(t,e){F(t),we(e);let s=[];for(let r=0;r<e.length;r++)r!==0&&s.push(t),s.push(e[r]);return s}var A={type:H},I={type:H,soft:!0},ec={type:H,hard:!0},O=[ec,ve],Xr={type:H,hard:!0,literal:!0},vn=[Xr,ve];function Rt(t){return F(t),{type:Re,contents:t}}var It={type:Ie};function tc(t){return Array.isArray(t)&&t.length>0}var le=tc;var En=Object.freeze({character:"'",codePoint:39}),Sn=Object.freeze({character:'"',codePoint:34}),rc=Object.freeze({preferred:En,alternate:Sn}),sc=Object.freeze({preferred:Sn,alternate:En});function Tn(t,e){let{preferred:s,alternate:r}=e===!0||e==="'"?rc:sc,{length:n}=t,i=0,o=0;for(let u=0;u<n;u++){let a=t.charCodeAt(u);a===s.codePoint?i++:a===r.codePoint&&o++}return(i>o?r:s).character}var nc=/\\(["'\\])|(["'])/g;function ic(t,e){let s=e==='"'?"'":'"',r=T(0,t,nc,(n,i,o)=>i?i===s?s:n:o===e?"\\"+o:o);return e+r+e}var On=ic;function oc(t,e){G(/^(?<quote>["']).*\k<quote>$/s.test(t));let s=t.slice(1,-1),r;return e.parser==="json"||e.parser==="jsonc"||e.parser==="json-stringify"||e.parser==="json5"&&e.quoteProps==="preserve"&&!e.singleQuote?r='"':e.__isInHtmlAttribute?r="'":r=Tn(s,e.singleQuote),t.charAt(0)===r?t:On(s,r)}var Lt=oc;var Zr=class extends Error{name="UnexpectedNodeError";constructor(e,s,r="type"){super(`Unexpected ${s} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},An=Zr;function Cn(){}Cn.getVisitorKeys=t=>t.type==="css-root"?["frontMatter"]:[];var Nn=Cn;var Je=null;function Ze(t){if(Je!==null&&typeof Je.property){let e=Je;return Je=Ze.prototype=null,e}return Je=Ze.prototype=t??Object.create(null),new Ze}var ac=10;for(let t=0;t<=ac;t++)Ze();function es(t){return Ze(t)}function uc(t,e="type"){es(t);function s(r){let n=r[e],i=t[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:r});return i}return s}var Pn=uc;var Q=[["nodes"],["group"]],Rn={"css-root":["frontMatter","nodes"],"css-comment":[],"css-rule":["selector","nodes"],"css-decl":["value","selector","nodes"],"css-atrule":["selector","params","value","nodes"],"media-query-list":Q[0],"media-query":Q[0],"media-type":[],"media-feature-expression":Q[0],"media-feature":[],"media-colon":[],"media-value":[],"media-keyword":[],"media-url":[],"media-unknown":[],"selector-root":Q[0],"selector-selector":Q[0],"selector-comment":[],"selector-string":[],"selector-tag":[],"selector-id":[],"selector-class":[],"selector-attribute":[],"selector-combinator":Q[0],"selector-universal":[],"selector-pseudo":Q[0],"selector-nesting":[],"selector-unknown":[],"value-value":Q[1],"value-root":Q[1],"value-comment":[],"value-comma_group":["groups"],"value-paren_group":["open","groups","close"],"value-func":Q[1],"value-paren":[],"value-number":[],"value-operator":[],"value-word":[],"value-colon":[],"value-comma":[],"value-string":[],"value-atword":[],"value-unicode-range":[],"value-unknown":[]};var lc=Pn(Rn),In=lc;function cc(t,e){let s=0;for(let r=0;r<t.line-1;++r)s=e.indexOf(`
`,s)+1;return s+t.column}var ts=cc;function qt(t){return(e,s,r)=>{if(s===!1)return!1;let n=!!r?.backwards,{length:i}=e,o=s;for(;o>=0&&o<i;){let u=e.charAt(o);if(t instanceof RegExp){if(!t.test(u))return o}else if(!t.includes(u))return o;n?o--:o++}return o===-1||o===i?o:!1}}var Kw=qt(/\s/),Dt=qt(" "),Ln=qt(",; "),Mt=qt(/[^\n\r]/);function qn(t,e){let{value:s}=t;return s==="-"||s==="--"||s.charAt(0)!=="-"?e:e-(s.charAt(1)==="-"?2:1)}function Dn(t,e){if(typeof t.source?.start?.offset=="number")return t.source.start.offset;if(typeof t.sourceIndex=="number")return t.type==="value-word"?qn(t,t.sourceIndex):t.sourceIndex;if(t.source?.start)return ts(t.source.start,e);throw Object.assign(new Error("Can not locate node."),{node:t})}function Mn(t,e){if(t.type==="css-comment"&&t.inline)return Mt(e,t.source.startOffset);if(t.type==="value-paren"&&typeof t.sourceIndex=="number")return t.sourceIndex+(t.value===")"?t.value.length:0);if(typeof t.source?.end?.offset=="number")return t.source.end.offset;if(t.source){if(t.source.end){let s=ts(t.source.end,e);return t.type==="value-word"?qn(t,s):s}if(le(t.nodes))return Mn($(0,t.nodes,-1),e);if(t.type==="css-atrule"&&typeof t.name=="string")return Dn(t,e)+1+t.name.length+t.raws.afterName.length+t.raws.params.length}return typeof t.sourceIndex=="number"&&typeof t.value=="string"?t.sourceIndex+t.value.length:null}function Bn(t,e){ss(t,e,0,!1)}function ss(t,e,s,r){if(r&&typeof t.type=="string")t.source??(t.source={}),t.source.startOffset=s,t.source.endOffset=s+e.length;else if(!(typeof t.source?.startOffset=="number"&&typeof t.source?.endOffset=="number")){if(t.source||typeof t.sourceIndex=="number"){t.source??(t.source={});let n=s+e.length;t.source.startOffset=Math.min(Dn(t,e)+s,n);let i=Mn(t,e);t.source.endOffset=typeof i=="number"?Math.min(i+s,n):i}}for(let n in t){let i=t[n];if(n==="source"||!i||typeof i!="object")continue;let o=Array.isArray(i)?i:[i];for(let u of o){if(!u||typeof u!="object")continue;let a=fc(t,u,s);a?ss(u,a.text,a.rootOffset,!0):ss(u,e,s,!1),Wn(u,t)}}mc(t),dc(t)}function fc(t,e,s){if(e.type==="value-root"||e.type==="value-unknown")return{rootOffset:Un(t),text:e.text||e.value||""};if(e.type==="media-query-list"||t.params===e)return{rootOffset:Fn(t),text:t.raws?.params||e.value||""};if(e.type?.startsWith("selector-")){let r=pc(t,e);if(typeof r=="string")return{rootOffset:hc(t,e,r,s),text:r}}}function Un(t){let e=t.source.startOffset;return typeof t.prop=="string"&&(e+=t.prop.length),t.type==="css-atrule"&&typeof t.name=="string"&&(e+=1+t.name.length+t.raws.afterName.match(/^\s*:?\s*/)[0].length),t.type!=="css-atrule"&&typeof t.raws?.between=="string"&&(e+=t.raws.between.length),e}function Fn(t){let e=t.source.startOffset;return t.type==="css-atrule"&&typeof t.name=="string"&&(e+=1+t.name.length+t.raws.afterName.match(/^\s*:?\s*/)[0].length),e}function pc(t,e){if(typeof e.raws?.selector=="string")return e.raws.selector;if(t.selector===e){if(t.mixin)return t.raws.identifier+t.name+t.raws.afterName+t.raws.params;if(typeof t.raws?.selector=="string")return t.raws.selector;if(t.customSelector&&typeof t.raws?.params=="string")return t.raws.params.slice(t.customSelector.length).trim();if(typeof t.raws?.params=="string")return t.raws.params;if(t.type==="css-decl"&&typeof t.raws?.value=="string"){let{value:s}=t.raws;return t.extend&&s.startsWith("extend(")?s.slice(7,-1):s}}}function hc(t,e,s,r){return typeof e.sourceIndex=="number"&&typeof e.raws?.selector=="string"?r+e.sourceIndex:t.mixin?t.source.startOffset:typeof t.raws?.selector=="string"?t.source.startOffset+rs(t.raws.selector,s):typeof t.raws?.params=="string"?Fn(t)+rs(t.raws.params,s):t.type==="css-decl"&&typeof t.raws?.value=="string"?Un(t)+rs(t.raws.value,s):r}function rs(t,e){let s=t.indexOf(e);return s===-1?0:s}function mc(t){var u,a;if(typeof t.type!="string")return;let e=typeof t.source?.startOffset=="number"&&typeof t.source?.endOffset=="number",s=t.source?.start&&t.source.end;if(e&&s)return;let r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,i,o;for(let c in t){if(c==="source"||c==="raws"||c==="spaces")continue;let f=t[c],h=Array.isArray(f)?f:[f];for(let l of h)!l||typeof l!="object"||typeof l.source?.startOffset!="number"||typeof l.source?.endOffset!="number"||(l.source.startOffset<r&&(r=l.source.startOffset,i=l.source.start),l.source.endOffset>n&&(n=l.source.endOffset,o=l.source.end))}r!==Number.POSITIVE_INFINITY&&(t.source??(t.source={}),e||(t.source.startOffset=r,t.source.endOffset=n),(u=t.source).start??(u.start=i),(a=t.source).end??(a.end=o))}function Wn(t,e){typeof t.type!="string"||t.source||typeof e.source?.startOffset!="number"||typeof e.source?.endOffset!="number"||!yc(t)||(t.source={startOffset:e.source.startOffset,endOffset:e.source.startOffset,start:e.source.start,end:e.source.start})}function dc(t){if(!(typeof t.source?.startOffset!="number"||typeof t.source?.endOffset!="number"))for(let e in t){if(e==="source"||e==="raws"||e==="spaces")continue;let s=t[e],r=Array.isArray(s)?s:[sLine truncated
`||u==="\r")return t;continue;case"double-quotes":if(u==='"'&&t[o-1]!=="\\"&&(e=s,s="initial"),u===`
`||u==="\r")return t;continue;case"url":if(u===")")e="initial";else if(u===`
`||u==="\r")return t;if(u==="'"){e="single-quotes",s="url";continue}if(u==='"'){e="double-quotes",s="url";continue}continue;case"comment-block":u==="/"&&t[o-1]==="*"&&(e="initial");continue;case"comment-inline":u==='"'||u==="'"||u==="*"?n=!0:(u===`
`||u==="\r")&&(n&&i.push([r,o]),e="initial",n=!1);continue}}for(let[o,u]of i)t=t.slice(0,o)+T(0,t.slice(o,u),/["'*]/g," ")+t.slice(u);return t}var N=t=>t.source.startOffset,P=t=>t.source.endOffset;var Bt=Symbol.for("PRETTIER_IS_FRONT_MATTER");function gc(t){return!!t?.[Bt]}var De=gc;function wc(t){return T(0,t,/[^\n]/g," ")}var Ut=wc;var et=3;function vc(t){let e=t.slice(0,et);if(e!=="---"&&e!=="+++")return;let s=t.indexOf(`
`,et);if(s===-1)return;let r=t.slice(et,s).trim(),n=t.indexOf(`
${e}`,s),i=r;if(i||(i=e==="+++"?"toml":"yaml"),n===-1&&e==="---"&&i==="yaml"&&(n=t.indexOf(`
...`,s)),n===-1)return;let o=n+1+et,u=t.charAt(o+1);if(!/\s?/.test(u))return;let a=t.slice(0,o),c;return{language:i,explicitLanguage:r||null,value:t.slice(s+1,n),startDelimiter:e,endDelimiter:a.slice(-et),raw:a,start:{line:1,column:0,index:0},end:{index:a.length,get line(){return c??(c=a.split(`
`)),c.length},get column(){return c??(c=a.split(`
`)),$(0,c,-1).length}},[Bt]:!0}}function xc(t){let e=vc(t);return e?{frontMatter:e,get content(){let{raw:s}=e;return Ut(s)+t.slice(s.length)}}:{content:t}}var xe=xc;var _c=new Set(["raw","raws","sourceIndex","source","before","after","trailingComma","spaces"]);function ns(t,e,s){if(t.type==="css-comment"&&s.type==="css-root"&&s.nodes.length>0&&((s.nodes[0]===t||De(s.nodes[0])&&s.nodes[1]===t)&&(delete e.text,/^\*\s*@(?:format|prettier)\s*$/.test(t.text))||s.type==="css-root"&&$(0,s.nodes,-1)===t))return null;if(t.type==="value-root"&&delete e.text,(t.type==="media-query"||t.type==="media-query-list"||t.type==="media-feature-expression")&&delete e.value,t.type==="css-rule"&&(delete e.params,t.extend&&Ec(t.selector)&&delete e.extend),(t.type==="media-feature"||t.type==="media-keyword"||t.type==="media-type"||t.type==="media-unknown"||t.type==="media-url"||t.type==="media-value"||t.type==="selector-attribute"||t.type==="selector-string"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="value-string")&&t.value&&(e.value=bc(t.value)),t.type==="selector-combinator"&&(e.value=T(0,e.value,/\s+/g," ")),t.type==="media-feature"&&(e.value=T(0,e.value," ","")),(t.type==="value-word"&&(t.isColor&&t.isHex||["initial","inherit","unset","revert"].includes(t.value.toLowerCase()))||t.type==="media-feature"||t.type==="selector-root-invalid"||t.type==="selector-pseudo")&&(e.value=e.value.toLowerCase()),t.type==="css-decl"&&(e.prop=t.prop.toLowerCase()),(t.type==="css-atrule"||t.type==="css-import")&&(e.name=t.name.toLowerCase()),t.type==="value-number"&&(e.unit=t.unit.toLowerCase()),t.type==="value-unknown"&&(e.value=T(0,e.value,/;$/g,"")),t.type==="selector-attribute"&&(e.attribute=t.attribute.trim(),t.namespace&&typeof t.namespace=="string"&&(e.namespace=t.namespace.trim()||!0),t.value)){let{value:r}=e;/\s[a-z]$/i.test(r)&&(e.__prettier_attribute_selector_flag=$(0,r,-1),r=r.slice(0,-1)),r=r.trim(),r=r.replace(/^(?<quote>["'])(?<value>.*?)\k<quote>$/,"$<value>"),e.value=r,delete e.quoted}if((t.type==="media-value"||t.type==="media-type"||t.type==="value-number"||t.type==="selector-root-invalid"||t.type==="selector-class"||t.type==="selector-combinator"||t.type==="selector-tag")&&t.value&&(e.value=T(0,e.value,/([\d+.e-]+)([a-z]*)/gi,(r,n,i)=>{let o=Number(n);return Number.isNaN(o)?r:o+i.toLowerCase()})),t.type==="selector-tag"){let r=e.value.toLowerCase();["from","to"].includes(r)&&(e.value=r)}if(t.type==="css-atrule"&&t.name.toLowerCase()==="supports"&&delete e.value,t.type==="selector-unknown"&&delete e.value,t.type==="value-comma_group"){let r=t.groups.findIndex(n=>n.type==="value-number"&&n.unit==="...");r!==-1&&(e.groups[r].unit="",e.groups.splice(r+1,0,{type:"value-word",value:"...",isColor:!1,isHex:!1}))}if(t.type==="value-comma_group"&&t.groups.some(r=>r.type==="value-atword"&&(r.value.endsWith("[")||r.value.endsWith("]"))||r.type==="value-word"&&(r.value.startsWith("]")||r.value.startsWith("["))))return{type:"value-atword",value:t.groups.map(r=>r.value).join("")};if(t.type==="value-func"&&t.value==="if"&&t.group.type==="value-paren_group"&&t.group.groups.length===1&&t.group.groups[0].type==="value-comma_group"){let r=t.group.groups[0].groups,n=e.group.groups[0].groups;for(let i=r.length-1;i>=0;i--){let o=r[i];if(o.type==="value-word"&&typeof o.value=="string"&&o.value.endsWith(";")){if(o.value===";"){r[i-1]?.type==="value-number"&&n.splice(i-1,2,{type:"#node-placeholder"});continue}n[i]={type:"#node-placeholder"}}}}}ns.ignoredProperties=_c;function bc(t){return T(0,T(0,t,"'",'"'),/\\([^\da-f])/gi,"$1")}function Ec(t){return t?.nodes?.some(e=>e.nodes?.some(s=>s.type==="selector-pseudo"&&s.value===":extend"))}var Sc=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),is=Sc;var Tc=/\*\/$/,kc=/^\/\*\*?/,zn=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,Oc=/(^|\s+)\/\/([^\n\r]*)/g,Gn=/^(\r?\n)+/,Ac=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,Yn=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,Cc=/(\r?\n|^) *\* ?/g,jn=[];function Hn(t){let e=t.match(zn);return e?e[0].trimStart():""}function Qn(t){let s=t.match(zn)?.[0];return s==null?t:t.slice(s.length)}function Kn(t){t=T(0,t.replace(kc,"").replace(Tc,""),Cc,"$1");let s="";for(;s!==t;)s=t,t=T(0,t,Ac,`
$1 $2
`);t=t.replace(Gn,"").trimEnd();let r=Object.create(null),n=T(0,t,Yn,"").replace(Gn,"").trimEnd(),i;for(;i=Yn.exec(t);){let o=T(0,i[2],Oc,"");if(typeof r[i[1]]=="string"||Array.isArray(r[i[1]])){let u=r[i[1]];r[i[1]]=[...jn,...Array.isArray(u)?u:[u],o]}else r[i[1]]=o}return{comments:n,pragmas:r}}function Xn({comments:t="",pragmas:e={}}){let o=Object.keys(e),u=o.flatMap(c=>Vn(c,e[c])).map(c=>` * ${c}
`).join("");if(!t){if(o.length===0)return"";if(o.length===1&&!Array.isArray(e[o[0]])){let c=e[o[0]];return`/** ${Vn(o[0],c)[0]} */`}}let a=t.split(`
`).map(c=>` * ${c}`).join(`
`)+`
`;return`/**
`+(t?a:"")+(t&&o.length>0?` *
`:"")+u+" */"}function Vn(t,e){return[...jn,...Array.isArray(e)?e:[e]].map(s=>`@${t} ${s}`.trim())}var Jn=["noformat","noprettier"],Zn=["format","prettier"],ei="format";function Nc(t){if(!t.startsWith("#!"))return"";let e=t.indexOf(`
`);return e===-1?t:t.slice(0,e)}var ti=Nc;function os(t){let e=ti(t);e&&(t=t.slice(e.length+1));let s=Hn(t),{pragmas:r,comments:n}=Kn(s);return{shebang:e,text:t,pragmas:r,comments:n}}function ri(t){let{pragmas:e}=os(t);return Zn.some(s=>is(e,s))}function si(t){let{pragmas:e}=os(t);return Jn.some(s=>is(e,s))}function ni(t){let{shebang:e,text:s,pragmas:r,comments:n}=os(t),i=Qn(s),o=Xn({pragmas:{[ei]:"",...r},comments:n.trimStart()});return(e?`${e}
`:"")+o+(i.startsWith(`
`)?`
`:`
`)+i}var ii=t=>ri(xe(t).content),oi=t=>si(xe(t).content),ai=t=>{let{frontMatter:e,content:s}=xe(t);return(e?e.raw+`
`:"")+ni(s)};var Pc=new Set(["red","green","blue","alpha","a","rgb","hue","h","saturation","s","lightness","l","whiteness","w","blackness","b","tint","shade","blend","blenda","contrast","hsl","hsla","hwb","hwba"]);function ui(t){return t.findAncestor(e=>e.type==="css-decl")?.prop?.toLowerCase()}var Rc=new Set(["initial","inherit","unset","revert"]);function li(t){return Rc.has(t.toLowerCase())}function ci(t,e){return t.findAncestor(r=>r.type==="css-atrule")?.name?.toLowerCase().endsWith("keyframes")&&["from","to"].includes(e.toLowerCase())}function Me(t){return t.includes("$")||t.includes("@")||t.includes("#")||t.startsWith("%")||t.startsWith("--")||t.startsWith(":--")||t.includes("(")&&t.includes(")")?t:t.toLowerCase()}function _e(t,e){return t.findAncestor(r=>r.type==="value-func")?.value?.toLowerCase()===e}function fi(t){return t.hasAncestor(e=>{if(e.type!=="css-rule")return!1;let s=e.raws?.selector;return s&&(s.startsWith(":import")||s.startsWith(":export"))})}function be(t,e){let s=Array.isArray(e)?e:[e],r=t.findAncestor(n=>n.type==="css-atrule");return r&&s.includes(r.name.toLowerCase())}function pi(t){let{node:e}=t;return e.groups[0]?.value==="url"&&e.groups.length===2&&t.findAncestor(s=>s.type==="css-atrule")?.name==="import"}function hi(t){return t.type==="value-func"&&t.value.toLowerCase()==="url"}function mi(t){return t.type==="value-func"&&t.value.toLowerCase()==="var"}function di(t){let{selector:e}=t;return e?typeof e=="string"&&/^@.+:.*$/.test(e)||e.value&&/^@.+:.*$/.test(e.value):!1}function yi(t){return t.type==="value-word"&&["from","through","end"].includes(t.value)}function gi(t){return t.type==="value-word"&&["and","or","not"].includes(t.value)}function wi(t){return t.type==="value-word"&&t.value==="in"}function Ft(t){return t.type==="value-operator"&&t.value==="*"}function Ee(t){return t?.type==="value-operator"&&t.value==="/"}function K(t){return t.type==="value-operator"&&t.value==="+"}function Se(t){return t.type==="value-operator"&&t.value==="-"}function Ic(t){return t.type==="value-operator"&&t.value==="%"}function tt(t){return Ft(t)||Ee(t)||K(t)||Se(t)||Ic(t)}function vi(t){return t.type==="value-word"&&["==","!="].includes(t.value)}function xi(t){return t.type==="value-word"&&["<",">","<=",">="].includes(t.value)}function rt(t,e){return e.parser==="scss"&&t.type==="css-atrule"&&["if","else","for","each","while"].includes(t.name)}function us(t){return t.raws?.params&&/^\(\s*\)$/.test(t.raws.params)}function Wt(t){return t.name.startsWith("prettier-placeholder")}function _i(t){return t.prop.startsWith("@prettier-placeholder")}function bi(t,e){return t.value==="$$"&&t.type==="value-func"&&e?.type==="value-word"&&!e.raws.before}function Ei(t){return t.value?.type==="value-root"&&t.value.group?.type==="value-value"&&t.prop.toLowerCase()==="composes"}function Si(t){return t.value?.group?.group?.type==="value-paren_group"&&t.value.group.group.open!==null&&t.value.group.group.close!==null}function X(t){return t?.raws?.before===""}function $t(t){return t.type==="value-comma_group"&&t.groups?.[1]?.type==="value-colon"}function as(t){return t.type==="value-paren_group"&&t.groups?.[0]&&$t(t.groups[0])}function ls(t,e){if(e.parser!=="scss")return!1;let{node:s}=t;if(s.groups.length===0||s.type==="value-paren_group"&&s.open&&s.close&&s.groups.length===1&&s.groups[0].type!=="value-comma_group")return!1;let r=t.parent;if(r&&r.type==="value-func"&&r.value==="if")return!1;let n=t.grandparent;return!as(s)&&!(n&&as(n))?!1:t.findAncestor(o=>o.type==="css-decl")?.prop?.startsWith("$")?!0:as(n)?!r.groups.some(o=>tt(o)):n.type==="value-func"}function st(t){return t.type==="value-comment"&&t.inline}function Gt(t){return t.type==="value-word"&&t.value==="#"}function cs(t){return t.type==="value-word"&&t.value==="{"}function Yt(t){return t.type==="value-word"&&t.value==="}"}function nt(t){return["value-word","value-atword"].includes(t.type)}function Vt(t){return t?.type==="value-colon"}function Ti(t,e){if(!$t(e))return!1;let{groups:s}=e,r=s.indexOf(t);return r===-1?!1:Vt(s[r+1])}function ki(t){return t.value&&["not","and","or"].includes(t.value.toLowerCase())}function Oi(t){return t.type!=="value-func"?!1:Pc.has(t.value.toLowerCase())}function Be(t){return/\/\//.test(t.split(/[\n\r]/).pop())}function ce(t){return t?.type==="value-atword"&&t.value.startsWith("prettier-placeholder-")}function Ai(t,e){if(t.open?.value!=="("||t.close?.value!==")"||t.groups.some(s=>s.type!=="value-comma_group"))return!1;if(e.type==="value-comma_group"){let s=e.groups.indexOf(t)-1,r=e.groups[s];if(r?.type==="value-word"&&r.value==="with")return!0}return!1}function it(t){return t.type==="value-paren_group"&&t.open?.value==="("&&t.close?.value===")"}function Lc(t,e,s){let{node:r}=t,n=t.parent,i=t.grandparent,o=ui(t),u=o&&n.type==="value-value"&&(o==="grid"||o.startsWith("grid-template")),a=t.findAncestor(p=>p.type==="css-atrule"),c=a&&rt(a,e),f=r.groups.some(p=>st(p)),h=t.map(s,"groups"),l=[""],d=_e(t,"url"),x=!1,m=!1;for(let p=0;Line truncated
`||t==="\r"||t==="\u2028"||t==="\u2029";function Fc(t,e,s){if(e===!1)return!1;let r=!!s?.backwards,n=t.charAt(e);if(r){if(t.charAt(e-1)==="\r"&&n===`
`)return e-2;if(qi(n))return e-1}else{if(n==="\r"&&t.charAt(e+1)===`
`)return e+2;if(qi(n))return e+1}return e}var jt=Fc;function Wc(t,e,s={}){let r=Dt(t,s.backwards?e-1:e,s),n=jt(t,r,s);return r!==n}var Ht=Wc;function $c(t,e){if(e===!1)return!1;if(t.charAt(e)==="/"&&t.charAt(e+1)==="*"){for(let s=e+2;s<t.length;++s)if(t.charAt(s)==="*"&&t.charAt(s+1)==="/")return s+2}return e}var Di=$c;function Gc(t,e){return e===!1?!1:t.charAt(e)==="/"&&t.charAt(e+1)==="/"?Mt(t,e):e}var Mi=Gc;function Yc(t,e){let s=null,r=e;for(;r!==s;)s=r,r=Ln(t,r),r=Di(t,r),r=Dt(t,r);return r=Mi(t,r),r=jt(t,r),r!==!1&&Ht(t,r)}var Qt=Yc;function Vc({node:t,parent:e},s){return!!(t.source&&s.originalText.slice(N(t),N(e.close)).trimEnd().endsWith(","))}function zc(t,e){return mi(t.grandparent)&&Vc(t,e)?",":t.node.type!=="value-comment"&&!(t.node.type==="value-comma_group"&&t.node.groups.every(s=>s.type==="value-comment"))&&Li(e)&&t.callParent(()=>ls(t,e))?Pt(","):""}function Bi(t,e,s){let{node:r,parent:n}=t,i=t.map(({node:d})=>typeof d=="string"?d:s(),"groups");if(n&&hi(n)&&(r.groups.length===1||r.groups.length>0&&r.groups[0].type==="value-comma_group"&&r.groups[0].groups.length>0&&r.groups[0].groups[0].type==="value-word"&&r.groups[0].groups[0].value.startsWith("data:")))return[r.open?s("open"):"",Y(",",i),r.close?s("close"):""];if(!r.open){let d=hs(t);we(i);let x=Hc(Y(",",i),2),m=Y(d?O:A,x);return R(d?[O,m]:D([jc(t)?I:"",qe(m)]))}let o=t.map(({node:d,isLast:x,index:m})=>{let p=i[m];$t(d)&&d.type==="value-comma_group"&&d.groups&&d.groups[0].type!=="value-paren_group"&&d.groups[2]?.type==="value-paren_group"&&ae(p)===ie&&ae(p.contents)===ne&&ae(p.contents.contents)===oe&&(p=D(ue(p)));let y=[p,x?zc(t,e):","];if(!x&&d.type==="value-comma_group"&&le(d.groups)){let g=$(0,d.groups,-1);!g.source&&g.close&&(g=g.close),g.source&&Qt(e.originalText,P(g))&&y.push(O)}return y},"groups"),u=Ti(r,n),a=Ai(r,n),c=ls(t,e),f=a||c&&!u,h=a||u,l=D([r.open?s("open"):"",R([I,Y(A,o)]),I,It,r.close?s("close"):""],{shouldBreak:f});return h?ue(l):l}function hs(t){return t.match(e=>e.type==="value-paren_group"&&!e.open&&e.groups.some(s=>s.type==="value-comma_group"),(e,s)=>s==="group"&&e.type==="value-value",(e,s)=>s==="group"&&e.type==="value-root",(e,s)=>s==="value"&&(e.type==="css-decl"&&!e.prop.startsWith("--")||e.type==="css-atrule"&&e.variable))}function jc(t){return t.match(e=>e.type==="value-paren_group"&&!e.open,(e,s)=>s==="group"&&e.type==="value-value",(e,s)=>s==="group"&&e.type==="value-root",(e,s)=>s==="value"&&e.type==="css-decl")}function Hc(t,e){let s=[];for(let r=0;r<t.length;r+=e)s.push(t.slice(r,r+e));return s}function Qc(t,e,s){let r=[];return t.each(()=>{let{node:n,previous:i}=t;if(i?.type==="css-comment"&&i.text.trim()==="prettier-ignore"?r.push(e.originalText.slice(N(n),P(n))):r.push(s()),t.isLast)return;let{next:o}=t;o.type==="css-comment"&&!Ht(e.originalText,N(o),{backwards:!0})&&!De(n)||o.type==="css-atrule"&&o.name==="else"&&n.type!=="css-comment"?r.push(" "):(r.push(e.__isHTMLStyleAttribute?A:O),Qt(e.originalText,P(n))&&!De(n)&&r.push(O))},"nodes"),r}var Ue=Qc;function Kc(t,e,s){let{node:r}=t;switch(r.type){case"css-root":{let n=Ue(t,e,s),i=r.raws.after.trim();return i.startsWith(";")&&(i=i.slice(1).trim()),[r.frontMatter?[s("frontMatter"),O,r.nodes.length>0?O:""]:"",n,i?` ${i}`:"",r.nodes.length>0?O:""]}case"css-comment":{let n=r.inline||r.raws.inline,i=e.originalText.slice(N(r),P(r));return n?i.trimEnd():i}case"css-rule":return[s("selector"),r.important?" !important":"",r.nodes?[r.selector?.type==="selector-unknown"&&Be(r.selector.value)?A:r.selector?" ":"","{",r.nodes.length>0?R([O,Ue(t,e,s)]):"",O,"}",di(r)?";":""]:";"];case"css-decl":{let n=t.parent,{between:i}=r.raws,o=i.trim(),u=o===":",a=i.endsWith(" ")&&u,c=typeof r.value=="string"&&/^ *$/.test(r.value),f=typeof r.value=="string"?r.value:s("value");return f=Ei(r)?gn(f):f,!u&&Be(o)&&!t.call(()=>hs(t),"value","group","group")&&(f=R([O,ue(f)])),[T(0,r.raws.before,/[\s;]/g,""),n.type==="css-atrule"&&n.variable||fi(t)?r.prop:Me(r.prop),o.startsWith("//")?" ":"",o,r.extend||c||!a&&r.isNested&&(ce(r.value.group.group)||ce(r.value.group.group.groups?.[0]))?"":" ",e.parser==="less"&&r.extend&&r.selector?r.selector.nodes.length>1?D(["extend(",R([I,s("selector")]),I,")"]):["extend(",s("selector"),")"]:"",f,r.raws.important?r.raws.important.replace(/\s*!\s*important/i," !important"):r.important?" !important":"",r.raws.scssDefault?r.raws.scssDefault.replace(/\s*!default/i," !default"):r.scssDefault?" !default":"",r.raws.scssGlobal?r.raws.scssGlobal.replace(/\s*!global/i," !global"):r.scssGlobal?" !global":"",r.nodes?[" {",r.nodes.length>0?R([I,Ue(t,e,s)]):"",I,"}"]:_i(r)&&!n.raws.semicolon&&e.originalText[P(r)-1]!==";"?"":e.__isHTMLStyleAttribute&&t.isLast?Pt(";"):";"]}case"css-atrule":{let n=t.parent,i=Wt(r)&&!n.raws.semicolon&&e.originalText[P(r)-1]!==";";if(e.parser==="less"){if(r.mixin)return[s("selector"),r.important?" !important":"",i?"":";"];if(r.function)return[r.name,typeof r.params=="string"?r.params:s("params"),i?"":";"];if(r.variable)return["@",r.namLine truncated
@@ -0,0 +1,7 @@
import { camelToDash } from '../../render/dom/utils/camel-to-dash.mjs';
const optimizedAppearDataId = "framerAppearId";
const optimizedAppearDataAttribute = "data-" + camelToDash(optimizedAppearDataId);
export { optimizedAppearDataAttribute, optimizedAppearDataId };
//# sourceMappingURL=data-id.mjs.map
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './circle-minus.js';
//# sourceMappingURL=minus-circle.js.map
@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Ellipsis = createLucideIcon("Ellipsis", [
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
]);
export { Ellipsis as default };
//# sourceMappingURL=ellipsis.js.map
@@ -0,0 +1,453 @@
#include <cstring>
#include <napi.h>
#include "macros.h"
#include "database.h"
#include "backup.h"
using namespace node_sqlite3;
Napi::Object Backup::Init(Napi::Env env, Napi::Object exports) {
Napi::HandleScope scope(env);
// declare napi_default_method here as it is only available in Node v14.12.0+
auto napi_default_method = static_cast<napi_property_attributes>(napi_writable | napi_configurable);
auto t = DefineClass(env, "Backup", {
InstanceMethod("step", &Backup::Step, napi_default_method),
InstanceMethod("finish", &Backup::Finish, napi_default_method),
InstanceAccessor("idle", &Backup::IdleGetter, nullptr),
InstanceAccessor("completed", &Backup::CompletedGetter, nullptr),
InstanceAccessor("failed", &Backup::FailedGetter, nullptr),
InstanceAccessor("remaining", &Backup::RemainingGetter, nullptr),
InstanceAccessor("pageCount", &Backup::PageCountGetter, nullptr),
InstanceAccessor("retryErrors", &Backup::RetryErrorGetter, &Backup::RetryErrorSetter),
});
// Per-env (see Database::AddonData).
env.GetInstanceData<Database::AddonData>()->backup_ctor =
Napi::Persistent(t);
exports.Set("Backup", t);
return exports;
}
void Backup::Process() {
if (finished && !queue.empty()) {
return CleanQueue();
}
while (inited && !locked && !queue.empty()) {
auto call = std::move(queue.front());
queue.pop();
call->callback(call->baton);
}
}
void Backup::Schedule(Work_Callback callback, Baton* baton) {
if (finished) {
queue.emplace(new Call(callback, baton));
CleanQueue();
}
else if (!inited || locked || !queue.empty()) {
queue.emplace(new Call(callback, baton));
}
else {
callback(baton);
}
}
template <class T> void Backup::Error(T* baton) {
auto env = baton->backup->Env();
Napi::HandleScope scope(env);
Backup* backup = baton->backup;
// Fail hard on logic errors.
assert(backup->status != 0);
EXCEPTION(backup->message, backup->status, exception);
Napi::Function cb = baton->callback.Value();
if (!cb.IsEmpty() && cb.IsFunction()) {
Napi::Value argv[] = { exception };
TRY_CATCH_CALL(backup->Value(), cb, 1, argv);
}
else {
Napi::Value argv[] = { Napi::String::New(env, "error"), exception };
EMIT_EVENT(backup->Value(), 2, argv);
}
}
void Backup::CleanQueue() {
auto env = this->Env();
Napi::HandleScope scope(env);
// Environment teardown (worker termination): failing the queued
// calls constructs JS on a dying environment, which is fatal. Drop
// them instead — reference cleanup still works there, so the
// batons are destroyed normally.
if (Database::EnvCannotRunJs(env)) {
while (!queue.empty()) {
queue.pop();
}
return;
}
if (inited && !queue.empty()) {
// This backup has already been initialized and is now finished.
// Fire error for all remaining items in the queue.
EXCEPTION("Backup is already finished", SQLITE_MISUSE, exception);
Napi::Value argv[] = { exception };
bool called = false;
// Clear out the queue so that this object can get GC'ed.
while (!queue.empty()) {
auto call = std::move(queue.front());
queue.pop();
std::unique_ptr<Baton> baton(call->baton);
Napi::Function cb = baton->callback.Value();
if (inited && !cb.IsEmpty() &&
cb.IsFunction()) {
TRY_CATCH_CALL(Value(), cb, 1, argv);
called = true;
}
}
// When we couldn't call a callback function, emit an error on the
// Backup object.
if (!called) {
Napi::Value info[] = { Napi::String::New(env, "error"), exception };
EMIT_EVENT(Value(), 2, info);
}
}
else while (!queue.empty()) {
// Just delete all items in the queue; we already fired an event when
// initializing the backup failed.
auto call = std::move(queue.front());
queue.pop();
// We don't call the actual callback, so we have to make sure that
// the baton gets destroyed.
delete call->baton;
}
}
Backup::Backup(const Napi::CallbackInfo& info) : Napi::ObjectWrap<Backup>(info) {
auto env = info.Env();
if (!info.IsConstructCall()) {
Napi::TypeError::New(env, "Use the new operator to create new Backup objects").ThrowAsJavaScriptException();
return;
}
auto length = info.Length();
if (length <= 0 || !Database::HasInstance(info[0])) {
Napi::TypeError::New(env, "Database object expected").ThrowAsJavaScriptException();
return;
}
else if (length <= 1 || !info[1].IsString()) {
Napi::TypeError::New(env, "Filename expected").ThrowAsJavaScriptException();
return;
}
else if (length <= 2 || !info[2].IsString()) {
Napi::TypeError::New(env, "Source database name expected").ThrowAsJavaScriptException();
return;
}
else if (length <= 3 || !info[3].IsString()) {
Napi::TypeError::New(env, "Destination database name expected").ThrowAsJavaScriptException();
return;
}
else if (length <= 4 || !info[4].IsBoolean()) {
Napi::TypeError::New(env, "Direction flag expected").ThrowAsJavaScriptException();
return;
}
else if (length > 5 && !info[5].IsUndefined() && !info[5].IsFunction()) {
Napi::TypeError::New(env, "Callback expected").ThrowAsJavaScriptException();
return;
}
this->db = Napi::ObjectWrap<Database>::Unwrap(info[0].As<Napi::Object>());
this->db->Ref();
auto filename = info[1].As<Napi::String>();
auto sourceName = info[2].As<Napi::String>();
auto destName = info[3].As<Napi::String>();
auto filenameIsDest = info[4].As<Napi::Boolean>();
info.This().As<Napi::Object>().DefineProperty(Napi::PropertyDescriptor::Value("filename", filename));
info.This().As<Napi::Object>().DefineProperty(Napi::PropertyDescriptor::Value("sourceName", sourceName));
info.This().As<Napi::Object>().DefineProperty(Napi::PropertyDescriptor::Value("destName", destName));
info.This().As<Napi::Object>().DefineProperty(Napi::PropertyDescriptor::Value("filenameIsDest", filenameIsDest));
auto* baton = new InitializeBaton(this->db, info[5].As<Napi::Function>(), this);
baton->filename = filename.Utf8Value();
baton->sourceName = sourceName.Utf8Value();
baton->destName = destName.Utf8Value();
baton->filenameIsDest = filenameIsDest.Value();
this->db->Schedule(Work_BeginInitialize, baton);
}
void Backup::Work_BeginInitialize(Database::Baton* baton) {
assert(baton->db->open);
baton->db->pending++;
auto env = baton->db->Env();
CREATE_WORK("sqlite3.Backup.Initialize", Work_Initialize, Work_AfterInitialize);
}
void Backup::Work_Initialize(napi_env e, void* data) {
BACKUP_INIT(InitializeBaton);
// In case stepping fails, we use a mutex to make sure we get the associated
// error message.
auto* mtx = sqlite3_db_mutex(baton->db->_handle);
sqlite3_mutex_enter(mtx);
backup->status = sqlite3_open(baton->filename.c_str(), &backup->_otherDb);
if (backup->status == SQLITE_OK) {
backup->_handle = sqlite3_backup_init(
baton->filenameIsDest ? backup->_otherDb : backup->db->_handle,
baton->destName.c_str(),
baton->filenameIsDest ? backup->db->_handle : backup->_otherDb,
baton->sourceName.c_str());
}
backup->_destDb = baton->filenameIsDest ? backup->_otherDb : backup->db->_handle;
if (backup->status != SQLITE_OK) {
backup->message = std::string(sqlite3_errmsg(backup->_destDb));
sqlite3_close(backup->_otherDb);
backup->_otherDb = NULL;
backup->_destDb = NULL;
}
sqlite3_mutex_leave(mtx);
}
void Backup::EndCall() {
assert(locked);
assert(db->pending);
locked = false;
db->pending--;
Process();
db->Process();
}
void Backup::Work_AfterInitialize(napi_env e, napi_status status, void* data) {
std::unique_ptr<InitializeBaton> baton(static_cast<InitializeBaton*>(data));
AFTER_WORK_TEARDOWN_GUARD(baton);
auto* backup = baton->backup;
auto env = backup->Env();
Napi::HandleScope scope(env);
// Runs the end-of-call bookkeeping on every exit path, including
// TRY_CATCH_CALL's early return when a JS callback throws.
BACKUP_END();
if (backup->status != SQLITE_OK) {
Error(baton.get());
backup->FinishAll();
}
else {
backup->inited = true;
Napi::Function cb = baton->callback.Value();
if (!cb.IsEmpty() && cb.IsFunction()) {
Napi::Value argv[] = { env.Null() };
TRY_CATCH_CALL(backup->Value(), cb, 1, argv);
}
}
}
Napi::Value Backup::Step(const Napi::CallbackInfo& info) {
auto* backup = this;
auto env = backup->Env();
REQUIRE_ARGUMENT_INTEGER(0, pages);
OPTIONAL_ARGUMENT_FUNCTION(1, callback);
auto* baton = new StepBaton(backup, callback, pages);
backup->GetRetryErrors(baton->retryErrorsSet);
backup->Schedule(Work_BeginStep, baton);
return info.This();
}
void Backup::Work_BeginStep(Baton* baton) {
BACKUP_BEGIN(Step);
}
void Backup::Work_Step(napi_env e, void* data) {
BACKUP_INIT(StepBaton);
if (backup->_handle) {
backup->status = sqlite3_backup_step(backup->_handle, baton->pages);
backup->remaining = sqlite3_backup_remaining(backup->_handle);
backup->pageCount = sqlite3_backup_pagecount(backup->_handle);
}
if (backup->status != SQLITE_OK) {
// Text of message is a little awkward to get, since the error is not associated
// with a db connection.
#if SQLITE_VERSION_NUMBER >= 3007015
// sqlite3_errstr is a relatively new method
backup->message = std::string(sqlite3_errstr(backup->status));
#else
backup->message = "Sqlite error";
#endif
if (baton->retryErrorsSet.size() > 0) {
if (baton->retryErrorsSet.find(backup->status) == baton->retryErrorsSet.end()) {
backup->FinishSqlite();
}
}
}
}
void Backup::Work_AfterStep(napi_env e, napi_status status, void* data) {
std::unique_ptr<StepBaton> baton(static_cast<StepBaton*>(data));
AFTER_WORK_TEARDOWN_GUARD(baton);
auto* backup = baton->backup;
auto env = backup->Env();
Napi::HandleScope scope(env);
// Runs the end-of-call bookkeeping on every exit path, including
// TRY_CATCH_CALL's early return when a JS callback throws.
BACKUP_END();
if (backup->status == SQLITE_DONE) {
backup->completed = true;
} else if (!backup->_handle) {
backup->failed = true;
}
if (backup->status != SQLITE_OK && backup->status != SQLITE_DONE) {
Error(baton.get());
}
else {
// Fire callbacks.
Napi::Function cb = baton->callback.Value();
if (!cb.IsEmpty() && cb.IsFunction()) {
Napi::Value argv[] = { env.Null(), Napi::Boolean::New(env, backup->status == SQLITE_DONE) };
TRY_CATCH_CALL(backup->Value(), cb, 2, argv);
}
}
}
Napi::Value Backup::Finish(const Napi::CallbackInfo& info) {
auto* backup = this;
auto env = backup->Env();
OPTIONAL_ARGUMENT_FUNCTION(0, callback);
auto* baton = new Baton(backup, callback);
backup->Schedule(Work_BeginFinish, baton);
return info.This();
}
void Backup::Work_BeginFinish(Baton* baton) {
BACKUP_BEGIN(Finish);
}
void Backup::Work_Finish(napi_env e, void* data) {
BACKUP_INIT(Baton);
backup->FinishSqlite();
}
void Backup::Work_AfterFinish(napi_env e, napi_status status, void* data) {
std::unique_ptr<Baton> baton(static_cast<Baton*>(data));
AFTER_WORK_TEARDOWN_GUARD(baton);
auto* backup = baton->backup;
auto env = backup->Env();
Napi::HandleScope scope(env);
// Runs the end-of-call bookkeeping on every exit path, including
// TRY_CATCH_CALL's early return when a JS callback throws.
BACKUP_END();
backup->FinishAll();
// Fire callback in case there was one.
Napi::Function cb = baton->callback.Value();
if (!cb.IsEmpty() && cb.IsFunction()) {
TRY_CATCH_CALL(backup->Value(), cb, 0, NULL);
}
}
void Backup::FinishAll() {
assert(!finished);
if (!completed && !failed) {
failed = true;
}
finished = true;
CleanQueue();
FinishSqlite();
// db is NULL only when the constructor threw before validation
// finished; then no Ref was taken either.
if (db) db->Unref();
}
void Backup::FinishSqlite() {
if (_handle) {
sqlite3_backup_finish(_handle);
_handle = NULL;
}
if (_otherDb) {
sqlite3_close(_otherDb);
_otherDb = NULL;
}
_destDb = NULL;
}
Napi::Value Backup::IdleGetter(const Napi::CallbackInfo& info) {
auto* backup = this;
bool idle = backup->inited && !backup->locked && backup->queue.empty();
return Napi::Boolean::New(this->Env(), idle);
}
Napi::Value Backup::CompletedGetter(const Napi::CallbackInfo& info) {
auto* backup = this;
return Napi::Boolean::New(this->Env(), backup->completed);
}
Napi::Value Backup::FailedGetter(const Napi::CallbackInfo& info) {
auto* backup = this;
return Napi::Boolean::New(this->Env(), backup->failed);
}
Napi::Value Backup::RemainingGetter(const Napi::CallbackInfo& info) {
auto* backup = this;
return Napi::Number::New(this->Env(), backup->remaining);
}
Napi::Value Backup::PageCountGetter(const Napi::CallbackInfo& info) {
auto* backup = this;
return Napi::Number::New(this->Env(), backup->pageCount);
}
Napi::Value Backup::RetryErrorGetter(const Napi::CallbackInfo& info) {
auto* backup = this;
return backup->retryErrors.Value();
}
void Backup::RetryErrorSetter(const Napi::CallbackInfo& info, const Napi::Value& value) {
auto* backup = this;
auto env = backup->Env();
if (!value.IsArray()) {
Napi::Error::New(env, "retryErrors must be an array").ThrowAsJavaScriptException();
return;
}
Napi::Array array = value.As<Napi::Array>();
backup->retryErrors.Reset(array, 1);
}
void Backup::GetRetryErrors(std::set<int>& retryErrorsSet) {
retryErrorsSet.clear();
Napi::Array array = retryErrors.Value();
auto length = array.Length();
for (size_t i = 0; i < length; i++) {
Napi::Value code = (array).Get(static_cast<uint32_t>(i));
if (code.IsNumber()) {
retryErrorsSet.insert(code.As<Napi::Number>().Int32Value());
}
}
}
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2023_intl: LibDefinition;
@@ -0,0 +1,348 @@
# @jridgewell/trace-mapping
> Trace the original position through a source map
`trace-mapping` allows you to take the line and column of an output file and trace it to the
original location in the source file through a source map.
You may already be familiar with the [`source-map`][source-map] package's `SourceMapConsumer`. This
provides the same `originalPositionFor` and `generatedPositionFor` API, without requiring WASM.
## Installation
```sh
npm install @jridgewell/trace-mapping
```
## Usage
```typescript
import {
TraceMap,
originalPositionFor,
generatedPositionFor,
sourceContentFor,
isIgnored,
} from '@jridgewell/trace-mapping';
const tracer = new TraceMap({
version: 3,
sources: ['input.js'],
sourcesContent: ['content of input.js'],
names: ['foo'],
mappings: 'KAyCIA',
ignoreList: [],
});
// Lines start at line 1, columns at column 0.
const traced = originalPositionFor(tracer, { line: 1, column: 5 });
assert.deepEqual(traced, {
source: 'input.js',
line: 42,
column: 4,
name: 'foo',
});
const content = sourceContentFor(tracer, traced.source);
assert.strictEqual(content, 'content for input.js');
const generated = generatedPositionFor(tracer, {
source: 'input.js',
line: 42,
column: 4,
});
assert.deepEqual(generated, {
line: 1,
column: 5,
});
const ignored = isIgnored(tracer, 'input.js');
assert.equal(ignored, false);
```
We also provide a lower level API to get the actual segment that matches our line and column. Unlike
`originalPositionFor`, `traceSegment` uses a 0-base for `line`:
```typescript
import { traceSegment } from '@jridgewell/trace-mapping';
// line is 0-base.
const traced = traceSegment(tracer, /* line */ 0, /* column */ 5);
// Segments are [outputColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]
// Again, line is 0-base and so is sourceLine
assert.deepEqual(traced, [5, 0, 41, 4, 0]);
```
### SectionedSourceMaps
The sourcemap spec defines a special `sections` field that's designed to handle concatenation of
output code with associated sourcemaps. This type of sourcemap is rarely used (no major build tool
produces it), but if you are hand coding a concatenation you may need it. We provide an `AnyMap`
helper that can receive either a regular sourcemap or a `SectionedSourceMap` and returns a
`TraceMap` instance:
```typescript
import { AnyMap } from '@jridgewell/trace-mapping';
const fooOutput = 'foo';
const barOutput = 'bar';
const output = [fooOutput, barOutput].join('\n');
const sectioned = new AnyMap({
version: 3,
sections: [
{
// 0-base line and column
offset: { line: 0, column: 0 },
// fooOutput's sourcemap
map: {
version: 3,
sources: ['foo.js'],
names: ['foo'],
mappings: 'AAAAA',
},
},
{
// barOutput's sourcemap will not affect the first line, only the second
offset: { line: 1, column: 0 },
map: {
version: 3,
sources: ['bar.js'],
names: ['bar'],
mappings: 'AAAAA',
},
},
],
});
const traced = originalPositionFor(sectioned, {
line: 2,
column: 0,
});
assert.deepEqual(traced, {
source: 'bar.js',
line: 1,
column: 0,
name: 'bar',
});
```
## Benchmarks
```
node v20.10.0
amp.js.map - 45120 segments
Memory Usage:
trace-mapping decoded 414164 bytes
trace-mapping encoded 6274352 bytes
source-map-js 10968904 bytes
source-map-0.6.1 17587160 bytes
source-map-0.8.0 8812155 bytes
Chrome dev tools 8672912 bytes
Smallest memory usage is trace-mapping decoded
Init speed:
trace-mapping: decoded JSON input x 205 ops/sec ±0.19% (88 runs sampled)
trace-mapping: encoded JSON input x 405 ops/sec ±1.47% (88 runs sampled)
trace-mapping: decoded Object input x 4,645 ops/sec ±0.15% (98 runs sampled)
trace-mapping: encoded Object input x 458 ops/sec ±1.63% (91 runs sampled)
source-map-js: encoded Object input x 75.48 ops/sec ±1.64% (67 runs sampled)
source-map-0.6.1: encoded Object input x 39.37 ops/sec ±1.44% (53 runs sampled)
Chrome dev tools: encoded Object input x 150 ops/sec ±1.76% (79 runs sampled)
Fastest is trace-mapping: decoded Object input
Trace speed (random):
trace-mapping: decoded originalPositionFor x 44,946 ops/sec ±0.16% (99 runs sampled)
trace-mapping: encoded originalPositionFor x 37,995 ops/sec ±1.81% (89 runs sampled)
source-map-js: encoded originalPositionFor x 9,230 ops/sec ±1.36% (93 runs sampled)
source-map-0.6.1: encoded originalPositionFor x 8,057 ops/sec ±0.84% (96 runs sampled)
source-map-0.8.0: encoded originalPositionFor x 28,198 ops/sec ±1.12% (91 runs sampled)
Chrome dev tools: encoded originalPositionFor x 46,276 ops/sec ±1.35% (95 runs sampled)
Fastest is Chrome dev tools: encoded originalPositionFor
Trace speed (ascending):
trace-mapping: decoded originalPositionFor x 204,406 ops/sec ±0.19% (97 runs sampled)
trace-mapping: encoded originalPositionFor x 196,695 ops/sec ±0.24% (99 runs sampled)
source-map-js: encoded originalPositionFor x 11,948 ops/sec ±0.94% (99 runs sampled)
source-map-0.6.1: encoded originalPositionFor x 10,730 ops/sec ±0.36% (100 runs sampled)
source-map-0.8.0: encoded originalPositionFor x 51,427 ops/sec ±0.21% (98 runs sampled)
Chrome dev tools: encoded originalPositionFor x 162,615 ops/sec ±0.18% (98 runs sampled)
Fastest is trace-mapping: decoded originalPositionFor
***
babel.min.js.map - 347793 segments
Memory Usage:
trace-mapping decoded 18504 bytes
trace-mapping encoded 35428008 bytes
source-map-js 51676808 bytes
source-map-0.6.1 63367136 bytes
source-map-0.8.0 43158400 bytes
Chrome dev tools 50721552 bytes
Smallest memory usage is trace-mapping decoded
Init speed:
trace-mapping: decoded JSON input x 17.82 ops/sec ±6.35% (35 runs sampled)
trace-mapping: encoded JSON input x 31.57 ops/sec ±7.50% (43 runs sampled)
trace-mapping: decoded Object input x 867 ops/sec ±0.74% (94 runs sampled)
trace-mapping: encoded Object input x 33.83 ops/sec ±7.66% (46 runs sampled)
source-map-js: encoded Object input x 6.58 ops/sec ±3.31% (20 runs sampled)
source-map-0.6.1: encoded Object input x 4.23 ops/sec ±3.43% (15 runs sampled)
Chrome dev tools: encoded Object input x 22.14 ops/sec ±3.79% (41 runs sampled)
Fastest is trace-mapping: decoded Object input
Trace speed (random):
trace-mapping: decoded originalPositionFor x 78,234 ops/sec ±1.48% (29 runs sampled)
trace-mapping: encoded originalPositionFor x 60,761 ops/sec ±1.35% (21 runs sampled)
source-map-js: encoded originalPositionFor x 51,448 ops/sec ±2.17% (89 runs sampled)
source-map-0.6.1: encoded originalPositionFor x 47,221 ops/sec ±1.99% (15 runs sampled)
source-map-0.8.0: encoded originalPositionFor x 84,002 ops/sec ±1.45% (27 runs sampled)
Chrome dev tools: encoded originalPositionFor x 106,457 ops/sec ±1.38% (37 runs sampled)
Fastest is Chrome dev tools: encoded originalPositionFor
Trace speed (ascending):
trace-mapping: decoded originalPositionFor x 930,943 ops/sec ±0.25% (99 runs sampled)
trace-mapping: encoded originalPositionFor x 843,545 ops/sec ±0.34% (97 runs sampled)
source-map-js: encoded originalPositionFor x 114,510 ops/sec ±1.37% (36 runs sampled)
source-map-0.6.1: encoded originalPositionFor x 87,412 ops/sec ±0.72% (92 runs sampled)
source-map-0.8.0: encoded originalPositionFor x 197,709 ops/sec ±0.89% (59 runs sampled)
Chrome dev tools: encoded originalPositionFor x 688,983 ops/sec ±0.33% (98 runs sampled)
Fastest is trace-mapping: decoded originalPositionFor
***
preact.js.map - 1992 segments
Memory Usage:
trace-mapping decoded 33136 bytes
trace-mapping encoded 254240 bytes
source-map-js 837488 bytes
source-map-0.6.1 961928 bytes
source-map-0.8.0 54384 bytes
Chrome dev tools 709680 bytes
Smallest memory usage is trace-mapping decoded
Init speed:
trace-mapping: decoded JSON input x 3,709 ops/sec ±0.13% (99 runs sampled)
trace-mapping: encoded JSON input x 6,447 ops/sec ±0.22% (101 runs sampled)
trace-mapping: decoded Object input x 83,062 ops/sec ±0.23% (100 runs sampled)
trace-mapping: encoded Object input x 14,980 ops/sec ±0.28% (100 runs sampled)
source-map-js: encoded Object input x 2,544 ops/sec ±0.16% (99 runs sampled)
source-map-0.6.1: encoded Object input x 1,221 ops/sec ±0.37% (97 runs sampled)
Chrome dev tools: encoded Object input x 4,241 ops/sec ±0.39% (93 runs sampled)
Fastest is trace-mapping: decoded Object input
Trace speed (random):
trace-mapping: decoded originalPositionFor x 91,028 ops/sec ±0.14% (94 runs sampled)
trace-mapping: encoded originalPositionFor x 84,348 ops/sec ±0.26% (98 runs sampled)
source-map-js: encoded originalPositionFor x 26,998 ops/sec ±0.23% (98 runs sampled)
source-map-0.6.1: encoded originalPositionFor x 18,049 ops/sec ±0.26% (100 runs sampled)
source-map-0.8.0: encoded originalPositionFor x 41,916 ops/sec ±0.28% (98 runs sampled)
Chrome dev tools: encoded originalPositionFor x 88,616 ops/sec ±0.14% (98 runs sampled)
Fastest is trace-mapping: decoded originalPositionFor
Trace speed (ascending):
trace-mapping: decoded originalPositionFor x 319,960 ops/sec ±0.16% (100 runs sampled)
trace-mapping: encoded originalPositionFor x 302,153 ops/sec ±0.18% (100 runs sampled)
source-map-js: encoded originalPositionFor x 35,574 ops/sec ±0.19% (100 runs sampled)
source-map-0.6.1: encoded originalPositionFor x 19,943 ops/sec ±0.12% (101 runs sampled)
source-map-0.8.0: encoded originalPositionFor x 54,648 ops/sec ±0.20% (99 runs sampled)
Chrome dev tools: encoded originalPositionFor x 278,319 ops/sec ±0.17% (102 runs sampled)
Fastest is trace-mapping: decoded originalPositionFor
***
react.js.map - 5726 segments
Memory Usage:
trace-mapping decoded 10872 bytes
trace-mapping encoded 681512 bytes
source-map-js 2563944 bytes
source-map-0.6.1 2150864 bytes
source-map-0.8.0 88680 bytes
Chrome dev tools 1149576 bytes
Smallest memory usage is trace-mapping decoded
Init speed:
trace-mapping: decoded JSON input x 1,887 ops/sec ±0.28% (99 runs sampled)
trace-mapping: encoded JSON input x 4,749 ops/sec ±0.48% (97 runs sampled)
trace-mapping: decoded Object input x 74,236 ops/sec ±0.11% (99 runs sampled)
trace-mapping: encoded Object input x 5,752 ops/sec ±0.38% (100 runs sampled)
source-map-js: encoded Object input x 806 ops/sec ±0.19% (97 runs sampled)
source-map-0.6.1: encoded Object input x 418 ops/sec ±0.33% (94 runs sampled)
Chrome dev tools: encoded Object input x 1,524 ops/sec ±0.57% (92 runs sampled)
Fastest is trace-mapping: decoded Object input
Trace speed (random):
trace-mapping: decoded originalPositionFor x 620,201 ops/sec ±0.33% (96 runs sampled)
trace-mapping: encoded originalPositionFor x 579,548 ops/sec ±0.35% (97 runs sampled)
source-map-js: encoded originalPositionFor x 230,983 ops/sec ±0.62% (54 runs sampled)
source-map-0.6.1: encoded originalPositionFor x 158,145 ops/sec ±0.80% (46 runs sampled)
source-map-0.8.0: encoded originalPositionFor x 343,801 ops/sec ±0.55% (96 runs sampled)
Chrome dev tools: encoded originalPositionFor x 659,649 ops/sec ±0.49% (98 runs sampled)
Fastest is Chrome dev tools: encoded originalPositionFor
Trace speed (ascending):
trace-mapping: decoded originalPositionFor x 2,368,079 ops/sec ±0.32% (98 runs sampled)
trace-mapping: encoded originalPositionFor x 2,134,039 ops/sec ±2.72% (87 runs sampled)
source-map-js: encoded originalPositionFor x 290,120 ops/sec ±2.49% (82 runs sampled)
source-map-0.6.1: encoded originalPositionFor x 187,613 ops/sec ±0.86% (49 runs sampled)
source-map-0.8.0: encoded originalPositionFor x 479,569 ops/sec ±0.65% (96 runs sampled)
Chrome dev tools: encoded originalPositionFor x 2,048,414 ops/sec ±0.24% (98 runs sampled)
Fastest is trace-mapping: decoded originalPositionFor
***
vscode.map - 2141001 segments
Memory Usage:
trace-mapping decoded 5206584 bytes
trace-mapping encoded 208370336 bytes
source-map-js 278493008 bytes
source-map-0.6.1 391564048 bytes
source-map-0.8.0 257508787 bytes
Chrome dev tools 291053000 bytes
Smallest memory usage is trace-mapping decoded
Init speed:
trace-mapping: decoded JSON input x 1.63 ops/sec ±33.88% (9 runs sampled)
trace-mapping: encoded JSON input x 3.29 ops/sec ±36.13% (13 runs sampled)
trace-mapping: decoded Object input x 103 ops/sec ±0.93% (77 runs sampled)
trace-mapping: encoded Object input x 5.42 ops/sec ±28.54% (19 runs sampled)
source-map-js: encoded Object input x 1.07 ops/sec ±13.84% (7 runs sampled)
source-map-0.6.1: encoded Object input x 0.60 ops/sec ±2.43% (6 runs sampled)
Chrome dev tools: encoded Object input x 2.61 ops/sec ±22.00% (11 runs sampled)
Fastest is trace-mapping: decoded Object input
Trace speed (random):
trace-mapping: decoded originalPositionFor x 257,019 ops/sec ±0.97% (93 runs sampled)
trace-mapping: encoded originalPositionFor x 179,163 ops/sec ±0.83% (92 runs sampled)
source-map-js: encoded originalPositionFor x 73,337 ops/sec ±1.35% (87 runs sampled)
source-map-0.6.1: encoded originalPositionFor x 38,797 ops/sec ±1.66% (88 runs sampled)
source-map-0.8.0: encoded originalPositionFor x 107,758 ops/sec ±1.94% (45 runs sampled)
Chrome dev tools: encoded originalPositionFor x 188,550 ops/sec ±1.85% (79 runs sampled)
Fastest is trace-mapping: decoded originalPositionFor
Trace speed (ascending):
trace-mapping: decoded originalPositionFor x 447,621 ops/sec ±3.64% (94 runs sampled)
trace-mapping: encoded originalPositionFor x 323,698 ops/sec ±5.20% (88 runs sampled)
source-map-js: encoded originalPositionFor x 78,387 ops/sec ±1.69% (89 runs sampled)
source-map-0.6.1: encoded originalPositionFor x 41,016 ops/sec ±3.01% (25 runs sampled)
source-map-0.8.0: encoded originalPositionFor x 124,204 ops/sec ±0.90% (92 runs sampled)
Chrome dev tools: encoded originalPositionFor x 230,087 ops/sec ±2.61% (93 runs sampled)
Fastest is trace-mapping: decoded originalPositionFor
```
[source-map]: https://www.npmjs.com/package/source-map
@@ -0,0 +1,5 @@
import type { ZodErrorMap } from "./ZodError.js";
import defaultErrorMap from "./locales/en.js";
export { defaultErrorMap };
export declare function setErrorMap(map: ZodErrorMap): void;
export declare function getErrorMap(): ZodErrorMap;
@@ -0,0 +1,9 @@
//#region src/adapter/vercel/handler.ts
/**
* @deprecated `hono/vercel` will be removed in v5. Install `@hono/vercel` and import from there instead.
*/
const handle = (app) => (req) => {
return app.fetch(req);
};
//#endregion
export { handle };
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"2":"_I","132":"_K"},C:{"2":"_S"},D:{"16":"_FC","132":"_QG _sL"},E:{"1":"_R"},F:{"2":"_T","132":"_a"},G:{"2":"_M"},H:{"2":"1D"},I:{"2":"_P"},J:{"2":"_B"},K:{"2":"_D","132":"H"},L:{"2":"I"},M:{"2":"YC"},N:{"2":"_A"},O:{"2":"bC"},P:{"2":"_F"},Q:{"2":"JE"},R:{"2":"KE"},S:{"2":"_C"}},B:7,C:"CSS -webkit-user-drag property",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"manifest.cjs","names":[],"sources":["../../src/manifest.ts"],"sourcesContent":["export type AssetCrossOrigin = 'anonymous' | 'use-credentials'\n\nexport type AssetCrossOriginConfig =\n | AssetCrossOrigin\n | Partial<Record<'modulepreload' | 'stylesheet', AssetCrossOrigin>>\n\nexport type ManifestAssetLink =\n | string\n | {\n href: string\n crossOrigin?: AssetCrossOrigin\n }\n\nexport function getAssetCrossOrigin(\n assetCrossOrigin: AssetCrossOriginConfig | undefined,\n kind: 'modulepreload' | 'stylesheet',\n): AssetCrossOrigin | undefined {\n if (!assetCrossOrigin) {\n return undefined\n }\n\n if (typeof assetCrossOrigin === 'string') {\n return assetCrossOrigin\n }\n\n return assetCrossOrigin[kind]\n}\n\nexport function resolveManifestAssetLink(link: ManifestAssetLink) {\n if (typeof link === 'string') {\n return { href: link, crossOrigin: undefined }\n }\n\n return link\n}\n\nexport type Manifest = {\n inlineCss?: {\n styles: Record<string, string>\n }\n routes: Record<\n string,\n {\n filePath?: string\n preloads?: Array<ManifestAssetLink>\n assets?: Array<RouterManagedTag>\n }\n >\n}\n\nexport type RouterManagedTag =\n | {\n tag: 'title'\n attrs?: Record<string, any>\n children: string\n }\n | {\n tag: 'meta' | 'link'\n attrs?: Record<string, any>\n children?: never\n }\n | {\n tag: 'script'\n attrs?: Record<string, any>\n children?: string\n }\n | {\n tag: 'style'\n attrs?: Record<string, any>\n children?: string\n inlineCss?: true\n }\n\nexport function getStylesheetHref(asset: RouterManagedTag) {\n if (asset.tag !== 'link') return undefined\n\n const rel = asset.attrs?.rel\n const href = asset.attrs?.href\n if (typeof href !== 'string') return undefined\n\n const relTokens = typeof rel === 'string' ? rel.split(/\\s+/) : []\n if (!relTokens.includes('stylesheet')) return undefined\n\n return href\n}\n\nexport function isInlinableStylesheet(\n manifest: Manifest | undefined,\n asset: RouterManagedTag,\n) {\n const href = getStylesheetHref(asset)\n return !!href && manifest?.inlineCss?.styles[href] !== undefined\n}\n\nexport function createInlineCssStyleAsset(css: string): RouterManagedTag {\n return {\n tag: 'style',\n attrs: {\n suppressHydrationWarning: true,\n },\n inlineCss: true,\n children: css,\n }\n}\n\nexport function createInlineCssPlaceholderAsset(): RouterManagedTag {\n return {\n tag: 'style',\n attrs: {\n suppressHydrationWarning: true,\n },\n inlineCss: true,\n }\n}\n"],"mappings":";AAaA,SAAgB,oBACd,kBACA,MAC8B;AAC9B,KAAI,CAAC,iBACH;AAGF,KAAI,OAAO,qBAAqB,SAC9B,QAAO;AAGT,QAAO,iBAAiB;;AAG1B,SAAgB,yBAAyB,MAAyB;AAChE,KAAI,OAAO,SAAS,SAClB,QAAO;EAAE,MAAM;EAAM,aAAa,KAAA;EAAW;AAG/C,QAAO;;AAwCT,SAAgB,kBAAkB,OAAyB;AACzD,KAAI,MAAM,QAAQ,OAAQ,QAAO,KAAA;CAEjC,MAAM,MAAM,MAAM,OAAO;CACzB,MAAM,OAAO,MAAM,OAAO;AAC1B,KAAI,OAAO,SAAS,SAAU,QAAO,KAAA;AAGrC,KAAI,EADc,OAAO,QAAQ,WAAW,IAAI,MAAM,MAAM,GAAG,EAAE,EAClD,SAAS,aAAa,CAAE,QAAO,KAAA;AAE9C,QAAO;;AAGT,SAAgB,sBACd,UACA,OACA;CACA,MAAM,OAAO,kBAAkB,MAAM;AACrC,QAAO,CAAC,CAAC,QAAQ,UAAU,WAAW,OAAO,UAAU,KAAA;;AAGzD,SAAgB,0BAA0B,KAA+B;AACvE,QAAO;EACL,KAAK;EACL,OAAO,EACL,0BAA0B,MAC3B;EACD,WAAW;EACX,UAAU;EACX;;AAGH,SAAgB,kCAAoD;AAClE,QAAO;EACL,KAAK;EACL,OAAO,EACL,0BAA0B,MAC3B;EACD,WAAW;EACZ"}
@@ -0,0 +1 @@
{"version":3,"names":["_index","require","CLEAR_KEYS","CLEAR_KEYS_PLUS_COMMENTS","COMMENT_KEYS","removeProperties","node","opts","map","preserveComments","key","undefined","Object","keys","startsWith","symbols","getOwnPropertySymbols","sym"],"sources":["../../src/modifications/removeProperties.ts"],"sourcesContent":["import { COMMENT_KEYS } from \"../constants/index.ts\";\nimport type * as t from \"../index.ts\";\n\nconst CLEAR_KEYS = [\n \"tokens\", // only exist in t.File\n \"start\",\n \"end\",\n \"loc\",\n // Fixme: should be extra.raw / extra.rawValue?\n \"raw\",\n \"rawValue\",\n] as const;\n\nconst CLEAR_KEYS_PLUS_COMMENTS = [\n ...COMMENT_KEYS,\n \"comments\",\n ...CLEAR_KEYS,\n] as const;\n\nexport type Options = { preserveComments?: boolean };\n/**\n * Remove all of the _* properties from a node along with the additional metadata\n * properties like location data and raw token data.\n */\nexport default function removeProperties(\n node: t.Node,\n opts: Options = {},\n): void {\n const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;\n for (const key of map) {\n // @ts-expect-error tokens only exist in t.File\n if (node[key] != null) node[key] = undefined;\n }\n\n for (const key of Object.keys(node)) {\n // @ts-expect-error string can not index node\n if (key.startsWith(\"_\") && node[key] != null) node[key] = undefined;\n }\n\n const symbols: symbol[] = Object.getOwnPropertySymbols(node);\n for (const sym of symbols) {\n // @ts-expect-error Fixme: document symbol properties\n node[sym] = null;\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAGA,MAAMC,UAAU,GAAG,CACjB,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAK,EAEL,KAAK,EACL,UAAU,CACF;AAEV,MAAMC,wBAAwB,GAAG,CAC/B,GAAGC,mBAAY,EACf,UAAU,EACV,GAAGF,UAAU,CACL;AAOK,SAASG,gBAAgBA,CACtCC,IAAY,EACZC,IAAa,GAAG,CAAC,CAAC,EACZ;EACN,MAAMC,GAAG,GAAGD,IAAI,CAACE,gBAAgB,GAAGP,UAAU,GAAGC,wBAAwB;EACzE,KAAK,MAAMO,GAAG,IAAIF,GAAG,EAAE;IAErB,IAAIF,IAAI,CAACI,GAAG,CAAC,IAAI,IAAI,EAAEJ,IAAI,CAACI,GAAG,CAAC,GAAGC,SAAS;EAC9C;EAEA,KAAK,MAAMD,GAAG,IAAIE,MAAM,CAACC,IAAI,CAACP,IAAI,CAAC,EAAE;IAEnC,IAAII,GAAG,CAACI,UAAU,CAAC,GAAG,CAAC,IAAIR,IAAI,CAACI,GAAG,CAAC,IAAI,IAAI,EAAEJ,IAAI,CAACI,GAAG,CAAC,GAAGC,SAAS;EACrE;EAEA,MAAMI,OAAiB,GAAGH,MAAM,CAACI,qBAAqB,CAACV,IAAI,CAAC;EAC5D,KAAK,MAAMW,GAAG,IAAIF,OAAO,EAAE;IAEzBT,IAAI,CAACW,GAAG,CAAC,GAAG,IAAI;EAClB;AACF","ignoreList":[]}
@@ -0,0 +1,90 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const scope_1 = require("../compile/codegen/scope");
const code_1 = require("../compile/codegen/code");
function standaloneCode(ajv, refsOrFunc) {
if (!ajv.opts.code.source) {
throw new Error("moduleCode: ajv instance must have code.source option");
}
const { _n } = ajv.scope.opts;
return typeof refsOrFunc == "function"
? funcExportCode(refsOrFunc.source)
: refsOrFunc !== undefined
? multiExportsCode(refsOrFunc, getValidate)
: multiExportsCode(ajv.schemas, (sch) => sch.meta ? undefined : ajv.compile(sch.schema));
function getValidate(id) {
const v = ajv.getSchema(id);
if (!v)
throw new Error(`moduleCode: no schema with id ${id}`);
return v;
}
function funcExportCode(source) {
const usedValues = {};
const n = source === null || source === void 0 ? void 0 : source.validateName;
const vCode = validateCode(usedValues, source);
if (ajv.opts.code.esm) {
// Always do named export as `validate` rather than the variable `n` which is `validateXX` for known export value
return `"use strict";${_n}export const validate = ${n};${_n}export default ${n};${_n}${vCode}`;
}
return `"use strict";${_n}module.exports = ${n};${_n}module.exports.default = ${n};${_n}${vCode}`;
}
function multiExportsCode(schemas, getValidateFunc) {
var _a;
const usedValues = {};
let code = (0, code_1._) `"use strict";`;
for (const name in schemas) {
const v = getValidateFunc(schemas[name]);
if (v) {
const vCode = validateCode(usedValues, v.source);
const exportSyntax = ajv.opts.code.esm
? (0, code_1._) `export const ${(0, code_1.getEsmExportName)(name)}`
: (0, code_1._) `exports${(0, code_1.getProperty)(name)}`;
code = (0, code_1._) `${code}${_n}${exportSyntax} = ${(_a = v.source) === null || _a === void 0 ? void 0 : _a.validateName};${_n}${vCode}`;
}
}
return `${code}`;
}
function validateCode(usedValues, s) {
if (!s)
throw new Error('moduleCode: function does not have "source" property');
if (usedState(s.validateName) === scope_1.UsedValueState.Completed)
return code_1.nil;
setUsedState(s.validateName, scope_1.UsedValueState.Started);
const scopeCode = ajv.scope.scopeCode(s.scopeValues, usedValues, refValidateCode);
const code = new code_1._Code(`${scopeCode}${_n}${s.validateCode}`);
return s.evaluated ? (0, code_1._) `${code}${s.validateName}.evaluated = ${s.evaluated};${_n}` : code;
function refValidateCode(n) {
var _a;
const vRef = (_a = n.value) === null || _a === void 0 ? void 0 : _a.ref;
if (n.prefix === "validate" && typeof vRef == "function") {
const v = vRef;
return validateCode(usedValues, v.source);
}
else if ((n.prefix === "root" || n.prefix === "wrapper") && typeof vRef == "object") {
const { validate, validateName } = vRef;
if (!validateName)
throw new Error("ajv internal error");
const def = ajv.opts.code.es5 ? scope_1.varKinds.var : scope_1.varKinds.const;
const wrapper = (0, code_1._) `${def} ${n} = {validate: ${validateName}};`;
if (usedState(validateName) === scope_1.UsedValueState.Started)
return wrapper;
const vCode = validateCode(usedValues, validate === null || validate === void 0 ? void 0 : validate.source);
return (0, code_1._) `${wrapper}${_n}${vCode}`;
}
return undefined;
}
function usedState(name) {
var _a;
return (_a = usedValues[name.prefix]) === null || _a === void 0 ? void 0 : _a.get(name);
}
function setUsedState(name, state) {
const { prefix } = name;
const names = (usedValues[prefix] = usedValues[prefix] || new Map());
names.set(name, state);
}
}
}
module.exports = exports = standaloneCode;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = standaloneCode;
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
{"version":3,"file":"cfWorkerProvider-C03CSigr.d.mts","names":[],"sources":["../../core-internal/src/validators/cfWorkerProvider.ts"],"sourcesContent":[],"mappings":";;;;;;;KAkBY,mBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgCC,2BAAA,YAAuC;;;;;;;;;;;;;;;YAcQ;;;;;;;;;;;;;;;;0BAuBhC,iBAAiB,oBAAoB"}
@@ -0,0 +1,21 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Sigma = createLucideIcon("Sigma", [
[
"path",
{
d: "M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2",
key: "wuwx1p"
}
]
]);
export { Sigma as default };
//# sourceMappingURL=sigma.js.map
@@ -0,0 +1,96 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.expectTypeOf = void 0;
__exportStar(require("./branding"), exports); // backcompat, consider removing in next major version
__exportStar(require("./messages"), exports); // backcompat, consider removing in next major version
__exportStar(require("./overloads"), exports);
__exportStar(require("./utils"), exports); // backcompat, consider removing in next major version
const fn = () => true;
/**
* Similar to Jest's `expect`, but with type-awareness.
* Gives you access to a number of type-matchers that let you make assertions about the
* form of a reference or generic type parameter.
*
* @example
* ```ts
* import { foo, bar } from '../foo'
* import { expectTypeOf } from 'expect-type'
*
* test('foo types', () => {
* // make sure `foo` has type { a: number }
* expectTypeOf(foo).toMatchTypeOf({ a: 1 })
* expectTypeOf(foo).toHaveProperty('a').toBeNumber()
*
* // make sure `bar` is a function taking a string:
* expectTypeOf(bar).parameter(0).toBeString()
* expectTypeOf(bar).returns.not.toBeAny()
* })
* ```
*
* @description
* See the [full docs](https://npmjs.com/package/expect-type#documentation) for lots more examples.
*/
const expectTypeOf = (_actual) => {
const nonFunctionProperties = [
'parameters',
'returns',
'resolves',
'not',
'items',
'constructorParameters',
'thisParameter',
'instance',
'guards',
'asserts',
'branded',
];
const obj = {
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
toBeAny: fn,
toBeUnknown: fn,
toBeNever: fn,
toBeFunction: fn,
toBeObject: fn,
toBeArray: fn,
toBeString: fn,
toBeNumber: fn,
toBeBoolean: fn,
toBeVoid: fn,
toBeSymbol: fn,
toBeNull: fn,
toBeUndefined: fn,
toBeNullable: fn,
toBeBigInt: fn,
toMatchTypeOf: fn,
toEqualTypeOf: fn,
toBeConstructibleWith: fn,
toMatchObjectType: fn,
toExtend: fn,
map: exports.expectTypeOf,
toBeCallableWith: exports.expectTypeOf,
extract: exports.expectTypeOf,
exclude: exports.expectTypeOf,
pick: exports.expectTypeOf,
omit: exports.expectTypeOf,
toHaveProperty: exports.expectTypeOf,
parameter: exports.expectTypeOf,
};
const getterProperties = nonFunctionProperties;
getterProperties.forEach((prop) => Object.defineProperty(obj, prop, { get: () => (0, exports.expectTypeOf)({}) }));
return obj;
};
exports.expectTypeOf = expectTypeOf;
@@ -0,0 +1 @@
{"version":3,"file":"arrow-down-circle.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1 @@
{"version":3,"file":"arrow-down-01.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1 @@
module.exports={C:{"31":0.00978,"33":0.00326,"35":0.00326,"36":0.00326,"49":0.00326,"51":0.00326,"52":0.00652,"58":0.00326,"60":0.00326,"62":0.00326,"63":0.00652,"64":0.00652,"70":0.00326,"71":0.00326,"73":0.00326,"74":0.00326,"75":0.00652,"77":0.00326,"94":0.00326,"115":0.00978,"120":0.58662,"121":1.14391,"122":0.00326,"123":0.02281,"124":0.00978,"127":0.00326,"130":0.00326,"131":0.00326,"132":0.00326,"135":0.00326,"140":0.00326,"143":0.00652,"150":0.00652,"151":0.00326,"152":0.00326,"153":0.00326,"154":0.03585,"155":0.08799,"156":0.10755,"157":0.00326,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 32 34 37 38 39 40 41 42 43 44 45 46 47 48 50 53 54 55 56 57 59 61 65 66 67 68 69 72 76 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 125 126 128 129 133 134 136 137 138 139 141 142 144 145 146 147 148 149 158 159 160 3.5 3.6"},D:{"41":0.00652,"49":0.00326,"52":0.00652,"53":0.00326,"54":0.00326,"55":0.00326,"56":0.00326,"62":0.00326,"63":0.00326,"64":0.00326,"65":0.00326,"66":0.00326,"68":0.00652,"70":0.00652,"81":0.00326,"83":0.00326,"86":0.02933,"87":0.00326,"90":0.00326,"92":0.00978,"93":0.00978,"95":0.00326,"98":0.00326,"100":0.00326,"101":0.00652,"102":0.00326,"103":0.29005,"104":0.17599,"105":0.17599,"106":0.17925,"107":0.17273,"108":0.17599,"109":0.6518,"110":0.1825,"111":0.17273,"112":0.17273,"113":0.00326,"114":0.01304,"116":0.35523,"117":0.17599,"118":0.96466,"119":1.14391,"120":1.35574,"121":0.00978,"122":0.04889,"123":0.01955,"124":0.1825,"126":0.03585,"127":0.02607,"128":0.01304,"129":0.00326,"130":0.01304,"131":0.35523,"132":0.00652,"133":0.42367,"134":0.09125,"135":0.08473,"136":0.09451,"137":0.1434,"138":0.15969,"139":0.08799,"140":0.1271,"141":0.10429,"142":0.28353,"143":0.00978,"144":0.12058,"145":0.0717,"146":0.09777,"147":0.03259,"148":0.10429,"149":0.21509,"150":0.45626,"151":3.28507,"152":4.17478,"153":5.03516,"154":1.06895,"155":0.00652,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 42 43 44 45 46 47 48 50 51 57 58 59 60 61 67 69 71 72 73 74 75 76 77 78 79 80 84 85 88 89 91 94 96 97 99 115 125 156 157"},F:{"53":0.00326,"54":0.00326,"55":0.00326,"56":0.00326,"72":0.00326,"74":0.00326,"95":0.00326,"101":0.00652,"105":0.00326,"106":0.00652,"107":0.00652,"113":0.00326,"114":0.00326,"116":0.00326,"121":0.00326,"134":0.02281,"135":0.29331,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 57 58 60 62 63 64 65 66 67 68 69 70 71 73 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 96 97 98 99 100 102 103 104 108 109 110 111 112 115 117 118 119 120 122 123 124 125 126 127 131 132 133 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"16":0.00326,"92":0.00326,"109":0.00652,"114":0.00326,"119":0.5964,"120":0.57033,"122":0.00652,"124":0.00326,"131":0.00326,"132":0.00326,"133":0.00326,"135":0.00326,"139":0.00326,"140":0.00978,"141":0.00326,"143":0.00326,"146":0.00326,"147":0.0163,"148":0.00652,"149":0.00652,"150":0.02607,"151":0.07496,"152":0.54099,"153":0.78868,"154":0.25094,_:"12 13 14 15 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 121 123 125 126 127 128 129 130 134 136 137 138 142 144 145"},E:{"27":0.04237,_:"4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 14.1 15.1 15.2-15.3 15.4 15.5 16.0 17.0 18.4 27.1 TP","13.1":0.00326,"15.6":0.00652,"16.1":0.00326,"16.2":0.00326,"16.3":0.00978,"16.4":0.00326,"16.5":0.00652,"16.6":0.02933,"17.1":0.02281,"17.2":0.00326,"17.3":0.00326,"17.4":0.00652,"17.5":0.01304,"17.6":0.04889,"18.0":0.00326,"18.1":0.01304,"18.2":0.01955,"18.3":0.00326,"18.5-18.7":0.0163,"26.0":0.01304,"26.1":0.01304,"26.2":0.00978,"26.3":0.02281,"26.4":0.0163,"26.5":0.11081,"26.6":0.56055,"27.2":0.00652},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.0033,"5.0-5.1":0.0033,"6.0-6.1":0,"7.0-7.1":0.00661,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.03303,"11.0-11.2":0.0033,"11.3-11.4":0.00661,"12.0-12.1":0,"12.2-12.5":0.08587,"13.0-13.1":0,"13.2":0.01651,"13.3":0,"13.4-13.7":0.0033,"14.0-14.4":0.01321,"14.5-14.8":0.01982,"15.0-15.1":0.01982,"15.2-15.3":0.01321,"15.4":0.01651,"15.5":0.01982,"15.6-15.8":0.42934,"16.0":0.03303,"16.1":0.05945,"16.2":0.03303,"16.3":0.07266,"16.4":0.01651,"16.5":0.02642,"16.6-16.7":0.59777,"17.0":0.02312,"17.1":0.03303,"17.2":0.03303,"17.3":0.04954,"17.4":0.06935,"17.5":0.13541,"17.6-17.7":0.35008,"18.0":0.07266,"18.1":0.14531,"18.2":0.19816,"18.3":0.34347,"18.4":0.21467,"18.5-18.7":4.43539,"26.0":0.21467,"26.1":0.21797,"26.2":0.56805,"26.3":0.61428,"26.4":0.44915,"26.5":3.00867,"26.6":18.56391,"27.0":1.42342,"27.1":0,"27.2":0.03633},P:{"4":0.00927,"25":0.05561,"26":0.25949,"27":0.0278,"28":0.12048,"29":0.23169,"30":2.18713,_:"20 21 22 23 24 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2Line truncated
@@ -0,0 +1 @@
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/options.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IAEtB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IAEZ;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IAEjB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB"}
@@ -0,0 +1,8 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
//#region src/utils/constants.ts
/**
* Constant used to mark a composed handler.
*/
const COMPOSED_HANDLER = "__COMPOSED_HANDLER";
//#endregion
exports.COMPOSED_HANDLER = COMPOSED_HANDLER;
@@ -0,0 +1,41 @@
# stackback
Returns an array of CallSite objects for a captured stacktrace. Useful if you want to access the frame for an error object.
## use
```javascript
var stackback = require('stackback');
// error generated from somewhere
var err = new Error('some sample error');
// stack is an array of CallSite objects
var stack = stackback(err);
```
## CallSite object
From the [V8 StackTrace API](https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi)
The structured stack trace is an Array of CallSite objects, each of which represents a stack frame. A CallSite object defines the following methods
getThis: returns the value of this
getTypeName: returns the type of this as a string. This is the name of the function stored in the constructor field of this, if available, otherwise the object's [[Class]] internal property.
getFunction: returns the current function
getFunctionName: returns the name of the current function, typically its name property. If a name property is not available an attempt will be made to try to infer a name from the function's context.
getMethodName: returns the name of the property of this or one of its prototypes that holds the current function
getFileName: if this function was defined in a script returns the name of the script
getLineNumber: if this function was defined in a script returns the current line number
getColumnNumber: if this function was defined in a script returns the current column number
getEvalOrigin: if this function was created using a call to eval returns a CallSite object representing the location where eval was called
isToplevel: is this a toplevel invocation, that is, is this the global object?
isEval: does this call take place in code defined by a call to eval?
isNative: is this call in native V8 code?
isConstructor: is this a constructor call?
## install
```shell
npm install stackback
```
@@ -0,0 +1 @@
{"version":3,"file":"badge-x.js","sources":["../../../src/icons/badge-x.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BadgeX\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMy44NSA4LjYyYTQgNCAwIDAgMSA0Ljc4LTQuNzcgNCA0IDAgMCAxIDYuNzQgMCA0IDQgMCAwIDEgNC43OCA0Ljc4IDQgNCAwIDAgMSAwIDYuNzQgNCA0IDAgMCAxLTQuNzcgNC43OCA0IDQgMCAwIDEtNi43NSAwIDQgNCAwIDAgMS00Ljc4LTQuNzcgNCA0IDAgMCAxIDAtNi43NloiIC8+CiAgPGxpbmUgeDE9IjE1IiB4Mj0iOSIgeTE9IjkiIHkyPSIxNSIgLz4KICA8bGluZSB4MT0iOSIgeDI9IjE1IiB5MT0iOSIgeTI9IjE1IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/badge-x\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst BadgeX = createLucideIcon('BadgeX', [\n [\n 'path',\n {\n d: 'M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z',\n key: '3c2336',\n },\n ],\n ['line', { x1: '15', x2: '9', y1: '9', y2: '15', key: 'f7djnv' }],\n ['line', { x1: '9', x2: '15', y1: '9', y2: '15', key: '1shsy8' }],\n]);\n\nexport default BadgeX;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CACxC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAChE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAClE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"enum.js","sourceRoot":"","sources":["../../../lib/vocabularies/validation/enum.ts"],"names":[],"mappings":";;AAEA,mDAAuD;AACvD,6CAA0C;AAC1C,+CAAuC;AAIvC,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,4CAA4C;IACrD,MAAM,EAAE,CAAC,EAAC,UAAU,EAAC,EAAE,EAAE,CAAC,IAAA,WAAC,EAAA,mBAAmB,UAAU,GAAG;CAC5D,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,OAAO;IACnB,KAAK,EAAE,IAAI;IACX,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QACtD,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;QACpF,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAA;QACjD,IAAI,GAAqB,CAAA;QACzB,MAAM,MAAM,GAAG,GAAS,EAAE,CAAC,CAAC,GAAG,aAAH,GAAG,cAAH,GAAG,IAAH,GAAG,GAAK,IAAA,cAAO,EAAC,GAAG,EAAE,eAAK,CAAC,EAAC,CAAA;QAExD,IAAI,KAAW,CAAA;QACf,IAAI,OAAO,IAAI,KAAK,EAAE,CAAC;YACrB,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;YACxB,GAAG,CAAC,UAAU,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;QACjC,CAAC;aAAM,CAAC;YACN,wBAAwB;YACxB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;gBAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAA;YACvE,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,SAAS,EAAE,UAAU,CAAC,CAAA;YAChD,KAAK,GAAG,IAAA,YAAE,EAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAW,EAAE,CAAS,EAAE,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;QAC9E,CAAC;QACD,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAEf,SAAS,QAAQ;YACf,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;YACxB,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,UAAkB,EAAE,CAAC,CAAC,EAAE,EAAE,CACvC,GAAG,CAAC,EAAE,CAAC,IAAA,WAAC,EAAA,GAAG,MAAM,EAAE,IAAI,IAAI,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,CAC7E,CAAA;QACH,CAAC;QAED,SAAS,SAAS,CAAC,OAAa,EAAE,CAAS;YACzC,MAAM,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA;YACrB,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI;gBAC5C,CAAC,CAAC,IAAA,WAAC,EAAA,GAAG,MAAM,EAAE,IAAI,IAAI,KAAK,OAAO,IAAI,CAAC,IAAI;gBAC3C,CAAC,CAAC,IAAA,WAAC,EAAA,GAAG,IAAI,QAAQ,GAAG,EAAE,CAAA;QAC3B,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"}
@@ -0,0 +1,23 @@
(The MIT License)
Copyright (c) 2012-2014 TJ Holowaychuk <tj@vision-media.ca>
Copyright (c) 2015-2016 Douglas Christopher Wilson <doug@somethingdoug.com
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,24 @@
import { default as default2 } from "./BasicLayout.mjs";
import { default as default3 } from "./ConsoleAppender.mjs";
import { default as default4 } from "./Level.mjs";
import { default as default5 } from "./LogFactory.mjs";
import { default as default6 } from "./Logger.mjs";
import { default as default7 } from "./PatternLayout.mjs";
import { default as default8 } from "./basicLogPrefix.mjs";
import { default as default9 } from "./compilePattern.mjs";
import { default as default10 } from "./formatMessage.mjs";
import { default as default11 } from "./normalizeLevel.mjs";
import { default as default12 } from "./pad.mjs";
export {
default2 as BasicLayout,
default3 as ConsoleAppender,
default4 as Level,
default5 as LogFactory,
default6 as Logger,
default7 as PatternLayout,
default8 as basicLogPrefix,
default9 as compilePattern,
default10 as formatMessage,
default11 as normalizeLevel,
default12 as pad
};
@@ -0,0 +1,121 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEnumLiterals = getEnumLiterals;
exports.getEnumTypes = getEnumTypes;
exports.getEnumKeyForLiteral = getEnumKeyForLiteral;
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../../util");
/*
* If passed an enum member, returns the type of the parent. Otherwise,
* returns itself.
*
* For example:
* - `Fruit` --> `Fruit`
* - `Fruit.Apple` --> `Fruit`
*/
function getBaseEnumType(typeChecker, type) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const symbol = type.getSymbol();
if (!tsutils.isSymbolFlagSet(symbol, ts.SymbolFlags.EnumMember)) {
return type;
}
return typeChecker.getTypeAtLocation(symbol.valueDeclaration.parent);
}
/**
* Retrieve only the Enum literals from a type. for example:
* - 123 --> []
* - {} --> []
* - Fruit.Apple --> [Fruit.Apple]
* - Fruit.Apple | Vegetable.Lettuce --> [Fruit.Apple, Vegetable.Lettuce]
* - Fruit.Apple | Vegetable.Lettuce | 123 --> [Fruit.Apple, Vegetable.Lettuce]
* - T extends Fruit --> [Fruit]
*/
function getEnumLiterals(type) {
return tsutils
.unionConstituents(type)
.filter((subType) => (0, util_1.isTypeFlagSet)(subType, ts.TypeFlags.EnumLiteral));
}
/**
* A type can have 0 or more enum types. For example:
* - 123 --> []
* - {} --> []
* - Fruit.Apple --> [Fruit]
* - Fruit.Apple | Vegetable.Lettuce --> [Fruit, Vegetable]
* - Fruit.Apple | Vegetable.Lettuce | 123 --> [Fruit, Vegetable]
* - T extends Fruit --> [Fruit]
*/
function getEnumTypes(typeChecker, type) {
return getEnumLiterals(type).map(type => getBaseEnumType(typeChecker, type));
}
/**
* Returns the enum key that matches the given literal node, or null if none
* match. For example:
* ```ts
* enum Fruit {
* Apple = 'apple',
* Banana = 'banana',
* }
*
* getEnumKeyForLiteral([Fruit.Apple, Fruit.Banana], 'apple') --> 'Fruit.Apple'
* getEnumKeyForLiteral([Fruit.Apple, Fruit.Banana], 'banana') --> 'Fruit.Banana'
* getEnumKeyForLiteral([Fruit.Apple, Fruit.Banana], 'cherry') --> null
* ```
*/
function getEnumKeyForLiteral(enumLiterals, literal) {
for (const enumLiteral of enumLiterals) {
if (enumLiteral.value === literal) {
const { symbol } = enumLiteral;
const memberDeclaration = symbol.valueDeclaration;
const enumDeclaration = memberDeclaration.parent;
const memberNameIdentifier = memberDeclaration.name;
const enumName = enumDeclaration.name.text;
switch (memberNameIdentifier.kind) {
case ts.SyntaxKind.Identifier:
return `${enumName}.${memberNameIdentifier.text}`;
case ts.SyntaxKind.StringLiteral: {
const memberName = memberNameIdentifier.text.replaceAll("'", "\\'");
return `${enumName}['${memberName}']`;
}
case ts.SyntaxKind.ComputedPropertyName:
return `${enumName}[${memberNameIdentifier.expression.getText()}]`;
default:
break;
}
}
}
return null;
}