@visulima/packem 2.0.0-alpha.83 → 2.0.0-alpha.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/dist/builder/typedoc/index.d.ts +1 -1
- package/dist/builder/typedoc/index.js +3 -3
- package/dist/cli/index.js +36 -36
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.js +1 -1
- package/dist/config/preset/preact.d.ts +1 -1
- package/dist/config/preset/preact.js +2 -2
- package/dist/config/preset/react.d.ts +1 -1
- package/dist/config/preset/react.js +1 -1
- package/dist/config/preset/solid.d.ts +1 -1
- package/dist/config/preset/solid.js +1 -1
- package/dist/config/preset/svelte.d.ts +1 -1
- package/dist/config/preset/svelte.js +1 -1
- package/dist/config/preset/vue.d.ts +1 -1
- package/dist/config/preset/vue.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +39 -35
- package/dist/packem_shared/create-or-update-key-storage-CRDW-Kwa.js +28 -0
- package/dist/packem_shared/default-nqaAQAPN.js +1 -0
- package/dist/packem_shared/index-BSqT47P3.js +244 -0
- package/dist/packem_shared/oxcTransformPlugin-Dwvbw2jE-BSBF_-9X.js +177 -0
- package/dist/packem_shared/{types.d-Cm6dnCyD.d.ts → types.d-ICL9GlqC.d.ts} +8 -5
- package/dist/packem_shared/utils-Bsoe7qJG.js +1 -0
- package/dist/rollup/plugins/oxc/oxc-transformer.js +1 -1
- package/package.json +5 -5
- package/dist/packem_shared/create-or-update-key-storage-DUTe5Prf.js +0 -13
- package/dist/packem_shared/default-Dj-WgmWM.js +0 -1
- package/dist/packem_shared/index-BcKJ8RJU.js +0 -255
- package/dist/packem_shared/oxcResolvePlugin-DeIohkWk-rspLVIoy.js +0 -170
- package/dist/packem_shared/oxcTransformPlugin-Dwvbw2jE-Bbz81VnA.js +0 -4
- package/dist/packem_shared/utils-nmTpa3um.js +0 -1
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var N=Object.defineProperty;var u=(e,n)=>N(e,"name",{value:n,configurable:!0});import{createFilter as R}from"@rollup/pluginutils";import{EXCLUDE_REGEXP as x}from"@visulima/packem-share/constants";import{createRequire as v}from"node:module";var C=Object.defineProperty,t=u((e,n)=>C(e,"name",{value:n,configurable:!0}),"t$1");const r=v(import.meta.url);new URL(".",import.meta.url).pathname;const{readFileSync:b}=r("node:fs");let i=null;const s=[],c=t(()=>{let e=!1;return process.platform==="linux"&&(e=I(),e===null&&(e=O()),e===null&&(e=w())),e},"isMusl"),S=t(e=>e.includes("libc.musl-")||e.includes("ld-musl-"),"isFileMusl"),I=t(()=>{try{return b("/usr/bin/ldd","utf-8").includes("musl")}catch{return null}},"isMuslFromFilesystem"),O=t(()=>{let e=null;return typeof process.report?.getReport=="function"&&(process.report.excludeNetwork=!0,e=process.report.getReport()),e?e.header&&e.header.glibcVersionRuntime?!1:!!(Array.isArray(e.sharedObjects)&&e.sharedObjects.some(S)):null},"isMuslFromReport"),w=t(()=>{try{return r("child_process").execSync("ldd --version",{encoding:"utf8"}).includes("musl")}catch{return!1}},"isMuslFromChildProcess");function h(){if(process.env.NAPI_RS_NATIVE_LIBRARY_PATH)try{return r(process.env.NAPI_RS_NATIVE_LIBRARY_PATH)}catch(e){s.push(e)}else if(process.platform==="android")if(process.arch==="arm64"){try{return r("./transform.android-arm64.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-android-arm64"),n=r("@oxc-transform/binding-android-arm64/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else if(process.arch==="arm"){try{return r("./transform.android-arm-eabi.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-android-arm-eabi"),n=r("@oxc-transform/binding-android-arm-eabi/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else s.push(new Error(`Unsupported architecture on Android ${process.arch}`));else if(process.platform==="win32")if(process.arch==="x64")if(process.config?.variables?.shlib_suffix==="dll.a"||process.config?.variables?.node_target_type==="shared_library"){try{return r("./transform.win32-x64-gnu.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-win32-x64-gnu"),n=r("@oxc-transform/binding-win32-x64-gnu/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else{try{return r("./transform.win32-x64-msvc.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-win32-x64-msvc"),n=r("@oxc-transform/binding-win32-x64-msvc/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else if(process.arch==="ia32"){try{return r("./transform.win32-ia32-msvc.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-win32-ia32-msvc"),n=r("@oxc-transform/binding-win32-ia32-msvc/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else if(process.arch==="arm64"){try{return r("./transform.win32-arm64-msvc.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-win32-arm64-msvc"),n=r("@oxc-transform/binding-win32-arm64-msvc/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else s.push(new Error(`Unsupported architecture on Windows: ${process.arch}`));else if(process.platform==="darwin"){try{return r("./transform.darwin-universal.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-darwin-universal"),n=r("@oxc-transform/binding-darwin-universal/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}if(process.arch==="x64"){try{return r("./transform.darwin-x64.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-darwin-x64"),n=r("@oxc-transform/binding-darwin-x64/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else if(process.arch==="arm64"){try{return r("./transform.darwin-arm64.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-darwin-arm64"),n=r("@oxc-transform/binding-darwin-arm64/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else s.push(new Error(`Unsupported architecture on macOS: ${process.arch}`))}else if(process.platform==="freebsd")if(process.arch==="x64"){try{return r("./transform.freebsd-x64.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-freebsd-x64"),n=r("@oxc-transform/binding-freebsd-x64/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else if(process.arch==="arm64"){try{return r("./transform.freebsd-arm64.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-freebsd-arm64"),n=r("@oxc-transform/binding-freebsd-arm64/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else s.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`));else if(process.platform==="linux")if(process.arch==="x64")if(c()){try{return r("./transform.linux-x64-musl.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-linux-x64-musl"),n=r("@oxc-transform/binding-linux-x64-musl/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else{try{return r("./transform.linux-x64-gnu.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-linux-x64-gnu"),n=r("@oxc-transform/binding-linux-x64-gnu/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else if(process.arch==="arm64")if(c()){try{return r("./transform.linux-arm64-musl.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-linux-arm64-musl"),n=r("@oxc-transform/binding-linux-arm64-musl/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else{try{return r("./transform.linux-arm64-gnu.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-linux-arm64-gnu"),n=r("@oxc-transform/binding-linux-arm64-gnu/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else if(process.arch==="arm")if(c()){try{return r("./transform.linux-arm-musleabihf.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-linux-arm-musleabihf"),n=r("@oxc-transform/binding-linux-arm-musleabihf/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else{try{return r("./transform.linux-arm-gnueabihf.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-linux-arm-gnueabihf"),n=r("@oxc-transform/binding-linux-arm-gnueabihf/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else if(process.arch==="loong64")if(c()){try{return r("./transform.linux-loong64-musl.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-linux-loong64-musl"),n=r("@oxc-transform/binding-linux-loong64-musl/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else{try{return r("./transform.linux-loong64-gnu.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-linux-loong64-gnu"),n=r("@oxc-transform/binding-linux-loong64-gnu/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else if(process.arch==="riscv64")if(c()){try{return r("./transform.linux-riscv64-musl.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-linux-riscv64-musl"),n=r("@oxc-transform/binding-linux-riscv64-musl/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else{try{return r("./transform.linux-riscv64-gnu.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-linux-riscv64-gnu"),n=r("@oxc-transform/binding-linux-riscv64-gnu/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else if(process.arch==="ppc64"){try{return r("./transform.linux-ppc64-gnu.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-linux-ppc64-gnu"),n=r("@oxc-transform/binding-linux-ppc64-gnu/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else if(process.arch==="s390x"){try{return r("./transform.linux-s390x-gnu.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-linux-s390x-gnu"),n=r("@oxc-transform/binding-linux-s390x-gnu/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else s.push(new Error(`Unsupported architecture on Linux: ${process.arch}`));else if(process.platform==="openharmony")if(process.arch==="arm64"){try{return r("./transform.openharmony-arm64.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-openharmony-arm64"),n=r("@oxc-transform/binding-openharmony-arm64/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else if(process.arch==="x64"){try{return r("./transform.openharmony-x64.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-openharmony-x64"),n=r("@oxc-transform/binding-openharmony-x64/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else if(process.arch==="arm"){try{return r("./transform.openharmony-arm.node")}catch(e){s.push(e)}try{const e=r("@oxc-transform/binding-openharmony-arm"),n=r("@oxc-transform/binding-openharmony-arm/package.json").version;if(n!=="0.133.0"&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK&&process.env.NAPI_RS_ENFORCE_VERSION_CHECK!=="0")throw new Error(`Native binding package version mismatch, expected 0.133.0 but got ${n}. You can reinstall dependencies to fix this issue.`);return e}catch(e){s.push(e)}}else s.push(new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`));else s.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`))}u(h,"m");t(h,"requireNative");i=h();if(!i||process.env.NAPI_RS_FORCE_WASI){let e=null,n=null;try{e=r("./transform.wasi.cjs"),i=e}catch(o){process.env.NAPI_RS_FORCE_WASI&&(n=o)}if(!i||process.env.NAPI_RS_FORCE_WASI)try{e=r("@oxc-transform/binding-wasm32-wasi"),i=e}catch(o){process.env.NAPI_RS_FORCE_WASI&&(n?n.cause=o:n=o,s.push(o))}if(process.env.NAPI_RS_FORCE_WASI==="error"&&!e){const o=new Error("WASI binding not found and NAPI_RS_FORCE_WASI is set to error");throw o.cause=n,o}}if(!i&&globalThis.process?.versions?.webcontainer)try{i=r("./webcontainer-fallback.cjs")}catch(e){s.push(e)}if(!i)throw s.length>0?new Error("Cannot find native binding. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.",{cause:s.reduce((e,n)=>(n.cause=e,n))}):new Error("Failed to load native binding");const{transform:y}=i;var A=Object.defineProperty,P=u((e,n)=>A(e,"name",{value:n,configurable:!0}),"t"),F=Object.defineProperty,k=P((e,n)=>F(e,"name",{value:n,configurable:!0}),"n"),H=Object.defineProperty,V=k((e,n)=>H(e,"name",{value:n,configurable:!0}),"s");const K=V(({exclude:e,include:n,...o})=>{const m=R(n,e??x);return{name:"packem:oxc-transform",async transform(E,p){if(!m(p))return;const _=await y(p,E,{...o,sourcemap:!0}),{code:l,errors:d,map:f}=_;if(d.length>0){const g=d.map(a=>typeof a=="string"?a:a.message??JSON.stringify(a));return this.error({message:[`
|
|
2
|
-
transform errors:`,...g].join(`
|
|
3
|
-
|
|
4
|
-
`),pluginCode:"ERR_TRANSFORM"})}return{code:l,map:f}}}},"oxcTransformPlugin");K.NAME="oxc";export{K as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var tn=Object.defineProperty;var I=(r,l)=>tn(r,"name",{value:l,configurable:!0});import{createRequire as nn}from"node:module";var rn=Object.defineProperty,i=I((r,l)=>rn(r,"name",{value:l,configurable:!0}),"s");let me=i(()=>{var r=(()=>{var l=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,h=Object.prototype.hasOwnProperty,v=i((e,t)=>{for(var n in t)l(e,n,{get:t[n],enumerable:!0})},"ne"),A=i((e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of u(t))!h.call(e,o)&&o!==n&&l(e,o,{get:i(()=>t[o],"get"),enumerable:!(s=a(t,o))||s.enumerable});return e},"ae"),x=i(e=>A(l({},"__esModule",{value:!0}),e),"oe"),P={};v(P,{zeptomatch:i(()=>he,"zeptomatch")});var H=i(e=>{const t=new Set,n=[e];for(let s=0;s<n.length;s++){const o=n[s];if(t.has(o))continue;t.add(o);const{children:c}=o;if(c?.length)for(let p=0,g=c.length;p<g;p++)n.push(c[p])}return Array.from(t)},"M"),Oe=i(e=>{let t="";const n=H(e);for(let s=0,o=n.length;s<o;s++){const c=n[s];if(!c.regex)continue;const p=c.regex.flags;if(t||(t=p),t!==p)throw new Error(`Inconsistent RegExp flags used: "${t}" and "${p}"`)}return t},"se"),J=i((e,t,n)=>{const s=n.get(e);if(s!==void 0)return s;const o=e.partial??t;let c="";if(e.regex&&(c+=o?"(?:$|":"",c+=e.regex.source),e.children?.length){const p=Re(e.children.map(g=>J(g,t,n)).filter(Boolean));if(p?.length){const g=e.children.some(_=>!_.regex||!(_.partial??t)),d=p.length>1||o&&(!c.length||g);c+=d?o?"(?:$|":"(?:":"",c+=p.join("|"),c+=d?")":""}}return e.regex&&(c+=o?")":""),n.set(e,c),c},"O"),Ee=i((e,t)=>{const n=new Map,s=H(e);for(let o=s.length-1;o>=0;o--){const c=J(s[o],t,n);if(!(o>0))return c}return""},"ie"),Re=i(e=>Array.from(new Set(e)),"ue"),L=i((e,t,n)=>L.compile(e,n).test(t),"R");L.compile=(e,t)=>{const n=t?.partial??!1,s=Ee(e,n),o=Oe(e);return new RegExp(`^(?:${s})$`,o)};var Pe=L,Se=i((e,t)=>{const n=Pe.compile(e,t),s=`${n.source.slice(0,-1)}[\\\\/]?$`,o=n.flags;return new RegExp(s,o)},"le"),Be=Se,_e=i(e=>{const t=e.map(s=>s.source).join("|")||"$^",n=e[0]?.flags;return new RegExp(t,n)},"ve"),We=_e,K=i(e=>Array.isArray(e),"j"),S=i(e=>typeof e=="function","_"),Ie=i(e=>e.length===0,"he"),Te=(()=>{const{toString:e}=Function.prototype,t=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return n=>(n.length===0||n.length===1)&&t.test(e.call(n))})(),qe=i(e=>typeof e=="number","de"),Ce=i(e=>typeof e=="object"&&e!==null,"xe"),Ze=i(e=>e instanceof RegExp,"me"),Le=(()=>{const e=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return t=>e.test(t.source)})(),Fe=(()=>{const e=/^[a-zA-Z0-9_-]+$/;return t=>e.test(t.source)&&!t.flags.includes("i")})(),Q=i(e=>typeof e=="string","A"),j=i(e=>e===void 0,"f"),Ne=i(e=>{const t=new Map;return n=>{const s=t.get(n);if(s!==void 0)return s;const o=e(n);return t.set(n,o),o}},"ye"),X=i((e,t,n={})=>{const s={cache:{},input:e,index:0,indexBacktrackMax:0,options:n,output:[]},o=z(t)(s),c=Math.max(s.index,s.indexBacktrackMax);if(o&&s.index===e.length)return s.output;throw new Error(`Failed to parse at index ${c}`)},"I"),f=i((e,t)=>K(e)?Ue(e,t):Q(e)?ee(e,t):De(e,t),"i"),Ue=i((e,t)=>{const n={};for(const s of e){if(s.length!==1)throw new Error(`Invalid character: "${s}"`);const o=s.charCodeAt(0);n[o]=!0}return s=>{const o=s.input;let c=s.index,p=c;for(;p<o.length&&o.charCodeAt(p)in n;)p+=1;if(p>c){if(!j(t)&&!s.options.silent){const g=o.slice(c,p),d=S(t)?t(g,o,`${c}`):t;j(d)||s.output.push(d)}s.index=p}return!0}},"we"),De=i((e,t)=>{if(Fe(e))return ee(e.source,t);{const n=e.source,s=e.flags.replace(/y|$/,"y"),o=new RegExp(n,s);return Le(e)&&S(t)&&!Te(t)?Ge(o,t):Ve(o,t)}},"$e"),Ge=i((e,t)=>n=>{const s=n.index,o=n.input;e.lastIndex=s;const c=e.exec(o);if(c){const p=e.lastIndex;if(!n.options.silent){const g=t(...c,o,`${s}`);j(g)||n.output.push(g)}return n.index=p,!0}else return!1},"Ee"),Ve=i((e,t)=>n=>{const s=n.index,o=n.input;if(e.lastIndex=s,e.test(o)){const c=e.lastIndex;if(!j(t)&&!n.options.silent){const p=S(t)?t(o.slice(s,c),o,`${s}`):t;j(p)||n.output.push(p)}return n.index=c,!0}else return!1},"Ce"),ee=i((e,t)=>n=>{const s=n.index,o=n.input;if(o.startsWith(e,s)){if(!j(t)&&!n.options.silent){const c=S(t)?t(e,o,`${s}`):t;j(c)||n.output.push(c)}return n.index+=e.length,!0}else return!1},"F"),F=i((e,t,n,s)=>{const o=z(e),c=t>1;return U(N(ne(p=>{let g=0;for(;g<n;){const d=p.index;if(!o(p)||(g+=1,p.index===d))break}return g>=t},c),s))},"k"),te=i((e,t)=>F(e,0,1,t),"L"),C=i((e,t)=>F(e,0,1/0,t),"$"),Ye=i((e,t)=>F(e,1,1/0,t),"Re"),O=i((e,t)=>{const n=e.map(z);return U(N(ne(s=>{for(let o=0,c=n.length;o<c;o++)if(!n[o](s))return!1;return!0}),t))},"x"),w=i((e,t)=>{const n=e.map(z);return U(N(s=>{for(let o=0,c=n.length;o<c;o++)if(n[o](s))return!0;return!1},t))},"p"),ne=i((e,t=!0,n=!1)=>{const s=z(e);return t?o=>{const c=o.index,p=o.output.length,g=s(o);return!g&&!n&&(o.indexBacktrackMax=Math.max(o.indexBacktrackMax,o.index)),(!g||n)&&(o.index=c,o.output.length!==p&&(o.output.length=p)),g}:s},"q"),N=i((e,t)=>{const n=z(e);return t?s=>{if(s.options.silent)return n(s);const o=s.output.length;if(n(s)){const c=s.output.splice(o,1/0),p=t(c);return j(p)||s.output.push(p),!0}else return!1}:n},"B"),U=(()=>{let e=0;return t=>{const n=z(t),s=e+=1;return o=>{var c;if(o.options.memoization===!1)return n(o);const p=o.index,g=(c=o.cache)[s]||(c[s]={indexMax:-1,queue:[]}),d=g.queue;if(p<=g.indexMax){const W=g.store||(g.store=new Map);if(d.length){for(let R=0,Qt=d.length;R<Qt;R+=2){const Xt=d[R*2],en=d[R*2+1];W.set(Xt,en)}d.length=0}const $=W.get(p);if($===!1)return!1;if(qe($))return o.index=$,!0;if($)return o.index=$.index,$.output?.length&&o.output.push(...$.output),!0}const _=o.output.length,Kt=n(o);if(g.indexMax=Math.max(g.indexMax,p),Kt){const W=o.index,$=o.output.length;if($>_){const R=o.output.slice(_,$);d.push(p,{index:W,output:R})}else d.push(p,W);return!0}else return d.push(p,!1),!1}}})(),re=i(e=>{let t;return n=>(t||(t=z(e())),t(n))},"G"),z=Ne(e=>{if(S(e))return Ie(e)?re(e):e;if(Q(e)||Ze(e))return f(e);if(K(e))return O(e);if(Ce(e))return w(Object.values(e));throw new Error("Invalid rule")}),M=i(e=>e,"d"),He=i(e=>typeof e=="string","ke"),Je=i(e=>{const t=new WeakMap,n=new WeakMap;return(s,o)=>{const c=o?.partial?n:t,p=c.get(s);if(p!==void 0)return p;const g=e(s,o);return c.set(s,g),g}},"Be"),Ke=i(e=>{const t={},n={};return(s,o)=>{const c=o?.partial?n:t;return c[s]??(c[s]=e(s,o))}},"Pe"),Qe=f(/\\./,M),Xe=f(/./,M),et=f(/\*\*\*+/,"*"),tt=f(/([^/{[(!])\*\*/,(e,t)=>`${t}*`),nt=f(/(^|.)\*\*(?=[^*/)\]}])/,(e,t)=>`${t}*`),rt=C(w([Qe,et,tt,nt,Xe])),ot=rt,st=i(e=>X(e,ot,{memoization:!1}).join(""),"Ie"),lt=st,oe="abcdefghijklmnopqrstuvwxyz",at=i(e=>{let t="";for(;e>0;){const n=(e-1)%26;t=oe[n]+t,e=Math.floor((e-1)/26)}return t},"Le"),se=i(e=>{let t=0;for(let n=0,s=e.length;n<s;n++)t=t*26+oe.indexOf(e[n])+1;return t},"V"),D=i((e,t)=>{if(t<e)return D(t,e);const n=[];for(;e<=t;)n.push(e++);return n},"b"),it=i((e,t,n)=>D(e,t).map(s=>String(s).padStart(n,"0")),"qe"),le=i((e,t)=>D(se(e),se(t)).map(at),"W"),m=i(e=>({partial:!1,regex:new RegExp(e,"s"),children:[]}),"c"),B=i(e=>({children:e}),"y"),E=(()=>{const e=i((t,n,s)=>{if(s.has(t))return;s.add(t);const{children:o}=t;if(!o.length)o.push(n);else for(let c=0,p=o.length;c<p;c++)e(o[c],n,s)},"e");return t=>{if(!t.length)return B([]);for(let n=t.length-1;n>=1;n--){const s=new Set,o=t[n-1],c=t[n];e(o,c,s)}return t[0]}})(),k=i(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),ct=f(/\\./,m),ut=f(/[$.*+?^(){}[\]\|]/,e=>m(`\\${e}`)),pt=f(/[\\\/]/,k),ft=f(/[^$.*+?^(){}[\]\|\\\/]+/,m),gt=f(/^(?:!!)*!(.*)$/,(e,t)=>m(`(?!^${he.compile(t).source}$).*?`)),ht=f(/^(!!)+/),mt=w([gt,ht]),dt=f(/\/(\*\*\/)+/,()=>B([E([k(),m(".+?"),k()]),k()])),xt=f(/^(\*\*\/)+/,()=>B([m("^"),E([m(".*?"),k()])])),bt=f(/\/(\*\*)$/,()=>B([E([k(),m(".*?")]),m("$")])),vt=f(/\*\*/,()=>m(".*?")),ae=w([dt,xt,bt,vt]),wt=f(/\*\/(?!\*\*\/|\*$)/,()=>E([m("[^\\\\/]*?"),k()])),$t=f(/\*/,()=>m("[^\\\\/]*")),ie=w([wt,$t]),ce=f("?",()=>m("[^\\\\/]")),yt=f("[",M),jt=f("]",M),zt=f(/[!^]/,"^\\\\/"),kt=f(/[a-z]-[a-z]|[0-9]-[0-9]/i,M),At=f(/\\./,M),Mt=f(/[$.*+?^(){}[\|]/,e=>`\\${e}`),Ot=f(/[\\\/]/,"\\\\/"),Et=f(/[^$.*+?^(){}[\]\|\\\/]+/,M),Rt=w([At,Mt,Ot,kt,Et]),ue=O([yt,te(zt),C(Rt),jt],e=>m(e.join(""))),Pt=f("{","(?:"),St=f("}",")"),Bt=f(/(\d+)\.\.(\d+)/,(e,t,n)=>it(+t,+n,Math.min(t.length,n.length)).join("|")),_t=f(/([a-z]+)\.\.([a-z]+)/,(e,t,n)=>le(t,n).join("|")),Wt=f(/([A-Z]+)\.\.([A-Z]+)/,(e,t,n)=>le(t.toLowerCase(),n.toLowerCase()).join("|").toUpperCase()),It=w([Bt,_t,Wt]),pe=O([Pt,It,St],e=>m(e.join(""))),Tt=f("{"),qt=f("}"),Ct=f(","),Zt=f(/\\./,m),Lt=f(/[$.*+?^(){[\]\|]/,e=>m(`\\${e}`)),Ft=f(/[\\\/]/,k),Nt=f(/[^$.*+?^(){}[\]\|\\\/,]+/,m),Ut=re(()=>ge),Dt=f("",()=>m("(?:)")),Gt=Ye(w([ae,ie,ce,ue,pe,Ut,Zt,Lt,Ft,Nt]),E),fe=w([Gt,Dt]),ge=O([Tt,te(O([fe,C(O([Ct,fe]))])),qt],B),Vt=C(w([mt,ae,ie,ce,ue,pe,ge,ct,ut,pt,ft]),E),Yt=Vt,Ht=i(e=>X(e,Yt,{memoization:!1})[0],"kr"),Jt=Ht,G=i((e,t,n)=>G.compile(e,n).test(t),"N");G.compile=(()=>{const e=Ke((n,s)=>Be(Jt(lt(n)),s)),t=Je((n,s)=>We(n.map(o=>e(o,s))));return(n,s)=>He(n)?e(n,s):t(n,s)})();var he=G;return x(P)})();return r.default||r},"_lazyMatch"),V;const on=i((r,l)=>(V||(V=me(),me=null),V(r,l)),"zeptomatch"),sn=/^[A-Z]:\//i,y=i((r="")=>r&&r.replaceAll("\\","/").replace(sn,l=>l.toUpperCase()),"normalizeWindowsPath"),ln=/^[/\\]{2}/,an=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,we=/^[A-Z]:$/i,de=/^\/([A-Z]:)?$/i,cn=/.(\.[^./]+)$/,un=/^[/\\]|^[a-z]:[/\\]/i,pn=/\/$/,fn=i(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),$e=i((r,l)=>{let a="",u=0,h=-1,v=0,A;for(let x=0;x<=r.length;++x){if(x<r.length)A=r[x];else{if(A==="/")break;A="/"}if(A==="/"){if(!(h===x-1||v===1))if(v===2){if(a.length<2||u!==2||!a.endsWith(".")||a.at(-2)!=="."){if(a.length>2){const P=a.lastIndexOf("/");P===-1?(a="",u=0):(a=a.slice(0,P),u=a.length-1-a.lastIndexOf("/")),h=x,v=0;continue}else if(a.length>0){a="",u=0,h=x,v=0;continue}}l&&(a+=a.length>0?"/..":"..",u=2)}else a.length>0?a+=`/${r.slice(h+1,x)}`:a=r.slice(h+1,x),u=x-h-1;h=x,v=0}else A==="."&&v!==-1?++v:v=-1}return a},"normalizeString"),q=i(r=>an.test(r),"isAbsolute"),ye=i(function(r){if(r.length===0)return".";r=y(r);const l=ln.exec(r),a=q(r),u=r.at(-1)==="/";return r=$e(r,!a),r.length===0?a?"/":u?"./":".":(u&&(r+="/"),we.test(r)&&(r+="/"),l?a?`//${r}`:`//./${r}`:a&&!q(r)?`/${r}`:r)},"normalize"),je=i((...r)=>{let l="";for(const a of r)if(a)if(l.length>0){const u=l.at(-1)==="/",h=a[0]==="/";u&&h?l+=a.slice(1):l+=u||h?a:`/${a}`}else l+=a;return ye(l)},"join"),Y=i(function(...r){r=r.map(u=>y(u));let l="",a=!1;for(let u=r.length-1;u>=-1&&!a;u--){const h=u>=0?r[u]:fn();!h||h.length===0||(l=`${h}/${l}`,a=q(h))}return l=$e(l,!a),a&&!q(l)?`/${l}`:l.length>0?l:"."},"resolve"),En=i(function(r){return y(r)},"toNamespacedPath"),ze=i(function(r){return cn.exec(y(r))?.[1]??""},"extname"),Rn=i(function(r,l){const a=Y(r).replace(de,"$1").split("/"),u=Y(l).replace(de,"$1").split("/");if(u[0][1]===":"&&a[0][1]===":"&&a[0]!==u[0])return u.join("/");const h=[...a];for(const v of h){if(u[0]!==v)break;a.shift(),u.shift()}return[...a.map(()=>".."),...u].join("/")},"relative"),gn=i(r=>{const l=y(r).replace(pn,"").split("/").slice(0,-1);return l.length===1&&we.test(l[0])&&(l[0]=`${l[0]}/`),l.join("/")||(q(r)?"/":".")},"dirname");i(function(r){const l=[r.root,r.dir,r.base??r.name+r.ext].filter(Boolean);return y(r.root?Y(...l):l.join("/"))},"format");const hn=i((r,l)=>{const a=y(r).split("/").pop();return l&&a.endsWith(l)?a.slice(0,-l.length):a},"basename"),Pn=i(function(r){const l=un.exec(r)?.[0]?.replaceAll("\\","/")??"",a=hn(r),u=ze(a);return{base:a,dir:gn(r),ext:u,name:a.slice(0,a.length-u.length),root:l}},"parse");i((r,l)=>on(l,ye(r)),"matchesGlob");var mn=Object.defineProperty,b=I((r,l)=>mn(r,"name",{value:l,configurable:!0}),"i");const dn=nn(import.meta.url),T=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,xn=b(r=>{if(typeof T<"u"&&T.versions&&T.versions.node){const[l,a]=T.versions.node.split(".").map(Number);if(l>22||l===22&&a>=3||l===20&&a>=16)return T.getBuiltinModule(r)}return dn(r)},"__cjs_getBuiltinModule"),{fileURLToPath:bn}=xn("node:url");function ke(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}I(ke,"w");b(ke,"getDefaultExportFromCjs");var xe,be;function Ae(){return be||(be=1,xe=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),xe}I(Ae,"y");b(Ae,"requireBinaryExtensions");var vn=Ae();const wn=ke(vn),$n=new Set(wn),yn=new Set(["/","\\",void 0]),ve=Symbol.for("pathe:normalizedAlias"),jn=/(^|[/\\])([^/\\]+?)(?=(?:\.[^.]+)?$)/,zn=b((r,l)=>l.split("/").length-r.split("/").length,"compareAliases"),Z=b((r="/")=>{const l=r.at(-1);return l==="/"||l==="\\"},"hasTrailingSlash"),Me=b(r=>{if(r[ve])return r;const l=Object.fromEntries(Object.entries(r).toSorted(([a],[u])=>zn(a,u)));for(const a in l)for(const u in l)u===a||a.startsWith(u)||l[a].startsWith(u)&&yn.has(l[a][u.length])&&(l[a]=l[u]+l[a].slice(u.length));return Object.defineProperty(l,ve,{enumerable:!1,value:!0}),l},"normalizeAliases"),Sn=b((r,l)=>{r=y(r),l=Me(l);for(const[a,u]of Object.entries(l)){if(!r.startsWith(a))continue;const h=Z(a)?a.slice(0,-1):a;if(Z(r[h.length]))return je(u,r.slice(a.length))}return r},"resolveAlias");b(r=>jn.exec(r)?.[2],"filename");b((r,l)=>{r=y(r),l=Me(l);for(const[a,u]of Object.entries(l).toReversed()){if(!r.startsWith(u))continue;const h=Z(u)?u.slice(0,-1):u;if(Z(r[h.length]))return je(a,r.slice(u.length))}return r},"reverseResolveAlias");const kn=/^(?:\.?\.[/\\]|\.\.\B)/,An=/^(?:msys|cygwin)$/,Bn=b(r=>kn.test(r)||r==="..","isRelative");b(r=>$n.has(ze(r).slice(1).toLowerCase()),"isBinaryPath");const _n=b(r=>y(r instanceof URL?bn(r):r),"toPath");b(()=>{if(!globalThis.process)return!1;if(globalThis.process.platform==="win32"||globalThis.process.platform==="cygwin")return!0;const r=globalThis.process.env.OSTYPE;return typeof r!="string"?!1:An.test(r)},"isWindows");export{En as A,ye as B,ze as H,Y as L,q as M,_n as P,Rn as R,gn as V,hn as X,je as _,Sn as a,Pn as b,Bn as c};
|